diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/babel/babel.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.dtx | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index 4d8444ab9fe..bc8980420e8 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -36,7 +36,7 @@ %\iffalse %% File 'babel.dtx' %\fi -%%\ProvidesFile{babel.dtx}[2016/01/08 v3.9n The Babel package] +%%\ProvidesFile{babel.dtx}[2016/02/01 v3.9o The Babel package] %\iffalse % % Babel DOCUMENT-STYLE option for LaTeX version 2.09 or plain TeX; @@ -196,8 +196,8 @@ \vspace{2cm}\hspace{1.5cm} \begin{minipage}{5cm} \Large -Version 3.9n\newline -2016/01/08 +Version 3.9o\newline +2016/02/01 \vspace{1cm} \textit{Original author}\newline @@ -1313,6 +1313,7 @@ far from complete): some languages (kerning and spacing). Ligatures can be disabled. \item[substitutefont] Combines fonts in several encodings. \item[mkpattern] Generates hyphenation patterns. +\item[tracklang] Tracks which languages have been requested. \end{description} \subsection{Future work} @@ -1366,17 +1367,30 @@ Note you can set any feature required for the language -- not only |Language|, but also |Script| or a local |.fea|. This makes those macros a bit more verbose, but also more powerful. -\section{Preloading languages with \file{language.dat}} +\section{Loading languages with \file{language.dat}} \TeX{} and most engines based on it (pdf\TeX, \xetex, $\epsilon$-\TeX, the main exception being \luatex) require hyphenation patterns to be -loaded when a format is created (eg, \LaTeX, Xe\LaTeX, +preloaded when a format is created (eg, \LaTeX, Xe\LaTeX, pdf\LaTeX). \babel{} provides a tool which has become standand in many distributions and based on a ``configuration file'' named \file{language.dat}. The exact way this file is used depends on the distribution, so please, read the documentation for the latter (note also some distributions generate the file with some tool). +\New{3.9o} With \luatex, however, patterns are loaded on the fly when +requested by the language (except the ``0th'' language, +\textsf{english}, which is preloaded always). Until 3.9n, this task +was delegated to the package \textsf{luatex-hyphen}, by Khaled Hosny, +\'Elie Roux, and Manuel P\'egouri\'e-Gonnard, and required an extra +file named |language.dat.lua|, but now a new mechanism has been +devised based solely on |language.dat|. \textbf{You must rebuild the +formats} if upgrading from a previous version. You may want to have a +local |language.dat| for a particular project (for example, a book on +Chemistry). + +\subsection{Format} + In that file the person who maintains a \TeX\ environment has to record for which languages he has hyphenation patterns \emph{and} in which files these are stored\footnote{This is because different operating @@ -1622,7 +1636,7 @@ explained in in sec. \ref{s:strings} (\babel{} 3.9 and later). \begin{verbatim} \ProvidesLanguage{<language>} - [2016/01/08 v0.0 <Language> support from the babel system] + [2016/02/01 v0.0 <Language> support from the babel system] \LdfInit{<language>}{captions<language>} \ifx\undefined\l@<language> @@ -2405,8 +2419,8 @@ help from Bernd Raichle, for which I am grateful. % little bit of literate programming. % % \begin{macrocode} -%<<version=3.9n>> -%<<date=2016/01/08>> +%<<version=3.9o>> +%<<date=2016/02/01>> % \end{macrocode} % % We define some basic macros which just make the code cleaner. @@ -6625,11 +6639,17 @@ help from Bernd Raichle, for which I am grateful. % \changes{babel~3.6u}{1999/04/20}{Moved this code to % \file{babel.def}} % \changes{babel~3.9l}{2014/08/02}{fontspec used to set -% \cs{latinencoding} to EUx, but now it doesn't. So, it's done here.} +% \cs{latinencoding} to EUx, but now it doesn't. So, it's done +% here.} +% \changes{babel~3.9o}{2016/01/27}{With fontspec, first check if +% \cs{UTFencname} exists.} % \begin{macrocode} \AtBeginDocument{% \@ifpackageloaded{fontspec}% - {\xdef\latinencoding{EU\ifcase\bbl@engine\or2\or1\fi}}% + {\xdef\latinencoding{% + \@ifundefined{UTFencname}% + {EU\ifcase\bbl@engine\or2\or1\fi}% + {\UTFencname}}}% {\gdef\latinencoding{OT1}% \ifx\cf@encoding\bbl@t@one \xdef\latinencoding{\bbl@t@one}% @@ -8270,11 +8290,14 @@ help from Bernd Raichle, for which I am grateful. % \changes{babel~3.9g}{2013/07/28}{In non-LaTeX formats the number of % languages were not printed. Moved from \cs{dump} and cleaned up: % now \cs{toks}8 is expanded here.} +% \changes{babel~3.9o}{2016/01/25}{The number of languages loaded was +% off by 1.} % \begin{macrocode} \if/\the\toks@/\else \errhelp{language.dat loads no language, only synonyms} \errmessage{Orphan language synonym} \fi +\advance\last@language\@ne \edef\bbl@tempa{% \everyjob{% \the\everyjob @@ -8283,7 +8306,8 @@ help from Bernd Raichle, for which I am grateful. \else \noexpand\typeout \fi - {\the\toks8 \the\last@language\space languages loaded.}}} + {\the\toks8 \the\last@language\space language(s) loaded.}}} +\advance\last@language\m@ne \bbl@tempa % \end{macrocode} % Also remove some macros from memory and raise an error |