Thursday, May 15, 2008

A fix for LaTeX "Missing $ inserted." console message

While I was running pdflatex on a .tex file containing a math expression, I got this error message:

Missing $ inserted.

Powering through it would evaluate the math expression adequately, but I included a plus sign later in the same sentence. I followed the directions and made it convert to a PDF beautifully by adding a dollar sign at the beginning and at the end of the math expression. (It's not just at the end-of-the-line, like I would normally guess it meant in a Unix environment.)

So, what started off as 9*2^4 turned into $9*2^4$ and produced a beautifully formatted PDF.

I should also note that Norm Matloff has a great introduction to LaTeX.

EDIT: This one's even better. It just took a while to load and I got impatient.

blog comments powered by Disqus