one of those weird LaTeX incidents…

This afternoon, I had to recompile a LαTεX file written two years ago (in French) and it returned the error:

[sourcecode language=”latex” gutter=”false”]
Missing \endcsname inserted.
<to be read again>
\unskip
l.182 \citeyear{berger:robert:1990}
avec James Berger dans un article aux {\…
[/sourcecode]

and I couldn’t figure out what had changed into the compiler to produce this strange message… Except that removing the line

[sourcecode language=”latex” gutter=”false”]
\usepackage[french]{babel}
[/sourcecode]

was removing the error message (but producing garbage French!).

I thus checked on forums and found some solution on a French LαTεX users forum called MathemaTeX. The issue had to do with using `:’ in my reference codes… However, after fiddling with this solution, I ended up with

[sourcecode language=”latex” gutter=”false”]
\usepackage[french,english]{babel}
[/sourcecode]

as enough to remove the error message and produce the same output as earlier. Weird! (As I always use the same bibTeX file and do use babel-french from time to time… Maybe not that often with citations, actually!)

One Response to “one of those weird LaTeX incidents…”

  1. Your way is right. I have just met the same error but when I add your solution, the error is removed.

Leave a Reply

Discover more from Xi'an's Og

Subscribe now to keep reading and get access to the full archive.

Continue reading