TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Well, this is rather minor, but

Hello, World!


! Undefined control sequence.
<everyeof> @nil

but the output is fine, so far as I can tell. Why? (Btw, using MinionPro occasionally produces such errors with undefined this or that.)


share|improve this question
up vote 4 down vote accepted

This comes about because \chemfig sets up some processing to do at the end of every file that is read, with \everyeof{\@nil} (I'm not sure why it does this, but \@nil is intentionally undefined and latex programmers use it to denote the end of a list, so it seems chemfig wants to automatically terminate some list at the end of an input file). Meanwhile, the minionpro font files are loaded "on-demand" (like other latex font files (except computer modern, which is "preloaded")).

In your example, the first time a mathmode character is needed happens to be inside \chemfig so the font file is loaded but then at the end of the file there will be this \@nil inserted, causing the observed error.

One workaround is to force the font to load before your \chemfig command. For example \setbox0\vbox{$N$} will do so without producing any output (by typesetting a mathmode $N$ and then discarding the result).

share|improve this answer
Thanks for the quick response! – JohnJamesSmith Aug 2 '11 at 16:13
@lev-bishop by any chance do you have a reference for @nil ? I looked at the LaTeX Companion book but found none. – Sergio Parreiras May 12 '14 at 16:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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