summaryrefslogtreecommitdiff
path: root/macros/latex/required/babel/base/babel.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/required/babel/base/babel.dtx')
-rw-r--r--macros/latex/required/babel/base/babel.dtx620
1 files changed, 299 insertions, 321 deletions
diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx
index 937d698789..bc6e15cb9f 100644
--- a/macros/latex/required/babel/base/babel.dtx
+++ b/macros/latex/required/babel/base/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2023/04/18 v3.88 The Babel package]
+\ProvidesFile{babel.dtx}[2023/05/11 v3.89 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -48,7 +48,11 @@
ItalicFont = NotoSans-Italic.ttf,
BoldItalicFont = NotoSans-BoldItalic.ttf]
{NotoSans-Regular.ttf}
-\setmonofont[Scale=.88,FakeStretch=.95]{NotoMono-Regular.ttf}
+\setmonofont[
+ Scale=.88, FakeStretch=.95,
+ BoldFont = NotoMono-Regular.ttf,
+ ItalicFont = NotoMono-Regular.ttf,
+ BoldItalicFont = NotoMono-Regular.ttf]{NotoMono-Regular.ttf}
\raggedright
\addtolength{\textwidth}{25pt}
\addtolength{\textheight}{3.5cm}
@@ -97,7 +101,7 @@
\makeatletter
\def\@begintheorem#1#2{%
\list{}{}%
- \small
+ % \small
\global\advance\@listdepth\m@ne
\item[{\sffamily\bfseries\color{messages}\hspace*{1.3em}%
\MakeUppercase{#1}}]}%
@@ -204,7 +208,15 @@
\cellcolor[rgb]{.95,.95,.95}
\vspace{2cm}\hspace{1.5cm}
\begin{minipage}{5cm}
+\Huge
+\ifx\babelcode\undefined
+User guide
+\else
+Code
+\fi
+
\Large
+\vspace{1.2cm}
Version \csname @gobble\expandafter\endcsname\fileversion\newline
\filedate
@@ -236,17 +248,18 @@ Xe\largetex
\end{titlepage}
\tableofcontents
-\listoftroubles
+\ifx\babelcode\undefined
+ \listoftroubles
+\fi
\clearpage
-\part{User guide}
+\ifx\babelcode\undefined
\begin{description}
\item[\sffamily\color{messages}What is this document about?] This user
guide focuses on internationalization and localization with \LaTeX{}
and \pdftex, \xetex{} and \luatex{} with the \babel{} package. There
-are also some notes on its use with e-Plain and pdf-Plain \TeX . Part II
-describes the code, and usually it can be ignored.
+are also some notes on its use with e-Plain and pdf-Plain \TeX.
\item[\sffamily\color{messages}What if I’m interested only in the
latest changes?] Changes and new features with relation to version 3.8
@@ -287,6 +300,9 @@ necessary in some languages), is described below; go to \ref{inifiles}.
there are many
\href{https://github.com/latex3/babel/tree/master/samples}{sample
files}.
+
+\item[\sffamily\color{messages}Where is the code?]
+ Run |lualatex --jobname=babel-code \let\babelcode\relax\input{babel.dtx}|.
\end{description}
\section{The user interface}\label{U-I}
@@ -409,11 +425,10 @@ Package babel Warning: No hyphenation patterns were preloaded for
(babel) preloaded for \language=0 instead on input line 57.
\end{verbatim}
The document will be typeset, but very likely the text will not be
- correctly hyphenated. Some languages may be raising this warning
- wrongly (because they are not hyphenated); it is a bug to be fixed
- -- just ignore it. See the manual of your distribution (Mac\TeX,
- Mik\TeX, \TeX Live, etc.) for further info about how to configure
- it.
+ correctly hyphenated. Some languages in some system may be raising
+ this warning wrongly (because they are not hyphenated) -- just ignore
+ it. See the manual of your distribution (Mac\TeX, Mik\TeX, \TeX Live,
+ etc.) for further info about how to configure it.
\end{troubleshooting}
\begin{note}
@@ -560,7 +575,7 @@ short sentences). Typically, all you need is to set the line breaking
rules and, perhaps, the font. In such a case, \babel{} now does not
require declaring these secondary languages explicitly, because the
basic settings are loaded on the fly when the language is selected (and
-also when provided in the optional argument of |\babelfont|, if used.)
+also when provided in the optional argument of |\babelfont|, if used).
This is particularly useful, too, when there are short texts of this
kind coming from an external source whose contents are not known on
@@ -589,18 +604,19 @@ _\foreignlanguage{spanish}{Español}_.
\begin{note}
Instead of its name, you may prefer to select the language with the
-corresponding BCP47 tag. This alternative, however, must be activated
-explicitly, because a two- or tree-letter word is a valid name for a
-language (eg, |lu| can be the locale name with tag |khb| or the tag for
-|lubakatanga|). See section \ref{bcp47} for further details.
+ corresponding BCP47 tag. This alternative, however, must be activated
+ explicitly, because a two- or tree-letter word is a valid name for a
+ language (eg, |lu| can be the locale name with tag |khb| or the tag
+ for |lubakatanga|). See section \ref{bcp47} for further details.
\end{note}
\New{3.84} With \pdftex, when a language is loaded on the fly
-(actually, with |\babelprovide|) selectors now set the font encoding
-based on the list provided when loading |fontenc|. Not all scripts have
-an associated encoding, so this feature works only with Latin,
-Cyrillic, Greek, Arabic, Hebrew, Cherokee, Armenian, and Georgian,
-provided a suitable font is found.
+(actually, with |\babelprovide|, because this is the macro used
+internally to load it) selectors now set the font encoding based on the
+list provided when loading |fontenc|. Not all scripts have an
+associated encoding, so this feature works only with Latin, Cyrillic,
+Greek, Arabic, Hebrew, Cherokee, Armenian, and Georgian, provided a
+suitable font is found.
\subsection{Modifiers}
@@ -617,8 +633,17 @@ needs.}
\end{verbatim}
Attributes (described below) are considered modifiers, ie, you can
-set an attribute by including it in the list of modifiers. However,
-modifiers are a more general mechanism.
+set an attribute by including it in the list of modifiers.
+
+\New{3.89} Alternatively, modifiers can be set with a separate option,
+with the keyword |modifiers| followed by a dot and the language name
+(note the language is not selected or loaded with this option). It is
+useful to activate some feature when the language is declared as a
+class option:
+\begin{verbatim}
+\documentclass[spanish]{report}
+\usepackage[_modifiers.spanish = notilde.lcroman_]{babel}
+\end{verbatim}
\subsection{Troubleshooting}
@@ -1123,37 +1148,6 @@ preserved for backward compatibility.}
\New{3.23} Tests if a character has been made a shorthand.
-\Describe{\aliasshorthand}{\marg{original}\marg{alias}}
-
-The command |\aliasshorthand| can be used to let another character
-perform the same functions as the default shorthand character. If one
-prefers for example to use the character |/| over |"| in typing Polish
-texts, this can be achieved by entering |\aliasshorthand{"}{/}|. For
-the reasons in the warning below, usage of this macro is not
-recommended.
-
-\begin{note}
- The substitute character must \textit{not} have been declared before
- as shorthand (in such a case, |\aliashorthands| is ignored).
-\end{note}
-
-\begin{example}
- The following example shows how to replace a shorthand by another
-\begin{verbatim}
-\aliasshorthand{~}{^}
-\AtBeginDocument{\shorthandoff*{~}}
-\end{verbatim}
-\end{example}
-
-\begin{warning}
- Shorthands remember somehow the original character, and the fallback
- value is that of the latter. So, in this example, if no shorthand if
- found, |^| expands to a non-breaking space, because this is the
- value of |~| (internally, |^| still calls |\active@char~| or
- |\normal@char~|). Furthermore, if you change the |system| value of
- |^| with |\defineshorthand| nothing happens.
-\end{warning}
-
\subsection{Package options}
\New{3.9a}
@@ -1233,9 +1227,9 @@ this file is loaded.
loaded when the format was created: number (remember dialects can
share it), name, hyphenation file and exceptions file.
-\Describe{nocase}{} \New{3.9l} Language settings for uppercase and
-lowercase mapping (as set by |\SetCase|) are ignored. Use only if there
-are incompatibilities with other packages.
+% \Describe{nocase}{} \New{3.9l} Language settings for uppercase and
+% lowercase mapping (as set by |\SetCase|) are ignored. Use only if there
+% are incompatibilities with other packages.
\Describe{silent}{} \New{3.9l} No warnings and no \textit{infos} are
written to the log file.\footnote{You can use alternatively the
@@ -1359,7 +1353,7 @@ LICR). They will be evolving with the time to add more features
following section shows how to make use of them by means of
|\babelprovide|. In other words, |\babelprovide| is mainly meant
for auxiliary tasks, and as alternative when the |ldf|, for some
-reason, does work as expected.
+reason, does not work as expected.
\begin{example}
Although Georgian has its own \texttt{ldf} file, here is how to
@@ -2552,9 +2546,10 @@ language the first valid hyphenation rules in the list. For example:
\begin{verbatim}
\babelprovide[_hyphenrules=chavacano spanish italian_]{chavacano}
\end{verbatim}
-If none of the listed hyphenrules exist, the default behavior
-applies. Note in this example we set |chavacano| as first option --
-without it, it would select |spanish| even if |chavacano| exists.
+If none of the listed hyphenrules exist, the default behavior applies.
+Note in this example we set |chavacano| as first option, which can seem
+redundant, but without it, it would select |spanish| even if
+|chavacano| exists.
A special value is |+|, which allocates a new language (in the \TeX{}
sense). It only makes sense as the last value (or the only one; the
@@ -3168,8 +3163,8 @@ font encodings are the same, like in Unicode based engines.
The environment \Lenv{hyphenrules} can be used to select \emph{only} the
hyphenation rules to be used (it can be used as command, too). This can
-for instance be used to select `nohyphenation', provided that in
-\file{language.dat} the `language' \textsf{nohyphenation} is defined by
+for instance be used to select ‘nohyphenation’, provided that in
+\file{language.dat} the ‘language’ \textsf{nohyphenation} is defined by
loading \file{zerohyph.tex}. It deactivates language shorthands, too
(but not user shorthands).
@@ -3177,7 +3172,7 @@ Except for these simple uses, |hyphenrules| is deprecated and
|otherlanguage*| (the starred version) is preferred, because the former
does not take into account possible changes in encodings of characters
like, say, |'| done by some languages (eg, \textsf{italian},
-\textsf{french}, \textsf{ukraineb}).
+\textsf{french}, \textsf{ukrainian}).
\Describe{\babelpatterns}{\texttt{[}\langlist\texttt{]}%
\marg{patterns}}
@@ -3233,8 +3228,8 @@ the locale is being defined with this macro or the languages has been
previouly loaded as a class or package option, as the following example
illustrates:
\begin{verbatim}
- \usepackage[magyar]{babel}
- \babelprovide[_transforms = digraphs.hyphen_]{magyar}
+ \usepackage[hungarian]{babel}
+ \babelprovide[_transforms = digraphs.hyphen_]{hungarian}
\end{verbatim}
\New{3.67} Transforms predefined in the |ini| locale files can be made
attribute-dependent, too. When an attribute between parenthesis is
@@ -4099,7 +4094,9 @@ to you to make sure no toc type is duplicated).
In the following table most of the languages supported by \babel{} with
and |.ldf| file are listed, together with the names of the option which
you can load \babel\ with for each language. Note this list is open and
-the current options may be different. It does not include |ini| files.
+the current options may be different. It does not include |ini| files
+(see below). Except in a few cases (eg, |ngerman|, |serbianc|,
+|acadien|) names are those of the Unicode CLDR (or based on them).
\begin{description}
\itemsep=-\parskip
@@ -4114,33 +4111,31 @@ the current options may be different. It does not include |ini| files.
\item[Czech] czech
\item[Danish] danish
\item[Dutch] dutch
-\item[English] english, USenglish, american, UKenglish,
- british, canadian, australian, newzealand
+\item[English] english, american (\textit{preferred to} USenglish), british (\textit{preferred to}
+ UKenglish), canadian, australian, newzealand
\item[Esperanto] esperanto
\item[Estonian] estonian
\item[Finnish] finnish
-\item[French] french, francais, canadien, acadian
+\item[French] french, acadian
\item[Galician] galician
-\item[German] austrian, german, germanb, ngerman, naustrian
+\item[German] ngerman, naustrian, german, austrian
\item[Greek] greek, polutonikogreek
\item[Hebrew] hebrew
\item[Icelandic] icelandic
-\item[Indonesian] indonesian (bahasa, indon, bahasai)
+\item[Indonesian] indonesian
\item[Interlingua] interlingua
\item[Irish Gaelic] irish
\item[Italian] italian
\item[Latin] latin
\item[Lower Sorbian] lowersorbian
-\item[Malay] malay, melayu (bahasam)
-\item[North Sami] samin
+\item[Malay] malay (\textit{preferred to} melayu)
+\item[Northern Sami] northernsami
\item[Norwegian] norsk, nynorsk
\item[Polish] polish
-\item[Portuguese] portuguese, brazilian (portuges, brazil)\footnote{The
-two last name comes from the times when they had to be shortened to 8
-characters}
+\item[Portuguese] portuguese, brazilian
\item[Romanian] romanian
\item[Russian] russian
-\item[Scottish Gaelic] scottish
+\item[Scottish Gaelic] scottishgaelic (\textit{preferred to} scottish)
\item[Spanish] spanish
\item[Slovakian] slovak
\item[Slovenian] slovene
@@ -4157,6 +4152,21 @@ thai, thaicjk, latvian, turkmen, magyar, mongolian, romansh,
lithuanian, spanglish, vietnamese, japanese, pinyin, arabic, farsi,
ibygreek, bgreek, serbianc, frenchle, ethiop} and \textsf{friulan}.
+\begin{note}
+ There are also some deprecated names (a few has been even removed):
+ \textsf{frenchb} or \textsf{francais}, as well as \textsf{canadien}
+ (\textsf{french}), \textsf{germanb} (\textsf{german}),
+ \textsf{bahasa}, \textsf{indon} or \textsf{bahasai}
+ (\textsf{indonesian}), \textsf{lsorbian} (\textsf{lowersorbian}),
+ \textsf{bahasam} (\textsf{malay}), \textsf{portuges}
+ (\textsf{portuguese}), \textsf{brazil} (\textsf{brazilian}),
+ \textsf{russianb} (\textsf{russian}), \textsf{usorbian}
+ (\textsf{uppersorbian}), \textsf{vietnam} (\textsf{vietnamese}),
+ \textsf{northernsami} (\textsf{samin}), \textsf{ukraineb}
+ (\textsf{ukrainian}). Deprecated names come in many cases from the
+ times when they had to be shortened to 8 characters.
+\end{note}
+
Most of them work out of the box, but some may require extra fonts,
encoding files, a preprocessor or even a complete framework (like
\textsf{CJK} or \textsf{luatexja}). For example, if you have got the
@@ -4214,33 +4224,45 @@ empty, removes them. The last argument is the locale name:
\Describe{\babeladjust}{\marg{key-value-list}}
\New{3.36} Sometimes you might need to disable some \babel{} features.
-Currently this macro understands the following keys [to be documented],
-with values |on| or |off|:
+Currently this macro understands the following keys, with values |on|
+or |off|:
\begin{multicols}{3}
\ttfamily
+autoload.bcp47\\
+bcp47.toname\\
bidi.mirroring\\
bidi.text\\
-bidi.math\\%*
+bidi.math\\%
% bidi.mapdigits\\
-linebreak.sea\\%*
-linebreak.cjk\\%*
-justify.arabic\\%*
-layout.tabular\\%*
-layout.lists\\%*
-autoload.bcp47\\
-bcp47.toname
+linebreak.sea\\
+linebreak.cjk\\
+justify.arabic\\
+layout.tabular\\
+layout.lists
\end{multicols}
-
-Other keys [to be documented] are:
+The first four are documented elsewhere. The following are by default
+|on|, but with |off| can disable some features: |bidi.math| (only
+preamble) changes for math or \textsf{amsmath}, |linebreak.sea|,
+|linebreak.sea| and |justify.arabic| the corresponding algorithms,
+|layout.tabular| and |layout.lists| changes for tabular and lists.
+Some of the are reverted only to some extent.
+
+Other keys are:
\begin{multicols}{3}
\ttfamily
-autoload.options\\%*
+autoload.options\\
autoload.bcp47.prefix\\
autoload.bcp47.options\\
-prehyphenation.disable\\%*
+prehyphenation.disable\\
select.write\\
-select.encoding\\%*
+select.encoding\\
\end{multicols}
+Most of them are documented elsewhere. With |select.encoding=off|, the
+encoding is not set when loading a language on the fly with \pdftex{}
+(only |off|). |prehyphenation.disable| is by default |nohyphenation|,
+which means prehyphenation transforms are not applied if the current
+hyphenation rules are |nohyphenation|; with |off| they are never
+disabled.
For example, you can set |\babeladjust{bidi.text=off}| if you are using
an alternative algorithm or with large sections not requiring it. Use
@@ -4690,13 +4712,6 @@ classes. The user will be informed that this
configuration file has been loaded. This macro is called by
|\ldf@finish|.
-\DescribeMacro{\substitutefontfamily}
-(Deprecated.) This command takes three arguments, a font encoding and
-two font family names. It creates a font description file for the
-first font in the given encoding. This \file{.fd} file will instruct
-\LaTeX\ to use a font from the second family when a font from the
-first family in the given encoding seems to be needed.
-
\subsection{Skeleton}
Here is the basic structure of an |ldf| file, with a language, a
@@ -4888,15 +4903,8 @@ used to properly switch French spacing on and off.
\label{s:strings}
\New{3.9a} Babel 3.9 provides a way of defining strings in several
-encodings, intended mainly for \luatex{} and \xetex. This is the only new
-feature requiring changes in language files if you want to make use of
-it.
-
-Furthermore, it must be activated explicitly, with the package option
-|strings|. If there is no |strings|, these blocks are ignored, except
-|\SetCase|s (and except if forced as described below). In other words,
-the old way of defining/switching strings still works and it's used by
-default.
+encodings, intended mainly for \luatex{} and \xetex, although the old
+way of defining/switching strings still works and it's used by default.
It consist is a series of blocks started with
|\StartBabelCommands|. The last block is closed with
@@ -4905,9 +4913,11 @@ declarations apply until the next |\StartBabelCommands| or
|\EndBabelCommands|). An |ldf| may contain several series of this
kind.
-Thanks to this new feature, string values and string language
-switching are not mixed any more. No need of |\addto|. If the language
-is |french|, just redefine |\frenchchaptername|.
+Thanks to this new feature, string values and string language switching
+are not mixed any more. Furthermore, strings do no need to be wrapped
+with formatting commands (eg, to select the writing direction)
+because \babel{} takes care of it automatically. (See also
+|\setlocalecaption|.)
\Describe\StartBabelCommands
{\marg{language-list}\marg{category}\oarg{selector}}
@@ -4921,11 +4931,11 @@ defined (if undefined, |\StartBabelCommands| sets it to
but this is discouraged -- a explicit name (or names) is much better
and clearer.
-A ``selector'' is a name to be used as value in package option
-|strings|, optionally followed by extra info about the encodings to be
-used. The name |unicode| must be used for \xetex{} and \luatex{} (the
-key |strings| has also other two special values: |generic| and
-|encoded|).
+A ``selector'' selects a group of definition are to be used, optionally
+followed by extra info about the encodings to be used. The name
+|unicode| must be used for \xetex{} and \luatex{}. Without a selector,
+the LICR representation (ie, with macros like |\~{n}| instead of |ñ|)
+is assumed.
If a string is set several times (because several blocks are read),
the first one takes precedence (ie, it works much like
@@ -4943,25 +4953,18 @@ can be given after |fontenc=| (separated with spaces, if two or more) --
recommended, but not mandatory, although blocks without this key are
not taken into account if you have requested |strings=encoded|.
-Blocks without a selector are read always if the key |strings| has
-been used. They provide fallback values, and therefore must be the
-last blocks; they should be provided always if possible and all
-strings should be defined somehow inside it; they can be the only
-blocks (mainly LGC scripts using the LICR). Blocks without a selector
-can be activated explicitly with |strings=generic| (no block is taken
-into account except those). With |strings=encoded|, strings in those
-blocks are set as default (internally, |?|). With |strings=encoded|
-strings are protected, but they are correctly expanded in
-|\MakeUppercase| and the like. If there is no key |strings|, string
-definitions are ignored, but |\SetCase|s are still honored (in a
-|encoded| way).
+Blocks without a selector are read always. They provide fallback
+values, and therefore they must be the last ones; they should be
+provided always if possible and all strings should be defined somehow
+inside it; they can be the only blocks (mainly LGC scripts using the
+LICR).
The \m{category} is either |captions|, |date| or |extras|. You must
stick to these three categories, even if no error is raised when using
-other name.\footnote{In future releases further categories may be
+other names.\footnote{In future releases further categories may be
added.\nb{like `monetary', `time', `address', `name', `case' or
`numeric'}} It may be empty, too, but in such a case using
-|\SetString| is an error (but not |\SetCase|).
+|\SetString| is an error.
\begin{verbatim}
\StartBabelCommands{language}{captions}
@@ -4974,14 +4977,14 @@ added.\nb{like `monetary', `time', `address', `name', `case' or
\EndBabelCommands
\end{verbatim}
-A real example is:
+A real example can be:
\begin{verbatim}
\StartBabelCommands{austrian}{date}
- [unicode, fontenc=TU EU1 EU2, charset=utf8]
+ [unicode, fontenc=TU, charset=utf8]
\SetString\monthiname{Jänner}
\StartBabelCommands{german,austrian}{date}
- [unicode, fontenc=TU EU1 EU2, charset=utf8]
+ [unicode, fontenc=TU, charset=utf8]
\SetString\monthiiiname{März}
\StartBabelCommands{austrian}{date}
@@ -5020,17 +5023,28 @@ strings are added). However, when used in the preamble or in a
package, new settings are added to the previous ones, if the language
exists (in the \babel{} sense, ie, if |\date|\m{language} exists).
+\begin{note}
+ The package option |strings| introduced in version 3.9 (around 2013)
+ when Unicode engines were still of marginal use, is now deprecated.
+\end{note}
+
+\begin{note}
+ Captions and other strings defined in |ini| files (in other words,
+ when a locale is loaded with |\babelprovide|) are internally set
+ with the help of these macros.
+\end{note}
+
\Describe\StartBabelCommands{%
\colorbox{thegrey}{\ttfamily\hskip-.2em*\hskip-.2em}%
\marg{language-list}\marg{category}\oarg{selector}}
The starred version just forces |strings| to take a value -- if not set
-as package option, then the default for the engine is used. This is
-not done by default to prevent backward incompatibilities, but if you
-are creating a new language this version is better. It's up to
-the maintainers of the current languages to decide if using it is
-appropriate.\footnote{This replaces in 3.9g a short-lived
-\texttt{\string\UseStrings} which has been removed because it did
-not work.}
+as package option (which is now deprecated), then the default for the
+engine is used. This is not done by default to prevent backward
+incompatibilities, but if you are creating a new language this version
+is better. It's up to the maintainers of the current languages to
+decide if using it is appropriate.\footnote{This replaces in 3.9g a
+short-lived \texttt{\string\UseStrings} which has been removed because
+it did not work.}
\Describe{\EndBabelCommands}{}
Marks the end of the series of blocks.
@@ -5059,52 +5073,18 @@ to define |\abmoniname|, |\abmoniiname|, etc. (and similarly with
\end{verbatim}
|#1| is replaced by the roman numeral.
-\Describe\SetCase{\oarg{map-list}\marg{toupper-code}\marg{tolower-code}}
-Sets globally code to be executed at |\MakeUppercase| and
-|\MakeLowercase|. The code would typically be things like |\let\BB\bb|
-and |\uccode| or |\lccode| (although for the reasons explained above,
-changes in lc/uc codes may not work). A \meta{map-list} is a series of
-macros using the internal format of |\@uclclist| (eg,
-|\bb\BB\cc\CC|). The mandatory arguments take precedence over the
-optional one. This command, unlike |\SetString|, is executed always
-(even without |strings|), and it is intended for minor readjustments
-only.
-
-For example, as |T1| is the default case mapping in \LaTeX, we can
-set for Turkish:
-\begin{verbatim}
-\StartBabelCommands{turkish}{}[ot1enc, fontenc=OT1]
-\SetCase
- {\uccode"10=`I\relax}
- {\lccode`I="10\relax}
-
-\StartBabelCommands{turkish}{}[unicode, fontenc=TU EU1 EU2, charset=utf8]
-\SetCase
- {\uccode`i=`İ\relax
- \uccode`ı=`I\relax}
- {\lccode`İ=`i\relax
- \lccode`I=`ı\relax}
-
-\StartBabelCommands{turkish}{}
-\SetCase
- {\uccode`i="9D\relax
- \uccode"19=`I\relax}
- {\lccode"9D=`i\relax
- \lccode`I="19\relax}
+\Describe\SetCase{\oarg{map-list}\marg{toupper-code}\marg{tolower-code}\qquad\textit{Deprecated}}
-\EndBabelCommands
-\end{verbatim}
-(Note the mapping for |OT1| is not complete.)
+\begin{warning}
+This feature doesn’t work any longer after some changes in the \LaTeX{}
+kernel. It’s now deprecated and an alternative is on the way.
+\end{warning}
\Describe{\SetHyphenMap}{\marg{to-lower-macros}}
-\New{3.9g} Case mapping serves in \TeX{} for two unrelated purposes: case
-transforms (upper/lower) and hyphenation. |\SetCase| handles the
-former, while hyphenation is handled by |\SetHyphenMap| and controlled
-with the package option |hyphenmap|. So, even if internally they are based
-on the same \TeX{} primitive (|\lccode|), \babel{} sets them separately.
-
-There are three helper macros to
-be used inside |\SetHyphenMap|:
+\New{3.9g} Case mapping for hyphenation is handled with |\SetHyphenMap|
+and controlled with the package option |hyphenmap|.
+
+There are three helper macros to be used inside |\SetHyphenMap|:
\begin{itemize}
\item |\BabelLower|\marg{uccode}\marg{lccode} is
similar to |\lccode| but it's ignored if the char has been set and
@@ -5125,9 +5105,11 @@ by both \luatex{} and \xetex{}):
\SetHyphenMap{\BabelLowerMM{"100}{"11F}{2}{"101}}
\end{verbatim}
-This macro is not intended to fix wrong mappings done by Unicode
-(which are the default in both \xetex{} and \luatex{}) -- if an
-assignment is wrong, fix it directly.
+\begin{note}
+ This macro is not intended to fix wrong mappings done by Unicode
+ (which are the default in both \xetex{} and \luatex{}) -- if an
+ assignment is wrong, fix it directly.
+\end{note}
\subsection{Executing code based on the selector}
@@ -5140,22 +5122,30 @@ version), and it can consist of a comma-separated list. For example:
\begin{verbatim}
\IfBabelSelectorTF{other, other*}{A}{B}
\end{verbatim}
-is true with these two environment selectors.
+is true with any of these two environment selectors.
Its natural place of use is in hooks or in |\extras|\m{language}.
+\else
+
\DocInput{babel.dtx}
+\fi
+
+
\section{Acknowledgements}
I would like to thank all who volunteered as $\beta$-testers for their
time. Michel Goossens supplied contributions for most of the other
-languages. Nico Poppelier helped polish the text of the documentation
-and supplied parts of the macros for the Dutch language. Paul Wackers
-and Werenfried Spit helped find and repair bugs.
+languages. Nico Poppelier helped polish the text of the documentation
+and supplied parts of the macros for the Dutch language. Paul Wackers
+and Werenfried Spit helped find and repair bugs. During the further
+development of the babel system I received much help from Bernd
+Raichle, for which I am grateful.
-During the further development of the babel system I received much
-help from Bernd Raichle, for which I am grateful.
+There are also many contributors for specific languages, which are
+mentioned in the respective files. Without them, \babel{} just
+wouldn’t exist.
\begin{thebibliography}{9}
\bibitem{AT} Huda Smitshuijzen Abifares, \textit{Arabic Typography},
@@ -5199,6 +5189,9 @@ help from Bernd Raichle, for which I am grateful.
%
% \fi
%
+% \addtolength{\oddsidemargin}{-15pt}
+% \addtolength{\textwidth}{50pt}
+%
%\begingroup
% \catcode`<=\active%
% \catcode`>=\active
@@ -5212,96 +5205,67 @@ help from Bernd Raichle, for which I am grateful.
% \global\let\check@percent\saved@check@percent
%\endgroup
%
-% \part{Source code}
-%
% \small
%
-% \babel{} is being developed incrementally, which means parts of the
-% code are under development and therefore incomplete. Only documented
-% features are considered complete. In other words, use \babel{} only
-% as documented (except, of course, if you want to explore and test
-% them -- you can post suggestions about multilingual issues to
-% |kadingira@tug.org| on |http://tug.org/mailman/listinfo/kadingira|).
+% The \babel{} package is being developed incrementally, which means
+% parts of the code are under development and therefore incomplete.
+% Only documented features are considered complete. In other words, use
+% \babel{} in real documents only as documented (except, of course, if
+% you want to explore and test them).
%
% \section{Identification and loading of required files}
%
% \textit{Code documentation is still under revision.}
-%
-% \textbf{The following description is no longer valid, because switch
-% and plain have been merged into babel.def.}
-%
+
% The \babel{} package after unpacking consists of the following files:
% \begin{description}
% \itemsep=-\parskip
-% \item[switch.def] defines macros to set and switch languages.
-% \item[babel.def] defines the rest of macros. It has tow parts: a
-% generic one and a second one only for LaTeX{}.
% \item[babel.sty] is the \LaTeX{} package, which set options and
% load language styles.
-% \item[plain.def] defines some \LaTeX{} macros required by
-% \file{babel.def} and provides a few tools for Plain.
+% \item[babel.def] is loaded by Plain.
+% \item[switch.def] defines macros to set and switch languages (it loads
+% part |babel.def|).
+% \item[plain.def] is not used, and just loads babel.def, for
+% compatibility.
% \item[hyphen.cfg] is the file to be used when generating the
% formats to load hyphenation patterns.
% \end{description}
+% There some additional |tex|, |def| and |lua| files
%
% The \babel{} installer extends \textsf{docstrip} with a few
% ``pseudo-guards'' to set ``variables'' used at installation time.
% They are used with |<||@name@>| at the appropiated places in the
-% source code and shown below with
-% $\langle\langle$\textit{name}$\rangle\rangle$. That brings a little
-% bit of literate programming.
+% source code and defined with either
+% $\langle\langle$\textit{name}=\textit{value}$\rangle\rangle$, or with
+% a series of lines between
+% $\langle\langle$|*|\textit{name}$\rangle\rangle$ and
+% $\langle\langle$|/|\textit{name}$\rangle\rangle$. The latter is
+% cumulative (eg, with \textit{More package options}). That brings a
+% little bit of literate programming. The guards |<-name>| and
+% |<+name>| have been redefined, too. See |babel.ins| for further
+% details.
%
% \section{\texttt{locale} directory}
%
-% A required component of \babel{} is a set of |ini| files
-% with basic definitions for about 200 languages. They are distributed
-% as a separate |zip| file, not packed as |dtx|. With them, babel
-% will fully support Unicode engines.
-
-% Most of them are essentially finished (except bugs and mistakes, of
-% course). Some of them are still incomplete (but they will be usable),
-% and there are some omissions (eg, Latin and polytonic Greek, and
-% there are no geographic areas in Spanish). Hindi, French, Occitan and
-% Breton will show a warning related to dates. Not all include LICR
-% variants.
-%
-% This is a preliminary documentation.
-%
-% |ini| files contain the actual data; |tex| files are currently just
-% proxies to the corresponding ini files.
+% A required component of \babel{} is a set of |ini| files with basic
+% definitions for about 250 languages. They are distributed as a
+% separate |zip| file, not packed as |dtx|. Most of them are
+% essentially finished (except bugs and mistakes, of course). Some of
+% them are still incomplete (but they will be usable), and there are
+% some omissions (eg, there are no geographic areas in Spanish). Not
+% all include LICR variants.
%
-% Most keys are self-explanatory.
-% \begin{description}
-% \itemsep=-\parskip
-% \item[charset] the encoding used in the ini file.
-% \item[version] of the ini file
-% \item[level] ``version'' of the ini specification . which keys are
-% available (they may grow in a compatible way) and how they should be
-% read.
-% \item[encodings] a descriptive list of font encondings.
-% \item[{[captions]}] section of captions in the file charset
-% \item[{[captions.licr]}] same, but in pure ASCII using the LICR
-% \item[date.long] fields are as in the CLDR, but the syntax is
-% different. Anything inside brackets is a date field (eg, |MMMM| for
-% the month name) and anything outside is text. In addition, |[ ]| is a
-% non breakable space and |[.]| is an abbreviation dot.
-% \end{description}
+% |babel-*.ini| files contain the actual data; |babel-*.tex| files are
+% basically proxies to the corresponding ini files.
%
-% Keys may be further qualified in a particular language with a suffix
-% starting with a uppercase letter. It can be just a letter (eg,
-% |babel.name.A|, |babel.name.B|) or a name (eg,
-% |date.long.Nominative|, |date.long.Formal|, but no language is
-% currently using the latter). \textit{Multi-letter} qualifiers are
-% forward compatible in the sense they won’t conflict with new
-% ``global'' keys (which start always with a lowercase case). There is
-% an exception, however: the section |counters| has been devised to
-% have arbitrary keys, so you can add lowercased keys if you want.
+% See \href{https://latex3.github.io/babel/guides/keys-in-ini-files.html}{Keys
+% in \texttt{ini} files} in the the \babel{} site.
%
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.88>>
-%<<date=2023/04/18>>
+%<<version=3.89>>
+%<<date=2023/05/11>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5726,7 +5690,7 @@ help from Bernd Raichle, for which I am grateful.
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[<@date@> <@version@> The Babel package]
+\ProvidesPackage{babel}[<@date@> v<@version@> The Babel package]
% \end{macrocode}
%
% Start with some “private” debugging tool, and then define macros for
@@ -5866,6 +5830,8 @@ help from Bernd Raichle, for which I am grateful.
\bbl@csarg\let{tempa\expandafter}\csname opt@babel.sty\endcsname
\def\bbl@tempb#1.#2{% Remove trailing dot
#1\ifx\@empty#2\else,\bbl@afterfi\bbl@tempb#2\fi}%
+\def\bbl@tempe#1=#2\@@{%
+ \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}}
\def\bbl@tempd#1.#2\@nnil{% TODO. Refactor lists?
\ifx\@empty#2%
\edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}%
@@ -5875,12 +5841,17 @@ help from Bernd Raichle, for which I am grateful.
\edef\bbl@tempc{%
\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.\bbl@tempb#2}%
\else
- \in@{=}{#1}%
+ \in@{$modifiers$}{$#1$}% TODO. Allow spaces.
\ifin@
- \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.#2}%
- \else
- \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}%
- \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}%
+ \bbl@tempe#2\@@
+ \else
+ \in@{=}{#1}%
+ \ifin@
+ \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.#2}%
+ \else
+ \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}%
+ \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}%
+ \fi
\fi
\fi
\fi}
@@ -6113,10 +6084,11 @@ help from Bernd Raichle, for which I am grateful.
\ifx\ldf@quit\@undefined\else
\endinput\fi % Same line!
<@Make sure ProvidesFile is defined@>
-\ProvidesFile{babel.def}[<@date@> <@version@> Babel common definitions]
+\ProvidesFile{babel.def}[<@date@> v<@version@> Babel common definitions]
\ifx\AtBeginDocument\@undefined % TODO. change test.
<@Emulate LaTeX@>
\fi
+<@Basic macros@>
% \end{macrocode}
%
% That is all for the moment. Now follows some common stuff, for both
@@ -6252,6 +6224,7 @@ help from Bernd Raichle, for which I am grateful.
\fi
\fi\fi}
\let\bbl@initoload\relax
+%<-core>
\def\bbl@provide@locale{%
\ifx\babelprovide\@undefined
\bbl@error{For a language to be defined on the fly 'base'\\%
@@ -6284,6 +6257,7 @@ help from Bernd Raichle, for which I am grateful.
{\bbl@exp{\\\babelprovide[\bbl@autoload@options]{\languagename}}}%
{}%
\fi}
+%<+core>
% \end{macrocode}
%
% \begin{macro}{\iflanguage}
@@ -6393,6 +6367,7 @@ help from Bernd Raichle, for which I am grateful.
% Retrieving information from the stack is a little bit less simple, as
% we need to remove the element from the stack while storing it in the
% macro |\languagename|. For this we first define a helper function.
+%
% \begin{macro}{\bbl@pop@lang}
% This macro stores its first element (which is delimited by the
% `+'-sign) in |\languagename| and stores the rest of the string
@@ -6588,6 +6563,9 @@ help from Bernd Raichle, for which I am grateful.
% current values, then we check if |\|\langvar|hyphenmins| is
% defined. If it is not, we set default values (2 and 3), otherwise
% the values in |\|\langvar|hyphenmins| will be used.
+%
+% No text is supposed to be added with switching captions and date, so
+% we remove any spurious spaces with |\bbl@bsphack| and |\bbl@esphack|.
%
% \begin{macrocode}
\newif\ifbbl@usedategroup
@@ -6606,8 +6584,6 @@ help from Bernd Raichle, for which I am grateful.
% set the locale id
\bbl@id@assign
% switch captions, date
- % No text is supposed to be added here, so we remove any
- % spurious spaces.
\bbl@bsphack
\ifcase\bbl@select@type
\csname captions#1\endcsname\relax
@@ -6678,6 +6654,7 @@ help from Bernd Raichle, for which I am grateful.
\expandafter\expandafter\expandafter\set@hyphenmins
\csname #1hyphenmins\endcsname\relax
\fi
+ % reset selector name
\let\bbl@selectorname\@empty}
% \end{macrocode}
%
@@ -7091,7 +7068,6 @@ help from Bernd Raichle, for which I am grateful.
\input luababel.def
\fi
\fi
-<@Basic macros@>
\bbl@trace{Compatibility with language.def}
\ifx\bbl@languages\@undefined
\ifx\directlua\@undefined
@@ -7228,7 +7204,7 @@ help from Bernd Raichle, for which I am grateful.
\newcommand\EnableBabelHook[1]{\bbl@csarg\let{hk@#1}\@firstofone}
\newcommand\DisableBabelHook[1]{\bbl@csarg\let{hk@#1}\@gobble}
\def\bbl@usehooks{\bbl@usehooks@lang\languagename}
-\def\bbl@usehooks@lang#1#2#3{%
+\def\bbl@usehooks@lang#1#2#3{% Test for Plain
\ifx\UseHook\@undefined\else\UseHook{babel/*/#2}\fi
\def\bbl@elth##1{%
\bbl@cs{hk@##1}{\bbl@cs{ev@##1@#2@}#3}}%
@@ -7254,7 +7230,7 @@ help from Bernd Raichle, for which I am grateful.
beforeextras=0,afterextras=0,stopcommands=0,stringprocess=0,%
hyphenation=2,initiateactive=3,afterreset=0,foreign=0,foreign*=0,%
beforestart=0,languagename=2,begindocument=1}
-\ifx\NewHook\@undefined\else
+\ifx\NewHook\@undefined\else % Test for Plain (?)
\def\bbl@tempa#1=#2\@@{\NewHook{babel/#1}}
\bbl@foreach\bbl@evargs{\bbl@tempa#1\@@}
\fi
@@ -8140,12 +8116,12 @@ help from Bernd Raichle, for which I am grateful.
% \end{macro}
%
% \begin{macro}{\aliasshorthand}
-% First the new shorthand needs to be initialized. Then, we define
-% the new shorthand in terms of the original one, but note with
-% |\aliasshorthands{"}{/}| is |\active@prefix /\active@char/|, so we
-% still need to let the lattest to |\active@char"|.
-%
-%
+% \textit{Deprecated}. First the new shorthand needs to be
+% initialized. Then, we define the new shorthand in terms of the
+% original one, but note with |\aliasshorthands{"}{/}| is
+% |\active@prefix /\active@char/|, so we still need to let the
+% lattest to |\active@char"|.
+%
% \begin{macrocode}
\def\aliasshorthand#1#2{%
\bbl@ifshorthand{#2}%
@@ -8841,7 +8817,7 @@ help from Bernd Raichle, for which I am grateful.
% \begin{macrocode}
\@ifpackagewith{babel}{nocase}%
{\let\bbl@patchuclc\relax}%
- {\def\bbl@patchuclc{%
+ {\def\bbl@patchuclc{% TODO. Delete. Doesn’t work any more.
\global\let\bbl@patchuclc\relax
\g@addto@macro\@uclclist{\reserved@b{\reserved@b\bbl@uclc}}%
\gdef\bbl@uclc##1{%
@@ -9128,7 +9104,7 @@ help from Bernd Raichle, for which I am grateful.
%
% The command |\SetCase| provides a way to change the behavior of
% |\MakeUppercase| and |\MakeLowercase|. |\bbl@tempa| is set by the
-% patched |\@uclclist| to the parsing command.
+% patched |\@uclclist| to the parsing command. \textit{Deprecated.}
%
% \begin{macrocode}
%<<*Macros local to BabelCommands>>
@@ -9198,7 +9174,7 @@ help from Bernd Raichle, for which I am grateful.
%<</More package options>>
% \end{macrocode}
%
-% Initial setup to provide a default behavior if |hypenmap|
+% Initial setup to provide a default behavior if |hyphenmap|
% is not set.
%
% \begin{macrocode}
@@ -9745,6 +9721,7 @@ help from Bernd Raichle, for which I am grateful.
% \begin{macrocode}
\bbl@trace{Bidi layout}
\providecommand\IfBabelLayout[3]{#3}%
+%<-core>
\newcommand\BabelPatchSection[1]{%
\@ifundefined{#1}{}{%
\bbl@exp{\let\<bbl@ss@#1>\<#1>}%
@@ -9778,6 +9755,7 @@ help from Bernd Raichle, for which I am grateful.
\select@language@x{\bbl@main@language}}}{}
\IfBabelLayout{captions}%
{\BabelPatchSection{caption}}{}
+%<+core>
% \end{macrocode}
%
% \subsection{Load engine specific macros}
@@ -9811,12 +9789,16 @@ help from Bernd Raichle, for which I am grateful.
%
% \subsection{Creating and modifying languages}
%
+% Continue with \LaTeX{} only.
+%
% |\babelprovide| is a general purpose tool for creating and modifying
% languages. It creates the language infrastructure, and loads, if
% requested, an |ini| file. It may be used in conjunction to previouly
% loaded |ldf| files.
%
% \begin{macrocode}
+%</package|core>
+%<*package>
\bbl@trace{Creating languages and reading ini files}
\let\bbl@extend@ini\@gobble
\newcommand\babelprovide[2][]{%
@@ -9835,6 +9817,7 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@calendars\@empty
\global\let\bbl@inidata\@empty
\global\let\bbl@extend@ini\@gobble
+ \global\let\bbl@included@inis\@empty
\gdef\bbl@key@list{;}%
\bbl@forkv{#1}{%
\in@{/}{##1}% With /, (re)sets a value in the ini
@@ -9900,6 +9883,14 @@ help from Bernd Raichle, for which I am grateful.
{}% With \bbl@load@basic below
{\bbl@provide@renew{#2}}%
\fi
+ % == include == TODO
+ % \ifx\bbl@included@inis\@empty\else
+ % \bbl@replace\bbl@included@inis{ }{,}%
+ % \bbl@foreach\bbl@included@inis{%
+ % \openin\bbl@readstream=babel-##1.ini
+ % \bbl@extend@ini{#2}}%
+ % \closein\bbl@readstream
+ % \fi
% Post tasks
% ----------
% == subsequent calls after the first provide for a locale ==
@@ -9922,11 +9913,14 @@ help from Bernd Raichle, for which I am grateful.
\\\bbl@toglobal\<bbl@ensure@\languagename>%
\\\bbl@toglobal\<bbl@ensure@\languagename\space>}%
\fi
- % ==
- % At this point all parameters are defined if 'import'. Now we
- % execute some code depending on them. But what about if nothing was
- % imported? We just set the basic parameters, but still loading the
- % whole ini file.
+% \end{macrocode}
+%
+% At this point all parameters are defined if 'import'. Now we
+% execute some code depending on them. But what about if nothing was
+% imported? We just set the basic parameters, but still loading the
+% whole ini file.
+%
+% \begin{macrocode}
\bbl@load@basic{#2}%
% == script, language ==
% Override the values from ini or defines them
@@ -10376,9 +10370,9 @@ help from Bernd Raichle, for which I am grateful.
\bbl@trim\toks@{#2}%
\bbl@xin@{;\bbl@section/\bbl@tempa;}{\bbl@key@list}%
\ifin@\else
- \bbl@xin@{,identification/include.}%
+ \bbl@xin@{,identification/include.}%
{,\bbl@section/\bbl@tempa}%
- \ifin@\edef\bbl@required@inis{\the\toks@}\fi
+ \ifin@\xdef\bbl@included@inis{\the\toks@}\fi
\bbl@exp{%
\\\g@addto@macro\\\bbl@inidata{%
\\\bbl@elt{\bbl@section}{\bbl@tempa}{\the\toks@}}}%
@@ -10439,16 +10433,9 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@inistore\bbl@inistore@min % Remember it's local
\fi
\def\bbl@section{identification}%
- \let\bbl@required@inis\@empty
\bbl@exp{\\\bbl@inistore tag.ini=#1\\\@@}%
\bbl@inistore load.level=#2\@@
\bbl@loop@ini
- \ifx\bbl@required@inis\@empty\else
- \bbl@replace\bbl@required@inis{ }{,}%
- \bbl@foreach\bbl@required@inis{%
- \openin\bbl@readstream=babel-##1.ini
- \bbl@loop@ini}%
- \fi
% == Process stored data ==
\bbl@csarg\xdef{lini@\languagename}{#1}%
\bbl@read@ini@aux
@@ -11262,13 +11249,18 @@ help from Bernd Raichle, for which I am grateful.
% \begin{macrocode}
\providecommand\BCPdata{}
\ifx\renewcommand\@undefined\else % For plain. TODO. It’s a quick fix
- \renewcommand\BCPdata[1]{%
+ \renewcommand\BCPdata[1]{\bbl@bcpdata@i#1\@empty}
+ \def\bbl@bcpdata@i#1#2#3#4#5#6\@empty{%
+ \@nameuse{str_if_eq:nnTF}{#1#2#3#4#5}{main.}%
+ {\bbl@bcpdata@ii{#6}\bbl@main@language}%
+ {\bbl@bcpdata@ii{#1#2#3#4#5#6}\languagename}}%
+ \def\bbl@bcpdata@ii#1#2{%
\bbl@ifunset{bbl@info@#1.tag.bcp47}%
{\bbl@error{Unknown field '#1' in \string\BCPdata.\\%
Perhaps you misspelled it.}%
{See the manual for details.}}%
- {\bbl@ifunset{bbl@\csname bbl@info@#1.tag.bcp47\endcsname @\languagename}{}%
- {\bbl@cs{\csname bbl@info@#1.tag.bcp47\endcsname @\languagename}}}}
+ {\bbl@ifunset{bbl@\csname bbl@info@#1.tag.bcp47\endcsname @#2}{}%
+ {\bbl@cs{\csname bbl@info@#1.tag.bcp47\endcsname @#2}}}}
\fi
% Still somewhat hackish:
\@namedef{bbl@info@casing.tag.bcp47}{casing}
@@ -11281,7 +11273,6 @@ help from Bernd Raichle, for which I am grateful.
%<<*More package options>>
\DeclareOption{ensureinfo=off}{}
%<</More package options>>
-%
\let\bbl@ensureinfo\@gobble
\newcommand\BabelEnsureInfo{%
\ifx\InputIfFileExists\@undefined\else
@@ -11457,23 +11448,6 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@encoding@select@off\@empty}
% \end{macrocode}
%
-% As the final task, load the code for lua. TODO: use babel name, override
-%
-% \begin{macrocode}
-\ifx\directlua\@undefined\else
- \ifx\bbl@luapatterns\@undefined
- \input luababel.def
- \fi
-\fi
-% \end{macrocode}
-%
-% Continue with \LaTeX{}.
-%
-% \begin{macrocode}
-%</package|core>
-%<*package>
-% \end{macrocode}
-%
% \subsection{Cross referencing macros}
%
% The \LaTeX\ book states:
@@ -11962,7 +11936,7 @@ help from Bernd Raichle, for which I am grateful.
%
% \begin{macro}{\substitutefontfamily}
%
-% Deprecated. Use the tools provides by \LaTeX. The command
+% \textit{Deprecated.} Use the tools provides by \LaTeX. The command
% |\substitutefontfamily| creates an \file{.fd} file on the fly. The
% first argument is an encoding mnemonic, the second and third
% arguments are font family names.
@@ -12432,10 +12406,12 @@ help from Bernd Raichle, for which I am grateful.
\bbl@load@language{hebrew}}
\DeclareOption{hungarian}{\bbl@try@load@lang{}{magyar}{}}
\DeclareOption{lowersorbian}{\bbl@try@load@lang{}{lsorbian}{}}
+\DeclareOption{northernsami}{\bbl@try@load@lang{}{samin}{}}
\DeclareOption{nynorsk}{\bbl@try@load@lang{}{norsk}{}}
\DeclareOption{polutonikogreek}{%
\bbl@try@load@lang{}{greek}{\languageattribute{greek}{polutoniko}}}
\DeclareOption{russian}{\bbl@try@load@lang{}{russianb}{}}
+\DeclareOption{scottishgaelic}{\bbl@try@load@lang{}{scottish}{}}
\DeclareOption{ukrainian}{\bbl@try@load@lang{}{ukraineb}{}}
\DeclareOption{uppersorbian}{\bbl@try@load@lang{}{usorbian}{}}
% \end{macrocode}
@@ -12684,7 +12660,7 @@ help from Bernd Raichle, for which I am grateful.
%
% \begin{macrocode}
<@Make sure ProvidesFile is defined@>
-\ProvidesFile{hyphen.cfg}[<@date@> <@version@> Babel hyphens]
+\ProvidesFile{hyphen.cfg}[<@date@> v<@version@> Babel hyphens]
\xdef\bbl@format{\jobname}
\def\bbl@version{<@version@>}
\def\bbl@date{<@date@>}
@@ -15104,7 +15080,7 @@ end
\else
\let\bbl@ams@lap\llap
\fi
- \ExplSyntaxOn
+ \ExplSyntaxOn % Required by \bbl@sreplace with \intertext@
\bbl@sreplace\intertext@{\normalbaselines}%
{\normalbaselines
\ifx\bbl@eqnodir\relax\else\bbl@pardir\@ne\bbl@eqnodir\fi}%
@@ -23138,7 +23114,7 @@ Babel.cjk_breaks = {
%
% \begin{macrocode}
%<*nil>
-\ProvidesLanguage{nil}[<@date@> <@version@> Nil language]
+\ProvidesLanguage{nil}[<@date@> v<@version@> Nil language]
\LdfInit{nil}{datenil}
% \end{macrocode}
%
@@ -23345,7 +23321,7 @@ Babel.cjk_breaks = {
%</ca-islamic>
% \end{macrocode}
%
-% \section{Hebrew}
+% \subsection{Hebrew}
%
% This is basically the set of macros written by Michail Rozman in
% 1991, with corrections and adaptions by Rama Porrat, Misha, Dan Haran
@@ -23610,7 +23586,7 @@ Babel.cjk_breaks = {
%</ca-hebrew>
% \end{macrocode}
%
-% \section{Persian}
+% \subsection{Persian}
%
% There is an algorithm written in TeX by Jabri, Abolhassani, Pournader
% and Esfahbod, created for the first versions of the FarsiTeX system
@@ -23653,7 +23629,7 @@ Babel.cjk_breaks = {
%</ca-persian>
% \end{macrocode}
%
-% \section{Coptic and Ethiopic}
+% \subsection{Coptic and Ethiopic}
%
% Adapted from \texttt{jquery.calendars.package-1.1.4}, written by Keith
% Wood, 2010. Dual license: GPL and MIT. The only difference is the
@@ -23690,7 +23666,7 @@ Babel.cjk_breaks = {
%</ca-ethiopic>
% \end{macrocode}
%
-% \section{Buddhist}
+% \subsection{Buddhist}
%
% That’s very simple.
%
@@ -24275,6 +24251,8 @@ Babel.cjk_breaks = {
\let\bbl@opt@shorthands\@nnil
\def\bbl@ifshorthand#1#2#3{#2}%
\let\bbl@language@opts\@empty
+\let\bbl@ensureinfo\@gobble
+\let\bbl@provide@locale\relax
\ifx\babeloptionstrings\@undefined
\let\bbl@opt@strings\@nnil
\else