Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

scrlttr2.cls gets "Undefined control sequence" in wheezy

439 views
Skip to first unread message

Richard Starkey

unread,
Mar 30, 2014, 2:03:08 PM3/30/14
to
The scrlttr2 package worked in debian squeeze but apparently broke in
wheezy. Can someone help with a workaround? This minimal example
does not compile:

====8<------------------------------
\documentclass{scrlttr2}
\begin{document}

\begin{letter}{Recipient\\10 Main Street\\New York}

\opening{none}

\end{letter}
\end{document}
====8<------------------------------


this is the stdout/stderr output:

====8<------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
restricted \write18 enabled.
entering extended mode
(./debug_latex.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlttr2.cls
Document Class: scrlttr2 2012/05/15 v3.11 KOMA-Script document class (letter)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files)
Copyright (C) Markus Kohm

))) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize12pt.clo)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty
Package typearea, 2012/05/15 v3.11 KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-

)) (/usr/share/texlive/texmf-dist/tex/latex/koma-script/DIN.lco)
(./debug_latex.aux)
! Undefined control sequence.
\select@language ... \@empty }\languageshorthands
{none}\babel@beginsave \cs...
l.2 \begin{document}

? X
No pages of output.
Transcript written on debug_latex.log.
====8<------------------------------

this is the debug_latex.log file:

====8<------------------------------
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) (format=latex 2014.3.16) 30 MAR 2014 15:41
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**debug_latex.tex
(./debug_latex.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlttr2.cls
Document Class: scrlttr2 2012/05/15 v3.11 KOMA-Script document class (letter)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty
Package: scrkbase 2012/05/15 v3.11 KOMA-Script package (KOMA-Script-dependent b
asics and keyval usage)

(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty
Package: scrbase 2012/05/15 v3.11 KOMA-Script package (KOMA-Script-independent
basics and keyval usage)

(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package: scrlfile 2011/03/09 v3.09 KOMA-Script package (loading files)

Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files)
Copyright (C) Markus Kohm

)))
Class scrlttr2 Info: File `scrsize12pt.clo' used instead of
(scrlttr2) file `scrsize12.clo' to setup font sizes on input line 117
2.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize12pt.clo
File: scrsize12pt.clo 2012/05/15 v3.11 KOMA-Script font size class option (12pt
)
)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty
Package: typearea 2012/05/15 v3.11 KOMA-Script package (type area)

Package typearea, 2012/05/15 v3.11 KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-

\ta@bcor=\skip41
\ta@div=\count79
\ta@hblk=\skip42
\ta@vblk=\skip43
\ta@temp=\skip44
Package typearea Info: These are the values describing the layout:
(typearea) DIV = 12
(typearea) BCOR = 0.0pt
(typearea) \paperwidth = 597.50793pt
(typearea) \textwidth = 448.13095pt
(typearea) DIV departure = -6%
(typearea) \evensidemargin = 2.4185pt
(typearea) \oddsidemargin = 2.4185pt
(typearea) \paperheight = 845.04694pt
(typearea) \textheight = 635.5pt
(typearea) \topmargin = -41.72441pt
(typearea) \headheight = 18.125pt
(typearea) \headsep = 21.75pt
(typearea) \topskip = 12.0pt
(typearea) \footskip = 50.75pt
(typearea) \baselineskip = 14.5pt
(typearea) on input line 1211.
))
Class scrlttr2 Info: Letter-Class-Option `DIN' loaded on input line 2.
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/DIN.lco
File: DIN.lco 2012/05/15 v3.11 KOMA-Script letter-class-option
)
(./debug_latex.aux)
\openout1 = `debug_latex.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
Package scrbase Info: No captions found for `USenglish'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `USenglish'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `american'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `american'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `british'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `british'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `UKenglish'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `UKenglish'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `german'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `german'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `ngerman'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `ngerman'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `austrian'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `austrian'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `naustrian'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `naustrian'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `french'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `french'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `italian'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `italian'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `spanish'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `spanish'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `croatian'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `croatian'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `dutch'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `dutch'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `finnish'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `finnish'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `norsk'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `norsk'
(scrlttr2) --> skipped on input line 2.
Package scrbase Info: No captions found for `swedish'
(scrbase) --> skipped on input line 2.
Class scrlttr2 Info: no date found for language `swedish'
(scrlttr2) --> skipped on input line 2.

