diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/babel/README.md | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/babel/babel.pdf | bin | 803286 -> 810453 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.dtx | 505 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/bbcompat.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/locale.zip | bin | 777445 -> 777418 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.def | 222 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.sty | 139 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/hyphen.cfg | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/luababel.def | 25 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/nil.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/xebabel.def | 22 |
15 files changed, 635 insertions, 322 deletions
diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md index 46f331e4283..9c0dd6e35b9 100644 --- a/Master/texmf-dist/doc/latex/babel/README.md +++ b/Master/texmf-dist/doc/latex/babel/README.md @@ -1,4 +1,4 @@ -## Babel 3.48 +## Babel 3.49 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -7,11 +7,11 @@ lualatex out of the box. A few even work with plain formats. The latest stable version is available on <https://ctan.org/pkg/babel>. -Changes in version 3.48 are described in: +Changes in version 3.49 are described in: -https://github.com/latex3/babel/wiki/What's-new-in-babel-3.48 +https://github.com/latex3/babel/wiki/What's-new-in-babel-3.49 -Included is a set of ini files for about 200 languages. +Included is a set of ini files for about 250 languages. The best way to install and/or update it is with the help of package managers. @@ -42,8 +42,14 @@ Bugs related to specific languages are best reported to their respective authors. ### Latest changes - ``` +3.49 2020-10-03 + - Allow standard LaTeX syntax to recognize locales based on ini + files in the most common cases. + - frenchspacing is set with ini files. + - Fixes: + - layout.lists=off didn't work (#94) + 3.48 2020-09-01 - New (tentative) tools to customize some labels (like chapters in CJK and Hungarian). @@ -53,6 +59,7 @@ respective authors. - \babelshorthand didn't work with some dialects (#91). - \selectlanguage and otherlanguage raised an error inside tabular. +https://github.com/latex3/babel/wiki/What's-new-in-babel-3.48 3.47 2020-07-13 - Fixes: diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf Binary files differindex 7fa3c8712a2..85865d7cf6e 100644 --- a/Master/texmf-dist/doc/latex/babel/babel.pdf +++ b/Master/texmf-dist/doc/latex/babel/babel.pdf diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index 51153eb5507..73badc9980d 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -31,7 +31,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2020/09/01 v3.48 The Babel package] +\ProvidesFile{babel.dtx}[2020/10/03 v3.49 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -256,7 +256,7 @@ You can follow the development of \babel{} in 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 @@ -272,7 +272,7 @@ 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 @@ -287,9 +287,14 @@ necessary in some languages), is described below; go to \ref{inifiles}. In most cases, a single language is required, and then all you need in \LaTeX{} is to load the package using its standard mechanism for this purpose, namely, passing that language as an optional argument. In -addition, you may want to set the font and input encodings. +addition, you may want to set the font and input encodings. -Many languages are compatible with \textsf{xetex} and \textsf{luatex}. +Another approach is making the language a global option in order to let +other packages detect and use it. This is the standard way in \LaTeX{} +for an option – in this case a language – to be recognized by several +packages. + +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 @@ -319,6 +324,15 @@ Plus ça change, plus c'est la même chose! \end{document} \end{verbatim} + +Now consider something like: +\begin{verbatim} +_\documentclass[french]{article}_ +\usepackage{babel} +\usepackage{varioref} +\end{verbatim} +With this setting, the package \texttt{varioref} will also see +the option |french| and will be able to use it. \end{example} \begin{example} @@ -330,11 +344,11 @@ in UTF-8 and a so-called Unicode font must be loaded (in this example \setengine{luatex/xetex} \begin{verbatim} -\documentclass{article} +_\documentclass[russian]{article}_ -_\usepackage[russian]{babel}_ +\usepackage{babel} -\babelfont{rm}{DejaVu Serif} +_\babelfont{rm}{DejaVu Serif}_ \begin{document} @@ -363,17 +377,6 @@ Or the more explanatory: Make sure you set the encoding actually used by your editor. \end{troubleshooting} -Another approach is making the language (\Lopt{french} in the example) -a global option in order to let other packages detect and use it: -\begin{verbatim} -_\documentclass[french]{article}_ -\usepackage{babel} -\usepackage{varioref} -\end{verbatim} - -In this last example, the package \texttt{varioref} will also see -the option and will be able to use it. - \begin{note} Because of the way \babel{} has evolved, ``language'' can refer to (1) a set of hyphenation patterns as preloaded into the format, (2) @@ -547,8 +550,8 @@ until required, so that it can be used just in case. A trivial document is: \setengine{luatex/xetex} \begin{verbatim} -\documentclass{article} -\usepackage[english]{babel} +\documentclass[english]{article} +\usepackage{babel} \babelfont[russian]{rm}{FreeSerif} @@ -1301,9 +1304,8 @@ main exception being the |\...name| strings). Most of them set the date, and many also the captions (Unicode and LICR). They will be evolving with the time to add more features (something to keep in mind if backward compatibility is important). The -following section shows how to make use of them currently (by means of -|\babelprovide|), but a higher interface, based on package options, in -under study. In other words, |\babelprovide| is mainly meant +following section shows how to make use of them by means of +|\babelprovide|. In other words, |\babelprovide| is mainly meant for auxiliary tasks, and as alternative when the |ldf|, for some reason, does work as expected. @@ -1319,7 +1321,7 @@ reason, does work as expected. \usepackage{babel} _\babelprovide[import, main]{georgian}_ -\babelfont{rm}{DejaVu Sans} +\babelfont{rm}[Renderer=Harfbuzz]{DejaVu Sans} \begin{document} @@ -1334,6 +1336,36 @@ _\babelprovide[import, main]{georgian}_ \endgroup \end{example} +\New{3.49} Alternatively, you can tell babel to load all or some +languages passed as options with |\babelprovide| and not from the |ldf| +file in a few few typical cases. Thus, |provide=*| means ‘load the main +language with the |\babelprovide| mechanism instead of the |ldf| file’ +applying the basic features, which in this case means |import,| |main|. +There are (currently) three options: +\begin{itemize} +\item |provide=*| is the option just explained, for the main language; +\item |provide+=*| is the same for additional languages (the main + language is still the |ldf| file); +\item |provide*=*| is the same for all languages, ie, main and + additional. +\end{itemize} + +\begin{example} + The preamble in the previous example can be more compactly written + as: +\begin{verbatim} +\documentclass{book} +\usepackage[_georgian, provide=*_]{babel} +\babelfont{rm}[Renderer=Harfbuzz]{DejaVu Sans} +\end{verbatim} +Or also: +\begin{verbatim} +\documentclass[_georgian_]{book} +\usepackage[_provide=*_]{babel} +\babelfont{rm}[Renderer=Harfbuzz]{DejaVu Sans} +\end{verbatim} +\end{example} + \begin{note} The \texttt{ini} files just define and set some parameters, but the corresponding behavior is not always implemented. Also, there are @@ -1389,8 +1421,8 @@ need to set explicitly the script to either |deva| or |dev2|, eg: be used in conjunction with the |ldf| for |japanese|, because the following piece of code loads \textsf{luatexja}: \begin{verbatim} -\documentclass{ltjbook} -\usepackage[japanese]{babel} +\documentclass[japanese]{ltjbook} +\usepackage{babel} \end{verbatim} \item[Latin, Greek, Cyrillic] Combining chars with the default \luatex{} font renderer might be wrong; on then other hand, with the @@ -4744,8 +4776,8 @@ help from Bernd Raichle, for which I am grateful. % \section{Tools} % % \begin{macrocode} -%<<version=3.48>> -%<<date=2020/09/01>> +%<<version=3.49>> +%<<date=2020/10/03>> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -4895,12 +4927,15 @@ help from Bernd Raichle, for which I am grateful. % % \begin{macro}{\bbl@ifblank} % A tool from \textsf{url}, by Donald Arseneau, which tests if a -% string is empty or space. +% string is empty or space. The companion macros tests if a macro is +% defined with some `real' value, ie, not |\relax| and not empty, % % \begin{macrocode} \def\bbl@ifblank#1{% \bbl@ifblank@i#1\@nil\@nil\@secondoftwo\@firstoftwo\@nil} \long\def\bbl@ifblank@i#1#2\@nil#3#4#5\@nil{#4} +\def\bbl@ifset#1#2#3{% + \bbl@ifunset{#1}{#3}{\bbl@exp{\\\bbl@ifblank{#1}}{#3}{#2}}} % \end{macrocode} % \end{macro} % @@ -5040,6 +5075,25 @@ help from Bernd Raichle, for which I am grateful. \else \let\bbl@esphack\@empty \fi} +% \end{macrocode} +% +% Another hackish tool, to apply case changes inside a protected +% macros. It's based on the internal |\let|'s made by |\MakeUppercase| +% and |\MakeLowercase| between things like |\oe| and |\OE|. +% +% \begin{macrocode} +\def\bbl@cased{% + \ifx\oe\OE + \expandafter\in@\expandafter + {\expandafter\OE\expandafter}\expandafter{\oe}% + \ifin@ + \bbl@afterelse\expandafter\MakeUppercase + \else + \bbl@afterfi\expandafter\MakeLowercase + \fi + \else + \expandafter\@firstofone + \fi} %<</Basic macros>> % \end{macrocode} % @@ -5273,17 +5327,24 @@ help from Bernd Raichle, for which I am grateful. % \begin{macrocode} \bbl@trace{key=value and another general options} \bbl@csarg\let{tempa\expandafter}\csname opt@babel.sty\endcsname -\def\bbl@tempb#1.#2{% +\def\bbl@tempb#1.#2{% Remove trailing dot #1\ifx\@empty#2\else,\bbl@afterfi\bbl@tempb#2\fi}% -\def\bbl@tempd#1.#2\@nnil{% +\def\bbl@tempd#1.#2\@nnil{% TODO. Refactor lists? \ifx\@empty#2% \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}% \else - \in@{=}{#1}\ifin@ - \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.#2}% + \in@{,provide,}{,#1,}% + \ifin@ + \edef\bbl@tempc{% + \ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.\bbl@tempb#2}% \else - \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}% - \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}% + \in@{=}{#1}% + \ifin@ + \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.#2}% + \else + \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}% + \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}% + \fi \fi \fi} \let\bbl@tempc\@empty @@ -5307,9 +5368,17 @@ help from Bernd Raichle, for which I am grateful. \DeclareOption{silent}{} \DeclareOption{mono}{} \DeclareOption{shorthands=off}{\bbl@tempa shorthands=\bbl@tempa} +\chardef\bbl@iniflag\z@ +\DeclareOption{provide=*}{\chardef\bbl@iniflag\@ne} % main -> +1 +\DeclareOption{provide+=*}{\chardef\bbl@iniflag\tw@} % add = 2 +\DeclareOption{provide*=*}{\chardef\bbl@iniflag\thr@@} % add + main % Don't use. Experimental. TODO. \newif\ifbbl@single \DeclareOption{selectors=off}{\bbl@singletrue} +\DeclareOption{provide@=*}{} % autoload with cat @=letter +\makeatother +\DeclareOption{provide@=*}{} % autoload with cat @=other +\makeatletter <@More package options@> % \end{macrocode} % @@ -6278,7 +6347,7 @@ help from Bernd Raichle, for which I am grateful. \AtEndOfPackage{% \EnableBabelHook{babel-bidi}% \ifx\fontspec\@undefined - \usepackage{fontspec}% bidi needs fontspec + \bbl@loadfontspec % bidi needs fontspec \fi \usepackage#1{bidi}}% \fi} @@ -6287,10 +6356,8 @@ help from Bernd Raichle, for which I am grateful. \bbl@tentative{bidi=bidi} \bbl@loadxebidi{} \or - \bbl@tentative{bidi=bidi-r} \bbl@loadxebidi{[rldocument]} \or - \bbl@tentative{bidi=bidi-l} \bbl@loadxebidi{} \fi \fi @@ -6566,7 +6633,7 @@ help from Bernd Raichle, for which I am grateful. {\bbl@error{% Unknown option `\CurrentOption'. Either you misspelled it\\% or the language definition file \CurrentOption.ldf was not found}{% - Valid options are: shorthands=, KeepShorthandsActive,\\% + Valid options are, among others: shorthands=, KeepShorthandsActive,\\% activeacute, activegrave, noconfigs, safe=, main=, math=\\% headfoot=, strings=, config=, hyphenmap=, or a language name.}}} % \end{macrocode} @@ -6578,9 +6645,9 @@ help from Bernd Raichle, for which I am grateful. % % \begin{macrocode} \def\bbl@try@load@lang#1#2#3{% - \IfFileExists{\CurrentOption.ldf}% - {\bbl@load@language{\CurrentOption}}% - {#1\bbl@load@language{#2}#3}} + \IfFileExists{\CurrentOption.ldf}% + {\bbl@load@language{\CurrentOption}}% + {#1\bbl@load@language{#2}#3}} \DeclareOption{afrikaans}{\bbl@try@load@lang{}{dutch}{}} \DeclareOption{hebrew}{% \input{rlbabel.def}% @@ -6631,38 +6698,83 @@ help from Bernd Raichle, for which I am grateful. % file are the same. % % \begin{macrocode} -\bbl@for\bbl@tempa\bbl@language@opts{% - \bbl@ifunset{ds@\bbl@tempa}% - {\edef\bbl@tempb{% - \noexpand\DeclareOption - {\bbl@tempa}% - {\noexpand\bbl@load@language{\bbl@tempa}}}% - \bbl@tempb}% - \@empty} +\let\bbl@tempc\relax +\bbl@foreach\bbl@language@opts{% + \ifcase\bbl@iniflag + \bbl@ifunset{ds@#1}% + {\DeclareOption{#1}{\bbl@load@language{#1}}}% + {}% + \or + \@gobble % case 2 same as 1 + \or + \bbl@ifunset{ds@#1}% + {\IfFileExists{#1.ldf}{}% + {\IfFileExists{babel-#1.tex}{}{\DeclareOption{#1}{}}}}% + {}% + \bbl@ifunset{ds@#1}% + {\def\bbl@tempc{#1}% + \DeclareOption{#1}{% + \ifnum\bbl@iniflag>\@ne + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}% + \else + \bbl@load@language{#1}% + \fi}}% + {}% + \or + \def\bbl@tempc{#1}% + \bbl@ifunset{ds@#1}% + {\DeclareOption{#1}{% + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}}}% + {}% + \fi} % \end{macrocode} % % Now, we make sure an option is explicitly declared for any % language set as global option, by checking if an |ldf| % exists. The previous step was, in fact, somewhat redundant, but -% that way we minimize accesing the file system just to see if the +% that way we minimize accessing the file system just to see if the % option could be a language. % % \begin{macrocode} +\let\bbl@tempb\@nnil \bbl@foreach\@classoptionslist{% \bbl@ifunset{ds@#1}% - {\IfFileExists{#1.ldf}% - {\DeclareOption{#1}{\bbl@load@language{#1}}}% - {}}% + {\IfFileExists{#1.ldf}{}% + {\IfFileExists{babel-#1.tex}{}{\DeclareOption{#1}{}}}}% + {}% + \bbl@ifunset{ds@#1}% + {\def\bbl@tempb{#1}% + \DeclareOption{#1}{% + \ifnum\bbl@iniflag>\@ne + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}% + \else + \bbl@load@language{#1}% + \fi}}% {}} % \end{macrocode} % % If a main language has been set, store it for the third pass. % % \begin{macrocode} +\ifnum\bbl@iniflag=\z@\else + \ifx\bbl@opt@main\@nnil + \ifx\bbl@tempc\relax + \let\bbl@opt@main\bbl@tempb + \else + \let\bbl@opt@main\bbl@tempc + \fi + \fi +\fi \ifx\bbl@opt@main\@nnil\else \expandafter \let\expandafter\bbl@loadmain\csname ds@\bbl@opt@main\endcsname - \DeclareOption{\bbl@opt@main}{} + \expandafter\let\csname ds@\bbl@opt@main\endcsname\@empty \fi % \end{macrocode} % @@ -6708,10 +6820,17 @@ help from Bernd Raichle, for which I am grateful. option. Reported}% \fi \else - \DeclareOption{\bbl@opt@main}{\bbl@loadmain} - \ExecuteOptions{\bbl@opt@main} - \DeclareOption*{} - \ProcessOptions* + \ifodd\bbl@iniflag % case 1,3 + \bbl@ldfinit + \let\CurrentOption\bbl@opt@main + \bbl@exp{\\\babelprovide[import,main]{\bbl@opt@main}} + \bbl@afterldf{}% + \else % case 0,2 + \chardef\bbl@iniflag\z@ % Force ldf + \expandafter\let\csname ds@\bbl@opt@main\endcsname\bbl@loadmain + \DeclareOption*{}% + \ProcessOptions* + \fi \fi \def\AfterBabelLanguage{% \bbl@error @@ -7229,7 +7348,7 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@select@type\z@ \expandafter\bbl@switch\expandafter{\languagename}% \fi}} -\def\babel@aux#1#2{% +\def\babel@aux#1#2{% TODO. See how to avoid undefined nil's \select@language{#1}% \bbl@foreach\BabelContentsFiles{% \@writefile{##1}{\babel@toc{#1}{#2}}}}% %% TODO - ok in plain? @@ -8757,7 +8876,8 @@ help from Bernd Raichle, for which I am grateful. % A user level command to change the language from which shorthands % are used. Unfortunately, \babel{} currently does not keep track % of defined groups, and therefore there is no way to catch a -% possible change in casing [TODO. Unclear]. +% possible change in casing to fix it in the same way languages names +% are fixed. [TODO]. % % \begin{macrocode} \def\languageshorthands#1{\def\language@group{#1}} @@ -9218,6 +9338,12 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@nonfrenchspacing\nonfrenchspacing \fi} \let\bbl@nonfrenchspacing\nonfrenchspacing +% +\let\bbl@elt\relax +\edef\bbl@fs@chars{% + \bbl@elt{\string.}\@m{3000}\bbl@elt{\string?}\@m{3000}% + \bbl@elt{\string!}\@m{3000}\bbl@elt{\string:}\@m{2000}% + \bbl@elt{\string;}\@m{1500}\bbl@elt{\string,}\@m{1250}} % \end{macrocode} % % \end{macro} @@ -9643,13 +9769,12 @@ help from Bernd Raichle, for which I am grateful. % order as defined. Finally, the string is set. % % \begin{macrocode} -\def\bbl@setstring#1#2{% +\def\bbl@setstring#1#2{% eg, \prefacename{<string>} \bbl@forlang\bbl@tempa{% \edef\bbl@LC{\bbl@tempa\bbl@stripslash#1}% \bbl@ifunset{\bbl@LC}% eg, \germanchaptername - {\global\expandafter % TODO - con \bbl@exp ? - \bbl@add\csname\bbl@G\bbl@tempa\expandafter\endcsname\expandafter - {\expandafter\bbl@scset\expandafter#1\csname\bbl@LC\endcsname}}% + {\bbl@exp{% + \global\\\bbl@add\<\bbl@G\bbl@tempa>{\\\bbl@scset\\#1\<\bbl@LC>}}}% {}% \def\BabelString{#2}% \bbl@usehooks{stringprocess}{}% @@ -10625,47 +10750,6 @@ help from Bernd Raichle, for which I am grateful. \fi} % \end{macrocode} % -% A tool to define the macros for native digits from the list provided -% in the |ini| file. Somewhat convoluted because there are 10 digits, -% but only 9 arguments in \TeX. Non-digits characters are kept. The -% first macro is the generic “localized” command. -% -% \begin{macrocode} -% TODO. Merge with \localenumeral: -% \newcommand\localedigits{\@nameuse{\languagename digits}} -\def\bbl@setdigits#1#2#3#4#5{% - \bbl@exp{% - \def\<\languagename digits>####1{% ie, \langdigits - \<bbl@digits@\languagename>####1\\\@nil}% - \let\<bbl@cntr@digits@\languagename>\<\languagename digits>% - \def\<\languagename counter>####1{% ie, \langcounter - \\\expandafter\<bbl@counter@\languagename>% - \\\csname c@####1\endcsname}% - \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang - \\\expandafter\<bbl@digits@\languagename>% - \\\number####1\\\@nil}}% - \def\bbl@tempa##1##2##3##4##5{% - \bbl@exp{% Wow, quite a lot of hashes! :-( - \def\<bbl@digits@\languagename>########1{% - \\\ifx########1\\\@nil % ie, \bbl@digits@lang - \\\else - \\\ifx0########1#1% - \\\else\\\ifx1########1#2% - \\\else\\\ifx2########1#3% - \\\else\\\ifx3########1#4% - \\\else\\\ifx4########1#5% - \\\else\\\ifx5########1##1% - \\\else\\\ifx6########1##2% - \\\else\\\ifx7########1##3% - \\\else\\\ifx8########1##4% - \\\else\\\ifx9########1##5% - \\\else########1% - \\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi - \\\expandafter\<bbl@digits@\languagename>% - \\\fi}}}% - \bbl@tempa} -% \end{macrocode} -% % Depending on whether or not the language exists, we define two macros. % % \begin{macrocode} @@ -10702,14 +10786,43 @@ help from Bernd Raichle, for which I am grateful. \fi \bbl@endcommands \bbl@load@basic{#1}% + % == hyphenmins == (only if new) \bbl@exp{% \gdef\<#1hyphenmins>{% {\bbl@ifunset{bbl@lfthm@#1}{2}{\bbl@cs{lfthm@#1}}}% {\bbl@ifunset{bbl@rgthm@#1}{3}{\bbl@cs{rgthm@#1}}}}}% + % == hyphenrules == \bbl@provide@hyphens{#1}% + % == frenchspacing == (only if new) + \bbl@ifunset{bbl@frspc@#1}{}% + {\edef\bbl@tempa{\bbl@cl{frspc}}% + \edef\bbl@tempa{\expandafter\@car\bbl@tempa\@nil}% + \if u\bbl@tempa % do nothing + \else\if n\bbl@tempa % non french + \expandafter\bbl@add\csname extras#1\endcsname{% + \let\bbl@elt\bbl@fs@elt@i + \bbl@fs@chars}% + \else\if y\bbl@tempa % french + \expandafter\bbl@add\csname extras#1\endcsname{% + \let\bbl@elt\bbl@fs@elt@ii + \bbl@fs@chars}% + \fi\fi\fi}% + % \ifx\bbl@KVP@main\@nil\else \expandafter\main@language\expandafter{#1}% \fi} +% A couple of macros used above, to avoid hashes #######... +\def\bbl@fs@elt@i#1#2#3{% + \ifnum\sfcode`#1=#2\relax + \babel@savevariable{\sfcode`#1}% + \sfcode`#1=#3\relax + \fi}% +\def\bbl@fs@elt@ii#1#2#3{% + \ifnum\sfcode`#1=#3\relax + \babel@savevariable{\sfcode`#1}% + \sfcode`#1=#2\relax + \fi}% +% \def\bbl@provide@renew#1{% \ifx\bbl@KVP@captions\@nil\else \StartBabelCommands*{#1}{captions}% @@ -10730,6 +10843,16 @@ help from Bernd Raichle, for which I am grateful. % more), while captions and dates are left out. But it may happen some % data has been loaded before automatically, so we first discard the % saved values. +\def\bbl@linebreak@export{% + \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% + \bbl@exportkey{hyphr}{typography.hyphenrules}{}% + \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% + \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% + \bbl@exportkey{prehc}{typography.prehyphenchar}{}% + \bbl@exportkey{hyotl}{typography.hyphenate.other.locale}{}% + \bbl@exportkey{hyots}{typography.hyphenate.other.script}{}% + \bbl@exportkey{intsp}{typography.intraspace}{}% + \bbl@exportkey{chrng}{characters.ranges}{}} \def\bbl@load@basic#1{% \bbl@ifunset{bbl@inidata@\languagename}{}% {\getlocaleproperty\bbl@tempa{\languagename}{identification/load.level}% @@ -10739,21 +10862,12 @@ help from Bernd Raichle, for which I am grateful. \bbl@ifunset{bbl@lname@#1}% {\def\BabelBeforeIni##1##2{% \begingroup - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \let\bbl@ini@captions@aux\@gobbletwo \def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}% \bbl@read@ini{##1}0% - \bbl@exportkey{prehc}{typography.prehyphenchar}{}% - \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% - \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% - \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% - \bbl@exportkey{hyphr}{typography.hyphenrules}{}% - \bbl@exportkey{hyotl}{typography.hyphenate.other.locale}{}% - \bbl@exportkey{hyots}{typography.hyphenate.other.script}{}% - \bbl@exportkey{intsp}{typography.intraspace}{}% - \bbl@exportkey{chrng}{characters.ranges}{}% + \bbl@linebreak@export \bbl@exportkey{dgnat}{numbers.digits.native}{}% + \bbl@exportkey{frspc}{typography.frenchspacing}{u}% unset \ifx\bbl@initoload\relax\endinput\fi \endgroup}% \begingroup % boxed, to avoid extra spaces: @@ -10831,8 +10945,10 @@ help from Bernd Raichle, for which I am grateful. \\\bbl@elt{\bbl@section}{\bbl@tempa}{\the\toks@}}}% \expandafter\bbl@inireader\bbl@tempa=#2\@@}% {}}% -\def\bbl@read@ini#1#2{% - \bbl@csarg\edef{lini@\languagename}{#1}% +\def\bbl@fetch@ini#1#2{% + \bbl@exp{\def\\\bbl@inidata{% + \\\bbl@elt{identification}{tag.ini}{#1}% + \\\bbl@elt{identification}{load.level}{#2}}}% \openin\bbl@readstream=babel-#1.ini \ifeof\bbl@readstream \bbl@error @@ -10841,14 +10957,8 @@ help from Bernd Raichle, for which I am grateful. is not complete.}% {Fix the name or reinstall babel.}% \else - \bbl@exp{\def\\\bbl@inidata{% - \\\bbl@elt{identification}{tag.ini}{#1}% - \\\bbl@elt{identification}{load.level}{#2}}}% - \let\bbl@section\@empty - \let\bbl@savestrings\@empty - \let\bbl@savetoday\@empty - \let\bbl@savedate\@empty - \let\bbl@inireader\bbl@iniskip + \catcode`\[=12 \catcode`\]=12 \catcode`\==12 + \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \bbl@info{Importing \ifcase#2 \or font and identification \or basic \fi data for \languagename\\% @@ -10862,28 +10972,35 @@ help from Bernd Raichle, for which I am grateful. \expandafter\bbl@iniline\bbl@line\bbl@iniline \fi \repeat - \bbl@foreach\bbl@renewlist{% - \bbl@ifunset{bbl@renew@##1}{}{\bbl@inisec[##1]\@@}}% - \global\let\bbl@renewlist\@empty - % Ends last section. See \bbl@inisec - \def\bbl@elt##1##2{\bbl@inireader##1=##2\@@}% - \bbl@cs{renew@\bbl@section}% - \global\bbl@csarg\let{renew@\bbl@section}\relax - \bbl@cs{secpost@\bbl@section}% - \bbl@csarg{\global\expandafter\let}{inidata@\languagename}\bbl@inidata - \bbl@exp{\\\bbl@add@list\\\bbl@ini@loaded{\languagename}}% - \bbl@toglobal\bbl@ini@loaded \fi} +\def\bbl@read@ini#1#2{% + \bbl@csarg\edef{lini@\languagename}{#1}% + \let\bbl@section\@empty + \let\bbl@savestrings\@empty + \let\bbl@savetoday\@empty + \let\bbl@savedate\@empty + \let\bbl@inireader\bbl@iniskip + \bbl@fetch@ini{#1}{#2}% + \bbl@foreach\bbl@renewlist{% + \bbl@ifunset{bbl@renew@##1}{}{\bbl@inisec[##1]\@@}}% + \global\let\bbl@renewlist\@empty + % Ends last section. See \bbl@inisec + \def\bbl@elt##1##2{\bbl@inireader##1=##2\@@}% + \bbl@cs{renew@\bbl@section}% + \global\bbl@csarg\let{renew@\bbl@section}\relax + \bbl@cs{secpost@\bbl@section}% + \bbl@csarg{\global\expandafter\let}{inidata@\languagename}\bbl@inidata + \bbl@exp{\\\bbl@add@list\\\bbl@ini@loaded{\languagename}}% + \bbl@toglobal\bbl@ini@loaded} \def\bbl@iniline#1\bbl@iniline{% \@ifnextchar[\bbl@inisec{\@ifnextchar;\bbl@iniskip\bbl@inipreread}#1\@@}% ] % \end{macrocode} % % The special cases for comment lines and sections are handled by the % two following commands. In sections, we provide the posibility to -% take extra actions at the end or at the start (TODO - but note the last -% section is not ended). By default, key=val pairs are ignored. The -% |secpost| ``hook'' is used only by `identification', while |secpre| -% only by |date.gregorian.licr|. +% take extra actions at the end or at the start. By default, key=val +% pairs are ignored. The |secpost| ``hook'' is used only by +% `identification', while |secpre| only by |date.gregorian.licr|. % % \begin{macrocode} \def\bbl@iniskip#1\@@{}% if starts with ; @@ -11023,18 +11140,10 @@ help from Bernd Raichle, for which I am grateful. \bbl@csarg{\global\expandafter\let}{cntr@#1@\languagename}\bbl@tempa \fi} \def\bbl@after@ini{% - \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% - \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% - \bbl@exportkey{prehc}{typography.prehyphenchar}{}% - \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% - \bbl@exportkey{hyphr}{typography.hyphenrules}{}% - \bbl@exportkey{hyotl}{typography.hyphenate.other.locale}{}% - \bbl@exportkey{hyots}{typography.hyphenate.other.script}{}% - \bbl@exportkey{intsp}{typography.intraspace}{}% - \bbl@exportkey{jstfy}{typography.justify}{w}% - \bbl@exportkey{chrng}{characters.ranges}{}% + \bbl@linebreak@export \bbl@exportkey{dgnat}{numbers.digits.native}{}% \bbl@exportkey{rqtex}{identification.require.babel}{}% + \bbl@exportkey{frspc}{typography.frenchspacing}{u}% unset \bbl@toglobal\bbl@savetoday \bbl@toglobal\bbl@savedate} % \end{macrocode} @@ -11227,18 +11336,6 @@ help from Bernd Raichle, for which I am grateful. % Arguments are _not_ protected. \let\bbl@calendar\@empty \DeclareRobustCommand\localedate[1][]{\bbl@localedate{#1}} -\def\bbl@cased{% TODO. Move - \ifx\oe\OE - \expandafter\in@\expandafter - {\expandafter\OE\expandafter}\expandafter{\oe}% - \ifin@ - \bbl@afterelse\expandafter\MakeUppercase - \else - \bbl@afterfi\expandafter\MakeLowercase - \fi - \else - \expandafter\@firstofone - \fi} \def\bbl@localedate#1#2#3#4{% \begingroup \ifx\@empty#1\@empty\else @@ -11374,8 +11471,6 @@ help from Bernd Raichle, for which I am grateful. \fi}}% \fi \bbl@csarg\bbl@toglobal{lsys@#1}} -\def\bbl@ifset#1#2#3{% TODO. Move to the correct place. - \bbl@ifunset{#1}{#3}{\bbl@exp{\\\bbl@ifblank{#1}}{#3}{#2}}} \def\bbl@xenohyph@d{% \bbl@ifset{bbl@prehc@\languagename}% {\ifnum\hyphenchar\font=\defaulthyphenchar @@ -11410,14 +11505,51 @@ help from Bernd Raichle, for which I am grateful. \def\BabelBeforeIni##1##2{% \begingroup \bbl@add\bbl@secpost@identification{\closein\bbl@readstream }% - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \bbl@read@ini{##1}1% \endinput % babel- .tex may contain onlypreamble's \endgroup}% boxed, to avoid extra spaces: {\bbl@input@texini{#1}}} % \end{macrocode} % +% A tool to define the macros for native digits from the list provided +% in the |ini| file. Somewhat convoluted because there are 10 digits, +% but only 9 arguments in \TeX. Non-digits characters are kept. The +% first macro is the generic “localized” command. +% +% \begin{macrocode} +\def\bbl@setdigits#1#2#3#4#5{% + \bbl@exp{% + \def\<\languagename digits>####1{% ie, \langdigits + \<bbl@digits@\languagename>####1\\\@nil}% + \let\<bbl@cntr@digits@\languagename>\<\languagename digits>% + \def\<\languagename counter>####1{% ie, \langcounter + \\\expandafter\<bbl@counter@\languagename>% + \\\csname c@####1\endcsname}% + \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang + \\\expandafter\<bbl@digits@\languagename>% + \\\number####1\\\@nil}}% + \def\bbl@tempa##1##2##3##4##5{% + \bbl@exp{% Wow, quite a lot of hashes! :-( + \def\<bbl@digits@\languagename>########1{% + \\\ifx########1\\\@nil % ie, \bbl@digits@lang + \\\else + \\\ifx0########1#1% + \\\else\\\ifx1########1#2% + \\\else\\\ifx2########1#3% + \\\else\\\ifx3########1#4% + \\\else\\\ifx4########1#5% + \\\else\\\ifx5########1##1% + \\\else\\\ifx6########1##2% + \\\else\\\ifx7########1##3% + \\\else\\\ifx8########1##4% + \\\else\\\ifx9########1##5% + \\\else########1% + \\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi + \\\expandafter\<bbl@digits@\languagename>% + \\\fi}}}% + \bbl@tempa} +% \end{macrocode} +% % Alphabetic counters must be converted from a space separated list to % an |\ifcase| structure. % @@ -11594,7 +11726,7 @@ help from Bernd Raichle, for which I am grateful. \bbl@adjust@layout{\let\@tabular\bbl@OL@@tabular}} \@namedef{bbl@ADJ@layout.lists@on}{% \bbl@adjust@layout{\let\list\bbl@NL@list}} -\@namedef{bbl@ADJ@layout.lists@on}{% +\@namedef{bbl@ADJ@layout.lists@off}{% \bbl@adjust@layout{\let\list\bbl@OL@list}} \@namedef{bbl@ADJ@hyphenation.extra@on}{% \bbl@activateposthyphen} @@ -12051,9 +12183,35 @@ help from Bernd Raichle, for which I am grateful. % |bbl@font| replaces hardcoded font names inside |\..family| by the % corresponding macro |\..default|. % +% At the time of this writing, \textsf{fontspec} shows a warning about +% there are languages not available, which some people think refers to +% \babel{}, even if there is nothing wrong. Here is hack to patch +% \textsf{fontspec} to avoid the misleading message, which is replaced +% ba a more explanatory one. +% % \begin{macrocode} %<<*Font selection>> \bbl@trace{Font handling with fontspec} +\ifx\ExplSyntaxOn\@undefined\else + \ExplSyntaxOn + \catcode`\ =10 + \def\bbl@loadfontspec{% + \usepackage{fontspec}% + \expandafter + \def\csname msg~text~>~fontspec/language-not-exist\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for language '##1'.\\% + That's usually fine, because many languages\\% + require no specific features, but if the output is\\% + not as expected, consider selecting another font.} + \expandafter + \def\csname msg~text~>~fontspec/no-script\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for script '##2'.\\% + That's not always wrong, but if the output is\\% + not as expected, consider selecting another font.}} + \ExplSyntaxOff +\fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam \bbl@foreach{#1}{% @@ -12065,7 +12223,7 @@ help from Bernd Raichle, for which I am grateful. \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont \ifx\fontspec\@undefined - \usepackage{fontspec}% + \bbl@loadfontspec \fi \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} @@ -12210,7 +12368,7 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@mapselect\relax \let\bbl@temp@fam#4% eg, '\rmfamily', to be restored below \let#4\@empty % Make sure \renewfontfamily is valid - \bbl@exp{% + \bbl@exp{% \let\\\bbl@temp@pfam\<\bbl@stripslash#4\space>% eg, '\rmfamily ' \<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl@cl{sname}}% {\\\newfontscript{\bbl@cl{sname}}{\bbl@cl{sotf}}}% @@ -13729,6 +13887,9 @@ end if not u.find(patt, '()', nil, true) then patt = '()' .. patt .. '()' end + patt = string.gsub(patt, '%(%)%^', '^()') + patt = string.gsub(patt, '%$%(%)', '()$') + texio.write('***************' .. patt) patt = u.gsub(patt, '{(.)}', function (n) return '%' .. (tonumber(n) and (tonumber(n)+1) or n) diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index 68356b04c04..3112ec6eb5c 100644 --- a/Master/texmf-dist/source/latex/babel/babel.ins +++ b/Master/texmf-dist/source/latex/babel/babel.ins @@ -26,7 +26,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %% -\def\filedate{2020/09/01} +\def\filedate{2020/10/03} \def\batchfile{babel.ins} \input docstrip.tex diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx index a94e0170db8..09bc92e3ef9 100644 --- a/Master/texmf-dist/source/latex/babel/bbcompat.dtx +++ b/Master/texmf-dist/source/latex/babel/bbcompat.dtx @@ -30,7 +30,7 @@ % % \iffalse %<*dtx> -\ProvidesFile{bbcompat.dtx}[2020/09/01 v3.48] +\ProvidesFile{bbcompat.dtx}[2020/10/03 v3.49] %</dtx> % %% File 'bbcompat.dtx' diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip Binary files differindex 60aea0315e6..ac9b5dd147b 100644 --- a/Master/texmf-dist/source/latex/babel/locale.zip +++ b/Master/texmf-dist/source/latex/babel/locale.zip diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index 216b0cb7cab..5236ab778d6 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.def +++ b/Master/texmf-dist/tex/generic/babel/babel.def @@ -39,7 +39,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{babel.def}[2020/09/01 3.48 Babel common definitions] +\ProvidesFile{babel.def}[2020/10/03 3.49 Babel common definitions] \ifx\AtBeginDocument\@undefined % TODO. change test. % == Code for plain == \def\@empty{} @@ -397,8 +397,8 @@ \fi \countdef\last@language=19 % TODO. why? remove? \def\addlanguage{\csname newlanguage\endcsname} -\def\bbl@version{3.48} -\def\bbl@date{2020/09/01} +\def\bbl@version{3.49} +\def\bbl@date{2020/10/03} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% @@ -614,7 +614,7 @@ \let\bbl@select@type\z@ \expandafter\bbl@switch\expandafter{\languagename}% \fi}} -\def\babel@aux#1#2{% +\def\babel@aux#1#2{% TODO. See how to avoid undefined nil's \select@language{#1}% \bbl@foreach\BabelContentsFiles{% \@writefile{##1}{\babel@toc{#1}{#2}}}}% %% TODO - ok in plain? @@ -950,6 +950,8 @@ \def\bbl@ifblank#1{% \bbl@ifblank@i#1\@nil\@nil\@secondoftwo\@firstoftwo\@nil} \long\def\bbl@ifblank@i#1#2\@nil#3#4#5\@nil{#4} +\def\bbl@ifset#1#2#3{% + \bbl@ifunset{#1}{#3}{\bbl@exp{\\\bbl@ifblank{#1}}{#3}{#2}}} \def\bbl@forkv#1#2{% \def\bbl@kvcmd##1##2##3{#2}% \bbl@kvnext#1,\@nil,} @@ -1038,6 +1040,18 @@ \else \let\bbl@esphack\@empty \fi} +\def\bbl@cased{% + \ifx\oe\OE + \expandafter\in@\expandafter + {\expandafter\OE\expandafter}\expandafter{\oe}% + \ifin@ + \bbl@afterelse\expandafter\MakeUppercase + \else + \bbl@afterfi\expandafter\MakeLowercase + \fi + \else + \expandafter\@firstofone + \fi} \bbl@trace{Compatibility with language.def} \ifx\bbl@languages\@undefined \ifx\directlua\@undefined @@ -1685,6 +1699,11 @@ \let\bbl@nonfrenchspacing\nonfrenchspacing \fi} \let\bbl@nonfrenchspacing\nonfrenchspacing +\let\bbl@elt\relax +\edef\bbl@fs@chars{% + \bbl@elt{\string.}\@m{3000}\bbl@elt{\string?}\@m{3000}% + \bbl@elt{\string!}\@m{3000}\bbl@elt{\string:}\@m{2000}% + \bbl@elt{\string;}\@m{1500}\bbl@elt{\string,}\@m{1250}} \bbl@trace{Short tags} \def\babeltags#1{% \edef\bbl@tempa{\zap@space#1 \@empty}% @@ -1928,13 +1947,12 @@ \endgroup \bbl@scafter} \let\bbl@endcommands\EndBabelCommands -\def\bbl@setstring#1#2{% +\def\bbl@setstring#1#2{% eg, \prefacename{<string>} \bbl@forlang\bbl@tempa{% \edef\bbl@LC{\bbl@tempa\bbl@stripslash#1}% \bbl@ifunset{\bbl@LC}% eg, \germanchaptername - {\global\expandafter % TODO - con \bbl@exp ? - \bbl@add\csname\bbl@G\bbl@tempa\expandafter\endcsname\expandafter - {\expandafter\bbl@scset\expandafter#1\csname\bbl@LC\endcsname}}% + {\bbl@exp{% + \global\\\bbl@add\<\bbl@G\bbl@tempa>{\\\bbl@scset\\#1\<\bbl@LC>}}}% {}% \def\BabelString{#2}% \bbl@usehooks{stringprocess}{}% @@ -2504,37 +2522,6 @@ \let\languagename\bbl@savelangname \chardef\localeid\bbl@savelocaleid\relax \fi} -\def\bbl@setdigits#1#2#3#4#5{% - \bbl@exp{% - \def\<\languagename digits>####1{% ie, \langdigits - \<bbl@digits@\languagename>####1\\\@nil}% - \let\<bbl@cntr@digits@\languagename>\<\languagename digits>% - \def\<\languagename counter>####1{% ie, \langcounter - \\\expandafter\<bbl@counter@\languagename>% - \\\csname c@####1\endcsname}% - \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang - \\\expandafter\<bbl@digits@\languagename>% - \\\number####1\\\@nil}}% - \def\bbl@tempa##1##2##3##4##5{% - \bbl@exp{% Wow, quite a lot of hashes! :-( - \def\<bbl@digits@\languagename>########1{% - \\\ifx########1\\\@nil % ie, \bbl@digits@lang - \\\else - \\\ifx0########1#1% - \\\else\\\ifx1########1#2% - \\\else\\\ifx2########1#3% - \\\else\\\ifx3########1#4% - \\\else\\\ifx4########1#5% - \\\else\\\ifx5########1##1% - \\\else\\\ifx6########1##2% - \\\else\\\ifx7########1##3% - \\\else\\\ifx8########1##4% - \\\else\\\ifx9########1##5% - \\\else########1% - \\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi - \\\expandafter\<bbl@digits@\languagename>% - \\\fi}}}% - \bbl@tempa} \def\bbl@provide@new#1{% \@namedef{date#1}{}% marks lang exists - required by \StartBabelCommands \@namedef{extras#1}{}% @@ -2568,14 +2555,41 @@ \fi \bbl@endcommands \bbl@load@basic{#1}% + % == hyphenmins == (only if new) \bbl@exp{% \gdef\<#1hyphenmins>{% {\bbl@ifunset{bbl@lfthm@#1}{2}{\bbl@cs{lfthm@#1}}}% {\bbl@ifunset{bbl@rgthm@#1}{3}{\bbl@cs{rgthm@#1}}}}}% + % == hyphenrules == \bbl@provide@hyphens{#1}% + % == frenchspacing == (only if new) + \bbl@ifunset{bbl@frspc@#1}{}% + {\edef\bbl@tempa{\bbl@cl{frspc}}% + \edef\bbl@tempa{\expandafter\@car\bbl@tempa\@nil}% + \if u\bbl@tempa % do nothing + \else\if n\bbl@tempa % non french + \expandafter\bbl@add\csname extras#1\endcsname{% + \let\bbl@elt\bbl@fs@elt@i + \bbl@fs@chars}% + \else\if y\bbl@tempa % french + \expandafter\bbl@add\csname extras#1\endcsname{% + \let\bbl@elt\bbl@fs@elt@ii + \bbl@fs@chars}% + \fi\fi\fi}% + % \ifx\bbl@KVP@main\@nil\else \expandafter\main@language\expandafter{#1}% \fi} +\def\bbl@fs@elt@i#1#2#3{% + \ifnum\sfcode`#1=#2\relax + \babel@savevariable{\sfcode`#1}% + \sfcode`#1=#3\relax + \fi}% +\def\bbl@fs@elt@ii#1#2#3{% + \ifnum\sfcode`#1=#3\relax + \babel@savevariable{\sfcode`#1}% + \sfcode`#1=#2\relax + \fi}% \def\bbl@provide@renew#1{% \ifx\bbl@KVP@captions\@nil\else \StartBabelCommands*{#1}{captions}% @@ -2592,6 +2606,16 @@ \fi % == hyphenrules == \bbl@provide@hyphens{#1}} +\def\bbl@linebreak@export{% + \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% + \bbl@exportkey{hyphr}{typography.hyphenrules}{}% + \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% + \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% + \bbl@exportkey{prehc}{typography.prehyphenchar}{}% + \bbl@exportkey{hyotl}{typography.hyphenate.other.locale}{}% + \bbl@exportkey{hyots}{typography.hyphenate.other.script}{}% + \bbl@exportkey{intsp}{typography.intraspace}{}% + \bbl@exportkey{chrng}{characters.ranges}{}} \def\bbl@load@basic#1{% \bbl@ifunset{bbl@inidata@\languagename}{}% {\getlocaleproperty\bbl@tempa{\languagename}{identification/load.level}% @@ -2601,21 +2625,12 @@ \bbl@ifunset{bbl@lname@#1}% {\def\BabelBeforeIni##1##2{% \begingroup - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \let\bbl@ini@captions@aux\@gobbletwo \def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}% \bbl@read@ini{##1}0% - \bbl@exportkey{prehc}{typography.prehyphenchar}{}% - \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% - \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% - \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% - \bbl@exportkey{hyphr}{typography.hyphenrules}{}% - \bbl@exportkey{hyotl}{typography.hyphenate.other.locale}{}% - \bbl@exportkey{hyots}{typography.hyphenate.other.script}{}% - \bbl@exportkey{intsp}{typography.intraspace}{}% - \bbl@exportkey{chrng}{characters.ranges}{}% + \bbl@linebreak@export \bbl@exportkey{dgnat}{numbers.digits.native}{}% + \bbl@exportkey{frspc}{typography.frenchspacing}{u}% unset \ifx\bbl@initoload\relax\endinput\fi \endgroup}% \begingroup % boxed, to avoid extra spaces: @@ -2681,8 +2696,10 @@ \\\bbl@elt{\bbl@section}{\bbl@tempa}{\the\toks@}}}% \expandafter\bbl@inireader\bbl@tempa=#2\@@}% {}}% -\def\bbl@read@ini#1#2{% - \bbl@csarg\edef{lini@\languagename}{#1}% +\def\bbl@fetch@ini#1#2{% + \bbl@exp{\def\\\bbl@inidata{% + \\\bbl@elt{identification}{tag.ini}{#1}% + \\\bbl@elt{identification}{load.level}{#2}}}% \openin\bbl@readstream=babel-#1.ini \ifeof\bbl@readstream \bbl@error @@ -2691,14 +2708,8 @@ is not complete.}% {Fix the name or reinstall babel.}% \else - \bbl@exp{\def\\\bbl@inidata{% - \\\bbl@elt{identification}{tag.ini}{#1}% - \\\bbl@elt{identification}{load.level}{#2}}}% - \let\bbl@section\@empty - \let\bbl@savestrings\@empty - \let\bbl@savetoday\@empty - \let\bbl@savedate\@empty - \let\bbl@inireader\bbl@iniskip + \catcode`\[=12 \catcode`\]=12 \catcode`\==12 + \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \bbl@info{Importing \ifcase#2 \or font and identification \or basic \fi data for \languagename\\% @@ -2712,18 +2723,26 @@ \expandafter\bbl@iniline\bbl@line\bbl@iniline \fi \repeat - \bbl@foreach\bbl@renewlist{% - \bbl@ifunset{bbl@renew@##1}{}{\bbl@inisec[##1]\@@}}% - \global\let\bbl@renewlist\@empty - % Ends last section. See \bbl@inisec - \def\bbl@elt##1##2{\bbl@inireader##1=##2\@@}% - \bbl@cs{renew@\bbl@section}% - \global\bbl@csarg\let{renew@\bbl@section}\relax - \bbl@cs{secpost@\bbl@section}% - \bbl@csarg{\global\expandafter\let}{inidata@\languagename}\bbl@inidata - \bbl@exp{\\\bbl@add@list\\\bbl@ini@loaded{\languagename}}% - \bbl@toglobal\bbl@ini@loaded \fi} +\def\bbl@read@ini#1#2{% + \bbl@csarg\edef{lini@\languagename}{#1}% + \let\bbl@section\@empty + \let\bbl@savestrings\@empty + \let\bbl@savetoday\@empty + \let\bbl@savedate\@empty + \let\bbl@inireader\bbl@iniskip + \bbl@fetch@ini{#1}{#2}% + \bbl@foreach\bbl@renewlist{% + \bbl@ifunset{bbl@renew@##1}{}{\bbl@inisec[##1]\@@}}% + \global\let\bbl@renewlist\@empty + % Ends last section. See \bbl@inisec + \def\bbl@elt##1##2{\bbl@inireader##1=##2\@@}% + \bbl@cs{renew@\bbl@section}% + \global\bbl@csarg\let{renew@\bbl@section}\relax + \bbl@cs{secpost@\bbl@section}% + \bbl@csarg{\global\expandafter\let}{inidata@\languagename}\bbl@inidata + \bbl@exp{\\\bbl@add@list\\\bbl@ini@loaded{\languagename}}% + \bbl@toglobal\bbl@ini@loaded} \def\bbl@iniline#1\bbl@iniline{% \@ifnextchar[\bbl@inisec{\@ifnextchar;\bbl@iniskip\bbl@inipreread}#1\@@}% ] \def\bbl@iniskip#1\@@{}% if starts with ; @@ -2842,18 +2861,10 @@ \bbl@csarg{\global\expandafter\let}{cntr@#1@\languagename}\bbl@tempa \fi} \def\bbl@after@ini{% - \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% - \bbl@exportkey{rgthm}{typography.righthyphenmin}{3}% - \bbl@exportkey{prehc}{typography.prehyphenchar}{}% - \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% - \bbl@exportkey{hyphr}{typography.hyphenrules}{}% - \bbl@exportkey{hyotl}{typography.hyphenate.other.locale}{}% - \bbl@exportkey{hyots}{typography.hyphenate.other.script}{}% - \bbl@exportkey{intsp}{typography.intraspace}{}% - \bbl@exportkey{jstfy}{typography.justify}{w}% - \bbl@exportkey{chrng}{characters.ranges}{}% + \bbl@linebreak@export \bbl@exportkey{dgnat}{numbers.digits.native}{}% \bbl@exportkey{rqtex}{identification.require.babel}{}% + \bbl@exportkey{frspc}{typography.frenchspacing}{u}% unset \bbl@toglobal\bbl@savetoday \bbl@toglobal\bbl@savedate} \ifcase\bbl@engine @@ -3012,18 +3023,6 @@ \fi \let\bbl@calendar\@empty \DeclareRobustCommand\localedate[1][]{\bbl@localedate{#1}} -\def\bbl@cased{% TODO. Move - \ifx\oe\OE - \expandafter\in@\expandafter - {\expandafter\OE\expandafter}\expandafter{\oe}% - \ifin@ - \bbl@afterelse\expandafter\MakeUppercase - \else - \bbl@afterfi\expandafter\MakeLowercase - \fi - \else - \expandafter\@firstofone - \fi} \def\bbl@localedate#1#2#3#4{% \begingroup \ifx\@empty#1\@empty\else @@ -3142,8 +3141,6 @@ \fi}}% \fi \bbl@csarg\bbl@toglobal{lsys@#1}} -\def\bbl@ifset#1#2#3{% TODO. Move to the correct place. - \bbl@ifunset{#1}{#3}{\bbl@exp{\\\bbl@ifblank{#1}}{#3}{#2}}} \def\bbl@xenohyph@d{% \bbl@ifset{bbl@prehc@\languagename}% {\ifnum\hyphenchar\font=\defaulthyphenchar @@ -3167,12 +3164,41 @@ \def\BabelBeforeIni##1##2{% \begingroup \bbl@add\bbl@secpost@identification{\closein\bbl@readstream }% - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 - \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \bbl@read@ini{##1}1% \endinput % babel- .tex may contain onlypreamble's \endgroup}% boxed, to avoid extra spaces: {\bbl@input@texini{#1}}} +\def\bbl@setdigits#1#2#3#4#5{% + \bbl@exp{% + \def\<\languagename digits>####1{% ie, \langdigits + \<bbl@digits@\languagename>####1\\\@nil}% + \let\<bbl@cntr@digits@\languagename>\<\languagename digits>% + \def\<\languagename counter>####1{% ie, \langcounter + \\\expandafter\<bbl@counter@\languagename>% + \\\csname c@####1\endcsname}% + \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang + \\\expandafter\<bbl@digits@\languagename>% + \\\number####1\\\@nil}}% + \def\bbl@tempa##1##2##3##4##5{% + \bbl@exp{% Wow, quite a lot of hashes! :-( + \def\<bbl@digits@\languagename>########1{% + \\\ifx########1\\\@nil % ie, \bbl@digits@lang + \\\else + \\\ifx0########1#1% + \\\else\\\ifx1########1#2% + \\\else\\\ifx2########1#3% + \\\else\\\ifx3########1#4% + \\\else\\\ifx4########1#5% + \\\else\\\ifx5########1##1% + \\\else\\\ifx6########1##2% + \\\else\\\ifx7########1##3% + \\\else\\\ifx8########1##4% + \\\else\\\ifx9########1##5% + \\\else########1% + \\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi + \\\expandafter\<bbl@digits@\languagename>% + \\\fi}}}% + \bbl@tempa} \def\bbl@buildifcase#1 {% Returns \bbl@tempa, requires \toks@={} \ifx\\#1% % \\ before, in case #1 is multiletter \bbl@exp{% @@ -3308,7 +3334,7 @@ \bbl@adjust@layout{\let\@tabular\bbl@OL@@tabular}} \@namedef{bbl@ADJ@layout.lists@on}{% \bbl@adjust@layout{\let\list\bbl@NL@list}} -\@namedef{bbl@ADJ@layout.lists@on}{% +\@namedef{bbl@ADJ@layout.lists@off}{% \bbl@adjust@layout{\let\list\bbl@OL@list}} \@namedef{bbl@ADJ@hyphenation.extra@on}{% \bbl@activateposthyphen} diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index 7cd6d69fe7b..29e5321158a 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.sty +++ b/Master/texmf-dist/tex/generic/babel/babel.sty @@ -33,7 +33,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{babel}[2020/09/01 3.48 The Babel package] +\ProvidesPackage{babel}[2020/10/03 3.49 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone} @@ -106,6 +106,8 @@ \def\bbl@ifblank#1{% \bbl@ifblank@i#1\@nil\@nil\@secondoftwo\@firstoftwo\@nil} \long\def\bbl@ifblank@i#1#2\@nil#3#4#5\@nil{#4} +\def\bbl@ifset#1#2#3{% + \bbl@ifunset{#1}{#3}{\bbl@exp{\\\bbl@ifblank{#1}}{#3}{#2}}} \def\bbl@forkv#1#2{% \def\bbl@kvcmd##1##2##3{#2}% \bbl@kvnext#1,\@nil,} @@ -194,6 +196,18 @@ \else \let\bbl@esphack\@empty \fi} +\def\bbl@cased{% + \ifx\oe\OE + \expandafter\in@\expandafter + {\expandafter\OE\expandafter}\expandafter{\oe}% + \ifin@ + \bbl@afterelse\expandafter\MakeUppercase + \else + \bbl@afterfi\expandafter\MakeLowercase + \fi + \else + \expandafter\@firstofone + \fi} % Temporarily repeat here the code for errors \def\bbl@error#1#2{% \begingroup @@ -295,17 +309,24 @@ \endinput}{}% \bbl@trace{key=value and another general options} \bbl@csarg\let{tempa\expandafter}\csname opt@babel.sty\endcsname -\def\bbl@tempb#1.#2{% +\def\bbl@tempb#1.#2{% Remove trailing dot #1\ifx\@empty#2\else,\bbl@afterfi\bbl@tempb#2\fi}% -\def\bbl@tempd#1.#2\@nnil{% +\def\bbl@tempd#1.#2\@nnil{% TODO. Refactor lists? \ifx\@empty#2% \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}% \else - \in@{=}{#1}\ifin@ - \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.#2}% + \in@{,provide,}{,#1,}% + \ifin@ + \edef\bbl@tempc{% + \ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.\bbl@tempb#2}% \else - \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}% - \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}% + \in@{=}{#1}% + \ifin@ + \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1.#2}% + \else + \edef\bbl@tempc{\ifx\bbl@tempc\@empty\else\bbl@tempc,\fi#1}% + \bbl@csarg\edef{mod@#1}{\bbl@tempb#2}% + \fi \fi \fi} \let\bbl@tempc\@empty @@ -320,8 +341,16 @@ \DeclareOption{silent}{} \DeclareOption{mono}{} \DeclareOption{shorthands=off}{\bbl@tempa shorthands=\bbl@tempa} +\chardef\bbl@iniflag\z@ +\DeclareOption{provide=*}{\chardef\bbl@iniflag\@ne} % main -> +1 +\DeclareOption{provide+=*}{\chardef\bbl@iniflag\tw@} % add = 2 +\DeclareOption{provide*=*}{\chardef\bbl@iniflag\thr@@} % add + main \newif\ifbbl@single \DeclareOption{selectors=off}{\bbl@singletrue} +\DeclareOption{provide@=*}{} % autoload with cat @=letter +\makeatother +\DeclareOption{provide@=*}{} % autoload with cat @=other +\makeatletter \DeclareOption{safe=none}{\let\bbl@opt@safe\@empty} \DeclareOption{safe=bib}{\def\bbl@opt@safe{B}} \DeclareOption{safe=ref}{\def\bbl@opt@safe{R}} @@ -755,7 +784,7 @@ \AtEndOfPackage{% \EnableBabelHook{babel-bidi}% \ifx\fontspec\@undefined - \usepackage{fontspec}% bidi needs fontspec + \bbl@loadfontspec % bidi needs fontspec \fi \usepackage#1{bidi}}% \fi} @@ -764,10 +793,8 @@ \bbl@tentative{bidi=bidi} \bbl@loadxebidi{} \or - \bbl@tentative{bidi=bidi-r} \bbl@loadxebidi{[rldocument]} \or - \bbl@tentative{bidi=bidi-l} \bbl@loadxebidi{} \fi \fi @@ -982,13 +1009,13 @@ {\bbl@error{% Unknown option `\CurrentOption'. Either you misspelled it\\% or the language definition file \CurrentOption.ldf was not found}{% - Valid options are: shorthands=, KeepShorthandsActive,\\% + Valid options are, among others: shorthands=, KeepShorthandsActive,\\% activeacute, activegrave, noconfigs, safe=, main=, math=\\% headfoot=, strings=, config=, hyphenmap=, or a language name.}}} \def\bbl@try@load@lang#1#2#3{% - \IfFileExists{\CurrentOption.ldf}% - {\bbl@load@language{\CurrentOption}}% - {#1\bbl@load@language{#2}#3}} + \IfFileExists{\CurrentOption.ldf}% + {\bbl@load@language{\CurrentOption}}% + {#1\bbl@load@language{#2}#3}} \DeclareOption{afrikaans}{\bbl@try@load@lang{}{dutch}{}} \DeclareOption{hebrew}{% \input{rlbabel.def}% @@ -1017,24 +1044,69 @@ Local config file `\bbl@opt@config.cfg' not found}{% Perhaps you misspelled it.}}% \fi -\bbl@for\bbl@tempa\bbl@language@opts{% - \bbl@ifunset{ds@\bbl@tempa}% - {\edef\bbl@tempb{% - \noexpand\DeclareOption - {\bbl@tempa}% - {\noexpand\bbl@load@language{\bbl@tempa}}}% - \bbl@tempb}% - \@empty} +\let\bbl@tempc\relax +\bbl@foreach\bbl@language@opts{% + \ifcase\bbl@iniflag + \bbl@ifunset{ds@#1}% + {\DeclareOption{#1}{\bbl@load@language{#1}}}% + {}% + \or + \@gobble % case 2 same as 1 + \or + \bbl@ifunset{ds@#1}% + {\IfFileExists{#1.ldf}{}% + {\IfFileExists{babel-#1.tex}{}{\DeclareOption{#1}{}}}}% + {}% + \bbl@ifunset{ds@#1}% + {\def\bbl@tempc{#1}% + \DeclareOption{#1}{% + \ifnum\bbl@iniflag>\@ne + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}% + \else + \bbl@load@language{#1}% + \fi}}% + {}% + \or + \def\bbl@tempc{#1}% + \bbl@ifunset{ds@#1}% + {\DeclareOption{#1}{% + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}}}% + {}% + \fi} +\let\bbl@tempb\@nnil \bbl@foreach\@classoptionslist{% \bbl@ifunset{ds@#1}% - {\IfFileExists{#1.ldf}% - {\DeclareOption{#1}{\bbl@load@language{#1}}}% - {}}% + {\IfFileExists{#1.ldf}{}% + {\IfFileExists{babel-#1.tex}{}{\DeclareOption{#1}{}}}}% + {}% + \bbl@ifunset{ds@#1}% + {\def\bbl@tempb{#1}% + \DeclareOption{#1}{% + \ifnum\bbl@iniflag>\@ne + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}% + \else + \bbl@load@language{#1}% + \fi}}% {}} +\ifnum\bbl@iniflag=\z@\else + \ifx\bbl@opt@main\@nnil + \ifx\bbl@tempc\relax + \let\bbl@opt@main\bbl@tempb + \else + \let\bbl@opt@main\bbl@tempc + \fi + \fi +\fi \ifx\bbl@opt@main\@nnil\else \expandafter \let\expandafter\bbl@loadmain\csname ds@\bbl@opt@main\endcsname - \DeclareOption{\bbl@opt@main}{} + \expandafter\let\csname ds@\bbl@opt@main\endcsname\@empty \fi \def\AfterBabelLanguage#1{% \bbl@ifsamestring\CurrentOption{#1}{\global\bbl@add\bbl@afterlang}{}} @@ -1058,10 +1130,17 @@ option. Reported}% \fi \else - \DeclareOption{\bbl@opt@main}{\bbl@loadmain} - \ExecuteOptions{\bbl@opt@main} - \DeclareOption*{} - \ProcessOptions* + \ifodd\bbl@iniflag % case 1,3 + \bbl@ldfinit + \let\CurrentOption\bbl@opt@main + \bbl@exp{\\\babelprovide[import,main]{\bbl@opt@main}} + \bbl@afterldf{}% + \else % case 0,2 + \chardef\bbl@iniflag\z@ % Force ldf + \expandafter\let\csname ds@\bbl@opt@main\endcsname\bbl@loadmain + \DeclareOption*{}% + \ProcessOptions* + \fi \fi \def\AfterBabelLanguage{% \bbl@error diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 1b9e6a23100..aa49007d2c4 100644 --- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg +++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg @@ -37,10 +37,10 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{hyphen.cfg}[2020/09/01 3.48 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2020/10/03 3.49 Babel hyphens] \xdef\bbl@format{\jobname} -\def\bbl@version{3.48} -\def\bbl@date{2020/09/01} +\def\bbl@version{3.49} +\def\bbl@date{2020/10/03} \ifx\AtBeginDocument\@undefined \def\@empty{} \let\orig@dump\dump diff --git a/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini b/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini index 42bfdf2339b..71e1c953151 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.7 -date = 2020-06-30 +version = 1.8 +date = 2020-09-30 name.local = ខ្មែរ name.english = Khmer name.babel = khmer @@ -145,7 +145,6 @@ exhyphenchar = preexhyphenchar = postexhyphenchar = hyphenationmin = -justify = s intraspace = 0 .1 0 linebreaking = s diff --git a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini index 40ed38086f4..8ed2333afd0 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.6 -date = 2020-06-30 +version = 1.7 +date = 2020-09-30 name.local = ລາວ name.english = Lao name.babel = lao @@ -123,7 +123,6 @@ exhyphenchar = preexhyphenchar = postexhyphenchar = hyphenationmin = -justify = s intraspace = 0 .1 0 linebreaking = s diff --git a/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini b/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini index 540520a7d06..58fbe840658 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/th/babel-th.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.6 -date = 2020-06-30 +version = 1.7 +date = 2020-09-30 name.local = ไทย name.english = Thai name.babel = thai @@ -161,7 +161,6 @@ exhyphenchar = preexhyphenchar = postexhyphenchar = hyphenationmin = -justify = s intraspace = 0 .1 0 linebreaking = s diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 6e27edcf75b..2d1ddbdf032 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -536,6 +536,26 @@ \AddBabelHook{babel-fontspec}{beforestart}{\bbl@ckeckstdfonts} \DisableBabelHook{babel-fontspec} \bbl@trace{Font handling with fontspec} +\ifx\ExplSyntaxOn\@undefined\else + \ExplSyntaxOn + \catcode`\ =10 + \def\bbl@loadfontspec{% + \usepackage{fontspec}% + \expandafter + \def\csname msg~text~>~fontspec/language-not-exist\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for language '##1'.\\% + That's usually fine, because many languages\\% + require no specific features, but if the output is\\% + not as expected, consider selecting another font.} + \expandafter + \def\csname msg~text~>~fontspec/no-script\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for script '##2'.\\% + That's not always wrong, but if the output is\\% + not as expected, consider selecting another font.}} + \ExplSyntaxOff +\fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam \bbl@foreach{#1}{% @@ -547,7 +567,7 @@ \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont \ifx\fontspec\@undefined - \usepackage{fontspec}% + \bbl@loadfontspec \fi \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} @@ -1250,6 +1270,9 @@ end if not u.find(patt, '()', nil, true) then patt = '()' .. patt .. '()' end + patt = string.gsub(patt, '%(%)%^', '^()') + patt = string.gsub(patt, '%$%(%)', '()$') + texio.write('***************' .. patt) patt = u.gsub(patt, '{(.)}', function (n) return '%' .. (tonumber(n) and (tonumber(n)+1) or n) diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index 80e18612f0e..0f70a0a3afe 100644 --- a/Master/texmf-dist/tex/generic/babel/nil.ldf +++ b/Master/texmf-dist/tex/generic/babel/nil.ldf @@ -32,7 +32,7 @@ %% extension |.ins|) which are part of the distribution. %% -\ProvidesLanguage{nil}[2020/09/01 3.48 Nil language] +\ProvidesLanguage{nil}[2020/10/03 3.49 Nil language] \LdfInit{nil}{datenil} \ifx\l@nil\@undefined \newlanguage\l@nil diff --git a/Master/texmf-dist/tex/generic/babel/xebabel.def b/Master/texmf-dist/tex/generic/babel/xebabel.def index 1b0c1bb36d6..f451a4b71bc 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -96,6 +96,26 @@ \AddBabelHook{babel-fontspec}{beforestart}{\bbl@ckeckstdfonts} \DisableBabelHook{babel-fontspec} \bbl@trace{Font handling with fontspec} +\ifx\ExplSyntaxOn\@undefined\else + \ExplSyntaxOn + \catcode`\ =10 + \def\bbl@loadfontspec{% + \usepackage{fontspec}% + \expandafter + \def\csname msg~text~>~fontspec/language-not-exist\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for language '##1'.\\% + That's usually fine, because many languages\\% + require no specific features, but if the output is\\% + not as expected, consider selecting another font.} + \expandafter + \def\csname msg~text~>~fontspec/no-script\endcsname##1##2##3##4{% + Font '\l_fontspec_fontname_tl' is using the\\% + default features for script '##2'.\\% + That's not always wrong, but if the output is\\% + not as expected, consider selecting another font.}} + \ExplSyntaxOff +\fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam \bbl@foreach{#1}{% @@ -107,7 +127,7 @@ \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont \ifx\fontspec\@undefined - \usepackage{fontspec}% + \bbl@loadfontspec \fi \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} |