texlive[56239] Master/texmf-dist: babel (1sep20)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 1 23:37:03 CEST 2020


Revision: 56239
          http://tug.org/svn/texlive?view=revision&revision=56239
Author:   karl
Date:     2020-09-01 23:37:03 +0200 (Tue, 01 Sep 2020)
Log Message:
-----------
babel (1sep20)

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/locale/hu/babel-hu.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko-Hani.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini
    trunk/Master/texmf-dist/tex/generic/babel/nil.ldf

Modified: trunk/Master/texmf-dist/doc/latex/babel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/babel/README.md	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/doc/latex/babel/README.md	2020-09-01 21:37:03 UTC (rev 56239)
@@ -1,4 +1,4 @@
-## Babel 3.47
+## Babel 3.48
 
 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.47 are described in:
+Changes in version 3.48 are described in:
 
-https://github.com/latex3/babel/wiki/What's-new-in-babel-3.47
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.48
 
 Included is a set of ini files for about 200 languages. 
 
@@ -44,6 +44,16 @@
 ### Latest changes
 
 ```
+3.48   2020-09-01
+       - New (tentative) tools to customize some labels (like chapters
+         in CJK and Hungarian). 
+       - Warning instead of error if neither 0 nor ZERO WIDTH SPACE is
+         found in some Southeast Asian languages.
+       - Fixes:
+         - \babelshorthand didn't work with some dialects (#91).
+         - \selectlanguage and otherlanguage raised an error inside
+           tabular.
+
 3.47   2020-07-13
        - Fixes:
          - Spurious spaces when autoloading locales (bug introduced
@@ -53,7 +63,8 @@
        - New - \getlocaleproperty*, which doesn't raise an error.
        - Basic ini+tex templates for about 500 languages in the GitHub
          repository.
-         
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.47
+
 3.46   2020-07-06
        - Languages can now be optionally selected with their BCP 47
          tags.
@@ -69,7 +80,7 @@
            in some OSs (#80).
          - The [..|..] syntax in ini dates didn't recognize 'digits'.
 https://github.com/latex3/babel/wiki/What's-new-in-babel-3.46
-         
+
 3.45   2020-06-10
        - Minor fixes in Hindi, Ancient Greek, Macedonian.
        - Improvements in Kurdish, Marathi.
@@ -103,7 +114,7 @@
            the pattern was ].       
          - \babelposthyphenation is now deativated in math.
 https://github.com/latex3/babel/wiki/What's-new-in-babel-3.44
-       
+
 3.43   2020-04-28
        - Autoloading based on the BCP47 codes, with basic lookup.
        - Now only a few essential commands are loaded in the format.
@@ -116,7 +127,7 @@
            and \guillemetleft (#63).
          - A couple of bugs related to autoloading.
 https://github.com/latex3/babel/wiki/What's-new-in-babel-3.43
-       
+
 3.42   2020-03-22
        - \getlocaleproperty, to get the value of a field from the loaded
          ini files.
@@ -134,7 +145,7 @@
          - Locale was not switched correctly with COMBINING characters
            (#54).
 See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.42
-           
+
 3.41   2020-02-27
        - Counters and numerals added in some ini files, based on those
          defined in CSS (Abjad, Alphabetic Hebrew, Japanese, etc.).
@@ -143,7 +154,7 @@
        - Fix - Error when french was loaded and an ini file read (#50).
        - Fix - A typo in Greek files: Miriad must read Myriad.
 See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.41
-       
+
 3.40   2020-02-14
        - New ini files for Latin and Greek (xe/lua).
        - Add 'other' characters used in hyphenation patters (eg,
@@ -176,49 +187,11 @@
          file loaded by languages.
 See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.38
 
-3.37   2019-12-08
-       - Preliminary code for non-standard hyphenation, like ff ->
-         ff-f (lua).
-       - \babelprovide now can be used to add or modify values for the
-         keys in ini files.
-       - Line breaking in South East Asian and CKJ is assimilated to
-         hyphenation, and it is activated even without 'import' (lua).      
+3.37   2019-12-08    
 See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.37
 
-3.36   2019-11-14
-       - New - \babeladjust, with options: bidi.text, bidi.mirroring,
-         bidi.mapdigits, layout.tabular, layout.lists, linebreak.sea,
-         linebreak.cjk. There are still some limitations (lua).
-       - New - ini for Polytonic Greek, thanks to Claudio Beccari.
-       - Fix - Language and script set for Chinese Tradicional and
-         Chinese Simplified.        
+3.36   2019-11-14 
 See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.36
-
-3.35   2019-10-15
-       - \markboth and \markright made robust with a recent LaTeX.
-       - Shorthands work in bibs and refs even with safe=none.
-       - Fix - Another issue related to \ensureascii and LGR (#30)
-       - A temporary hack for issue #25.
-
-3.34   2019-09-27
-       - Improved compatibility for \babelfont vs \setmainfont.
-       - Fix - active ' entered in an infinite loop with lua (#27).
-       - Fix - main in \babelprovide was not set until begin document.
-
-3.33   2019-07-19
-       - \prehyphenchar set to 0 in languages requiring it: kannada,
-         marathi, tamil, etc. (lua).
-       - \AddBabelHook can be set for specific languages.
-       - Fix - !\grq in T1 behaved like the ligature !` (#19).
-       - Minimal preliminary support for the experimental harftex.
-
-3.32   2019-06-03
-       - CJK line breaking is now disabled in verbatim (lua).
-       - New - \babelcharproperty, to change the direction, mirroring
-         glyph and line break properties (lua).
-       - Basic support for the picture environment (with pict2e) and pgf
-         (lua, somewhat experimental).
-       - Start support for harftex (just try - it may work).
 ```
 
 Javier Bezos

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	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2020-09-01 21:37:03 UTC (rev 56239)
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/07/13 v3.47 The Babel package]
+\ProvidesFile{babel.dtx}[2020/09/01 v3.48 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -79,7 +79,7 @@
 \usepackage{framed}
 \usepackage{multicol}
 \usepackage{color,colortbl}
-\usepackage[linkbordercolor={.9 .7 .5}]{hyperref}
+\usepackage[linkcolor=blue,urlcolor=blue,colorlinks=true]{hyperref}
 \newcommand\New[1]{%
   \colorbox[rgb]{.92, .86, .73}{New #1}\enspace\ignorespaces}
 \definecolor{thered}  {rgb}{0.65,0.04,0.07}
@@ -234,35 +234,51 @@
 
 \part{User guide}
 
-\begin{itemize}
-\item This user guide focuses on internationalization and localization
-  with \LaTeX. There are also some notes on its use with Plain \TeX.
+\begin{description}
+\item[\sffamily\color{messages}What is this document about?] This user
+guide focuses on internationalization and localization with \LaTeX{}
+and \pdftex, \xetex{} and \luatex{} with the \babel{} package. There are
+also some notes on its use with Plain \TeX. Part II describes the code,
+and usually it can be ignored.
 
-\item Changes and new features with relation to version 3.8 are
-  highlighted with \New{X.XX}\hspace{-.5em}, and there are some notes
-  for the latest versions in
+\item[\sffamily\color{messages}What if I’m interested only in the
+  latest changes?] Changes and new features with relation to version 3.8
+  are highlighted with \New{X.XX}\hspace{-.5em}, and there are some
+  notes for the latest versions in
   \href{https://github.com/latex3/babel/wiki}{the \babel{} wiki}. The
-  most recent features could be still unstable. Please, report any
-  issues you find in
-  \href{https://github.com/latex3/babel/issues}{GitHub}, which is
-  better than just complaining on an e-mail list or a web forum.
+  most recent features can be still unstable. 
 
-\item If you are interested in the \TeX{} multilingual support, please
-  join the \href{http://tug.org/mailman/listinfo/kadingira}{kadingira
-  mail list}. You can follow the development of \babel{} in
-  \href{https://github.com/latex3/babel}{GitHub} (which provides many
-  \href{https://github.com/latex3/babel/tree/master/samples}{sample
-  files}, too). If you are the author of a package, feel free to send
-  to me a few test files which I'll add to mine, so that possible
-  issues could be caught in the development phase.
+\item[\sffamily\color{messages}Can I help?] Sure! If you are interested
+in the \TeX{} multilingual support, please join the
+\href{http://tug.org/mailman/listinfo/kadingira}{kadingira mail list}.
+You can follow the development of \babel{} in
+\href{https://github.com/latex3/babel}{GitHub} and make suggestions; feel
+free to fork it and make pull requests. If you are the author of a
+package, send to me a few test files which I'll add to mine, so that
+possible issues can be caught in the development phase.
+  
+\item[\sffamily\color{messages}It doesn't work for me!] You can ask for
+help in some forums like \textsf{tex.stackexchange}, but if you have
+found a bug, I strongly beg you to report it in
+\href{https://github.com/latex3/babel/issues}{GitHub}, which is much
+better than just complaining on an e-mail list or a web forum.
 
-\item  See section \ref{contribute} for contributing a language.
+\item[\sffamily\color{messages}How can I contribute a new
+language?] See section \ref{contribute} for contributing a language.
 
-\item The first sections describe the traditional way of loading a
-  language (with |ldf| files). The alternative way based on |ini|
-  files, which complements the previous one (it does \textit{not}
-  replace it), is described below.
-\end{itemize}
+\item[\sffamily\color{messages}I only need learn the most basic
+features.] The first subsections (1.1-1.3) describe the traditional way
+of loading a language (with |ldf| files), which is usually all you need.
+The alternative way based on |ini| files, which complements the
+previous one (it does \textit{not} replace it, although it is still
+necessary in some languages), is described below; go to \ref{inifiles}.
+  
+\item[\sffamily\color{messages}I don’t like manuals. I prefer sample
+  files.] This manual contains lots of examples and tips, but in GitHub
+  there are many
+  \href{https://github.com/latex3/babel/tree/master/samples}{sample
+  files}.
+\end{description}
 
 \section{The user interface}\label{U-I}
 
@@ -335,7 +351,7 @@
 \trouble{Paragraph ended before \textbackslash UTFviii at three@octets
 was complete}
 A common source of trouble is a wrong setting of the input encoding.
-Depending on the \LaTeX{} version you could get the following somewhat
+Depending on the \LaTeX{} version you can get the following somewhat
 cryptic error:
 \begin{verbatim}
 ! Paragraph ended before \UTFviii at three@octets was complete.
@@ -428,7 +444,7 @@
 
 \begin{note}
 Some classes load \babel{} with a hardcoded language option. Sometimes,
-the main language could be overridden with something like that before
+the main language can be overridden with something like that before
 |\documentclass|:
 \begin{verbatim}
 \PassOptionsToPackage{main=english}{babel}
@@ -506,6 +522,11 @@
 \end{verbatim}
 \end{example}
 
+\begin{note}
+  Once loaded a language, you can select it with the corresponding
+  BCP47 tag. See section \ref{bcp47} for further details.
+\end{note}
+
 \subsection{Mostly monolingual documents}
 
 \New{3.39} Very often, multilingual documents consist of a main
@@ -519,8 +540,8 @@
 This is particularly useful, too, when there are short texts of this
 kind coming from an external source whose contents are not known on
 beforehand (for example, titles in a bibliography). At this regard, it
-is worth remembering that |\babelfont| does not load any font until
-required, so that it can be used just in case.
+is worth remembering that |\babelfont| does \textit{not} load any font
+until required, so that it can be used just in case.
 
 \begin{example}
   A trivial document is:
@@ -540,6 +561,13 @@
 \end{verbatim}
 \end{example}
 
+\begin{note}
+  Instead of its name, you may prefer to select the language with the
+corresponding BCP47 tag. This alternative, however, must be activated
+explicitly, because a two- or tree-letter word is a valid name for a
+language (eg, |yi|). See section \ref{bcp47} for further details.
+\end{note}
+
 \subsection{Modifiers}
 
 \New{3.9c} The basic behavior of some languages can be modified when
@@ -933,7 +961,7 @@
 \begin{example}
   Let's assume you want a unified set of shorthand for discretionaries
   (languages do not define shorthands consistently, and |"-|, |\-|,
-  |"=| have different meanings).  You could start with, say:
+  |"=| have different meanings).  You can start with, say:
 \begin{verbatim}
 \useshorthands*{"}
 \defineshorthand{"*}{\babelhyphen{soft}}
@@ -941,7 +969,7 @@
 \end{verbatim}
   However, the behavior of hyphens is language-dependent. For example, in
   languages like Polish and Portuguese, a hard hyphen inside compound
-  words are repeated at the beginning of the next line. You could then
+  words are repeated at the beginning of the next line. You can then
   set:
 \begin{verbatim}
 \defineshorthand[*polish,*portuguese]{"-}{\babelhyphen{repeat}}
@@ -1256,6 +1284,7 @@
 \end{warning}
 
 \subsection{\texttt{ini} files}
+\label{inifiles}
 
 An alternative approach to define a language (or, more precisely, a
 \textit{locale}) is by means of an \texttt{ini} file. Currently
@@ -1342,7 +1371,7 @@
   hard-coded in \xetex). Lao seems to work, too, but there are no
   patterns for the latter in \luatex{}. Khemer clusters are rendered
   wrongly with the default renderer. The comment about Indic scripts
-  and \textsf{lualatex} also applies here. Some quick patterns could
+  and \textsf{lualatex} also applies here. Some quick patterns can
   help, with something similar to:
 \begingroup
 \setmonofont[Script=Lao,Scale=MatchLowercase]{DejaVu Sans Mono}
@@ -2107,7 +2136,7 @@
 \end{verbatim}
 \endgroup
 
-If on the other hand you have to resort to different fonts, you could
+If on the other hand you have to resort to different fonts, you can
 replace the red line above with, say:
 \setengine{luatex/xetex}
 \begin{verbatim}
@@ -2161,7 +2190,7 @@
   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 could be problematic, and also a “lower-level”
+  for several of them can be problematic, and also a “lower-level”
   font selection is useful.
 \end{note}
 
@@ -2188,7 +2217,7 @@
   font 'FONT' with script 'SCRIPT' 'Default' language used instead'}.
 
   \textbf{This is \textit{not} and error.} This warning is shown by
-  \textsf{fontspec}, not by \babel. It could be irrelevant for English,
+  \textsf{fontspec}, not by \babel. It can be irrelevant for English,
   but not for many other languages, including Urdu and Turkish. This is
   a useful and harmless warning, and if everything is fine with your
   document the best thing you can do is just to ignore it altogether.
@@ -2355,7 +2384,7 @@
 \New{3.23} It may be used without a value. In such a case, the |ini|
 file set in the corresponding |babel-<language>.tex| (where
 |<language>| is the last argument in |\babelprovide|) is imported. See
-the list of recognized languages above. So, the previous example could 
+the list of recognized languages above. So, the previous example can 
 be written:
 \begin{verbatim}
 \babelprovide[_import_]{hungarian}
@@ -2411,7 +2440,7 @@
 \begin{verbatim}
 \usepackage[italian, greek.polutonic]{babel}
 \end{verbatim}
-  But if, say, accents in Greek are not shown correctly, you could try: 
+  But if, say, accents in Greek are not shown correctly, you can try: 
 \begin{verbatim}
 \usepackage[italian]{babel}
 \babelprovide[import, main]{polytonicgreek}
@@ -2458,7 +2487,7 @@
   An alternative approach with \luatex{} and Harfbuzz is the font
   option |RawFeature={multiscript=auto}|. It does not switch the
   \babel{} language and therefore the line breaking rules, but in many
-  cases it could be enough.
+  cases it can be enough.
 \end{note}
 
 \Describe{mapfont=}{\texttt{direction}}
@@ -2559,6 +2588,11 @@
 bidirectional behavior (unlike |Numbers=Arabic| in \textsf{fontspec},
 which is not recommended).
 
+\begin{note}
+  With \xetex{} you can use the option |Mapping| when defining a
+  font.
+\end{note}
+
 \New{4.41} Many `ini` locale files has been extended with information
 about non-positional numerical systems, based on those predefined in
 CSS. They only work with \xetex{} and \luatex{} and are fully
@@ -2937,6 +2971,7 @@
 \end{example}
 
 \subsection{Selection based on BCP 47 tags}
+\label{bcp47}
 
 \New{3.43} The recommended way to select languages is that described at
 the beginning of this document. However, BCP 47 tags are becoming
@@ -2964,15 +2999,18 @@
 
 \usepackage[danish]{babel}
 
-\babeladjust{ autoload.bcp47 = on }
+\babeladjust{
+  autoload.bcp47 = on,
+  autoload.bcp47.options = import
+}
 
 \begin{document}
 
-\today
+Chapter in Danish: \chaptername.
 
-\selectlanguage{fr-CA}
+\selectlanguage{de-AT}
 
-\today
+\localedate{2020}{1}{30}
 
 \end{document}
 \end{verbatim}
@@ -3061,7 +3099,7 @@
 
 No macros to select the writing direction are provided, either --
 writing direction is intrinsic to each script and therefore it is best
-set by the language (which could be a dummy one). Furthermore, there
+set by the language (which can be a dummy one). Furthermore, there
 are in fact two right-to-left modes, depending on the language, which
 differ in the way `weak' numeric characters are ordered (eg, Arabic
 \%123 \textit{vs} Hebrew 123\%).
