Babel, a multilingual package for use with LATEX's ... - linsrv.net
Babel, a multilingual package for use with LATEX's ... - linsrv.net
Babel, a multilingual package for use with LATEX's ... - linsrv.net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.4 Support <strong>for</strong> saving macro definitions<br />
\babel@save<br />
\babel@savevariable<br />
Language definition files may want to redefine macros that already exist.<br />
There<strong>for</strong>e a mechanism <strong>for</strong> saving (and restoring) the original definition of those<br />
macros is provided. We provide two macros <strong>for</strong> this 17 .<br />
To save the current meaning of any control sequence, the macro \babel@save is<br />
provided. It takes one argument, 〈csname〉, the control sequence <strong>for</strong> which the<br />
meaning has to be saved.<br />
A second macro is provided to save the current value of a variable. In this context,<br />
anything that is allowed after the \the primitive is considered to be a variable.<br />
The macro takes one argument, the 〈variable〉.<br />
The effect of the preceding macros is to append a piece of code to the current<br />
definition of \originalTeX. When \originalTeX is expanded, this code restores<br />
the previous definition of the control sequence or the previous value of the<br />
variable.<br />
3.5 Support <strong>for</strong> extending macros<br />
\addto<br />
The macro \addto{〈control sequence〉}{〈T E X code〉} can be <strong>use</strong>d to extend the<br />
definition of a macro. The macro need not be defined (ie, it can be undefined or<br />
\relax). This macro can, <strong>for</strong> instance, be <strong>use</strong>d in adding instructions to a macro<br />
like \extrasenglish.<br />
Be careful when using this macro, beca<strong>use</strong> depending on the case the assignment<br />
could be either global (usually) or local (sometimes). That does not seems very<br />
consistent, but this behaviour is preserved <strong>for</strong> backward compatibility. If you are<br />
using etoolbox, by Philipp Lehman, consider using the tools provided by this<br />
<strong>package</strong> instead of \addto.<br />
3.6 Macros common to a number of languages<br />
\bbl@allowhyphens<br />
\allowhyphens<br />
\set@low@box<br />
\save@sf@q<br />
\bbl@frenchspacing<br />
\bbl@nonfrenchspacing<br />
In several languages compound words are <strong>use</strong>d. This means that when T E X has to<br />
hyphenate such a compound word, it only does so at the ‘-’ that is <strong>use</strong>d in such<br />
words. To allow hyphenation in the rest of such a compound word, the macro<br />
\bbl@allowhyphens can be <strong>use</strong>d.<br />
Same as \bbl@allowhyphens, but does nothing if the encoding is T1. It is intended<br />
mainly <strong>for</strong> characters provided as real glyphs by this encoding but constructed<br />
<strong>with</strong> \accent in OT1.<br />
Note the previous command (\bbl@allowhyphens) has different applications<br />
(hyphens and discretionaries) than this one (composite chars). Note also prior to<br />
version 3.7, \allowhyphens had the behaviour of \bbl@allowhyphens.<br />
For some languages, quotes need to be lowered to the baseline. For this purpose<br />
the macro \set@low@box is available. It takes one argument and puts that<br />
argument in an \hbox, at the baseline. The result is available in \box0 <strong>for</strong> further<br />
processing.<br />
Sometimes it is necessary to preserve the \spacefactor. For this purpose the<br />
macro \save@sf@q is available. It takes one argument, saves the current<br />
spacefactor, executes the argument, and restores the spacefactor.<br />
The commands \bbl@frenchspacing and \bbl@nonfrenchspacing can be <strong>use</strong>d to<br />
properly switch French spacing on and off.<br />
17 This mechanism was introduced by Bernd Raichle.<br />
23