[Tex/LaTex] TeX Capacity exceeded, sorry [input stack size=5000] Babel ngerman

babelcompilingerrors

I have an error on my latex document. If I put in

\usepackage[ngerman,german]{babel}

into my header file, I get the following log:

...
)
\babel@savecnt=\count89
\U@D=\dimen104
)
! TeX capacity exceeded, sorry [input stack size=5000].
<inserted text> 
                U
l.41 ...Init\CurrentOption{captions\CurrentOption}

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

I need this library, for different language settings, as well for my master thesis the layout should be fixed.

Is there a way to get around the error?

Minimum example:

\documentclass[pdftex,a4paper,12pt,DIV=15,BCOR=20mm,parskip=half,numbers=noenddot]{scrbook}
\usepackage{german, ngerman} %Deutsche Trennungen, Anführungsstriche und mehr
\usepackage[ngerman, german]{babel} % dt. Sprache laden (u.a. auch Ausgabe feststehender Begriffe in deutsch wie etwa Inhaltsverzeichnis statt table of contents)
\begin{document}

\section*{Notes for My Paper}

Don't forget to include examples of topicalization.
They look like this:

{\small
\enumsentence{Topicalization from sentential subject:\\ 
\shortex{7}{a John$_i$ [a & kltukl & [el & 
  {\bf l-}oltoir & er & ngii$_i$ & a Mary]]}
{ & {\bf R-}clear & {\sc comp} & 
  {\bf IR}.{\sc 3s}-love   & P & him & }
{John, (it's) clear that Mary loves (him).}}
}

\subsection*{How to handle topicalization}

I'll just assume a tree structure like (\ex{1}).

{\small
\enumsentence{Structure of A$'$ Projections:\\ [2ex]
\begin{tabular}[t]{cccc}
    & \node{i}{CP}\\ [2ex]
    \node{ii}{Spec} &   &\node{iii}{C$'$}\\ [2ex]
        &\node{iv}{C} & & \node{v}{SAgrP}
\end{tabular}
\nodeconnect{i}{ii}
\nodeconnect{i}{iii}
\nodeconnect{iii}{iv}
\nodeconnect{iii}{v}
}
}

\subsection*{Mood}

Mood changes when there is a topic, as well as when
there is WH-movement.  \emph{Irrealis} is the mood when
there is a non-subject topic or WH-phrase in Comp.
\emph{Realis} is the mood when there is a subject topic
or WH-phrase.

\end{document}

Best Answer

In my opinion, using the babel package should be enough, no need for \usepackage{german,ngerman} (both packages are in the list of outdated packages https://tex.stackexchange.com/a/26200/36296). The babel package also enables hyphenation etc. For quotations marks I suggest to either enter them manually or use the csquotes package.

\documentclass[pdftex,a4paper,12pt,DIV=15,BCOR=20mm,parskip=half,numbers=noenddot]{scrbook}
%\usepackage{ngerman} %Deutsche Trennungen, Anführungsstriche und mehr
\usepackage[ngerman]{babel} % dt. Sprache laden (u.a. auch Ausgabe feststehender Begriffe in deutsch wie etwa Inhaltsverzeichnis statt table of contents)
\begin{document}

\section*{Notes for My Paper}

Don't forget to include examples of topicalization.
They look like this:

\subsection*{Mood}

Mood changes when there is a topic, as well as when
there is WH-movement.  \emph{Irrealis} is the mood when
there is a non-subject topic or WH-phrase in Comp.
\emph{Realis} is the mood when there is a subject topic
or WH-phrase.

\end{document}

(I removed some of the body content as I have no idea how \enumsentence or \shortex might be defined)

Related Question