@@ -3069,7 +3107,7 @@
 \begin{warning}
   The current code for \textbf{text} in \luatex{} should be considered
   essentially stable, but, of course, it is not bug-free and there
-  could be improvements in the future, because setting bidi text has
+  can be improvements in the future, because setting bidi text has
   many subtleties (see for example <https://www.w3.org/TR/html-bidi/>).
   A basic stable version for other engines must wait. This applies to
   text; there is a basic support for \textbf{graphical} elements,
@@ -3242,7 +3280,7 @@
   counters in general, as well as in \luatex{} with |bidi=default|;
   required in \luatex{} for numeric footnote marks $>$9 with
   |bidi=basic-r| (but \textit{not} with |bidi=basic|); note, however,
-  it could depend on the counter format.
+  it can depend on the counter format.
 
   With |counters|, |\arabic| is not only considered L text always (with
   |\babelsublr|, see below), but also an ``isolated'' block which does
@@ -3335,7 +3373,7 @@
 
 \Describe{\BabelPatchSection}{\marg{section-name}}
 
-Mainly for bidi text, but it could be useful in other cases.
+Mainly for bidi text, but it can be useful in other cases.
 |\BabelPatchSection| and the corresponding option |layout=sectioning|
 takes a more logical approach (at least in many cases) because it
 applies the global language to the section format (including the
@@ -3631,7 +3669,7 @@
 \item If you use the document class \cls{book} \emph{and} you use
   |\ref| inside the argument of |\chapter| (or just use |\ref| inside
   |\MakeUppercase|), \LaTeX\ will keep complaining about an undefined
-  label.  To prevent such problems, you could revert to using
+  label.  To prevent such problems, you can revert to using
   uppercase labels, you can use |\lowercase{\ref{foo}}| inside the
   argument of |\chapter|, or, if you will not use shorthands in
   labels, set the |safe| option to |none| or |bib|.
@@ -3750,6 +3788,14 @@
 For old an deprecated functions, see the wiki.
 
 \medskip
+\textbf{Labels}
+
+\New{3.48} There is some work in progress for \babel{} to deal with
+labels, both with the relation to captions (chapters, part), and how
+counters are used to define them. It is still somewhat tentative
+because it is far from trivial -- see the wiki for further details.
+
+\medskip
 \textbf{\string\babelprehyphenation}
 
 \New{3.44} Note it is tentative, but the current behavior for glyphs
@@ -3831,7 +3877,7 @@
 With the previous settings, if the encoding when the language is
 selected is |T1| then the patterns in \file{hyphenT1.ger} are
 used, but otherwise use those in \file{hyphen.ger} (note the encoding
-could be set in |\extras|\m{lang}).
+can be set in |\extras|\m{lang}).
 
 A typical error when using \babel{} is the following:
 \begin{verbatim}
@@ -3924,11 +3970,18 @@
 \subsection{Guidelines for contributed languages}
 \label{contribute}
 
-Now language files are “outsourced” and are located in a separate
-directory (\texttt{/macros/latex/contrib/babel-contrib}), so that they
-are contributed directly to CTAN (please, do not send to me language
-styles just to upload them to CTAN).
+Currently, the easiest way to contribute a new language is by taking
+one the the 500 or so |ini| templates available on GitHub as a basis.
+Just make a pull request o dowonload it and then, after filling the
+fields, sent it to me. Fell free to ask for help or to make feature
+requests.
 
+As to \texttt{ldf} files, now language files are “outsourced” and are
+located in a separate directory
+(\texttt{/macros/latex/contrib/babel-contrib}), so that they are
+contributed directly to CTAN (please, do not send to me language styles
+just to upload them to CTAN).
+
 Of course, placing your style files in this directory is not mandatory,
 but if you want to do it, here are a few guidelines.
 
@@ -3949,7 +4002,7 @@
   own directory.
 \end{itemize}
 
-The following page provides a starting point:
+The following page provides a starting point for \texttt{ldf} files:
 \texttt{http://www.texnia.com/incubator.html}. See also
 \texttt{https://github.com/latex3/babel/wiki/List-of-locale-templates}.
 
@@ -3992,11 +4045,11 @@
 
 \DescribeMacro{\providehyphenmins}
 The macro |\providehyphenmins| should be used in the language
-definition files to set |\lefthyphenmin| and
-|\righthyphenmin|. This macro will check whether these parameters
-were provided by the hyphenation file before it takes any action.
-If these values have been already set, this command is ignored
-(currently, default pattern files do \textit{not} set them).
+definition files to set |\lefthyphenmin| and |\righthyphenmin|. This
+macro will check whether these parameters were provided by the
+hyphenation file before it takes any action. If these values have been
+already set, this command is ignored (currently, default pattern files
+do \textit{not} set them).
 
 \DescribeMacro{\captions\langvar}
 The macro |\captions|\langvar\ defines the macros that
@@ -4210,7 +4263,7 @@
 |\extrasenglish|.
 
 Be careful when using this macro, because depending on the case the
-assignment could be either global (usually) or local (sometimes). That
+assignment can be either global (usually) or local (sometimes). That
 does not seem very consistent, but this behavior is preserved for
 backward compatibility. If you are using \pkg{etoolbox}, by Philipp
 Lehman, consider using the tools provided by this package instead of
@@ -4438,7 +4491,7 @@
 (even without |strings|), and it is intended for minor readjustments
 only.
 
-For example, as |T1| is the default case mapping in \LaTeX, we could
+For example, as |T1| is the default case mapping in \LaTeX, we can
 set for Turkish:
 \begin{verbatim}
 \StartBabelCommands{turkish}{}[ot1enc, fontenc=OT1]
@@ -4522,7 +4575,7 @@
   selected.
 
 \item |'| (with |activeacute|) had the original value when writing to an
-  auxiliary file, and things like an infinite loop could happen. It
+  auxiliary file, and things like an infinite loop can happen. It
   worked incorrectly with |^| (if activated) and also if deactivated.
 
 \item Active chars where not reset at the end of language options, and
@@ -4691,8 +4744,8 @@
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.47>>
-%<<date=2020/07/13>>
+%<<version=3.48>>
+%<<date=2020/09/01>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5122,7 +5175,7 @@
   \bbl at warning{%
     Some functions for '#1' are tentative.\\%
     They might not work as expected and their behavior\\%
-    could change in the future.\\%
+    may change in the future.\\%
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
@@ -5714,8 +5767,10 @@
        \set at typeset@protect
        \expandafter\select at language@x\expandafter{\bbl at main@language}%
        \let\protect\noexpand
-       \edef\thepage{% TODO. Only with bidi. See also above
-         \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}}%
+       \ifcase\bbl at bidimode\else % Only with bidi. See also above
+         \edef\thepage{%
+           \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}%
+       \fi}%
    \fi}
   {\ifbbl at single\else
      \bbl at ifunset{markright }\bbl at redefine\bbl at redefinerobust
@@ -5905,13 +5960,13 @@
 % but it broke bookmarks. This was quickly fixed in \pkg{hyperref},
 % which essentially made it no-op. However, it will not removed for
 % the moment because \pkg{hyperref} is expecting it. TODO. Still
-% true? 
+% true? Commented out in 2020/07/27.
 %
 %    \begin{macrocode}
-\AtBeginDocument{%
-  \ifx\pdfstringdefDisableCommands\@undefined\else
-    \pdfstringdefDisableCommands{\languageshorthands{system}}%
-  \fi}
+% \AtBeginDocument{%
+%   \ifx\pdfstringdefDisableCommands\@undefined\else
+%     \pdfstringdefDisableCommands{\languageshorthands{system}}%
+%   \fi}
 %    \end{macrocode}
 %
 %  \end{macro}
@@ -7018,11 +7073,12 @@
 %  \begin{macro}{\bbl at pop@lang}
 %    This macro stores its first element (which is delimited by the
 %    `+'-sign) in |\languagename| and stores the rest of the string
-%    (delimited by `-') in its third argument.
+%    in |\bbl at language@stack|.
 %
 %    \begin{macrocode}
-\def\bbl at pop@lang#1+#2&#3{%
-  \edef\languagename{#1}\xdef#3{#2}}
+\def\bbl at pop@lang#1+#2\@@{%
+  \edef\languagename{#1}%
+  \xdef\bbl at language@stack{#2}}
 %    \end{macrocode}
 %
 %  \end{macro}
@@ -7033,13 +7089,12 @@
 % result of that is that the argument string of |\bbl at pop@lang|
 % contains one or more language names, each followed by a `+'-sign
 % (zero language names won't occur as this macro will only be
-% called after something has been pushed on the stack) followed by
-% the `\&'-sign and finally the reference to the stack.
+% called after something has been pushed on the stack).
 %
 %    \begin{macrocode}
 \let\bbl at ifrestoring\@secondoftwo
 \def\bbl at pop@language{%
-  \expandafter\bbl at pop@lang\bbl at language@stack&\bbl at language@stack
+  \expandafter\bbl at pop@lang\bbl at language@stack\@@
   \let\bbl at ifrestoring\@firstoftwo
   \expandafter\bbl at set@language\expandafter{\languagename}%
   \let\bbl at ifrestoring\@secondoftwo}
@@ -7226,13 +7281,13 @@
   % set the locale id
   \bbl at id@assign
   % switch captions, date
-  \ifcase\bbl at select@type
-    \bbl at bsphack
+  % No text is supposed to be added here, so we remove any
+  % spurious spaces.  
+  \bbl at bsphack
+    \ifcase\bbl at select@type
       \csname captions#1\endcsname\relax
       \csname date#1\endcsname\relax
-    \bbl at esphack
-  \else
-    \bbl at bsphack
+    \else
       \bbl at xin@{,captions,}{,\bbl at select@opts,}%
       \ifin@
         \csname captions#1\endcsname\relax
@@ -7241,8 +7296,8 @@
       \ifin@  % if \foreign... within \<lang>date
         \csname date#1\endcsname\relax
       \fi
-    \bbl at esphack
-  \fi
+    \fi
+  \bbl at esphack
   % switch extras
   \bbl at usehooks{beforeextras}{}%
   \csname extras#1\endcsname\relax
@@ -8817,7 +8872,7 @@
      {\bbl at putsh@i#1\@empty\@nnil}%
      {\csname bbl at active@\string#1\endcsname}}
 \def\bbl at putsh@i#1#2\@nnil{%
-  \csname\languagename @sh@\string#1@%
+  \csname\language at group @sh@\string#1@%
     \ifx\@empty#2\else\string#2@\fi\endcsname}
 \ifx\bbl at opt@shorthands\@nnil\else
   \let\bbl at s@initiate at active@char\initiate at active@char
@@ -10213,8 +10268,6 @@
 %
 % \subsection{Layout}
 %
-% \textbf{Work in progress}.
-%
 % Layout is mainly intended to set bidi documents, but there is at
 % least a tool useful in general.
 %
@@ -10336,7 +10389,11 @@
         {Use this macro as documented}}%
       {\bbl at provide@renew{#2}}}%
   % Post tasks
-  \bbl at exp{\\\babelensure[exclude=\\\today]{#2}}%
+  \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]{%
@@ -11002,18 +11059,171 @@
 %    \begin{macrocode}
 \def\bbl at ini@captions at aux#1#2{%
   \bbl at trim@def\bbl at tempa{#1}%
-  \bbl at ifblank{#2}%
-    {\bbl at exp{%
-       \toks@{\\\bbl at nocaption{\bbl at tempa}{\languagename\bbl at tempa name}}}}%
-    {\bbl at trim\toks@{#2}}%
-  \bbl at exp{%
-    \\\bbl at add\\\bbl at savestrings{%
-      \\\SetString\<\bbl at tempa name>{\the\toks@}}}}
+  \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
+  \else
+    \bbl at ifblank{#2}%
+      {\bbl at exp{%
+         \toks@{\\\bbl at nocaption{\bbl at tempa}{\languagename\bbl at tempa name}}}}%
+      {\bbl at trim\toks@{#2}}%
+    \bbl at exp{%
+      \\\bbl at add\\\bbl at savestrings{%
+        \\\SetString\<\bbl at tempa name>{\the\toks@}}}%
+    \toks@\expandafter{\bbl at captionslist}%
+    \bbl at exp{\\\in@{\<\bbl at tempa name>}{\the\toks@}}%
+    \ifin@\else
+      \bbl at exp{%
+        \\\bbl at add\<bbl at extracaps@\languagename>{\<\bbl at tempa name>}%
+        \\\bbl at toglobal\<bbl at extracaps@\languagename>}%
+    \fi
+  \fi}
 %    \end{macrocode}
 %
-% TODO. Document
+% \textbf{Labels.} Captions must contain just strings, no
+% format at all, so there is new group in ini files. 
+% 
+%    \begin{macrocode}
+\def\bbl at list@the{%
+  part,chapter,section,subsection,subsubsection,paragraph,%
+  subparagraph,enumi,enumii,enumiii,enumiv,equation,figure,%
+  table,page,footnote,mpfootnote,mpfn}
+\def\bbl at map@cnt#1{%  #1:roman,etc, // #2:enumi,etc
+  \bbl at ifunset{bbl at map@#1@\languagename}%
+    {\@nameuse{#1}}%
+    {\@nameuse{bbl at map@#1@\languagename}}}
+\def\bbl at inikv@labels#1=#2\@@{%
+  \in@{.map}{#1}%
+  \ifin@
+    \ifx\bbl at KVP@labels\@nil\else
+      \bbl at xin@{ map }{ \bbl at KVP@labels\space}%
+      \ifin@
+        \def\bbl at tempc{#1}%
+        \bbl at replace\bbl at tempc{.map}{}%
+        \in@{,#2,}{,arabic,roman,Roman,alph,Alph,fnsymbol,}%
+        \bbl at exp{%
+          \gdef\<bbl at map@\bbl at tempc @\languagename>%
+            {\ifin@\<#2>\else\\\localecounter{#2}\fi}}%
+        \bbl at foreach\bbl at list@the{%
+          \bbl at ifunset{the##1}{}%
+            {\bbl at exp{\let\\\bbl at tempd\<the##1>}%
+             \bbl at exp{%
+               \\\bbl at sreplace\<the##1>%
+                 {\<\bbl at tempc>{##1}}{\\\bbl at map@cnt{\bbl at tempc}{##1}}%
+               \\\bbl at sreplace\<the##1>%
+                 {\<\@empty @\bbl at tempc>\<c@##1>}{\\\bbl at map@cnt{\bbl at tempc}{##1}}}%
+             \expandafter\ifx\csname the##1\endcsname\bbl at tempd\else
+               \toks@\expandafter\expandafter\expandafter{%
+                 \csname the##1\endcsname}%
+               \expandafter\xdef\csname the##1\endcsname{{\the\toks@}}%
+             \fi}}%
+      \fi
+    \fi
+  %
+  \else
+    %
+    % The following code is still under study. You can test it and make
+    % suggestions. Eg, enumerate.2 = ([enumi]).([enumii]). It's
+    % language dependent.
+    \in@{enumerate.}{#1}%
+    \ifin@
+      \def\bbl at tempa{#1}%
+      \bbl at replace\bbl at tempa{enumerate.}{}%
+      \def\bbl at toreplace{#2}%
+      \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
+      \bbl at replace\bbl at toreplace{[}{\csname the}% 
+      \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
+      \toks@\expandafter{\bbl at toreplace}%
+      \bbl at exp{%
+        \\\bbl at add\<extras\languagename>{%
+          \\\babel at save\<labelenum\romannumeral\bbl at tempa>%
+          \def\<labelenum\romannumeral\bbl at tempa>{\the\toks@}}%
+        \\\bbl at toglobal\<extras\languagename>}%
+    \fi
+  \fi}
+%    \end{macrocode}
 %
+% To show correctly some captions in a few languages, we need to patch
+% some internal macros, because the order is hardcoded. For example, in
+% Japanese the chapter number is surrounded by two string, while in
+% Hungarian is placed after. These replacement works in many classes,
+% but not all. Actually, the following lines are somewhat tentative.
+%
 %    \begin{macrocode}
+\def\bbl at chaptype{chap}
+\ifx\@makechapterhead\@undefined
+  \let\bbl at patchchapter\relax
+\else\ifx\thechapter\@undefined
+  \let\bbl at patchchapter\relax
+\else\ifx\ps at headings\@undefined
+  \let\bbl at patchchapter\relax
+\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 toglobal\appendix
+    \bbl at sreplace\ps at headings
+      {\@chapapp\ \thechapter}%
+      {\bbl at chapterformat}%  
+    \bbl at toglobal\ps at headings
+    \bbl at sreplace\chaptermark
+      {\@chapapp\ \thechapter}%
+      {\bbl at chapterformat}%  
+    \bbl at toglobal\chaptermark
+    \bbl at sreplace\@makechapterhead
+      {\@chapapp\space\thechapter}%
+      {\bbl at chapterformat}%
+    \bbl at toglobal\@makechapterhead
+    \gdef\bbl at chapterformat{%
+      \bbl at ifunset{bbl@\bbl at chaptype fmt@\languagename}%
+        {\@chapapp\space\thechapter}
+        {\@nameuse{bbl@\bbl at chaptype fmt@\languagename}}}}
+\fi\fi\fi
+\ifx\@part\@undefined
+  \let\bbl at patchpart\relax
+\else
+  \def\bbl at patchpart{%
+    \global\let\bbl at patchpart\relax
+    \bbl at sreplace\@part
+      {\partname\nobreakspace\thepart}%
+      {\bbl at partformat}%
+    \bbl at toglobal\@part
+    \gdef\bbl at partformat{%
+      \bbl at ifunset{bbl at partfmt@\languagename}%
+        {\partname\nobreakspace\thepart}
+        {\@nameuse{bbl at partfmt@\languagename}}}}
+\fi
+%    \end{macrocode}
+%
+% \textbf{Date.} TODO. Document
+%
+%    \begin{macrocode}
 % Arguments are _not_ protected.
 \let\bbl at calendar\@empty
 \DeclareRobustCommand\localedate[1][]{\bbl at localedate{#1}}
@@ -11082,9 +11292,9 @@
       {}}}
 %    \end{macrocode}
 %
-% Dates will require some macros for the basic formatting. They may be
-% redefined by language, so ``semi-public'' names (camel case) are
-% used. Oddly enough, the CLDR places particles like “de”
+% \textbf{Dates} will require some macros for the basic formatting.
+% They may be redefined by language, so ``semi-public'' names (camel
+% case) are used. Oddly enough, the CLDR places particles like “de”
 % inconsistently in either in the date or in the month name.
 %
 %    \begin{macrocode}
@@ -11174,12 +11384,12 @@
        \else\iffontchar\font"200B
          \hyphenchar\font"200B
        \else
-         \bbl at error
+         \bbl at warning
            {Neither 0 nor ZERO WIDTH SPACE are available\\%
             in the current font, and therefore the hyphen\\%
-            will be printed. Try with 'HyphenChar', but be\\%
-            aware this setting is not safe (see the manual).}%
-           {See the manual.}%
+            will be printed. Try changing the fontspec's\\%
+            'HyphenChar' to another value, but be aware\\%
+            this setting is not safe (see the manual)}%
          \hyphenchar\font\defaulthyphenchar     
        \fi\fi
      \fi}%

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.ins	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.ins	2020-09-01 21:37:03 UTC (rev 56239)
@@ -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/07/13}
+\def\filedate{2020/09/01}
 \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	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2020-09-01 21:37:03 UTC (rev 56239)
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/07/13 v3.47]
+\ProvidesFile{bbcompat.dtx}[2020/09/01 v3.48]
 %</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	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.def	2020-09-01 21:37:03 UTC (rev 56239)
@@ -39,7 +39,7 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{babel.def}[2020/07/13 3.47 Babel common definitions]
+\ProvidesFile{babel.def}[2020/09/01 3.48 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.47}
-\def\bbl at date{2020/07/13}
+\def\bbl at version{3.48}
+\def\bbl at date{2020/09/01}
 \def\adddialect#1#2{%
   \global\chardef#1#2\relax
   \bbl at usehooks{adddialect}{{#1}{#2}}%
@@ -522,11 +522,12 @@
   \ifx\languagename\@undefined\else
     \xdef\bbl at language@stack{\languagename+\bbl at language@stack}%
   \fi}
-\def\bbl at pop@lang#1+#2&#3{%
-  \edef\languagename{#1}\xdef#3{#2}}
+\def\bbl at pop@lang#1+#2\@@{%
+  \edef\languagename{#1}%
+  \xdef\bbl at language@stack{#2}}
 \let\bbl at ifrestoring\@secondoftwo
 \def\bbl at pop@language{%
-  \expandafter\bbl at pop@lang\bbl at language@stack&\bbl at language@stack
+  \expandafter\bbl at pop@lang\bbl at language@stack\@@
   \let\bbl at ifrestoring\@firstoftwo
   \expandafter\bbl at set@language\expandafter{\languagename}%
   \let\bbl at ifrestoring\@secondoftwo}
@@ -634,13 +635,13 @@
   % set the locale id
   \bbl at id@assign
   % switch captions, date
-  \ifcase\bbl at select@type
-    \bbl at bsphack
+  % No text is supposed to be added here, so we remove any
+  % spurious spaces.
+  \bbl at bsphack
+    \ifcase\bbl at select@type
       \csname captions#1\endcsname\relax
       \csname date#1\endcsname\relax
-    \bbl at esphack
-  \else
-    \bbl at bsphack
+    \else
       \bbl at xin@{,captions,}{,\bbl at select@opts,}%
       \ifin@
         \csname captions#1\endcsname\relax
@@ -649,8 +650,8 @@
       \ifin@  % if \foreign... within \<lang>date
         \csname date#1\endcsname\relax
       \fi
-    \bbl at esphack
-  \fi
+    \fi
+  \bbl at esphack
   % switch extras
   \bbl at usehooks{beforeextras}{}%
   \csname extras#1\endcsname\relax
@@ -1549,7 +1550,7 @@
      {\bbl at putsh@i#1\@empty\@nnil}%
      {\csname bbl at active@\string#1\endcsname}}
 \def\bbl at putsh@i#1#2\@nnil{%
-  \csname\languagename @sh@\string#1@%
+  \csname\language at group @sh@\string#1@%
     \ifx\@empty#2\else\string#2@\fi\endcsname}
 \ifx\bbl at opt@shorthands\@nnil\else
   \let\bbl at s@initiate at active@char\initiate at active@char
@@ -2269,7 +2270,11 @@
         {Use this macro as documented}}%
       {\bbl at provide@renew{#2}}}%
   % Post tasks
-  \bbl at exp{\\\babelensure[exclude=\\\today]{#2}}%
+  \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]{%
@@ -2860,13 +2865,151 @@
 \fi
 \def\bbl at ini@captions at aux#1#2{%
   \bbl at trim@def\bbl at tempa{#1}%
-  \bbl at ifblank{#2}%
-    {\bbl at exp{%
-       \toks@{\\\bbl at nocaption{\bbl at tempa}{\languagename\bbl at tempa name}}}}%
-    {\bbl at trim\toks@{#2}}%
-  \bbl at exp{%
-    \\\bbl at add\\\bbl at savestrings{%
-      \\\SetString\<\bbl at tempa name>{\the\toks@}}}}
+  \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
+  \else
+    \bbl at ifblank{#2}%
+      {\bbl at exp{%
+         \toks@{\\\bbl at nocaption{\bbl at tempa}{\languagename\bbl at tempa name}}}}%
+      {\bbl at trim\toks@{#2}}%
+    \bbl at exp{%
+      \\\bbl at add\\\bbl at savestrings{%
+        \\\SetString\<\bbl at tempa name>{\the\toks@}}}%
+    \toks@\expandafter{\bbl at captionslist}%
+    \bbl at exp{\\\in@{\<\bbl at tempa name>}{\the\toks@}}%
+    \ifin@\else
+      \bbl at exp{%
+        \\\bbl at add\<bbl at extracaps@\languagename>{\<\bbl at tempa name>}%
+        \\\bbl at toglobal\<bbl at extracaps@\languagename>}%
+    \fi
+  \fi}
+\def\bbl at list@the{%
+  part,chapter,section,subsection,subsubsection,paragraph,%
+  subparagraph,enumi,enumii,enumiii,enumiv,equation,figure,%
+  table,page,footnote,mpfootnote,mpfn}
+\def\bbl at map@cnt#1{%  #1:roman,etc, // #2:enumi,etc
+  \bbl at ifunset{bbl at map@#1@\languagename}%
+    {\@nameuse{#1}}%
+    {\@nameuse{bbl at map@#1@\languagename}}}
+\def\bbl at inikv@labels#1=#2\@@{%
+  \in@{.map}{#1}%
+  \ifin@
+    \ifx\bbl at KVP@labels\@nil\else
+      \bbl at xin@{ map }{ \bbl at KVP@labels\space}%
+      \ifin@
+        \def\bbl at tempc{#1}%
+        \bbl at replace\bbl at tempc{.map}{}%
+        \in@{,#2,}{,arabic,roman,Roman,alph,Alph,fnsymbol,}%
+        \bbl at exp{%
+          \gdef\<bbl at map@\bbl at tempc @\languagename>%
+            {\ifin@\<#2>\else\\\localecounter{#2}\fi}}%
+        \bbl at foreach\bbl at list@the{%
+          \bbl at ifunset{the##1}{}%
+            {\bbl at exp{\let\\\bbl at tempd\<the##1>}%
+             \bbl at exp{%
+               \\\bbl at sreplace\<the##1>%
+                 {\<\bbl at tempc>{##1}}{\\\bbl at map@cnt{\bbl at tempc}{##1}}%
+               \\\bbl at sreplace\<the##1>%
+                 {\<\@empty @\bbl at tempc>\<c@##1>}{\\\bbl at map@cnt{\bbl at tempc}{##1}}}%
+             \expandafter\ifx\csname the##1\endcsname\bbl at tempd\else
+               \toks@\expandafter\expandafter\expandafter{%
+                 \csname the##1\endcsname}%
+               \expandafter\xdef\csname the##1\endcsname{{\the\toks@}}%
+             \fi}}%
+      \fi
+    \fi
+  %
+  \else
+    %
+    % The following code is still under study. You can test it and make
+    % suggestions. Eg, enumerate.2 = ([enumi]).([enumii]). It's
+    % language dependent.
+    \in@{enumerate.}{#1}%
+    \ifin@
+      \def\bbl at tempa{#1}%
+      \bbl at replace\bbl at tempa{enumerate.}{}%
+      \def\bbl at toreplace{#2}%
+      \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
+      \bbl at replace\bbl at toreplace{[}{\csname the}%
+      \bbl at replace\bbl at toreplace{]}{\endcsname{}}%
+      \toks@\expandafter{\bbl at toreplace}%
+      \bbl at exp{%
+        \\\bbl at add\<extras\languagename>{%
+          \\\babel at save\<labelenum\romannumeral\bbl at tempa>%
+          \def\<labelenum\romannumeral\bbl at tempa>{\the\toks@}}%
+        \\\bbl at toglobal\<extras\languagename>}%
+    \fi
+  \fi}
+\def\bbl at chaptype{chap}
+\ifx\@makechapterhead\@undefined
+  \let\bbl at patchchapter\relax
+\else\ifx\thechapter\@undefined
+  \let\bbl at patchchapter\relax
+\else\ifx\ps at headings\@undefined
+  \let\bbl at patchchapter\relax
+\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 toglobal\appendix
+    \bbl at sreplace\ps at headings
+      {\@chapapp\ \thechapter}%
+      {\bbl at chapterformat}%
+    \bbl at toglobal\ps at headings
+    \bbl at sreplace\chaptermark
+      {\@chapapp\ \thechapter}%
+      {\bbl at chapterformat}%
+    \bbl at toglobal\chaptermark
+    \bbl at sreplace\@makechapterhead
+      {\@chapapp\space\thechapter}%
+      {\bbl at chapterformat}%
+    \bbl at toglobal\@makechapterhead
+    \gdef\bbl at chapterformat{%
+      \bbl at ifunset{bbl@\bbl at chaptype fmt@\languagename}%
+        {\@chapapp\space\thechapter}
+        {\@nameuse{bbl@\bbl at chaptype fmt@\languagename}}}}
+\fi\fi\fi
+\ifx\@part\@undefined
+  \let\bbl at patchpart\relax
+\else
+  \def\bbl at patchpart{%
+    \global\let\bbl at patchpart\relax
+    \bbl at sreplace\@part
+      {\partname\nobreakspace\thepart}%
+      {\bbl at partformat}%
+    \bbl at toglobal\@part
+    \gdef\bbl at partformat{%
+      \bbl at ifunset{bbl at partfmt@\languagename}%
+        {\partname\nobreakspace\thepart}
+        {\@nameuse{bbl at partfmt@\languagename}}}}
+\fi
 \let\bbl at calendar\@empty
 \DeclareRobustCommand\localedate[1][]{\bbl at localedate{#1}}
 \def\bbl at cased{%  TODO. Move
@@ -3009,12 +3152,12 @@
        \else\iffontchar\font"200B
          \hyphenchar\font"200B
        \else
-         \bbl at error
+         \bbl at warning
            {Neither 0 nor ZERO WIDTH SPACE are available\\%
             in the current font, and therefore the hyphen\\%
-            will be printed. Try with 'HyphenChar', but be\\%
-            aware this setting is not safe (see the manual).}%
-           {See the manual.}%
+            will be printed. Try changing the fontspec's\\%
+            'HyphenChar' to another value, but be aware\\%
+            this setting is not safe (see the manual)}%
          \hyphenchar\font\defaulthyphenchar
        \fi\fi
      \fi}%

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2020-09-01 21:37:03 UTC (rev 56239)
@@ -33,7 +33,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2020/07/13 3.47 The Babel package]
+\ProvidesPackage{babel}[2020/09/01 3.48 The Babel package]
 \@ifpackagewith{babel}{debug}
   {\providecommand\bbl at trace[1]{\message{^^J[ #1 ]}}%
    \let\bbl at debug\@firstofone}
@@ -232,7 +232,7 @@
   \bbl at warning{%
     Some functions for '#1' are tentative.\\%
     They might not work as expected and their behavior\\%
-    could change in the future.\\%
+    may change in the future.\\%
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
@@ -509,8 +509,10 @@
        \set at typeset@protect
        \expandafter\select at language@x\expandafter{\bbl at main@language}%
        \let\protect\noexpand
-       \edef\thepage{% TODO. Only with bidi. See also above
-         \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}}%
+       \ifcase\bbl at bidimode\else % Only with bidi. See also above
+         \edef\thepage{%
+           \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}%
+       \fi}%
    \fi}
   {\ifbbl at single\else
      \bbl at ifunset{markright }\bbl at redefine\bbl at redefinerobust
@@ -587,10 +589,6 @@
          \def\@currname{hhline}\input{hhline.sty}\makeatother
        \fi}%
       {}}}
-\AtBeginDocument{%
-  \ifx\pdfstringdefDisableCommands\@undefined\else
-    \pdfstringdefDisableCommands{\languageshorthands{system}}%
-  \fi}
 \DeclareRobustCommand{\FOREIGNLANGUAGE}[1]{%
   \lowercase{\foreignlanguage{#1}}}
 \def\substitutefontfamily#1#2#3{%

Modified: trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2020-09-01 21:37:03 UTC (rev 56239)
@@ -37,10 +37,10 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{hyphen.cfg}[2020/07/13 3.47 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2020/09/01 3.48 Babel hyphens]
 \xdef\bbl at format{\jobname}
-\def\bbl at version{3.47}
-\def\bbl at date{2020/07/13}
+\def\bbl at version{3.48}
+\def\bbl at date{2020/09/01}
 \ifx\AtBeginDocument\@undefined
   \def\@empty{}
   \let\orig at dump\dump

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/hu/babel-hu.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/hu/babel-hu.ini	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/hu/babel-hu.ini	2020-09-01 21:37:03 UTC (rev 56239)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2020-08-06
 name.local = magyar
 name.english = Hungarian
 name.babel = hungarian
@@ -33,13 +33,17 @@
 ref = Hivatkozások
 abstract = Kivonat
 bib = Irodalomjegyzék
+chapter.template = [chapter].[ ][[chapter]]
 chapter = fejezet
+appendix.template = [chapter].[ ][[appendix]]
 appendix = függelék
 contents = Tartalomjegyzék
 listfigure = Ábrák jegyzéke
 listtable = Táblázatok jegyzéke
 index = Tárgymutató
+figure.template = [figure].[ ][[figure]]
 figure = ábra
+table.template = [table].[ ][[table]]
 table = táblázat
 part = rész
 encl = Melléklet
@@ -51,18 +55,23 @@
 proof = Bizonyítás
 glossary = Szójegyzék
 
+
 [captions.licr]
 preface = El\H osz\'o
 ref = Hivatkoz\'asok
 abstract = Kivonat
 bib = Irodalomjegyz\'ek
+chapter.template = [chapter].[ ][[chapter]]
 chapter = fejezet
+appendix.template = [chapter].[ ][[appendix]]
 appendix = f\"uggel\'ek
 contents = Tartalomjegyz\'ek
 listfigure = \'Abr\'ak jegyz\'eke
 listtable = T\'abl\'azatok jegyz\'eke
 index = T\'argymutat\'o
+figure.template = [figure].[ ][[figure]]
 figure = \'abra
+table.template = [table].[ ][[table]]
 table = t\'abl\'azat
 part = r\'esz
 encl = Mell\'eklet

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ja/babel-ja.ini	2020-09-01 21:37:03 UTC (rev 56239)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.6
-date = 2020-07-10
+version = 1.7
+date = 2020-08-06
 name.local = 日本語
 name.english = Japanese
 name.babel = japanese
@@ -34,6 +34,7 @@
 ref = 参考文献
 abstract = 概要
 bib = 参考文献
+chapter.template = [[prechapter]] [chapter] [[postchapter]]
 prechapter = 第
 postchapter = 章
 appendix = 付録
@@ -43,7 +44,8 @@
 index = 索引
 figure = 図
 table = 表
-part = 第
+part.template = [[prepart]] [part] [[postpart]]
+prepart = 第
 postpart = 部
 encl =
 cc =

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko-Hani.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko-Hani.ini	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko-Hani.ini	2020-09-01 21:37:03 UTC (rev 56239)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.0
-date = 2020-07-10
+version = 1.1
+date = 2020-08-06
 name.local = 한국어
 name.english = Korean
 name.babel = korean-han korean-hani
@@ -33,7 +33,8 @@
 preface = 序文
 ref = 參考 文獻
 abstract = 要 約
-bib = 著書~目錄
+bib = 著書~目錄ç
+chapter.template = [[prechapter]] [chapter] [[postchapter]]
 prechapter = 第
 postchapter = 章
 appendix = 附錄
@@ -43,6 +44,7 @@
 index = 索引
 figure = 그림
 table = 表
+part.template = [[prepart]] [part] [[postpart]]
 prepart = 第
 postpart = 篇
 encl = 同封物
@@ -55,6 +57,7 @@
 also = 
 proof = 證明
 glossary = 語 彙
+section.template = [[presection]] [section] [[postsection]]
 presection = 第
 postsection = 節
 

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ko/babel-ko.ini	2020-09-01 21:37:03 UTC (rev 56239)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.7
-date = 2020-07-10
+version = 1.8
+date = 2020-08-06
 name.local = 한국어
 name.english = Korean
 name.babel = korean
@@ -35,6 +35,7 @@
 ref = 참고 문헌
 abstract = 요 약
 bib = 참고 문헌
+chapter.template = [[prechapter]] [chapter] [[postchapter]]
 prechapter = 제
 postchapter = 장
 appendix = 부록
@@ -44,6 +45,7 @@
 index = 찾아보기
 figure = 그림
 table = 표
+part.template = [[prepart]] [part] [[postpart]]
 prepart = 제
 postpart = 편
 encl = 동봉물
@@ -56,6 +58,7 @@
 also = 
 proof = 증명
 glossary = 용어집
+section.template = [[presection]] [section] [[postsection]]
 presection = 제
 postsection = 절
 

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh-Hans.ini	2020-09-01 21:37:03 UTC (rev 56239)
@@ -8,11 +8,13 @@
 ; * Common Locale Data Repository (license Unicode):
 ;   http://cldr.unicode.org/
 ;   http://unicode.org/copyright.html
+; * CTEX, by Liam Huang, Qing Lee, Leo Liu, et al
+;   https://ctan.org/pkg/ctex
 
 [identification]
 charset = utf8
-version = 1.7
-date = 2020-06-30
+version = 1.8
+date = 2020-08-06
 name.local = 中文
 name.english = Chinese
 name.opentype = Chinese Simplified
@@ -30,18 +32,22 @@
 
 [captions]
 preface = 
-ref = 
-abstract = 
-bib = 
-chapter = 
-appendix = 
-contents = 
-listfigure = 
-listtable = 
-index = 
-figure = 
-table = 
-part = 
+ref = 参考文献
+abstract = 摘要
+bib = 参考文献
+chapter.template = [[prechapter]] [chapter] [[postchapter]]
+prechapter = 第
+postchapter = 部分
+appendix = 附录
+contents = 目录
+listfigure = 插图
+listtable = 表格
+index = 索引
+figure = 图
+table = 表
+part.template = [[prepart]] [part] [[postpart]]
+prepart = 第
+postpart = 章
 encl = 
 cc = 
 headto = 
@@ -48,7 +54,7 @@
 page = 
 see = 
 also = 
-proof = 
+proof = 证明
 glossary = 
 
 [captions.licr]

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/zh/babel-zh.ini	2020-09-01 21:37:03 UTC (rev 56239)
@@ -8,11 +8,13 @@
 ; * Common Locale Data Repository (license Unicode):
 ;   http://cldr.unicode.org/
 ;   http://unicode.org/copyright.html
+; * CTEX, by Liam Huang, Qing Lee, Leo Liu, et al
+;   https://ctan.org/pkg/ctex
 
 [identification]
 charset = utf8
-version = 1.7
-date = 2020-06-30
+version = 1.8
+date = 2020-08-06
 name.local = 中文
 name.english = Chinese
 name.opentype = Chinese Simplified
@@ -31,18 +33,22 @@
 
 [captions]
 preface = 
-ref = 
-abstract = 
-bib = 
-chapter = 
-appendix = 
-contents = 
-listfigure = 
-listtable = 
-index = 
-figure = 
-table = 
-part = 
+ref = 参考文献
+abstract = 摘要
+bib = 参考文献
+chapter.template = [[prechapter]] [chapter] [[postchapter]]
+prechapter = 第
+postchapter = 部分
+appendix = 附录
+contents = 目录
+listfigure = 插图
+listtable = 表格
+index = 索引
+figure = 图
+table = 表
+part.template = [[prepart]] [part] [[postpart]]
+prepart = 第
+postpart = 章
 encl = 
 cc = 
 headto = 
@@ -49,7 +55,7 @@
 page = 
 see = 
 also = 
-proof = 
+proof = 证明
 glossary = 
 
 [captions.licr]
@@ -173,6 +179,7 @@
 superscriptingExponent = ×
 
 [counters]
+; TODO. Add 壹 貳 叁...
 cjk-earthly-branch = 子 丑 寅 卯 辰 巳 午 未 申 酉 戌 亥
 cjk-heavenly-stem  = 甲 乙 丙 丁 戊 己 庚 辛 壬 癸
 fullwidth.lower.alpha = a b c d e f g h i j k l m n o p q r s t u v w x y z

Modified: trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2020-09-01 21:35:44 UTC (rev 56238)
+++ trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2020-09-01 21:37:03 UTC (rev 56239)
@@ -32,7 +32,7 @@
 %% extension |.ins|) which are part of the distribution.
 %%
 
-\ProvidesLanguage{nil}[2020/07/13 3.47 Nil language]
+\ProvidesLanguage{nil}[2020/09/01 3.48 Nil language]
 \LdfInit{nil}{datenil}
 \ifx\l at nil\@undefined
   \newlanguage\l at nil



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