diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/babel/README.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/babel/babel.pdf | bin | 628320 -> 635190 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.dtx | 292 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/bbcompat.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/locale.zip | bin | 682821 -> 682821 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.def | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/hyphen.cfg | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/luababel.def | 61 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/nil.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/switch.def | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/txtbabel.def | 80 |
13 files changed, 368 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md index ad9d1740776..add1ef51dab 100644 --- a/Master/texmf-dist/doc/latex/babel/README.md +++ b/Master/texmf-dist/doc/latex/babel/README.md @@ -1,4 +1,4 @@ -## Babel 3.16 +## Babel 3.17 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -64,6 +64,9 @@ respective authors. ### New ``` +3.17 - A tool for bidi footnotes. + - Fix - \ragged... didn't work for bidi. + 3.16 - New package option layout for bidi documents. - Quotes in TU encoding - Fix - \<language>date did not work correctly @@ -107,5 +110,5 @@ respective authors. ``` Javier Bezos -2018-01-04 +2018/01/24 diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf Binary files differindex fd0915188ea..b8da57f1c05 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 81656027379..b846f29fc4e 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -31,7 +31,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2018/01/04 v3.16 The Babel package] +\ProvidesFile{babel.dtx}[2018/01/24 v3.17 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -2183,11 +2183,14 @@ differ in the way `weak' numeric characters are ordered (eg, Arabic \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). + <https://www.w3.org/TR/html-bidi/>). \textit{This means the \babel{} + bidi code may take some time before it is truly stable.}\footnote{A + basic stable version for \luatex{} is planned before Summer + 2018. Other engines must wait very likely until Winter.} 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, and also the |layout| options + described below). \end{warning} There are some package options controlling bidi writing. @@ -2242,12 +2245,14 @@ _\babelprovide[import=ar, main]{arabic}_ \texttt{counters} $\string|$ \texttt{lists} $\string|$ \texttt{contents} $\string|$ + \texttt{footnotes} $\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{}. +\New{3.16} \textit{To be expanded}. Selects which layout elements are +adapted in bidi documents. You may use several options with a +comma-separated list (eg, |layout=counters.contents.sectioning|). This +list will be expanded in future releases (tables, captions, +etc.). Note not all options are required by all engines. \begin{description} \renewcommand\makelabel[1]{% @@ -2255,29 +2260,34 @@ required in \luatex{}. \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); + below |\BabelPatchSection| 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|; + \xetex{} and \pdftex{} for counters in general, as well as in + \luatex{} with |bidi=default|; required in \luatex{} for numeric + footnote marks $>$9; \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; + toc entries are R by default if the main language is R; \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}). + \luatex{} they are R by default if the main language is R (including + \textsf{multicol}); +\item[footnotes] not required in monolingual documents, but it may be + useful in multilingual documents in all engines; you may use + alternatively |\BabelFootnote| described below (what this options + does exactly is also explained there). \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. +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 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}} @@ -2289,11 +2299,49 @@ cases) because it applies the global language to the section format 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 +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). +\Describe{\BabelFootnote}{\marg{cmd}\marg{local-language}% + \marg{before}\marg{after}} + +\New{3.17} Something like: +\begin{verbatim} +\BabelFootnote{\parsfootnote}{\languagename}{(}{)} +\end{verbatim} +defines |\parsfootnote| so that |\parsfootnote{note}| is equivalent to: +\begin{verbatim} +\footnote{(\foreignlanguage{\languagename}{note})} +\end{verbatim} +but the footnote itself is typeset in the main language (to unify its +direction). In addition, |\parsfootnotetext| is defined. The option +|footnotes| just does the following: +\begin{verbatim} +\BabelFootnote{\footnote}{\languagename}{}{}% +\BabelFootnote{\localfootnote}{\languagename}{}{}% +\BabelFootnote{\mainfootnote}{}{}{} +\end{verbatim} +(which also redefine |\footnotetext| and define |\localfootnotetext| +and |\mainfootnotetext|). If the language argument is empty, then no +language is selected inside the argument of the footnote. Note this +command is available always in bidi documents, even without +|layout=footnotes|. + +\begin{example} + If you want to preserve directionality in footnotes and there are + many footnotes entirely in English, you can define: +\begin{verbatim} +\BabelFootnote{\enfootnote}{english}{}{.} +\end{verbatim} + It adds a period outside the English part, so that it is placed + at the left in the last line. This means the dot the end of the + footnote text should be omitted. +\end{example} + \subsection{Language attributes} \DescribeMacro{\languageattribute} @@ -3567,8 +3615,8 @@ help from Bernd Raichle, for which I am grateful. % little bit of literate programming. % % \begin{macrocode} -%<<version=3.16>> -%<<date=2018/01/04>> +%<<version=3.17>> +%<<date=2018/01/24>> % \end{macrocode} % % \section{Tools} @@ -3865,7 +3913,7 @@ help from Bernd Raichle, for which I am grateful. %<</Load macros for plain if not LaTeX>> % \end{macrocode} % -% \subsection{Multiple languages} +% \subsection{Multiple languages} % % \begin{macro}{\language} % Plain \TeX\ version~3.0 provides the primitive |\language| that @@ -3952,7 +4000,7 @@ help from Bernd Raichle, for which I am grateful. % \changes{babel~3.9a}{2013/01/14}{Added the debug option} % \changes{babel~3.9a}{2013/02/05}{Added \cs{bbl@add}} % -% \section{The Package File (\LaTeX, \texttt{babel.sty})} +% \section{The Package File (\LaTeX, \texttt{babel.sty})} % % In order to make use of the features of \LaTeXe, the \babel\ % system contains a package file, \file{babel.sty}. This file is @@ -3971,7 +4019,7 @@ help from Bernd Raichle, for which I am grateful. % language definition files to check if one of them was specified % by the user. % -% \subsection{\texttt{base}} +% \subsection{\texttt{base}} % % The first option to be processed is |base|, which set the % hyphenation patterns then resets |ver@babel.sty| so that @@ -4065,7 +4113,7 @@ help from Bernd Raichle, for which I am grateful. \endinput}{}% % \end{macrocode} % -% \subsection{\texttt{key=value} options and other general option} +% \subsection{\texttt{key=value} options and other general option} % % The following macros extract language modifiers, and only real % package options are kept in the option list. Modifiers are saved @@ -4179,7 +4227,7 @@ help from Bernd Raichle, for which I am grateful. \ProcessOptions* % \end{macrocode} % -% \subsection{Conditional loading of shorthands} +% \subsection{Conditional loading of shorthands} % % If there is no |shorthands=<chars>|, the original \textsf{babel} % macros are left untouched, but if there is, these macros are @@ -4541,7 +4589,7 @@ help from Bernd Raichle, for which I am grateful. % \changes{babel~3.9i}{2014/03/11}{Define \cs{l@} values from % \cs{lang@} values set in Plain etex/xetex/luatex} % -% \subsection{Tools} +% \subsection{Tools} % % \changes{babel~3.9k}{2014/03/24}{Added definition for % \cs{uselanguage}} @@ -4707,7 +4755,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Hooks} +% \subsection{Hooks} % % Note they are loaded in babel.def. switch.def only provides a % ``hook'' for hooks (with a default value which is a no-op, @@ -4846,7 +4894,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Setting up language files} +% \subsection{Setting up language files} % % \begin{macro}{\LdfInit} % The second version of |\LdfInit| macro takes two arguments. The first @@ -5892,7 +5940,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macro} % \end{macro} % -% \subsection{Language attributes} +% \subsection{Language attributes} % % Language attributes provide a means to give the user control over % which features of the language definition files he wants to @@ -6106,7 +6154,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Support for saving macro definitions} +% \subsection{Support for saving macro definitions} % % To save the meaning of control sequences using |\babel@save|, we % use temporary control sequences. To save hash table entries for @@ -6222,7 +6270,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Hyphens} +% \subsection{Hyphens} % % \begin{macro}{\babelhyphenation} % @@ -6373,7 +6421,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macrocode} % % \end{macro} -% \subsection{Multiencoding strings} +% \subsection{Multiencoding strings} % % \changes{babel~3.9a}{2012/09/05}{Added tentative code for string % declarations} @@ -6838,13 +6886,13 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Making glyphs available} +% \subsection{Making glyphs available} % % This section makes a number of glyphs available that either do not % exist in the \texttt{OT1} encoding and have to be `faked', or % that are not accessible through \file{T1enc.def}. % -% \subsubsection{Quotation marks} +% \subsubsection{Quotation marks} % % \begin{macro}{\quotedblbase} % In the \texttt{T1} encoding the opening double quote at the @@ -6958,7 +7006,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macro} % \end{macro} % -% \subsubsection{Letters} +% \subsubsection{Letters} % % \begin{macro}{\ij} % \begin{macro}{\IJ} @@ -7157,7 +7205,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macro} % \end{macro} % -% \subsubsection{Umlauts and tremas} +% \subsubsection{Umlauts and tremas} % % The command |\"| needs to have a different effect for different % languages. For German for instance, the `umlaut' should be @@ -8089,7 +8137,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Marks} +% \subsection{Marks} % % \begin{macro}{\markright} % Because the output routine is asynchronous, we must @@ -8185,9 +8233,9 @@ help from Bernd Raichle, for which I am grateful. % \end{macro} % \end{macro} % -% \subsection{Preventing clashes with other packages} +% \subsection{Preventing clashes with other packages} % -% \subsubsection{\pkg{ifthen}} +% \subsubsection{\pkg{ifthen}} % % \begin{macro}{\ifthenelse} % @@ -8263,7 +8311,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsubsection{\pkg{varioref}} +% \subsubsection{\pkg{varioref}} % % \begin{macro}{\@@vpageref} % \begin{macro}{\vrefpagenum} @@ -8316,7 +8364,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macro} % \end{macro} % -% \subsubsection{\pkg{hhline}} +% \subsubsection{\pkg{hhline}} % % \begin{macro}{\hhline} % Delaying the activation of the shorthand characters has introduced @@ -8357,7 +8405,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsubsection{\pkg{hyperref}} +% \subsubsection{\pkg{hyperref}} % % \begin{macro}{\pdfstringdefDisableCommands} % @@ -8380,7 +8428,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsubsection{\pkg{fancyhdr}} +% \subsubsection{\pkg{fancyhdr}} % % \begin{macro}{\FOREIGNLANGUAGE} % The package \pkg{fancyhdr} treats the running head and fout lines @@ -8431,7 +8479,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Encoding and fonts} +% \subsection{Encoding and fonts} % % Because documents may use non-ASCII font encodings, we make sure % that the logos of \TeX\ and \LaTeX\ always come out in the right @@ -8569,7 +8617,8 @@ help from Bernd Raichle, for which I am grateful. % \subsection{Basic bidi support} % % \textbf{Work in progress.} This code is currently placed here for -% practical reasons. +% practical reasons. It is loosely based on |rlbabel.def|, but most +% of it has been developed from scratch. % % \begin{itemize} % \item pdftex provides a minimal support for bidi text, and it @@ -8724,7 +8773,7 @@ help from Bernd Raichle, for which I am grateful. \fi % \end{macrocode} % -% A tool for weak L (mainly digits). +% A tool for weak L (mainly digits). % % \changes{3.16}{2018/01/02}{New macro \cs{babelsublr}} % @@ -8866,7 +8915,7 @@ help from Bernd Raichle, for which I am grateful. % % \end{macro} % -% \subsection{Selecting the language} +% \subsection{Selecting the language} % % \begin{macro}{\selectlanguage} % The macro |\selectlanguage| checks whether the language is @@ -9293,7 +9342,7 @@ help from Bernd Raichle, for which I am grateful. % \cs{bbl@beforeforeign} and hooks} % % \begin{macrocode} -\let\bbl@beforeforeign\@empty +\providecommand\bbl@beforeforeign{} \edef\foreignlanguage{% \noexpand\protect \expandafter\noexpand\csname foreignlanguage \endcsname} @@ -9555,7 +9604,7 @@ help from Bernd Raichle, for which I am grateful. \let\languagetext\setlocale % \end{macrocode} % -% \subsection{Errors} +% \subsection{Errors} % % \begin{macro}{\@nolanerr} % \begin{macro}{\@nopatterns} @@ -9648,7 +9697,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macro} % \end{macro} % -% \section{Loading hyphenation patterns} +% \section{Loading hyphenation patterns} % % The following code is meant to be read by ini\TeX\ because it % should instruct \TeX\ to read hyphenation patterns. To this end the @@ -10289,9 +10338,9 @@ help from Bernd Raichle, for which I am grateful. % \end{macrocode} % % -% \section{Hooks for XeTeX and LuaTeX} +% \section{Hooks for XeTeX and LuaTeX} % -% \subsection{XeTeX} +% \subsection{XeTeX} % % Unfortunately, the current encoding cannot be retrieved and % therefore it is reset always to |utf8|, which seems a sensible @@ -10342,6 +10391,59 @@ help from Bernd Raichle, for which I am grateful. %<</Restore Unicode catcodes before loading patterns>> % \end{macrocode} % +% Some more common code. +% +% \changes{babel 3.17}{2018/01/24}{Tools for bidi footnote} +% +% \begin{macrocode} +%<<*Footnote changes>> +\ifx\bbl@beforeforeign\leavevmode + \def\bbl@footnote#1#2#3{% + \@ifnextchar[% + {\bbl@footnote@o{#1}{#2}{#3}}% + {\bbl@footnote@x{#1}{#2}{#3}}} + \def\bbl@footnote@x#1#2#3#4{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnote{#2#1{\ignorespaces#4}#3}% + \egroup} + \def\bbl@footnote@o#1#2#3[#4]#5{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnote[#4]{#2#1{\ignorespaces#5}#3}% + \egroup} + \def\bbl@footnotetext#1#2#3{% + \@ifnextchar[% + {\bbl@footnotetext@o{#1}{#2}{#3}}% + {\bbl@footnotetext@x{#1}{#2}{#3}}} + \def\bbl@footnotetext@x#1#2#3#4{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnotetext{#2#1{\ignorespaces#4}#3}% + \egroup} + \def\bbl@footnotetext@o#1#2#3[#4]#5{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnotetext[#4]{#2#1{\ignorespaces#5}#3}% + \egroup} + \def\BabelFootnote#1#2#3#4{% + \ifx\bbl@fn@footnote\@undefined + \let\bbl@fn@footnote\footnote + \fi + \ifx\bbl@fn@footnotetext\@undefined + \let\bbl@fn@footnotetext\footnotetext + \fi + \bbl@ifblank{#2}% + {\def#1{\bbl@footnote{\@firstofone}{#3}{#4}} + \@namedef{\bbl@stripslash#1text}% + {\bbl@footnotetext{\@firstofone}{#3}{#4}}}% + {\def#1{\bbl@exp{\\\bbl@footnote{\\\foreignlanguage{#2}}}{#3}{#4}}% + \@namedef{\bbl@stripslash#1text}% + {\bbl@exp{\\\bbl@footnotetext{\\\foreignlanguage{#2}}}{#3}{#4}}}} +\fi +%<</Footnote changes>> +% \end{macrocode} +% % Now, the code. % % \begin{macrocode} @@ -10380,8 +10482,9 @@ help from Bernd Raichle, for which I am grateful. % 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 +% collaborate will be welcome, although the underlying concepts in +% both packages seem very different. 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}. % @@ -10441,8 +10544,33 @@ help from Bernd Raichle, for which I am grateful. \ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi \parshape\@ne\@totalleftmargin\linewidth \ignorespaces}% - \def\labelenumii{)\theenumii(}% - \def\p@enumiii{\p@enumii)\theenumii(}} + \ifcase\bbl@engine + \def\labelenumii{)\theenumii(}% + \def\p@enumiii{\p@enumii)\theenumii(}% + \fi + \def\@verbatim{% + \trivlist \item\relax + \if@minipage\else\vskip\parskip\fi + \bbl@startskip\textwidth + \advance\bbl@startskip-\linewidth + \bbl@endskip\z@skip + \parindent\z@ + \parfillskip\@flushglue + \parskip\z@skip + \@@par + \language\l@nohyphenation + \@tempswafalse + \def\par{% + \if@tempswa + \leavevmode\null + \@@par\penalty\interlinepenalty + \else + \@tempswatrue + \ifhmode\@@par\penalty\interlinepenalty\fi + \fi}% + \let\do\@makeother \dospecials + \obeylines \verbatim@font \@noligs + \everypar\expandafter{\the\everypar\unpenalty}}} {} \IfBabelLayout{contents} {\def\@dottedtocline#1#2#3#4#5{% @@ -10510,14 +10638,20 @@ help from Bernd Raichle, for which I am grateful. \endgroup \fi}}% {} +<@Footnote changes@> +\IfBabelLayout{footnotes}% + {\BabelFootnote\footnote\languagename{}{}% + \BabelFootnote\localfootnote\languagename{}{}% + \BabelFootnote\mainfootnote{}{}{}} + {} % \end{macrocode} % -% Implicitly reverses sectioning labels in bidi=basic-r, because -% the full stop is not in contact with L numbers any more. A +% 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. % % \begin{macrocode} -\IfBabelLayout{counters}% Global or language dependent? At begin doc? +\IfBabelLayout{counters}% {\let\bbl@latinarabic=\@arabic \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% \let\bbl@asciiroman=\@roman @@ -10963,16 +11097,26 @@ help from Bernd Raichle, for which I am grateful. % there are some additional readjustments for |bidi=default|. % % \begin{macrocode} -\IfBabelLayout{counters}% Global or language dependent? At begin doc? - {\let\bbl@latinarabic=\@arabic +\IfBabelLayout{counters}% + {\def\@textsuperscript#1{{% lua has separate settings for math + \m@th + \mathdir\pagedir % required with basic-r; ok with default, too + \ensuremath {^{\mbox {\fontsize \sf@size \z@ #1}}}}}% + \let\bbl@latinarabic=\@arabic \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% - \@ifpackagewith{babel}{bidi=default} + \@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(}}}{} + \def\p@enumiii{\p@enumii)\theenumii(}}{}}{} +<@Footnote changes@> +\IfBabelLayout{footnotes}% + {\BabelFootnote\footnote\languagename{}{}% + \BabelFootnote\localfootnote\languagename{}{}% + \BabelFootnote\mainfootnote{}{}{}} + {} %</luatex> % \end{macrocode} % @@ -17359,7 +17503,7 @@ end %</basic-r> % \end{macrocode} % -% \section{The `nil' language} +% \section{The `nil' language} % % This `language' does nothing, except setting the hyphenation patterns to % nohyphenation. @@ -17421,9 +17565,9 @@ end % \end{macrocode} % % -% \section{Support for Plain \TeX\ (\texttt{plain.def})} +% \section{Support for Plain \TeX\ (\texttt{plain.def})} % -% \subsection{Not renaming \file{hyphen.tex}} +% \subsection{Not renaming \file{hyphen.tex}} % As Don Knuth has declared that the filename \file{hyphen.tex} may % only be used to designate \emph{his} version of the american % English hyphenation patterns, a new solution has to be found in @@ -17526,7 +17670,7 @@ end % make a copy of blplain.tex, rename it and replace \file{plain.tex} % with the name of your format file. % -% \subsection{Emulating some \LaTeX{} features} +% \subsection{Emulating some \LaTeX{} features} % % The following code duplicates or emulates parts of \LaTeXe\ that % are needed for \babel. @@ -17826,7 +17970,7 @@ end \else\expandafter\@gobble\fi{#1}} % \end{macrocode} % -% \subsection{Encoding related macros} +% \subsection{Encoding related macros} % % Code from \file{ltoutenc.dtx}, adapted for use in the plain \TeX\ % environment. @@ -18005,7 +18149,7 @@ end \fi % \end{macrocode} % -% \subsection{Babel options} +% \subsection{\Babel{} options} % % \changes{babel~3.9k}{2014/03/22}{Moved code from babel.def, and add % some new tools (not yet documented)} diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index 024b1b80ad8..69c35095142 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{2018/01/04} +\def\filedate{2018/01/24} \def\batchfile{babel.ins} \input docstrip.tex diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx index f5689891895..66af9a52eb1 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}[2018/01/04 v3.16] +\ProvidesFile{bbcompat.dtx}[2018/01/24 v3.17] %</dtx> % %% File 'bbcompat.dtx' diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip Binary files differindex d558310aa68..b472025d667 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.def b/Master/texmf-dist/tex/generic/babel/babel.def index 81f324c8fba..1d6c7c725d5 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}[2018/01/04 3.16 Babel common definitions] +\ProvidesFile{babel.def}[2018/01/24 3.17 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index bd3fe93537c..b95260eb477 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}[2018/01/04 3.16 The Babel package] +\ProvidesPackage{babel}[2018/01/24 3.17 The Babel package] \@ifpackagewith{babel}{debug} {\let\bbl@debug\@firstofone} {\let\bbl@debug\@gobble} diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 6205a7080df..98d4fa97d73 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}[2018/01/04 3.16 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2018/01/24 3.17 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.16> and hyphenation patterns for }% +\toks8{Babel <3.17> 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/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 29da71ddf77..7e09edcd9d8 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -486,16 +486,69 @@ \fi \ignorespaces}} {} -\IfBabelLayout{counters}% Global or language dependent? At begin doc? - {\let\bbl@latinarabic=\@arabic +\IfBabelLayout{counters}% + {\def\@textsuperscript#1{{% lua has separate settings for math + \m@th + \mathdir\pagedir % required with basic-r; ok with default, too + \ensuremath {^{\mbox {\fontsize \sf@size \z@ #1}}}}}% + \let\bbl@latinarabic=\@arabic \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% - \@ifpackagewith{babel}{bidi=default} + \@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(}}}{} + \def\p@enumiii{\p@enumii)\theenumii(}}{}}{} +\ifx\bbl@beforeforeign\leavevmode + \def\bbl@footnote#1#2#3{% + \@ifnextchar[% + {\bbl@footnote@o{#1}{#2}{#3}}% + {\bbl@footnote@x{#1}{#2}{#3}}} + \def\bbl@footnote@x#1#2#3#4{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnote{#2#1{\ignorespaces#4}#3}% + \egroup} + \def\bbl@footnote@o#1#2#3[#4]#5{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnote[#4]{#2#1{\ignorespaces#5}#3}% + \egroup} + \def\bbl@footnotetext#1#2#3{% + \@ifnextchar[% + {\bbl@footnotetext@o{#1}{#2}{#3}}% + {\bbl@footnotetext@x{#1}{#2}{#3}}} + \def\bbl@footnotetext@x#1#2#3#4{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnotetext{#2#1{\ignorespaces#4}#3}% + \egroup} + \def\bbl@footnotetext@o#1#2#3[#4]#5{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnotetext[#4]{#2#1{\ignorespaces#5}#3}% + \egroup} + \def\BabelFootnote#1#2#3#4{% + \ifx\bbl@fn@footnote\@undefined + \let\bbl@fn@footnote\footnote + \fi + \ifx\bbl@fn@footnotetext\@undefined + \let\bbl@fn@footnotetext\footnotetext + \fi + \bbl@ifblank{#2}% + {\def#1{\bbl@footnote{\@firstofone}{#3}{#4}} + \@namedef{\bbl@stripslash#1text}% + {\bbl@footnotetext{\@firstofone}{#3}{#4}}}% + {\def#1{\bbl@exp{\\\bbl@footnote{\\\foreignlanguage{#2}}}{#3}{#4}}% + \@namedef{\bbl@stripslash#1text}% + {\bbl@exp{\\\bbl@footnotetext{\\\foreignlanguage{#2}}}{#3}{#4}}}} +\fi +\IfBabelLayout{footnotes}% + {\BabelFootnote\footnote\languagename{}{}% + \BabelFootnote\localfootnote\languagename{}{}% + \BabelFootnote\mainfootnote{}{}{}} + {} \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 8e69ddf22ee..f11e9b3820b 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}[2018/01/04 3.16 Nil language] +\ProvidesLanguage{nil}[2018/01/24 3.17 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 54d03e1c6b5..501e9d932c4 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}[2018/01/04 3.16 Babel switching mechanism] +\ProvidesFile{switch.def}[2018/01/24 3.17 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.16} -\def\bbl@date{2018/01/04} +\def\bbl@version{3.17} +\def\bbl@date{2018/01/24} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% @@ -211,7 +211,7 @@ \ifnum\bbl@hymapsel=\@cclv\chardef\bbl@hymapsel4\relax\fi \foreign@language{#1}} \expandafter\let\csname endotherlanguage*\endcsname\relax -\let\bbl@beforeforeign\@empty +\providecommand\bbl@beforeforeign{} \edef\foreignlanguage{% \noexpand\protect \expandafter\noexpand\csname foreignlanguage \endcsname} diff --git a/Master/texmf-dist/tex/generic/babel/txtbabel.def b/Master/texmf-dist/tex/generic/babel/txtbabel.def index c4c5f582f3b..9e547703fc0 100644 --- a/Master/texmf-dist/tex/generic/babel/txtbabel.def +++ b/Master/texmf-dist/tex/generic/babel/txtbabel.def @@ -77,8 +77,33 @@ \ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi \parshape\@ne\@totalleftmargin\linewidth \ignorespaces}% - \def\labelenumii{)\theenumii(}% - \def\p@enumiii{\p@enumii)\theenumii(}} + \ifcase\bbl@engine + \def\labelenumii{)\theenumii(}% + \def\p@enumiii{\p@enumii)\theenumii(}% + \fi + \def\@verbatim{% + \trivlist \item\relax + \if@minipage\else\vskip\parskip\fi + \bbl@startskip\textwidth + \advance\bbl@startskip-\linewidth + \bbl@endskip\z@skip + \parindent\z@ + \parfillskip\@flushglue + \parskip\z@skip + \@@par + \language\l@nohyphenation + \@tempswafalse + \def\par{% + \if@tempswa + \leavevmode\null + \@@par\penalty\interlinepenalty + \else + \@tempswatrue + \ifhmode\@@par\penalty\interlinepenalty\fi + \fi}% + \let\do\@makeother \dospecials + \obeylines \verbatim@font \@noligs + \everypar\expandafter{\the\everypar\unpenalty}}} {} \IfBabelLayout{contents} {\def\@dottedtocline#1#2#3#4#5{% @@ -146,7 +171,56 @@ \endgroup \fi}}% {} -\IfBabelLayout{counters}% Global or language dependent? At begin doc? +\ifx\bbl@beforeforeign\leavevmode + \def\bbl@footnote#1#2#3{% + \@ifnextchar[% + {\bbl@footnote@o{#1}{#2}{#3}}% + {\bbl@footnote@x{#1}{#2}{#3}}} + \def\bbl@footnote@x#1#2#3#4{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnote{#2#1{\ignorespaces#4}#3}% + \egroup} + \def\bbl@footnote@o#1#2#3[#4]#5{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnote[#4]{#2#1{\ignorespaces#5}#3}% + \egroup} + \def\bbl@footnotetext#1#2#3{% + \@ifnextchar[% + {\bbl@footnotetext@o{#1}{#2}{#3}}% + {\bbl@footnotetext@x{#1}{#2}{#3}}} + \def\bbl@footnotetext@x#1#2#3#4{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnotetext{#2#1{\ignorespaces#4}#3}% + \egroup} + \def\bbl@footnotetext@o#1#2#3[#4]#5{% + \bgroup + \select@language@x{\bbl@main@language}% + \bbl@fn@footnotetext[#4]{#2#1{\ignorespaces#5}#3}% + \egroup} + \def\BabelFootnote#1#2#3#4{% + \ifx\bbl@fn@footnote\@undefined + \let\bbl@fn@footnote\footnote + \fi + \ifx\bbl@fn@footnotetext\@undefined + \let\bbl@fn@footnotetext\footnotetext + \fi + \bbl@ifblank{#2}% + {\def#1{\bbl@footnote{\@firstofone}{#3}{#4}} + \@namedef{\bbl@stripslash#1text}% + {\bbl@footnotetext{\@firstofone}{#3}{#4}}}% + {\def#1{\bbl@exp{\\\bbl@footnote{\\\foreignlanguage{#2}}}{#3}{#4}}% + \@namedef{\bbl@stripslash#1text}% + {\bbl@exp{\\\bbl@footnotetext{\\\foreignlanguage{#2}}}{#3}{#4}}}} +\fi +\IfBabelLayout{footnotes}% + {\BabelFootnote\footnote\languagename{}{}% + \BabelFootnote\localfootnote\languagename{}{}% + \BabelFootnote\mainfootnote{}{}{}} + {} +\IfBabelLayout{counters}% {\let\bbl@latinarabic=\@arabic \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}% \let\bbl@asciiroman=\@roman |