1

I've a little issue managing fixed names in my TeX class. I'm using the babel package for multilanguage hyphenation support so far, but I would like to deactivate the fixed names provided by babel.

I know it's possible to renew all fixed strings/names via:

\addto\captions<LANG>{
  \renewcommand{...}
    {...}
}

but to be honest, I would appreciate to do it just by \newcommand{}{} my own. So that there is no link between the choosen hyphanation language and my used fixed names or any other dependency.

Is there any option to turn off the fixed names of babel (\RequirePackage[englisch.hyphen]{babel} not working)? Or is there any alternative way to get multilanguage hyphenation in LuaLaTeX?

  • Welcome to TeX.SX! If you switch between languages, the \captionsLANG mechanism is what allows automatically changing the fixed words. Can you be more specific about your aim? – egreg Nov 24 '13 at 13:56
  • @greg: well, I just don't want the fixed names on a per-language basis nor in any dependency to a package. just a clean \newcommand{\var}{string}... =) – user41614 Nov 24 '13 at 14:19
2

If you do

\renewcommand{\captionsenglish}{}

and the same for all languages you load, then the commands will do nothing and in particular the fixed words won't change with language.

However, babel provides the otherlanguage* environment that doesn't apply \captions<LANG> and just switches to the hyphenation and language features of the selected language.

There is also the hyphenrules environment that just enables hyphenation rules for the selected language.

Here's an example; note that the French colon is used in the second and third lines, while it's not used in the fourth line.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french,english]{babel}

\begin{document}

Here's the table of contents name: \contentsname

\begin{otherlanguage}{french}
En français la table des matèries est nommée: \contentsname
\end{otherlanguage}

\begin{otherlanguage*}{french}
En français la table des matèries est nommée: \contentsname
\end{otherlanguage*}

\begin{hyphenrules}{french}
En français la table des matèries est nommée: \contentsname
\end{hyphenrules}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.