[texhax] Extending babel's vocabulary from a document class?

Morten Høgholm moho01ab at student.cbs.dk
Wed Jun 16 12:00:16 CEST 2004

On Tue, 15 Jun 2004 21:54:37 +0100, Christer Thörn <df03toch at ing.hj.se>  

> When I try it, I get undefined control sequence on \addto, and if I use  
> \RequirePackage[swedish]{babel} in the class it clashes if I use  
> \usepackage[english]{babel} in a document based on the class (and vice  
> versa). How do I resolve that?

Specify the languages as global options in \documentclass. However this  
always give you Swedish as your main language. If this is not desireable  
you could add the line
   \let\setmainlanguage\main at language
to your class file, so that you have a user command. Also in English you  
should have the strings for \lst...name like in this complete example:

\ProvidesClass{CTclass}[2004/06/16 v0.01 Example Class]
\let\setmainlanguage\main at language
\LoadClass[a4paper]{article}% just for illustrating...
\chaptername, \lstlistingname, text in English

\chaptername, \lstlistingname, text p"w svensk

\chaptername, \lstlistingname, text in English
Morten Høgholm

More information about the texhax mailing list