From 03353bdb02ab6a1bae291448d1fc00aff5711fed Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 4 Oct 2022 19:54:54 +0000 Subject: babel (4oct22) git-svn-id: svn://tug.org/texlive/trunk@64614 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/babel/README.md | 31 ++-- Master/texmf-dist/doc/latex/babel/babel.pdf | Bin 885746 -> 885961 bytes Master/texmf-dist/source/latex/babel/babel.dtx | 201 +++++++++++---------- Master/texmf-dist/source/latex/babel/babel.ins | 2 +- Master/texmf-dist/source/latex/babel/bbcompat.dtx | 2 +- Master/texmf-dist/source/latex/babel/locale.zip | Bin 837091 -> 838464 bytes .../tex/generic/babel/babel-transforms.lua | 2 + Master/texmf-dist/tex/generic/babel/babel.def | 76 ++++---- Master/texmf-dist/tex/generic/babel/babel.sty | 82 ++++----- Master/texmf-dist/tex/generic/babel/hyphen.cfg | 6 +- .../tex/generic/babel/locale/bo/babel-bo.ini | 11 +- .../tex/generic/babel/locale/bo/babel-tibetan.tex | 129 +++++++++++++ .../tex/generic/babel/locale/mr/babel-mr.ini | 42 ++--- .../tex/generic/babel/locale/ms/babel-ms-BN.ini | 8 +- .../tex/generic/babel/locale/ms/babel-ms-SG.ini | 8 +- .../tex/generic/babel/locale/ms/babel-ms.ini | 10 +- .../tex/generic/babel/locale/my/babel-my.ini | 14 +- .../tex/generic/babel/locale/mzn/babel-mzn.ini | 6 +- .../tex/generic/babel/locale/ne/babel-ne.ini | 38 ++-- .../tex/generic/babel/locale/nl/babel-nl.ini | 8 +- .../tex/generic/babel/locale/nmg/babel-nmg.ini | 6 +- .../tex/generic/babel/locale/nn/babel-nn.ini | 8 +- .../tex/generic/babel/locale/no/babel-no.ini | 6 +- Master/texmf-dist/tex/generic/babel/luababel.def | 64 ++++--- Master/texmf-dist/tex/generic/babel/nil.ldf | 2 +- Master/texmf-dist/tex/generic/babel/xebabel.def | 38 ++-- 26 files changed, 457 insertions(+), 343 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md index ac068b909e0..173be3799d9 100644 --- a/Master/texmf-dist/doc/latex/babel/README.md +++ b/Master/texmf-dist/doc/latex/babel/README.md @@ -1,4 +1,6 @@ -## Babel 3.80 +## Babel 3.81 + +**Development** This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -8,9 +10,9 @@ is a set of ini files for about 250 languages. The latest stable version is available on . -Changes in version 3.80 are described in: +Changes in version 3.81 are described in: -https://latex3.github.io/babel/news/whats-new-in-babel-3.80.html +https://latex3.github.io/babel/news/whats-new-in-babel-3.81.html Apart from the manual, you can find information on some aspects of babel at: @@ -46,21 +48,14 @@ respective authors. ### Summary of latest changes ``` -3.80 2022-09-16 - * Ethiopic calendar. - * Hungarian date in the superessive case. - * Captions for Hausa by Abubakar Yusuf (@fatherofcamels) - * Fixes in dates: - - Latin: In `pdftex`, numerals were printed in arabic form. - - Thai: Buddhist and Gregorian were reversed. - - Persian: The Persian calendar was not loaded. - * More updates to the CLDR 41: Galician, Swiss German, Gujarati, - Hausa, Hebrew, Hindi, Croatian, Upper Sorbian, Hungarian, - Armenian, Interlingua, Indonesian, Igbo, Sichuan Yi, Icelandic, - Italian, Japanese, Ngomba, Georgian, Kabyle, Kabuverdianu, - Kazakh, Kako, Kalaallisut, Khmer, Kannada, Korean, Konkani, - Kashmiri, Colognian, Cornish, Kyrgyz, Lakota, Lao, Northern - Luri, Lithuanian, Macedonian, Malayalam, Mongolian. +3.81 2022-10-04 + * Tibetan line breaking and justification (lines padded with + trailing tshegs). + * New option 'letters' for 'onchar'. + * Conceal 'fontspec' warnings about unknown languages and + scripts with \babelfont. + * More updates to the CLDR 41: Burmese, Dutch, Kwasio, Malay, + Marathi, Mazanderani, Nepali, Norwegian, Norwegian Nynorsk. ``` ### Previous changes diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf index 6741e73fcc6..c667f527ac7 100644 Binary files a/Master/texmf-dist/doc/latex/babel/babel.pdf and b/Master/texmf-dist/doc/latex/babel/babel.pdf differ diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index c633f24b9e7..3d8eddc5055 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -32,7 +32,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2022/09/17 v3.80 The Babel package] +\ProvidesFile{babel.dtx}[2022/10/04 v3.81 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -943,11 +943,9 @@ list of characters as their arguments. The command |\shorthandoff| sets the |\catcode| for each of the characters in its argument to other (12); the command |\shorthandon| sets the |\catcode| to active (13). Both commands only work on `known' -shorthand characters. - -% TODO - Is the following true ???? -% If a character is not known to be a shorthand character its category -% code will be left unchanged. +shorthand characters, and an error will be raised otherwise. You can +check if a character is a shorthand with |\ifbabelshorthand| (see +below). \New{3.9a} However, |\shorthandoff| does not behave as you would expect with characters like |~| or |^|, because they @@ -2310,19 +2308,6 @@ to select fonts in addition to the three basic families. \babel{} and should be set with |fontspec| if necessary. \end{warning} -\begin{troubleshooting} - \trouble{Package fontspec Warning: 'Language 'LANG' not available for - font 'FONT' with script 'SCRIPT' 'Default' language used instead'} - \textit{Package fontspec Warning: 'Language 'LANG' not available for - font 'FONT' with script 'SCRIPT' 'Default' language used instead'}. - - \textbf{This is \textit{not} an error.} This warning is shown by - \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. -\end{troubleshooting} - \begin{troubleshooting} \trouble{Package babel Info: The following fonts are not babel standard families} \textit{Package babel Info: The following fonts @@ -2623,7 +2608,8 @@ the script, no matter which language is active. Although somewhat inconsistent, this makes setting a language up easier in most typical cases. -\Describe{onchar=}{\texttt{ids} $\string|$ \texttt{fonts}} +\Describe{onchar=}{\texttt{ids} $\string|$ \texttt{fonts} + $\string|$ \texttt{letters}} \New{3.38} This option is much like an ‘event’ called when a character belonging to the script of this locale is found (as its name implies, it acts on characters, not on spaces). There are currently two @@ -2634,6 +2620,10 @@ locale (as set with |\babelfont|). This option is not compatible with |mapfont|. Characters can be added or modified with |\babelcharproperty|. +\New{3.81} Option |letters| restricts the ‘actions’ to letters, in the +\TeX{} sense (i.~e., with catcode 11). Digits and punctuation are then +considered part of current locale (as set by a selector). + \begin{note} An alternative approach with \luatex{} and Harfbuzz is the font option |RawFeature={multiscript=auto}|. It does not switch the @@ -2657,7 +2647,8 @@ Currently used only in Southeast Asian scrips, like Thai. Ignored if 0 See section~\ref{transforms}. \Describe{justification=}{\texttt{kashida} $\string|$ -\texttt{elongated} $\string|$ \texttt{unhyphenated}} +\texttt{elongated} $\string|$ \texttt{unhyphenated} +$\string|$ \texttt{padding}} \New{3.59} There are currently three options, mainly for the Arabic script. It sets the linebreaking and justification method, which can be based on the the \textsc{arabic tatweel} character or in the @@ -2666,6 +2657,11 @@ explanation see the \href{https://latex3.github.io/babel/news/whats-new-in-babel-3.59.html}% {\babel\ site}. +\New{3.81} The option |padding| has been devised primarily for Tibetan. +It’s still somewhat experimental. Again, there is an explanation in the +\href{https://latex3.github.io/babel/news/whats-new-in-babel-3.81.html}% + {\babel\ site}. + \Describe{linebreaking=}{} \New{3.59} Just a synonymous for \texttt{justification}. @@ -4107,6 +4103,10 @@ For example: \babelcharproperty{`)}{linebreak}{cl} % or id, op, cl, ns, ex, in, hy \end{verbatim} +Please, refer to the Unicode standard (Annex \#9 and Annex \#14) for +the meaning of the available codes. For example, |en| is ‘European +number’ and |id| is ‘ideographic’. + \New{3.39} Another property is |locale|, which adds characters to the list used by |onchar| in |\babelprovide|, or, if the last argument is empty, removes them. The last argument is the locale name: @@ -5176,8 +5176,8 @@ help from Bernd Raichle, for which I am grateful. % \section{Tools} % % \begin{macrocode} -%<> -%<> +%<> +%<> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -5304,7 +5304,8 @@ help from Bernd Raichle, for which I am grateful. % To check if a macro is defined, we create a new macro, which does % the same as |\@ifundefined|. However, in an $\epsilon$-tex engine, % it is based on |\ifcsname|, which is more efficient, and does not -% waste memory. +% waste memory. Defined inside a group, to avoid \cs{ifcsname} being +% implicitly set to |\relax| by the |\csname| test. % % \begin{macrocode} \begingroup @@ -5314,7 +5315,7 @@ help from Bernd Raichle, for which I am grateful. \else \expandafter\@secondoftwo \fi} - \bbl@ifunset{ifcsname}% TODO. A better test? + \bbl@ifunset{ifcsname}% {}% {\gdef\bbl@ifunset#1{% \ifcsname#1\endcsname @@ -6135,7 +6136,6 @@ help from Bernd Raichle, for which I am grateful. request the languages explicitly}% {See the manual for further details.}% \fi -% TODO. Option to search if loaded, with \LocaleForEach \let\bbl@auxname\languagename % Still necessary. TODO \bbl@ifunset{bbl@bcp@map@\languagename}{}% Move uplevel?? {\edef\languagename{\@nameuse{bbl@bcp@map@\languagename}}}% @@ -6427,19 +6427,8 @@ help from Bernd Raichle, for which I am grateful. % TODO. name@map must be here? \bbl@provide@locale \bbl@iflanguage\languagename{% - \expandafter\ifx\csname date\languagename\endcsname\relax - \bbl@error - {Unknown language '\languagename'. Either you have\\% - misspelled its name, it has not been installed,\\% - or you requested it in a previous run. Fix its name,\\% - install it or just rerun the file, respectively. In\\% - some cases, you may need to remove the aux file}% - {You may proceed, but expect wrong results}% - \else - % set type - \let\bbl@select@type\z@ - \expandafter\bbl@switch\expandafter{\languagename}% - \fi}} + \let\bbl@select@type\z@ + \expandafter\bbl@switch\expandafter{\languagename}}} \def\babel@aux#1#2{% \select@language{#1}% \bbl@foreach\BabelContentsFiles{% \relax -> don't assume vertical mode @@ -6493,7 +6482,7 @@ help from Bernd Raichle, for which I am grateful. \bbl@id@assign % switch captions, date % No text is supposed to be added here, so we remove any - % spurious spaces. + % spurious spaces. \bbl@bsphack \ifcase\bbl@select@type \csname captions#1\endcsname\relax @@ -6540,9 +6529,10 @@ help from Bernd Raichle, for which I am grateful. \bbl@xin@{/u}{/\bbl@tempa}% \ifin@\else\bbl@xin@{/e}{/\bbl@tempa}\fi % elongated forms \ifin@\else\bbl@xin@{/k}{/\bbl@tempa}\fi % only kashida + \ifin@\else\bbl@xin@{/p}{/\bbl@tempa}\fi % padding (eg, Tibetan) \ifin@\else\bbl@xin@{/v}{/\bbl@tempa}\fi % variable font \ifin@ - % unhyphenated/kashida/elongated = allow stretching + % unhyphenated/kashida/elongated/padding = allow stretching \language\l@unhyphenated \babel@savevariable\emergencystretch \emergencystretch\maxdimen @@ -6709,17 +6699,6 @@ help from Bernd Raichle, for which I am grateful. % TODO. name@map here? \bbl@provide@locale \bbl@iflanguage\languagename{% - \expandafter\ifx\csname date\languagename\endcsname\relax - \bbl@warning % TODO - why a warning, not an error? - {Unknown language '#1'. Either you have\\% - misspelled its name, it has not been installed,\\% - or you requested it in a previous run. Fix its name,\\% - install it or just rerun the file, respectively. In\\% - some cases, you may need to remove the aux file.\\% - I'll proceed, but expect wrong results.\\% - Reported}% - \fi - % set type \let\bbl@select@type\@ne \expandafter\bbl@switch\expandafter{\languagename}}} % \end{macrocode} @@ -6944,7 +6923,7 @@ help from Bernd Raichle, for which I am grateful. \@nameuse{#2}% \edef\bbl@tempa{#1}% \bbl@sreplace\bbl@tempa{name}{}% - \bbl@warning{% TODO. + \bbl@warning{% \@backslashchar#1 not set for '\languagename'. Please,\\% define it after the language has been loaded\\% (typically in the preamble) with:\\% @@ -7039,8 +7018,7 @@ help from Bernd Raichle, for which I am grateful. % The macro |\initiate@active@char| below takes all the necessary % actions to make its argument a shorthand character. The real work % is performed once for each character. But first we define a little -% tool. TODO. Always used with additional expansions. Move them here? -% Move the macro to basic? +% tool. % % \begin{macrocode} \def\bbl@withactive#1#2{% @@ -7175,7 +7153,7 @@ help from Bernd Raichle, for which I am grateful. % % \begin{macrocode} \bbl@trace{Defining babelensure} -\newcommand\babelensure[2][]{% TODO - revise test files +\newcommand\babelensure[2][]{% \AddBabelHook{babel-ensure}{afterextras}{% \ifcase\bbl@select@type \bbl@cl{e}% @@ -8695,21 +8673,12 @@ help from Bernd Raichle, for which I am grateful. % % \paragraph{Tools} % -% But first, a couple of tools. The first one makes global a local -% variable. This is not the best solution, but it works. +% But first, a tool. It makes global a local variable. This is not the +% best solution, but it works. % % \begin{macrocode} \bbl@trace{Multiencoding strings} \def\bbl@toglobal#1{\global\let#1#1} -\def\bbl@recatcode#1{% TODO. Used only once? - \@tempcnta="7F - \def\bbl@tempa{% - \ifnum\@tempcnta>"FF\else - \catcode\@tempcnta=#1\relax - \advance\@tempcnta\@ne - \expandafter\bbl@tempa - \fi}% - \bbl@tempa} % \end{macrocode} % % The second one. We need to patch |\@uclclist|, but it is done once @@ -8789,7 +8758,14 @@ help from Bernd Raichle, for which I am grateful. \@onlypreamble\StartBabelCommands \def\StartBabelCommands{% \begingroup - \bbl@recatcode{11}% + \@tempcnta="7F + \def\bbl@tempa{% + \ifnum\@tempcnta>"FF\else + \catcode\@tempcnta=11 + \advance\@tempcnta\@ne + \expandafter\bbl@tempa + \fi}% + \bbl@tempa <@Macros local to BabelCommands@> \def\bbl@provstring##1##2{% \providecommand##1{##2}% @@ -9119,7 +9095,7 @@ help from Bernd Raichle, for which I am grateful. % separates these two steps. % % \begin{macrocode} -\newcommand\setlocalecaption{% TODO. Catch typos. What about ensure? +\newcommand\setlocalecaption{% TODO. Catch typos. \@ifstar\bbl@setcaption@s\bbl@setcaption@x} \def\bbl@setcaption@x#1#2#3{% language caption-name string \bbl@trim@def\bbl@tempa{#2}% @@ -9855,7 +9831,15 @@ help from Bernd Raichle, for which I am grateful. Babel.linebreaking.add_before(Babel.locale_map) Babel.loc_to_scr = {} Babel.chr_to_loc = Babel.chr_to_loc or {} - end}% + end + Babel.locale_props[\the\localeid].letters = false + }% + \bbl@xin@{ letters }{ \bbl@KVP@onchar\space}% + \ifin@ + \directlua{ + Babel.locale_props[\the\localeid].letters = true + }% + \fi \bbl@xin@{ ids }{ \bbl@KVP@onchar\space}% \ifin@ \ifx\bbl@starthyphens\@undefined % Needed if no explicit selection @@ -9958,7 +9942,8 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@KVP@linebreaking\bbl@KVP@justification \fi \ifx\bbl@KVP@linebreaking\@nnil\else - \bbl@xin@{,\bbl@KVP@linebreaking,}{,elongated,kashida,cjk,unhyphenated,}% + \bbl@xin@{,\bbl@KVP@linebreaking,}% + {,elongated,kashida,cjk,padding,unhyphenated,}% \ifin@ \bbl@csarg\xdef {lnbrk@\languagename}{\expandafter\@car\bbl@KVP@linebreaking\@nil}% @@ -9967,6 +9952,8 @@ help from Bernd Raichle, for which I am grateful. \bbl@xin@{/e}{/\bbl@cl{lnbrk}}% \ifin@\else\bbl@xin@{/k}{/\bbl@cl{lnbrk}}\fi \ifin@\bbl@arabicjust\fi + \bbl@xin@{/p}{/\bbl@cl{lnbrk}}% + \ifin@\AtBeginDocument{\bbl@tibetanjust}\fi % == Line breaking: hyphenate.other.(locale|script) == \ifx\bbl@lbkflag\@empty \bbl@ifunset{bbl@hyotl@\languagename}{}% @@ -12058,9 +12045,7 @@ help from Bernd Raichle, for which I am grateful. \ifx\RTLfootnotetext\@undefined \AtEndOfPackage{% \EnableBabelHook{babel-bidi}% - \ifx\fontspec\@undefined - \bbl@loadfontspec % bidi needs fontspec - \fi + \bbl@loadfontspec % bidi needs fontspec \usepackage#1{bidi}}% \fi} \ifnum\bbl@bidimode>200 @@ -12940,24 +12925,17 @@ help from Bernd Raichle, for which I am grateful. %<<*Font selection>> \bbl@trace{Font handling with fontspec} \ifx\ExplSyntaxOn\@undefined\else - \ExplSyntaxOn - \catcode`\ =10 + \def\bbl@fs@warn@nx#1#2{% \bbl@tempfs is the original macro + \in@{,#1,}{,no-script,language-not-exist,}% + \ifin@\else\bbl@tempfs@nx{#1}{#2}\fi} + \def\bbl@fs@warn@nxx#1#2#3{% + \in@{,#1,}{,no-script,language-not-exist,}% + \ifin@\else\bbl@tempfs@nxx{#1}{#2}{#3}\fi} \def\bbl@loadfontspec{% - \usepackage{fontspec}% TODO. Apply patch always - \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 + \let\bbl@loadfontspec\relax + \ifx\fontspec\@undefined + \usepackage{fontspec}% + \fi}% \fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam @@ -12969,9 +12947,7 @@ help from Bernd Raichle, for which I am grateful. \fi}% \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont - \ifx\fontspec\@undefined - \bbl@loadfontspec - \fi + \bbl@loadfontspec \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} \newcommand\bbl@bblfont[2][]{% 1=features 2=fontname, @font=rm|sf|tt @@ -13126,8 +13102,15 @@ help from Bernd Raichle, for which I am grateful. {\\\newfontscript{\bbl@cl{sname}}{\bbl@cl{sotf}}}% \{fontspec-opentype}{Language/\bbl@cl{lname}}% {\\\newfontlanguage{\bbl@cl{lname}}{\bbl@cl{lotf}}}% + \let\\\bbl@tempfs@nx\<__fontspec_warning:nx>% + \let\<__fontspec_warning:nx>\\\bbl@fs@warn@nx + \let\\\bbl@tempfs@nxx\<__fontspec_warning:nxx>% + \let\<__fontspec_warning:nxx>\\\bbl@fs@warn@nxx \\\renewfontfamily\\#4% [\bbl@cl{lsys},#2]}{#3}% ie \bbl@exp{..}{#3} + \bbl@exp{% + \let\<__fontspec_warning:nx>\\\bbl@tempfs@nx + \let\<__fontspec_warning:nxx>\\\bbl@tempfs@nxx}% \begingroup #4% \xdef#1{\f@family}% eg, \bbl@rmdflt@lang{FreeSerif(0)} @@ -14378,6 +14361,11 @@ function Babel.locale_map(head) (item.char >= 0x1DC0 and item.char <= 0x1DFF) then toloc = toloc_save end + if toloc and Babel.locale_props[toloc] and + Babel.locale_props[toloc].letters and + tex.getcatcode(item.char) \string~= 11 then + toloc = nil + end if toloc and toloc > -1 then if Babel.locale_props[toloc].lg then item.lang = Babel.locale_props[toloc].lg @@ -14388,7 +14376,7 @@ function Babel.locale_map(head) end toloc_save = toloc end - elseif not inmath and item.id == 7 then + elseif not inmath and item.id == 7 then % Apply recursively item.replace = item.replace and Babel.locale_map(item.replace) item.pre = item.pre and Babel.locale_map(item.pre) item.post = item.post and Babel.locale_map(item.post) @@ -14486,10 +14474,11 @@ end \@ifnextchar[{\bbl@settransform{0}}{\bbl@settransform{0}[]}} \gdef\babelposthyphenation{&% \@ifnextchar[{\bbl@settransform{1}}{\bbl@settransform{1}[]}} +\gdef\bbl@postlinebreak{\bbl@settransform{2}[]} &% WIP \gdef\bbl@settransform#1[#2]#3#4#5{&% \ifcase#1 \bbl@activateprehyphen - \else + \or \bbl@activateposthyphen \fi \begingroup @@ -14505,7 +14494,7 @@ end rep = rep:gsub('^%s*(remove)%s*$', 'remove = true') rep = rep:gsub('^%s*(insert)%s*,', 'insert = true, ') rep = rep:gsub('(string)%s*=%s*([^%s,]*)', Babel.capture_func) - if #1 == 0 then + if #1 == 0 or #1 == 2 then rep = rep:gsub('(space)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)', 'space = {' .. '%2, %3, %4' .. '}') rep = rep:gsub('(spacefactor)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)', @@ -14518,6 +14507,16 @@ end end tex.print([[\string\babeltempa{{]] .. rep .. [[}}]]) }}}&% + \bbl@foreach\babeltempb{&% + \bbl@forkv{{##1}}{&% + \in@{,####1,}{,nil,step,data,remove,insert,string,no,pre,&% + no,post,penalty,kashida,space,spacefactor,}&% + \ifin@\else + \bbl@error + {Bad option '####1' in a transform.\\&% + I’ll ignore it but expect more errors}&% + {See the manual for further info.}&% + \fi}}&% \let\bbl@kv@attribute\relax \let\bbl@kv@label\relax \bbl@forkv{#2}{\bbl@csarg\edef{kv@##1}{##2}}&% @@ -14528,7 +14527,7 @@ end local lbkr = Babel.linebreaking.replacements[#1] local u = unicode.utf8 local id, attr, label - if #1 == 0 then + if #1 == 0 or #1 == 2 then id = \the\csname bbl@id@@#3\endcsname\space else id = \the\csname l@#3\endcsname\space @@ -14543,7 +14542,7 @@ end \fi &% Convert pattern: local patt = string.gsub([==[#4]==], '%s', '') - if #1 == 0 then + if #1 == 0 or #1 == 2 then patt = string.gsub(patt, '|', ' ') end if not u.find(patt, '()', nil, true) then @@ -15078,8 +15077,9 @@ end % \begin{macrocode} %<*transforms> Babel.linebreaking.replacements = {} -Babel.linebreaking.replacements[0] = {} -- pre +Babel.linebreaking.replacements[0] = {} -- pre Babel.linebreaking.replacements[1] = {} -- post +Babel.linebreaking.replacements[2] = {} -- post-line WIP -- Discretionaries contain strings as nodes function Babel.str_to_nodes(fn, matches, base) @@ -15231,6 +15231,7 @@ Babel.us_char = string.char(31) function Babel.hyphenate_replace(head, mode) local u = unicode.utf8 local lbkr = Babel.linebreaking.replacements[mode] + if mode == 2 then mode = 0 end -- WIP local word_head = head diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index 767fe23eb1e..a40cfd79f37 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{2022/09/17} +\def\filedate{2022/10/04} \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 53b5f46b8e2..0bc850a5852 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}[2022/09/17 v3.80] +\ProvidesFile{bbcompat.dtx}[2022/10/04 v3.81] % % %% File 'bbcompat.dtx' diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip index e38576d124b..5da6c34cc76 100644 Binary files a/Master/texmf-dist/source/latex/babel/locale.zip and b/Master/texmf-dist/source/latex/babel/locale.zip differ diff --git a/Master/texmf-dist/tex/generic/babel/babel-transforms.lua b/Master/texmf-dist/tex/generic/babel/babel-transforms.lua index ec062a37a87..ead16c6332a 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-transforms.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-transforms.lua @@ -36,6 +36,7 @@ Babel.linebreaking.replacements = {} Babel.linebreaking.replacements[0] = {} -- pre Babel.linebreaking.replacements[1] = {} -- post +Babel.linebreaking.replacements[2] = {} -- post-line WIP -- Discretionaries contain strings as nodes function Babel.str_to_nodes(fn, matches, base) @@ -187,6 +188,7 @@ Babel.us_char = string.char(31) function Babel.hyphenate_replace(head, mode) local u = unicode.utf8 local lbkr = Babel.linebreaking.replacements[mode] + if mode == 2 then mode = 0 end -- WIP local word_head = head diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index ef1b4e0ecef..190dc7ab055 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.def +++ b/Master/texmf-dist/tex/generic/babel/babel.def @@ -40,7 +40,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{babel.def}[2022/09/17 3.80 Babel common definitions] +\ProvidesFile{babel.def}[2022/10/04 3.81 Babel common definitions] \ifx\AtBeginDocument\@undefined % TODO. change test. \def\@empty{} \def\loadlocalcfg#1{% @@ -406,8 +406,8 @@ \expandafter\newif\csname ifbbl@single\endcsname \chardef\bbl@bidimode\z@ \fi -\def\bbl@version{3.80} -\def\bbl@date{2022/09/17} +\def\bbl@version{3.81} +\def\bbl@date{2022/10/04} \ifx\language\@undefined \csname newcount\endcsname\language \fi @@ -631,19 +631,8 @@ % TODO. name@map must be here? \bbl@provide@locale \bbl@iflanguage\languagename{% - \expandafter\ifx\csname date\languagename\endcsname\relax - \bbl@error - {Unknown language '\languagename'. Either you have\\% - misspelled its name, it has not been installed,\\% - or you requested it in a previous run. Fix its name,\\% - install it or just rerun the file, respectively. In\\% - some cases, you may need to remove the aux file}% - {You may proceed, but expect wrong results}% - \else - % set type - \let\bbl@select@type\z@ - \expandafter\bbl@switch\expandafter{\languagename}% - \fi}} + \let\bbl@select@type\z@ + \expandafter\bbl@switch\expandafter{\languagename}}} \def\babel@aux#1#2{% \select@language{#1}% \bbl@foreach\BabelContentsFiles{% \relax -> don't assume vertical mode @@ -713,9 +702,10 @@ \bbl@xin@{/u}{/\bbl@tempa}% \ifin@\else\bbl@xin@{/e}{/\bbl@tempa}\fi % elongated forms \ifin@\else\bbl@xin@{/k}{/\bbl@tempa}\fi % only kashida + \ifin@\else\bbl@xin@{/p}{/\bbl@tempa}\fi % padding (eg, Tibetan) \ifin@\else\bbl@xin@{/v}{/\bbl@tempa}\fi % variable font \ifin@ - % unhyphenated/kashida/elongated = allow stretching + % unhyphenated/kashida/elongated/padding = allow stretching \language\l@unhyphenated \babel@savevariable\emergencystretch \emergencystretch\maxdimen @@ -789,17 +779,6 @@ % TODO. name@map here? \bbl@provide@locale \bbl@iflanguage\languagename{% - \expandafter\ifx\csname date\languagename\endcsname\relax - \bbl@warning % TODO - why a warning, not an error? - {Unknown language '#1'. Either you have\\% - misspelled its name, it has not been installed,\\% - or you requested it in a previous run. Fix its name,\\% - install it or just rerun the file, respectively. In\\% - some cases, you may need to remove the aux file.\\% - I'll proceed, but expect wrong results.\\% - Reported}% - \fi - % set type \let\bbl@select@type\@ne \expandafter\bbl@switch\expandafter{\languagename}}} \def\IfBabelSelectorTF#1{% @@ -894,7 +873,7 @@ \@nameuse{#2}% \edef\bbl@tempa{#1}% \bbl@sreplace\bbl@tempa{name}{}% - \bbl@warning{% TODO. + \bbl@warning{% \@backslashchar#1 not set for '\languagename'. Please,\\% define it after the language has been loaded\\% (typically in the preamble) with:\\% @@ -984,7 +963,7 @@ \else \expandafter\@secondoftwo \fi} - \bbl@ifunset{ifcsname}% TODO. A better test? + \bbl@ifunset{ifcsname}% {}% {\gdef\bbl@ifunset#1{% \ifcsname#1\endcsname @@ -1205,7 +1184,7 @@ \bbl@foreach\bbl@evargs{\bbl@tempa#1\@@} \fi \bbl@trace{Defining babelensure} -\newcommand\babelensure[2][]{% TODO - revise test files +\newcommand\babelensure[2][]{% \AddBabelHook{babel-ensure}{afterextras}{% \ifcase\bbl@select@type \bbl@cl{e}% @@ -1901,15 +1880,6 @@ \def\bbl@disc#1#2{\nobreak\discretionary{#2-}{}{#1}\bbl@allowhyphens} \bbl@trace{Multiencoding strings} \def\bbl@toglobal#1{\global\let#1#1} -\def\bbl@recatcode#1{% TODO. Used only once? - \@tempcnta="7F - \def\bbl@tempa{% - \ifnum\@tempcnta>"FF\else - \catcode\@tempcnta=#1\relax - \advance\@tempcnta\@ne - \expandafter\bbl@tempa - \fi}% - \bbl@tempa} \@ifpackagewith{babel}{nocase}% {\let\bbl@patchuclc\relax}% {\def\bbl@patchuclc{% @@ -1945,7 +1915,14 @@ \@onlypreamble\StartBabelCommands \def\StartBabelCommands{% \begingroup - \bbl@recatcode{11}% + \@tempcnta="7F + \def\bbl@tempa{% + \ifnum\@tempcnta>"FF\else + \catcode\@tempcnta=11 + \advance\@tempcnta\@ne + \expandafter\bbl@tempa + \fi}% + \bbl@tempa \def\SetStringLoop##1##2{% \def\bbl@templ####1{\expandafter\noexpand\csname##1\endcsname}% \count@\z@ @@ -2143,7 +2120,7 @@ \bbl@xin@{,}{\bbl@language@opts}% \chardef\bbl@opt@hyphenmap\ifin@4\else\@ne\fi \fi} -\newcommand\setlocalecaption{% TODO. Catch typos. What about ensure? +\newcommand\setlocalecaption{% TODO. Catch typos. \@ifstar\bbl@setcaption@s\bbl@setcaption@x} \def\bbl@setcaption@x#1#2#3{% language caption-name string \bbl@trim@def\bbl@tempa{#2}% @@ -2564,7 +2541,15 @@ Babel.linebreaking.add_before(Babel.locale_map) Babel.loc_to_scr = {} Babel.chr_to_loc = Babel.chr_to_loc or {} - end}% + end + Babel.locale_props[\the\localeid].letters = false + }% + \bbl@xin@{ letters }{ \bbl@KVP@onchar\space}% + \ifin@ + \directlua{ + Babel.locale_props[\the\localeid].letters = true + }% + \fi \bbl@xin@{ ids }{ \bbl@KVP@onchar\space}% \ifin@ \ifx\bbl@starthyphens\@undefined % Needed if no explicit selection @@ -2667,7 +2652,8 @@ \let\bbl@KVP@linebreaking\bbl@KVP@justification \fi \ifx\bbl@KVP@linebreaking\@nnil\else - \bbl@xin@{,\bbl@KVP@linebreaking,}{,elongated,kashida,cjk,unhyphenated,}% + \bbl@xin@{,\bbl@KVP@linebreaking,}% + {,elongated,kashida,cjk,padding,unhyphenated,}% \ifin@ \bbl@csarg\xdef {lnbrk@\languagename}{\expandafter\@car\bbl@KVP@linebreaking\@nil}% @@ -2676,6 +2662,8 @@ \bbl@xin@{/e}{/\bbl@cl{lnbrk}}% \ifin@\else\bbl@xin@{/k}{/\bbl@cl{lnbrk}}\fi \ifin@\bbl@arabicjust\fi + \bbl@xin@{/p}{/\bbl@cl{lnbrk}}% + \ifin@\AtBeginDocument{\bbl@tibetanjust}\fi % == Line breaking: hyphenate.other.(locale|script) == \ifx\bbl@lbkflag\@empty \bbl@ifunset{bbl@hyotl@\languagename}{}% diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index ba0bdbb704a..6b5b254acc9 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.sty +++ b/Master/texmf-dist/tex/generic/babel/babel.sty @@ -34,7 +34,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{babel}[2022/09/17 3.80 The Babel package] +\ProvidesPackage{babel}[2022/10/04 3.81 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone @@ -124,7 +124,7 @@ \else \expandafter\@secondoftwo \fi} - \bbl@ifunset{ifcsname}% TODO. A better test? + \bbl@ifunset{ifcsname}% {}% {\gdef\bbl@ifunset#1{% \ifcsname#1\endcsname @@ -458,8 +458,8 @@ \expandafter\@secondoftwo \fi} \fi -\def\bbl@version{3.80} -\def\bbl@date{2022/09/17} +\def\bbl@version{3.81} +\def\bbl@date{2022/10/04} \ifx\language\@undefined \csname newcount\endcsname\language \fi @@ -683,19 +683,8 @@ % TODO. name@map must be here? \bbl@provide@locale \bbl@iflanguage\languagename{% - \expandafter\ifx\csname date\languagename\endcsname\relax - \bbl@error - {Unknown language '\languagename'. Either you have\\% - misspelled its name, it has not been installed,\\% - or you requested it in a previous run. Fix its name,\\% - install it or just rerun the file, respectively. In\\% - some cases, you may need to remove the aux file}% - {You may proceed, but expect wrong results}% - \else - % set type - \let\bbl@select@type\z@ - \expandafter\bbl@switch\expandafter{\languagename}% - \fi}} + \let\bbl@select@type\z@ + \expandafter\bbl@switch\expandafter{\languagename}}} \def\babel@aux#1#2{% \select@language{#1}% \bbl@foreach\BabelContentsFiles{% \relax -> don't assume vertical mode @@ -765,9 +754,10 @@ \bbl@xin@{/u}{/\bbl@tempa}% \ifin@\else\bbl@xin@{/e}{/\bbl@tempa}\fi % elongated forms \ifin@\else\bbl@xin@{/k}{/\bbl@tempa}\fi % only kashida + \ifin@\else\bbl@xin@{/p}{/\bbl@tempa}\fi % padding (eg, Tibetan) \ifin@\else\bbl@xin@{/v}{/\bbl@tempa}\fi % variable font \ifin@ - % unhyphenated/kashida/elongated = allow stretching + % unhyphenated/kashida/elongated/padding = allow stretching \language\l@unhyphenated \babel@savevariable\emergencystretch \emergencystretch\maxdimen @@ -841,17 +831,6 @@ % TODO. name@map here? \bbl@provide@locale \bbl@iflanguage\languagename{% - \expandafter\ifx\csname date\languagename\endcsname\relax - \bbl@warning % TODO - why a warning, not an error? - {Unknown language '#1'. Either you have\\% - misspelled its name, it has not been installed,\\% - or you requested it in a previous run. Fix its name,\\% - install it or just rerun the file, respectively. In\\% - some cases, you may need to remove the aux file.\\% - I'll proceed, but expect wrong results.\\% - Reported}% - \fi - % set type \let\bbl@select@type\@ne \expandafter\bbl@switch\expandafter{\languagename}}} \def\IfBabelSelectorTF#1{% @@ -946,7 +925,7 @@ \@nameuse{#2}% \edef\bbl@tempa{#1}% \bbl@sreplace\bbl@tempa{name}{}% - \bbl@warning{% TODO. + \bbl@warning{% \@backslashchar#1 not set for '\languagename'. Please,\\% define it after the language has been loaded\\% (typically in the preamble) with:\\% @@ -1036,7 +1015,7 @@ \else \expandafter\@secondoftwo \fi} - \bbl@ifunset{ifcsname}% TODO. A better test? + \bbl@ifunset{ifcsname}% {}% {\gdef\bbl@ifunset#1{% \ifcsname#1\endcsname @@ -1257,7 +1236,7 @@ \bbl@foreach\bbl@evargs{\bbl@tempa#1\@@} \fi \bbl@trace{Defining babelensure} -\newcommand\babelensure[2][]{% TODO - revise test files +\newcommand\babelensure[2][]{% \AddBabelHook{babel-ensure}{afterextras}{% \ifcase\bbl@select@type \bbl@cl{e}% @@ -1953,15 +1932,6 @@ \def\bbl@disc#1#2{\nobreak\discretionary{#2-}{}{#1}\bbl@allowhyphens} \bbl@trace{Multiencoding strings} \def\bbl@toglobal#1{\global\let#1#1} -\def\bbl@recatcode#1{% TODO. Used only once? - \@tempcnta="7F - \def\bbl@tempa{% - \ifnum\@tempcnta>"FF\else - \catcode\@tempcnta=#1\relax - \advance\@tempcnta\@ne - \expandafter\bbl@tempa - \fi}% - \bbl@tempa} \@ifpackagewith{babel}{nocase}% {\let\bbl@patchuclc\relax}% {\def\bbl@patchuclc{% @@ -1997,7 +1967,14 @@ \@onlypreamble\StartBabelCommands \def\StartBabelCommands{% \begingroup - \bbl@recatcode{11}% + \@tempcnta="7F + \def\bbl@tempa{% + \ifnum\@tempcnta>"FF\else + \catcode\@tempcnta=11 + \advance\@tempcnta\@ne + \expandafter\bbl@tempa + \fi}% + \bbl@tempa \def\SetStringLoop##1##2{% \def\bbl@templ####1{\expandafter\noexpand\csname##1\endcsname}% \count@\z@ @@ -2195,7 +2172,7 @@ \bbl@xin@{,}{\bbl@language@opts}% \chardef\bbl@opt@hyphenmap\ifin@4\else\@ne\fi \fi} -\newcommand\setlocalecaption{% TODO. Catch typos. What about ensure? +\newcommand\setlocalecaption{% TODO. Catch typos. \@ifstar\bbl@setcaption@s\bbl@setcaption@x} \def\bbl@setcaption@x#1#2#3{% language caption-name string \bbl@trim@def\bbl@tempa{#2}% @@ -2616,7 +2593,15 @@ Babel.linebreaking.add_before(Babel.locale_map) Babel.loc_to_scr = {} Babel.chr_to_loc = Babel.chr_to_loc or {} - end}% + end + Babel.locale_props[\the\localeid].letters = false + }% + \bbl@xin@{ letters }{ \bbl@KVP@onchar\space}% + \ifin@ + \directlua{ + Babel.locale_props[\the\localeid].letters = true + }% + \fi \bbl@xin@{ ids }{ \bbl@KVP@onchar\space}% \ifin@ \ifx\bbl@starthyphens\@undefined % Needed if no explicit selection @@ -2719,7 +2704,8 @@ \let\bbl@KVP@linebreaking\bbl@KVP@justification \fi \ifx\bbl@KVP@linebreaking\@nnil\else - \bbl@xin@{,\bbl@KVP@linebreaking,}{,elongated,kashida,cjk,unhyphenated,}% + \bbl@xin@{,\bbl@KVP@linebreaking,}% + {,elongated,kashida,cjk,padding,unhyphenated,}% \ifin@ \bbl@csarg\xdef {lnbrk@\languagename}{\expandafter\@car\bbl@KVP@linebreaking\@nil}% @@ -2728,6 +2714,8 @@ \bbl@xin@{/e}{/\bbl@cl{lnbrk}}% \ifin@\else\bbl@xin@{/k}{/\bbl@cl{lnbrk}}\fi \ifin@\bbl@arabicjust\fi + \bbl@xin@{/p}{/\bbl@cl{lnbrk}}% + \ifin@\AtBeginDocument{\bbl@tibetanjust}\fi % == Line breaking: hyphenate.other.(locale|script) == \ifx\bbl@lbkflag\@empty \bbl@ifunset{bbl@hyotl@\languagename}{}% @@ -4132,9 +4120,7 @@ \ifx\RTLfootnotetext\@undefined \AtEndOfPackage{% \EnableBabelHook{babel-bidi}% - \ifx\fontspec\@undefined - \bbl@loadfontspec % bidi needs fontspec - \fi + \bbl@loadfontspec % bidi needs fontspec \usepackage#1{bidi}}% \fi} \ifnum\bbl@bidimode>200 diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 361f5073eb6..b0f242d8c8d 100644 --- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg +++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg @@ -38,10 +38,10 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{hyphen.cfg}[2022/09/17 3.80 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2022/10/04 3.81 Babel hyphens] \xdef\bbl@format{\jobname} -\def\bbl@version{3.80} -\def\bbl@date{2022/09/17} +\def\bbl@version{3.81} +\def\bbl@date{2022/10/04} \ifx\AtBeginDocument\@undefined \def\@empty{} \fi diff --git a/Master/texmf-dist/tex/generic/babel/locale/bo/babel-bo.ini b/Master/texmf-dist/tex/generic/babel/locale/bo/babel-bo.ini index b471025d632..38b6b11bec6 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/bo/babel-bo.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/bo/babel-bo.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.5 -date = 2022-06-14 +version = 1.6 +date = 2022-09-30 name.local = བོད་སྐད་ name.english = Tibetan name.babel = tibetan @@ -27,6 +27,7 @@ script.tag.opentype = tibt level = 1 encodings = derivate = no +require.babel = tibetan [captions] preface = དཔེ་དེབ་ཀྱི་གླེང་བརྗོད། @@ -136,10 +137,10 @@ time.short = [HH]:[mm] [typography] frenchspacing = yes hyphenrules = -lefthyphenmin = -righthyphenmin = +lefthyphenmin = 1 +righthyphenmin = 1 hyphenchar = -prehyphenchar = +prehyphenchar = 0 posthyphenchar = exhyphenchar = preexhyphenchar = diff --git a/Master/texmf-dist/tex/generic/babel/locale/bo/babel-tibetan.tex b/Master/texmf-dist/tex/generic/babel/locale/bo/babel-tibetan.tex index 726f78810f9..31f7c3daa41 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/bo/babel-tibetan.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/bo/babel-tibetan.tex @@ -9,4 +9,133 @@ \fi \BabelBeforeIni{bo}{% } + +\ifcase\bbl@engine\or + +\bbl@warning{% + Tibetan line breaking and justification are tentative.\\% + They might not work as expected and their behavior\\% + could change in the future. Feel free to contribute.\\% + Reported}% + +\directlua{ + Babel.tibetan = Babel.tibetan or {} + Babel.tibetan.shad = {.5, 0, 0, false} + Babel.tibetan.tsheg = {0, .0001, 0, false} + Babel.tibetan.intraspace = {0, 0, 0} % TODO +} + +\AtBeginDocument{% + % (1) Spacing + \edef\bbl@tempe{\directlua{ + tex.print(table.concat(Babel.tibetan.shad, ' ', 1, 3)) + }}% + \babelprehyphenation{tibetan}{[{a}{p}]|}% + { {}, {space=\bbl@tempe, data=1 } }% + % (2) Line breaking + \babelprehyphenation{tibetan}{[^^^^0f0d^^^^0f0e]|[^^^^0f0d^^^^0f0e]}% + { {}, {insert, penalty=10000}, {}, {} }% + \babelprehyphenation{tibetan}{[^^^^0f0d^^^^0f0e][^^^^0f40-^^^^0f6a]}% + { {}, {insert, space=0 0 0}, {} }% + \edef\bbl@tempe{\directlua{ + tex.print(table.concat(Babel.tibetan.tsheg, ' ', 1, 3)) + }}% + \babelprehyphenation{tibetan}{^^^^0f0b()([^ ^^^^0f0d^^^^0f0e])()}% + { {insert, space=\bbl@tempe, data=1}, {string = {1}} }} + +\def\bbl@tibetanjust{% + % (3) Justification + \directlua{ + Babel.tibetan = Babel.tibetan or {} + % + Babel.tibetan.justify_enabled = true + Babel.tibetan.justify_factor = 1 + % + function Babel.tibetan.justify(head) + if not Babel.tibetan.justify_enabled then return head end + for line in node.traverse_id(node.id'hlist', head) do + Babel.tibetan.justify_hlist(head, line) + end + return head + end + % + function Babel.tibetan.justify_hbox(head, gc, size, pack) + local has_infte = false + if Babel.tibetan.justify_enabled and pack == 'exactly' then + for n in node.traverse_id(12, head) do + if n.stretch_order > 0 then has_infte = true end + end + if not has_infte then + Babel.tibetan.justify_hlist(head, nil, gc, size, pack) + end + end + return head + end + % + function Babel.tibetan.justify_hlist(head, line, gc, size, pack) + local d, new + local last_t + local width, width_new, full, goal, shift + local subst_done = false + local GLYPH = node.id'glyph' + local LOCALE = Babel.attr_locale + % + if line == nil then + line = {} + line.glue_sign = 1 + line.glue_order = 0 + line.head = head + line.shift = 0 + line.width = size + end + % + if (line.glue_sign == 1 and line.glue_order == 0) then + last_t = nil + for n in node.traverse_id(GLYPH, line.head) do + if n.char == 0x0f0b then % TSHEG + last_t = n + else + last_t = nil + end + end + % + if not last_t then goto next_line end + % + full = line.width + shift = line.shift + goal = full * Babel.tibetan.justify_factor % A bit crude + width = node.dimensions(line.head) % The 'natural' width + % + while width < goal do + subst_done = true + d = node.copy(last_t) + line.head, new = node.insert_after(line.head, last_t, d) + width_new = node.dimensions(line.head) + if width_new > goal or width == width_new then + node.remove(line.head, new) % Better compute before + break + end + width = width_new + end + % Must take into account marks and ins, see luatex manual. + % Have to be executed only if there are changes. Investigate + % what's going on exactly. + if subst_done and not gc then + d = node.hpack(line.head, full, 'exactly') + d.shift = shift + node.insert_before(head, line, d) + node.remove(head, line) + end + ::next_line:: + end % if process line + end + % + luatexbase.add_to_callback('post_linebreak_filter', + Babel.tibetan.justify, 'Babel.tibetan.justify') + luatexbase.add_to_callback('hpack_filter', + Babel.tibetan.justify_hbox, 'Babel.tibetan.justify_hbox') + }} + +\fi + \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/mr/babel-mr.ini b/Master/texmf-dist/tex/generic/babel/locale/mr/babel-mr.ini index 2c2313df9b5..99800379f6b 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/mr/babel-mr.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/mr/babel-mr.ini @@ -13,8 +13,8 @@ [identification] charset = utf8 -version = 1.12 -date = 2022-04-07 +version = 1.13 +date = 2022-09-24 name.local = मराठी name.english = Marathi name.babel = marathi @@ -68,18 +68,18 @@ months.wide.9 = सप्टेंबर months.wide.10 = ऑक्टोबर months.wide.11 = नोव्हेंबर months.wide.12 = डिसेंबर -months.narrow.1 = जाने. -months.narrow.2 = फेब्रु. -months.narrow.3 = मार्च -months.narrow.4 = एप्रि. +months.narrow.1 = जा +months.narrow.2 = फे +months.narrow.3 = मा +months.narrow.4 = ए months.narrow.5 = मे -months.narrow.6 = जून -months.narrow.7 = जुलै -months.narrow.8 = ऑग. -months.narrow.9 = सप्टें. -months.narrow.10 = ऑक्टो. -months.narrow.11 = नोव्हें. -months.narrow.12 = डिसें. +months.narrow.6 = जू +months.narrow.7 = जु +months.narrow.8 = ऑ +months.narrow.9 = स +months.narrow.10 = ऑ +months.narrow.11 = नो +months.narrow.12 = डि days.wide.mon = सोमवार days.wide.tue = मंगळवार days.wide.wed = बुधवार @@ -103,10 +103,10 @@ days.narrow.sat = श days.narrow.sun = र dayPeriods.abbreviated.am = म.पू. dayPeriods.abbreviated.pm = म.उ. -dayPeriods.narrow.am = स -dayPeriods.narrow.pm = सं -dayPeriods.wide.am = म.पू. -dayPeriods.wide.pm = म.उ. +dayPeriods.narrow.am = a +dayPeriods.narrow.pm = p +dayPeriods.wide.am = AM +dayPeriods.wide.pm = PM [time.gregorian] time.medium = [h]:[mm]:[ss] [a] @@ -118,7 +118,7 @@ hyphenrules = marathi lefthyphenmin = 2 righthyphenmin = 2 hyphenchar = -prehyphenchar = +prehyphenchar = posthyphenchar = exhyphenchar = preexhyphenchar = @@ -129,10 +129,10 @@ hyphenate.other.locale = "200C "200D [characters] delimiters.quotes = “”‘’ -auxiliary = [\u200C\u200D] -exemplarCharacters = [\u093C ॐ \u0902 \u0901 ः अ आ इ ई उ ऊ ऋ ऌ ॲ ए ऐ ऑ ओ औ क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ल व श ष स ह ळ ऽ ा ि ी \u0941 \u0942 \u0943 \u0944 \u0945 \u0947 \u0948 ॉ ो ौ \u094D] +auxiliary = [\u200C\u200D \u0944] +exemplarCharacters = [\u093C ॐ \u0902 \u0901 ः अ आ इ ई उ ऊ ऋ ऌ ऍ ए ऐ ऑ ओ औ क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ऱ ल व श ष स ह ळ ऽ ा ि ी \u0941 \u0942 \u0943 \u0945 \u0947 \u0948 ॉ ो ौ \u094D] index = [\u200D ॐ \u0902 ः अ आ इ ई उ ऊ ऋ ऌ ए ऐ ऑ ओ औ क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ल व श ष स ह ळ ऽ \u0945 \u094D] -punctuation = [\\- ‐ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] @ * / \\& # ′ ″] +punctuation = [\\- ‐ ‑ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] @ * / \\& # ′ ″] [numbers] defaultNumberingSystem = deva diff --git a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-BN.ini b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-BN.ini index d7e9ac3e39a..f0b1957d909 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-BN.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-BN.ini @@ -9,8 +9,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 +version = 1.3 +date = 2022-09-24 name.local = Bahasa Melayu name.english = Malay name.babel = malay-brunei malay-bn @@ -135,9 +135,9 @@ hyphenationmin = [characters] delimiters.quotes = “”‘’ auxiliary = [] -exemplarCharacters = [a {ai} {au} b c d {dz} e f g h i j k {kh} l m n {ng} {ngg} {ny} o p q r s {sy} t {ts} u {ua} v w x y z] +exemplarCharacters = [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] index = [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] -punctuation = [\\- ‐ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] +punctuation = [\\- ‐ ‑ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] [numbers] defaultNumberingSystem = latn diff --git a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-SG.ini b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-SG.ini index 3121504fd5f..b10414bb82d 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-SG.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms-SG.ini @@ -9,8 +9,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 +version = 1.3 +date = 2022-09-24 name.local = Bahasa Melayu name.english = Malay name.babel = malay-singapore malay-sg @@ -135,9 +135,9 @@ hyphenationmin = [characters] delimiters.quotes = “”‘’ auxiliary = [] -exemplarCharacters = [a {ai} {au} b c d {dz} e f g h i j k {kh} l m n {ng} {ngg} {ny} o p q r s {sy} t {ts} u {ua} v w x y z] +exemplarCharacters = [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] index = [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] -punctuation = [\\- ‐ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] +punctuation = [\\- ‐ ‑ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] [numbers] defaultNumberingSystem = latn diff --git a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms.ini b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms.ini index 138e93dbb52..d0050e9bb61 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ms/babel-ms.ini @@ -9,9 +9,9 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 -name.local = Bahasa Melayu +version = 1.3 +date = 2022-09-24 +name.local = Melayu name.english = Malay name.babel = malay tag.bcp47 = ms @@ -160,9 +160,9 @@ hyphenationmin = [characters] delimiters.quotes = “”‘’ auxiliary = [] -exemplarCharacters = [a {ai} {au} b c d {dz} e f g h i j k {kh} l m n {ng} {ngg} {ny} o p q r s {sy} t {ts} u {ua} v w x y z] +exemplarCharacters = [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] index = [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] -punctuation = [\\- ‐ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] +punctuation = [\\- ‐ ‑ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] [numbers] defaultNumberingSystem = latn diff --git a/Master/texmf-dist/tex/generic/babel/locale/my/babel-my.ini b/Master/texmf-dist/tex/generic/babel/locale/my/babel-my.ini index 595fc3ce107..3fb26da9b70 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/my/babel-my.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/my/babel-my.ini @@ -9,8 +9,8 @@ [identification] charset = utf8 -version = 1.4 -date = 2020-10-11 +version = 1.5 +date = 2022-09-24 name.local = မြန်မာ name.english = Burmese name.babel = burmese @@ -72,7 +72,7 @@ proof = glossary = [date.gregorian] -date.long = [d] [MMMM] [y] +date.long = [y]- [MMMM] [d] date.short = [dd]-[MM]-[yy] months.wide.1 = ဇန်နဝါရီ months.wide.2 = ဖေဖော်ဝါရီ @@ -127,8 +127,8 @@ dayPeriods.wide.am = နံနက် dayPeriods.wide.pm = ညနေ [time.gregorian] -time.medium = [HH]:[mm]:[ss] -time.short = [HH]:[mm] +time.medium = [H]:[mm]:[ss] +time.short = [H]:[mm] [typography] frenchspacing = yes @@ -145,8 +145,8 @@ hyphenationmin = [characters] delimiters.quotes = “”‘’ -auxiliary = [ၐ ၑ ဨ ဢ ၒ ၓ ၔ ၕ ၖ ၗ \u1058 \u1059] -exemplarCharacters = [က ခ ဂ ဃ င စ ဆ ဇ ဈ ဉ ည ဋ ဌ ဍ ဎ ဏ တ ထ ဒ ဓ န ပ ဖ ဗ ဘ မ ယ ရ လ ဝ သ ဟ ဠ အ ဣ ဤ ဥ ဦ ဧ ဩ ဪ ာ ါ \u102D \u102E \u102F \u1030 ေ \u1032 \u1036 ဿ ျ ြ \u103D \u103E \u1039 \u103A \u1037 း] +auxiliary = [၀႐ ၁႑ ၂႒ ၃႓ ၄႔ ၅႕ ၆႖ ၇႗ ၈႘ ၉႙ ၵ ၚ ၽ ၾ ၐ ၑ ၥ ဨ ဢ ၒ ၓ ၔ ၕ \u1033 ၖ ၗ \u1058 \u1059 \u1086 \u1034 ၢ ၤ ႈ ႊ ႏ] +exemplarCharacters = [က ခ ဂ ဃ င စ ဆ ဇ ဈ ဉ ည ဋ ဌ ဍ ဎ ဏ တ ထ ဒ ဓ န ပ ဖ ဗ ဘ မ ယ ရ လ ဝ သ ဟ ဠ အ ဣ ၏ ဤ ဥ ဦ ဧ ဩ ဪ ာ ါ \u102D \u102E \u102F \u1030 ေ \u1032 \u1036 ဿ ျ ြ \u103D \u103E \u1039 \u103A \u1037 း] index = [က ခ ဂ ဃ င စ ဆ ဇ ဈ ဉ ည ဋ ဌ ဍ ဎ ဏ တ ထ ဒ ဓ န ပ ဖ ဗ ဘ မ ယ ရ လ ဝ သ ဟ ဠ အ] punctuation = [၊ ။ ‘ ’ “ ”] diff --git a/Master/texmf-dist/tex/generic/babel/locale/mzn/babel-mzn.ini b/Master/texmf-dist/tex/generic/babel/locale/mzn/babel-mzn.ini index 0aa6a147269..18d67433e8b 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/mzn/babel-mzn.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/mzn/babel-mzn.ini @@ -9,8 +9,8 @@ [identification] charset = utf8 -version = 1.5 -date = 2022-06-11 +version = 1.6 +date = 2022-09-24 name.local = مازرونی name.english = Mazanderani name.babel = mazanderani @@ -151,7 +151,7 @@ delimiters.quotes = «»‹› auxiliary = [\u200C\u200D\u200E\u200F \u064E \u064F \u0650 \u0652 \u0656 \u0670 إ ك ى ي] exemplarCharacters = [\u064B \u064C \u064D \u0651 \u0654 ء آ أ ؤ ئ ا ب پ ة ت ث ج چ ح خ د ذ ر ز ژ س ش ص ض ط ظ ع غ ف ق ک گ ل م ن ه و ی] index = [آ ا ب پ ت ث ج چ ح خ د ذ ر ز ژ س ش ص ض ط ظ ع غ ف ق ک گ ل م ن ه و ی] -punctuation = [\\- ‐ ، ٫ ٬ ؛ \\: ! ؟ . … ‹ › « » ( ) \\[ \\] * / \\\\] +punctuation = [\\- ‐ ‑ ، ٫ ٬ ؛ \\: ! ؟ . … ‹ › « » ( ) \\[ \\] * / \\\\] [numbers] defaultNumberingSystem = arabext diff --git a/Master/texmf-dist/tex/generic/babel/locale/ne/babel-ne.ini b/Master/texmf-dist/tex/generic/babel/locale/ne/babel-ne.ini index b8b0e359bcd..8cb04a1ec2d 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ne/babel-ne.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ne/babel-ne.ini @@ -9,8 +9,8 @@ [identification] charset = utf8 -version = 1.4 -date = 2020-10-11 +version = 1.5 +date = 2022-09-24 name.local = नेपाली name.english = Nepali name.babel = nepali @@ -73,12 +73,12 @@ glossary = [date.gregorian] date.long = [y] [MMMM] [d] -date.short = [y]-[MM]-[dd] +date.short = [yy]/[M]/[d] months.wide.1 = जनवरी months.wide.2 = फेब्रुअरी months.wide.3 = मार्च months.wide.4 = अप्रिल -months.wide.5 = मई +months.wide.5 = मे months.wide.6 = जुन months.wide.7 = जुलाई months.wide.8 = अगस्ट @@ -86,18 +86,18 @@ months.wide.9 = सेप्टेम्बर months.wide.10 = अक्टोबर months.wide.11 = नोभेम्बर months.wide.12 = डिसेम्बर -months.narrow.1 = १ -months.narrow.2 = २ -months.narrow.3 = ३ -months.narrow.4 = ४ -months.narrow.5 = ५ -months.narrow.6 = ६ -months.narrow.7 = ७ -months.narrow.8 = ८ -months.narrow.9 = ९ -months.narrow.10 = १० -months.narrow.11 = ११ -months.narrow.12 = १२ +months.narrow.1 = जन +months.narrow.2 = फेब +months.narrow.3 = मार्च +months.narrow.4 = अप्र +months.narrow.5 = मे +months.narrow.6 = जुन +months.narrow.7 = जुल +months.narrow.8 = अग +months.narrow.9 = सेप +months.narrow.10 = अक्टो +months.narrow.11 = नोभे +months.narrow.12 = डिसे days.wide.mon = सोमबार days.wide.tue = मङ्गलबार days.wide.wed = बुधबार @@ -145,9 +145,9 @@ hyphenationmin = [characters] delimiters.quotes = “”‘’ -auxiliary = [\u200C\u200D] -exemplarCharacters = [\u093C \u0901 \u0902 ः ॐ अ आ इ ई उ ऊ ऋ ऌ ऍ ए ऐ ऑ ओ औ क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ल ळ व श ष स ह ऽ ा ि ी \u0941 \u0942 \u0943 \u0944 \u0945 \u0947 \u0948 ॉ ो ौ \u094D] -punctuation = [\\- , ; \\: ! ? . ( ) \\[ \\] \\{ \\}] +auxiliary = [\u200C\u200D \u0944] +exemplarCharacters = [\u093C \u0901 \u0902 ः ॐ अ आ इ ई उ ऊ ऋ ऌ ऍ ए ऐ ऑ ओ औ क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ल ळ व श ष स ह ऽ ा ि ी \u0941 \u0942 \u0943 \u0945 \u0947 \u0948 ॉ ो ौ \u094D] +punctuation = [\\- ‑ — , ; ! ? । ' ‘ ’ \" “ ” ( ) \\[ \\] \\{ \\}] [numbers] defaultNumberingSystem = deva diff --git a/Master/texmf-dist/tex/generic/babel/locale/nl/babel-nl.ini b/Master/texmf-dist/tex/generic/babel/locale/nl/babel-nl.ini index 2afc51d942e..7912538ab51 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/nl/babel-nl.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/nl/babel-nl.ini @@ -9,8 +9,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-10-13 +version = 1.4 +date = 2022-09-24 name.local = Nederlands name.english = Dutch name.babel = dutch @@ -74,7 +74,7 @@ glossary = Verklarende Woordenl\ij st [date.gregorian] date.long = [d][ ][MMMM] [y] -date.short = [dd]-[MM]-[yy] +date.short = [dd]-[MM]-[y] months.wide.1 = januari months.wide.2 = februari months.wide.3 = maart @@ -163,7 +163,7 @@ delimiters.quotes = ‘’“” auxiliary = [à â å ã æ ç è ê î ñ ô ø œ ù û ÿ] exemplarCharacters = [a á ä b c d e é ë f g h i í ï {ij} {íj\u0301} j k l m n o ó ö p q r s t u ú ü v w x y z] index = [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] -punctuation = [\\- ‐ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] +punctuation = [\\- ‐ ‑ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] [numbers] defaultNumberingSystem = latn diff --git a/Master/texmf-dist/tex/generic/babel/locale/nmg/babel-nmg.ini b/Master/texmf-dist/tex/generic/babel/locale/nmg/babel-nmg.ini index 202a422b262..642104fc1f6 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/nmg/babel-nmg.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/nmg/babel-nmg.ini @@ -9,9 +9,9 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-10-11 -name.local = nmg +version = 1.4 +date = 2022-09-24 +name.local = Kwasio name.english = Kwasio name.babel = kwasio tag.bcp47 = nmg diff --git a/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nn.ini b/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nn.ini index 69380ba7c94..b4b70c9f7e6 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nn.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/nn/babel-nn.ini @@ -9,9 +9,9 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 -name.local = nynorsk +version = 1.3 +date = 2022-09-24 +name.local = norsk nynorsk name.english = Norwegian Nynorsk name.babel = nynorsk norwegiannynorsk name.polyglossia = norwegian @@ -164,7 +164,7 @@ delimiters.quotes = «»‘’ auxiliary = [á ǎ č ç đ è ê ń ñ ŋ š ŧ ü ž ä ö] exemplarCharacters = [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 æ ø å] index = [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 Æ Ø Å] -punctuation = [\\- , ; \\: ! ? . ( ) \\[ \\] \\{ \\}] +punctuation = [\\- ‐ ‑ – — , ; \\: ! ? . … ' ‘ ’ \" “ ” ( ) \\[ \\] § @ * / \\& # † ‡ ′ ″] [numbers] defaultNumberingSystem = latn diff --git a/Master/texmf-dist/tex/generic/babel/locale/no/babel-no.ini b/Master/texmf-dist/tex/generic/babel/locale/no/babel-no.ini index 716a95082f1..2ca97228467 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/no/babel-no.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/no/babel-no.ini @@ -7,8 +7,8 @@ [identification] charset = utf8 -version = 1.0 -date = 2021-08-29 +version = 1.1 +date = 2022-09-24 name.local = norsk name.english = Norwegian name.babel = norsk norwegian @@ -162,7 +162,7 @@ delimiters.quotes = «»‘’ auxiliary = [á ǎ ã č ç đ è ê í ń ñ ŋ š ŧ ú ü ž ä ö] exemplarCharacters = [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 æ ø å] index = [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 Æ Ø Å] -punctuation = [\\- – , ; \\: ! ? . ' \" « » ( ) \\[ \\] \\{ \\} § @ * / \\\\] +punctuation = [\\- ‑ – , ; \\: ! ? . ' \" « » ( ) \\[ \\] \\{ \\} § @ * / \\\\] [numbers] defaultNumberingSystem = latn diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 7a8fe536982..12aa2d1b52d 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -808,24 +808,17 @@ end \DisableBabelHook{babel-fontspec} \bbl@trace{Font handling with fontspec} \ifx\ExplSyntaxOn\@undefined\else - \ExplSyntaxOn - \catcode`\ =10 + \def\bbl@fs@warn@nx#1#2{% \bbl@tempfs is the original macro + \in@{,#1,}{,no-script,language-not-exist,}% + \ifin@\else\bbl@tempfs@nx{#1}{#2}\fi} + \def\bbl@fs@warn@nxx#1#2#3{% + \in@{,#1,}{,no-script,language-not-exist,}% + \ifin@\else\bbl@tempfs@nxx{#1}{#2}{#3}\fi} \def\bbl@loadfontspec{% - \usepackage{fontspec}% TODO. Apply patch always - \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 + \let\bbl@loadfontspec\relax + \ifx\fontspec\@undefined + \usepackage{fontspec}% + \fi}% \fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam @@ -837,9 +830,7 @@ end \fi}% \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont - \ifx\fontspec\@undefined - \bbl@loadfontspec - \fi + \bbl@loadfontspec \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} \newcommand\bbl@bblfont[2][]{% 1=features 2=fontname, @font=rm|sf|tt @@ -962,8 +953,15 @@ end {\\\newfontscript{\bbl@cl{sname}}{\bbl@cl{sotf}}}% \{fontspec-opentype}{Language/\bbl@cl{lname}}% {\\\newfontlanguage{\bbl@cl{lname}}{\bbl@cl{lotf}}}% + \let\\\bbl@tempfs@nx\<__fontspec_warning:nx>% + \let\<__fontspec_warning:nx>\\\bbl@fs@warn@nx + \let\\\bbl@tempfs@nxx\<__fontspec_warning:nxx>% + \let\<__fontspec_warning:nxx>\\\bbl@fs@warn@nxx \\\renewfontfamily\\#4% [\bbl@cl{lsys},#2]}{#3}% ie \bbl@exp{..}{#3} + \bbl@exp{% + \let\<__fontspec_warning:nx>\\\bbl@tempfs@nx + \let\<__fontspec_warning:nxx>\\\bbl@tempfs@nxx}% \begingroup #4% \xdef#1{\f@family}% eg, \bbl@rmdflt@lang{FreeSerif(0)} @@ -1062,6 +1060,11 @@ function Babel.locale_map(head) (item.char >= 0x1DC0 and item.char <= 0x1DFF) then toloc = toloc_save end + if toloc and Babel.locale_props[toloc] and + Babel.locale_props[toloc].letters and + tex.getcatcode(item.char) \string~= 11 then + toloc = nil + end if toloc and toloc > -1 then if Babel.locale_props[toloc].lg then item.lang = Babel.locale_props[toloc].lg @@ -1072,7 +1075,7 @@ function Babel.locale_map(head) end toloc_save = toloc end - elseif not inmath and item.id == 7 then + elseif not inmath and item.id == 7 then % Apply recursively item.replace = item.replace and Babel.locale_map(item.replace) item.pre = item.pre and Babel.locale_map(item.pre) item.post = item.post and Babel.locale_map(item.post) @@ -1140,10 +1143,11 @@ end \@ifnextchar[{\bbl@settransform{0}}{\bbl@settransform{0}[]}} \gdef\babelposthyphenation{&% \@ifnextchar[{\bbl@settransform{1}}{\bbl@settransform{1}[]}} +\gdef\bbl@postlinebreak{\bbl@settransform{2}[]} &% WIP \gdef\bbl@settransform#1[#2]#3#4#5{&% \ifcase#1 \bbl@activateprehyphen - \else + \or \bbl@activateposthyphen \fi \begingroup @@ -1159,7 +1163,7 @@ end rep = rep:gsub('^%s*(remove)%s*$', 'remove = true') rep = rep:gsub('^%s*(insert)%s*,', 'insert = true, ') rep = rep:gsub('(string)%s*=%s*([^%s,]*)', Babel.capture_func) - if #1 == 0 then + if #1 == 0 or #1 == 2 then rep = rep:gsub('(space)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)', 'space = {' .. '%2, %3, %4' .. '}') rep = rep:gsub('(spacefactor)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)', @@ -1172,6 +1176,16 @@ end end tex.print([[\string\babeltempa{{]] .. rep .. [[}}]]) }}}&% + \bbl@foreach\babeltempb{&% + \bbl@forkv{{##1}}{&% + \in@{,####1,}{,nil,step,data,remove,insert,string,no,pre,&% + no,post,penalty,kashida,space,spacefactor,}&% + \ifin@\else + \bbl@error + {Bad option '####1' in a transform.\\&% + I’ll ignore it but expect more errors}&% + {See the manual for further info.}&% + \fi}}&% \let\bbl@kv@attribute\relax \let\bbl@kv@label\relax \bbl@forkv{#2}{\bbl@csarg\edef{kv@##1}{##2}}&% @@ -1182,7 +1196,7 @@ end local lbkr = Babel.linebreaking.replacements[#1] local u = unicode.utf8 local id, attr, label - if #1 == 0 then + if #1 == 0 or #1 == 2 then id = \the\csname bbl@id@@#3\endcsname\space else id = \the\csname l@#3\endcsname\space @@ -1197,7 +1211,7 @@ end \fi &% Convert pattern: local patt = string.gsub([==[#4]==], '%s', '') - if #1 == 0 then + if #1 == 0 or #1 == 2 then patt = string.gsub(patt, '|', ' ') end if not u.find(patt, '()', nil, true) then diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index 471aa94c701..f554f4faac1 100644 --- a/Master/texmf-dist/tex/generic/babel/nil.ldf +++ b/Master/texmf-dist/tex/generic/babel/nil.ldf @@ -33,7 +33,7 @@ %% extension |.ins|) which are part of the distribution. %% -\ProvidesLanguage{nil}[2022/09/17 3.80 Nil language] +\ProvidesLanguage{nil}[2022/10/04 3.81 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 3e31c7e2823..efb996515e3 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -96,24 +96,17 @@ \DisableBabelHook{babel-fontspec} \bbl@trace{Font handling with fontspec} \ifx\ExplSyntaxOn\@undefined\else - \ExplSyntaxOn - \catcode`\ =10 + \def\bbl@fs@warn@nx#1#2{% \bbl@tempfs is the original macro + \in@{,#1,}{,no-script,language-not-exist,}% + \ifin@\else\bbl@tempfs@nx{#1}{#2}\fi} + \def\bbl@fs@warn@nxx#1#2#3{% + \in@{,#1,}{,no-script,language-not-exist,}% + \ifin@\else\bbl@tempfs@nxx{#1}{#2}{#3}\fi} \def\bbl@loadfontspec{% - \usepackage{fontspec}% TODO. Apply patch always - \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 + \let\bbl@loadfontspec\relax + \ifx\fontspec\@undefined + \usepackage{fontspec}% + \fi}% \fi \@onlypreamble\babelfont \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam @@ -125,9 +118,7 @@ \fi}% \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont - \ifx\fontspec\@undefined - \bbl@loadfontspec - \fi + \bbl@loadfontspec \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} \newcommand\bbl@bblfont[2][]{% 1=features 2=fontname, @font=rm|sf|tt @@ -250,8 +241,15 @@ {\\\newfontscript{\bbl@cl{sname}}{\bbl@cl{sotf}}}% \{fontspec-opentype}{Language/\bbl@cl{lname}}% {\\\newfontlanguage{\bbl@cl{lname}}{\bbl@cl{lotf}}}% + \let\\\bbl@tempfs@nx\<__fontspec_warning:nx>% + \let\<__fontspec_warning:nx>\\\bbl@fs@warn@nx + \let\\\bbl@tempfs@nxx\<__fontspec_warning:nxx>% + \let\<__fontspec_warning:nxx>\\\bbl@fs@warn@nxx \\\renewfontfamily\\#4% [\bbl@cl{lsys},#2]}{#3}% ie \bbl@exp{..}{#3} + \bbl@exp{% + \let\<__fontspec_warning:nx>\\\bbl@tempfs@nx + \let\<__fontspec_warning:nxx>\\\bbl@tempfs@nxx}% \begingroup #4% \xdef#1{\f@family}% eg, \bbl@rmdflt@lang{FreeSerif(0)} -- cgit v1.2.3