summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.def6
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.sty38
-rw-r--r--Master/texmf-dist/tex/generic/babel/hyphen.cfg6
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/fa/babel-farsi.tex (renamed from Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex)2
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/la/babel-classicallatin.tex25
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/la/babel-ecclesiasticallatin.tex17
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-classic.ini10
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-ecclesia.ini10
-rw-r--r--Master/texmf-dist/tex/generic/babel/locale/la/babel-medievallatin.tex6
-rw-r--r--Master/texmf-dist/tex/generic/babel/luababel.def40
-rw-r--r--Master/texmf-dist/tex/generic/babel/nil.ldf2
-rw-r--r--Master/texmf-dist/tex/generic/babel/txtbabel.def2
-rw-r--r--Master/texmf-dist/tex/generic/babel/xebabel.def2
13 files changed, 120 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def
index a53d418a451..a7c6c21f5c3 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}[2023/05/11 v3.89 Babel common definitions]
+\ProvidesFile{babel.def}[2023/06/26 v3.90 Babel common definitions]
\ifx\AtBeginDocument\@undefined % TODO. change test.
\def\@empty{}
\def\loadlocalcfg#1{%
@@ -595,8 +595,8 @@
\toks@\expandafter{\bbl@tempc#3}%
\expandafter\edef\csname extras\languagename\endcsname{\the\toks@}%
\fi}
-\def\bbl@version{3.89}
-\def\bbl@date{2023/05/11}
+\def\bbl@version{3.90}
+\def\bbl@date{2023/06/26}
\ifx\language\@undefined
\csname newcount\endcsname\language
\fi
diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty
index eab6b9801f0..2f1039ca17e 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}[2023/05/11 v3.89 The Babel package]
+\ProvidesPackage{babel}[2023/06/26 v3.90 The Babel package]
\@ifpackagewith{babel}{debug}
{\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}%
\let\bbl@debug\@firstofone
@@ -470,8 +470,8 @@
\expandafter\@secondoftwo
\fi}
\fi
-\def\bbl@version{3.89}
-\def\bbl@date{2023/05/11}
+\def\bbl@version{3.90}
+\def\bbl@date{2023/06/26}
\ifx\language\@undefined
\csname newcount\endcsname\language
\fi
@@ -1190,12 +1190,13 @@
\string\providecommand\string\babel@aux[2]{}}%
\immediate\write\@mainaux{\string\@nameuse{bbl@beforestart}}%
\fi
- \expandafter\selectlanguage\expandafter{\bbl@main@language}%
\ifbbl@single % must go after the line above.
\renewcommand\selectlanguage[1]{}%
\renewcommand\foreignlanguage[2]{#2}%
\global\let\babel@aux\@gobbletwo % Also as flag
\fi}
+\AddToHook{begindocument/before}{%
+ \expandafter\selectlanguage\expandafter{\bbl@main@language}}
\ifcase\bbl@engine\or
\AtBeginDocument{\pagedir\bodydir} % TODO - a better place
\fi
@@ -2592,9 +2593,10 @@
\let\\\@Alph\<bbl@cntr@\bbl@KVP@Alph @\languagename>}}%
\fi
% == Casing ==
- \bbl@exp{\def\<bbl@casing@\languagename>%
- {\<bbl@lbcp@\languagename>%
- \ifx\bbl@KVP@casing\@nnil\else-x-\bbl@KVP@casing\fi}}%
+ \ifx\bbl@KVP@casing\@nnil\else
+ \bbl@csarg\xdef{casing@\languagename}%
+ {\@nameuse{bbl@casing@\languagename}-x-\bbl@KVP@casing}%
+ \fi
% == Calendars ==
\ifx\bbl@KVP@calendar\@nnil
\edef\bbl@KVP@calendar{\bbl@cl{calpr}}%
@@ -2962,9 +2964,9 @@
\bbl@exp{\\\bbl@exportkey{lname}{identification.name.opentype}%
{\csname bbl@elname@\languagename\endcsname}}%
\bbl@exportkey{tbcp}{identification.tag.bcp47}{}%
- \bbl@exportkey{lbcp}{identification.language.tag.bcp47}{}%
% Somewhat hackish. TODO
- \bbl@exportkey{casing}{identification.language.tag.bcp47}{}%
+ \bbl@exportkey{casing}{identification.tag.bcp47}{}%
+ \bbl@exportkey{lbcp}{identification.language.tag.bcp47}{}%
\bbl@exportkey{lotf}{identification.tag.opentype}{dflt}%
\bbl@exportkey{esname}{identification.script.name}{}%
\bbl@exp{\\\bbl@exportkey{sname}{identification.script.name.opentype}%
@@ -3505,6 +3507,16 @@
{\bbl@cs{\csname bbl@info@#1.tag.bcp47\endcsname @#2}}}}
\fi
\@namedef{bbl@info@casing.tag.bcp47}{casing}
+\newcommand\BabelUppercaseMapping[3]{%
+ \let\bbl@tempx\languagename
+ \edef\languagename{#1}%
+ \DeclareUppercaseMapping[\BCPdata{casing}]{#2}{#3}%
+ \let\languagename\bbl@tempx}
+\newcommand\BabelLowercaseMapping[3]{%
+ \let\bbl@tempx\languagename
+ \edef\languagename{#1}%
+ \DeclareLowercaseMapping[\BCPdata{casing}]{#2}{#3}%
+ \let\languagename\bbl@tempx}
\let\bbl@ensureinfo\@gobble
\newcommand\BabelEnsureInfo{%
\ifx\InputIfFileExists\@undefined\else
@@ -3924,7 +3936,7 @@
\bbl@trace{Loading basic (internal) bidi support}
\ifodd\bbl@engine
\else % TODO. Move to txtbabel
- \ifnum\bbl@bidimode>100 \ifnum\bbl@bidimode<200
+ \ifnum\bbl@bidimode>100 \ifnum\bbl@bidimode<200 % Any xe+lua bidi=
\bbl@error
{The bidi method 'basic' is available only in\\%
luatex. I'll continue with 'bidi=default', so\\%
@@ -3942,7 +3954,7 @@
\bbl@loadfontspec % bidi needs fontspec
\usepackage#1{bidi}}%
\fi}
- \ifnum\bbl@bidimode>200
+ \ifnum\bbl@bidimode>200 % Any xe bidi=
\ifcase\expandafter\@gobbletwo\the\bbl@bidimode\or
\bbl@tentative{bidi=bidi}
\bbl@loadxebidi{}
@@ -3953,7 +3965,7 @@
\fi
\fi
\fi
-\ifnum\bbl@bidimode=\@ne
+\ifnum\bbl@bidimode=\@ne % Any bidi= except default=1
\let\bbl@beforeforeign\leavevmode
\ifodd\bbl@engine
\newattribute\bbl@attr@dir
@@ -4065,7 +4077,7 @@
\newtoks\everypar
\everypar=\bbl@severypar
\bbl@severypar{\bbl@xeeverypar\the\everypar}}
- \ifnum\bbl@bidimode>200
+ \ifnum\bbl@bidimode>200 % Any xe bidi=
\let\bbl@textdir@i\@gobbletwo
\let\bbl@xebidipar\@empty
\AddBabelHook{bidi}{foreign}{%
diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
index b0065196815..32a8f575635 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}[2023/05/11 v3.89 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2023/06/26 v3.90 Babel hyphens]
\xdef\bbl@format{\jobname}
-\def\bbl@version{3.89}
-\def\bbl@date{2023/05/11}
+\def\bbl@version{3.90}
+\def\bbl@date{2023/06/26}
\ifx\AtBeginDocument\@undefined
\def\@empty{}
\fi
diff --git a/Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex b/Master/texmf-dist/tex/generic/babel/locale/fa/babel-farsi.tex
index c70723f8f88..3ce50150ee6 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/vi/babel-vietnam.tex
+++ b/Master/texmf-dist/tex/generic/babel/locale/fa/babel-farsi.tex
@@ -7,6 +7,6 @@
{Just use babel as documented.}%
\stop
\fi
-\BabelBeforeIni{vi}{%
+\BabelBeforeIni{fa}{%
}
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/babel/locale/la/babel-classicallatin.tex b/Master/texmf-dist/tex/generic/babel/locale/la/babel-classicallatin.tex
new file mode 100644
index 00000000000..6efe0993892
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/babel/locale/la/babel-classicallatin.tex
@@ -0,0 +1,25 @@
+\ifx\BabelBeforeIni\undefined
+ \PackageError{babel}%
+ {This file is a component of babel and cannot\MessageBreak
+ be loaded directly. I'll stop immediately}%
+ {Just use babel as documented.}%
+ \stop
+\fi
+\BabelBeforeIni{la-x-classic}{%
+}
+
+\expandafter\addto\csname date\languagename\endcsname{%
+ \babel@save\BabelDatey
+ \def\BabelDatey#1{\@Roman{#1}}%
+ \babel@save\BabelDated
+ \def\BabelDated#1{\@Roman{#1}}}
+
+\StartBabelCommands{\languagename}{}
+ \SetHyphenMap{\BabelLower{`V}{`u}}
+\EndBabelCommands
+
+% TODO. Must be defined somehow in the ini file:
+\BabelUppercaseMapping{\languagename}{`u}{V}
+\BabelLowercaseMapping{\languagename}{`v}{U}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/babel/locale/la/babel-ecclesiasticallatin.tex b/Master/texmf-dist/tex/generic/babel/locale/la/babel-ecclesiasticallatin.tex
new file mode 100644
index 00000000000..7a5eb1ff09e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/babel/locale/la/babel-ecclesiasticallatin.tex
@@ -0,0 +1,17 @@
+\ifx\BabelBeforeIni\undefined
+ \PackageError{babel}%
+ {This file is a component of babel and cannot\MessageBreak
+ be loaded directly. I'll stop immediately}%
+ {Just use babel as documented.}%
+ \stop
+\fi
+\BabelBeforeIni{la-x-ecclesia}{%
+}
+
+\expandafter\addto\csname date\languagename\endcsname{%
+ \babel@save\BabelDatey
+ \def\BabelDatey#1{\@Roman{#1}}%
+ \babel@save\BabelDated
+ \def\BabelDated#1{\@Roman{#1}}}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-classic.ini b/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-classic.ini
index ed4cc16fc1e..06a95c81ecd 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-classic.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-classic.ini
@@ -9,10 +9,10 @@
[identification]
charset = utf8
-version = 1.5
-date = 2022-07-28
-name.english = Classic Latin
-name.babel = classiclatin
+version = 1.6
+date = 2023-06-25
+name.english = Classical Latin
+name.babel = classicallatin
tag.bcp47 = la-x-classic
language.tag.bcp47 = la
tag.opentype = LAT
@@ -23,7 +23,7 @@ extension.x.tag.bcp47 = classic
level = 1
encodings = T1 OT1 LY1
derivate = no
-require.babel = classiclatin
+require.babel = classicallatin
name.polyglossia.language = latin
name.polyglossia.variant = classic
diff --git a/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-ecclesia.ini b/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-ecclesia.ini
index 133e98b38ed..9648951a71f 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-ecclesia.ini
+++ b/Master/texmf-dist/tex/generic/babel/locale/la/babel-la-x-ecclesia.ini
@@ -9,10 +9,10 @@
[identification]
charset = utf8
-version = 1.5
-date = 2022-07-28
-name.english = Ecclesiastic Latin
-name.babel = ecclesiasticlatin
+version = 1.6
+date = 2023-06-25
+name.english = Ecclesiastical Latin
+name.babel = ecclesiasticallatin
tag.bcp47 = la-x-ecclesia
language.tag.bcp47 = la
tag.opentype = LAT
@@ -23,7 +23,7 @@ extension.x.tag.bcp47 = ecclesia
level = 1
encodings = T1 OT1 LY1
derivate = no
-require.babel = ecclesiasticlatin
+require.babel = ecclesiasticallatin
name.polyglossia.language = latin
name.polyglossia.variant = ecclesiastic
diff --git a/Master/texmf-dist/tex/generic/babel/locale/la/babel-medievallatin.tex b/Master/texmf-dist/tex/generic/babel/locale/la/babel-medievallatin.tex
index b380087da95..62df5fc3039 100644
--- a/Master/texmf-dist/tex/generic/babel/locale/la/babel-medievallatin.tex
+++ b/Master/texmf-dist/tex/generic/babel/locale/la/babel-medievallatin.tex
@@ -15,11 +15,7 @@
\def\BabelDated#1{\@Roman{#1}}}
\StartBabelCommands{\languagename}{}
- \SetCase
- {\uccode`u=`V\relax}
- {\lccode`V=`u\relax}
- \SetHyphenMap{%
- \BabelLower{`V}{`u}}
+ \SetHyphenMap{\BabelLower{`V}{`u}}
\EndBabelCommands
\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 fd06001fb0b..befca370e79 100644
--- a/Master/texmf-dist/tex/generic/babel/luababel.def
+++ b/Master/texmf-dist/tex/generic/babel/luababel.def
@@ -604,8 +604,13 @@ end
\gdef\bbl@arabicjust{%
\let\bbl@arabicjust\relax
\newattribute\bblar@kashida
- \directlua{ Babel.attr_kashida = luatexbase.registernumber'bblar@kashida' }%
+ \newattribute\bblar@kashida@aux % 0, 1=tatweel, 2=diacritics
+ \directlua{% WIP
+ Babel.attr_kashida = luatexbase.registernumber'bblar@kashida'
+ Babel.attr_kashida_aux = luatexbase.registernumber'bblar@kashida@aux'
+ }%
\bblar@kashida=\z@
+ \bblar@kashida@aux=\z@
\bbl@patchfont{{\bbl@parsejalt}}%
\directlua{
Babel.arabic.elong_map = Babel.arabic.elong_map or {}
@@ -675,6 +680,7 @@ Babel.arabic.from = {}
Babel.arabic.dest = {}
Babel.arabic.justify_factor = 0.95
Babel.arabic.justify_enabled = true
+Babel.arabic.kashida_limit = -1
function Babel.arabic.justify(head)
if not Babel.arabic.justify_enabled then return head end
@@ -703,6 +709,7 @@ function Babel.arabic.justify_hlist(head, line, gc, size, pack)
local width, width_new, full, k_curr, wt_pos, goal, shift
local subst_done = false
local elong_map = Babel.arabic.elong_map
+ local cnt
local last_line
local GLYPH = node.id'glyph'
local KASHIDA = Babel.attr_kashida
@@ -775,7 +782,7 @@ function Babel.arabic.justify_hlist(head, line, gc, size, pack)
if #k_list == 0 then goto next_line end
width = node.dimensions(line.head) % The 'natural' width
- k_curr = #k_list
+ k_curr = #k_list % Traverse backwards, from the end
wt_pos = 1
while width < goal do
@@ -800,6 +807,22 @@ function Babel.arabic.justify_hlist(head, line, gc, size, pack)
end
end
+ % Limit the number of tatweel by removing them. Not very efficient,
+ % but it does the job in a quite predictable way.
+ if Babel.arabic.kashida_limit > -1 then
+ cnt = 0
+ for n in node.traverse_id(GLYPH, line.head) do
+ if n.char == 0x0640 then
+ cnt = cnt + 1
+ if cnt > Babel.arabic.kashida_limit then
+ node.remove(line.head, n)
+ end
+ else
+ cnt = 0
+ end
+ end
+ end
+
::next_line::
% Must take into account marks and ins, see luatex manual.
@@ -1368,7 +1391,8 @@ end
luatexbase.priority_in_callback('hpack_filter',
'luaotfload.node_processor') or nil)
}}
-\ifnum\bbl@bidimode>\@ne % Excludes default=1
+\breakafterdirmode=1
+\ifnum\bbl@bidimode>\@ne % Any bidi= except default=1
\let\bbl@beforeforeign\leavevmode
\AtEndOfPackage{\EnableBabelHook{babel-bidi}}
\RequirePackage{luatexbase}
@@ -1415,7 +1439,7 @@ end
\def\bbl@bodydir{\bbl@setluadir{body}\bodydir}% Used once
\def\bbl@pagedir{\bbl@setluadir{page}\pagedir}% Unused
\def\bbl@dirparastext{\pardir\the\textdir\relax}% Used once
-\ifnum\bbl@bidimode>\z@
+\ifnum\bbl@bidimode>\z@ % Any bidi=
\def\bbl@insidemath{0}%
\def\bbl@everymath{\def\bbl@insidemath{1}}
\def\bbl@everydisplay{\def\bbl@insidemath{2}}
@@ -1444,7 +1468,7 @@ end
}}%
\fi
\bbl@trace{Redefinitions for bidi layout}
-\ifnum\bbl@bidimode>\z@
+\ifnum\bbl@bidimode>\z@ % Any bidi=
\ifx\matheqdirmode\@undefined\else
\matheqdirmode\@ne % A luatex primitive
\fi
@@ -1641,7 +1665,7 @@ end
{\IfBabelLayout{notabular}%
{\chardef\bbl@tabular@mode\z@}%
{\chardef\bbl@tabular@mode\@ne}}% Mixed, with LTR cols
-\ifnum\bbl@bidimode>\@ne
+\ifnum\bbl@bidimode>\@ne % Any bidi= except default=1
\ifnum\bbl@tabular@mode=\@ne
\let\bbl@parabefore\relax
\AddToHook{para/before}{\bbl@parabefore}
@@ -1675,7 +1699,7 @@ end
{}}
\fi
\ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout
-\ifnum\bbl@bidimode>\z@
+\ifnum\bbl@bidimode>\z@ % Any bidi=
\def\bbl@nextfake#1{% non-local changes, use always inside a group!
\bbl@exp{%
\def\\\bbl@insidemath{0}%
@@ -1831,7 +1855,7 @@ end
\let\bbl@OL@p@enumiii\p@enumiii
\def\p@enumiii{\p@enumii)\theenumii(}}{}}{}
\bbl@trace{Bidi footnotes}
-\ifnum\bbl@bidimode>\z@
+\ifnum\bbl@bidimode>\z@ % Any bidi=
\def\bbl@footnote#1#2#3{%
\@ifnextchar[%
{\bbl@footnote@o{#1}{#2}{#3}}%
diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf
index 5fd7a3c3c83..649697de626 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}[2023/05/11 v3.89 Nil language]
+\ProvidesLanguage{nil}[2023/06/26 v3.90 Nil language]
\LdfInit{nil}{datenil}
\ifx\l@nil\@undefined
\newlanguage\l@nil
diff --git a/Master/texmf-dist/tex/generic/babel/txtbabel.def b/Master/texmf-dist/tex/generic/babel/txtbabel.def
index 318e37fb3cc..ca49e167a95 100644
--- a/Master/texmf-dist/tex/generic/babel/txtbabel.def
+++ b/Master/texmf-dist/tex/generic/babel/txtbabel.def
@@ -95,7 +95,7 @@
\hskip\columnwidth}}}%
{}
\bbl@trace{Bidi footnotes}
-\ifnum\bbl@bidimode>\z@
+\ifnum\bbl@bidimode>\z@ % Any bidi=
\def\bbl@footnote#1#2#3{%
\@ifnextchar[%
{\bbl@footnote@o{#1}{#2}{#3}}%
diff --git a/Master/texmf-dist/tex/generic/babel/xebabel.def b/Master/texmf-dist/tex/generic/babel/xebabel.def
index 1df90a64f56..0440b07c18d 100644
--- a/Master/texmf-dist/tex/generic/babel/xebabel.def
+++ b/Master/texmf-dist/tex/generic/babel/xebabel.def
@@ -323,7 +323,7 @@
\hskip\columnwidth}}}%
{}
\bbl@trace{Bidi footnotes}
-\ifnum\bbl@bidimode>\z@
+\ifnum\bbl@bidimode>\z@ % Any bidi=
\def\bbl@footnote#1#2#3{%
\@ifnextchar[%
{\bbl@footnote@o{#1}{#2}{#3}}%