LaTeX: error - missing $ inserted

Single $'s are used to indicate the start and end of math mode (i.e. typesetting of mathematical forumlae).
This error could, of course, occur legitimately if you left off a $ from your math mode section, however it ALSO occurs if you use an underscore _ or a ^ character outside of a math mode section.

THE FIX: enclose these characters in $'s or use something else.

4 comments:

  1. Anonymous7:52 am

    Cheers. I got this error from a URI in my reference. The URI was long and was being wrapped and I had though this the issue (new to latex), but there were underscore characters in the URI. Once I escaped them by replacing the underscore "_" with "\_" everything was fine again. Your post led me to focus in on this char and discover the issue.

    ReplyDelete
  2. Hey no probs - glad to help. When I was doing my thesis I had many hair-tearing sessions with latex, although it was all worth it because the end result looked great. It is VASTLY superior to Word.

    Good luck with it, and keep reading.

    ReplyDelete
  3. Hi - thanks for the tip. Underscores in URIs. :-)
    Knew it was in the references somewhere, but had used the curly brackets {}, thinking that'd help. It's a pity I'm unlikely to use Latex again after I finish my thesis... :-(

    ReplyDelete
  4. Hey Mike

    Glad it helped you. Same with me - have never touched it again post-thesis.

    ReplyDelete