3

Well, this is rather minor, but

\documentclass{minimal}
\usepackage{chemfig}
\usepackage{MinionPro}
\begin{document}
Hello, World!
\chemfig{*6(=N-*6(-N-=N)=--N-)}
\end{document}

produces

! 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.)

Thanks!

1 Answer 1

4

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).

1
  • @lev-bishop by any chance do you have a reference for @nil ? I looked at the LaTeX Companion book but found none. May 12, 2014 at 16:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .