texlive[46442] Master/texmf-dist: babel (25jan18)

commits+karl at tug.org commits+karl at tug.org
Thu Jan 25 22:53:07 CET 2018


Revision: 46442
          http://tug.org/svn/texlive?view=revision&revision=46442
Author:   karl
Date:     2018-01-25 22:53:06 +0100 (Thu, 25 Jan 2018)
Log Message:
-----------
babel (25jan18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/babel/README.md
    trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
    trunk/Master/texmf-dist/source/latex/babel/babel.dtx
    trunk/Master/texmf-dist/source/latex/babel/babel.ins
    trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
    trunk/Master/texmf-dist/source/latex/babel/locale.zip
    trunk/Master/texmf-dist/tex/generic/babel/babel.def
    trunk/Master/texmf-dist/tex/generic/babel/babel.sty
    trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
    trunk/Master/texmf-dist/tex/generic/babel/luababel.def
    trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
    trunk/Master/texmf-dist/tex/generic/babel/switch.def
    trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def

Modified: trunk/Master/texmf-dist/doc/latex/babel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/babel/README.md	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/doc/latex/babel/README.md	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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 @@
 ### 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 @@
 ```
 
 Javier Bezos
-2018-01-04
+2018/01/24
 

Modified: trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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 @@
 
 \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 @@
                    \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 @@
 \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 @@
 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 @@
 %    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 @@
 %<</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 @@
 % \changes{babel~3.9a}{2013/01/14}{Added the debug option}
 % \changes{babel~3.9a}{2013/02/05}{Added \cs{bbl at 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 @@
 %    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 at babel.sty| so that
@@ -4065,7 +4113,7 @@
   \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 @@
 \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 @@
 % \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 @@
 %
 %  \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 @@
 %
 %    \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 @@
 %  \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 @@
 %
 %  \end{macro}
 %
-%  \subsection{Support for saving macro definitions}
+% \subsection{Support for saving macro definitions}
 %
 %  To save the meaning of control sequences using |\babel at save|, we
 %  use temporary control sequences.  To save hash table entries for
@@ -6222,7 +6270,7 @@
 %
 % \end{macro}
 %
-%   \subsection{Hyphens}
+% \subsection{Hyphens}
 %
 %  \begin{macro}{\babelhyphenation}
 %
@@ -6373,7 +6421,7 @@
 %    \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 @@
 %
 %  \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 @@
 %  \end{macro}
 %  \end{macro}
 %
-%  \subsubsection{Letters}
+% \subsubsection{Letters}
 %
 %  \begin{macro}{\ij}
 %  \begin{macro}{\IJ}
@@ -7157,7 +7205,7 @@
 %  \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 @@
 %
 %  \end{macro}
 %
-%  \subsection{Marks}
+% \subsection{Marks}
 %
 %  \begin{macro}{\markright}
 %    Because the output routine is asynchronous, we must
@@ -8185,9 +8233,9 @@
 %  \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 @@
 %
 %  \end{macro}
 %
-%  \subsubsection{\pkg{varioref}}
+% \subsubsection{\pkg{varioref}}
 %
 %  \begin{macro}{\@@vpageref}
 %  \begin{macro}{\vrefpagenum}
@@ -8316,7 +8364,7 @@
 %  \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 @@
 %
 %  \end{macro}
 %
-%  \subsubsection{\pkg{hyperref}}
+% \subsubsection{\pkg{hyperref}}
 %
 %  \begin{macro}{\pdfstringdefDisableCommands}
 %
@@ -8380,7 +8428,7 @@
 %
 %  \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 @@
 %
 %  \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 @@
 % \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 @@
 \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 @@
 %
 %  \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 @@
 %    \cs{bbl at beforeforeign} and hooks}
 %
 %    \begin{macrocode}
-\let\bbl at beforeforeign\@empty
+\providecommand\bbl at beforeforeign{}
 \edef\foreignlanguage{%
   \noexpand\protect
   \expandafter\noexpand\csname foreignlanguage \endcsname}
@@ -9555,7 +9604,7 @@
 \let\languagetext\setlocale
 %    \end{macrocode}
 %
-%    \subsection{Errors}
+% \subsection{Errors}
 %
 %  \begin{macro}{\@nolanerr}
 %  \begin{macro}{\@nopatterns}
@@ -9648,7 +9697,7 @@
 %  \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 @@
 %    \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 @@
 %<</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 at beforeforeign\leavevmode
+  \def\bbl at footnote#1#2#3{%
+    \@ifnextchar[%
+      {\bbl at footnote@o{#1}{#2}{#3}}%
+      {\bbl at footnote@x{#1}{#2}{#3}}}
+  \def\bbl at footnote@x#1#2#3#4{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnote{#2#1{\ignorespaces#4}#3}%
+    \egroup}
+  \def\bbl at footnote@o#1#2#3[#4]#5{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnote[#4]{#2#1{\ignorespaces#5}#3}%
+    \egroup}
+  \def\bbl at footnotetext#1#2#3{%
+    \@ifnextchar[%
+      {\bbl at footnotetext@o{#1}{#2}{#3}}%
+      {\bbl at footnotetext@x{#1}{#2}{#3}}}
+  \def\bbl at footnotetext@x#1#2#3#4{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnotetext{#2#1{\ignorespaces#4}#3}%
+    \egroup}
+  \def\bbl at footnotetext@o#1#2#3[#4]#5{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnotetext[#4]{#2#1{\ignorespaces#5}#3}%
+    \egroup}
+  \def\BabelFootnote#1#2#3#4{%
+    \ifx\bbl at fn@footnote\@undefined
+      \let\bbl at fn@footnote\footnote
+    \fi
+    \ifx\bbl at fn@footnotetext\@undefined
+      \let\bbl at fn@footnotetext\footnotetext
+    \fi
+    \bbl at ifblank{#2}%
+      {\def#1{\bbl at footnote{\@firstofone}{#3}{#4}}
+       \@namedef{\bbl at stripslash#1text}%
+         {\bbl at footnotetext{\@firstofone}{#3}{#4}}}%
+      {\def#1{\bbl at exp{\\\bbl at footnote{\\\foreignlanguage{#2}}}{#3}{#4}}%
+       \@namedef{\bbl at stripslash#1text}%
+         {\bbl at exp{\\\bbl at footnotetext{\\\foreignlanguage{#2}}}{#3}{#4}}}}
+\fi
+%<</Footnote changes>>
+%    \end{macrocode}
+%
 % Now, the code.
 %
 %    \begin{macrocode}
@@ -10380,8 +10482,9 @@
 % 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 @@
       \ifcase\bbl at thepardir\leftmargin\else\rightmargin\fi
     \parshape\@ne\@totalleftmargin\linewidth
     \ignorespaces}%
-  \def\labelenumii{)\theenumii(}%
-  \def\p at enumiii{\p at enumii)\theenumii(}}
+  \ifcase\bbl at engine
+    \def\labelenumii{)\theenumii(}%
+    \def\p at enumiii{\p at enumii)\theenumii(}%
+  \fi
+  \def\@verbatim{%
+    \trivlist \item\relax
+    \if at minipage\else\vskip\parskip\fi
+    \bbl at startskip\textwidth
+    \advance\bbl at startskip-\linewidth
+    \bbl at endskip\z at skip
+    \parindent\z@
+    \parfillskip\@flushglue
+    \parskip\z at skip
+    \@@par
+    \language\l at nohyphenation
+    \@tempswafalse
+    \def\par{%
+      \if at tempswa
+        \leavevmode\null
+        \@@par\penalty\interlinepenalty
+      \else
+        \@tempswatrue
+        \ifhmode\@@par\penalty\interlinepenalty\fi
+      \fi}%
+    \let\do\@makeother \dospecials
+    \obeylines \verbatim at font \@noligs
+    \everypar\expandafter{\the\everypar\unpenalty}}}
   {}
 \IfBabelLayout{contents}
   {\def\@dottedtocline#1#2#3#4#5{%
@@ -10510,14 +10638,20 @@
        \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 at latinarabic=\@arabic
    \def\@arabic#1{\babelsublr{\bbl at latinarabic#1}}%
    \let\bbl at asciiroman=\@roman
@@ -10963,16 +11097,26 @@
 %      there are some additional readjustments for |bidi=default|.
 %
 %    \begin{macrocode}
-\IfBabelLayout{counters}%  Global or language dependent? At begin doc?
-  {\let\bbl at latinarabic=\@arabic
+\IfBabelLayout{counters}%
+  {\def\@textsuperscript#1{{% lua has separate settings for math
+     \m at th
+     \mathdir\pagedir % required with basic-r; ok with default, too
+     \ensuremath {^{\mbox {\fontsize \sf at size \z@ #1}}}}}%
+   \let\bbl at latinarabic=\@arabic
    \def\@arabic#1{\babelsublr{\bbl at latinarabic#1}}%
-   \@ifpackagewith{babel}{bidi=default}
+   \@ifpackagewith{babel}{bidi=default}%
      {\let\bbl at asciiroman=\@roman
       \def\@roman#1{\babelsublr{\ensureascii{\bbl at asciiroman#1}}}%
       \let\bbl at asciiRoman=\@Roman
       \def\@Roman#1{\babelsublr{\ensureascii{\bbl at asciiRoman#1}}}%
       \def\labelenumii{)\theenumii(}%
-      \def\p at enumiii{\p at enumii)\theenumii(}}}{}
+      \def\p at enumiii{\p at enumii)\theenumii(}}{}}{}
+<@Footnote changes@>
+\IfBabelLayout{footnotes}%
+  {\BabelFootnote\footnote\languagename{}{}%
+   \BabelFootnote\localfootnote\languagename{}{}%
+   \BabelFootnote\mainfootnote{}{}{}}
+  {}
 %</luatex>
 %    \end{macrocode}
 %
@@ -17359,7 +17503,7 @@
 %</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{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 @@
 %    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 @@
          \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 @@
 \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)} 

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.ins	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.ins	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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
 

Modified: trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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'

Modified: trunk/Master/texmf-dist/source/latex/babel/locale.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.def	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.def	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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 at debug\@firstofone}
   {\let\bbl at debug\@gobble}

Modified: trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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 at format{\jobname}
 \ifx\AtBeginDocument\@undefined
   \def\@empty{}
@@ -67,7 +67,7 @@
   \countdef\last at language=19
   \def\addlanguage{\alloc at 9\language\chardef\@cclvi}
 \fi
-\toks8{Babel <3.16> and hyphenation patterns for }%
+\toks8{Babel <3.17> and hyphenation patterns for }%
 \def\process at line#1#2 #3 #4 {%
   \ifx=#1%
     \process at synonym{#2}%

Modified: trunk/Master/texmf-dist/tex/generic/babel/luababel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2018-01-25 21:53:06 UTC (rev 46442)
@@ -486,16 +486,69 @@
      \fi
      \ignorespaces}}
   {}
-\IfBabelLayout{counters}%  Global or language dependent? At begin doc?
-  {\let\bbl at latinarabic=\@arabic
+\IfBabelLayout{counters}%
+  {\def\@textsuperscript#1{{% lua has separate settings for math
+     \m at th
+     \mathdir\pagedir % required with basic-r; ok with default, too
+     \ensuremath {^{\mbox {\fontsize \sf at size \z@ #1}}}}}%
+   \let\bbl at latinarabic=\@arabic
    \def\@arabic#1{\babelsublr{\bbl at latinarabic#1}}%
-   \@ifpackagewith{babel}{bidi=default}
+   \@ifpackagewith{babel}{bidi=default}%
      {\let\bbl at asciiroman=\@roman
       \def\@roman#1{\babelsublr{\ensureascii{\bbl at asciiroman#1}}}%
       \let\bbl at asciiRoman=\@Roman
       \def\@Roman#1{\babelsublr{\ensureascii{\bbl at asciiRoman#1}}}%
       \def\labelenumii{)\theenumii(}%
-      \def\p at enumiii{\p at enumii)\theenumii(}}}{}
+      \def\p at enumiii{\p at enumii)\theenumii(}}{}}{}
+\ifx\bbl at beforeforeign\leavevmode
+  \def\bbl at footnote#1#2#3{%
+    \@ifnextchar[%
+      {\bbl at footnote@o{#1}{#2}{#3}}%
+      {\bbl at footnote@x{#1}{#2}{#3}}}
+  \def\bbl at footnote@x#1#2#3#4{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnote{#2#1{\ignorespaces#4}#3}%
+    \egroup}
+  \def\bbl at footnote@o#1#2#3[#4]#5{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnote[#4]{#2#1{\ignorespaces#5}#3}%
+    \egroup}
+  \def\bbl at footnotetext#1#2#3{%
+    \@ifnextchar[%
+      {\bbl at footnotetext@o{#1}{#2}{#3}}%
+      {\bbl at footnotetext@x{#1}{#2}{#3}}}
+  \def\bbl at footnotetext@x#1#2#3#4{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnotetext{#2#1{\ignorespaces#4}#3}%
+    \egroup}
+  \def\bbl at footnotetext@o#1#2#3[#4]#5{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnotetext[#4]{#2#1{\ignorespaces#5}#3}%
+    \egroup}
+  \def\BabelFootnote#1#2#3#4{%
+    \ifx\bbl at fn@footnote\@undefined
+      \let\bbl at fn@footnote\footnote
+    \fi
+    \ifx\bbl at fn@footnotetext\@undefined
+      \let\bbl at fn@footnotetext\footnotetext
+    \fi
+    \bbl at ifblank{#2}%
+      {\def#1{\bbl at footnote{\@firstofone}{#3}{#4}}
+       \@namedef{\bbl at stripslash#1text}%
+         {\bbl at footnotetext{\@firstofone}{#3}{#4}}}%
+      {\def#1{\bbl at exp{\\\bbl at footnote{\\\foreignlanguage{#2}}}{#3}{#4}}%
+       \@namedef{\bbl at stripslash#1text}%
+         {\bbl at exp{\\\bbl at footnotetext{\\\foreignlanguage{#2}}}{#3}{#4}}}}
+\fi
+\IfBabelLayout{footnotes}%
+  {\BabelFootnote\footnote\languagename{}{}%
+   \BabelFootnote\localfootnote\languagename{}{}%
+   \BabelFootnote\mainfootnote{}{}{}}
+  {}
 \endinput
 %%
 %% End of file `luababel.def'.

Modified: trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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 at nohyphenation\@undefined
    \@nopatterns{nil}

Modified: trunk/Master/texmf-dist/tex/generic/babel/switch.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/switch.def	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/switch.def	2018-01-25 21:53:06 UTC (rev 46442)
@@ -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 at language=19
   \def\addlanguage{\alloc at 9\language\chardef\@cclvi}
 \fi
-\def\bbl at version{3.16}
-\def\bbl at date{2018/01/04}
+\def\bbl at version{3.17}
+\def\bbl at date{2018/01/24}
 \def\adddialect#1#2{%
   \global\chardef#1#2\relax
   \bbl at usehooks{adddialect}{{#1}{#2}}%
@@ -211,7 +211,7 @@
   \ifnum\bbl at hymapsel=\@cclv\chardef\bbl at hymapsel4\relax\fi
   \foreign at language{#1}}
 \expandafter\let\csname endotherlanguage*\endcsname\relax
-\let\bbl at beforeforeign\@empty
+\providecommand\bbl at beforeforeign{}
 \edef\foreignlanguage{%
   \noexpand\protect
   \expandafter\noexpand\csname foreignlanguage \endcsname}

Modified: trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def	2018-01-25 21:52:12 UTC (rev 46441)
+++ trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def	2018-01-25 21:53:06 UTC (rev 46442)
@@ -77,8 +77,33 @@
       \ifcase\bbl at thepardir\leftmargin\else\rightmargin\fi
     \parshape\@ne\@totalleftmargin\linewidth
     \ignorespaces}%
-  \def\labelenumii{)\theenumii(}%
-  \def\p at enumiii{\p at enumii)\theenumii(}}
+  \ifcase\bbl at engine
+    \def\labelenumii{)\theenumii(}%
+    \def\p at enumiii{\p at enumii)\theenumii(}%
+  \fi
+  \def\@verbatim{%
+    \trivlist \item\relax
+    \if at minipage\else\vskip\parskip\fi
+    \bbl at startskip\textwidth
+    \advance\bbl at startskip-\linewidth
+    \bbl at endskip\z at skip
+    \parindent\z@
+    \parfillskip\@flushglue
+    \parskip\z at skip
+    \@@par
+    \language\l at nohyphenation
+    \@tempswafalse
+    \def\par{%
+      \if at tempswa
+        \leavevmode\null
+        \@@par\penalty\interlinepenalty
+      \else
+        \@tempswatrue
+        \ifhmode\@@par\penalty\interlinepenalty\fi
+      \fi}%
+    \let\do\@makeother \dospecials
+    \obeylines \verbatim at 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 at beforeforeign\leavevmode
+  \def\bbl at footnote#1#2#3{%
+    \@ifnextchar[%
+      {\bbl at footnote@o{#1}{#2}{#3}}%
+      {\bbl at footnote@x{#1}{#2}{#3}}}
+  \def\bbl at footnote@x#1#2#3#4{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnote{#2#1{\ignorespaces#4}#3}%
+    \egroup}
+  \def\bbl at footnote@o#1#2#3[#4]#5{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnote[#4]{#2#1{\ignorespaces#5}#3}%
+    \egroup}
+  \def\bbl at footnotetext#1#2#3{%
+    \@ifnextchar[%
+      {\bbl at footnotetext@o{#1}{#2}{#3}}%
+      {\bbl at footnotetext@x{#1}{#2}{#3}}}
+  \def\bbl at footnotetext@x#1#2#3#4{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnotetext{#2#1{\ignorespaces#4}#3}%
+    \egroup}
+  \def\bbl at footnotetext@o#1#2#3[#4]#5{%
+    \bgroup
+      \select at language@x{\bbl at main@language}%
+      \bbl at fn@footnotetext[#4]{#2#1{\ignorespaces#5}#3}%
+    \egroup}
+  \def\BabelFootnote#1#2#3#4{%
+    \ifx\bbl at fn@footnote\@undefined
+      \let\bbl at fn@footnote\footnote
+    \fi
+    \ifx\bbl at fn@footnotetext\@undefined
+      \let\bbl at fn@footnotetext\footnotetext
+    \fi
+    \bbl at ifblank{#2}%
+      {\def#1{\bbl at footnote{\@firstofone}{#3}{#4}}
+       \@namedef{\bbl at stripslash#1text}%
+         {\bbl at footnotetext{\@firstofone}{#3}{#4}}}%
+      {\def#1{\bbl at exp{\\\bbl at footnote{\\\foreignlanguage{#2}}}{#3}{#4}}%
+       \@namedef{\bbl at stripslash#1text}%
+         {\bbl at exp{\\\bbl at footnotetext{\\\foreignlanguage{#2}}}{#3}{#4}}}}
+\fi
+\IfBabelLayout{footnotes}%
+  {\BabelFootnote\footnote\languagename{}{}%
+   \BabelFootnote\localfootnote\languagename{}{}%
+   \BabelFootnote\mainfootnote{}{}{}}
+  {}
+\IfBabelLayout{counters}%
   {\let\bbl at latinarabic=\@arabic
    \def\@arabic#1{\babelsublr{\bbl at latinarabic#1}}%
    \let\bbl at asciiroman=\@roman



More information about the tex-live-commits mailing list