diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-04 23:39:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-04 23:39:46 +0000 |
commit | 2c16907b492b353f234ae633ea24851c0f809242 (patch) | |
tree | a639e848a1f8919ef7529c405cb447c53ab2c389 /Master | |
parent | bb83d426056841b56f02baa144b334892a340fa6 (diff) |
babel (4jan18)
git-svn-id: svn://tug.org/texlive/trunk@46210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
83 files changed, 1345 insertions, 617 deletions
diff --git a/Master/texmf-dist/doc/latex/babel/CONTRIB b/Master/texmf-dist/doc/latex/babel/CONTRIB deleted file mode 100644 index 335502d9c4d..00000000000 --- a/Master/texmf-dist/doc/latex/babel/CONTRIB +++ /dev/null @@ -1,38 +0,0 @@ -Guidelines for contributed languages ------------------------------------- - -Now language files are "outsourced" and are located in a separate -directory, so that they are contributed directly to CTAN (please, do -not send to me language styles just to upload them to CTAN): - -/macros/latex/contrib/babel-contrib - -Of course, placing your style files in this directory is not mandatory, -but if you want to do it, here are a few guidelines. - -- Do not hesitate stating on the file heads you are the author and the - maintainer, if you actually are. There is no need to state the babel - maintainer(s) as authors if they have not contributed significantly - to your language files. -- Fonts are not strictly part of a language, so they are best placed - in the corresponding TeX tree. This includes not only tfm, vf, ps1, - otf, mf files and the like, but also fd ones. -- Font and input encodings are usually best placed in the - corresponding tree, too, but sometimes they belong more naturally to - the babel style. Note you may also need to define a LICR. -- Babel ldf files may just interface a framework, as it happens often - with Oriental languages/scripts. This framework is best placed in its - own directory. -- And do not forget providing a manual (as a stand-alone PDF document). - -The following page provides a starting point: - -http://www.texnia.com/incubator.html - -If your need further assistance and technical advice in the -development of language styles, I am willing to help you. And of -course, you can make any suggestion you like. - ------------- -Javier Bezos -2016/01/07 diff --git a/Master/texmf-dist/doc/latex/babel/README b/Master/texmf-dist/doc/latex/babel/README.md index 2c969bdea70..ad9d1740776 100644 --- a/Master/texmf-dist/doc/latex/babel/README +++ b/Master/texmf-dist/doc/latex/babel/README.md @@ -1,11 +1,12 @@ -Babel 3.15 ----------- +## Babel 3.16 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many language styles work with pdflatex, as well as with xelatex and lualatex out of the box. A few even work with plain formats. +The latest stable version is available on <https://ctan.org/pkg/babel>. + Version 3.9a fixed lots of bugs and added some new features, intended mainly to make it compatible somehow with Unicode engines. Some bugs have not been fixed to avoid backward incompatibilities, but they have @@ -19,7 +20,7 @@ be added incrementally. Versions numbers drop the letter and now 3.10, 3.11, etc., will be used instead. So, 3.9t is the last in the former series. -Included is a set of ini files for about 200 languages). +Included is a set of ini files for about 200 languages. Languages are not part of the Babel core any more; in particular, it shall be no longer necessary to synchronize Babel core releases with @@ -35,19 +36,39 @@ Changes are described in babel.pdf with the label "New <version>". The manual has been expanded to include some tips and tricks, but it will be improved in next releases. -Please, report bugs and suggestions to: +### Reporting Bugs + +If you wish to report a problem or bug in any of these packages please +use the +[Issue Tracker for LaTeX2e on GitHub](https://github.com/latex3/latex2e/issues) +and follow the guidelines that pop up if you press the `New issue` +button. -http://latex-project.org/bugs-upload.html +In particular, to check that you are really seeing a bug, please write +a short, self-contained document that shows the problem. This should +include the `latexbug` package, which will warn if your test file is +not suitable for one or the other reason. See the +[CONTRIBUTING guide](https://github.com/latex3/latex2e/blob/master/CONTRIBUTING.md) +for further details, or if you need to obtain the `latexbug` package. + +If the bug turns out to be with third-party software then please +contact the developer, and not us! You may also report them to the author more informally on: -http://www.texnia.com/contact.html + http://www.texnia.com/contact.html Bugs related to specific languages are best reported to their respective authors. -Recent changes --------------- +### New + +``` +3.16 - New package option layout for bidi documents. + - Quotes in TU encoding + - Fix - \<language>date did not work correctly + - Fix - with some languages (eg, british), using + \babelfont raised an error. 3.15 - New command \babelfont (in Unicode engines) to define language/script dependent fonts. Related to it, new @@ -67,8 +88,7 @@ Recent changes - With a few exceptions, ini files have reached version 1.0. - New key `import' for \babelprovide, which also defines dates. -[3.12 - No real changes in the babel core. Just a few technical changes - related to the files.] +[3.12 - Internal.] 3.11 - Fix - error when version in format and of package didn't match. @@ -83,21 +103,9 @@ Recent changes - Fix - with \babelhyphen{soft} the hyphen could vanish. - English, Indonesian and Malay "dialects" now rely on the proxy files provided by these languages (eg, american.ldf, melayu.ldf). - If you upgrade babel, you MUST upgrade those languages, too. - -3.9s - Bug fix - extra spaces with \babelensure - -3.9r - The three main dtx files now share version numbers. - - bbunicode - Fixed a line break at \cs{foreignlanguage} with - unloaded patterns. Also added \babelcatcodetablenum, just in - case. - -3.9q - base now reads patterns in lua - - Some minor changes for luatex - -*** Babel 3.9o and 3.9p are deprecated *** + If you upgrade babel, you MUST upgrade those languages, too. +``` ------------- Javier Bezos -2017/11/03 +2018-01-04 diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf Binary files differindex cb0b483c3f6..fd0915188ea 100644 --- a/Master/texmf-dist/doc/latex/babel/babel.pdf +++ b/Master/texmf-dist/doc/latex/babel/babel.pdf diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index 5f068ccd945..81656027379 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -31,13 +31,13 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2017/11/03 v3.15 The Babel package] +\ProvidesFile{babel.dtx}[2018/01/04 v3.16 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} -\setmainfont[Scale=.89]{DejaVu Serif} -\setsansfont[Scale=.87]{DejaVu Sans} -\setmonofont[Scale=.87]{DejaVu Sans Mono} +\setmainfont[Scale=.88]{Noto Serif} +\setsansfont[Scale=.88]{Noto Sans} +\setmonofont[Scale=.88,FakeStretch=.95]{Noto Mono} \raggedright \addtolength{\textwidth}{25pt} \addtolength{\textheight}{3.5cm} @@ -47,6 +47,7 @@ \newcommand*\babel{\textsf{babel}} \newcommand*\Babel{\textsf{Babel}} \newcommand*\xetex{\textsf{xetex}} +\newcommand*\pdftex{\textsf{pdftex}} \newcommand*\luatex{\textsf{luatex}} \newcommand*\nb[1]{} \newcommand*\m[1]{\mbox{$\langle$\normalfont\itshape#1\/$\rangle$}} @@ -54,7 +55,7 @@ \meta{language}\texttt{,}\meta{language}\texttt{,}...} \newcommand*\langvar{\m{lang}} \newcommand*\Lopt[1]{\textsf{#1}} -\newcommand*\Lenv[1]{\textsf{#1}} +\newcommand*\Lenv[1]{\texttt{#1}} \newcommand*\menv[1]{\char`\{#1\char`\}} \newcommand*\Eenv[1]{% \quad\ldots\quad @@ -223,11 +224,23 @@ Javier Bezos \part{User guide} -This user guide focuses on \LaTeX. There are also some notes on its -use with Plain \TeX. +\begin{itemize} +\item This user guide focuses on \LaTeX. There are also some notes on + its use with Plain \TeX. + +\item Changes and new features with relation to version 3.8 are + highlighted with \New{X.XX}\hspace{-.5em}. The most recent features + could be still unstable. Please, report any issues you find. -If you are interested in the \TeX{} multilingual support, please join the -\textsf{kadingira} list on \texttt{http://tug.org/mailman/listinfo/kadingira}. +\item If you are interested in the \TeX{} multilingual support, please + join the \textsf{kadingira} list on + \texttt{http://tug.org/mailman/listinfo/kadingira}. You can follow + the development of \babel{} on + \texttt{https://github.com/latex3/latex2e/tree/master/required/babel} + (which provides some sample files, too). + +\item See section \ref{contribute} for contributing a language. +\end{itemize} \section{The user interface}\label{U-I} @@ -381,7 +394,8 @@ With them you can use \babel{} to localize the documents. The Latin script is covered by default in current \LaTeX{} (provided the document encoding is UTF-8), because the font loader is preloaded and the font is switched to |lmroman|. Other scripts require loading -\textsf{fontspec}. +\textsf{fontspec}. You may want to set the font attributes with +\textsf{fontspec}, too. \begin{example} The following bilingual, single script document in UTF-8 encoding @@ -492,7 +506,7 @@ In Plain, load languages styles with |\input| and then use \subsection{Basic language selectors} This section describes the commands to be used in the document to -switch the language in multilingual document. In most cases, only the +switch the language in multilingual documents. In most cases, only the two basic macros |\selectlanguage| and |\foreignlanguage| are necessary. The environments |otherlanguage|, |otherlanguage*| and |hyphenrules| are auxiliary, and described in the next section. @@ -1035,48 +1049,15 @@ can take the following values: really useful, but who knows.} \end{description} -\Describe{bidi=}{\texttt{default} $\string|$ \texttt{basic-r}} +\Describe{bidi=}{} \New{3.14} Selects the bidi algorithm to be used in \luatex{} and -\xetex{}. With |default| the bidi mechanism is just activated (by default -it is not), but every change must by marked up. In \xetex{} this is -the only option. In \luatex, |basic-r|, provides a simple and fast -method for R text, which handles numbers and unmarked L text within an -R context. +\xetex{}. See sec.~\ref{bidi}. -\begin{example} -The following text comes from the Arabic Wikipedia (article about -Arabia). Copy-pasting some text from the Wikipedia is a good way to -test this feature, which will be improved in the future. Remember -|basic-r| is available in \luatex{} only. - \begingroup -% If you are looking at the code to see how it has been written, you -% will be disappointed :-). The following example is built ad hoc to -% emulate the final result to avoid dependencies, and therefore it's -% not "real" code. -\setmonofont[Scale=.87,Script=Arabic]{DejaVu Sans Mono} \catcode`@=13 -\def@#1{\ifcase#1\relax \egroup \or \bgroup\textdir TLT \else -\bgroup\textdir TRT \pardir TRT \fi} -\begin{verbatim} -\documentclass{article} - -\usepackage[nil, _bidi=basic-r_]{babel} - -_\babelprovide[import=ar, main]{arabic}_ - -\babelfont{rm}{FreeSerif} - -\begin{document} - -@9وقد عرفت شبه جزيرة العرب طيلة العصر الهيليني )الاغريقي( بـ -@1Arabia@0 أو @1Aravia@0 )بالاغريقية @1Αραβία@0(، استخدم الرومان ثلاث -بادئات بـ@1“Arabia”@0 على ثلاث مناطق من شبه الجزيرة العربية، إلا أنها -حقيقةً كانت أكبر مما تعرف عليه اليوم. +\Describe{layout=}{} -@0\end{document} -\end{verbatim} -\endgroup -\end{example} +\New{3.16} Selects which layout elements are adapted in bidi +documents. See sec.~\ref{bidi}. \subsection{The \texttt{base} option} @@ -1229,6 +1210,11 @@ captions): \tag{fi} Finnish\hascapu\hascapl \tag{fil} Filipino \tag{fo} Faroese +\tag{fr} French\hascapu\hascapl +\tag{fr-BE} French\hascapu\hascapl +\tag{fr-CA} French\hascapu\hascapl +\tag{fr-CH} French\hascapu\hascapl +\tag{fr-LU} French\hascapu\hascapl \tag{fur} Friulian\hascapu\hascapl \tag{fy} Western Frisian \tag{ga} Irish\hascapu\hascapl @@ -1409,7 +1395,7 @@ captions): \hrule \bigskip -In some context (currently |\babelfont|) an \textsc{ini} file may be +In some contexts (currently |\babelfont|) an \texttt{ini} file may be loaded by its name. Here is the list of the names currently supported. With these languages, |\babelfont| loads (if not done before) the language and script names (even if the language is defined @@ -1734,9 +1720,10 @@ zulu \subsection{Selecting fonts} -\New{3.15} Babel provides a high level interface on top of |fontspec| to select -fonts. There is no need to load \textsf{fontspec} explicitly -- -\babel{} does it for you with the first |\babelfont|. +\New{3.15} Babel provides a high level interface on top of |fontspec| +to select fonts. There is no need to load \textsf{fontspec} explicitly +-- \babel{} does it for you with the first |\babelfont|.\footnote{See +also the package \textsf{combofont} for a complementary approach.} \Describe\babelfont{\oarg{language-list}\marg{font-family}% \oarg{font-options}\marg{font-name}} @@ -1752,7 +1739,7 @@ will be assigned to them, overriding the default. Alternatively, you may set a font for a script -- just precede its name (lowercase) with a star (eg, |*devanagari|). -\Babel{} takes care the font language and the font script when +\Babel{} takes care of the font language and the font script when languages are selected (as well as the writing direction); see the recognized languages above. In most cases, you will not need \textit{font-options}, which is the same as in \textsf{fontspec}, but @@ -1774,7 +1761,7 @@ Mono} \fi} \begin{verbatim} \documentclass{article} -\usepackage[swedish]{babel} +\usepackage[swedish, bidi=default]{babel} \babelprovide[import=he]{hebrew} @@ -1805,10 +1792,22 @@ to select fonts in addition to the three basic ones. \begin{verbatim} \babelfont{kai}{FandolKai} \end{verbatim} -Now, |\kaifamily| and |\kaidefault| are at your disposal. + Now, |\kaifamily| and |\kaidefault|, as well as |\textkai| are at + your disposal. \end{example} \begin{note} + You may load \textsf{fontspec} explicitly. For example: +\begin{verbatim} +\usepackage{fontspec} +\newfontscript{Devanagari}{deva} +\babelfont[hindi]{rm}{Shobhika} +\end{verbatim} + This makes sure the OpenType script for Devanagari is |deva| and not + |dev2|. +\end{note} + +\begin{note} Directionality is a property affecting margins, intentation, column order, etc., not just text. Therefore, it is under the direct control of the language, which appplies both the script and the @@ -1820,7 +1819,7 @@ Now, |\kaifamily| and |\kaidefault| are at your disposal. \begin{note} |\fontspec| is not touched at all, only the preset font families (|rm|, |sf|, |tt|, and the like). If a language is switched when an - \textit{ad hoc} font is active, or you select the font it with this + \textit{ad hoc} font is active, or you select the font with this command, neither the script nor the language are passed. You must add them by hand. This is by design, for several reasons (for example, each font has its own set of features and a generic setting @@ -1945,8 +1944,8 @@ format (\textsf{hindi}, \textsf{french}, \textsf{breton}, and Besides |\today|, there is a |\<language>date| macro with three arguments: year, month and day numbers. In fact, |\today| calls -|\<language>today| which in turn calls -|\<language>date{\year}{\month}{\day}|. +|\<language>today|, which in turn calls +|\<language>date{\the\year}{\the\month}{\the\day}|. \Describe{captions=}{\meta{language-tag}} Loads only the strings. For example: @@ -2024,90 +2023,6 @@ respectively. \textsf{iflang} instead of |\iflanguage| if possible. \end{warning} -\subsection{Hooks} - -\New{3.9a} A hook is a piece of code to be executed at certain -events. Some hooks are predefined when \luatex{} and \xetex{} are -used. - -\Describe\AddBabelHook{\marg{name}\marg{event}\marg{code}} - -The same name can be applied to several events. Hooks may be enabled -and disabled for all defined events with -|\EnableBabelHook|\marg{name}, |\DisableBabelHook|\marg{name}. Names -containing the string |babel| are reserved (they are used, for -example, by |\useshortands*| to add a hook for the event -|afterextras|). - -Current events are the following; in some of them you can use one to -three \TeX{} parameters (|#1|, |#2|, |#3|), with the meaning given: -\begin{description} -\renewcommand\makelabel[1]{% - \hspace\labelsep\normalfont\ttfamily\color{thered}#1} -\itemsep=-\parskip -\item[adddialect] (language name, dialect name) Used by - \file{luababel.def} to load the patterns if not preloaded. -\item[patterns] (language name, language with encoding) Executed just - after the |\language| has been set. The second argument has the - patterns name actually selected (in the form of either |lang:ENC| or - |lang|). -\item[hyphenation] (language name, language with encoding) Executed - locally just before exceptions given in |\babelhyphenation| are - actually set. -\item[defaultcommands] Used (locally) in |\StartBabelCommands|. -\item[encodedcommands] (input, font encodings) Used (locally) in - |\StartBabelCommands|. Both \xetex{} and \luatex{} make sure the - encoded text is read correctly. -\item[stopcommands] Used to reset the the above, if necessary. -\item[write] This event comes just after the switching commands are - written to the |aux| file. -\item[beforeextras] Just before executing |\extras|\m{language}. This - event and the next one should not contain language-dependent code - (for that, add it to |\extras|\m{language}). -\item[afterextras] Just after executing |\extras|\m{language}. For - example, the following deactivates shorthands in all languages: -\begin{verbatim} -\AddBabelHook{noshort}{afterextras}{\languageshorthands{none}} -\end{verbatim} -\item[stringprocess] Instead of a parameter, you can manipulate the - macro |\BabelString| containing the string to be defined with - |\SetString|. For example, to use an expanded version of the string - in the definition, write: -\begin{verbatim} -\AddBabelHook{myhook}{stringprocess}{% - \protected@edef\BabelString{\BabelString}} -\end{verbatim} -\item[initiateactive] (char as active, char as other, original char) - \New{3.9i} Executed just after a shorthand has been `initiated'. The three - parameters are the same character with different catcodes: active, - other (|\string|'ed) and the original one. -\item[afterreset] \New{3.9i} Executed when selecting a language just after - |\originalTeX| is run and reset to its base value, before executing - |\captions|\m{language} and |\date|\m{language}. -\end{description} - -Four events are used in \file{hyphen.cfg}, which are handled in a -quite different way for efficiency reasons -- unlike the precedent -ones, they only have a single hook and replace a default definition. -\begin{description} -\renewcommand\makelabel[1]{% - \hspace\labelsep\normalfont\ttfamily\color{thered}#1} -\itemsep=-\parskip -\item[everylanguage] (language) Executed before every language patterns are loaded. -\item[loadkernel] (file) By default loads |switch.def|. It can be used - to load a different version of this files or to load nothing. -\item[loadpatterns] (patterns file) Loads the patterns file. Used by - \file{luababel.def}. -\item[loadexceptions] (exceptions file) Loads the exceptions - file. Used by \file{luababel.def}. -\end{description} - -\Describe\BabelContentsFiles{} -\New{3.9a} This macro contains a list of ``toc'' types which -require a command to switch the language. Its default value is -|toc,lof,lot|, but you may redefine it with |\renewcommand| (it's up -to you to make sure no toc type is duplicated). - \subsection{Hyphenation tools} \Describe\babelhyphen{% @@ -2126,14 +2041,14 @@ with a breaking oportunity after it. A further type is a oportunity. In \TeX, \verb|-| and \verb|\-| forbid further breaking oportunities -in the word. This is the desired behaviour very often, but not -always, and therefore many languages provide shorthands for these +in the word. This is the desired behaviour very often, but not always, +and therefore many languages provide shorthands for these cases. Unfortunately, this has not been done consistently: for -example, in Dutch, Portugese, Catalan or Danish, \verb|"-| is a hard -hyphen, while in German, Spanish, Norwegian, Slovak or Russian, it -is a soft hyphen. Furthermore, some of them even redefine |\-|, so -that you cannot insert a soft hyphen without breaking oportunities -in the rest of the word. +example, \verb|"-| in Dutch, Portugese, Catalan or Danish is a hard +hyphen, while in German, Spanish, Norwegian, Slovak or Russian is a +soft hyphen. Furthermore, some of them even redefine |\-|, so that you +cannot insert a soft hyphen without breaking oportunities in the rest +of the word. Therefore, some macros are provide with a set of basic ``hyphens'' which can be used by themselves, to define a user shorthand, or even @@ -2222,8 +2137,7 @@ incomplete.\footnote{The so-called Unicode fonts do not improve the situation either. So, a font suited for Vietnamese is not necessarily suited for, say, the romanization of Indic languages, and the fact it contains glyphs for Modern Greek does not mean it includes them for -Classic Greek. As to directionality, it poses special challenges -because it also affects individual characters and layout elements.} +Classic Greek.} Some languages sharing the same script define macros to switch it (eg, |\textcyrillic|), but be aware they may also set the language to a @@ -2233,13 +2147,6 @@ fonts (for example, if the main latin encoding was |LY1|), and therefore it has been deprecated.\footnote{But still defined for backwards compatibility.} -No macros to select the writing direction are provided, either -- -writing direction is intrinsic to each script and therefore it is best -set by the language (which could be a dummy one). Furthermore, there -are in fact two right-to-left modes, depending on the language, which -differ in the way `weak' numeric characters are ordered (eg, Arabic -\%123 \textit{vs} Hebrew 123\%). - \Describe{\ensureascii}{\marg{text}} \New{3.9i} This macro makes sure \m{text} is typeset with a @@ -2264,6 +2171,129 @@ most of cases. No asumption is made on characters above 127, which may not follow the LICR conventions -- the goal is just to ensure most of the ASCII letters and symbols are the right ones. +\subsection{Selecting directions} +\label{bidi} + +No macros to select the writing direction are provided, either -- +writing direction is intrinsic to each script and therefore it is best +set by the language (which could be a dummy one). Furthermore, there +are in fact two right-to-left modes, depending on the language, which +differ in the way `weak' numeric characters are ordered (eg, Arabic +\%123 \textit{vs} Hebrew 123\%). + +\begin{warning} + Setting bidi text has many subtleties (see for example + <https://www.w3.org/TR/html-bidi/>). This means the \babel{} bidi + code may take some time before it is truly stable. An effort is + being made to avoid incompatibilities in the future (this one of the + reason currently bidi must be explicitly requested as a package + option, with a certain bidi model). +\end{warning} + +There are some package options controlling bidi writing. + +\Describe{bidi=}{\texttt{default} $\string|$ \texttt{basic-r}} + +\New{3.14} Selects the bidi algorithm to be used. With |default| the +bidi mechanism is just activated (by default it is not), but every +change must by marked up. In \xetex{} and \pdftex{} this is the only +option. In \luatex, |basic-r| provides a simple and fast method for R +text, which handles numbers and unmarked L text within an R context. + +\begin{example} + The following text comes from the Arabic Wikipedia (article about + Arabia). Copy-pasting some text from the Wikipedia is a good way to + test this feature, which will be improved in the future. Remember + |basic-r| is available in \luatex{} only.\footnote{At the time of + this writing some Arabic fonts are not rendered correctly by the + default \luatex{} font loader, with misplaced kerns inside some + words, so double check the resulting text. It seems a fix is on the + way.} + \begingroup +% If you are looking at the code to see how it has been written, you +% will be disappointed :-). The following example is built ad hoc to +% emulate the final result to avoid dependencies, and therefore it's +% not "real" code. +\setmonofont[Scale=.87,Script=Arabic]{DejaVu Sans Mono} \catcode`@=13 +\def@#1{\ifcase#1\relax \egroup \or \bgroup\textdir TLT \else +\bgroup\textdir TRT \pardir TRT \fi} +\begin{verbatim} +\documentclass{article} + +\usepackage[nil, _bidi=basic-r_]{babel} + +_\babelprovide[import=ar, main]{arabic}_ + +\babelfont{rm}{FreeSerif} + +\begin{document} + +@9وقد عرفت شبه جزيرة العرب طيلة العصر الهيليني )الاغريقي( بـ +@1Arabia@0 أو @1Aravia@0 )بالاغريقية @1Αραβία@0(، استخدم الرومان ثلاث +بادئات بـ@1“Arabia”@0 على ثلاث مناطق من شبه الجزيرة العربية، إلا أنها +حقيقةً كانت أكبر مما تعرف عليه اليوم. + +@0\end{document} +\end{verbatim} +\endgroup +\end{example} + +\Describe{layout=}{\texttt{sectioning} $\string|$ + \texttt{counters} $\string|$ + \texttt{lists} $\string|$ + \texttt{contents} $\string|$ + \texttt{columns}} + +\New{3.16} Selects which layout elements are adapted in bidi +documents. This list will be expanded in future releases (footnotes, +tables, etc.). \textit{To be expanded}. Note some options are not +required in \luatex{}. + +\begin{description} +\renewcommand\makelabel[1]{% + \hspace\labelsep\normalfont\ttfamily\color{thered}#1} +\itemsep=-\parskip +\item[sectioning] makes sure the sectioning macros are typeset in the + main language, but with the title text in the current language (see + below for further details); +\item[counters] required in all engines to reorder correctly section + numbers and the like (eg, \m{subsection}.\m{section}); required in + \xetex{} and \pdftex{} for counters in general, as well as in \luatex{} + with |bidi=default|; +\item[lists] required in \xetex{} and \pdftex{}, but only in + multilingual documents in \luatex{}; +\item[contents] required in \xetex{} and \pdftex{}; in \luatex{} + toc entries are R by default; +\item[columns] required in \xetex{} and \pdftex{} to reverse the + column order (currently only the standard two column mode); in + \luatex{} they are R by default (including \textsf{multicol}). +\end{description} + +\Describe{\babelsublr}{\marg{lr-text}} + +However, digits in \pdftex{} must be marked up explicitly (unlike +\luatex{} with |bidi=basic-r| and, usually, \xetex{}). Mainly for it +(although available in all engines, because it can be useful), this +command is provided to set \marg{lr-text} in L mode. It's mainly +intended for what Unicode calls weak characters, because words are +best set with the corresponding language. For this reason, there is +no |rl| counterpart. + +\Describe{\BabelPatchSection}{\marg{section-name}} + +Mainly for bidi text, but it could be useful in other +cases. |\BabelPatchSection| and the corresponding option +|layout=sectioning| takes a more logical approach (at least in many +cases) because it applies the global language to the section format +(including the |\chaptername| in |\chapter|), while the section text +is still the current language. The latter is passed to tocs and marks, +too, and with |sectioning| in |layout| they both reset the “global” +language to the main one, while the text uses the “local” +language. With |layout=sectioning| all the standard sectioning +commands are redefined, but with this command you can set them +individually if necessary (but note then tocs and marks are not +touched). + \subsection{Language attributes} \DescribeMacro{\languageattribute} @@ -2284,6 +2314,90 @@ options. For example, \textsf{french} uses |\frenchsetup|, |spanish| have no attribute counterparts. Macros settting options are also used (eg, |\ProsodicMarksOn| in \textsf{latin}). +\subsection{Hooks} + +\New{3.9a} A hook is a piece of code to be executed at certain +events. Some hooks are predefined when \luatex{} and \xetex{} are +used. + +\Describe\AddBabelHook{\marg{name}\marg{event}\marg{code}} + +The same name can be applied to several events. Hooks may be enabled +and disabled for all defined events with +|\EnableBabelHook|\marg{name}, |\DisableBabelHook|\marg{name}. Names +containing the string |babel| are reserved (they are used, for +example, by |\useshortands*| to add a hook for the event +|afterextras|). + +Current events are the following; in some of them you can use one to +three \TeX{} parameters (|#1|, |#2|, |#3|), with the meaning given: +\begin{description} +\renewcommand\makelabel[1]{% + \hspace\labelsep\normalfont\ttfamily\color{thered}#1} +\itemsep=-\parskip +\item[adddialect] (language name, dialect name) Used by + \file{luababel.def} to load the patterns if not preloaded. +\item[patterns] (language name, language with encoding) Executed just + after the |\language| has been set. The second argument has the + patterns name actually selected (in the form of either |lang:ENC| or + |lang|). +\item[hyphenation] (language name, language with encoding) Executed + locally just before exceptions given in |\babelhyphenation| are + actually set. +\item[defaultcommands] Used (locally) in |\StartBabelCommands|. +\item[encodedcommands] (input, font encodings) Used (locally) in + |\StartBabelCommands|. Both \xetex{} and \luatex{} make sure the + encoded text is read correctly. +\item[stopcommands] Used to reset the the above, if necessary. +\item[write] This event comes just after the switching commands are + written to the |aux| file. +\item[beforeextras] Just before executing |\extras|\m{language}. This + event and the next one should not contain language-dependent code + (for that, add it to |\extras|\m{language}). +\item[afterextras] Just after executing |\extras|\m{language}. For + example, the following deactivates shorthands in all languages: +\begin{verbatim} +\AddBabelHook{noshort}{afterextras}{\languageshorthands{none}} +\end{verbatim} +\item[stringprocess] Instead of a parameter, you can manipulate the + macro |\BabelString| containing the string to be defined with + |\SetString|. For example, to use an expanded version of the string + in the definition, write: +\begin{verbatim} +\AddBabelHook{myhook}{stringprocess}{% + \protected@edef\BabelString{\BabelString}} +\end{verbatim} +\item[initiateactive] (char as active, char as other, original char) + \New{3.9i} Executed just after a shorthand has been `initiated'. The three + parameters are the same character with different catcodes: active, + other (|\string|'ed) and the original one. +\item[afterreset] \New{3.9i} Executed when selecting a language just after + |\originalTeX| is run and reset to its base value, before executing + |\captions|\m{language} and |\date|\m{language}. +\end{description} + +Four events are used in \file{hyphen.cfg}, which are handled in a +quite different way for efficiency reasons -- unlike the precedent +ones, they only have a single hook and replace a default definition. +\begin{description} +\renewcommand\makelabel[1]{% + \hspace\labelsep\normalfont\ttfamily\color{thered}#1} +\itemsep=-\parskip +\item[everylanguage] (language) Executed before every language patterns are loaded. +\item[loadkernel] (file) By default loads |switch.def|. It can be used + to load a different version of this files or to load nothing. +\item[loadpatterns] (patterns file) Loads the patterns file. Used by + \file{luababel.def}. +\item[loadexceptions] (exceptions file) Loads the exceptions + file. Used by \file{luababel.def}. +\end{description} + +\Describe\BabelContentsFiles{} +\New{3.9a} This macro contains a list of ``toc'' types +requiring a command to switch the language. Its default value is +|toc,lof,lot|, but you may redefine it with |\renewcommand| (it's up +to you to make sure no toc type is duplicated). + \subsection{Languages supported by \babel} In the following table most of the languages supported by \babel\ are @@ -2708,6 +2822,40 @@ provide a standalone document suited for your needs, as well as other files you think can be useful. A PDF and a ``readme'' are strongly recommended. +\subsection{Guidelines for contributed languages} +\label{contribute} + +Now language files are “outsourced” and are located in a separate +directory (\texttt{/macros/latex/contrib/babel-contrib}), so that they +are contributed directly to CTAN (please, do not send to me language +styles just to upload them to CTAN). + +Of course, placing your style files in this directory is not mandatory, +but if you want to do it, here are a few guidelines. + +\begin{itemize} +\item Do not hesitate stating on the file heads you are the author and the + maintainer, if you actually are. There is no need to state the babel + maintainer(s) as authors if they have not contributed significantly + to your language files. +\item Fonts are not strictly part of a language, so they are best placed + in the corresponding TeX tree. This includes not only \texttt{tfm}, \texttt{vf}, \texttt{ps1}, + \texttt{otf}, \texttt{mf} files and the like, but also \texttt{fd} ones. +\item Font and input encodings are usually best placed in the + corresponding tree, too, but sometimes they belong more naturally to + the babel style. Note you may also need to define a LICR. +\item \Babel{} ldf files may just interface a framework, as it happens often + with Oriental languages/scripts. This framework is best placed in its + own directory. +\end{itemize} + +The following page provides a starting point: +\texttt{http://www.texnia.com/incubator.html}. + +If your need further assistance and technical advice in the +development of language styles, I am willing to help you. And of +course, you can make any suggestion you like. + \subsection{Basic macros} In the core of the \babel{} system, several macros are defined for use @@ -3175,7 +3323,7 @@ optional one. This command, unlike |\SetString|, is executed always only. For example, as |T1| is the default case mapping in \LaTeX, we could -set for Turkish: % :-( Seem to be a bug in listings. Fixed with &&. +set for Turkish: \begin{verbatim} \StartBabelCommands{turkish}{}[ot1enc, fontenc=OT1] \SetCase @@ -3419,8 +3567,8 @@ help from Bernd Raichle, for which I am grateful. % little bit of literate programming. % % \begin{macrocode} -%<<version=3.15>> -%<<date=2017/11/03>> +%<<version=3.16>> +%<<date=2018/01/04>> % \end{macrocode} % % \section{Tools} @@ -3875,23 +4023,25 @@ help from Bernd Raichle, for which I am grateful. \fi}% \bbl@languages \fi -\@ifpackagewith{babel}{bidi=basic-r}{% must go before any \DeclareOption - \let\bbl@beforeforeign\leavevmode - \AtEndOfPackage{\EnableBabelHook{babel-bidi}}% - \RequirePackage{luatexbase}% - \directlua{ - require('babel-bidi.lua') - require('babel-bidi-basic-r.lua') - luatexbase.add_to_callback('pre_linebreak_filter', - Babel.pre_otfload, - 'Babel.pre_otfload', - luatexbase.priority_in_callback('pre_linebreak_filter', - 'luaotfload.node_processor') or nil) - luatexbase.add_to_callback('hpack_filter', - Babel.pre_otfload, - 'Babel.pre_otfload', - luatexbase.priority_in_callback('hpack_filter', - 'luaotfload.node_processor') or nil)}}{} +\ifodd\bbl@engine + \@ifpackagewith{babel}{bidi=basic-r}{% must go before any \DeclareOption + \let\bbl@beforeforeign\leavevmode + \AtEndOfPackage{\EnableBabelHook{babel-bidi}}% + \RequirePackage{luatexbase}% + \directlua{ + require('babel-bidi.lua') + require('babel-bidi-basic-r.lua') + luatexbase.add_to_callback('pre_linebreak_filter', + Babel.pre_otfload, + 'Babel.pre_otfload', + luatexbase.priority_in_callback('pre_linebreak_filter', + 'luaotfload.node_processor') or nil) + luatexbase.add_to_callback('hpack_filter', + Babel.pre_otfload, + 'Babel.pre_otfload', + luatexbase.priority_in_callback('hpack_filter', + 'luaotfload.node_processor') or nil)}}{} +\fi % \end{macrocode} % % Now the \texttt{base} option. With it we can define (and load, with @@ -3922,7 +4072,7 @@ help from Bernd Raichle, for which I am grateful. % and assigned to |\BabelModifiers| at |\bbl@load@language|; when % no modifiers have been given, the former is |\relax|. How % modifiers are handled are left to language styles; they can use -% |\in@|, loop them with |\@for| or load |keyval|, for example). +% |\in@|, loop them with |\@for| or load |keyval|, for example. % % \changes{babel~3.9e}{2013/04/15}{Bug fixed - a dot was added in % key=value pairs} @@ -3947,11 +4097,11 @@ help from Bernd Raichle, for which I am grateful. \expandafter\let\csname opt@babel.sty\endcsname\bbl@tempc % \end{macrocode} % -% The next option tells \babel\ to leave shorthand characters -% active at the end of processing the package. This is \emph{not} -% the default as it can cause problems with other packages, but for -% those who want to use the shorthand characters in the preamble of -% their documents this can help. +% The next option tells \babel\ to leave shorthand characters active +% at the end of processing the package. This is \emph{not} the default +% as it can cause problems with other packages, but for those who want +% to use the shorthand characters in the preamble of their documents +% this can help. % % \changes{babel~3.9a}{2012/08/14}{Implemented the \texttt{noconfigs} % option} @@ -3987,6 +4137,7 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@opt@config\@nnil \let\bbl@opt@main\@nnil \let\bbl@opt@headfoot\@nnil +\let\bbl@opt@layout\@nnil % \end{macrocode} % % The following tool is defined temporarily to store the values of @@ -4001,15 +4152,15 @@ help from Bernd Raichle, for which I am grateful. Bad option `#1=#2'. Either you have misspelled the\\% key or there is a previous setting of `#1'}{% Valid keys are `shorthands', `config', `strings', `main',\\% - `headfoot', `safe', `math'} + `headfoot', `safe', `math', among others.} \fi} % \end{macrocode} % -% Now the option list is processed, taking into account only -% currently declared options (including those declared with a |=|), -% and |<key>=<value>| options (the former take precedence). -% Unrecognized options are saved in |\bbl@language@opts|, because -% they are language options. +% Now the option list is processed, taking into account only currently +% declared options (including those declared with a |=|), and +% |<key>=<value>| options (the former take precedence). Unrecognized +% options are saved in |\bbl@language@opts|, because they are language +% options. % % \begin{macrocode} \let\bbl@language@opts\@empty @@ -4120,6 +4271,26 @@ help from Bernd Raichle, for which I am grateful. \fi % \end{macrocode} % +% For |layout| an auxiliary macro is provided, available for packages +% and language styles. +% +% \changes{babel~3.16}{2018/01/02}{Added the basic layout stuff and the +% macro \cs{IfBabelLayout}} +% +% \begin{macrocode} +\ifx\bbl@opt@layout\@nnil + \newcommand\IfBabelLayout[3]{#3}% +\else + \newcommand\IfBabelLayout[1]{% + \@expandtwoargs\in@{.#1.}{.\bbl@opt@layout.}% + \ifin@ + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\fi +% \end{macrocode} +% % \subsection{Language options} % % \changes{babel~3.9a}{2012/06/15}{Rewritten the loading mechanism, so @@ -4816,11 +4987,13 @@ help from Bernd Raichle, for which I am grateful. % \end{macrocode} % % We also have to make sure that some code gets executed at the -% beginning of the document. +% beginning of the document. Languages does not set |\pagedir|, so +% we set here for the whole document to the main |\bodydir|. % % \begin{macrocode} \AtBeginDocument{% - \expandafter\selectlanguage\expandafter{\bbl@main@language}} + \expandafter\selectlanguage\expandafter{\bbl@main@language}% + \ifcase\bbl@engine\or\pagedir\bodydir\fi} % TODO - a better place % \end{macrocode} % % \end{macro} @@ -6879,6 +7052,12 @@ help from Bernd Raichle, for which I am grateful. % % Shorthands are provided for a number of different quotation % marks, which make them usable both outside and inside mathmode. +% They are defined with |\ProvideTextCommandDefault|, but this is +% very likely not required because their definitions are based on +% encoding dependent macros. +% +% \changes{babel~3.16}{2018/01/02}{Adapted to TU and refactored - +% redundant code.} % % \begin{macro}{\glq} % \begin{macro}{\grq} @@ -6889,11 +7068,8 @@ help from Bernd Raichle, for which I am grateful. % The `german' single quotes. % % \begin{macrocode} -\ProvideTextCommand{\glq}{OT1}{% +\ProvideTextCommandDefault{\glq}{% \textormath{\quotesinglbase}{\mbox{\quotesinglbase}}} -\ProvideTextCommand{\glq}{T1}{% - \textormath{\quotesinglbase}{\mbox{\quotesinglbase}}} -\ProvideTextCommandDefault{\glq}{\UseTextSymbol{OT1}\glq} % \end{macrocode} % % The definition of |\grq| depends on the fontencoding. With @@ -6902,10 +7078,12 @@ help from Bernd Raichle, for which I am grateful. % \begin{macrocode} \ProvideTextCommand{\grq}{T1}{% \textormath{\textquoteleft}{\mbox{\textquoteleft}}} +\ProvideTextCommand{\grq}{TU}{% + \textormath{\textquoteleft}{\mbox{\textquoteleft}}} \ProvideTextCommand{\grq}{OT1}{% - \save@sf@q{\kern-.0125em% - \textormath{\textquoteleft}{\mbox{\textquoteleft}}% - \kern.07em\relax}} + \save@sf@q{\kern-.0125em + \textormath{\textquoteleft}{\mbox{\textquoteleft}}% + \kern.07em\relax}} \ProvideTextCommandDefault{\grq}{\UseTextSymbol{OT1}\grq} % \end{macrocode} % @@ -6921,23 +7099,22 @@ help from Bernd Raichle, for which I am grateful. % The `german' double quotes. % % \begin{macrocode} -\ProvideTextCommand{\glqq}{OT1}{% +\ProvideTextCommandDefault{\glqq}{% \textormath{\quotedblbase}{\mbox{\quotedblbase}}} -\ProvideTextCommand{\glqq}{T1}{% - \textormath{\quotedblbase}{\mbox{\quotedblbase}}} -\ProvideTextCommandDefault{\glqq}{\UseTextSymbol{OT1}\glqq} % \end{macrocode} % -% The definition of |\grqq| depends on the % fontencoding. With +% The definition of |\grqq| depends on the fontencoding. With % \texttt{T1} encoding no extra kerning is needed. % % \begin{macrocode} \ProvideTextCommand{\grqq}{T1}{% \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\ProvideTextCommand{\grqq}{TU}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} \ProvideTextCommand{\grqq}{OT1}{% - \save@sf@q{\kern-.07em% - \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}% - \kern.07em\relax}} + \save@sf@q{\kern-.07em + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}% + \kern.07em\relax}} \ProvideTextCommandDefault{\grqq}{\UseTextSymbol{OT1}\grqq} % \end{macrocode} % @@ -6953,19 +7130,10 @@ help from Bernd Raichle, for which I am grateful. % The `french' single guillemets. % % \begin{macrocode} -\ProvideTextCommand{\flq}{OT1}{% +\ProvideTextCommandDefault{\flq}{% \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}} -\ProvideTextCommand{\flq}{T1}{% - \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}} -\ProvideTextCommandDefault{\flq}{\UseTextSymbol{OT1}\flq} -% \end{macrocode} -% -% \begin{macrocode} -\ProvideTextCommand{\frq}{OT1}{% +\ProvideTextCommandDefault{\frq}{% \textormath{\guilsinglright}{\mbox{\guilsinglright}}} -\ProvideTextCommand{\frq}{T1}{% - \textormath{\guilsinglright}{\mbox{\guilsinglright}}} -\ProvideTextCommandDefault{\frq}{\UseTextSymbol{OT1}\frq} % \end{macrocode} % % \end{macro} @@ -6980,19 +7148,10 @@ help from Bernd Raichle, for which I am grateful. % The `french' double guillemets. % % \begin{macrocode} -\ProvideTextCommand{\flqq}{OT1}{% - \textormath{\guillemotleft}{\mbox{\guillemotleft}}} -\ProvideTextCommand{\flqq}{T1}{% +\ProvideTextCommandDefault{\flqq}{% \textormath{\guillemotleft}{\mbox{\guillemotleft}}} -\ProvideTextCommandDefault{\flqq}{\UseTextSymbol{OT1}\flqq} -% \end{macrocode} -% -% \begin{macrocode} -\ProvideTextCommand{\frqq}{OT1}{% - \textormath{\guillemotright}{\mbox{\guillemotright}}} -\ProvideTextCommand{\frqq}{T1}{% +\ProvideTextCommandDefault{\frqq}{% \textormath{\guillemotright}{\mbox{\guillemotright}}} -\ProvideTextCommandDefault{\frqq}{\UseTextSymbol{OT1}\frqq} % \end{macrocode} % % \end{macro} @@ -7119,10 +7278,52 @@ help from Bernd Raichle, for which I am grateful. \main@language{english} % \end{macrocode} % +% \subsection{Layout} +% +% \textbf{Work in progress}. +% +% Layout is mainly intended to set bidi documents, but there is at +% least a tool useful in general. +% +% \begin{macrocode} +\providecommand\IfBabelLayout[3]{#3}% +\newcommand\BabelPatchSection[1]{% + \@ifundefined{#1}{}{% + \bbl@exp{\let\<bbl@ss@#1>\<#1>}% + \@namedef{#1}{% + \@ifstar{\bbl@presec@s{#1}}% + {\@dblarg{\bbl@presec@x{#1}}}}}} +\def\bbl@presec@x#1[#2]#3{% + \bbl@exp{% + \\\select@language@x{\bbl@main@language}% + \\\@nameuse{bbl@ss@#1}% + [\\\foreignlanguage{\languagename}{\unexpanded{#2}}]% + {\\\foreignlanguage{\languagename}{\unexpanded{#3}}}% + \\\select@language@x{\languagename}}} +\def\bbl@presec@s#1#2{% + \bbl@exp{% + \\\select@language@x{\bbl@main@language}% + \\\@nameuse{bbl@ss@#1}*% + {\\\foreignlanguage{\languagename}{\unexpanded{#2}}}% + \\\select@language@x{\languagename}}} +\IfBabelLayout{sectioning}% at begin document ??? + {\BabelPatchSection{part}% + \BabelPatchSection{chapter}% + \BabelPatchSection{section}% + \BabelPatchSection{subsection}% + \BabelPatchSection{subsubsection}% + \BabelPatchSection{paragraph}% + \BabelPatchSection{subparagraph}% + \def\babel@toc#1{% + \select@language@x{\bbl@main@language}}}{} +% \end{macrocode} +% % Now we load definition files for engines. % % \begin{macrocode} -\ifcase\bbl@engine\or +\ifcase\bbl@engine + \input txtbabel.def +\or \input luababel.def \or \input xebabel.def @@ -7168,6 +7369,8 @@ help from Bernd Raichle, for which I am grateful. % \changes{3.13}{2017/08/30}{Added \cs{import}, which also reads % dates. Some refactoring in the ini reader.} % \changes{3.15}{2017/10/30}{New keys script, language} +% \changes{3.16}{2018/01/02}{Make sure ensuring works even before +% the language is selected} % % % \begin{macrocode} @@ -7196,6 +7399,12 @@ help from Bernd Raichle, for which I am grateful. {Use this macro as documented}}% {\bbl@provide@renew{#2}}}% \bbl@exp{\\\babelensure[exclude=\\\today]{#2}}% + \bbl@ifunset{bbl@ensure@\languagename}% + {\bbl@exp{% + \\\DeclareRobustCommand\<bbl@ensure@\languagename>[1]{% + \\\foreignlanguage{\languagename}% + {####1}}}}% + {}% \ifx\bbl@KVP@script\@nil\else \bbl@csarg\edef{sname@#2}{\bbl@KVP@script}% \fi @@ -7317,10 +7526,10 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@inireader\bbl@iniskip \bbl@info{Importing data from babel-#1.ini for \languagename}% \loop + \if T\ifeof1F\fi T\relax % Trick, because inside \loop \endlinechar\m@ne \read1 to \bbl@line \endlinechar`\^^M - \if T\ifeof1F\fi T\relax % Trick, because inside \loop \ifx\bbl@line\@empty\else \expandafter\bbl@iniline\bbl@line\bbl@iniline \fi @@ -7434,6 +7643,8 @@ help from Bernd Raichle, for which I am grateful. % % But dates are more complex. The full date format is stores in % |date.gregorian|, so we must read it in non-Unicode engines, too. +% +% \changes{3.16}{2018/01/02}{Fix - dates were severely broken.} % % \begin{macrocode} \bbl@csarg\def{secpre@date.gregorian.licr}{% @@ -7451,12 +7662,14 @@ help from Bernd Raichle, for which I am grateful. \bbl@TG@@date \global\bbl@csarg\let{date@\languagename}\bbl@toreplace \bbl@exp{% - \gdef\<\languagename date>####1####2####3{% + \gdef\<\languagename date>{\\\protect\<\languagename date >}% + \gdef\<\languagename date >####1####2####3{% + \\\bbl@usedategrouptrue \<bbl@ensure@\languagename>{% \<bbl@date@\languagename>{####1}{####2}{####3}}}% \\\bbl@add\\\bbl@savetoday{% \\\SetString\\\today{% - \<\languagename date>{\year}{\month}{\day}}}}}}% + \<\languagename date>{\\\the\year}{\\\the\month}{\\\the\day}}}}}}% {}} % \end{macrocode} % @@ -7466,14 +7679,14 @@ help from Bernd Raichle, for which I am grateful. % inconsistenly in either in the date or in the month name. % % \begin{macrocode} -\newcommand\BabelDateSpace{\nobreakspace{}} +\newcommand\BabelDateSpace{\nobreakspace} \newcommand\BabelDateDot{.\@} \newcommand\BabelDated[1]{{\number#1}} \newcommand\BabelDatedd[1]{{\ifnum#1<10 0\fi\number#1}} \newcommand\BabelDateM[1]{{\number#1}} \newcommand\BabelDateMM[1]{{\ifnum#1<10 0\fi\number#1}} \newcommand\BabelDateMMMM[1]{{% - \csname month\romannumeral\month name\endcsname}}% + \csname month\romannumeral#1name\endcsname}}% \newcommand\BabelDatey[1]{{\number#1}}% \newcommand\BabelDateyy[1]{{% \ifnum#1<10 0\number#1 % @@ -7505,6 +7718,49 @@ help from Bernd Raichle, for which I am grateful. \bbl@replace@finish@iii\bbl@toreplace} % \end{macrocode} % +% Language and Script values to be used when defining a font or +% setting the direction are set with the following macros. +% +% \begin{macrocode} +\def\bbl@provide@lsys#1{% + \bbl@ifunset{bbl@lname@#1}% + {\bbl@ini@ids{#1}}% + {}% + \bbl@csarg\let{lsys@#1}\@empty + \bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}% + \bbl@ifunset{bbl@sotf#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% + \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% + \bbl@ifunset{bbl@lname@#1}{}% + {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% + \bbl@csarg\bbl@toglobal{lsys@#1}}% + % \bbl@exp{% TODO - should be global + % \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl@cs{sname@#1}}% + % {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% + % \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl@cs{lname@#1}}% + % {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} +% \end{macrocode} +% +% The following |ini| reader ignores everything but the +% |identification| section. It is called when a font is defined (ie, +% when the language is first selected) to know which script/language +% must be enabled. This means we must make sure a few characters are +% not active. The |ini| is not read directly, but with a proxy |tex| +% file named as the language. +% +% \changes{3.16}{2018/01/02}{Load ids inside a box, to prevent extra +% spaces.} +% +% \begin{macrocode} +\def\bbl@ini@ids#1{% + \def\BabelBeforeIni##1##2{% + \begingroup + \bbl@add\bbl@secpost@identification{\closein1 }% + \catcode`\[=12 \catcode`\]=12 \catcode`\==12 + \bbl@read@ini{##1}% + \endgroup}% boxed, to avoid extra spaces: + {\setbox\z@\hbox{\InputIfFileExists{babel-#1.tex}{}{}}}} +% \end{macrocode} +% % \subsection{Cross referencing macros} % % The \LaTeX\ book states: @@ -7860,13 +8116,20 @@ help from Bernd Raichle, for which I am grateful. % \cs{@safe@activestrue} is in effect. % % \begin{macrocode} -\bbl@redefine\markright#1{% - \bbl@ifblank{#1}% - {\org@markright{}}% - {\toks@{#1}% - \bbl@exp{% - \\\org@markright{\\\protect\\\foreignlanguage{\languagename}% - {\\\protect\\\bbl@restore@actives\the\toks@}}}}} +\IfBabelLayout{sectioning} + {\ifx\bbl@opt@headfoot\@nnil + \g@addto@macro\@resetactivechars{% + \set@typeset@protect + \expandafter\select@language@x\expandafter{\bbl@main@language}% + \let\protect\noexpand}% + \fi} + {\bbl@redefine\markright#1{% + \bbl@ifblank{#1}% + {\org@markright{}}% + {\toks@{#1}% + \bbl@exp{% + \\\org@markright{\\\protect\\\foreignlanguage{\languagename}% + {\\\protect\\\bbl@restore@actives\the\toks@}}}}} % \end{macrocode} % % \end{macro} @@ -7891,32 +8154,32 @@ help from Bernd Raichle, for which I am grateful. % 3826)} % % \begin{macrocode} -\ifx\@mkboth\markboth - \def\bbl@tempc{\let\@mkboth\markboth} -\else - \def\bbl@tempc{} -\fi + \ifx\@mkboth\markboth + \def\bbl@tempc{\let\@mkboth\markboth} + \else + \def\bbl@tempc{} + \fi % \end{macrocode} % % Now we can start the new definition of |\markboth| % % \begin{macrocode} -\bbl@redefine\markboth#1#2{% - \protected@edef\bbl@tempb##1{% - \protect\foreignlanguage{\languagename}{\protect\bbl@restore@actives##1}}% - \bbl@ifblank{#1}% - {\toks@{}}% - {\toks@\expandafter{\bbl@tempb{#1}}}% - \bbl@ifblank{#2}% - {\@temptokena{}}% - {\@temptokena\expandafter{\bbl@tempb{#2}}}% - \bbl@exp{\\\org@markboth{\the\toks@}{\the\@temptokena}}} + \bbl@redefine\markboth#1#2{% + \protected@edef\bbl@tempb##1{% + \protect\foreignlanguage{\languagename}{\protect\bbl@restore@actives##1}}% + \bbl@ifblank{#1}% + {\toks@{}}% + {\toks@\expandafter{\bbl@tempb{#1}}}% + \bbl@ifblank{#2}% + {\@temptokena{}}% + {\@temptokena\expandafter{\bbl@tempb{#2}}}% + \bbl@exp{\\\org@markboth{\the\toks@}{\the\@temptokena}}} % \end{macrocode} % % and copy it to |\@mkboth| if necessary. % % \begin{macrocode} -\bbl@tempc + \bbl@tempc} % end \IfBabelLayout % \end{macrocode} % % \end{macro} @@ -8322,15 +8585,15 @@ help from Bernd Raichle, for which I am grateful. % set left-to-right and right-to-left page layouts. As Lua\TeX-ja % shows, vertical typesetting is posible, too. Its main drawback % is font handling is often considered to be less mature than -% \xetex.\footnote{Although in my [JBL] experience problems are -% in fact minimal.} +% \xetex{}, mainly in Indic scripts (but there are steps to make +% HarfBuzz, the \xetex{} font engine, available in \luatex{}; see +% <https://github.com/tatzetwerk/luatex-harfbuzz>). % \end{itemize} % % \changes{3.15}{2017/10/30}{Use an attribute instead of tex language % (reserved for hyphenation).} % \changes{3.15}{2017/10/30}{Store direction in @wdir@<lang>.} % -% % \begin{macrocode} \def\bbl@alscripts{,Arabic,Syriac,Thaana,} \def\bbl@rscripts{% @@ -8352,17 +8615,16 @@ help from Bernd Raichle, for which I am grateful. \global\bbl@csarg\chardef{wdir@#1}\z@ \fi} \def\bbl@switchdir{% + \bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}% \bbl@ifunset{bbl@wdir@\languagename}{\bbl@provide@dirs{\languagename}}{}% \bbl@exp{\\\bbl@setdirs\bbl@cs{wdir@\languagename}}} \def\bbl@setdirs#1{% TODO - math \ifcase\bbl@select@type % TODO - strictly, not the right test - \bbl@pagedir{#1}% \bbl@bodydir{#1}% \bbl@pardir{#1}% \fi \bbl@textdir{#1}} -\ifcase\bbl@engine -\or +\ifodd\bbl@engine % luatex=1 \AddBabelHook{babel-bidi}{afterextras}{\bbl@switchdir} \DisableBabelHook{babel-bidi} \def\bbl@getluadir#1{% @@ -8389,7 +8651,7 @@ help from Bernd Raichle, for which I am grateful. \def\bbl@bodydir{\bbl@setdir{body}\bodydir} \def\bbl@pagedir{\bbl@setdir{page}\pagedir} \def\bbl@dirparastext{\pardir\the\textdir\relax}% %%%% -\or +\else % pdftex=0, xetex=2 \AddBabelHook{babel-bidi}{afterextras}{\bbl@switchdir} \DisableBabelHook{babel-bidi} \newcount\bbl@dirlevel @@ -8440,23 +8702,35 @@ help from Bernd Raichle, for which I am grateful. % The following command is executed only if there is a right-to-left % script (once). It activates the |\everypar| hack for \xetex, to % properly handle the par direction. Note text and par dirs are -% decoupled. +% decoupled to some extent (although not completely). +% +% \changes{3.16}{2018/01/02}{Fix - the direction prevented the removal +% of the indent to be re-placed} % % \begin{macrocode} \def\bbl@xebidipar{% \let\bbl@xebidipar\relax \TeXXeTstate\@ne \def\bbl@xeeverypar{% - \ifcase\bbl@thepardir\else - {\setbox\z@\lastbox\beginR\box\z@}% - \fi - \ifcase\bbl@thetextdir\else\beginR\fi}% + \ifcase\bbl@thepardir + \ifcase\bbl@thetextdir\else\beginR\fi + \else + {\setbox\z@\lastbox\beginR\box\z@}% + \fi}% \let\bbl@severypar\everypar \newtoks\everypar \everypar=\bbl@severypar \bbl@severypar{\bbl@xeeverypar\the\everypar}} \fi % \end{macrocode} +% +% A tool for weak L (mainly digits). +% +% \changes{3.16}{2018/01/02}{New macro \cs{babelsublr}} +% +% \begin{macrocode} +\DeclareRobustCommand\babelsublr[1]{\leavevmode{\bbl@textdir\z@#1}} +% \end{macrocode} % % \subsection{Local Language Configuration} % @@ -8766,6 +9040,8 @@ help from Bernd Raichle, for which I am grateful. % \changes{babel~3.9a}{2013/03/08}{Don't write to aux if language is % unknown} % \changes{babel~3.9h}{2013/11/20}{Error with a more helpful text } +% \changes{babel~3.16}{2018/01/02}{New mechanism to pass the language +% to aux, toc, etc.} % % \begin{macrocode} \def\BabelContentsFiles{toc,lof,lot} @@ -8776,9 +9052,7 @@ help from Bernd Raichle, for which I am grateful. \select@language{\languagename}% \expandafter\ifx\csname date\languagename\endcsname\relax\else \if@filesw - \protected@write\@auxout{}{\string\select@language{\languagename}}% - \bbl@foreach\BabelContentsFiles{% - \addtocontents{##1}{\xstring\select@language{\languagename}}}% + \protected@write\@auxout{}{\string\babel@aux{\languagename}{}}% \bbl@usehooks{write}{}% \fi \fi} @@ -8798,6 +9072,12 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@select@type\z@ \expandafter\bbl@switch\expandafter{\languagename}% \fi}} +\def\babel@aux#1#2{% + \select@language{#1}% + \bbl@foreach\BabelContentsFiles{% + \@writefile{##1}{\babel@toc{#1}{#2}}}} %% TODO - ok in plain? +\def\babel@toc#1#2{% + \select@language{#1}} % \end{macrocode} % % A bit of optimization. Select in heads/foots the language only if @@ -8857,6 +9137,7 @@ help from Bernd Raichle, for which I am grateful. % \changes{3.15}{2017/10/30}{Remove spaces inside captions and date.} % % \begin{macrocode} +\newif\ifbbl@usedategroup \def\bbl@switch#1{% \originalTeX \expandafter\def\expandafter\originalTeX\expandafter{% @@ -8875,7 +9156,16 @@ help from Bernd Raichle, for which I am grateful. \csname captions#1\endcsname\relax \csname date#1\endcsname\relax \fi - \fi + \else\ifbbl@usedategroup + \bbl@usedategroupfalse + \ifhmode + \hskip\z@skip % trick to ignore spaces + \csname date#1\endcsname\relax + \loop\ifdim\lastskip>\z@\unskip\repeat\unskip + \else + \csname date#1\endcsname\relax + \fi + \fi\fi \bbl@usehooks{beforeextras}{}% \csname extras#1\endcsname\relax \bbl@usehooks{afterextras}{}% @@ -9803,18 +10093,33 @@ help from Bernd Raichle, for which I am grateful. % % \begin{macrocode} %<<*More package options>> -\DeclareOption{bidi=basic-r}% - {\newattribute\bbl@attr@dir - \let\bbl@beforeforeign\leavevmode - \AtEndOfPackage{\EnableBabelHook{babel-bidi}}} +\ifodd\bbl@engine + \DeclareOption{bidi=basic-r}% + {\let\bbl@beforeforeign\leavevmode + \newattribute\bbl@attr@dir + \bbl@exp{\output{\bodydir\pagedir\the\output}}% + \AtEndOfPackage{\EnableBabelHook{babel-bidi}}} +\else + \DeclareOption{bidi=basic-r}% + {\bbl@error + {The bidi method `basic-r' is available only in\\% + luatex. I'll continue with `bidi=default', so\\% + expect wrong results}% + {See the manual for further details.}% + \let\bbl@beforeforeign\leavevmode + \AtEndOfPackage{% + \EnableBabelHook{babel-bidi}% + \bbl@xebidipar}} +\fi \DeclareOption{bidi=default}% {\let\bbl@beforeforeign\leavevmode - \ifcase\bbl@engine\or + \ifodd\bbl@engine \newattribute\bbl@attr@dir + \bbl@exp{\output{\bodydir\pagedir\the\output}}% \fi \AtEndOfPackage{% \EnableBabelHook{babel-bidi}% - \ifcase\bbl@engine\or\or + \ifodd\bbl@engine\else \bbl@xebidipar \fi}} %<</More package options>> @@ -9919,47 +10224,6 @@ help from Bernd Raichle, for which I am grateful. \bbl@toglobal#1}% % \end{macrocode} % -% Language and Script values to be used when defining a font are set -% with the following macros. -% -% \begin{macrocode} -\def\bbl@provide@lsys#1{% - \bbl@ifunset{bbl@lname@#1}% - {\bbl@ini@ids{#1}}% - {}% - \bbl@csarg\let{lsys@#1}\@empty - \bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}% - \bbl@ifunset{bbl@sotf#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% - \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% - \bbl@ifunset{bbl@lname@#1}{}% - {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% - \bbl@csarg\bbl@toglobal{lsys@#1}}% - % \bbl@exp{% TODO - should be global - % \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl@cs{sname@#1}}% - % {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% - % \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl@cs{lname@#1}}% - % {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} -% \end{macrocode} -% -% The following |ini| reader ignores everything but the -% |identification| section. It is called when a font is defined (ie, -% when the language is first selected) to know which script/language -% must be enabled. This means we must make sure a few characters are -% not active. The |ini| is not read directly, but with a proxy |tex| -% file named as the language. -% -% \begin{macrocode} -\def\bbl@ini@ids#1{% - \def\BabelBeforeIni##1##2{% - \begingroup - \bbl@add\bbl@secpost@identification{% - \def\bbl@iniline########1\bbl@iniline{}}% - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \bbl@read@ini{##1}% - \endgroup} - \InputIfFileExists{babel-#1.tex}{}{}} -% \end{macrocode} -% % font@rst and famrst are only used when there is no global settings, % to save and restore de previous families. Not really necessary, but % done for optimization. @@ -10101,9 +10365,168 @@ help from Bernd Raichle, for which I am grateful. \AddBabelHook{babel-fontspec}{afterextras}{\bbl@switchfont} \DisableBabelHook{babel-fontspec} <@Font selection@> +\input txtbabel.def %</xetex> % \end{macrocode} % +% \subsection{Layout} +% +% \changes{babel~3.16}{2018/01/02}{Option layout - first available options: +% sectioning, counters, lists, columns, contents} +% +% In progress. +% +% Unfortunately, for proper support for \xetex{} lots of macros and +% packages must be patched somehow. At least at this stage, \babel{} +% will not do it and therefore a package similar to \textsf{bidi} will +% be required. Any help in making \babel{} and \textsf{bidi} +% collaborate will be welcome. Note as well, elements like headlines +% and margins can be modified easily with packages like +% \textsf{fancyhdr}, \textsf{typearea} or \textsf{titleps}, and +% \textsf{geometry}. +% +% |\bbl@startskip| and |\bbl@endskip| are available to package +% authors. Thanks to the \TeX{} expansion mechanism the following +% constructs are valid: |\adim\bbl@startskip|, +% |\advance\bbl@startskip\adim|, |\bbl@startskip\adim|. +% +% Consider |txtbabel| as a shorthand for \textit{tex--xet babel}, +% which the bidi model in both \pdftex{} and \xetex{}. +% +% \begin{macrocode} +%<*texxet> +\ifx\bbl@opt@layout\@nnil\endinput\fi % No layout +\def\bbl@startskip{\ifcase\bbl@thepardir\leftskip\else\rightskip\fi} +\def\bbl@endskip{\ifcase\bbl@thepardir\rightskip\else\leftskip\fi} +\ifx\bbl@beforeforeign\leavevmode % A poor test for bidi= + \def\@hangfrom#1{% + \setbox\@tempboxa\hbox{{#1}}% + \hangindent\ifcase\bbl@thepardir\wd\@tempboxa\else-\wd\@tempboxa\fi + \noindent\box\@tempboxa} + \def\raggedright{% + \let\\\@centercr + \bbl@startskip\z@skip + \@rightskip\@flushglue + \bbl@endskip\@rightskip + \parindent\z@ + \parfillskip\bbl@startskip} + \def\raggedleft{% + \let\\\@centercr + \bbl@startskip\@flushglue + \bbl@endskip\z@skip + \parindent\z@ + \parfillskip\bbl@endskip} +\fi +\IfBabelLayout{lists} + {\def\list#1#2{% + \ifnum \@listdepth >5\relax + \@toodeep + \else + \global\advance\@listdepth\@ne + \fi + \rightmargin\z@ + \listparindent\z@ + \itemindent\z@ + \csname @list\romannumeral\the\@listdepth\endcsname + \def\@itemlabel{#1}% + \let\makelabel\@mklab + \@nmbrlistfalse + #2\relax + \@trivlist + \parskip\parsep + \parindent\listparindent + \advance\linewidth-\rightmargin + \advance\linewidth-\leftmargin + \advance\@totalleftmargin + \ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi + \parshape\@ne\@totalleftmargin\linewidth + \ignorespaces}% + \def\labelenumii{)\theenumii(}% + \def\p@enumiii{\p@enumii)\theenumii(}} + {} +\IfBabelLayout{contents} + {\def\@dottedtocline#1#2#3#4#5{% + \ifnum#1>\c@tocdepth\else + \vskip \z@ \@plus.2\p@ + {\bbl@startskip#2\relax + \bbl@endskip\@tocrmarg + \parfillskip-\bbl@endskip + \parindent#2\relax + \@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima#3\relax + \advance\bbl@startskip\@tempdima + \null\nobreak\hskip-\bbl@startskip + {#4}\nobreak + \leaders\hbox{% + $\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}% + \hfill\nobreak + \hb@xt@\@pnumwidth{\hfil\normalfont\normalcolor#5}% + \par}% + \fi}} + {} +\IfBabelLayout{columns} + {\def\@outputdblcol{% + \if@firstcolumn + \global\@firstcolumnfalse + \global\setbox\@leftcolumn\copy\@outputbox + \splitmaxdepth\maxdimen + \vbadness\maxdimen + \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% + \setbox\@outputbox\vsplit\@outputbox to\maxdimen + \toks@\expandafter{\topmark}% + \xdef\@firstcoltopmark{\the\toks@}% + \toks@\expandafter{\splitfirstmark}% + \xdef\@firstcolfirstmark{\the\toks@}% + \ifx\@firstcolfirstmark\@empty + \global\let\@setmarks\relax + \else + \gdef\@setmarks{% + \let\firstmark\@firstcolfirstmark + \let\topmark\@firstcoltopmark}% + \fi + \else + \global\@firstcolumntrue + \setbox\@outputbox\vbox{% + \hb@xt@\textwidth{% + \hskip\columnwidth + \hfil + {\normalcolor\vrule \@width\columnseprule}% + \hfil + \hb@xt@\columnwidth{\box\@leftcolumn \hss}% + \hskip-\textwidth + \hb@xt@\columnwidth{\box\@outputbox \hss}% + \hskip\columnsep + \hskip\columnwidth}}% + \@combinedblfloats + \@setmarks + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi{\@outputpage + \@startdblcolumn}% + \endgroup + \fi}}% + {} +% \end{macrocode} +% +% Implicitly reverses sectioning labels in bidi=basic-r, because +% the full stop is not in contact with L numbers any more. A +% think there must be a better way. +% +% \begin{macrocode} +\IfBabelLayout{counters}% Global or language dependent? At begin doc? + {\let\bbl@latinarabic=\@arabic + \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% + \let\bbl@asciiroman=\@roman + \def\@roman#1{\babelsublr{\ensureascii{\bbl@asciiroman#1}}}% + \let\bbl@asciiRoman=\@Roman + \def\@Roman#1{\babelsublr{\ensureascii{\bbl@asciiRoman#1}}}}{} +%</texxet> +% \end{macrocode} +% % \subsection{LuaTeX} % % The new loader for luatex is based solely on |language.dat|, which @@ -10473,16 +10896,93 @@ help from Bernd Raichle, for which I am grateful. \AddBabelHook{babel-fontspec}{afterextras}{\bbl@switchfont} \DisableBabelHook{babel-fontspec} <@Font selection@> +% \end{macrocode} +% +% \subsection{Layout} +% +% \textbf{Work in progress}. +% +% Unlike \xetex{}, \luatex{} requires only minimal changes for +% right-to-left layouts, particularly in monolingual documents (the +% engine itself reverses boxes -- including column order or headings +% --, margins, etc.) and with |bidi=basic-r|, without having to patch +% almost any macro where text direction is relevant. +% +% |\@hangfrom| is useful in many contexts and it is redefined always +% with the |layout| option. +% +% There are, however, a number of issues when the text direction is +% not the same as the box direction (as set by |\bodydir|), and when +% |\parbox| and |\hangindent| are involved. Fortunately, latest +% releases of \luatex{} simplify a lot the solution with |\shapemode|. +% +% \begin{macrocode} +\ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout +\ifx\bbl@beforeforeign\leavevmode % A poor test for bidi= + \def\@hangfrom#1{% + \setbox\@tempboxa\hbox{{#1}}% + \hangindent\wd\@tempboxa + \ifnum\bbl@getluadir{page}=\bbl@getluadir{par}\else + \shapemode\@ne + \fi + \noindent\box\@tempboxa} +\fi +\IfBabelLayout{lists} + {\def\list#1#2{% + \ifnum \@listdepth >5\relax + \@toodeep + \else + \global\advance\@listdepth\@ne + \fi + \rightmargin\z@ + \listparindent\z@ + \itemindent\z@ + \csname @list\romannumeral\the\@listdepth\endcsname + \def\@itemlabel{#1}% + \let\makelabel\@mklab + \@nmbrlistfalse + #2\relax + \@trivlist + \parskip\parsep + \parindent\listparindent + \advance\linewidth -\rightmargin + \advance\linewidth -\leftmargin + \advance\@totalleftmargin \leftmargin + \parshape \@ne + \@totalleftmargin \linewidth + \ifnum\bbl@getluadir{page}=\bbl@getluadir{par}\else + \shapemode\tw@ + \fi + \ignorespaces}} + {} +% \end{macrocode} +% +% Implicitly reverses sectioning labels in bidi=basic-r, because +% the full stop is not in contact with L numbers any more. I +% think there must be a better way. Assumes |bidi=basic-r|, but +% there are some additional readjustments for |bidi=default|. +% +% \begin{macrocode} +\IfBabelLayout{counters}% Global or language dependent? At begin doc? + {\let\bbl@latinarabic=\@arabic + \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% + \@ifpackagewith{babel}{bidi=default} + {\let\bbl@asciiroman=\@roman + \def\@roman#1{\babelsublr{\ensureascii{\bbl@asciiroman#1}}}% + \let\bbl@asciiRoman=\@Roman + \def\@Roman#1{\babelsublr{\ensureascii{\bbl@asciiRoman#1}}}% + \def\labelenumii{)\theenumii(}% + \def\p@enumiii{\p@enumii)\theenumii(}}}{} %</luatex> % \end{macrocode} % -% \section{Bidi support in \luatex} +% \subsection{Auto bidi with \texttt{basic-r}} % % \changes{3.14}{2017/09/30}{LuaTeX - support for R/AL texts - basic-r} % -% \textbf{Work in progress}. The file \textsf{babel-bidi.lua} -% currently only contains data. It's a large and boring file and it's -% not shown here. See the generated file. +% The file \textsf{babel-bidi.lua} currently only contains data. It is +% a large and boring file and it's not shown here. See the generated +% file. %\iffalse % \begin{macrocode} %<*bidi> @@ -16690,7 +17190,6 @@ function Babel.pre_otfload(head) attr_dir = at.value end end - texio.write_nl(attr_dir) if attr_dir == 1 then strong = 'r' elseif attr_dir == 2 then @@ -16702,6 +17201,7 @@ function Babel.pre_otfload(head) outer = strong_lr new_dir = false end + if dir == 'nsm' then dir = strong end -- W1 % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index 21148e69505..024b1b80ad8 100644 --- a/Master/texmf-dist/source/latex/babel/babel.ins +++ b/Master/texmf-dist/source/latex/babel/babel.ins @@ -26,7 +26,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %% -\def\filedate{2017/11/03} +\def\filedate{2018/01/04} \def\batchfile{babel.ins} \input docstrip.tex @@ -137,6 +137,7 @@ \file{nil.ldf}{\from{babel.dtx}{nil}} \file{xebabel.def}{\from{babel.dtx}{xetex}} \file{luababel.def}{\from{babel.dtx}{luatex}} + \file{txtbabel.def}{\from{babel.dtx}{texxet}} } % Support for plain users diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx index 55e0ae6e0e3..f5689891895 100644 --- a/Master/texmf-dist/source/latex/babel/bbcompat.dtx +++ b/Master/texmf-dist/source/latex/babel/bbcompat.dtx @@ -30,7 +30,7 @@ % % \iffalse %<*dtx> -\ProvidesFile{bbcompat.dtx}[2017/11/03 v3.15] +\ProvidesFile{bbcompat.dtx}[2018/01/04 v3.16] %</dtx> % %% File 'bbcompat.dtx' @@ -185,9 +185,8 @@ %<+estonian>\input estonian.ldf\relax %<+finnish>\def\CurrentOption{finnish} %<+finnish>\input finnish.ldf\relax -%<+francais>\def\CurrentOption{francais} -%<+french>\def\CurrentOption{french} -%<+francais|french>\input frenchb.ldf\relax +%<+francais>\def\CurrentOption{french} +%<+francais>\input french.ldf\relax %<+galician>\def\CurrentOption{galician} %<+galician>\input galician.ldf\relax %<+austrian>\def\CurrentOption{austrian} diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip Binary files differindex b1a5b9dbfe2..d558310aa68 100644 --- a/Master/texmf-dist/source/latex/babel/locale.zip +++ b/Master/texmf-dist/source/latex/babel/locale.zip diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua index fab6721456a..2970d9c016c 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua @@ -91,7 +91,6 @@ function Babel.pre_otfload(head) attr_dir = at.value end end - texio.write_nl(attr_dir) if attr_dir == 1 then strong = 'r' elseif attr_dir == 2 then @@ -103,6 +102,7 @@ function Babel.pre_otfload(head) outer = strong_lr new_dir = false end + if dir == 'nsm' then dir = strong end -- W1 dir_real = dir -- We need dir_real to set strong below if dir == 'al' then dir = 'r' end -- W3 diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index cd6e92b3584..81f324c8fba 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.def +++ b/Master/texmf-dist/tex/generic/babel/babel.def @@ -40,7 +40,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{babel.def}[2017/11/03 3.15 Babel common definitions] +\ProvidesFile{babel.def}[2018/01/04 3.16 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -358,7 +358,8 @@ \let\languagename\bbl@main@language \bbl@patterns{\languagename}} \AtBeginDocument{% - \expandafter\selectlanguage\expandafter{\bbl@main@language}} + \expandafter\selectlanguage\expandafter{\bbl@main@language}% + \ifcase\bbl@engine\or\pagedir\bodydir\fi} % TODO - a better place \def\select@language@x#1{% \ifcase\bbl@select@type \bbl@ifsamestring\languagename{#1}{}{\select@language{#1}}% @@ -1156,50 +1157,36 @@ \UseTextSymbol{OT1}{\DJ}} \DeclareTextCommand{\SS}{OT1}{SS} \ProvideTextCommandDefault{\SS}{\UseTextSymbol{OT1}{\SS}} -\ProvideTextCommand{\glq}{OT1}{% +\ProvideTextCommandDefault{\glq}{% \textormath{\quotesinglbase}{\mbox{\quotesinglbase}}} -\ProvideTextCommand{\glq}{T1}{% - \textormath{\quotesinglbase}{\mbox{\quotesinglbase}}} -\ProvideTextCommandDefault{\glq}{\UseTextSymbol{OT1}\glq} \ProvideTextCommand{\grq}{T1}{% \textormath{\textquoteleft}{\mbox{\textquoteleft}}} +\ProvideTextCommand{\grq}{TU}{% + \textormath{\textquoteleft}{\mbox{\textquoteleft}}} \ProvideTextCommand{\grq}{OT1}{% - \save@sf@q{\kern-.0125em% - \textormath{\textquoteleft}{\mbox{\textquoteleft}}% - \kern.07em\relax}} + \save@sf@q{\kern-.0125em + \textormath{\textquoteleft}{\mbox{\textquoteleft}}% + \kern.07em\relax}} \ProvideTextCommandDefault{\grq}{\UseTextSymbol{OT1}\grq} -\ProvideTextCommand{\glqq}{OT1}{% +\ProvideTextCommandDefault{\glqq}{% \textormath{\quotedblbase}{\mbox{\quotedblbase}}} -\ProvideTextCommand{\glqq}{T1}{% - \textormath{\quotedblbase}{\mbox{\quotedblbase}}} -\ProvideTextCommandDefault{\glqq}{\UseTextSymbol{OT1}\glqq} \ProvideTextCommand{\grqq}{T1}{% \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\ProvideTextCommand{\grqq}{TU}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} \ProvideTextCommand{\grqq}{OT1}{% - \save@sf@q{\kern-.07em% - \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}% - \kern.07em\relax}} + \save@sf@q{\kern-.07em + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}% + \kern.07em\relax}} \ProvideTextCommandDefault{\grqq}{\UseTextSymbol{OT1}\grqq} -\ProvideTextCommand{\flq}{OT1}{% +\ProvideTextCommandDefault{\flq}{% \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}} -\ProvideTextCommand{\flq}{T1}{% - \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}} -\ProvideTextCommandDefault{\flq}{\UseTextSymbol{OT1}\flq} -\ProvideTextCommand{\frq}{OT1}{% - \textormath{\guilsinglright}{\mbox{\guilsinglright}}} -\ProvideTextCommand{\frq}{T1}{% +\ProvideTextCommandDefault{\frq}{% \textormath{\guilsinglright}{\mbox{\guilsinglright}}} -\ProvideTextCommandDefault{\frq}{\UseTextSymbol{OT1}\frq} -\ProvideTextCommand{\flqq}{OT1}{% - \textormath{\guillemotleft}{\mbox{\guillemotleft}}} -\ProvideTextCommand{\flqq}{T1}{% +\ProvideTextCommandDefault{\flqq}{% \textormath{\guillemotleft}{\mbox{\guillemotleft}}} -\ProvideTextCommandDefault{\flqq}{\UseTextSymbol{OT1}\flqq} -\ProvideTextCommand{\frqq}{OT1}{% +\ProvideTextCommandDefault{\frqq}{% \textormath{\guillemotright}{\mbox{\guillemotright}}} -\ProvideTextCommand{\frqq}{T1}{% - \textormath{\guillemotright}{\mbox{\guillemotright}}} -\ProvideTextCommandDefault{\frqq}{\UseTextSymbol{OT1}\frqq} \def\umlauthigh{% \def\bbl@umlauta##1{\leavevmode\bgroup% \expandafter\accent\csname\f@encoding dqpos\endcsname @@ -1240,7 +1227,39 @@ \chardef\l@english\z@ \fi \main@language{english} -\ifcase\bbl@engine\or +\providecommand\IfBabelLayout[3]{#3}% +\newcommand\BabelPatchSection[1]{% + \@ifundefined{#1}{}{% + \bbl@exp{\let\<bbl@ss@#1>\<#1>}% + \@namedef{#1}{% + \@ifstar{\bbl@presec@s{#1}}% + {\@dblarg{\bbl@presec@x{#1}}}}}} +\def\bbl@presec@x#1[#2]#3{% + \bbl@exp{% + \\\select@language@x{\bbl@main@language}% + \\\@nameuse{bbl@ss@#1}% + [\\\foreignlanguage{\languagename}{\unexpanded{#2}}]% + {\\\foreignlanguage{\languagename}{\unexpanded{#3}}}% + \\\select@language@x{\languagename}}} +\def\bbl@presec@s#1#2{% + \bbl@exp{% + \\\select@language@x{\bbl@main@language}% + \\\@nameuse{bbl@ss@#1}*% + {\\\foreignlanguage{\languagename}{\unexpanded{#2}}}% + \\\select@language@x{\languagename}}} +\IfBabelLayout{sectioning}% at begin document ??? + {\BabelPatchSection{part}% + \BabelPatchSection{chapter}% + \BabelPatchSection{section}% + \BabelPatchSection{subsection}% + \BabelPatchSection{subsubsection}% + \BabelPatchSection{paragraph}% + \BabelPatchSection{subparagraph}% + \def\babel@toc#1{% + \select@language@x{\bbl@main@language}}}{} +\ifcase\bbl@engine + \input txtbabel.def +\or \input luababel.def \or \input xebabel.def @@ -1279,6 +1298,12 @@ {Use this macro as documented}}% {\bbl@provide@renew{#2}}}% \bbl@exp{\\\babelensure[exclude=\\\today]{#2}}% + \bbl@ifunset{bbl@ensure@\languagename}% + {\bbl@exp{% + \\\DeclareRobustCommand\<bbl@ensure@\languagename>[1]{% + \\\foreignlanguage{\languagename}% + {####1}}}}% + {}% \ifx\bbl@KVP@script\@nil\else \bbl@csarg\edef{sname@#2}{\bbl@KVP@script}% \fi @@ -1380,10 +1405,10 @@ \let\bbl@inireader\bbl@iniskip \bbl@info{Importing data from babel-#1.ini for \languagename}% \loop + \if T\ifeof1F\fi T\relax % Trick, because inside \loop \endlinechar\m@ne \read1 to \bbl@line \endlinechar`\^^M - \if T\ifeof1F\fi T\relax % Trick, because inside \loop \ifx\bbl@line\@empty\else \expandafter\bbl@iniline\bbl@line\bbl@iniline \fi @@ -1470,21 +1495,23 @@ \bbl@TG@@date \global\bbl@csarg\let{date@\languagename}\bbl@toreplace \bbl@exp{% - \gdef\<\languagename date>####1####2####3{% + \gdef\<\languagename date>{\\\protect\<\languagename date >}% + \gdef\<\languagename date >####1####2####3{% + \\\bbl@usedategrouptrue \<bbl@ensure@\languagename>{% \<bbl@date@\languagename>{####1}{####2}{####3}}}% \\\bbl@add\\\bbl@savetoday{% \\\SetString\\\today{% - \<\languagename date>{\year}{\month}{\day}}}}}}% + \<\languagename date>{\\\the\year}{\\\the\month}{\\\the\day}}}}}}% {}} -\newcommand\BabelDateSpace{\nobreakspace{}} +\newcommand\BabelDateSpace{\nobreakspace} \newcommand\BabelDateDot{.\@} \newcommand\BabelDated[1]{{\number#1}} \newcommand\BabelDatedd[1]{{\ifnum#1<10 0\fi\number#1}} \newcommand\BabelDateM[1]{{\number#1}} \newcommand\BabelDateMM[1]{{\ifnum#1<10 0\fi\number#1}} \newcommand\BabelDateMMMM[1]{{% - \csname month\romannumeral\month name\endcsname}}% + \csname month\romannumeral#1name\endcsname}}% \newcommand\BabelDatey[1]{{\number#1}}% \newcommand\BabelDateyy[1]{{% \ifnum#1<10 0\number#1 % @@ -1512,6 +1539,30 @@ \bbl@replace\bbl@toreplace{[yy]}{\BabelDateyy{####1}}% \bbl@replace\bbl@toreplace{[yyyy]}{\BabelDateyyyy{####1}}% \bbl@replace@finish@iii\bbl@toreplace} +\def\bbl@provide@lsys#1{% + \bbl@ifunset{bbl@lname@#1}% + {\bbl@ini@ids{#1}}% + {}% + \bbl@csarg\let{lsys@#1}\@empty + \bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}% + \bbl@ifunset{bbl@sotf#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% + \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% + \bbl@ifunset{bbl@lname@#1}{}% + {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% + \bbl@csarg\bbl@toglobal{lsys@#1}}% + % \bbl@exp{% TODO - should be global + % \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl@cs{sname@#1}}% + % {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% + % \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl@cs{lname@#1}}% + % {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} +\def\bbl@ini@ids#1{% + \def\BabelBeforeIni##1##2{% + \begingroup + \bbl@add\bbl@secpost@identification{\closein1 }% + \catcode`\[=12 \catcode`\]=12 \catcode`\==12 + \bbl@read@ini{##1}% + \endgroup}% boxed, to avoid extra spaces: + {\setbox\z@\hbox{\InputIfFileExists{babel-#1.tex}{}{}}}} \ifx\bbl@opt@safe\@empty\else \def\@newl@bel#1#2#3{% {\@safe@activestrue @@ -1589,29 +1640,36 @@ \let\org@bibcite\bibcite \let\org@@bibitem\@bibitem \fi -\bbl@redefine\markright#1{% - \bbl@ifblank{#1}% - {\org@markright{}}% - {\toks@{#1}% - \bbl@exp{% - \\\org@markright{\\\protect\\\foreignlanguage{\languagename}% - {\\\protect\\\bbl@restore@actives\the\toks@}}}}} -\ifx\@mkboth\markboth - \def\bbl@tempc{\let\@mkboth\markboth} -\else - \def\bbl@tempc{} -\fi -\bbl@redefine\markboth#1#2{% - \protected@edef\bbl@tempb##1{% - \protect\foreignlanguage{\languagename}{\protect\bbl@restore@actives##1}}% - \bbl@ifblank{#1}% - {\toks@{}}% - {\toks@\expandafter{\bbl@tempb{#1}}}% - \bbl@ifblank{#2}% - {\@temptokena{}}% - {\@temptokena\expandafter{\bbl@tempb{#2}}}% - \bbl@exp{\\\org@markboth{\the\toks@}{\the\@temptokena}}} -\bbl@tempc +\IfBabelLayout{sectioning} + {\ifx\bbl@opt@headfoot\@nnil + \g@addto@macro\@resetactivechars{% + \set@typeset@protect + \expandafter\select@language@x\expandafter{\bbl@main@language}% + \let\protect\noexpand}% + \fi} + {\bbl@redefine\markright#1{% + \bbl@ifblank{#1}% + {\org@markright{}}% + {\toks@{#1}% + \bbl@exp{% + \\\org@markright{\\\protect\\\foreignlanguage{\languagename}% + {\\\protect\\\bbl@restore@actives\the\toks@}}}}} + \ifx\@mkboth\markboth + \def\bbl@tempc{\let\@mkboth\markboth} + \else + \def\bbl@tempc{} + \fi + \bbl@redefine\markboth#1#2{% + \protected@edef\bbl@tempb##1{% + \protect\foreignlanguage{\languagename}{\protect\bbl@restore@actives##1}}% + \bbl@ifblank{#1}% + {\toks@{}}% + {\toks@\expandafter{\bbl@tempb{#1}}}% + \bbl@ifblank{#2}% + {\@temptokena{}}% + {\@temptokena\expandafter{\bbl@tempb{#2}}}% + \bbl@exp{\\\org@markboth{\the\toks@}{\the\@temptokena}}} + \bbl@tempc} % end \IfBabelLayout \bbl@xin@{R}\bbl@opt@safe \ifin@ \AtBeginDocument{% @@ -1760,17 +1818,16 @@ \global\bbl@csarg\chardef{wdir@#1}\z@ \fi} \def\bbl@switchdir{% + \bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}% \bbl@ifunset{bbl@wdir@\languagename}{\bbl@provide@dirs{\languagename}}{}% \bbl@exp{\\\bbl@setdirs\bbl@cs{wdir@\languagename}}} \def\bbl@setdirs#1{% TODO - math \ifcase\bbl@select@type % TODO - strictly, not the right test - \bbl@pagedir{#1}% \bbl@bodydir{#1}% \bbl@pardir{#1}% \fi \bbl@textdir{#1}} -\ifcase\bbl@engine -\or +\ifodd\bbl@engine % luatex=1 \AddBabelHook{babel-bidi}{afterextras}{\bbl@switchdir} \DisableBabelHook{babel-bidi} \def\bbl@getluadir#1{% @@ -1797,7 +1854,7 @@ \def\bbl@bodydir{\bbl@setdir{body}\bodydir} \def\bbl@pagedir{\bbl@setdir{page}\pagedir} \def\bbl@dirparastext{\pardir\the\textdir\relax}% %%%% -\or +\else % pdftex=0, xetex=2 \AddBabelHook{babel-bidi}{afterextras}{\bbl@switchdir} \DisableBabelHook{babel-bidi} \newcount\bbl@dirlevel @@ -1847,15 +1904,17 @@ \let\bbl@xebidipar\relax \TeXXeTstate\@ne \def\bbl@xeeverypar{% - \ifcase\bbl@thepardir\else + \ifcase\bbl@thepardir + \ifcase\bbl@thetextdir\else\beginR\fi + \else {\setbox\z@\lastbox\beginR\box\z@}% - \fi - \ifcase\bbl@thetextdir\else\beginR\fi}% + \fi}% \let\bbl@severypar\everypar \newtoks\everypar \everypar=\bbl@severypar \bbl@severypar{\bbl@xeeverypar\the\everypar}} \fi +\DeclareRobustCommand\babelsublr[1]{\leavevmode{\bbl@textdir\z@#1}} \ifx\loadlocalcfg\@undefined \@ifpackagewith{babel}{noconfigs}% {\let\loadlocalcfg\@gobble}% diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index c5ce24b584f..bd3fe93537c 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.sty +++ b/Master/texmf-dist/tex/generic/babel/babel.sty @@ -32,7 +32,7 @@ %% extension |.ins|) which are part of the distribution. %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{babel}[2017/11/03 3.15 The Babel package] +\ProvidesPackage{babel}[2018/01/04 3.16 The Babel package] \@ifpackagewith{babel}{debug} {\let\bbl@debug\@firstofone} {\let\bbl@debug\@gobble} @@ -179,23 +179,25 @@ \fi}% \bbl@languages \fi -\@ifpackagewith{babel}{bidi=basic-r}{% must go before any \DeclareOption - \let\bbl@beforeforeign\leavevmode - \AtEndOfPackage{\EnableBabelHook{babel-bidi}}% - \RequirePackage{luatexbase}% - \directlua{ - require('babel-bidi.lua') - require('babel-bidi-basic-r.lua') - luatexbase.add_to_callback('pre_linebreak_filter', - Babel.pre_otfload, - 'Babel.pre_otfload', - luatexbase.priority_in_callback('pre_linebreak_filter', - 'luaotfload.node_processor') or nil) - luatexbase.add_to_callback('hpack_filter', - Babel.pre_otfload, - 'Babel.pre_otfload', - luatexbase.priority_in_callback('hpack_filter', - 'luaotfload.node_processor') or nil)}}{} +\ifodd\bbl@engine + \@ifpackagewith{babel}{bidi=basic-r}{% must go before any \DeclareOption + \let\bbl@beforeforeign\leavevmode + \AtEndOfPackage{\EnableBabelHook{babel-bidi}}% + \RequirePackage{luatexbase}% + \directlua{ + require('babel-bidi.lua') + require('babel-bidi-basic-r.lua') + luatexbase.add_to_callback('pre_linebreak_filter', + Babel.pre_otfload, + 'Babel.pre_otfload', + luatexbase.priority_in_callback('pre_linebreak_filter', + 'luaotfload.node_processor') or nil) + luatexbase.add_to_callback('hpack_filter', + Babel.pre_otfload, + 'Babel.pre_otfload', + luatexbase.priority_in_callback('hpack_filter', + 'luaotfload.node_processor') or nil)}}{} +\fi \@ifpackagewith{babel}{base}{% \ifx\directlua\@undefined \DeclareOption*{\bbl@patterns{\CurrentOption}}% @@ -250,24 +252,40 @@ \DeclareOption{safe=none}{\let\bbl@opt@safe\@empty} \DeclareOption{safe=bib}{\def\bbl@opt@safe{B}} \DeclareOption{safe=ref}{\def\bbl@opt@safe{R}} -\DeclareOption{bidi=basic-r}% - {\newattribute\bbl@attr@dir - \let\bbl@beforeforeign\leavevmode - \AtEndOfPackage{\EnableBabelHook{babel-bidi}}} +\ifodd\bbl@engine + \DeclareOption{bidi=basic-r}% + {\let\bbl@beforeforeign\leavevmode + \newattribute\bbl@attr@dir + \bbl@exp{\output{\bodydir\pagedir\the\output}}% + \AtEndOfPackage{\EnableBabelHook{babel-bidi}}} +\else + \DeclareOption{bidi=basic-r}% + {\bbl@error + {The bidi method `basic-r' is available only in\\% + luatex. I'll continue with `bidi=default', so\\% + expect wrong results}% + {See the manual for further details.}% + \let\bbl@beforeforeign\leavevmode + \AtEndOfPackage{% + \EnableBabelHook{babel-bidi}% + \bbl@xebidipar}} +\fi \DeclareOption{bidi=default}% {\let\bbl@beforeforeign\leavevmode - \ifcase\bbl@engine\or + \ifodd\bbl@engine \newattribute\bbl@attr@dir + \bbl@exp{\output{\bodydir\pagedir\the\output}}% \fi \AtEndOfPackage{% \EnableBabelHook{babel-bidi}% - \ifcase\bbl@engine\or\or + \ifodd\bbl@engine\else \bbl@xebidipar \fi}} \let\bbl@opt@shorthands\@nnil \let\bbl@opt@config\@nnil \let\bbl@opt@main\@nnil \let\bbl@opt@headfoot\@nnil +\let\bbl@opt@layout\@nnil \def\bbl@tempa#1=#2\bbl@tempa{% \bbl@csarg\ifx{opt@#1}\@nnil \bbl@csarg\edef{opt@#1}{#2}% @@ -276,7 +294,7 @@ Bad option `#1=#2'. Either you have misspelled the\\% key or there is a previous setting of `#1'}{% Valid keys are `shorthands', `config', `strings', `main',\\% - `headfoot', `safe', `math'} + `headfoot', `safe', `math', among others.} \fi} \let\bbl@language@opts\@empty \DeclareOption*{% @@ -328,6 +346,17 @@ \ifx\bbl@language@opts\@empty\else\bbl@language@opts,\fi \bbl@opt@main} \fi +\ifx\bbl@opt@layout\@nnil + \newcommand\IfBabelLayout[3]{#3}% +\else + \newcommand\IfBabelLayout[1]{% + \@expandtwoargs\in@{.#1.}{.\bbl@opt@layout.}% + \ifin@ + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\fi \let\bbl@afterlang\relax \let\BabelModifiers\relax \let\bbl@loaded\@empty diff --git a/Master/texmf-dist/tex/generic/babel/francais.sty b/Master/texmf-dist/tex/generic/babel/francais.sty index 88d4cee16a3..8a7510f0800 100644 --- a/Master/texmf-dist/tex/generic/babel/francais.sty +++ b/Master/texmf-dist/tex/generic/babel/francais.sty @@ -42,8 +42,8 @@ \bblstyerror \fi \fi -\def\CurrentOption{francais} -\input frenchb.ldf\relax +\def\CurrentOption{french} +\input french.ldf\relax %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 2a78efdda22..6205a7080df 100644 --- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg +++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg @@ -36,7 +36,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{hyphen.cfg}[2017/11/03 3.15 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2018/01/04 3.16 Babel hyphens] \xdef\bbl@format{\jobname} \ifx\AtBeginDocument\@undefined \def\@empty{} @@ -67,7 +67,7 @@ \countdef\last@language=19 \def\addlanguage{\alloc@9\language\chardef\@cclvi} \fi -\toks8{Babel <3.15> and hyphenation patterns for }% +\toks8{Babel <3.16> and hyphenation patterns for }% \def\process@line#1#2 #3 #4 {% \ifx=#1% \process@synonym{#2}% diff --git a/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-cyrl.tex b/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-cyrl.tex index b5c5ec1ee6c..45611a214b4 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-cyrl.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-cyrl.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{azerbaijani-cyrillic} +\input{babel-azerbaijani-cyrillic} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-latn.tex b/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-latn.tex index b66f6a70f8d..c965c2ef3e5 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-latn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/az/babel-azerbaijani-latn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{azerbaijani-latin} +\input{babel-azerbaijani-latin} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-cyrl.tex b/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-cyrl.tex index 0e4cb1377eb..c24ef19ceda 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-cyrl.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-cyrl.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{bosnian-cyrillic} +\input{babel-bosnian-cyrillic} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-latn.tex b/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-latn.tex index 355ce0781ad..1f1147e5972 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-latn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/bs/babel-bosnian-latn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{bosnian-latin} +\input{babel-bosnian-latin} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/de/babel-austrian.tex b/Master/texmf-dist/tex/generic/babel/locale/de/babel-austrian.tex index 66432ce554c..8fb22b4c450 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/de/babel-austrian.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/de/babel-austrian.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{german-austria} +\input{babel-german-austria} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-at.tex b/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-at.tex index 66432ce554c..8fb22b4c450 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-at.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-at.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{german-austria} +\input{babel-german-austria} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-ch.tex b/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-ch.tex index 059f049512e..9b9708d2947 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-ch.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/de/babel-german-ch.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{german-switzerland} +\input{babel-german-switzerland} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/de/babel-nswissgerman.tex b/Master/texmf-dist/tex/generic/babel/locale/de/babel-nswissgerman.tex index 059f049512e..9b9708d2947 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/de/babel-nswissgerman.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/de/babel-nswissgerman.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{german-switzerland} +\input{babel-german-switzerland} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/de/babel-swissgerman.tex b/Master/texmf-dist/tex/generic/babel/locale/de/babel-swissgerman.tex index 059f049512e..9b9708d2947 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/de/babel-swissgerman.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/de/babel-swissgerman.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{german-switzerland} +\input{babel-german-switzerland} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/dsb/babel-lsorbian.tex b/Master/texmf-dist/tex/generic/babel/locale/dsb/babel-lsorbian.tex index dc945fdb956..3c0f708bdcb 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/dsb/babel-lsorbian.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/dsb/babel-lsorbian.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{lowersorbian} +\input{babel-lowersorbian} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-american.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-american.tex index 1ba35184de8..7ad0eba4be1 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-american.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-american.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-unitedstates} +\input{babel-english-unitedstates} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-australian.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-australian.tex index f3d54bafde5..fc115022565 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-australian.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-australian.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-australia} +\input{babel-english-australia} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-british.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-british.tex index b49b74f8b01..a38f537313e 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-british.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-british.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-unitedkingdom} +\input{babel-english-unitedkingdom} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-canadian.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-canadian.tex index 85243a6593e..abe1825246c 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-canadian.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-canadian.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-canada} +\input{babel-english-canada} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-au.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-au.tex index f3d54bafde5..fc115022565 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-au.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-au.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-australia} +\input{babel-english-australia} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-ca.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-ca.tex index 85243a6593e..abe1825246c 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-ca.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-ca.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-canada} +\input{babel-english-canada} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-gb.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-gb.tex index b49b74f8b01..a38f537313e 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-gb.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-gb.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-unitedkingdom} +\input{babel-english-unitedkingdom} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-nz.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-nz.tex index 1b666452b7d..1cda3ed3713 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-nz.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-nz.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-newzealand} +\input{babel-english-newzealand} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-us.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-us.tex index 1ba35184de8..7ad0eba4be1 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-us.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-english-us.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-unitedstates} +\input{babel-english-unitedstates} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-newzealand.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-newzealand.tex index 1b666452b7d..1cda3ed3713 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-newzealand.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-newzealand.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-newzealand} +\input{babel-english-newzealand} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-ukenglish.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-ukenglish.tex index b49b74f8b01..a38f537313e 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-ukenglish.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-ukenglish.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-unitedkingdom} +\input{babel-english-unitedkingdom} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/en/babel-usenglish.tex b/Master/texmf-dist/tex/generic/babel/locale/en/babel-usenglish.tex index 1ba35184de8..7ad0eba4be1 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/en/babel-usenglish.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/en/babel-usenglish.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{english-unitedstates} +\input{babel-english-unitedstates} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/es/babel-mexican.tex b/Master/texmf-dist/tex/generic/babel/locale/es/babel-mexican.tex index b9bb453db32..9aa175b66e8 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/es/babel-mexican.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/es/babel-mexican.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{spanish-mexico} +\input{babel-spanish-mexico} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/es/babel-spanish-mx.tex b/Master/texmf-dist/tex/generic/babel/locale/es/babel-spanish-mx.tex index b9bb453db32..9aa175b66e8 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/es/babel-spanish-mx.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/es/babel-spanish-mx.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{spanish-mexico} +\input{babel-spanish-mexico} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-be.tex b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-be.tex index 427fc973fa5..61e6236cedd 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-be.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-be.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{french-belgium} +\input{babel-french-belgium} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ca.tex b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ca.tex index b4ae9d45ec7..3de94e1a603 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ca.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ca.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{french-canada} +\input{babel-french-canada} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ch.tex b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ch.tex index 34effe40d6f..ca424ab3282 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ch.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-ch.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{french-switzerland} +\input{babel-french-switzerland} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-lu.tex b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-lu.tex index ed8a18e3f1b..c0eac24cd18 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-lu.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/fr/babel-french-lu.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{french-luxembourg} +\input{babel-french-luxembourg} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-gh.tex b/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-gh.tex index 5f382a8f047..d4d272e94a4 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-gh.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-gh.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{hausa-ghana} +\input{babel-hausa-ghana} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-ne.tex b/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-ne.tex index 1f555bcccba..bfd315c158e 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-ne.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/ha/babel-hausa-ne.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{hausa-niger} +\input{babel-hausa-niger} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/hsb/babel-usorbian.tex b/Master/texmf-dist/tex/generic/babel/locale/hsb/babel-usorbian.tex index 6a41d80a628..f5a8e2d9e90 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/hsb/babel-usorbian.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/hsb/babel-usorbian.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{uppersorbian} +\input{babel-uppersorbian} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-bn.tex b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-bn.tex index ff3f5f96e08..a6d5a773c63 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-bn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-bn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{malay-brunei} +\input{babel-malay-brunei} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-sg.tex b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-sg.tex index 2cef1df3b9e..1ce48cc6b78 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-sg.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-malay-sg.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{malay-singapore} +\input{babel-malay-singapore} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/nb/babel-norsk.tex b/Master/texmf-dist/tex/generic/babel/locale/nb/babel-norsk.tex index 85d250208a8..1deba93b91c 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/nb/babel-norsk.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/nb/babel-norsk.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{norwegianbokmal} +\input{babel-norwegianbokmal} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nynorsk.tex b/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nynorsk.tex index 5aedc14b2e4..38ff404d243 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nynorsk.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nynorsk.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{norwegiannynorsk} +\input{babel-norwegiannynorsk} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-arab.tex b/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-arab.tex index 0bac116d639..ca61762f9b9 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-arab.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-arab.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{punjabi-arabic} +\input{babel-punjabi-arabic} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-guru.tex b/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-guru.tex index 501a05e92c6..01e59e098af 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-guru.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/pa/babel-punjabi-guru.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{punjabi-gurmukhi} +\input{babel-punjabi-gurmukhi} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-brazilian.tex b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-brazilian.tex index 1f815bb817a..136d1f04e99 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-brazilian.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-brazilian.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{portuguese-brazil} +\input{babel-portuguese-brazil} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-br.tex b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-br.tex index 1f815bb817a..136d1f04e99 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-br.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-br.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{portuguese-brazil} +\input{babel-portuguese-brazil} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-pt.tex b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-pt.tex index b08ced3490f..421489463b6 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-pt.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-portuguese-pt.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{portuguese-portugal} +\input{babel-portuguese-portugal} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/ru/babel-ru.ini b/Master/texmf-dist/tex/generic/babel/locale/ru/babel-ru.ini index b773c65aeb5..897c135b52c 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ru/babel-ru.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ru/babel-ru.ini @@ -183,4 +183,3 @@ superscriptingExponent = × alph = Alph = ordinals = - diff --git a/Master/texmf-dist/tex/generic/babel/locale/se/babel-samin.tex b/Master/texmf-dist/tex/generic/babel/locale/se/babel-samin.tex index f6c48020cd3..4dd0a439f49 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/se/babel-samin.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/se/babel-samin.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{northernsami} +\input{babel-northernsami} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-latn.tex b/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-latn.tex index 89a519b0d66..f701e02d5cb 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-latn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-latn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{tachelhit-latin} +\input{babel-tachelhit-latin} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-tfng.tex b/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-tfng.tex index 167683178d2..f5ef938de88 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-tfng.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/shi/babel-tachelhit-tfng.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{tachelhit-tifinagh} +\input{babel-tachelhit-tifinagh} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sl/babel-slovene.tex b/Master/texmf-dist/tex/generic/babel/locale/sl/babel-slovene.tex index 764608eedcc..d8632e72ccd 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sl/babel-slovene.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sl/babel-slovene.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{slovenian} +\input{babel-slovenian} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-ba.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-ba.tex index 1cf43ca50c4..0f3fe82c325 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-ba.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-ba.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-cyrillic-bosniaherzegovina} +\input{babel-serbian-cyrillic-bosniaherzegovina} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-me.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-me.tex index 91761d29c1e..59a091ca86e 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-me.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-me.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-cyrillic-montenegro} +\input{babel-serbian-cyrillic-montenegro} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-xk.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-xk.tex index 5ee14b568af..b39f2cf4447 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-xk.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl-xk.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-cyrillic-kosovo} +\input{babel-serbian-cyrillic-kosovo} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl.tex index 8ec044d6d25..e2b96703abe 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-cyrl.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-cyrillic} +\input{babel-serbian-cyrillic} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-ba.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-ba.tex index 898b04ad633..c2efb27e728 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-ba.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-ba.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-latin-bosniaherzegovina} +\input{babel-serbian-latin-bosniaherzegovina} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-me.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-me.tex index aa74a7910f1..0a03046db8a 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-me.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-me.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-latin-montenegro} +\input{babel-serbian-latin-montenegro} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-xk.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-xk.tex index b9a019a6fb6..bbb7a4241cc 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-xk.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn-xk.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-latin-kosovo} +\input{babel-serbian-latin-kosovo} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn.tex b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn.tex index 9114b5ff362..7d8cb4fd1c7 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-serbian-latn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{serbian-latin} +\input{babel-serbian-latin} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-arab.tex b/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-arab.tex index 9f1db3ab119..a93632bebc7 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-arab.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-arab.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{uzbek-arabic} +\input{babel-uzbek-arabic} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-cyrl.tex b/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-cyrl.tex index e195b0578c2..aff3c462b23 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-cyrl.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-cyrl.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{uzbek-cyrillic} +\input{babel-uzbek-cyrillic} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-latn.tex b/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-latn.tex index df7759623d2..3dce3067c2b 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-latn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/uz/babel-uzbek-latn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{uzbek-latin} +\input{babel-uzbek-latin} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-latn.tex b/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-latn.tex index 74c94ac1568..340da8d7560 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-latn.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-latn.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{vai-latin} +\input{babel-vai-latin} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-vaii.tex b/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-vaii.tex index 9ccecc85bb0..00dc31a8405 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-vaii.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/vai/babel-vai-vaii.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{vai-vai} +\input{babel-vai-vai} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex b/Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex index a0c241123ab..47541a1ca86 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{vietnamese} +\input{babel-vietnamese} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-hk.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-hk.tex index da6861e7190..930487aa92f 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-hk.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-hk.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-simplified-hongkongsarchina} +\input{babel-chinese-simplified-hongkongsarchina} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-mo.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-mo.tex index bff1415cd15..00047ad13fc 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-mo.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-mo.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-simplified-macausarchina} +\input{babel-chinese-simplified-macausarchina} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-sg.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-sg.tex index 2027f3a7e2f..ad7a5ebdbbf 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-sg.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans-sg.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-simplified-singapore} +\input{babel-chinese-simplified-singapore} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans.tex index c18a7c64977..4ee11ade6a6 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hans.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-simplified} +\input{babel-chinese-simplified} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-hk.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-hk.tex index f7453d9ae83..6c16f135f59 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-hk.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-hk.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-traditional-hongkongsarchina} +\input{babel-chinese-traditional-hongkongsarchina} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-mo.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-mo.tex index 429e74e2438..3c813efc8bd 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-mo.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant-mo.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-traditional-macausarchina} +\input{babel-chinese-traditional-macausarchina} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant.tex b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant.tex index 8f643a34979..f413d5412e9 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/zh/babel-chinese-hant.tex @@ -1,4 +1,4 @@ % This file is part of babel. For further details see: % https://www.ctan.org/pkg/babel -\input{chinese-traditional} +\input{babel-chinese-traditional} \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 0ffb8d44cad..29da71ddf77 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -406,31 +406,6 @@ \bbl@exp{\<fontspec_set_family:Nnn>\\#1% {\bbl@cs{lsys@\languagename},#2}}{#3}% \bbl@toglobal#1}% -\def\bbl@provide@lsys#1{% - \bbl@ifunset{bbl@lname@#1}% - {\bbl@ini@ids{#1}}% - {}% - \bbl@csarg\let{lsys@#1}\@empty - \bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}% - \bbl@ifunset{bbl@sotf#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% - \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% - \bbl@ifunset{bbl@lname@#1}{}% - {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% - \bbl@csarg\bbl@toglobal{lsys@#1}}% - % \bbl@exp{% TODO - should be global - % \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl@cs{sname@#1}}% - % {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% - % \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl@cs{lname@#1}}% - % {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} -\def\bbl@ini@ids#1{% - \def\BabelBeforeIni##1##2{% - \begingroup - \bbl@add\bbl@secpost@identification{% - \def\bbl@iniline########1\bbl@iniline{}}% - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \bbl@read@ini{##1}% - \endgroup} - \InputIfFileExists{babel-#1.tex}{}{}} \def\bbl@font@rst#1#2#3#4{% \bbl@csarg\def{famrst@#4}{\bbl@font@set{#1}#2#3}} \def\bbl@font@fams{rm,sf,tt} @@ -473,6 +448,54 @@ \expandafter\addto\csname extras#1\endcsname{% \babel@save\bbl@langfeatures \edef\bbl@langfeatures{#2,}}} +\ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout +\ifx\bbl@beforeforeign\leavevmode % A poor test for bidi= + \def\@hangfrom#1{% + \setbox\@tempboxa\hbox{{#1}}% + \hangindent\wd\@tempboxa + \ifnum\bbl@getluadir{page}=\bbl@getluadir{par}\else + \shapemode\@ne + \fi + \noindent\box\@tempboxa} +\fi +\IfBabelLayout{lists} + {\def\list#1#2{% + \ifnum \@listdepth >5\relax + \@toodeep + \else + \global\advance\@listdepth\@ne + \fi + \rightmargin\z@ + \listparindent\z@ + \itemindent\z@ + \csname @list\romannumeral\the\@listdepth\endcsname + \def\@itemlabel{#1}% + \let\makelabel\@mklab + \@nmbrlistfalse + #2\relax + \@trivlist + \parskip\parsep + \parindent\listparindent + \advance\linewidth -\rightmargin + \advance\linewidth -\leftmargin + \advance\@totalleftmargin \leftmargin + \parshape \@ne + \@totalleftmargin \linewidth + \ifnum\bbl@getluadir{page}=\bbl@getluadir{par}\else + \shapemode\tw@ + \fi + \ignorespaces}} + {} +\IfBabelLayout{counters}% Global or language dependent? At begin doc? + {\let\bbl@latinarabic=\@arabic + \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% + \@ifpackagewith{babel}{bidi=default} + {\let\bbl@asciiroman=\@roman + \def\@roman#1{\babelsublr{\ensureascii{\bbl@asciiroman#1}}}% + \let\bbl@asciiRoman=\@Roman + \def\@Roman#1{\babelsublr{\ensureascii{\bbl@asciiRoman#1}}}% + \def\labelenumii{)\theenumii(}% + \def\p@enumiii{\p@enumii)\theenumii(}}}{} \endinput %% %% End of file `luababel.def'. diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index a9fe897dc8f..8e69ddf22ee 100644 --- a/Master/texmf-dist/tex/generic/babel/nil.ldf +++ b/Master/texmf-dist/tex/generic/babel/nil.ldf @@ -31,7 +31,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension |.ins|) which are part of the distribution. %% -\ProvidesLanguage{nil}[2017/11/03 3.15 Nil language] +\ProvidesLanguage{nil}[2018/01/04 3.16 Nil language] \LdfInit{nil}{datenil} \ifx\l@nohyphenation\@undefined \@nopatterns{nil} diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def index 3a0426fa3d9..54d03e1c6b5 100644 --- a/Master/texmf-dist/tex/generic/babel/switch.def +++ b/Master/texmf-dist/tex/generic/babel/switch.def @@ -36,7 +36,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{switch.def}[2017/11/03 3.15 Babel switching mechanism] +\ProvidesFile{switch.def}[2018/01/04 3.16 Babel switching mechanism] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -57,8 +57,8 @@ \countdef\last@language=19 \def\addlanguage{\alloc@9\language\chardef\@cclvi} \fi -\def\bbl@version{3.15} -\def\bbl@date{2017/11/03} +\def\bbl@version{3.16} +\def\bbl@date{2018/01/04} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% @@ -121,9 +121,7 @@ \select@language{\languagename}% \expandafter\ifx\csname date\languagename\endcsname\relax\else \if@filesw - \protected@write\@auxout{}{\string\select@language{\languagename}}% - \bbl@foreach\BabelContentsFiles{% - \addtocontents{##1}{\xstring\select@language{\languagename}}}% + \protected@write\@auxout{}{\string\babel@aux{\languagename}{}}% \bbl@usehooks{write}{}% \fi \fi} @@ -143,7 +141,14 @@ \let\bbl@select@type\z@ \expandafter\bbl@switch\expandafter{\languagename}% \fi}} +\def\babel@aux#1#2{% + \select@language{#1}% + \bbl@foreach\BabelContentsFiles{% + \@writefile{##1}{\babel@toc{#1}{#2}}}} %% TODO - ok in plain? +\def\babel@toc#1#2{% + \select@language{#1}} \let\select@language@x\select@language +\newif\ifbbl@usedategroup \def\bbl@switch#1{% \originalTeX \expandafter\def\expandafter\originalTeX\expandafter{% @@ -162,7 +167,16 @@ \csname captions#1\endcsname\relax \csname date#1\endcsname\relax \fi - \fi + \else\ifbbl@usedategroup + \bbl@usedategroupfalse + \ifhmode + \hskip\z@skip % trick to ignore spaces + \csname date#1\endcsname\relax + \loop\ifdim\lastskip>\z@\unskip\repeat\unskip + \else + \csname date#1\endcsname\relax + \fi + \fi\fi \bbl@usehooks{beforeextras}{}% \csname extras#1\endcsname\relax \bbl@usehooks{afterextras}{}% diff --git a/Master/texmf-dist/tex/generic/babel/txtbabel.def b/Master/texmf-dist/tex/generic/babel/txtbabel.def new file mode 100644 index 00000000000..c4c5f582f3b --- /dev/null +++ b/Master/texmf-dist/tex/generic/babel/txtbabel.def @@ -0,0 +1,158 @@ +%% +%% This is file `txtbabel.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% babel.dtx (with options: `texxet') +%% +%% +%% Copyright (C) 2012-2017 Javier Bezos and Johannes L. Braams. +%% Copyright (C) 1989-2012 Johannes L. Braams and +%% any individual authors listed elsewhere in this file. +%% All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Javier Bezos. +%% +%% The list of derived (unpacked) files belonging to the distribution +%% and covered by LPPL is defined by the unpacking scripts (with +%% extension |.ins|) which are part of the distribution. +%% +\ifx\bbl@opt@layout\@nnil\endinput\fi % No layout +\def\bbl@startskip{\ifcase\bbl@thepardir\leftskip\else\rightskip\fi} +\def\bbl@endskip{\ifcase\bbl@thepardir\rightskip\else\leftskip\fi} +\ifx\bbl@beforeforeign\leavevmode % A poor test for bidi= + \def\@hangfrom#1{% + \setbox\@tempboxa\hbox{{#1}}% + \hangindent\ifcase\bbl@thepardir\wd\@tempboxa\else-\wd\@tempboxa\fi + \noindent\box\@tempboxa} + \def\raggedright{% + \let\\\@centercr + \bbl@startskip\z@skip + \@rightskip\@flushglue + \bbl@endskip\@rightskip + \parindent\z@ + \parfillskip\bbl@startskip} + \def\raggedleft{% + \let\\\@centercr + \bbl@startskip\@flushglue + \bbl@endskip\z@skip + \parindent\z@ + \parfillskip\bbl@endskip} +\fi +\IfBabelLayout{lists} + {\def\list#1#2{% + \ifnum \@listdepth >5\relax + \@toodeep + \else + \global\advance\@listdepth\@ne + \fi + \rightmargin\z@ + \listparindent\z@ + \itemindent\z@ + \csname @list\romannumeral\the\@listdepth\endcsname + \def\@itemlabel{#1}% + \let\makelabel\@mklab + \@nmbrlistfalse + #2\relax + \@trivlist + \parskip\parsep + \parindent\listparindent + \advance\linewidth-\rightmargin + \advance\linewidth-\leftmargin + \advance\@totalleftmargin + \ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi + \parshape\@ne\@totalleftmargin\linewidth + \ignorespaces}% + \def\labelenumii{)\theenumii(}% + \def\p@enumiii{\p@enumii)\theenumii(}} + {} +\IfBabelLayout{contents} + {\def\@dottedtocline#1#2#3#4#5{% + \ifnum#1>\c@tocdepth\else + \vskip \z@ \@plus.2\p@ + {\bbl@startskip#2\relax + \bbl@endskip\@tocrmarg + \parfillskip-\bbl@endskip + \parindent#2\relax + \@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima#3\relax + \advance\bbl@startskip\@tempdima + \null\nobreak\hskip-\bbl@startskip + {#4}\nobreak + \leaders\hbox{% + $\m@th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}% + \hfill\nobreak + \hb@xt@\@pnumwidth{\hfil\normalfont\normalcolor#5}% + \par}% + \fi}} + {} +\IfBabelLayout{columns} + {\def\@outputdblcol{% + \if@firstcolumn + \global\@firstcolumnfalse + \global\setbox\@leftcolumn\copy\@outputbox + \splitmaxdepth\maxdimen + \vbadness\maxdimen + \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}% + \setbox\@outputbox\vsplit\@outputbox to\maxdimen + \toks@\expandafter{\topmark}% + \xdef\@firstcoltopmark{\the\toks@}% + \toks@\expandafter{\splitfirstmark}% + \xdef\@firstcolfirstmark{\the\toks@}% + \ifx\@firstcolfirstmark\@empty + \global\let\@setmarks\relax + \else + \gdef\@setmarks{% + \let\firstmark\@firstcolfirstmark + \let\topmark\@firstcoltopmark}% + \fi + \else + \global\@firstcolumntrue + \setbox\@outputbox\vbox{% + \hb@xt@\textwidth{% + \hskip\columnwidth + \hfil + {\normalcolor\vrule \@width\columnseprule}% + \hfil + \hb@xt@\columnwidth{\box\@leftcolumn \hss}% + \hskip-\textwidth + \hb@xt@\columnwidth{\box\@outputbox \hss}% + \hskip\columnsep + \hskip\columnwidth}}% + \@combinedblfloats + \@setmarks + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi{\@outputpage + \@startdblcolumn}% + \endgroup + \fi}}% + {} +\IfBabelLayout{counters}% Global or language dependent? At begin doc? + {\let\bbl@latinarabic=\@arabic + \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% + \let\bbl@asciiroman=\@roman + \def\@roman#1{\babelsublr{\ensureascii{\bbl@asciiroman#1}}}% + \let\bbl@asciiRoman=\@Roman + \def\@Roman#1{\babelsublr{\ensureascii{\bbl@asciiRoman#1}}}}{} +\endinput +%% +%% End of file `txtbabel.def'. diff --git a/Master/texmf-dist/tex/generic/babel/xebabel.def b/Master/texmf-dist/tex/generic/babel/xebabel.def index b3a75c9fd2b..73c210e76d2 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -147,31 +147,6 @@ \bbl@exp{\<fontspec_set_family:Nnn>\\#1% {\bbl@cs{lsys@\languagename},#2}}{#3}% \bbl@toglobal#1}% -\def\bbl@provide@lsys#1{% - \bbl@ifunset{bbl@lname@#1}% - {\bbl@ini@ids{#1}}% - {}% - \bbl@csarg\let{lsys@#1}\@empty - \bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}% - \bbl@ifunset{bbl@sotf#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% - \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% - \bbl@ifunset{bbl@lname@#1}{}% - {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% - \bbl@csarg\bbl@toglobal{lsys@#1}}% - % \bbl@exp{% TODO - should be global - % \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl@cs{sname@#1}}% - % {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% - % \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl@cs{lname@#1}}% - % {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} -\def\bbl@ini@ids#1{% - \def\BabelBeforeIni##1##2{% - \begingroup - \bbl@add\bbl@secpost@identification{% - \def\bbl@iniline########1\bbl@iniline{}}% - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \bbl@read@ini{##1}% - \endgroup} - \InputIfFileExists{babel-#1.tex}{}{}} \def\bbl@font@rst#1#2#3#4{% \bbl@csarg\def{famrst@#4}{\bbl@font@set{#1}#2#3}} \def\bbl@font@fams{rm,sf,tt} @@ -214,6 +189,7 @@ \expandafter\addto\csname extras#1\endcsname{% \babel@save\bbl@langfeatures \edef\bbl@langfeatures{#2,}}} +\input txtbabel.def \endinput %% %% End of file `xebabel.def'. |