2

I'm a very new LaTeX user and I'm having some difficulty with a LaTeX error. I'm using overleaf and the error when trying to recompile is this:

./main.aux:130:
Missing \endcsname inserted.
<to be read again> 
                   \protect 
l.130 ...f Cytochrome \textit  {$bo_3$}}{{2.1}{8}}

The file was working fine last night when I left it but today decided it doesn't want to compile. I'm not sure what the {{2.1}{8}} means either. I have looked online for a solution which suggested that the labels I'd used weren't correct so I changed the labels, same error, and deleted the figure which contained the labels, still the same error.

I'd really appreciate any help on this!! Thanks

The link for read&edit is https://www.overleaf.com/9227780jqrvxqvgmqng

  • 1
    the error is in the aux file, so start by deleting that. If the error comes back you have a fragile command in a section heading or caption (unrelated but \textit {$bo_3$} looks a bit odd, the math is not affected by the \textit command. – David Carlisle May 25 '17 at 13:26
  • 1
    the {2.1}{8} means latex is trying to store a label to section 2.1 on page 8 (or equation 2.1 or whatever counter it is) – David Carlisle May 25 '17 at 13:28
  • Welcome to TeX.SE! Please consider adding a minimal working example (minimalbeispiel.de/mini-en.html) to your question; it makes it much easier for people to help you. Happy TeXing! – dgoodmaniii May 25 '17 at 13:51
  • Hi, removing all the \textit {$bo_3$} and recompiling from scratch worked. Thanks for your help! – R.Sen May 25 '17 at 13:54
2

You have

\label{fig:Subunits of Cytochrome $bo_3$}

which doesn't cater for \textit (which you probably have removed since).

Note that labels should be strings of characters (possibly meaningful, of course): they should not contain commands and also formulas are best not included.

Spaces might be dangerous, essentially because the editor may use them for line breaking, which hinders readability of the typescript.

Better

\label{fig:subunits-cytochrome-bo3}

A command such as \textit inside a \label will definitely break exactly as in your error message.

After such errors, remember to remove the .aux file before rerunning LaTeX.

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.