! Undefined control sequence.
\select@language ... \@empty }\languageshorthands
{none}\babel@beginsave \cs...
l.2 \begin{document}

? X

Here is how much of TeX's memory you used:
1136 strings out of 495060
18510 string characters out of 3182053
96950 words of memory out of 3000000
4385 multiletter control sequences out of 15000+200000
3938 words of font info for 15 fonts, out of 3000000 for 9000
14 hyphenation exceptions out of 8191
35i,1n,35p,241b,47s stack positions out of 5000i,500n,10000p,200000b,50000s
No pages of output.
====8<------------------------------

GL

unread,
Mar 30, 2014, 2:09:22 PM3/30/14
to
Le 30/03/2014 20:03, Richard Starkey a écrit :
> The scrlttr2 package worked in debian squeeze but apparently broke in
> wheezy. Can someone help with a workaround? This minimal example
> does not compile:

I think \usepackage {babel} might help...

Regards.

Dan Luecking

unread,
Mar 30, 2014, 6:28:21 PM3/30/14
to
On Sun, 30 Mar 2014 20:09:22 +0200, GL <goua...@gmail.com> wrote:

>Le 30/03/2014 20:03, Richard Starkey a écrit :
>> The scrlttr2 package worked in debian squeeze but apparently broke in
>> wheezy. Can someone help with a workaround? This minimal example
>> does not compile:
>
>I think \usepackage {babel} might help...

It might help as a work-around, but it shouldn't be necessary.
The example file runs without error here.

It is possible there is a version mismatch. The latex format
was recently created (2014/03/30) but koma and babel seem to
be a couple of years old.

It is also possible the .aux file was created with babel loaded
and the example file edited and rerun without deleting the old
.aux file.


Dan
To reply by email, change LookInSig to luecking

Markus Kohm

unread,
Mar 31, 2014, 12:53:49 AM3/31/14
to
Richard Starkey (Sonntag, 30. März 2014 20:03):

> ! Undefined control sequence.
> \select@language ... \@empty }\languageshorthands
> {none}\babel@beginsave \cs...

This is due to an incompatibility of the version of babel's hyphen.cfg in
the LaTeX format and outdated KOMA-Script 3.11. With current KOMA-Script
(see my signature) it shouldn't happen (but only tested with babel 3.9 not
outdated babel 3.8). Nevertheless, I recommend to load babel (and tell it
whether you use American or British English), if you have babel's hyphen.cfg
in the format.

Markus Kohm
--
KOMA-Script, a versatile bundle of classes and packages for LaTeX2e
Current: KOMA-Script 3.13.1751 (see <http://www.komascript.de/current>)

Christine Roemer

unread,
Mar 31, 2014, 3:31:49 AM3/31/14
to
Am 30.03.2014 20:03, schrieb Richard Starkey:
> The scrlttr2 package worked in debian squeeze but apparently broke in
> wheezy. Can someone help with a workaround? This minimal example
> does not compile:
>
> ====8<------------------------------
> \documentclass{scrlttr2}
> \begin{document}
>
> \begin{letter}{Recipient\\10 Main Street\\New York}
>
> \opening{none}
>
> \end{letter}
> \end{document}
> ====8<------------------------------

It is OK "With This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live
2013)". An TeX Live update is the remove from problem.

Christine


Jimmy Neutron

unread,
Apr 4, 2014, 9:23:33 PM4/4/14
to
> Nevertheless, I recommend to load babel (and tell it whether you use
> American or British English), if you have babel's hyphen.cfg in the
> format.

I appreciate the help everyone. It turned out to be important to
specify a language /and/ dialect - "english" alone did not work. It
also turns out that the sequence of \usepackage is quite important as
well. The babel package must immediately follow the documentclass.

So here's a working sample:

====8<----------------------------------------
\documentclass[USenglish]{scrlttr2}
\usepackage{babel}
\begin{document}

\begin{letter}{Recipient\\10 Main Street\\New York}

\opening{none}

\end{letter}
\end{document}
====8<----------------------------------------

If anyone is interested, here's a broken sample, caused by other
packages getting between the documentclass and the babel import:

====8<----------------------------------------
\documentclass[USenglish, DIN, pagenumber=false, parskip=half,%
fromalign=left, fromphone=false,%
fromemail=true, fromurl=false, %
fromlogo=true, fromrule=false]{scrlttr2}
\usepackage[latin1]{inputenc}
\usepackage{gensymb}
\usepackage{color}
\RequirePackage{graphicx}
\usepackage{invoice} %<= this must /follow/ the graphicx package
\usepackage{babel} %<= this will fail; babel must be first, after \documentclass

