texlive[57530] Master/texmf-dist: babel (26jan21)

commits+karl at tug.org commits+karl at tug.org
Tue Jan 26 22:47:29 CET 2021


Revision: 57530
          http://tug.org/svn/texlive?view=revision&revision=57530
Author:   karl
Date:     2021-01-26 22:47:29 +0100 (Tue, 26 Jan 2021)
Log Message:
-----------
babel (26jan21)

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-bidi-basic-r.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua
    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/blplain.tex
    trunk/Master/texmf-dist/tex/generic/babel/bplain.tex
    trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
    trunk/Master/texmf-dist/tex/generic/babel/locale/si/babel-si.ini
    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/plain.def
    trunk/Master/texmf-dist/tex/generic/babel/switch.def
    trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
    trunk/Master/texmf-dist/tex/generic/babel/xebabel.def

Modified: trunk/Master/texmf-dist/doc/latex/babel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/babel/README.md	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/doc/latex/babel/README.md	2021-01-26 21:47:29 UTC (rev 57530)
@@ -1,4 +1,4 @@
-## Babel 3.52
+## Babel 3.53
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -7,9 +7,9 @@
 
 The latest stable version is available on <https://ctan.org/pkg/babel>.
 
-Changes in version 3.52 are described in:
+Changes in version 3.53 are described in:
 
-https://github.com/latex3/babel/wiki/What's-new-in-babel-3.52
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.53
 
 Included is a set of ini files for about 250 languages. 
 
