I am trying to include a bibliographical entry that contains the \LaTeX in one of the titles (it's a lab report on LaTeX that's submitted using LaTeX). This will come up with an error - unknown command. Changing the \LaTeX within the bibliography file to plain text removes the error and compilation is successful. I thought that BibTeX was capable of handling these commands... does anyone have a solution?

Here is the offending entry:

  author = {Tobias Oetiker and Hubert Partl and Irene Hyna and Elisabeth Schlegl},
  title = {The Not So Short Introduction to \LaTeX},
  url = {http://tobi.oetiker.ch/lshort/lshort.pdf},
  year = {2008}

You need to enclose the string \LaTeX in double curly braces, as in {{\LaTeX}}.

  • I tried this using MikTeX... BibTeX gave the same complaint about an undefined control sequence, but the document was successfully generated - thanks. – thelionroars1337 Sep 11 '11 at 1:55
  • Please note I've updated my answer to state that one needs to insert double curly braces. Thanks. – Mico Sep 11 '11 at 2:02
  • @Mico: One pair of braces should suffice—this works for me at least. They ensure that bibtex does not accidentally turn \LaTeX into \latex which causes the problem encountered by the OP. – mhp Sep 11 '11 at 8:11
  • @mhp: For some citation manager packages (incl natbib, which is what I use for my work), using a single pair of braces is indeed enough. However, it's not true for all packages and all bibliography styles. Adding the second pair of braces is "thus" insurance that your bib file won't get used in some situation where the lack of a second pair can create trouble. :-) – Mico Sep 11 '11 at 16:09
  • @Mico: Interesting! Is there some common example? – mhp Sep 11 '11 at 17:01

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.