9

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.

  • 1
    My crystal ball went into strike after seeing this; even crystal balls have their limits and working rights. ;-) – egreg Dec 07 '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? – egreg Dec 07 '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. – ClintEastwood Dec 07 '13 at 15:11
  • 2
    The error is due to nag. I see no reason for using it. – egreg Dec 07 '13 at 15:15
  • @egreg : but only in connection to polutonikogreek, as it seems – ClintEastwood Dec 07 '13 at 15:17

1 Answers1

8

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.

egreg
  • 1,121,712
  • 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. – ClintEastwood Dec 07 '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. – egreg Dec 07 '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. – Dohn Joe Sep 17 '14 at 19:52
  • @DohnJoe Yes, you're supposed to place the code before \documentclass as shown in the example. – egreg 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? – Dohn Joe Sep 17 '14 at 20:03
  • @DohnJoe The nag package should be called before \documentclass for full functionality, with \RequirePackage; then the faulty code in it must be redefined, all before \documentclass. – egreg Sep 17 '14 at 20:04