# \endcsname error with nag and newest babel/greek update

Did I miss something with babel and polutonikogreek? I just updated my TeX distribution on my mac through TeX Live Utility, and now I get the error:

./document.tex:5: Missing \endcsname inserted.
<to be read again>
\protect
l.5 \begin{document}


This is the file:

% !TEX TS-program = lualatexmk
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass{minimal}
\usepackage[polutonikogreek,british]{babel}
\begin{document}
test
\end{document}


Update: The result is that even without nag (as egreg pointed out in his answer) the polutonikogreek-option of babel (which I need for hyphenation of Ancient Greek) does no longer work.

• My crystal ball went into strike after seeing this; even crystal balls have their limits and working rights. ;-) Dec 7 '13 at 15:00
• I do regular updates and have not seen anything like that. Without a MWE it's really impossible to tell anything sensible. Have you tried removing the auxiliary files? Dec 7 '13 at 15:05
• @egreg : I know. Sorry. Auxiliary files is the first thing I do when encountering a new error. Now I digged deeper and updatad the question with an MWE. Dec 7 '13 at 15:11
• The error is due to nag. I see no reason for using it. Dec 7 '13 at 15:15
• @egreg : but only in connection to polutonikogreek, as it seems Dec 7 '13 at 15:17

## 1 Answer

The error is in nag that wants to use expandably \roman, which it isn't when the Greek module for babel is used.

You can fix it with

\RequirePackage[l2tabu, orthodox]{nag}
\makeatletter
% original is \renewcommand\thenag@c{\roman{nag@c}}
\renewcommand\thenag@c{\romannumeral\c@nag@c}
\makeatother

\documentclass{article}
\usepackage[polutonikogreek,british]{babel}
\begin{document}
test
\end{document}


Note that similar errors will happen for lipsum, which relies on \roman being fully expandable.

• Without using nag I now get quite a few errors in many of the lines which contain Greek. I guess something in the Greek parts of babel (or somewhere else) may have been changed, which then caused my initial error and the new ones now. Dec 7 '13 at 15:39
• @ClintEastwood babel-greek has been deeply modified in recent times. Without an example it's impossible to say something more. But it should be a different question. Dec 7 '13 at 15:41
• This solution works for me, only when I place the code \renewcommand part of the code before I include the babel package. I babel comes first, then I get the same error as posted in the question. Sep 17 '14 at 19:52
• @DohnJoe Yes, you're supposed to place the code before \documentclass as shown in the example. Sep 17 '14 at 19:54
• I placed it in the preamble before the inclusion of babel. Usually the \documentclass is the first line of code. What things have to be put before \documentclass? Sep 17 '14 at 20:03