\begin{document}

\begin{letter}{Recipient\\10 Main Street\\New York}

\opening{greetings}

\end{letter}
\end{document}
====8<----------------------------------------

The error is:

! LaTeX Error: Missing \begin{document}.

jfbu

unread,
Apr 5, 2014, 3:46:27 AM4/5/14
to
Le 05/04/2014 03:23, Jimmy Neutron a écrit :
> If anyone is interested, here's a broken sample, caused by other
> packages getting between the documentclass and the babel import:
>
> ====8<----------------------------------------
> \documentclass[USenglish, DIN, pagenumber=false, parskip=half,%
> fromalign=left, fromphone=false,%
> fromemail=true, fromurl=false, %
> fromlogo=true, fromrule=false]{scrlttr2}
> \usepackage[latin1]{inputenc}
> \usepackage{gensymb}
> \usepackage{color}
> \RequirePackage{graphicx}
> \usepackage{invoice} %<= this must/follow/ the graphicx package
> \usepackage{babel} %<= this will fail; babel must be first, after \documentclass
>
> \begin{document}
>
> \begin{letter}{Recipient\\10 Main Street\\New York}
>
> \opening{greetings}
>
> \end{letter}
> \end{document}
> ====8<----------------------------------------
>
> The error is:
>
> ! LaTeX Error: Missing \begin{document}.

The bug originates in invoice.sty

What happens is that invoice.sty contains a line \input{fp}, with the
result that it loads file fp.tex.

File fp.tex is for use of the fp package under Plain TeX

fp.tex contains:

\def\NeedsTeXFormat#1{}

Thus any \usepackage following \usepackage{invoice} will most
certainly cause a Missing \begin{document} error, as soon as it does
\NeedsTeXFormat{LaTeX2e}[some date]

which is the case of babel

Thus load babel before invoice and a bug report should be sent to the invoice
package author.

Replacing \input{fp} by \RequirePackage{fp} would fix this bug.

Apart from that anyhow babel should probably be loaded before invoice,
from my quick look at invoice.sty and invoice.def, language related stuff
should have been done before loading invoice

sincerely

Jean-Francois





Luis Rivera

unread,
Apr 5, 2014, 2:35:48 PM4/5/14
to
On Friday, 4 April 2014 19:23:33 UTC-6, Jimmy Neutron wrote:
> > Nevertheless, I recommend to load babel (and tell it whether you use
> > American or British English), if you have babel's hyphen.cfg in the
> > format.
>
> I appreciate the help everyone. It turned out to be important to
> specify a language /and/ dialect - "english" alone did not work. It
> also turns out that the sequence of \usepackage is quite important as
> well. The babel package must immediately follow the documentclass.
>
> So here's a working sample:
>
> ====8<----------------------------------------
>
> \documentclass[USenglish]{scrlttr2}
>
> \usepackage{babel}
>
> \begin{document}
>

Please, check your call to babel: I vaguely recall that Bezos has recently stated that specifying the language as a documentclass option should be deprecated; the language option should be appended to the call to Babel.

\documentclass{scrlttr2}
\usepackage[USenglish]{babel}

Cheers,

Luis.

Nomen Nescio

unread,
Apr 7, 2014, 6:06:56 PM4/7/14
to
> > \documentclass[USenglish]{scrlttr2}
> > \usepackage{babel}
> > \begin{document}
>
> Please, check your call to babel: I vaguely recall that Bezos has
> recently stated that specifying the language as a documentclass
> option should be deprecated; the language option should be appended
> to the call to Babel.
>
> \documentclass{scrlttr2}
> \usepackage[USenglish]{babel}

The guide I read recommended passing the option to the \documentclass.
The rationale was that if it's passed to the document class, then the
language setting applies to the whole document and all packages
therein. Otherwise, (in your example) only the babel package knows
the language preference.

I could have been reading an obsolete guide, but it seems reasonable
to me that I would want my language preference to encompass the whole
document.

Axel Berger

unread,
Apr 8, 2014, 5:05:13 AM4/8/14
to
Nomen Nescio wrote:
> then the
> language setting applies to the whole document and all packages
> therein. Otherwise, (in your example) only the babel package knows
> the language preference.

