# Conflict between nag and babel spanish

The following code gives me loads of Font csname csname T1/cmtt/m/sc/10endcsname not found errors.

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\begin{document}
Testing bla bla bla . . .
\end{document}


There seems to be a conflict between the nag package (specifically with the l2tabu and/or orthodox options) and the spanish option of the babel package.

I've tried the es-noquoting and es-noshorthand options with no success.

Does anyone else have this problem? I'm using MacTeX 2012, but I get the same error with TexLive 2011 in Ubuntu.

-

The nag package says

\renewcommand\thenag@c{\roman{nag@c}}


but unfortunately the Spanish module for babel redefines \roman in a non expandable way, in order to print roman numerals in small caps rather that lowercase.

The solution is to avoid the usage of \roman:

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


or to dispense with nag altogether. I simply prefer to avoid the mistakes myself. :)

-
Or to add the option es-lcroman to the spanish module: \usepackage[spanish,es-lcroman]{babel}. This, however, might not really be advisable since it re-activates lower case roman numerals which are forbidden (by the RAE) in Spanish. –  Gonzalo Medina Jul 25 '12 at 20:43
@GonzaloMedina What's wrong is to redefine \@roman in the first place; they should've patched \frontmatter in the book class and told users how to change roman numbers in other cases (say \pagenumbering{scroman}). –  egreg Jul 25 '12 at 20:51
Yes, I agree with you. –  Gonzalo Medina Jul 25 '12 at 20:59
Thanks @egreg, that sorted things out. So you don't find useful the nag package? –  NVaughan Jul 25 '12 at 23:32
@GonzaloMedina That's another way of solving the problem. Personally I don't care a bit about those RAE conventions (which are erratically changed every now and then). Saludos! –  NVaughan Jul 25 '12 at 23:34

Actually, the bug is in nag, because it uses \thenag@n inside a \csname, which in turn calls \roman, intended for the visual (ie, printed) representation of Roman numerals. Note also "internal" counters (\@roman, in this case) are not required to be fully expandable, and in fact \alph in spanish is not (to include the ñ after the n), like \fnsymbol in LaTeX itself. If you want Roman numerals at the low level, \romannumeral\the should be used, which is LaTeX does in lists. On the other hand, changing every instance of \roman in LaTeX (not only the \frontmatter page numbers) would be a mess. Anyway, spanish provides a very simple workaround.

-