0

I'm experiencing a weird error which, being new to LaTeX, I have much trouble understanding, so I'll describe it chronologically.

I first experienced a crash of TeXworks when compiling. I was drawing a table using the tabular environment for the first time, it worked when compiling, then I tried to embed it in a theorem environment successfully, then tried to add text in the theorem before the table, and it crashed when compiling.

After this, I deleted all files except for the .tex and the .bib files, opened the .tex file again, and when compiling, I got :

LaTeX Error: Command \bfseries invalid in math mode.

Then if I close, re-open and try to compile, crash again.

I removed the code for the table, same problems cycle.

I tried removing as much code as possible and noticed it compiles correctly ONLY IF I do not use \cite{bibkey} (while before this incident it worked perfectly well).

So I tried to do the same by first compiling the .bib file again, which worked fine, but then got the same error when compiling the .tex file.

Here I am, this is the chronological description of the issue. What would you advise?

  • 1
    without any other evidence to the contrary, the most likely reason to get a \bfseries invalid in math mode error when you \cite something is that the citation text has \bfseries in math mode (which is an error) – David Carlisle Sep 8 '16 at 21:20
  • Good evening David. As it turns out, there was such an error, and now that it's corrected it works. Thank you for your advice. (Now that I think of it, I'm convinced I compiled successfully after the mistake, but I'm obviously wrong). – Anton Kirby Sep 8 '16 at 21:56
1

The most likely reason to get a

\bfseries invalid in math mode

error when you \cite something is that the citation text has \bfseries in math mode (which is an error)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.