[texhax] LaTeX hangs up with $(\ref{label})$ and [spanish]{babel}
gabriele balducci
balducci at dschgrazlin1.univ.trieste.it
Wed Jul 9 12:07:14 CEST 2003
> philip.ratcliffe at uninsubria.it ("Philip G. Ratcliffe") writes:
> [someone asked]
> >| I have experienced an annoying behaviour of LaTeX. When I use a reference
> >| inside math mode
> >| the TeX program hungs up without any error message. I have reproduced the
> >| problem in the small document below.
> >| This happens when using \usepackage[spanish]{babel} and after using \chapter.
>
> >I suspect it has to do with the way the "spanish" package redefines "."
> >although I haven't time to delve any deeper.
>
> It is.
>
> The \ref command temporarily sets \@safe at activestrue while it typesets
> the reference ("1.1").
>
> The dot has a 8000 mathcode which makes it active within math mode.
> It is defined to be "\es at use@shorthand ." which, when \@safe at actives
> is true, expands to "\string .", which expands to just "." and so
> the loop starts again.
>
If you don't care, you can request babel not to use `.' (dot) as a
shorthand with:
\shorthandoff{.}
somewhere after \begin{document}
Hope this helps
Ciao
===========================================================================
Gabriele Balducci tel I-040-5583957
Dipartimento di Scienze Chimiche fax I-040-5583903
Via L. Giorgieri 1 e-mail balducci at univ.trieste.it
I-34127 TRIESTE
===========================================================================
More information about the texhax
mailing list