summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/babel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-03 22:45:31 +0000
committerKarl Berry <karl@freefriends.org>2018-10-03 22:45:31 +0000
commit6b428e6cd33a420b0df0915e9ac45f66786c3099 (patch)
treecd9dd8952bae469cc215d21ac717baad839d0f61 /Master/texmf-dist/source/latex/babel
parentbc810e6340a36baa5a2918ed256a605f54f04811 (diff)
babel (3oct18)
git-svn-id: svn://tug.org/texlive/trunk@48825 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/babel')
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.dtx83
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.ins2
-rw-r--r--Master/texmf-dist/source/latex/babel/bbcompat.dtx2
-rw-r--r--Master/texmf-dist/source/latex/babel/locale.zipbin704323 -> 704563 bytes
4 files changed, 68 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx
index 49c55ac35ea..5bc0f3f699e 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}[2018/09/26 v3.24 The Babel package]
+\ProvidesFile{babel.dtx}[2018/10/03 v3.25 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.24>>
-%<<date=2018/09/26>>
+%<<version=3.25>>
+%<<date=2018/10/03>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -7739,6 +7739,8 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@KVP@hyphenrules\@nil
\let\bbl@KVP@mapfont\@nil
\let\bbl@KVP@maparabic\@nil
+ \let\bbl@KVP@intraspace\@nil
+ \let\bbl@KVP@intrapenalty\@nil
\bbl@forkv{#1}{\bbl@csarg\def{KVP@##1}{##2}}% TODO - error handling
\ifx\bbl@KVP@import\@nil\else
\bbl@exp{\\\bbl@ifblank{\bbl@KVP@import}}%
@@ -7770,12 +7772,14 @@ help from Bernd Raichle, for which I am grateful.
\\\foreignlanguage{\languagename}%
{####1}}}}%
{}%
+ % To override script and language names
\ifx\bbl@KVP@script\@nil\else
\bbl@csarg\edef{sname@#2}{\bbl@KVP@script}%
\fi
\ifx\bbl@KVP@language\@nil\else
\bbl@csarg\edef{lname@#2}{\bbl@KVP@language}%
\fi
+ % For bidi texts, to switch the language based on direction
\ifx\bbl@KVP@mapfont\@nil\else
\bbl@ifsamestring{\bbl@KVP@mapfont}{direction}{}%
{\bbl@error{Option `\bbl@KVP@mapfont' unknown for\\%
@@ -7791,13 +7795,16 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@mapselect\relax
\edef\bbl@prefontid{\fontid\font}}%
\def\bbl@mapdir##1{%
- {\def\languagename{##1}\bbl@switchfont
+ {\def\languagename{##1}%
+ \let\bbl@ifrestoring\@firstoftwo % avoid font warning
+ \bbl@switchfont
\directlua{Babel.fontmap
[\the\csname bbl@wdir@##1\endcsname]%
[\bbl@prefontid]=\fontid\font}}}%
\fi
\bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}%
\fi
+ % For Southeast Asian, if interspace in ini
\ifcase\bbl@engine\or
\bbl@ifunset{bbl@intsp@\languagename}{}%
{\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else
@@ -7823,8 +7830,30 @@ help from Bernd Raichle, for which I am grateful.
\expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
\fi}%
\or
- %% TODO - xetex
+ \bbl@ifunset{bbl@intsp@\languagename}{}%
+ {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else
+ \ifx\bbl@KVP@intraspace\@nil
+ \bbl@exp{%
+ \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
+ \fi
+ \ifx\bbl@KVP@intrapenalty\@nil
+ \bbl@intrapenalty0\@@
+ \fi
+ \fi
+ \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini
+ \expandafter\bbl@intraspace\bbl@KVP@intraspace\@@
+ \fi
+ \ifx\bbl@KVP@intrapenalty\@nil\else
+ \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
+ \fi
+ \ifx\bbl@ispacesize\@undefined
+ \AtBeginDocument{%
+ \expandafter\bbl@add
+ \csname selectfont \endcsname{\bbl@ispacesize}}%
+ \def\bbl@ispacesize{\bbl@cs{xeisp@\bbl@cs{sbcp@\languagename}}}%
+ \fi}%
\fi
+ % Native digits, if provided in ini
\ifcase\bbl@engine\else
\bbl@ifunset{bbl@dgnat@\languagename}{}%
{\expandafter\ifx\csname bbl@dgnat@\languagename\endcsname\@empty\else
@@ -7841,6 +7870,7 @@ 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@ifunset{bbl@rqtex@\languagename}{}%
{\expandafter\ifx\csname bbl@rqtex@\languagename\endcsname\@empty\else
\let\BabelBeforeIni\@gobbletwo
@@ -7851,6 +7881,13 @@ help from Bernd Raichle, for which I am grateful.
\let\atcatcode\relax
\fi}%
\let\languagename\bbl@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@setdigits#1#2#3#4#5{%
\bbl@exp{%
\def\<\languagename digits>####1{% ie, \langdigits
@@ -8217,13 +8254,7 @@ help from Bernd Raichle, for which I am grateful.
\bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}%
\bbl@ifunset{bbl@lname@#1}{}%
{\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}%
- \bbl@csarg\bbl@toglobal{lsys@#1}%
- \bbl@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@cs{sname@#1}}%
- {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}%
- \<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl@cs{lname@#1}}%
- {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}}
+ \bbl@csarg\bbl@toglobal{lsys@#1}}
% \end{macrocode}
%
% The following |ini| reader ignores everything but the
@@ -10679,10 +10710,11 @@ help from Bernd Raichle, for which I am grateful.
\ifx\fontspec\@undefined
\usepackage{fontspec}%
\fi
- \EnableBabelHook{babel-fontspec}%
+ \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont
\bbl@bblfont}
\newcommand\bbl@bblfont[2][]{% 1=features 2=fontname
\bbl@ifunset{\bbl@tempb family}{\bbl@providefam{\bbl@tempb}}{}%
+ % For the default font, just in case:
\bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}%
\expandafter\bbl@ifblank\expandafter{\bbl@tempa}%
{\bbl@csarg\edef{\bbl@tempb dflt@}{<>{#1}{#2}}% save bbl@rmdflt@
@@ -10731,8 +10763,9 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl@tempa{%
\bbl@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@foreach\bbl@font@fams{% don't gather with prev for
\bbl@ifunset{bbl@##1dflt@\languagename}%
{\bbl@cs{famrst@##1}%
@@ -10766,8 +10799,18 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl@fontspec@set#1#2#3{% eg \bbl@rmdflt@lang fnt-opt fnt-nme
\let\bbl@tempe\bbl@mapselect
\let\bbl@mapselect\relax
- \bbl@exp{\<fontspec_set_family:Nnn>\\#1%
- {\bbl@cs{lsys@\languagename},#2}}{#3}%
+ \bbl@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@cs{sname@\languagename}}%
+ {\\\newfontscript{\bbl@cs{sname@\languagename}}%
+ {\bbl@cs{sotf@\languagename}}}%
+ \<keys_if_exist:nnF>{fontspec-opentype}%
+ {Language/\bbl@cs{lname@\languagename}}%
+ {\\\newfontlanguage{\bbl@cs{lname@\languagename}}%
+ {\bbl@cs{lotf@\languagename}}}%
+ \<fontspec_set_family:Nnn>\\#1%
+ {\bbl@cs{lsys@\languagename},#2}}{#3}% ie \bbl@exp{..}{#3}
\let\bbl@mapselect\bbl@tempe
\bbl@toglobal#1}%
% \end{macrocode}
@@ -10961,6 +11004,12 @@ help from Bernd Raichle, for which I am grateful.
\AddBabelHook{xetex}{stopcommands}{%
\xebbl@stop
\let\xebbl@stop\relax}
+\def\bbl@intraspace#1 #2 #3\@@{%
+ \bbl@csarg\gdef{xeisp@\bbl@cs{sbcp@\languagename}}%
+ {\XeTeXlinebreakskip #1em plus #2em minus #3em\relax}}
+\def\bbl@intrapenalty#1\@@{%
+ \bbl@csarg\gdef{xeipn@\bbl@cs{sbcp@\languagename}}%
+ {\XeTeXlinebreakpenalty #1\relax}}
\AddBabelHook{xetex}{loadkernel}{%
<@Restore Unicode catcodes before loading patterns@>}
\ifx\DisableBabelHook\@undefined\endinput\fi
diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins
index 01cfbb699dc..c166c12e3a8 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{2018/09/26}
+\def\filedate{2018/10/03}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx
index 4f65cc2649b..b5a5ca8fe69 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}[2018/09/26 v3.24]
+\ProvidesFile{bbcompat.dtx}[2018/10/03 v3.25]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip
index 3b8dfbe0592..ca8bd9c4107 100644
--- a/Master/texmf-dist/source/latex/babel/locale.zip
+++ b/Master/texmf-dist/source/latex/babel/locale.zip
Binary files differ