@@ -43,6 +43,19 @@
 
 ### Latest changes
 ```
+3.53   2021-01-26
+       * Extended \setlocalecaption to allow .template (related to
+         #111).
+       * Allow access to some features in `ini` files even with `ldf`
+         ones.
+       * Tool to create ldf files with a (more or less) GUI.
+       * Captions for Sinhala (thanks to Nisal D Bandara).
+       * Fixes:
+         - Not really a fix, but I started working on `picture` with
+           bidi in lua.
+         - Parenthesis sometimes mirrored at the end of math with
+           bidi=basic.
+
 3.52   2020-12-16
        * WARNING. If you need the style for Afrikaans you must update
          babel-dutch.
@@ -56,6 +69,7 @@
          - Save size overflow with many \selectlanguage's (#109).
          - Albanian: fix a typo in contents name (#104)
          - Missing ‘Unused global option(s)’ warning (#110)
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.52
 
 3.51   2020-10-27
        * Common interface to (re)define captions (with

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	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2021-01-26 21:47:29 UTC (rev 57530)
@@ -1,7 +1,7 @@
 % \iffalse
 % This document requires lualatex
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/12/16 v3.52 The Babel package]
+\ProvidesFile{babel.dtx}[2021/01/26 v3.53 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -202,13 +202,14 @@
 Version \csname @gobble\expandafter\endcsname\fileversion\newline
 \filedate
 
-\vspace{1cm}
-\textit{Original author}\newline
-Johannes L. Braams
+\LARGE
+\vspace{1.2cm}
+Johannes L. Braams\\[-.5ex]
+{\large Original author}
 
 \vspace{.3cm}
-\textit{Current maintainer}\newline
-Javier Bezos
+Javier Bezos\\[-.5ex]
+{\large Current maintainer}
 \end{minipage}
 &\cellcolor[rgb]{.92, .86, .73}
 \vspace{2cm}
@@ -296,7 +297,7 @@
 for an option – in this case a language – to be recognized by several
 packages.
 
-Many languages are compatible with \textsf{xetex} and \textsf{luatex},.
+Many languages are compatible with \textsf{xetex} and \textsf{luatex}.
 With them you can use \babel{} to localize the documents. When these
 engines are used, the Latin script is covered by default in current
 \LaTeX{} (provided the document encoding is UTF-8), because the font
@@ -308,15 +309,13 @@
   Here is a simple full example for “traditional” \TeX{} engines
   (see below for \xetex{} and \luatex{}). The packages |fontenc| and
   |inputenc| do not belong to \babel, but they are included in the
-  example because typically you will need them (however, the package
-  \textsf{inputenc} may be omitted with \LaTeX{} $\ge$ 2018-04-01 if
-  the encoding is UTF-8):
+  example because typically you will need them. It assumes UTF-8, the
+  default encoding:
 \setengine{pdftex}
 \begin{verbatim}
 \documentclass{article}
 
 \usepackage[T1]{fontenc}
-% \usepackage[utf8]{inputenc} % Uncomment if LaTeX < 2018-04-01
 
 _\usepackage[french]{babel}_
 
@@ -487,15 +486,13 @@
 |\foreignlanguage| is for chunks of text inside paragraphs.
 
 \begin{example}
-A full bilingual document follows. The main language is |french|, which
-is activated when the document begins. The package \textsf{inputenc}
-may be omitted with \LaTeX{} $\ge$ 2018-04-01 if the encoding is UTF-8.
+A full bilingual document with \pdftex{} follows. The main language is
+|french|, which is activated when the document begins. It assumes UTF-8:
 \setengine{pdftex}
 \begin{verbatim}
 \documentclass{article}
 
 \usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
 
 _\usepackage[english,french]{babel}_
 
@@ -557,18 +554,19 @@
 until required, so that it can be used just in case.
 
 \begin{example}
-  A trivial document is:
+  A trivial document with the default font in English and Spanish, and
+  FreeSerif in Russian is:
 \setengine{luatex/xetex}
 \begin{verbatim}
 \documentclass[english]{article}
 \usepackage{babel}
 
-\babelfont[russian]{rm}{FreeSerif}
+_\babelfont[russian]{rm}{FreeSerif}_
 
 \begin{document}
 
-English. \foreignlanguage{russian}{Русский}.
-\foreignlanguage{spanish}{Español}
+English. _\foreignlanguage{russian}{Русский}_.
+_\foreignlanguage{spanish}{Español}_.
 
 \end{document}
 \end{verbatim}
@@ -712,7 +710,7 @@
 \foreignlanguage[date]{polish}{\today}
 \end{verbatim}
 In addition, captions can be switched with |captions| (or both, of
-course, with |date, captions|). Until 3.43 you had to write something
+course, with |date,| |captions|). Until 3.43 you had to write something
 like |{\selectlanguage{..} ..}|, which was not always the most
 convenient way.
 
@@ -761,11 +759,11 @@
 loading \file{zerohyph.tex}. It deactivates language shorthands, too
 (but not user shorthands).
 
-Except for these simple uses, |hyphenrules| is discouraged and
-|otherlanguage*| (the starred version) is preferred, as the former does
-not take into account possible changes in encodings of characters like,
-say, |'| done by some languages (eg, \textsf{italian}, \textsf{french},
-\textsf{ukraineb}). To set hyphenation exceptions, use
+Except for these simple uses, |hyphenrules| is deprecated and
+|otherlanguage*| (the starred version) is preferred, because the former
+does not take into account possible changes in encodings of characters
+like, say, |'| done by some languages (eg, \textsf{italian},
+\textsf{french}, \textsf{ukraineb}). To set hyphenation exceptions, use
 |\babelhyphenation| (see below).
 
 \subsection{More on selection}
@@ -782,6 +780,17 @@
 to be |\begin{otherlanguage*}|\marg{language1}, and so on. Note
 |\|\m{tag1} is also allowed, but remember to set it locally inside a
 group.
+
+\begin{warning}
+  There is a clear drawback to this feature, namely, the ‘prefix’
+  |\text...| is heavily overloaded in \LaTeX{} and conflicts with
+  existing macros may arise (|\textlatin|, |\textbar|, |\textit|,
+  |\textcolor| and many others). The same applies to environments,
+  because |arabic| conflicts with |\arabic|. Except if there is a
+  reason for this ‘syntactical sugar’, the best option is to stick to
+  the default selectors or to define your own alternatives. 
+\end{warning}
+
 \begin{example}
 With
 \begin{verbatim}
@@ -834,7 +843,7 @@
 By default only the basic captions and |\today| are redefined, but you
 can add further macros with the key |include| in the optional argument
 (without commas). Macros not to be modified are listed in
-|exclude|. You can also enforce a font encoding with
+|exclude|. You can also enforce a font encoding with the option
 |fontenc|.\footnote{With it, encoded strings may not work as expected.}
 A couple of examples:
 \begin{verbatim}
@@ -854,7 +863,7 @@
 A \textit{shorthand} is a sequence of one or two characters that
 expands to arbitrary \TeX{} code.
 
-Shorthands can be used for different kinds of things, for example:
+Shorthands can be used for different kinds of things; for example:
 (1) in some languages shorthands such as |"a| are defined to be able
 to hyphenate the word if the encoding is |OT1|; (2) in some languages
 shorthands such as |!| are used to insert the right amount of white
@@ -869,22 +878,20 @@
 |\knbccode|, and \luatex{} can manipulate the glyph list. Tools for
 point 3 can be still very useful in general.
 
-There are three levels of shorthands: \textit{user},
-\textit{language}, and \textit{system} (by order of
-precedence). Version 3.9 introduces the \textit{language user} level
-on top of the user level, as described below. In most cases, you will
-use only shorthands provided by languages.
+There are four levels of shorthands: \textit{user}, \textit{language},
+\textit{system}, and \textit{language user} (by order of precedence).
+In most cases, you will use only shorthands provided by languages.
 
-\begin{note} Note the following:
+\begin{note} Keep in mind the following:
 \begin{enumerate}
 \item Activated chars used for two-char shorthands cannot be followed
   by a closing brace |}| and the spaces following are gobbled.  With
   one-char shorthands (eg,~|:|), they are preserved.
-\item If on a certain level (system, language, user) there is a
-  one-char shorthand, two-char ones starting with that
-  char and on the same level are ignored.
+\item If on a certain level (system, language, user, language user)
+  there is a one-char shorthand, two-char ones starting with that char
+  and on the same level are ignored.
 \item Since they are active, a shorthand cannot contain the same
-  character in its definition (except if it is deactivated with, eg,
+  character in its definition (except if deactivated with, eg,
   |\string|).
 \end{enumerate}
 \end{note}
@@ -1392,12 +1399,11 @@
 \begin{description}
 \itemsep=-\parskip
 \item[Arabic] Monolingual documents mostly work in \luatex, but it must
-  be fine tuned, and a recent version of
-  \textsf{fontspec}/\textsf{loaotfload} is required. In \xetex{}
+  be fine tuned, particularly graphical elements like |picture|. In \xetex{}
   \babel{} resorts to the \textsf{bidi} package, which seems to work.
-\item[Hebrew] Niqqud marks seem to work in both engines, but
-  cantillation marks are misplaced (\xetex{} or \luatex{} with Harfbuzz
-  seems better, but still problematic).
+\item[Hebrew] Niqqud marks seem to work in both engines, but depending 
+  on the font cantillation marks might be misplaced (\xetex{} or
+  \luatex{} with Harfbuzz seems better, but still problematic).
 \item[Devanagari] In \luatex{} and the the default renderer many fonts
 work, but some others do not, the main issue being the ‘ra’. You may
 need to set explicitly the script to either |deva| or |dev2|, eg:
@@ -1406,8 +1412,8 @@
 \end{verbatim}  
   Other Indic scripts are still under development in the default
   \luatex{} renderer, but should work with |Renderer=Harfbuzz|. They
-  also work with \xetex{}, although fine tuning the font behavior is
-  not always possible.
+  also work with \xetex{}, although unlike with \luatex{} fine tuning
+  the font behavior is not always possible.
 \item[Southeast scripts] Thai works in both \luatex{} and \xetex{}, but
   line breaking differs (rules can be modified in \luatex; they are
   hard-coded in \xetex). Lao seems to work, too, but there are no
@@ -2232,8 +2238,8 @@
   command, neither the script nor the language is 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
-  for several of them can be problematic, and also a “lower-level”
-  font selection is useful.
+  for several of them can be problematic, and also preserving a
+  “lower-level” font selection is useful.
 \end{note}
 
 \begin{note}
@@ -2368,11 +2374,13 @@
 something like:
 \begin{verbatim}
 \usepackage[danish]{babel}
-\babelprovide[captions=da,hyphenrules=nohyphenation]{danish}
+\babelprovide[captions=da, hyphenrules=nohyphenation]{danish}
 \end{verbatim}
 first loads |danish.ldf|, and then redefines the captions for
 \texttt{danish} (as provided by the |ini| file) and prevents
 hyphenation. The rest of the language definitions are not touched.
+Without the optional argument it just loads some aditional tools if
+provided by the |ini| file, like extra counters.
 
 \subsection{Creating a language}
 
@@ -2402,8 +2410,9 @@
 \begin{verbatim}
 Package babel Warning: \mylangchaptername not set. Please, define it
 (babel)                after the language has been loaded (typically
-(babel)                in the preamble) with something like:
-(babel)                \renewcommand\maylangchaptername{..}
+(babel)                in the preamble) with the help of
+(babel)                \setlocalecaption. An example is:
+(babel)                \setlocalecaption{mylang}{chapter}{..}
 (babel)                Reported on input line 18.
 \end{verbatim}
 
@@ -2415,8 +2424,8 @@
 \begin{verbatim}
 \usepackage[danish]{babel}
 \babelprovide{arhinish}
-\renewcommand\arhinishchaptername{Chapitula}
-\renewcommand\arhinishrefname{Refirenke}
+\setlocalecaption{arhinish}{chapter}{Chapitula}
+\setlocalecaption{arhinish}{refname}{Refirenke}
 \renewcommand\arhinishhyphenmins{22}
 \end{verbatim}
 \end{example}
@@ -2512,6 +2521,10 @@
 \usepackage[italian]{babel}
 \babelprovide[import, main]{polytonicgreek}
 \end{verbatim}
+Remerber there is an alternative syntax for the latter:
+\begin{verbatim}
+\usepackage[italian, polytonicgreek, provide=*]{babel}
+\end{verbatim}
 \end{example}
 
 \Describe{script=}{\meta{script-name}}
@@ -3031,7 +3044,7 @@
           \marg{lua-pattern}\marg{replacement}}
           
 \New{3.44-3-52} This command is not strictly about hyphenation, but
-it is include here because it is a clear counterpart of
+it is included here because it is a clear counterpart of
 |\babelposthyphenation|. It is similar to the latter, but (as its name
 implies) applied before hyphenation. There are other differences: (1)
 the first argument is the locale instead the name of hyphenation
@@ -3042,7 +3055,7 @@
 It handles glyphs and spaces (but you can not insert spaces).
 
 Performance is still somewhat poor in some cases, but it is fast in the
-most the typical ones.
+typical ones.
 
 This feature is activated with the first |\babelposthyphenation| or
 |\babelprehyphenation|.
@@ -3102,16 +3115,16 @@
 
 \usepackage[danish]{babel}
 
-\babeladjust{
-  autoload.bcp47 = on,
-  autoload.bcp47.options = import
-}
+_\babeladjust{_
+_  autoload.bcp47 = on,_
+_  autoload.bcp47.options = import_
+_}_
 
 \begin{document}
 
 Chapter in Danish: \chaptername.
 
-\selectlanguage{de-AT}
+_\selectlanguage{de-AT}_
 
 \localedate{2020}{1}{30}
 
@@ -3128,7 +3141,7 @@
 
 The behaviour is adjusted with |\babeladjust| with the following parameters:
 \begin{description}
-\item \texttt{autoload.bcp47} with values on and off.
+\item \texttt{autoload.bcp47} with values |on| and |off|.
 \item \texttt{autoload.bcp47.options}, which are passed to
   |\babelprovide|; empty by default, but you may add \texttt{import}
   (features defined in the corresponding |babel-...tex| file might not
@@ -3800,7 +3813,6 @@
 \addto\extrasfrench{\inputencoding{latin1}}
 \addto\extrasrussian{\inputencoding{koi8-r}}
 \end{verbatim}
-   (A recent version of \textsf{inputenc} is required.)
  \item For the hyphenation to work correctly, lccodes cannot change,
    because \TeX{} only takes into account the values when the
    paragraph is hyphenated, i.e., when it has been
@@ -4753,6 +4765,8 @@
 %
 % \part{Source code}
 %
+% \small
+%
 % \babel{} is being developed incrementally, which means parts of the
 % code are under development and therefore incomplete. Only documented
 % features are considered complete. In other words, use \babel{} only
@@ -4837,8 +4851,8 @@
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.52>>
-%<<date=2020/12/16>>
+%<<version=3.53>>
+%<<date=2021/01/26>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5287,11 +5301,12 @@
 \def\bbl at nocaption@i#1#2{% 1: text to be printed 2: caption macro \langXname
   \global\@namedef{#2}{\textbf{?#1?}}%
   \@nameuse{#2}%
-  \bbl at warning{%
+  \bbl at warning{% TODO.
     \@backslashchar#2 not set. Please, define it\\%
     after the language has been loaded (typically\\%
-    in the preamble) with something like:\\%
-    \string\renewcommand\@backslashchar#2{..}\\%
+    in the preamble) with the help of\\%
+    \string\setlocalecaption. An example is:\\% 
+    \string\setlocalecaption{mylang}{chapter}{..}\\
     Reported}}
 \def\bbl at tentative{\protect\bbl at tentative@i}
 \def\bbl at tentative@i#1{%
@@ -7385,12 +7400,28 @@
   \expandafter\ifx\csname date\languagename\endcsname\relax\else
     \if at filesw
       \ifx\babel at aux\@gobbletwo\else % Set if single in the first, redundant
+        % \bbl at savelastskip
         \protected at write\@auxout{}{\string\babel at aux{\bbl at auxname}{}}%
+        % \bbl at restorelastskip
       \fi
       \bbl at usehooks{write}{}%
     \fi
   \fi}
-% 
+% The following is used above to deal with skips before the write
+% whatsit. Adapted from hyperref, but it might fail, so for the moment
+% it's not activated. TODO.
+\def\bbl at savelastskip{%
+  \let\bbl at restorelastskip\relax
+  \ifvmode
+    \ifdim\lastskip=\z@
+      \let\bbl at restorelastskip\nobreak
+    \else
+      \bbl at exp{%
+        \def\\\bbl at restorelastskip{%
+          \skip@=\the\lastskip
+          \\\nobreak \vskip-\skip@ \vskip\skip@}}%
+    \fi
+  \fi}
 \newif\ifbbl at bcpallowed
 \bbl at bcpallowedfalse
 \def\select at language#1{% from set@, babel at aux
@@ -7910,8 +7941,9 @@
   \bbl at warning{%
     \@backslashchar#2 not set. Please, define it\\%
     after the language has been loaded (typically\\%
-    in the preamble) with something like:\\%
-    \string\renewcommand\@backslashchar#2{..}\\%
+    in the preamble) with the help of\\%
+    \string\setlocalecaption. An example is\\%
+    \string\setlocalecaption{mylang}{chapter}{..}\\
     Reported}}
 \def\bbl at tentative{\protect\bbl at tentative@i}
 \def\bbl at tentative@i#1{%
@@ -8236,7 +8268,7 @@
 %
 %    \begin{macrocode}
 \bbl at trace{Macros for setting language files up}
-\def\bbl at ldfinit{% TODO. Merge into the next macro? Unused elsewhere
+\def\bbl at ldfinit{%
   \let\bbl at screset\@empty
   \let\BabelStrings\bbl at opt@string
   \let\BabelOptions\@empty
@@ -10027,53 +10059,58 @@
 \newcommand\setlocalecaption{%  TODO. Catch typos. What about ensure?
   \@ifstar\bbl at setcaption@s\bbl at setcaption@x}
 \def\bbl at setcaption@x#1#2#3{%  language caption-name string
-  \edef\bbl at tempa{#1}%
-  \edef\bbl at tempd{%
-    \expandafter\expandafter\expandafter
-    \strip at prefix\expandafter\meaning\csname captions#1\endcsname}%
-  \bbl at xin@
-    {\expandafter\string\csname #2name\endcsname}%
-    {\bbl at tempd}%
-  \ifin@ % Renew caption
-    \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% 
-    \ifin@
-      \bbl at exp{%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\\\bbl at scset\<#2name>\<#1#2name>}%
-          {}}%
-    \else % Old way converts to new way
-      \bbl at ifunset{#1#2name}%
-        {\bbl at exp{%
-          \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%
+  \bbl at trim@def\bbl at tempa{#2}%
+  \bbl at xin@{.template}{\bbl at tempa}%
+  \ifin@
+    \bbl at ini@captions at template{#3}{#1}%
+  \else
+    \edef\bbl at tempd{%
+      \expandafter\expandafter\expandafter
+      \strip at prefix\expandafter\meaning\csname captions#1\endcsname}%
+    \bbl at xin@
+      {\expandafter\string\csname #2name\endcsname}%
+      {\bbl at tempd}%
+    \ifin@ % Renew caption
+      \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% 
+      \ifin@
+        \bbl at exp{%
           \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+            {\\\bbl at scset\<#2name>\<#1#2name>}%
+            {}}%
+      \else % Old way converts to new way
+        \bbl at ifunset{#1#2name}%
+          {\bbl at exp{%
+            \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%
+            \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+              {\def\<#2name>{\<#1#2name>}}%
+              {}}}%
+          {}%
+      \fi
+    \else
+      \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% New
+      \ifin@ % New way
+        \bbl at exp{%
+          \\\bbl at add\<captions#1>{\\\bbl at scset\<#2name>\<#1#2name>}%
+          \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+            {\\\bbl at scset\<#2name>\<#1#2name>}%
+            {}}%
+      \else  % Old way, but defined in the new way
+        \bbl at exp{%
+          \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%      
+          \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
             {\def\<#2name>{\<#1#2name>}}%
-            {}}}%
-        {}%
+            {}}%
+      \fi%
     \fi
-  \else
-    \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% New
-    \ifin@ % New way
-      \bbl at exp{%
-        \\\bbl at add\<captions#1>{\\\bbl at scset\<#2name>\<#1#2name>}%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\\\bbl at scset\<#2name>\<#1#2name>}%
-          {}}%
-    \else  % Old way, but defined in the new way
-      \bbl at exp{%
-        \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%      
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\def\<#2name>{\<#1#2name>}}%
-          {}}%
-    \fi%
-  \fi
-  \@namedef{#1#2name}{#3}%
-  \toks@\expandafter{\bbl at captionslist}%
-  \bbl at exp{\\\in@{\<#2name>}{\the\toks@}}%
-  \ifin@\else
-    \bbl at exp{\\\bbl at add\\\bbl at captionslist{\<#2name>}}%
-    \bbl at toglobal\bbl at captionslist
+    \@namedef{#1#2name}{#3}%
+    \toks@\expandafter{\bbl at captionslist}%
+    \bbl at exp{\\\in@{\<#2name>}{\the\toks@}}%
+    \ifin@\else
+      \bbl at exp{\\\bbl at add\\\bbl at captionslist{\<#2name>}}%
+      \bbl at toglobal\bbl at captionslist
+    \fi
   \fi}
-% \def\bbl at setcaption@s#1#2#3{}  % Not yet implemented
+% \def\bbl at setcaption@s#1#2#3{}  % TODO. Not yet implemented
 %    \end{macrocode}
 %
 % \subsection{Macros common to a number of languages}
@@ -10637,6 +10674,20 @@
     \else
       \bbl at csarg\def{KVP@##1}{##2}%
     \fi}%
+  % == init ==
+  \ifx\bbl at screset\@undefined
+    \bbl at ldfinit
+  \fi
+  % ==
+  \let\bbl at lbkflag\relax % \@empty = do setup linebreak
+  \bbl at ifunset{date#2}%
+    {\let\bbl at lbkflag\@empty}% new
+    {\ifx\bbl at KVP@hyphenrules\@nil\else
+       \let\bbl at lbkflag\@empty
+     \fi
+     \ifx\bbl at KVP@import\@nil\else
+       \let\bbl at lbkflag\@empty
+     \fi}%
   % == import, captions ==
   \ifx\bbl at KVP@import\@nil\else
     \bbl at exp{\\\bbl at ifblank{\bbl at KVP@import}}%
@@ -10657,30 +10708,31 @@
   \bbl at ifunset{date#2}%
     {\bbl at provide@new{#2}}%
     {\bbl at ifblank{#1}%
-      {\bbl at error
-        {If you want to modify `#2' you must tell how in\\%
-         the optional argument. See the manual for the\\%
-         available options.}%
-        {Use this macro as documented}}%
+      {}%  With \bbl at load@basic below
       {\bbl at provide@renew{#2}}}%
   % Post tasks
-  \bbl at ifunset{bbl at extracaps@#2}%
-    {\bbl at exp{\\\babelensure[exclude=\\\today]{#2}}}%
-    {\toks@\expandafter\expandafter\expandafter
-      {\csname bbl at extracaps@#2\endcsname}%
-     \bbl at exp{\\\babelensure[exclude=\\\today,include=\the\toks@}]{#2}}%
-  \bbl at ifunset{bbl at ensure@\languagename}%
-    {\bbl at exp{%
-      \\\DeclareRobustCommand\<bbl at ensure@\languagename>[1]{%
-        \\\foreignlanguage{\languagename}%
-        {####1}}}}%
-    {}%
-  \bbl at exp{%
-     \\\bbl at toglobal\<bbl at ensure@\languagename>%
-     \\\bbl at toglobal\<bbl at ensure@\languagename\space>}%
+  % ----------
+  % == ensure captions ==
+  \ifx\bbl at KVP@captions\@nil\else
+    \bbl at ifunset{bbl at extracaps@#2}%
+      {\bbl at exp{\\\babelensure[exclude=\\\today]{#2}}}%
+      {\toks@\expandafter\expandafter\expandafter
+        {\csname bbl at extracaps@#2\endcsname}%
+       \bbl at exp{\\\babelensure[exclude=\\\today,include=\the\toks@}]{#2}}%
+    \bbl at ifunset{bbl at ensure@\languagename}%
+      {\bbl at exp{%
+        \\\DeclareRobustCommand\<bbl at ensure@\languagename>[1]{%
+          \\\foreignlanguage{\languagename}%
+          {####1}}}}%
+      {}%
+    \bbl at exp{%
+       \\\bbl at toglobal\<bbl at ensure@\languagename>%
+       \\\bbl at toglobal\<bbl at ensure@\languagename\space>}%
+  \fi
+  % ==
   % At this point all parameters are defined if 'import'. Now we
   % execute some code depending on them. But what about if nothing was
-  % imported? We just load the very basic parameters.
+  % imported? We just set the very basic parameters.
   \bbl at load@basic{#2}%
   % == script, language ==
   % Override the values from ini or defines them
@@ -10777,30 +10829,31 @@
     \bbl at csarg\edef{intsp@#2}{\bbl at KVP@intraspace}%
   \fi
   \bbl at provide@intraspace
-  % == Line breaking: hyphenate.other.locale ==
-  \bbl at ifunset{bbl at hyotl@\languagename}{}%
-    {\bbl at csarg\bbl at replace{hyotl@\languagename}{ }{,}%
-     \bbl at startcommands*{\languagename}{}%
-       \bbl at csarg\bbl at foreach{hyotl@\languagename}{%
+  % == Line breaking: hyphenate.other.locale/.script==
+  \ifx\bbl at lbkflag\@empty
+    \bbl at ifunset{bbl at hyotl@\languagename}{}%
+      {\bbl at csarg\bbl at replace{hyotl@\languagename}{ }{,}%
+       \bbl at startcommands*{\languagename}{}%
+         \bbl at csarg\bbl at foreach{hyotl@\languagename}{%
+           \ifcase\bbl at engine
+             \ifnum##1<257
+               \SetHyphenMap{\BabelLower{##1}{##1}}%
+             \fi
+           \else
+             \SetHyphenMap{\BabelLower{##1}{##1}}%
+           \fi}%
+       \bbl at endcommands}%
+    \bbl at ifunset{bbl at hyots@\languagename}{}%
+      {\bbl at csarg\bbl at replace{hyots@\languagename}{ }{,}%
+       \bbl at csarg\bbl at foreach{hyots@\languagename}{%
          \ifcase\bbl at engine
            \ifnum##1<257
-             \SetHyphenMap{\BabelLower{##1}{##1}}%
+             \global\lccode##1=##1\relax
            \fi
          \else
-           \SetHyphenMap{\BabelLower{##1}{##1}}%
-         \fi}%
-     \bbl at endcommands}%
-  % == Line breaking: hyphenate.other.script ==
-  \bbl at ifunset{bbl at hyots@\languagename}{}%
-    {\bbl at csarg\bbl at replace{hyots@\languagename}{ }{,}%
-     \bbl at csarg\bbl at foreach{hyots@\languagename}{%
-       \ifcase\bbl at engine
-         \ifnum##1<257
            \global\lccode##1=##1\relax
-         \fi
-       \else
-         \global\lccode##1=##1\relax
-       \fi}}%
+         \fi}}%
+  \fi
   % == Counters: maparabic ==
   % Native digits, if provided in ini (TeX level, xe and lua)
   \ifcase\bbl at engine\else
@@ -10990,7 +11043,9 @@
    \EndBabelCommands
   \fi
   % == hyphenrules ==
-  \bbl at provide@hyphens{#1}}
+  \ifx\bbl at lbkflag\@empty
+    \bbl at provide@hyphens{#1}%
+  \fi}
 % Load the basic parameters (ids, typography, counters, and a few
 % more), while captions and dates are left out. But it may happen some
 % data has been loaded before automatically, so we first discard the
@@ -11049,10 +11104,10 @@
           {\bbl at exp{\let\bbl at tempa\<l@##1>}}%
       \fi}%
   \fi
-  \ifx\bbl at tempa\relax %        if no opt or no language in opt found
+  \ifx\bbl at tempa\relax %         if no opt or no language in opt found
     \ifx\bbl at KVP@import\@nil
       \ifx\bbl at initoload\relax\else
-        \bbl at exp{%                    and hyphenrules is not empty
+        \bbl at exp{%               and hyphenrules is not empty
           \\\bbl at ifblank{\bbl at cs{hyphr@#1}}%
             {}%
             {\let\\\bbl at tempa\<l@\bbl at cl{hyphr}>}}%
@@ -11069,7 +11124,6 @@
        {\bbl at exp{\\\adddialect\<l@#1>\language}}%
        {}}%                      so, l@<lang> is ok - nothing to do
     {\bbl at exp{\\\adddialect\<l@#1>\bbl at tempa}}}% found in opt list or ini
-
 %    \end{macrocode}
 %
 % The reader of |ini| files. There are 3 possible cases: a section name
@@ -11338,37 +11392,29 @@
 % The auxiliary macro for captions define |\<caption>name|.
 %
 %    \begin{macrocode}
+\def\bbl at ini@captions at template#1#2{% string language tempa=capt-name
+  \bbl at replace\bbl at tempa{.template}{}%
+  \def\bbl at toreplace{#1{}}%
+  \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
+  \bbl at replace\bbl at toreplace{[[}{\csname}%
+  \bbl at replace\bbl at toreplace{[}{\csname the}% 
+  \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
+  \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
+  \bbl at xin@{,\bbl at tempa,}{,chapter,appendix,part,}%
+  \ifin@
+    \@nameuse{bbl at patch\bbl at tempa}%
+    \global\bbl at csarg\let{\bbl at tempa fmt@#2}\bbl at toreplace
+  \fi 
+  \bbl at xin@{,\bbl at tempa,}{,figure,table,}%
+  \ifin@
+    \toks@\expandafter{\bbl at toreplace}%
+    \bbl at exp{\gdef\<fnum@\bbl at tempa>{\the\toks@}}%
+  \fi}
 \def\bbl at ini@captions at aux#1#2{%
   \bbl at trim@def\bbl at tempa{#1}%
   \bbl at xin@{.template}{\bbl at tempa}%
   \ifin@
-    \bbl at replace\bbl at tempa{.template}{}%
-    \def\bbl at toreplace{#2}%
-    \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
-    \bbl at replace\bbl at toreplace{[[}{\csname}%
-    \bbl at replace\bbl at toreplace{[}{\csname the}% 
-    \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
-    \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
-    \bbl at xin@{,\bbl at tempa,}{,chapter,}%
-    \ifin@
-      \bbl at patchchapter
-      \global\bbl at csarg\let{chapfmt@\languagename}\bbl at toreplace
-    \fi 
-    \bbl at xin@{,\bbl at tempa,}{,appendix,}%
-    \ifin@
-      \bbl at patchchapter
-      \global\bbl at csarg\let{appxfmt@\languagename}\bbl at toreplace
-    \fi 
-    \bbl at xin@{,\bbl at tempa,}{,part,}%
-    \ifin@
-      \bbl at patchpart
-      \global\bbl at csarg\let{partfmt@\languagename}\bbl at toreplace
-    \fi 
-    \bbl at xin@{,\bbl at tempa,}{,figure,table,}%
-    \ifin@
-      \toks@\expandafter{\bbl at toreplace}%
-      \bbl at exp{\gdef\<fnum@\bbl at tempa>{\the\toks@}}%
-    \fi
+    \bbl at ini@captions at template{#2}\languagename
   \else
     \bbl at ifblank{#2}%
       {\bbl at exp{%
@@ -11457,7 +11503,7 @@
 % but not all. Actually, the following lines are somewhat tentative.
 %
 %    \begin{macrocode}
-\def\bbl at chaptype{chap}
+\def\bbl at chaptype{chapter}
 \ifx\@makechapterhead\@undefined
   \let\bbl at patchchapter\relax
 \else\ifx\thechapter\@undefined
@@ -11467,7 +11513,7 @@
 \else
   \def\bbl at patchchapter{%
     \global\let\bbl at patchchapter\relax
-    \bbl at add\appendix{\def\bbl at chaptype{appx}}% Not harmful, I hope
+    \bbl at add\appendix{\def\bbl at chaptype{appendix}}% Not harmful, I hope
     \bbl at toglobal\appendix
     \bbl at sreplace\ps at headings
       {\@chapapp\ \thechapter}%
@@ -11485,6 +11531,7 @@
       \bbl at ifunset{bbl@\bbl at chaptype fmt@\languagename}%
         {\@chapapp\space\thechapter}
         {\@nameuse{bbl@\bbl at chaptype fmt@\languagename}}}}
+  \let\bbl at patchappendix\bbl at patchchapter
 \fi\fi\fi
 \ifx\@part\@undefined
   \let\bbl at patchpart\relax
@@ -13230,10 +13277,10 @@
 % First, some general code for line breaking, used by
 % |\babelposthyphenation|.
 %
-% \textit{In progress.} Replace regular (ie, implicit) discretionaries
-% by spaceskips, based on the previous glyph (which I think makes
-% sense, because the hyphen and the previous char go always together).
-% Other discretionaries are not touched. See Unicode UAX 14.
+% Replace regular (ie, implicit) discretionaries by spaceskips, based
+% on the previous glyph (which I think makes sense, because the hyphen
+% and the previous char go always together). Other discretionaries are
+% not touched. See Unicode UAX 14.
 %
 %    \begin{macrocode}
 % TODO - to a lua file
@@ -13486,6 +13533,7 @@
 % TODO - to a lua file
 \directlua{
 Babel.script_blocks = {
+  ['dflt'] = {},
   ['Arab'] = {{0x0600, 0x06FF}, {0x08A0, 0x08FF}, {0x0750, 0x077F},
               {0xFE70, 0xFEFF}, {0xFB50, 0xFDFF}, {0x1EE00, 0x1EEFF}},
   ['Armn'] = {{0x0530, 0x058F}},
@@ -14224,26 +14272,23 @@
   {}
 \IfBabelLayout{graphics}
   {\let\bbl at pictresetdir\relax
-   \def\bbl at pictsetdir{%
+   \def\bbl at pictsetdir#1{%
      \ifcase\bbl at thetextdir
        \let\bbl at pictresetdir\relax
      \else
-       \textdir TLT\relax
-       \def\bbl at pictresetdir{\textdir TRT\relax}%
+       \bodydir TLT
+       % \(text|par)dir required in pgf:
+       \def\bbl at pictresetdir{\bodydir TRT\pardir TRT\textdir TRT\relax}%
      \fi}%
-   \let\bbl at OL@@picture\@picture
-   \let\bbl at OL@put\put
-   \bbl at sreplace\@picture{\hskip-}{\bbl at pictsetdir\hskip-}%
-   \def\put(#1,#2)#3{%  Not easy to patch. Better redefine.
-     \@killglue
-     \raise#2\unitlength
-     \hb at xt@\z@{\kern#1\unitlength{\bbl at pictresetdir#3}\hss}}%
+   \ifx\AddToHook\@undefined\else
+     \AddToHook{env/picture/begin}{\bbl at pictsetdir\z@}%
+   \fi
    \AtBeginDocument
      {\ifx\tikz at atbegin@node\@undefined\else
         \let\bbl at OL@pgfpicture\pgfpicture
         \bbl at sreplace\pgfpicture{\pgfpicturetrue}%
-          {\bbl at pictsetdir\pgfpicturetrue}%
-        \bbl at add\pgfsys at beginpicture{\bbl at pictsetdir}%
+          {\bbl at pictsetdir\@ne\pgfpicturetrue}%
+        \bbl at add\pgfsys at beginpicture{\bbl at pictsetdir\@ne}%
         \bbl at add\tikz at atbegin@node{\bbl at pictresetdir}%
       \fi}}
   {}
@@ -20950,7 +20995,13 @@
       first_et = nil
       has_en = false
     end
-
+    
+    -- Force mathdir in math if ON (currently works as expected only
+    -- with 'l')
+    if inmath and d == 'on' then
+      d = ('TRT' == tex.mathdir) and 'r' or 'l'
+    end
+      
     if d then
       if d == 'al' then
         d = 'r'

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.ins	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.ins	2021-01-26 21:47:29 UTC (rev 57530)
@@ -3,7 +3,7 @@
 %% driver files from the doc files in this package when run through
 %% LaTeX or TeX.
 %%
-%% Copyright 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright 2012-2021 Javier Bezos and Johannes L. Braams.
 %% Copyright 1989-2008 Johannes L. Braams and any individual authors
 %% listed elsewhere in this file.  All rights reserved.
 %% 
@@ -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{2020/12/16}
+\def\filedate{2021/01/26}
 \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	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2021-01-26 21:47:29 UTC (rev 57530)
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/12/16 v3.52]
+\ProvidesFile{bbcompat.dtx}[2021/01/26 v3.53]
 %</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-bidi-basic-r.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 -- babel.dtx  (with options: `basic-r')
 -- 
 --
--- Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+-- Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 -- babel.dtx  (with options: `basic')
 -- 
 --
--- Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+-- Copyright (C) 2012-2021 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.
@@ -268,6 +268,12 @@
       has_en = false
     end
 
+    -- Force mathdir in math if ON (currently works as expected only
+    -- with 'l')
+    if inmath and d == 'on' then
+      d = ('TRT' == tex.mathdir) and 'r' or 'l'
+    end
+
     if d then
       if d == 'al' then
         d = 'r'

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 -- babel.dtx  (with options: `bididata')
 -- 
 --
--- Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+-- Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 -- babel.dtx  (with options: `cjkdata')
 -- 
 --
--- Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+-- Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.def	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.def	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `core')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.
@@ -39,7 +39,7 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{babel.def}[2020/12/16 3.52 Babel common definitions]
+\ProvidesFile{babel.def}[2021/01/26 3.53 Babel common definitions]
 \ifx\AtBeginDocument\@undefined  % TODO. change test.
     % == Code for plain ==
 \def\@empty{}
@@ -397,8 +397,8 @@
 \fi
 \countdef\last at language=19  % TODO. why? remove?
 \def\addlanguage{\csname newlanguage\endcsname}
-\def\bbl at version{3.52}
-\def\bbl at date{2020/12/16}
+\def\bbl at version{3.53}
+\def\bbl at date{2021/01/26}
 \def\adddialect#1#2{%
   \global\chardef#1#2\relax
   \bbl at usehooks{adddialect}{{#1}{#2}}%
@@ -584,11 +584,25 @@
   \expandafter\ifx\csname date\languagename\endcsname\relax\else
     \if at filesw
       \ifx\babel at aux\@gobbletwo\else % Set if single in the first, redundant
+        % \bbl at savelastskip
         \protected at write\@auxout{}{\string\babel at aux{\bbl at auxname}{}}%
+        % \bbl at restorelastskip
       \fi
       \bbl at usehooks{write}{}%
     \fi
   \fi}
+\def\bbl at savelastskip{%
+  \let\bbl at restorelastskip\relax
+  \ifvmode
+    \ifdim\lastskip=\z@
+      \let\bbl at restorelastskip\nobreak
+    \else
+      \bbl at exp{%
+        \def\\\bbl at restorelastskip{%
+          \skip@=\the\lastskip
+          \\\nobreak \vskip-\skip@ \vskip\skip@}}%
+    \fi
+  \fi}
 \newif\ifbbl at bcpallowed
 \bbl at bcpallowedfalse
 \def\select at language#1{% from set@, babel at aux
@@ -860,8 +874,9 @@
   \bbl at warning{%
     \@backslashchar#2 not set. Please, define it\\%
     after the language has been loaded (typically\\%
-    in the preamble) with something like:\\%
-    \string\renewcommand\@backslashchar#2{..}\\%
+    in the preamble) with the help of\\%
+    \string\setlocalecaption. An example is\\%
+    \string\setlocalecaption{mylang}{chapter}{..}\\
     Reported}}
 \def\bbl at tentative{\protect\bbl at tentative@i}
 \def\bbl at tentative@i#1{%
@@ -1206,7 +1221,7 @@
   \tablename\partname\enclname\ccname\headtoname\pagename\seename
   \alsoname\proofname\glossaryname}
 \bbl at trace{Macros for setting language files up}
-\def\bbl at ldfinit{% TODO. Merge into the next macro? Unused elsewhere
+\def\bbl at ldfinit{%
   \let\bbl at screset\@empty
   \let\BabelStrings\bbl at opt@string
   \let\BabelOptions\@empty
@@ -2028,51 +2043,56 @@
 \newcommand\setlocalecaption{%  TODO. Catch typos. What about ensure?
   \@ifstar\bbl at setcaption@s\bbl at setcaption@x}
 \def\bbl at setcaption@x#1#2#3{%  language caption-name string
-  \edef\bbl at tempa{#1}%
-  \edef\bbl at tempd{%
-    \expandafter\expandafter\expandafter
-    \strip at prefix\expandafter\meaning\csname captions#1\endcsname}%
-  \bbl at xin@
-    {\expandafter\string\csname #2name\endcsname}%
-    {\bbl at tempd}%
-  \ifin@ % Renew caption
-    \bbl at xin@{\string\bbl at scset}{\bbl at tempd}%
-    \ifin@
-      \bbl at exp{%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\\\bbl at scset\<#2name>\<#1#2name>}%
-          {}}%
-    \else % Old way converts to new way
-      \bbl at ifunset{#1#2name}%
-        {\bbl at exp{%
+  \bbl at trim@def\bbl at tempa{#2}%
+  \bbl at xin@{.template}{\bbl at tempa}%
+  \ifin@
+    \bbl at ini@captions at template{#3}{#1}%
+  \else
+    \edef\bbl at tempd{%
+      \expandafter\expandafter\expandafter
+      \strip at prefix\expandafter\meaning\csname captions#1\endcsname}%
+    \bbl at xin@
+      {\expandafter\string\csname #2name\endcsname}%
+      {\bbl at tempd}%
+    \ifin@ % Renew caption
+      \bbl at xin@{\string\bbl at scset}{\bbl at tempd}%
+      \ifin@
+        \bbl at exp{%
+          \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+            {\\\bbl at scset\<#2name>\<#1#2name>}%
+            {}}%
+      \else % Old way converts to new way
+        \bbl at ifunset{#1#2name}%
+          {\bbl at exp{%
+            \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%
+            \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+              {\def\<#2name>{\<#1#2name>}}%
+              {}}}%
+          {}%
+      \fi
+    \else
+      \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% New
+      \ifin@ % New way
+        \bbl at exp{%
+          \\\bbl at add\<captions#1>{\\\bbl at scset\<#2name>\<#1#2name>}%
+          \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+            {\\\bbl at scset\<#2name>\<#1#2name>}%
+            {}}%
+      \else  % Old way, but defined in the new way
+        \bbl at exp{%
           \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%
           \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
             {\def\<#2name>{\<#1#2name>}}%
-            {}}}%
-        {}%
+            {}}%
+      \fi%
     \fi
-  \else
-    \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% New
-    \ifin@ % New way
-      \bbl at exp{%
-        \\\bbl at add\<captions#1>{\\\bbl at scset\<#2name>\<#1#2name>}%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\\\bbl at scset\<#2name>\<#1#2name>}%
-          {}}%
-    \else  % Old way, but defined in the new way
-      \bbl at exp{%
-        \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\def\<#2name>{\<#1#2name>}}%
-          {}}%
-    \fi%
-  \fi
-  \@namedef{#1#2name}{#3}%
-  \toks@\expandafter{\bbl at captionslist}%
-  \bbl at exp{\\\in@{\<#2name>}{\the\toks@}}%
-  \ifin@\else
-    \bbl at exp{\\\bbl at add\\\bbl at captionslist{\<#2name>}}%
-    \bbl at toglobal\bbl at captionslist
+    \@namedef{#1#2name}{#3}%
+    \toks@\expandafter{\bbl at captionslist}%
+    \bbl at exp{\\\in@{\<#2name>}{\the\toks@}}%
+    \ifin@\else
+      \bbl at exp{\\\bbl at add\\\bbl at captionslist{\<#2name>}}%
+      \bbl at toglobal\bbl at captionslist
+    \fi
   \fi}
 \bbl at trace{Macros related to glyphs}
 \def\set at low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}%
@@ -2326,6 +2346,20 @@
     \else
       \bbl at csarg\def{KVP@##1}{##2}%
     \fi}%
+  % == init ==
+  \ifx\bbl at screset\@undefined
+    \bbl at ldfinit
+  \fi
+  % ==
+  \let\bbl at lbkflag\relax % \@empty = do setup linebreak
+  \bbl at ifunset{date#2}%
+    {\let\bbl at lbkflag\@empty}% new
+    {\ifx\bbl at KVP@hyphenrules\@nil\else
+       \let\bbl at lbkflag\@empty
+     \fi
+     \ifx\bbl at KVP@import\@nil\else
+       \let\bbl at lbkflag\@empty
+     \fi}%
   % == import, captions ==
   \ifx\bbl at KVP@import\@nil\else
     \bbl at exp{\\\bbl at ifblank{\bbl at KVP@import}}%
@@ -2346,30 +2380,31 @@
   \bbl at ifunset{date#2}%
     {\bbl at provide@new{#2}}%
     {\bbl at ifblank{#1}%
-      {\bbl at error
-        {If you want to modify `#2' you must tell how in\\%
-         the optional argument. See the manual for the\\%
-         available options.}%
-        {Use this macro as documented}}%
+      {}%  With \bbl at load@basic below
       {\bbl at provide@renew{#2}}}%
   % Post tasks
-  \bbl at ifunset{bbl at extracaps@#2}%
-    {\bbl at exp{\\\babelensure[exclude=\\\today]{#2}}}%
-    {\toks@\expandafter\expandafter\expandafter
-      {\csname bbl at extracaps@#2\endcsname}%
-     \bbl at exp{\\\babelensure[exclude=\\\today,include=\the\toks@}]{#2}}%
-  \bbl at ifunset{bbl at ensure@\languagename}%
-    {\bbl at exp{%
-      \\\DeclareRobustCommand\<bbl at ensure@\languagename>[1]{%
-        \\\foreignlanguage{\languagename}%
-        {####1}}}}%
-    {}%
-  \bbl at exp{%
-     \\\bbl at toglobal\<bbl at ensure@\languagename>%
-     \\\bbl at toglobal\<bbl at ensure@\languagename\space>}%
+  % ----------
+  % == ensure captions ==
+  \ifx\bbl at KVP@captions\@nil\else
+    \bbl at ifunset{bbl at extracaps@#2}%
+      {\bbl at exp{\\\babelensure[exclude=\\\today]{#2}}}%
+      {\toks@\expandafter\expandafter\expandafter
+        {\csname bbl at extracaps@#2\endcsname}%
+       \bbl at exp{\\\babelensure[exclude=\\\today,include=\the\toks@}]{#2}}%
+    \bbl at ifunset{bbl at ensure@\languagename}%
+      {\bbl at exp{%
+        \\\DeclareRobustCommand\<bbl at ensure@\languagename>[1]{%
+          \\\foreignlanguage{\languagename}%
+          {####1}}}}%
+      {}%
+    \bbl at exp{%
+       \\\bbl at toglobal\<bbl at ensure@\languagename>%
+       \\\bbl at toglobal\<bbl at ensure@\languagename\space>}%
+  \fi
+  % ==
   % At this point all parameters are defined if 'import'. Now we
   % execute some code depending on them. But what about if nothing was
-  % imported? We just load the very basic parameters.
+  % imported? We just set the very basic parameters.
   \bbl at load@basic{#2}%
   % == script, language ==
   % Override the values from ini or defines them
@@ -2466,30 +2501,31 @@
     \bbl at csarg\edef{intsp@#2}{\bbl at KVP@intraspace}%
   \fi
   \bbl at provide@intraspace
-  % == Line breaking: hyphenate.other.locale ==
-  \bbl at ifunset{bbl at hyotl@\languagename}{}%
-    {\bbl at csarg\bbl at replace{hyotl@\languagename}{ }{,}%
-     \bbl at startcommands*{\languagename}{}%
-       \bbl at csarg\bbl at foreach{hyotl@\languagename}{%
+  % == Line breaking: hyphenate.other.locale/.script==
+  \ifx\bbl at lbkflag\@empty
+    \bbl at ifunset{bbl at hyotl@\languagename}{}%
+      {\bbl at csarg\bbl at replace{hyotl@\languagename}{ }{,}%
+       \bbl at startcommands*{\languagename}{}%
+         \bbl at csarg\bbl at foreach{hyotl@\languagename}{%
+           \ifcase\bbl at engine
+             \ifnum##1<257
+               \SetHyphenMap{\BabelLower{##1}{##1}}%
+             \fi
+           \else
+             \SetHyphenMap{\BabelLower{##1}{##1}}%
+           \fi}%
+       \bbl at endcommands}%
+    \bbl at ifunset{bbl at hyots@\languagename}{}%
+      {\bbl at csarg\bbl at replace{hyots@\languagename}{ }{,}%
+       \bbl at csarg\bbl at foreach{hyots@\languagename}{%
          \ifcase\bbl at engine
            \ifnum##1<257
-             \SetHyphenMap{\BabelLower{##1}{##1}}%
+             \global\lccode##1=##1\relax
            \fi
          \else
-           \SetHyphenMap{\BabelLower{##1}{##1}}%
-         \fi}%
-     \bbl at endcommands}%
-  % == Line breaking: hyphenate.other.script ==
-  \bbl at ifunset{bbl at hyots@\languagename}{}%
-    {\bbl at csarg\bbl at replace{hyots@\languagename}{ }{,}%
-     \bbl at csarg\bbl at foreach{hyots@\languagename}{%
-       \ifcase\bbl at engine
-         \ifnum##1<257
            \global\lccode##1=##1\relax
-         \fi
-       \else
-         \global\lccode##1=##1\relax
-       \fi}}%
+         \fi}}%
+  \fi
   % == Counters: maparabic ==
   % Native digits, if provided in ini (TeX level, xe and lua)
   \ifcase\bbl at engine\else
@@ -2672,7 +2708,9 @@
    \EndBabelCommands
   \fi
   % == hyphenrules ==
-  \bbl at provide@hyphens{#1}}
+  \ifx\bbl at lbkflag\@empty
+    \bbl at provide@hyphens{#1}%
+  \fi}
 \def\bbl at linebreak@export{%
   \bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
   \bbl at exportkey{hyphr}{typography.hyphenrules}{}%
@@ -2722,10 +2760,10 @@
           {\bbl at exp{\let\bbl at tempa\<l@##1>}}%
       \fi}%
   \fi
-  \ifx\bbl at tempa\relax %        if no opt or no language in opt found
+  \ifx\bbl at tempa\relax %         if no opt or no language in opt found
     \ifx\bbl at KVP@import\@nil
       \ifx\bbl at initoload\relax\else
-        \bbl at exp{%                    and hyphenrules is not empty
+        \bbl at exp{%               and hyphenrules is not empty
           \\\bbl at ifblank{\bbl at cs{hyphr@#1}}%
             {}%
             {\let\\\bbl at tempa\<l@\bbl at cl{hyphr}>}}%
@@ -2742,7 +2780,6 @@
        {\bbl at exp{\\\adddialect\<l@#1>\language}}%
        {}}%                      so, l@<lang> is ok - nothing to do
     {\bbl at exp{\\\adddialect\<l@#1>\bbl at tempa}}}% found in opt list or ini
-
 \ifx\bbl at readstream\@undefined
   \csname newread\endcsname\bbl at readstream
 \fi
@@ -2946,37 +2983,29 @@
   \def\bbl at inikv@captions#1=#2\@@{%
     \bbl at ini@captions at aux{#1}{#2}}
 \fi
+\def\bbl at ini@captions at template#1#2{% string language tempa=capt-name
+  \bbl at replace\bbl at tempa{.template}{}%
+  \def\bbl at toreplace{#1{}}%
+  \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
+  \bbl at replace\bbl at toreplace{[[}{\csname}%
+  \bbl at replace\bbl at toreplace{[}{\csname the}%
+  \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
+  \bbl at replace\bbl at toreplace{]}{\endcsname{}}%
+  \bbl at xin@{,\bbl at tempa,}{,chapter,appendix,part,}%
+  \ifin@
+    \@nameuse{bbl at patch\bbl at tempa}%
+    \global\bbl at csarg\let{\bbl at tempa fmt@#2}\bbl at toreplace
+  \fi
+  \bbl at xin@{,\bbl at tempa,}{,figure,table,}%
+  \ifin@
+    \toks@\expandafter{\bbl at toreplace}%
+    \bbl at exp{\gdef\<fnum@\bbl at tempa>{\the\toks@}}%
+  \fi}
 \def\bbl at ini@captions at aux#1#2{%
   \bbl at trim@def\bbl at tempa{#1}%
   \bbl at xin@{.template}{\bbl at tempa}%
   \ifin@
-    \bbl at replace\bbl at tempa{.template}{}%
-    \def\bbl at toreplace{#2}%
-    \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
-    \bbl at replace\bbl at toreplace{[[}{\csname}%
-    \bbl at replace\bbl at toreplace{[}{\csname the}%
-    \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
-    \bbl at replace\bbl at toreplace{]}{\endcsname{}}%
-    \bbl at xin@{,\bbl at tempa,}{,chapter,}%
-    \ifin@
-      \bbl at patchchapter
-      \global\bbl at csarg\let{chapfmt@\languagename}\bbl at toreplace
-    \fi
-    \bbl at xin@{,\bbl at tempa,}{,appendix,}%
-    \ifin@
-      \bbl at patchchapter
-      \global\bbl at csarg\let{appxfmt@\languagename}\bbl at toreplace
-    \fi
-    \bbl at xin@{,\bbl at tempa,}{,part,}%
-    \ifin@
-      \bbl at patchpart
-      \global\bbl at csarg\let{partfmt@\languagename}\bbl at toreplace
-    \fi
-    \bbl at xin@{,\bbl at tempa,}{,figure,table,}%
-    \ifin@
-      \toks@\expandafter{\bbl at toreplace}%
-      \bbl at exp{\gdef\<fnum@\bbl at tempa>{\the\toks@}}%
-    \fi
+    \bbl at ini@captions at template{#2}\languagename
   \else
     \bbl at ifblank{#2}%
       {\bbl at exp{%
@@ -3050,7 +3079,7 @@
         \\\bbl at toglobal\<extras\languagename>}%
     \fi
   \fi}
-\def\bbl at chaptype{chap}
+\def\bbl at chaptype{chapter}
 \ifx\@makechapterhead\@undefined
   \let\bbl at patchchapter\relax
 \else\ifx\thechapter\@undefined
@@ -3060,7 +3089,7 @@
 \else
   \def\bbl at patchchapter{%
     \global\let\bbl at patchchapter\relax
-    \bbl at add\appendix{\def\bbl at chaptype{appx}}% Not harmful, I hope
+    \bbl at add\appendix{\def\bbl at chaptype{appendix}}% Not harmful, I hope
     \bbl at toglobal\appendix
     \bbl at sreplace\ps at headings
       {\@chapapp\ \thechapter}%
@@ -3078,6 +3107,7 @@
       \bbl at ifunset{bbl@\bbl at chaptype fmt@\languagename}%
         {\@chapapp\space\thechapter}
         {\@nameuse{bbl@\bbl at chaptype fmt@\languagename}}}}
+  \let\bbl at patchappendix\bbl at patchchapter
 \fi\fi\fi
 \ifx\@part\@undefined
   \let\bbl at patchpart\relax

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `package')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.
@@ -33,7 +33,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2020/12/16 3.52 The Babel package]
+\ProvidesPackage{babel}[2021/01/26 3.53 The Babel package]
 \@ifpackagewith{babel}{debug}
   {\providecommand\bbl at trace[1]{\message{^^J[ #1 ]}}%
    \let\bbl at debug\@firstofone
@@ -243,11 +243,12 @@
 \def\bbl at nocaption@i#1#2{% 1: text to be printed 2: caption macro \langXname
   \global\@namedef{#2}{\textbf{?#1?}}%
   \@nameuse{#2}%
-  \bbl at warning{%
+  \bbl at warning{% TODO.
     \@backslashchar#2 not set. Please, define it\\%
     after the language has been loaded (typically\\%
-    in the preamble) with something like:\\%
-    \string\renewcommand\@backslashchar#2{..}\\%
+    in the preamble) with the help of\\%
+    \string\setlocalecaption. An example is:\\%
+    \string\setlocalecaption{mylang}{chapter}{..}\\
     Reported}}
 \def\bbl at tentative{\protect\bbl at tentative@i}
 \def\bbl at tentative@i#1{%

Modified: trunk/Master/texmf-dist/tex/generic/babel/blplain.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/blplain.tex	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/blplain.tex	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `blplain')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/bplain.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/bplain.tex	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/bplain.tex	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `bplain')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `patterns')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.
@@ -37,10 +37,10 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{hyphen.cfg}[2020/12/16 3.52 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2021/01/26 3.53 Babel hyphens]
 \xdef\bbl at format{\jobname}
-\def\bbl at version{3.52}
-\def\bbl at date{2020/12/16}
+\def\bbl at version{3.53}
+\def\bbl at date{2021/01/26}
 \ifx\AtBeginDocument\@undefined
   \def\@empty{}
   \let\orig at dump\dump

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/si/babel-si.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/si/babel-si.ini	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/si/babel-si.ini	2021-01-26 21:47:29 UTC (rev 57530)
@@ -8,6 +8,7 @@
 ; * Common Locale Data Repository (license Unicode):
 ;   http://cldr.unicode.org/
 ;   http://unicode.org/copyright.html
+; * With contributions by Nisal D Bandara.
 
 [identification]
 charset = utf8
@@ -28,27 +29,27 @@
 derivate = no
 
 [captions]
-preface = 
-ref = 
-abstract = 
-bib = 
-chapter = 
-appendix = 
-contents = 
-listfigure = 
-listtable = 
-index = 
-figure = 
-table = 
-part = 
-encl = 
-cc = 
-headto = 
-page = 
-see = 
-also = 
-proof = 
-glossary = 
+preface = පෙරවදන
+ref = යොමුව
+abstract = සංක්ෂෙපය
+bib = ග්‍රන්ථ නාමාවලිය
+chapter = පරිච්ඡේදය
+appendix = උපග්‍රන්ථය
+contents = පටුන
+listfigure = සටහන් ලේඛනය
+listtable = වගු ලේඛනය
+index = සූචිය
+figure = සටහන
+table = වගුව
+part = කොටස
+encl = ඇමුණුම
+cc = පිටපත්
+headto = වෙත
+page = පිට
+see = බලනු
+also = තවද
+proof = සාධනය
+glossary = පදමාලාව
 
 [captions.licr]
 preface = 

Modified: trunk/Master/texmf-dist/tex/generic/babel/luababel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `luatex')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.
@@ -745,6 +745,7 @@
     \edef\bbl at langfeatures{#2,}}}
 \directlua{
 Babel.script_blocks = {
+  ['dflt'] = {},
   ['Arab'] = {{0x0600, 0x06FF}, {0x08A0, 0x08FF}, {0x0750, 0x077F},
               {0xFE70, 0xFEFF}, {0xFB50, 0xFDFF}, {0x1EE00, 0x1EEFF}},
   ['Armn'] = {{0x0530, 0x058F}},
@@ -1408,26 +1409,23 @@
   {}
 \IfBabelLayout{graphics}
   {\let\bbl at pictresetdir\relax
-   \def\bbl at pictsetdir{%
+   \def\bbl at pictsetdir#1{%
      \ifcase\bbl at thetextdir
        \let\bbl at pictresetdir\relax
      \else
-       \textdir TLT\relax
-       \def\bbl at pictresetdir{\textdir TRT\relax}%
+       \bodydir TLT
+       % \(text|par)dir required in pgf:
+       \def\bbl at pictresetdir{\bodydir TRT\pardir TRT\textdir TRT\relax}%
      \fi}%
-   \let\bbl at OL@@picture\@picture
-   \let\bbl at OL@put\put
-   \bbl at sreplace\@picture{\hskip-}{\bbl at pictsetdir\hskip-}%
-   \def\put(#1,#2)#3{%  Not easy to patch. Better redefine.
-     \@killglue
-     \raise#2\unitlength
-     \hb at xt@\z@{\kern#1\unitlength{\bbl at pictresetdir#3}\hss}}%
+   \ifx\AddToHook\@undefined\else
+     \AddToHook{env/picture/begin}{\bbl at pictsetdir\z@}%
+   \fi
    \AtBeginDocument
      {\ifx\tikz at atbegin@node\@undefined\else
         \let\bbl at OL@pgfpicture\pgfpicture
         \bbl at sreplace\pgfpicture{\pgfpicturetrue}%
-          {\bbl at pictsetdir\pgfpicturetrue}%
-        \bbl at add\pgfsys at beginpicture{\bbl at pictsetdir}%
+          {\bbl at pictsetdir\@ne\pgfpicturetrue}%
+        \bbl at add\pgfsys at beginpicture{\bbl at pictsetdir\@ne}%
         \bbl at add\tikz at atbegin@node{\bbl at pictresetdir}%
       \fi}}
   {}

Modified: trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `nil')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.
@@ -32,7 +32,7 @@
 %% extension |.ins|) which are part of the distribution.
 %%
 
-\ProvidesLanguage{nil}[2020/12/16 3.52 Nil language]
+\ProvidesLanguage{nil}[2021/01/26 3.53 Nil language]
 \LdfInit{nil}{datenil}
 \ifx\l at nil\@undefined
   \newlanguage\l at nil

Modified: trunk/Master/texmf-dist/tex/generic/babel/plain.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/plain.def	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/plain.def	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `plain')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/switch.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/switch.def	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/switch.def	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `kernel')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `texxet')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.

Modified: trunk/Master/texmf-dist/tex/generic/babel/xebabel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/xebabel.def	2021-01-26 21:46:18 UTC (rev 57529)
+++ trunk/Master/texmf-dist/tex/generic/babel/xebabel.def	2021-01-26 21:47:29 UTC (rev 57530)
@@ -7,7 +7,7 @@
 %% babel.dtx  (with options: `xetex')
 %% 
 %%
-%% Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2021 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.



More information about the tex-live-commits mailing list.