Sie sind hier

Error 'Extra \endcsname.' on chapters

Hello,

First at all I would like to say sorry by posting in English but I don't speak German. I have been searching a English forum for KOMA-Script without lucky.

I'm trying to compile the next document:

%\documentclass[b5paper,twoside]{book}
 
\documentclass[b5paper,twoside,open=right,cleardoublepage=empty,headings=normal
headsepline=true,appendixprefix, bibliography=totoc,captions=tableheading,draft=false]
 
\usepackage[spanish]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
 
\begin{document}
 
\tableofcontents
\listoftables
\listoffigures
 
\chapter{Lorem ipsum}
\section{dolor sit amet}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut semper convallis quam.
Donec purus. Morbi lobortis metus sed nunc. Nullam nec elit. Vestibulum
 
\appendix
\chapter{Vestibulum ut purus}
\section{Vitae lectus euismod}
Vestibulum ut purus vitae lectus euismod facilisis. Morbi accumsan. Mauris enim.
Praesent eleifend massa id mauris. Aliquam erat volutpat. Sed id nibh quis nulla
 
\end{document}

but it allways fail with the next error:

[1] [2] (./test.lot) [3] [4] (./test.lof) [5] [6]
Cap\'{\i }tulo 1.
[7] [8]
Ap\'{e}ndice A.
! Extra \endcsname.
\language@active@arg~ ... ~@\string #1@\endcsname
                                                  \fi
l.24 \chapter{Vestibulum ut purus}

It happens with Tex Live 2007 and Tex Live 2008 distribution together to Koma Script 3.03. Furthermore, the document compiles with the Koma Script that comes with Tex Live 2007 (I think 2.9x) but doesn't with the script that comes with Tex Live 2008.

The document compiles either using book documentclass, comment out the \appendix statement or comment out the \usepackage[spanish]{babel} statement.

I have the same problem with option chapterprefix. But it doesn't happens if I disable chapterprefix and appendixprefix. I think there is a problem between KOMA and spanish non-ascii characters.

Finally, I do apologize for not to use komabug.tex to report this bug. But it allways shows to me this message, no matter what latex version I was using:

>Bereich: Basics
>Version: 2009/01/24 v3.02b KOMA-Script document
>Betreff: Error
>Format: LaTeX2e <2005/12/01>Babel <v3.8l> and hyphenation
patterns for english, usenglishmax, dumylang, nohyphenation, catalan, galician,spanish, ukenglish, loaded.
>KOMA-Script: 2009/01/24 v3.02b KOMA-Script document
!
! Your LaTeX installation is older than two years.
! Updating would be a good idea before sending this report.
! You should compare the date of the package with the date of
! the used LaTeX version. If LaTeX is more than two years older
! than KOMA-Script, this could be the reason of the problem..
l.642   \errmessage{\oldformat}
Bild von Markus Kohm

spanish.ldf makes ~ active and redefines it. LaTeX defines ~ to be a \nobreakspace. This may be used e.g. like:

\documentclass{minimal}
\begin{document}
Test{~}Test
\end{document}

But with spanish.ldf:

\documentclass{minimal}
\usepackage[spanish]{babel}
\begin{document}
Test{~}Test
\end{document}

You will get an error.

Try:

\newcommand*{\chapterformat}{%
  \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot\enskip}%
}

at your preamble.

Maybe I'll replace all {~} by {\nobreakspace} at KOMA-Script.

Oh, thank you. I replaced all {~} by {\nobreakspace} and now it works fine.

Comments for "Error &#039;Extra \endcsname.&#039; on chapters" abonnieren