Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

After adding the language ngerman to package babel in a large document I stumbled upon a strange error resulting from the parallel use of listings package:

! TeX capacity exceeded, sorry [grouping levels=255].
\lst@OrgOutput ->{
              \lst@RestoreOrigCatcodes \lst@ifec \lst@RestoreOrigExtende...
l.19 \end{document}

Here is a minimal example, can you please verify that it fails?

\documentclass{article}
%\usepackage[english]{babel} % ok
\usepackage[ngerman]{babel}  % fail
%\usepackage[german]{babel}  % also fail
%\usepackage[french]{babel}  % ok
\usepackage{listings}
\newcommand\rdf[1]{\lstinline{#1}}
\begin{document}
\rdf{"}\rdf{"}             % fail
%\lstinline{"}\lstinline{"} % ok
\end{document}

I use babel 2008/07/08 v3.8m with ngermanb 2008/07/06 v2.6n and listings 2007/02/22 1.4, this should be the newest version. Maybe the problem is in the newcommand or it has to do with doublequote handling in German?

share|improve this question
3  
" has a special meaning as a shortcut, you can disable it by \shorthandoff{"}, such as at the beginning of the document, then it's compilable. (We already had similar problems in questions, so this question may be closed as a duplicate for better organization). – Stefan Kottwitz Dec 5 '12 at 20:09
1  
If you want \rdf as replacement for \lstinline the following should work with ngerman, too: \let\rdf\lstinline – cgnieder Dec 5 '12 at 20:50
Thanks, Stefan for pointing to the \shorthandoff{"}. I added "doublequote" to the question's title, so anyone with similar problems might easier find it. Clsong the question is ok, thanks for telling before :-) – Jakob Dec 6 '12 at 12:07

closed as too localized by lockstep, Torbjørn T., Joseph Wright Jan 5 at 22:46

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.