[latex3-commits] [git/LaTeX3-latex3-latex2e] master: Revert "babel 3.25. Improved Thai, Lao, Khmer. Fix error with mapfont=directions." (2238ea6)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Oct 6 09:28:41 CEST 2018
Repository : https://github.com/latex3/latex2e
On branch : master
Link : https://github.com/latex3/latex2e/commit/2238ea6b4d8e173bc9d145d848dcffd940d4bb87
>---------------------------------------------------------------
commit 2238ea6b4d8e173bc9d145d848dcffd940d4bb87
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Oct 6 08:28:41 2018 +0100
Revert "babel 3.25. Improved Thai, Lao, Khmer. Fix error with mapfont=directions."
This reverts commit cad07c624488860c97221e9a462e9cefd31c85db.
>---------------------------------------------------------------
2238ea6b4d8e173bc9d145d848dcffd940d4bb87
required/babel/README.md | 8 +--
required/babel/babel.dtx | 83 ++++++------------------------
required/babel/babel.ins | 2 +-
required/babel/babel.pdf | Bin 658893 -> 658776 bytes
required/babel/bbcompat.dtx | 2 +-
required/babel/locale/km/babel-khmer.tex | 19 -------
required/babel/locale/km/babel-km.ini | 5 +-
required/babel/locale/lo/babel-lao.tex | 11 ----
required/babel/locale/lo/babel-lo.ini | 5 +-
required/babel/locale/th/babel-thai.tex | 4 +-
required/babel/samples/lua-arabic.pdf | Bin 85142 -> 85557 bytes
required/babel/samples/lua-arabic.tex | 12 +++++
required/babel/samples/lua-bidibasic.pdf | Bin 49308 -> 49310 bytes
required/babel/samples/lua-bidibasic.tex | 8 +--
required/babel/samples/lua-secenum.pdf | Bin 57618 -> 57623 bytes
required/babel/samples/lua-thai.pdf | Bin 36098 -> 36155 bytes
16 files changed, 44 insertions(+), 115 deletions(-)
diff --git a/required/babel/README.md b/required/babel/README.md
index 4b6f760..94bb78d 100644
--- a/required/babel/README.md
+++ b/required/babel/README.md
@@ -1,4 +1,4 @@
-## Babel 3.25
+## Babel 3.24
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -51,10 +51,6 @@ respective authors.
### Latest changes
```
-3.25 - Fixes for 3.23 - mapfont=direction could raise an error.
- Language and Script were not always defined correctly.
- - Improved tentative support for Thai, Lao and Khmer in both
- luatex and xetex.
3.24 - Prelimimary support for Thai interword spacing with luatex.
3.23 - After extensive tests and fixing some issues, bidi=basic is
not experimental any longer.
@@ -114,5 +110,5 @@ respective authors.
```
Javier Bezos
-2018/10/03
+2018/09/26
diff --git a/required/babel/babel.dtx b/required/babel/babel.dtx
index 5bc0f3f..49c55ac 100644
--- a/required/babel/babel.dtx
+++ b/required/babel/babel.dtx
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2018/10/03 v3.25 The Babel package]
+\ProvidesFile{babel.dtx}[2018/09/26 v3.24 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -3857,8 +3857,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.25>>
-%<<date=2018/10/03>>
+%<<version=3.24>>
+%<<date=2018/09/26>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -7739,8 +7739,6 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl at KVP@hyphenrules\@nil
\let\bbl at KVP@mapfont\@nil
\let\bbl at KVP@maparabic\@nil
- \let\bbl at KVP@intraspace\@nil
- \let\bbl at KVP@intrapenalty\@nil
\bbl at forkv{#1}{\bbl at csarg\def{KVP@##1}{##2}}% TODO - error handling
\ifx\bbl at KVP@import\@nil\else
\bbl at exp{\\\bbl at ifblank{\bbl at KVP@import}}%
@@ -7772,14 +7770,12 @@ help from Bernd Raichle, for which I am grateful.
\\\foreignlanguage{\languagename}%
{####1}}}}%
{}%
- % To override script and language names
\ifx\bbl at KVP@script\@nil\else
\bbl at csarg\edef{sname@#2}{\bbl at KVP@script}%
\fi
\ifx\bbl at KVP@language\@nil\else
\bbl at csarg\edef{lname@#2}{\bbl at KVP@language}%
\fi
- % For bidi texts, to switch the language based on direction
\ifx\bbl at KVP@mapfont\@nil\else
\bbl at ifsamestring{\bbl at KVP@mapfont}{direction}{}%
{\bbl at error{Option `\bbl at KVP@mapfont' unknown for\\%
@@ -7795,16 +7791,13 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl at mapselect\relax
\edef\bbl at prefontid{\fontid\font}}%
\def\bbl at mapdir##1{%
- {\def\languagename{##1}%
- \let\bbl at ifrestoring\@firstoftwo % avoid font warning
- \bbl at switchfont
+ {\def\languagename{##1}\bbl at switchfont
\directlua{Babel.fontmap
[\the\csname bbl at wdir@##1\endcsname]%
[\bbl at prefontid]=\fontid\font}}}%
\fi
\bbl at exp{\\\bbl at add\\\bbl at mapselect{\\\bbl at mapdir{\languagename}}}%
\fi
- % For Southeast Asian, if interspace in ini
\ifcase\bbl at engine\or
\bbl at ifunset{bbl at intsp@\languagename}{}%
{\expandafter\ifx\csname bbl at intsp@\languagename\endcsname\@empty\else
@@ -7830,30 +7823,8 @@ help from Bernd Raichle, for which I am grateful.
\expandafter\bbl at intrapenalty\bbl at KVP@intrapenalty\@@
\fi}%
\or
- \bbl at ifunset{bbl at intsp@\languagename}{}%
- {\expandafter\ifx\csname bbl at intsp@\languagename\endcsname\@empty\else
- \ifx\bbl at KVP@intraspace\@nil
- \bbl at exp{%
- \\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
- \fi
- \ifx\bbl at KVP@intrapenalty\@nil
- \bbl at intrapenalty0\@@
- \fi
- \fi
- \ifx\bbl at KVP@intraspace\@nil\else % We may override the ini
- \expandafter\bbl at intraspace\bbl at KVP@intraspace\@@
- \fi
- \ifx\bbl at KVP@intrapenalty\@nil\else
- \expandafter\bbl at intrapenalty\bbl at KVP@intrapenalty\@@
- \fi
- \ifx\bbl at ispacesize\@undefined
- \AtBeginDocument{%
- \expandafter\bbl at add
- \csname selectfont \endcsname{\bbl at ispacesize}}%
- \def\bbl at ispacesize{\bbl at cs{xeisp@\bbl at cs{sbcp@\languagename}}}%
- \fi}%
+ %% TODO - xetex
\fi
- % Native digits, if provided in ini
\ifcase\bbl at engine\else
\bbl at ifunset{bbl at dgnat@\languagename}{}%
{\expandafter\ifx\csname bbl at dgnat@\languagename\endcsname\@empty\else
@@ -7870,7 +7841,6 @@ help from Bernd Raichle, for which I am grateful.
\fi
\fi}%
\fi
- % To load or reaload the babel-*.tex, if require.babel in ini
\bbl at ifunset{bbl at rqtex@\languagename}{}%
{\expandafter\ifx\csname bbl at rqtex@\languagename\endcsname\@empty\else
\let\BabelBeforeIni\@gobbletwo
@@ -7881,13 +7851,6 @@ help from Bernd Raichle, for which I am grateful.
\let\atcatcode\relax
\fi}%
\let\languagename\bbl at savelangname}
-% \end{macrocode}
-%
-% A tool to define the macros for native digits from the list provided
-% in the |ini| file. Somewhat convoluted because there are 10 digits,
-% but only 9 arguments in \TeX.
-%
-% \begin{macrocode}
\def\bbl at setdigits#1#2#3#4#5{%
\bbl at exp{%
\def\<\languagename digits>####1{% ie, \langdigits
@@ -8254,7 +8217,13 @@ help from Bernd Raichle, for which I am grateful.
\bbl at csarg\bbl at add@list{lsys@#1}{Script=\bbl at cs{sname@#1}}%
\bbl at ifunset{bbl at lname@#1}{}%
{\bbl at csarg\bbl at add@list{lsys@#1}{Language=\bbl at cs{lname@#1}}}%
- \bbl at csarg\bbl at toglobal{lsys@#1}}
+ \bbl at csarg\bbl at toglobal{lsys@#1}%
+ \bbl at exp{% TODO - should be global, but even local does its job
+ % I'm still not sure -- must investigate
+ \<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl at cs{sname@#1}}%
+ {\\\newfontscript{\bbl at cs{sname@#1}}{\bbl at cs{sotf@#1}}}%
+ \<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl at cs{lname@#1}}%
+ {\\\newfontlanguage{\bbl at cs{lname@#1}}{\bbl at cs{lotf@#1}}}}}
% \end{macrocode}
%
% The following |ini| reader ignores everything but the
@@ -10710,11 +10679,10 @@ help from Bernd Raichle, for which I am grateful.
\ifx\fontspec\@undefined
\usepackage{fontspec}%
\fi
- \EnableBabelHook{babel-fontspec}% Just calls \bbl at switchfont
+ \EnableBabelHook{babel-fontspec}%
\bbl at bblfont}
\newcommand\bbl at bblfont[2][]{% 1=features 2=fontname
\bbl at ifunset{\bbl at tempb family}{\bbl at providefam{\bbl at tempb}}{}%
- % For the default font, just in case:
\bbl at ifunset{bbl at lsys@\languagename}{\bbl at provide@lsys{\languagename}}{}%
\expandafter\bbl at ifblank\expandafter{\bbl at tempa}%
{\bbl at csarg\edef{\bbl at tempb dflt@}{<>{#1}{#2}}% save bbl at rmdflt@
@@ -10763,9 +10731,8 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl at tempa{%
\bbl at warning{The current font is not a standard family:\\%
\fontname\font\\%
- Script and Language are not applied. Consider\\%
- defining a new family with \string\babelfont.\\%
- Reported}}%
+ Script and Language are not applied. Consider defining a\\%
+ new family with \string\babelfont. Reported}}%
\bbl at foreach\bbl at font@fams{% don't gather with prev for
\bbl at ifunset{bbl@##1dflt@\languagename}%
{\bbl at cs{famrst@##1}%
@@ -10799,18 +10766,8 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl at fontspec@set#1#2#3{% eg \bbl at rmdflt@lang fnt-opt fnt-nme
\let\bbl at tempe\bbl at mapselect
\let\bbl at mapselect\relax
- \bbl at exp{% TODO - should be global, but even local does its job
- % I'm still not sure -- must investigate
- \<keys_if_exist:nnF>{fontspec-opentype}%
- {Script/\bbl at cs{sname@\languagename}}%
- {\\\newfontscript{\bbl at cs{sname@\languagename}}%
- {\bbl at cs{sotf@\languagename}}}%
- \<keys_if_exist:nnF>{fontspec-opentype}%
- {Language/\bbl at cs{lname@\languagename}}%
- {\\\newfontlanguage{\bbl at cs{lname@\languagename}}%
- {\bbl at cs{lotf@\languagename}}}%
- \<fontspec_set_family:Nnn>\\#1%
- {\bbl at cs{lsys@\languagename},#2}}{#3}% ie \bbl at exp{..}{#3}
+ \bbl at exp{\<fontspec_set_family:Nnn>\\#1%
+ {\bbl at cs{lsys@\languagename},#2}}{#3}%
\let\bbl at mapselect\bbl at tempe
\bbl at toglobal#1}%
% \end{macrocode}
@@ -11004,12 +10961,6 @@ help from Bernd Raichle, for which I am grateful.
\AddBabelHook{xetex}{stopcommands}{%
\xebbl at stop
\let\xebbl at stop\relax}
-\def\bbl at intraspace#1 #2 #3\@@{%
- \bbl at csarg\gdef{xeisp@\bbl at cs{sbcp@\languagename}}%
- {\XeTeXlinebreakskip #1em plus #2em minus #3em\relax}}
-\def\bbl at intrapenalty#1\@@{%
- \bbl at csarg\gdef{xeipn@\bbl at cs{sbcp@\languagename}}%
- {\XeTeXlinebreakpenalty #1\relax}}
\AddBabelHook{xetex}{loadkernel}{%
<@Restore Unicode catcodes before loading patterns@>}
\ifx\DisableBabelHook\@undefined\endinput\fi
diff --git a/required/babel/babel.ins b/required/babel/babel.ins
index c166c12..01cfbb6 100644
--- a/required/babel/babel.ins
+++ b/required/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{2018/10/03}
+\def\filedate{2018/09/26}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/required/babel/babel.pdf b/required/babel/babel.pdf
index a3923e4..6ca3918 100644
Binary files a/required/babel/babel.pdf and b/required/babel/babel.pdf differ
diff --git a/required/babel/bbcompat.dtx b/required/babel/bbcompat.dtx
index b5a5ca8..4f65cc2 100644
--- a/required/babel/bbcompat.dtx
+++ b/required/babel/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2018/10/03 v3.25]
+\ProvidesFile{bbcompat.dtx}[2018/09/26 v3.24]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/required/babel/locale/km/babel-khmer.tex b/required/babel/locale/km/babel-khmer.tex
index 5c4dbb8..f8cf086 100644
--- a/required/babel/locale/km/babel-khmer.tex
+++ b/required/babel/locale/km/babel-khmer.tex
@@ -9,23 +9,4 @@
\fi
\BabelBeforeIni{km}{%
}
-
-\addto\datekhmer{%
- \babel at save\BabelDated
- \def\BabelDated#1{{\expandafter\khmerdigits\expandafter{#1}}}%
- \babel at save\BabelDatey
- \def\BabelDatey#1{{\expandafter\khmerdigits\expandafter{#1}}}}
-
-\ifcase\bbl at engine\or\or
- \bbl at tentative{khmer}%
- \bbl at add\extraskhmer{%
- \XeTeXlinebreaklocale "kh"
- \bbl at xeisp@Khmr
- \bbl at xeipn@Khmr
- }
- \bbl at add\noextraskhmer{%
- \XeTeXlinebreaklocale "en"
- }
-\fi
-
\endinput
\ No newline at end of file
diff --git a/required/babel/locale/km/babel-km.ini b/required/babel/locale/km/babel-km.ini
index e1982e2..701fe38 100644
--- a/required/babel/locale/km/babel-km.ini
+++ b/required/babel/locale/km/babel-km.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.3
-date = 2018-10-02
+version = 1.2
+date = 2018-09-07
name.local = ខ្មែរ
name.english = Khmer
name.babel = khmer
@@ -24,7 +24,6 @@ script.tag.opentype = khmr
level = 1
encodings =
derivate = no
-require.babel = khmer
[captions]
preface = អារម្ភកថា
diff --git a/required/babel/locale/lo/babel-lao.tex b/required/babel/locale/lo/babel-lao.tex
index 1783501..d2d995f 100644
--- a/required/babel/locale/lo/babel-lao.tex
+++ b/required/babel/locale/lo/babel-lao.tex
@@ -9,15 +9,4 @@
\fi
\BabelBeforeIni{lo}{%
}
-
-\ifcase\bbl at engine\or\or
- \bbl at tentative{lao}%
- \addto\extraslao{%
- \XeTeXlinebreaklocale "lo"
- \bbl at xeisp@Laoo
- \bbl at xeipn@Laoo}
- \addto\noextraslao{%
- \XeTeXlinebreaklocale "en"}
-\fi
-
\endinput
\ No newline at end of file
diff --git a/required/babel/locale/lo/babel-lo.ini b/required/babel/locale/lo/babel-lo.ini
index 885852c..255e260 100644
--- a/required/babel/locale/lo/babel-lo.ini
+++ b/required/babel/locale/lo/babel-lo.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.3
-date = 2018-10-02
+version = 1.2
+date = 2018-09-07
name.local = ລາວ
name.english = Lao
name.babel = lao
@@ -24,7 +24,6 @@ script.tag.opentype = lao
level = 1
encodings =
derivate = no
-require.babel = lao
[captions]
preface = ຄໍານໍາ
diff --git a/required/babel/locale/th/babel-thai.tex b/required/babel/locale/th/babel-thai.tex
index c3a6b8c..994b33f 100644
--- a/required/babel/locale/th/babel-thai.tex
+++ b/required/babel/locale/th/babel-thai.tex
@@ -16,10 +16,10 @@
\ifcase\bbl at engine\or\or
\bbl at tentative{thai}%
+ % \XeTeXlinebreakskip should be reset with \fontsize
\addto\extrasthai{%
\XeTeXlinebreaklocale "th"
- \bbl at xeisp@Thai
- \bbl at xeipn@Thai}
+ \XeTeXlinebreakskip 0em plus .1em}
\addto\noextrasthai{%
\XeTeXlinebreaklocale "en"}
\fi
diff --git a/required/babel/samples/lua-arabic.pdf b/required/babel/samples/lua-arabic.pdf
index ad77365..7cc4f0f 100644
Binary files a/required/babel/samples/lua-arabic.pdf and b/required/babel/samples/lua-arabic.pdf differ
diff --git a/required/babel/samples/lua-arabic.tex b/required/babel/samples/lua-arabic.tex
index e9dd838..c066af8 100644
--- a/required/babel/samples/lua-arabic.tex
+++ b/required/babel/samples/lua-arabic.tex
@@ -19,6 +19,11 @@
\usepackage{multicol}
\usepackage{booktabs}
+% The following package provides a few workarounds for a bug in the
+% lua font loader, which sometimes inserts kerns at the wrong place.
+% It's just a workaround, so it's only available on GitHub.
+\usepackage{fixarabkerns}
+
\title{كهرباء}
\author{From Wikipedia\\%
Typeset with \textsf{babel}
@@ -70,6 +75,13 @@
استخدام الطاقة الكهربائية، ويمكن التكهن بأن الاعتماد على الطاقة
الكهربائية سيستمر في المستقبل.
+\bigskip
+
+\foreignlanguage*{english}{Below, in red, a couple of words
+incorrectly rendered by default in the corrent font. It seems a bug in
+the font loader, and a workaround is used in this document (see the
+source).}
+
\mainmatter
\chapter{نظرة عامة}
diff --git a/required/babel/samples/lua-bidibasic.pdf b/required/babel/samples/lua-bidibasic.pdf
index 94dda04..e2ef5e3 100644
Binary files a/required/babel/samples/lua-bidibasic.pdf and b/required/babel/samples/lua-bidibasic.pdf differ
diff --git a/required/babel/samples/lua-bidibasic.tex b/required/babel/samples/lua-bidibasic.tex
index b4085ac..14cb685 100644
--- a/required/babel/samples/lua-bidibasic.tex
+++ b/required/babel/samples/lua-bidibasic.tex
@@ -6,10 +6,12 @@
\usepackage[spanish, english, bidi=basic]{babel}
-% \babelprovide[mapfont=direction]{english}
-\babelprovide[import,mapfont=direction]{arabic}
+% Define two new languages:
+
+% \babelprovide[mapfont=direction]{english} %
+\babelprovide[import=ar,mapfont=direction]{arabic}
\babelprovide[import=fa]{farsi}
-\babelprovide[import,mapfont=direction]{hebrew}
+\babelprovide[import=he,mapfont=direction]{hebrew}
\babelfont{rm}{Crimson}
\babelfont[*arabic]{rm}
diff --git a/required/babel/samples/lua-secenum.pdf b/required/babel/samples/lua-secenum.pdf
index 42eec82..ea40b57 100644
Binary files a/required/babel/samples/lua-secenum.pdf and b/required/babel/samples/lua-secenum.pdf differ
diff --git a/required/babel/samples/lua-thai.pdf b/required/babel/samples/lua-thai.pdf
index 9bc973d..37f7797 100644
Binary files a/required/babel/samples/lua-thai.pdf and b/required/babel/samples/lua-thai.pdf differ
More information about the latex3-commits
mailing list