The documentclass langscibook
(based on scrbook
) provides the option booklanguage
. Default is english
. I have successfully used french
, portuguese
, and german
in the past.
Internally, the option value is passed to babel.
This sets hyphenation and changes "Contents" to "Table des matières", "Conteúdo", "Inhaltsverzeichnis" and so on.
When I say booklanguage=spanish
I do get "Índice general" for the table of contents, but compilation stops after that.
...
Runaway argument?
! Forbidden control sequence found while scanning use of \language@active@arg~.
<inserted text>
\par
l.6 \maketitle
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
...
The following works
\documentclass[booklanguage=german]{langscibook}
\author{John Doe}
\title{The test}
\begin{document}
\maketitle
\frontmatter
\tableofcontents
\mainmatter
\chapter{test}
123
\end{document}
When "german" is changed to "spanish", it does not work any longer:
\documentclass[booklanguage=spanish]{langscibook}
\author{John Doe}
\title{The test}
\begin{document}
\maketitle
\frontmatter
\tableofcontents
\mainmatter
\chapter{test}
123
\end{document}
The relevant portions of the code in langscibook.cls are
Line 165ff
\DeclareStringOption{booklanguage}[english]
\define@key{langscibook}{booklanguage}{%
\renewcommand{\lsBookLanguage}{#1}}
line 1392
\usepackage[\lsBookLanguage]{babel}
When I switch to {scrbook}
, I can \usepackage[spanish]{babel}
without problems.
To sum up, {scrbook}
+ babel works with all languages, but {langscibook}
+ babel works with english, german, french, portuguese, and chinese, but not with spanish. I fail to see the reason for this behaviour. Any hints are appreciated.
A minimal working example containing also the langscibook.cls
file can be found here