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?
\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\rdfas replacement for\lstinlinethe following should work withngerman, too:\let\rdf\lstinline– cgnieder Dec 5 '12 at 20:50\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