I have a large LaTeX document that was compiling without warnings in Ubuntu 22.04. Now I had to move to Fedora 40 and, when I try to compile it, it produces hundreds of ! Missing $ inserted.
, ! Missing } inserted.
, ! Missing \endgroup inserted.
, etc. I did not change anything in the LaTeX document, I am just trying to get it to compile exactly as it was before I start working again. The problem is that the LaTeX code seems to be right everywhere where these errors arise, for example the first one is
! Missing $ inserted.
<inserted text>
$
l.474 ...temperature of about $-20\UNIT{{^\circ}C}
$.
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
and my LaTeX there is
an operating temperature of about $-20\UNIT{{^\circ}C}$.
How can I debug what is the problem? I read that it could be something in the .bib
files as well, but how can I track it? My complete code has 13 .tex
files and 2 .bib
files, plus hundreds of images.
\UNIT
might be in text mode - but just a guess without seeing a small reproducible example so we can see how the macro is defined or where it comes from.\documentclass{article}\begin{document} an operating temperature of about $-20\UNIT{{^\circ}C}$. \end{document}
and add the definition of\UNIT
(which is probably\mbox
) and observe the same error I woudl guess, in which case removeUNIT
or use\UNIT{$^{\circ}$}