diff options
author | Karl Berry <karl@freefriends.org> | 2021-04-27 13:33:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-04-27 13:33:33 +0000 |
commit | 59f44df29bcc61c07c569ff2a8fe6fae91cf1d73 (patch) | |
tree | 74b2371e75e8ffd19e9fbf5828677127d7ff3fe2 | |
parent | 6a6e0023683198607247630bb34b0cdb305c2916 (diff) |
babel (26apr21)
git-svn-id: svn://tug.org/texlive/trunk@58999 c570f23f-e606-0410-a88d-b1316a301751
33 files changed, 569 insertions, 103 deletions
diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md index 6d8f47c18c3..8a954ea3ee5 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.57 +## Babel 3.58 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -8,9 +8,9 @@ is a set of ini files for about 250 languages. The latest stable version is available on <https://ctan.org/pkg/babel>. -Changes in version 3.57 are described in: +Changes in version 3.58 are described in: -https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.57.md +https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.58.md Apart from the manual, you can find information on some aspects of babel at: @@ -46,6 +46,20 @@ respective authors. ### Summary of Latest changes ``` +3.58 2021-04-26 + * More predefined transforms (lua): + - doubleletter.hyphen: Norsk + - oneletter.nobreak: Czech, Polish, Slovak + - hyphen.repeat: Czech, Polish, Portuguese, Slovak, Spanish + - punctuation.space: Hindi, Sanskrit + - transliteration.hk: Sanskrit + - transliteration.gajica: Serbian + * 'prehyphenation' transforms are now disabled in verbatim. + * New line breaking mode ‘unhyphenated’. + * Fix: \shorthandoff*{^} was not revertible (#126). + * Experimental code for Arabic justification (with elongated + forms: lua). + 3.57 2021-04-07 * Predefined transforms (lua): - Arabic: transliteration.dad diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf Binary files differindex 540babb7bb6..4eca9762335 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 b21384f6a02..745cf114068 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}[2021/04/07 v3.57 The Babel package] +\ProvidesFile{babel.dtx}[2021/04/26 v3.58 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -80,6 +80,13 @@ \usepackage{multicol} \usepackage{color,colortbl} \usepackage[linkcolor=blue,urlcolor=blue,colorlinks=true]{hyperref} +\hypersetup{% + pdfsubject={LaTeX Multilingual documents and localization for pdfTeX, LuaTex and + XeTeX.}, + pdfauthor={Johannes Braams, Javier Bezos}, + pdftitle={Babel}, + pdfkeywords={TeX, LaTeX, pdfTeX, LuaTeX, XeTeX, internationalization, + localization}} \newcommand\New[1]{% \colorbox[rgb]{.92, .86, .73}{New #1}\enspace\ignorespaces} \definecolor{thered} {rgb}{0.65,0.04,0.07} @@ -89,6 +96,7 @@ \makeatletter \def\@begintheorem#1#2{% \list{}{}% + \small \global\advance\@listdepth\m@ne \item[{\sffamily\bfseries\color{messages}\hspace*{1.3em}% \MakeUppercase{#1}}]}% @@ -238,9 +246,9 @@ Xe\largetex \begin{description} \item[\sffamily\color{messages}What is this document about?] This user guide focuses on internationalization and localization with \LaTeX{} -and \pdftex, \xetex{} and \luatex{} with the \babel{} package. There are -also some notes on its use with Plain \TeX. Part II describes the code, -and usually it can be ignored. +and \pdftex, \xetex{} and \luatex{} with the \babel{} package. There +are also some notes on its use with e-Plain and pdf-Plain \TeX . Part II +describes the code, and usually it can be ignored. \item[\sffamily\color{messages}What if I’m interested only in the latest changes?] Changes and new features with relation to version 3.8 @@ -631,7 +639,7 @@ modifiers are a more general mechanism. \subsection{Plain} -In Plain, load languages styles with |\input| and then use +In e-Plain and pdf-Plain, load languages styles with |\input| and then use |\begindocument| (the latter is defined by \babel): \begin{verbatim} \input estonian.sty @@ -640,9 +648,10 @@ In Plain, load languages styles with |\input| and then use \begin{warning} Not all languages provide a |sty| file and some of them are not - compatible with Plain.\footnote{Even in the \babel{} kernel there - were some macros not compatible with plain. Hopefully these issues - have been fixed.} + compatible with those formats. Please, refer to + \href{https://github.com/latex3/babel/blob/% + master/news-guides/guides/using-babel-with-plain.md}{Using babel with + Plain} for further details. \end{warning} \subsection{Basic language selectors} @@ -1298,7 +1307,7 @@ required for a locale. |ini| files are not meant only for \babel, and they has been devised as a resource for other packages. To easy interoperability between \TeX{} and other systems, they are identified with the BCP 47 codes as -preferred by the Unicode Common Language Data Repository, which was +preferred by the Unicode Common Locale Data Repository, which was used as source for most of the data provided by these files, too (the main exception being the |\...name| strings). @@ -1408,7 +1417,7 @@ need to set explicitly the script to either |deva| or |dev2|, eg: \begingroup \setmonofont[Script=Lao,Scale=MatchLowercase]{DejaVu Sans Mono} \begin{verbatim} -\babelprovide[import,hyphenrules=+]{lao} +\babelprovide[import, hyphenrules=+]{lao} \babelpatterns[lao]{1ດ 1ມ 1ອ 1ງ 1ກ 1າ} % Random \end{verbatim} \endgroup @@ -2490,6 +2499,9 @@ for example: In other engines it just suppresses hyphenation (because the pattern list is empty). +\New{3.58} Another special value is |unhyphenated|, which activates a +line breking mode that allows spaces to be stretched to arbitrary amounts. + \Describe{main}{} This valueless option makes the language the main one (thus overriding that set when \babel\ is loaded). Only in newly defined languages. @@ -3034,11 +3046,13 @@ in future releases.) \begingroup \def\trans#1#2#3{% - \vspace{1mm}% - \parbox[t]{2.4cm}{\strut#1}% - \parbox[t]{4.2cm}{\strut\ttfamily#2}% + \vspace{1.5mm}% + \parbox[t]{2.2cm}{\raggedright\strut#1}% + \hspace{2mm}% + \parbox[t]{4.0cm}{\strut\ttfamily#2}% + \hspace{2mm}% \parbox[t]{6.6cm}{\strut#3}\par} -\bigskip\hrule\nobreak\vspace{1mm} +\bigskip\hrule\nobreak\vspace{.5mm} % \strut\hfil Transforms % \medskip\hrule\nobreak @@ -3052,18 +3066,37 @@ devised by Yannis Haralambous for \textsf{dad} (simple and recommended way to make these transformations (the best way is with OTF features), but it can get you out of a hurry.} +\trans{Czech, Polish, Portuguese, Slovak, +Spanish}{hyphen.repeat}{Explicit hyphens behave like +|\string\babelhyphen|\allowbreak|\{repeat\}|.} + +\trans{Czech, Polish, Slovak}{oneletter.nobreak}{Converts a space after +a non-syllabic preposition or conjunction into a non-breaking space.} + \trans{Greek}{diaeresis.hyphen}{Removes the diaeresis above iota and upsilon if hyphenated just before. It works with the three variants.} -\trans{Hindi}{transliteration.hk}{The Harvard-Kyoto system to romanize -Devanagari.} +\trans{Hindi, Sanskrit}{transliteration.hk}{The Harvard-Kyoto system to +romanize Devanagari.} + +\trans{}{punctuation.space}{Inserts a space before the following +four characters: \textit{!?:;}\,.} \trans{Hungarian}{digraphs.hyphen}{Hyphenates the long digraphs \textit{ccs}, \textit{ddz}, \textit{ggy}, \textit{lly}, \textit{nny}, \textit{ssz}, \textit{tty} and \textit{zzs} as \textit{cs-cs}, \textit{dz-dz}, etc.} +\trans{Norsk}{doubleletter.hyphen}{Hyphenates the doble-letter groups +\textit{bb}, \textit{dd}, \textit{ff}, \textit{gg}, \textit{ll}, +\textit{mm}, \textit{nn}, \textit{pp}, \textit{rr}, \textit{ss}, +\textit{tt} as \textit{bb-b}, \textit{dd-d}, etc.} + +\trans{Serbian}{transliteration.gajica}{(Note |serbian| with |ini| +files refers to the Cyrillic script, which is here the target.) The +standard system devised by Ljudevit Gaj.} + \vspace{2mm}\hrule\nobreak \endgroup @@ -3147,6 +3180,21 @@ This feature is activated with the first |\babelposthyphenation| or \end{verbatim} \end{example} +\begin{note} + With \luatex{} there is another approach to make text + transformations, with the function |fonts.handlers.otf.addfeature|, + which adds new features to an OTF font (substitution and + positioning). These features can be made language-dependent, and + \babel{} by default recognizes this setting if the font has been + declared with |\babelfont|. The \textit{transforms} mechanism + supplements rather than replaces OTF features. + + With \xetex{}, where \textit{transforms} are not available, there is + still another approach, with font mappings, mainly meant to perform + encoding conversions and transliterations. Mappings, however, are + linked to fonts, not to languages. +\end{note} + \subsection{Selection based on BCP 47 tags} \label{bcp47} @@ -4910,8 +4958,8 @@ help from Bernd Raichle, for which I am grateful. % \section{Tools} % % \begin{macrocode} -%<<version=3.57>> -%<<date=2021/04/07>> +%<<version=3.58>> +%<<date=2021/04/26>> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -7104,8 +7152,10 @@ help from Bernd Raichle, for which I am grateful. \count@#1\relax \def\bbl@elt##1##2##3##4{% \ifnum\count@=##2\relax - \bbl@info{\string#1 = using hyphenrules for ##1\\% - (\string\language\the\count@)}% + \edef\bbl@tempa{\expandafter\@gobbletwo\string#1}% + \bbl@info{Hyphen rules for '\expandafter\@gobble\bbl@tempa' + set to \expandafter\string\csname l@##1\endcsname\\% + (\string\language\the\count@). Reported}% \def\bbl@elt####1####2####3####4{}% \fi}% \bbl@cs{languages}% @@ -7597,14 +7647,23 @@ help from Bernd Raichle, for which I am grateful. \fi \fi \let\bbl@hymapsel\@cclv - % hyphenation - select patterns - \bbl@patterns{#1}% - % hyphenation - allow stretching with babelnohyphens - \ifnum\language=\l@babelnohyphens + % hyphenation - select rules + \ifnum\csname l@\languagename\endcsname=\l@unhyphenated + \edef\bbl@tempa{u}% + \else + \edef\bbl@tempa{\bbl@cl{lnbrk}}% + \fi + \bbl@xin@{/u}{/\bbl@tempa}% + \ifin@ + % 'unhyphenated' = allow stretching + \language\l@unhyphenated \babel@savevariable\emergencystretch \emergencystretch\maxdimen \babel@savevariable\hbadness \hbadness\@M + \else + % other = select patterns + \bbl@patterns{#1}% \fi % hyphenation - mins \babel@savevariable\lefthyphenmin @@ -8877,10 +8936,13 @@ help from Bernd Raichle, for which I am grateful. % or |\normal@char|\m{char} in the case of |\bbl@deactivate|. % % \begin{macrocode} +\chardef\bbl@activated\z@ \def\bbl@activate#1{% + \chardef\bbl@activated\@ne \bbl@withactive{\expandafter\let\expandafter}#1% \csname bbl@active@\string#1\endcsname} \def\bbl@deactivate#1{% + \chardef\bbl@activated\tw@ \bbl@withactive{\expandafter\let\expandafter}#1% \csname bbl@normal@\string#1\endcsname} % \end{macrocode} @@ -9152,12 +9214,25 @@ help from Bernd Raichle, for which I am grateful. {\bbl@error {I cannot switch `\string#2' on or off--not a shorthand}% {This character is not a shorthand. Maybe you made\\% - a typing mistake? I will ignore your instruction}}% - {\ifcase#1% + a typing mistake? I will ignore your instruction.}}% + {\ifcase#1% off, on, off* \catcode`#212\relax \or \catcode`#2\active + \bbl@ifunset{bbl@shdef@\string#2}% + {}% + {\bbl@withactive{\expandafter\let\expandafter}#2% + \csname bbl@shdef@\string#2\endcsname + \bbl@csarg\let{shdef@\string#2}\relax}% + \ifcase\bbl@activated\or + \bbl@activate{#2}% + \else + \bbl@deactivate{#2}% + \fi \or + \bbl@ifunset{bbl@shdef@\string#2}% + {\bbl@withactive{\bbl@csarg\let{shdef@\string#2}}#2}% + {}% \csname bbl@oricat@\string#2\endcsname \csname bbl@oridef@\string#2\endcsname \fi}% @@ -10628,8 +10703,8 @@ help from Bernd Raichle, for which I am grateful. \chardef\l@english\z@ \fi % The following is used to cancel rules in ini files (see Amharic). -\ifx\l@babelnohyhens\@undefined - \newlanguage\l@babelnohyphens +\ifx\l@unhyphenated\@undefined + \newlanguage\l@unhyphenated \fi % \end{macrocode} % @@ -10712,6 +10787,7 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@KVP@script\@nil \let\bbl@KVP@language\@nil \let\bbl@KVP@hyphenrules\@nil + \let\bbl@KVP@linebreaking\@nil \let\bbl@KVP@mapfont\@nil \let\bbl@KVP@maparabic\@nil \let\bbl@KVP@mapdigits\@nil @@ -11112,7 +11188,7 @@ help from Bernd Raichle, for which I am grateful. % Load the basic parameters (ids, typography, counters, and a few % more), while captions and dates are left out. But it may happen some % data has been loaded before automatically, so we first discard the -% saved values. +% saved values. (TODO. But preserving previous values would be useful.) % % \begin{macrocode} \def\bbl@load@basic#1{% @@ -12089,6 +12165,14 @@ help from Bernd Raichle, for which I am grateful. \BabelEnsureInfo} \@namedef{bbl@ADJ@bcp47.toname@off}{% \bbl@bcptonamefalse} +\@namedef{bbl@ADJ@prehyphenation.disable@nohyphenation}{% + \directlua{ Babel.ignore_pre_char = function(node) + return (node.lang == \the\csname l@nohyphenation\endcsname) + end }} +\@namedef{bbl@ADJ@prehyphenation.disable@off}{% + \directlua{ Babel.ignore_pre_char = function(node) + return false + end }} % TODO: use babel name, override % % As the final task, load the code for lua. @@ -12875,8 +12959,8 @@ help from Bernd Raichle, for which I am grateful. \bbl@csarg\gdef{xeipn@\languagename}% {\XeTeXlinebreakpenalty #1\relax}} \def\bbl@provide@intraspace{% - \bbl@xin@{\bbl@cl{lnbrk}}{s}% - \ifin@\else\bbl@xin@{\bbl@cl{lnbrk}}{c}\fi + \bbl@xin@{/s}{/\bbl@cl{lnbrk}}% + \ifin@\else\bbl@xin@{/c}{/\bbl@cl{lnbrk}}\fi \ifin@ \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else @@ -13581,7 +13665,7 @@ help from Bernd Raichle, for which I am grateful. \def\bbl@provide@intraspace{% \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else - \bbl@xin@{\bbl@cl{lnbrk}}{c}% + \bbl@xin@{/c}{/\bbl@cl{lnbrk}}% \ifin@ % cjk \bbl@cjkintraspace \directlua{ @@ -13867,7 +13951,11 @@ end end Babel.fetch_subtext = {} - + + Babel.ignore_pre_char = function(node) + return (node.lang == \the\l@nohyphenation) + end + &% Merging both functions doesn't seen feasible, because there are too &% many differences. Babel.fetch_subtext[0] = function(head) @@ -13891,7 +13979,11 @@ end if lang == locale or lang == nil then lang = lang or locale - word_string = word_string .. unicode.utf8.char(item.char) + if Babel.ignore_pre_char(item) then + word_string = word_string .. Babel.us_char + else + word_string = word_string .. unicode.utf8.char(item.char) + end word_nodes[#word_nodes+1] = item else break diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index ddedf2c6678..3a073878bac 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{2021/04/07} +\def\filedate{2021/04/26} \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 ea7e8ecc5ab..a69fa73b3e9 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}[2021/04/07 v3.57] +\ProvidesFile{bbcompat.dtx}[2021/04/26 v3.58] %</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 2845c0f244f..c022e957f26 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 7c5ec15a9bc..44121348c6e 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}[2021/04/07 3.57 Babel common definitions] +\ProvidesFile{babel.def}[2021/04/26 3.58 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.57} -\def\bbl@date{2021/04/07} +\def\bbl@version{3.58} +\def\bbl@date{2021/04/26} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% @@ -406,8 +406,10 @@ \count@#1\relax \def\bbl@elt##1##2##3##4{% \ifnum\count@=##2\relax - \bbl@info{\string#1 = using hyphenrules for ##1\\% - (\string\language\the\count@)}% + \edef\bbl@tempa{\expandafter\@gobbletwo\string#1}% + \bbl@info{Hyphen rules for '\expandafter\@gobble\bbl@tempa' + set to \expandafter\string\csname l@##1\endcsname\\% + (\string\language\the\count@). Reported}% \def\bbl@elt####1####2####3####4{}% \fi}% \bbl@cs{languages}% @@ -686,14 +688,23 @@ \fi \fi \let\bbl@hymapsel\@cclv - % hyphenation - select patterns - \bbl@patterns{#1}% - % hyphenation - allow stretching with babelnohyphens - \ifnum\language=\l@babelnohyphens + % hyphenation - select rules + \ifnum\csname l@\languagename\endcsname=\l@unhyphenated + \edef\bbl@tempa{u}% + \else + \edef\bbl@tempa{\bbl@cl{lnbrk}}% + \fi + \bbl@xin@{/u}{/\bbl@tempa}% + \ifin@ + % 'unhyphenated' = allow stretching + \language\l@unhyphenated \babel@savevariable\emergencystretch \emergencystretch\maxdimen \babel@savevariable\hbadness \hbadness\@M + \else + % other = select patterns + \bbl@patterns{#1}% \fi % hyphenation - mins \babel@savevariable\lefthyphenmin @@ -1458,10 +1469,13 @@ \newif\if@safe@actives \@safe@activesfalse \def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi} +\chardef\bbl@activated\z@ \def\bbl@activate#1{% + \chardef\bbl@activated\@ne \bbl@withactive{\expandafter\let\expandafter}#1% \csname bbl@active@\string#1\endcsname} \def\bbl@deactivate#1{% + \chardef\bbl@activated\tw@ \bbl@withactive{\expandafter\let\expandafter}#1% \csname bbl@normal@\string#1\endcsname} \def\bbl@firstcs#1#2{\csname#1\endcsname} @@ -1580,12 +1594,25 @@ {\bbl@error {I cannot switch `\string#2' on or off--not a shorthand}% {This character is not a shorthand. Maybe you made\\% - a typing mistake? I will ignore your instruction}}% - {\ifcase#1% + a typing mistake? I will ignore your instruction.}}% + {\ifcase#1% off, on, off* \catcode`#212\relax \or \catcode`#2\active + \bbl@ifunset{bbl@shdef@\string#2}% + {}% + {\bbl@withactive{\expandafter\let\expandafter}#2% + \csname bbl@shdef@\string#2\endcsname + \bbl@csarg\let{shdef@\string#2}\relax}% + \ifcase\bbl@activated\or + \bbl@activate{#2}% + \else + \bbl@deactivate{#2}% + \fi \or + \bbl@ifunset{bbl@shdef@\string#2}% + {\bbl@withactive{\bbl@csarg\let{shdef@\string#2}}#2}% + {}% \csname bbl@oricat@\string#2\endcsname \csname bbl@oridef@\string#2\endcsname \fi}% @@ -2268,8 +2295,8 @@ \ifx\l@english\@undefined \chardef\l@english\z@ \fi -\ifx\l@babelnohyhens\@undefined - \newlanguage\l@babelnohyphens +\ifx\l@unhyphenated\@undefined + \newlanguage\l@unhyphenated \fi \bbl@trace{Bidi layout} \providecommand\IfBabelLayout[3]{#3}% @@ -2329,6 +2356,7 @@ \let\bbl@KVP@script\@nil \let\bbl@KVP@language\@nil \let\bbl@KVP@hyphenrules\@nil + \let\bbl@KVP@linebreaking\@nil \let\bbl@KVP@mapfont\@nil \let\bbl@KVP@maparabic\@nil \let\bbl@KVP@mapdigits\@nil @@ -3487,6 +3515,14 @@ \BabelEnsureInfo} \@namedef{bbl@ADJ@bcp47.toname@off}{% \bbl@bcptonamefalse} +\@namedef{bbl@ADJ@prehyphenation.disable@nohyphenation}{% + \directlua{ Babel.ignore_pre_char = function(node) + return (node.lang == \the\csname l@nohyphenation\endcsname) + end }} +\@namedef{bbl@ADJ@prehyphenation.disable@off}{% + \directlua{ Babel.ignore_pre_char = function(node) + return false + end }} \ifx\directlua\@undefined\else \ifx\bbl@luapatterns\@undefined \input luababel.def diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index 8264f8ade70..5dcf713e174 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}[2021/04/07 3.57 The Babel package] +\ProvidesPackage{babel}[2021/04/26 3.58 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 90f8b3d5d4f..cfeb41401d3 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}[2021/04/07 3.57 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2021/04/26 3.58 Babel hyphens] \xdef\bbl@format{\jobname} -\def\bbl@version{3.57} -\def\bbl@date{2021/04/07} +\def\bbl@version{3.58} +\def\bbl@date{2021/04/26} \ifx\AtBeginDocument\@undefined \def\@empty{} \let\orig@dump\dump diff --git a/Master/texmf-dist/tex/generic/babel/locale/am/babel-am.ini b/Master/texmf-dist/tex/generic/babel/locale/am/babel-am.ini index aba1d4d3af7..c2a12ae9906 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/am/babel-am.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/am/babel-am.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.4 -date = 2020-10-11 +version = 1.5 +date = 2021-04-24 name.local = አማርኛ name.english = Amharic name.babel = amharic @@ -150,7 +150,7 @@ time.short = [h]:[mm] [a] [typography] frenchspacing = yes ; Modern practice. Use 'amharic' for the traditional one: -hyphenrules = babelnohyphens +hyphenrules = unhyphenated lefthyphenmin = 1 righthyphenmin = 1 hyphenchar = diff --git a/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini b/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini index de5c72b9d04..ca0c4ff1005 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.8 -date = 2021-04-05 +version = 1.9 +date = 2021-04-24 name.local = العربية name.english = Arabic name.babel = arabic @@ -26,6 +26,7 @@ script.tag.opentype = arab level = 1 encodings = derivate = no +require.babel = arabic [captions] preface = مدخل diff --git a/Master/texmf-dist/tex/generic/babel/locale/ar/babel-arabic.tex b/Master/texmf-dist/tex/generic/babel/locale/ar/babel-arabic.tex index 52b4fc924f6..fbad8834d4d 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ar/babel-arabic.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/ar/babel-arabic.tex @@ -9,4 +9,88 @@ \fi \BabelBeforeIni{ar}{% } + +\ifcase\bbl@engine\or + +\directlua{ + +Babel.ar_tolong = {} + +function Babel.ar_justify(head) + local substlist = Babel.ar_tolong + local GLYPH = node.id'glyph' + local substs, width, goal + local subst_done = true % false + math.randomseed(1) + for line in node.traverse_id(node.id'hlist', head) do + if (line.glue_sign == 1 and line.glue_order == 0) then % exclude last line! + substs = {} % we store all “expandable” letters of each line + for n in node.traverse_id(GLYPH, line.head) do + if (substlist[n.char]) then + table.insert(substs, n) + end + end + line.glue_set = 0 % deactivate normal glue expansion + width = node.dimensions(line.head) % check the new width + goal = line.width + + while (width < goal and \string#substs > 0) do + x = math.random(\string#substs) % choose randomly a glyph + oldchar = substs[x].char + substs[x].char = substlist[substs[x].char] + subst_done = true + width = node.dimensions(line.head) % check if the line is too wide + % substitute back if the line would be too wide and break: + if width > goal then substs[x].char = oldchar break end + % if further substitutions have to be done, remove the just + % substituted node from the list: + table.remove(substs,x) + end + % Must take into account marks and ins, see luatex manual. + % Have to be executed only if there are changes. + if subst_done then + line.head = node.hpack(line.head, goal, 'exactly') + end + end + end + return head +end + +} + +\gdef\ArabicSetupJust{% + \directlua{ + Babel.ar_tolong = {} + luatexbase.add_to_callback('post_linebreak_filter', + Babel.ar_justify, 'Babel.ar_justify') + }% + % It must be done for each font, and stored separately. + % Locale must be taken into account too. Brute force. + % No rules at all, yet. The ideal: look at jalt table. + % And perhaps other tables (falt?, cswh?). What about kaf? + \begingroup + \bbl@foreach{% + 0628,0629,062A,062B,062C,062D,062E,062F,0630,0631,0632,0633,% + 0634,0635,0636,0637,0638,0639,063A,063B,063C,063D,063E,063F,% + 0640,0641,0642,0643,0644,0645,0646,0647,0649}{% + \setbox\z@\hbox{% Only final, for the moment + ^^^^200d\char"##1=% + \addfontfeature{RawFeature=+jalt}% + ^^^^200d\char"##1}% + \directlua{ + local chars = {} + for item in node.traverse(tex.box[0].head) do + if item.id == node.id'glyph' and item.char > 128 and + not (item.char == 0x200D) then + table.insert(chars, item.char) + end + end + if not (chars[1] == chars[2]) then + Babel.ar_tolong[chars[1]] = chars[2] + end + }}% + \endgroup} + +\fi + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/cs/babel-cs.ini b/Master/texmf-dist/tex/generic/babel/locale/cs/babel-cs.ini index ea0e88c6fa1..aa948824820 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/cs/babel-cs.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/cs/babel-cs.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 +version = 1.3 +date = 2021-04-24 name.local = čeština name.english = Czech name.babel = czech @@ -183,3 +183,13 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.prehyphenation] +oneletter.nobreak.1.0 = { |[AIiVvOoUuSsZzKk]()|() } +oneletter.nobreak.1.1 = { insert, penalty=10000 } +oneletter.nobreak.1.2 = {} + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/es/babel-es.ini b/Master/texmf-dist/tex/generic/babel/locale/es/babel-es.ini index 5ed832dd28d..a15ab440de2 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/es/babel-es.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/es/babel-es.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 +version = 1.3 +date = 2021-04-24 name.local = español name.english = Spanish name.babel = spanish @@ -183,3 +183,8 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/hi/babel-hi.ini b/Master/texmf-dist/tex/generic/babel/locale/hi/babel-hi.ini index a230ec2a47f..bc5e67eff13 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/hi/babel-hi.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/hi/babel-hi.ini @@ -12,8 +12,8 @@ [identification] charset = utf8 -version = 1.9 -date = 2021-04-05 +version = 1.10 +date = 2021-04-24 name.local = हिन्दी name.english = Hindi name.babel = hindi @@ -203,6 +203,15 @@ superscriptingExponent = × alphabetic = क ख ग घ ङ च छ ज झ ञ ट ठ ड ढ ण त थ द ध न प फ ब भ म य र ल व श ष स ह [transforms.prehyphenation] +punctuation.space.1.0 = { {a}()|[:;!{?}]() } +punctuation.space.1.1 = { insert, penalty = 10000 } +punctuation.space.1.2 = { spacefactor= .8 .3 .8, data = 2 } +punctuation.space.1.3 = {} +punctuation.space.2.0 = { {a}()[:;!{?}]() } +punctuation.space.2.1 = { insert, penalty = 10000 } +punctuation.space.2.2 = { insert, spacefactor= .8 .3 .8, data = 1 } +punctuation.space.2.3 = {} +; == Harvard-Kyoto == ; Multiletter transliteration.hk.1.0 = { lRR } transliteration.hk.1.1 = { string = ॡ } diff --git a/Master/texmf-dist/tex/generic/babel/locale/ml/babel-ml.ini b/Master/texmf-dist/tex/generic/babel/locale/ml/babel-ml.ini index fedfd6ecd03..a18096a8f16 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ml/babel-ml.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/ml/babel-ml.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.6 -date = 2020-06-30 +version = 1.7 +date = 2021-04-24 name.local = മലയാളം name.english = Malayalam name.babel = malayalam @@ -124,9 +124,6 @@ time.short = [h]:[mm] [a] [typography] frenchspacing = yes hyphenrules = malayalam -; Or else?: -; linebreaking = s / e -; hyphenrules = babelnohyphens lefthyphenmin = 2 righthyphenmin = 2 hyphenchar = diff --git a/Master/texmf-dist/tex/generic/babel/locale/nb/babel-nb.ini b/Master/texmf-dist/tex/generic/babel/locale/nb/babel-nb.ini index 12930bb2346..9e2f41bd4ba 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/nb/babel-nb.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/nb/babel-nb.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-10-11 +version = 1.4 +date = 2021-04-24 name.local = norsk bokmål name.english = Norwegian Bokmål name.babel = norsk norwegianbokmal @@ -185,3 +185,9 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.posthyphenation] +doubleletter.hyphen.1.0 = {()([BDFGLMNPRSTbdfglmnprst])|(){1}} +doubleletter.hyphen.1.1 = { no = {1}, pre = {1}{1}- } +doubleletter.hyphen.1.2 = remove + diff --git a/Master/texmf-dist/tex/generic/babel/locale/pl/babel-pl.ini b/Master/texmf-dist/tex/generic/babel/locale/pl/babel-pl.ini index 2096cc93535..c36cba8621c 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pl/babel-pl.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/pl/babel-pl.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 +version = 1.3 +date = 2021-04-24 name.local = polski name.english = Polish name.babel = polish @@ -183,3 +183,13 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.prehyphenation] +oneletter.nobreak.1.0 = { |[aiouwzAIOUWZ]()|() } +oneletter.nobreak.1.1 = { insert, penalty=10000 } +oneletter.nobreak.1.2 = {} + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-BR.ini b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-BR.ini index d0b99dfc03b..5db4a1ec063 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-BR.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-BR.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.4 -date = 2020-06-30 +version = 1.5 +date = 2021-04-24 name.local = português name.english = Portuguese name.babel = brazilian portuguese-brazil portuguese-br @@ -188,3 +188,8 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-PT.ini b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-PT.ini index 61ce0fbdff5..e771e832240 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-PT.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt-PT.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.4 -date = 2020-06-30 +version = 1.5 +date = 2021-04-24 name.local = português name.english = Portuguese name.babel = portuguese portuguese-portugal portuguese-pt @@ -188,3 +188,8 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 } diff --git a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt.ini b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt.ini index 035b7f30c7a..a1be285defb 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/pt/babel-pt.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.4 -date = 2020-06-30 +version = 1.5 +date = 2021-04-24 name.local = português name.english = Portuguese name.babel = portuguese @@ -185,3 +185,8 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 } diff --git a/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa-Deva.ini b/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa-Deva.ini index 71579d1fb03..6305b963ead 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa-Deva.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa-Deva.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 0.10 -date = 2020-06-30 +version = 0.11 +date = 2021-04-24 name.local = संस्कृत name.english = Sanskrit name.babel = sanskrit @@ -110,3 +110,53 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.prehyphenation] +punctuation.space.1.0 = { {a}()|[:;!{?}]() } +punctuation.space.1.1 = { insert, penalty = 10000 } +punctuation.space.1.2 = { spacefactor= .8 .3 .8, data = 2 } +punctuation.space.1.3 = {} +punctuation.space.2.0 = { {a}()[:;!{?}]() } +punctuation.space.2.1 = { insert, penalty = 10000 } +punctuation.space.2.2 = { insert, spacefactor= .8 .3 .8, data = 1 } +punctuation.space.2.3 = {} +; == Harvard-Kyoto == +; Multiletter +transliteration.hk.1.0 = { lRR } +transliteration.hk.1.1 = { string = ॡ } +transliteration.hk.1.2 = { remove } +transliteration.hk.1.3 = { remove } +transliteration.hk.2.0 = { OM } +transliteration.hk.2.1 = { string = ॐ } +transliteration.hk.2.2 = { remove } +transliteration.hk.3.0 = { {007C}{007C} } +transliteration.hk.3.1 = { string = ॥ } +transliteration.hk.3.2 = { remove } +transliteration.hk.4.0 = { ([lR])R } +transliteration.hk.4.1 = { string = {1|lR|ऌॠ} } +transliteration.hk.4.2 = { remove } +transliteration.hk.5.0 = { a([iu]) } +transliteration.hk.5.1 = { remove } +transliteration.hk.5.2 = { string = {1|iu|ऐऔ} } +; Xh +transliteration.hk.6.0 = { ([kgcjTDtdpb])h } +transliteration.hk.6.1 = { string = {1|kgcjTDtdpb|खघछझठढथधफभ} } +transliteration.hk.6.2 = { remove } +; Single letter +transliteration.hk.7.0 = { ([MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}']) } +transliteration.hk.7.1 = { string = {1|MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}'|ंःअआइईउऊऋएओकगङचजञटडणतदनपबमयरलवशषसहळ।ऽ} } +; Post-process vowels +transliteration.hk.8.0 = { [{0915}-{0939}]([आइईउऊऋॠऌॡएऐओऔऎऒ]) } +transliteration.hk.8.1 = {} +transliteration.hk.8.2 = { string = {1|आइईउऊऋॠऌॡएऐओऔऎऒ|ािीुूृॄॢॣेैोौॆॊ} } +transliteration.hk.9.0 = { [{0915}-{0939}]([{0915}-{0939}]) } +transliteration.hk.9.1 = {} +transliteration.hk.9.2 = { string = ^^^^094d{1} } +; Duplicated (a trick) +transliteration.hk.10.0 = { [{0915}-{0939}]([{0915}-{0939}]) } +transliteration.hk.10.1 = {} +transliteration.hk.10.2 = { string = ^^^^094d{1} } +; Inherent a +transliteration.hk.11.0 = { [{0915}-{0939}]{0905} } +transliteration.hk.11.1 = {} +transliteration.hk.11.2 = { remove }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa.ini b/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa.ini index 3ff8d4db146..681cb49eb30 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sa/babel-sa.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 0.10 -date = 2020-06-30 +version = 0.11 +date = 2021-04-2430 name.english = Sanskrit name.babel = sanskrit name.polyglossia = sanskrit @@ -95,3 +95,53 @@ hyphenate.other.script = "0CF1 "0CF2 delimiters.quotes.0 = [counters] + +[transforms.prehyphenation] +punctuation.space.1.0 = { {a}()|[:;!{?}]() } +punctuation.space.1.1 = { insert, penalty = 10000 } +punctuation.space.1.2 = { spacefactor= .8 .3 .8, data = 2 } +punctuation.space.1.3 = {} +punctuation.space.2.0 = { {a}()[:;!{?}]() } +punctuation.space.2.1 = { insert, penalty = 10000 } +punctuation.space.2.2 = { insert, spacefactor= .8 .3 .8, data = 1 } +punctuation.space.2.3 = {} +; == Harvard-Kyoto == +; Multiletter +transliteration.hk.1.0 = { lRR } +transliteration.hk.1.1 = { string = ॡ } +transliteration.hk.1.2 = { remove } +transliteration.hk.1.3 = { remove } +transliteration.hk.2.0 = { OM } +transliteration.hk.2.1 = { string = ॐ } +transliteration.hk.2.2 = { remove } +transliteration.hk.3.0 = { {007C}{007C} } +transliteration.hk.3.1 = { string = ॥ } +transliteration.hk.3.2 = { remove } +transliteration.hk.4.0 = { ([lR])R } +transliteration.hk.4.1 = { string = {1|lR|ऌॠ} } +transliteration.hk.4.2 = { remove } +transliteration.hk.5.0 = { a([iu]) } +transliteration.hk.5.1 = { remove } +transliteration.hk.5.2 = { string = {1|iu|ऐऔ} } +; Xh +transliteration.hk.6.0 = { ([kgcjTDtdpb])h } +transliteration.hk.6.1 = { string = {1|kgcjTDtdpb|खघछझठढथधफभ} } +transliteration.hk.6.2 = { remove } +; Single letter +transliteration.hk.7.0 = { ([MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}']) } +transliteration.hk.7.1 = { string = {1|MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}'|ंःअआइईउऊऋएओकगङचजञटडणतदनपबमयरलवशषसहळ।ऽ} } +; Post-process vowels +transliteration.hk.8.0 = { [{0915}-{0939}]([आइईउऊऋॠऌॡएऐओऔऎऒ]) } +transliteration.hk.8.1 = {} +transliteration.hk.8.2 = { string = {1|आइईउऊऋॠऌॡएऐओऔऎऒ|ािीुूृॄॢॣेैोौॆॊ} } +transliteration.hk.9.0 = { [{0915}-{0939}]([{0915}-{0939}]) } +transliteration.hk.9.1 = {} +transliteration.hk.9.2 = { string = ^^^^094d{1} } +; Duplicated (a trick) +transliteration.hk.10.0 = { [{0915}-{0939}]([{0915}-{0939}]) } +transliteration.hk.10.1 = {} +transliteration.hk.10.2 = { string = ^^^^094d{1} } +; Inherent a +transliteration.hk.11.0 = { [{0915}-{0939}]{0905} } +transliteration.hk.11.1 = {} +transliteration.hk.11.2 = { remove } diff --git a/Master/texmf-dist/tex/generic/babel/locale/sk/babel-sk.ini b/Master/texmf-dist/tex/generic/babel/locale/sk/babel-sk.ini index 39c053218bd..9f736f8592a 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sk/babel-sk.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sk/babel-sk.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2020-06-30 +version = 1.3 +date = 2021-04-24 name.local = slovenčina name.english = Slovak name.babel = slovak @@ -183,3 +183,13 @@ plusSign = + superscriptingExponent = × [counters] + +[transforms.prehyphenation] +oneletter.nobreak.1.0 = { |[AIiVvOoUuSsZzKk]()|() } +oneletter.nobreak.1.1 = { insert, penalty=10000 } +oneletter.nobreak.1.2 = {} + +[transforms.posthyphenation] +hyphen.repeat.1.0 = { (){a}=(){a} } +hyphen.repeat.1.1 = {} +hyphen.repeat.1.2 = { no = -, pre = -, post = -, data = 1 }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-BA.ini b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-BA.ini index aca24f718cc..c2d8e674b36 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-BA.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-BA.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-06-30 +version = 1.4 +date = 2021-04-24 name.local = српски name.english = Serbian name.babel = serbian-cyrillic-bosniaherzegovina @@ -187,3 +187,16 @@ superscriptingExponent = × [counters] lower = а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш upper = А Б В Г Д Ђ Е Ж З И Ј К Л Љ М Н Њ О П Р С Т Ћ У Ф Х Ц Ч Џ Ш + +[transforms.prehyphenation] +; With implicit remove's, in 1-4 as x.2 +transliteration.gajica.1.0 = { ([ln])j } +transliteration.gajica.1.1 = { string = {1|ln|љњ} } +transliteration.gajica.2.0 = { ([LN])[jJ] } +transliteration.gajica.2.1 = { string = {1|LN|ЉЉ} } +transliteration.gajica.3.0 = { dž } +transliteration.gajica.3.1 = { string = џ } +transliteration.gajica.4.0 = { D[žŽ] } +transliteration.gajica.4.1 = { string = Џ } +transliteration.gajica.5.0 = { ([abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ]) } +transliteration.gajica.5.1 = { string = {1|abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ|абвгдђежзијклмнопрстћуфхцчшАБВГДЂЕЖЗИЈКЛМНОПРСТЋУФХЦЧШ} } diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-ME.ini b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-ME.ini index 30d0037a6d2..320778caa73 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-ME.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-ME.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-06-30 +version = 1.4 +date = 2021-04-24 name.local = српски name.english = Serbian name.babel = serbian-cyrillic-montenegro @@ -187,3 +187,16 @@ superscriptingExponent = × [counters] lower = а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш upper = А Б В Г Д Ђ Е Ж З И Ј К Л Љ М Н Њ О П Р С Т Ћ У Ф Х Ц Ч Џ Ш + +[transforms.prehyphenation] +; With implicit remove's, in 1-4 as x.2 +transliteration.gajica.1.0 = { ([ln])j } +transliteration.gajica.1.1 = { string = {1|ln|љњ} } +transliteration.gajica.2.0 = { ([LN])[jJ] } +transliteration.gajica.2.1 = { string = {1|LN|ЉЉ} } +transliteration.gajica.3.0 = { dž } +transliteration.gajica.3.1 = { string = џ } +transliteration.gajica.4.0 = { D[žŽ] } +transliteration.gajica.4.1 = { string = Џ } +transliteration.gajica.5.0 = { ([abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ]) } +transliteration.gajica.5.1 = { string = {1|abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ|абвгдђежзијклмнопрстћуфхцчшАБВГДЂЕЖЗИЈКЛМНОПРСТЋУФХЦЧШ} } diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-XK.ini b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-XK.ini index 77218fc99cf..dfddfc4a04c 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-XK.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl-XK.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-06-30 +version = 1.4 +date = 2021-04-24 name.local = српски name.english = Serbian name.babel = serbian-cyrillic-kosovo @@ -187,3 +187,16 @@ superscriptingExponent = × [counters] lower = а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш upper = А Б В Г Д Ђ Е Ж З И Ј К Л Љ М Н Њ О П Р С Т Ћ У Ф Х Ц Ч Џ Ш + +[transforms.prehyphenation] +; With implicit remove's, in 1-4 as x.2 +transliteration.gajica.1.0 = { ([ln])j } +transliteration.gajica.1.1 = { string = {1|ln|љњ} } +transliteration.gajica.2.0 = { ([LN])[jJ] } +transliteration.gajica.2.1 = { string = {1|LN|ЉЉ} } +transliteration.gajica.3.0 = { dž } +transliteration.gajica.3.1 = { string = џ } +transliteration.gajica.4.0 = { D[žŽ] } +transliteration.gajica.4.1 = { string = Џ } +transliteration.gajica.5.0 = { ([abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ]) } +transliteration.gajica.5.1 = { string = {1|abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ|абвгдђежзијклмнопрстћуфхцчшАБВГДЂЕЖЗИЈКЛМНОПРСТЋУФХЦЧШ} } diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl.ini b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl.ini index 88b705fa5ae..212f8a377fb 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr-Cyrl.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-06-30 +version = 1.4 +date = 2021-04-24 name.local = српски name.english = Serbian name.babel = serbian-cyrillic @@ -184,3 +184,16 @@ superscriptingExponent = × [counters] lower = а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш upper = А Б В Г Д Ђ Е Ж З И Ј К Л Љ М Н Њ О П Р С Т Ћ У Ф Х Ц Ч Џ Ш + +[transforms.prehyphenation] +; With implicit remove's, in 1-4 as x.2 +transliteration.gajica.1.0 = { ([ln])j } +transliteration.gajica.1.1 = { string = {1|ln|љњ} } +transliteration.gajica.2.0 = { ([LN])[jJ] } +transliteration.gajica.2.1 = { string = {1|LN|ЉЉ} } +transliteration.gajica.3.0 = { dž } +transliteration.gajica.3.1 = { string = џ } +transliteration.gajica.4.0 = { D[žŽ] } +transliteration.gajica.4.1 = { string = Џ } +transliteration.gajica.5.0 = { ([abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ]) } +transliteration.gajica.5.1 = { string = {1|abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ|абвгдђежзијклмнопрстћуфхцчшАБВГДЂЕЖЗИЈКЛМНОПРСТЋУФХЦЧШ} } diff --git a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr.ini b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr.ini index 2db4f5a5a8e..c0e4f1d9128 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/sr/babel-sr.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.3 -date = 2020-06-30 +version = 1.4 +date = 2021-04-24 name.local = српски name.english = Serbian name.babel = serbian @@ -185,3 +185,16 @@ superscriptingExponent = × [counters] lower = а б в г д ђ е ж з и ј к л љ м н њ о п р с т ћ у ф х ц ч џ ш upper = А Б В Г Д Ђ Е Ж З И Ј К Л Љ М Н Њ О П Р С Т Ћ У Ф Х Ц Ч Џ Ш + +[transforms.prehyphenation] +; With implicit remove's, in 1-4 as x.2 +transliteration.gajica.1.0 = { ([ln])j } +transliteration.gajica.1.1 = { string = {1|ln|љњ} } +transliteration.gajica.2.0 = { ([LN])[jJ] } +transliteration.gajica.2.1 = { string = {1|LN|ЉЉ} } +transliteration.gajica.3.0 = { dž } +transliteration.gajica.3.1 = { string = џ } +transliteration.gajica.4.0 = { D[žŽ] } +transliteration.gajica.4.1 = { string = Џ } +transliteration.gajica.5.0 = { ([abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ]) } +transliteration.gajica.5.1 = { string = {1|abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ|абвгдђежзијклмнопрстћуфхцчшАБВГДЂЕЖЗИЈКЛМНОПРСТЋУФХЦЧШ} } diff --git a/Master/texmf-dist/tex/generic/babel/locale/ug/babel-uyghur.tex b/Master/texmf-dist/tex/generic/babel/locale/ug/babel-uyghur.tex index d3ee2eab655..dd71435dae2 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/ug/babel-uyghur.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/ug/babel-uyghur.tex @@ -10,6 +10,8 @@ \BabelBeforeIni{ug}{% } +\ifcase\bbl@engine\or + \newattribute\bblug@disc \bblug@disc=-1 @@ -72,4 +74,6 @@ luatexbase.add_to_callback("hpack_filter", ug.hyphenate, "Babel.locale.uyghur.hyphenate") } +\fi + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 31f874fc4c5..ef70c733ef4 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -505,7 +505,7 @@ \def\bbl@provide@intraspace{% \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else - \bbl@xin@{\bbl@cl{lnbrk}}{c}% + \bbl@xin@{/c}{/\bbl@cl{lnbrk}}% \ifin@ % cjk \bbl@cjkintraspace \directlua{ @@ -929,6 +929,10 @@ end Babel.fetch_subtext = {} + Babel.ignore_pre_char = function(node) + return (node.lang == \the\l@nohyphenation) + end + &% Merging both functions doesn't seen feasible, because there are too &% many differences. Babel.fetch_subtext[0] = function(head) @@ -952,7 +956,11 @@ end if lang == locale or lang == nil then lang = lang or locale - word_string = word_string .. unicode.utf8.char(item.char) + if Babel.ignore_pre_char(item) then + word_string = word_string .. Babel.us_char + else + word_string = word_string .. unicode.utf8.char(item.char) + end word_nodes[#word_nodes+1] = item else break diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index 6eb01e492c6..03d94c0f99d 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}[2021/04/07 3.57 Nil language] +\ProvidesLanguage{nil}[2021/04/26 3.58 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 50e63ce9ffb..9bacbb05ba1 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -52,8 +52,8 @@ \bbl@csarg\gdef{xeipn@\languagename}% {\XeTeXlinebreakpenalty #1\relax}} \def\bbl@provide@intraspace{% - \bbl@xin@{\bbl@cl{lnbrk}}{s}% - \ifin@\else\bbl@xin@{\bbl@cl{lnbrk}}{c}\fi + \bbl@xin@{/s}{/\bbl@cl{lnbrk}}% + \ifin@\else\bbl@xin@{/c}{/\bbl@cl{lnbrk}}\fi \ifin@ \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else |