There are two problems with this. Most packges only know about main
languages like english, while babel specifies the dialect like british.
For babel the order of options is meaningful while most others won't
know what to do with more than one language or will do something
unintended.

I agree it would be a good idea to enhance babel. You could give it all
possible dialects as package options, say
\usepackage[british,ngerman]{babel} and specify the main language for
the document globally, like german or english. Babel could then use that
to switch to the appropriate dialect from its options list. This way
there would be one global option for everything. I agree it can be a
hassle to have to change a whole bunch of package options whenever
changing the main language.

Axel

N.B: Shouldn't your first name be Nominem? The way it is reminds me of
Russian immigrants. A Mrs Gorbachova would get German papers with
Gorbachova as her surname, resulting in her son being called Gorbachova
too, which to anyone understanding Slavic languages will sound very
funny indeed.

Markus Kohm

unread,
Apr 8, 2014, 1:09:53 PM4/8/14
to
Axel Berger (Dienstag, 8. April 2014 11:05):

> I agree it would be a good idea to enhance babel. You could give it all
> possible dialects as package options, say
> \usepackage[british,ngerman]{babel} and specify the main language for
> the document globally, like german or english.

AFAIK you can already use:

\documentclass[english]{…}
\usepackage[main=british]{babel}

Axel Berger

unread,
Apr 8, 2014, 4:43:14 PM4/8/14
to
Markus Kohm wrote:
> AFAIK you can already use:
> \documentclass[english]{…}
> \usepackage[main=british]{babel}

Maybe, but what my suggestion was about was leaving the \usepackage call
lower down in the source well alone and just setting one class option
right at the top for everything to switch its settings for the new main
language.

Axel

Jimmy Neutron

unread,
Apr 10, 2014, 9:34:37 PM4/10/14
to
> The error is:
>
> ! LaTeX Error: Missing \begin{document}.

After further testing, that error turned out to be a problem with the
invoice package. Reordering the \usepackages fixed it.

Robin Fairbairns

unread,
Apr 11, 2014, 3:04:26 AM4/11/14
to
is this a problem of yours? istm that a package shouldn't be provoking
that...

(personal mail with details welcome, for this. [only])
--
Robin Fairbairns, Cambridge

Nicola Talbot

unread,
Apr 11, 2014, 6:24:39 AM4/11/14
to

> Thus load babel before invoice and a bug report should be sent to the
> invoice
> package author.
>

The invoice package author is already aware of this bug. (I sent a
report when I noticed it a few weeks ago.)

Regards
Nicola Talbot
--
Home: http://www.dickimaw-books.com/
Creating a LaTeX Minimal Example:
http://www.dickimaw-books.com/latex/minexample/

jfbu

unread,
Apr 11, 2014, 6:25:54 AM4/11/14
to
le 11/04/2014 09:04 selon Robin Fairbairns:
> Jimmy Neutron <nob...@beta.jpunix.net> writes:
>
>>> The error is:
>>>
>>> ! LaTeX Error: Missing \begin{document}.
>>
>> After further testing, that error turned out to be a problem with the
>> invoice package. Reordering the \usepackages fixed it.
>
> is this a problem of yours? istm that a package shouldn't be provoking
> that...
>


my reply from April 5th already explained the invoice.sty bug:



The bug originates in invoice.sty

What happens is that invoice.sty contains a line \input{fp}, with the
result that it loads file fp.tex.

File fp.tex is for use of the fp package under Plain TeX

fp.tex contains:

\def\NeedsTeXFormat#1{}

Thus any \usepackage following \usepackage{invoice} will most
certainly cause a Missing \begin{document} error, as soon as it does
\NeedsTeXFormat{LaTeX2e}[some date]

which is the case of babel

Thus load babel before invoice and a bug report should be sent to the invoice
package author.

Javier Bezos

unread,
Apr 11, 2014, 1:40:20 PM4/11/14
to
El 05/04/2014 20:35, Luis Rivera escribió:

> Please, check your call to babel: I vaguely recall that Bezos has
> recently stated that specifying the language as a documentclass option
> should be deprecated; the language option should be appended to the call
> to Babel.
>
> \documentclass{scrlttr2} \usepackage[USenglish]{babel}

Nope. It is still supported and the preferred syntax.

Javier

Anonymous

unread,
Apr 11, 2014, 2:18:28 PM4/11/14
to
> my reply from April 5th already explained the invoice.sty bug:

Yeah, I saw that. Mixmaster posts can be /very/ delayed.

0 new messages