summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/babel/README.md14
-rw-r--r--Master/texmf-dist/doc/latex/babel/babel.pdfbin659983 -> 647876 bytes
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.dtx174
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.ins4
-rw-r--r--Master/texmf-dist/source/latex/babel/babel20180419.dtx6
-rw-r--r--Master/texmf-dist/source/latex/babel/bbcompat.dtx2
-rw-r--r--Master/texmf-dist/source/latex/babel/locale.zipbin695472 -> 695472 bytes
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua17
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua38
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.def46
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.sty20
-rw-r--r--Master/texmf-dist/tex/generic/babel/hyphen.cfg4
-rw-r--r--Master/texmf-dist/tex/generic/babel/nil.ldf2
-rw-r--r--Master/texmf-dist/tex/generic/babel/switch.def6
14 files changed, 234 insertions, 99 deletions
diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md
index fd28eefa1a0..26ebce5fbfa 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.19
+## Babel 3.20
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -64,6 +64,16 @@ respective authors.
### New
```
+3.20 - ini files with the field digits.native define
+ \<language>digits and \<language>counters. \arabic can be
+ redefined to use native digits.
+ - Fix - mapfont in bidi=basic didn't take into account combining
+ marks (eg, Arabic vowels).
+ - Fix - A bug introduced in 3.19, which sometimes reversed text
+ in \hbox'es.
+ - Fix for luatex 1.07 - An internal change in luatex broke
+ bidi at 'automatic' hyphens.
+ - Fix for latest latex - babel.ins raised an error.
3.19 - Most changes are for luatex:
. The main new feature is a bidi method for both implicit L in
R text, and implicit R in L text, with the possibility of
@@ -128,5 +138,5 @@ respective authors.
```
Javier Bezos
-2018/04/25
+2018/05/02
diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf
index 0f7b58cee36..84e1efd98f6 100644
--- a/Master/texmf-dist/doc/latex/babel/babel.pdf
+++ b/Master/texmf-dist/doc/latex/babel/babel.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx
index 3d4e18dab31..16acec62d46 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/04/25 v3.19 The Babel package]
+\ProvidesFile{babel.dtx}[2018/05/02 v3.20 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -260,7 +260,9 @@ addition, you may want to set the font and input encodings.
Here is a simple full example for “traditional” \TeX{} engines
(see below for \xetex{} and \luatex{}). The packages |fontenc| and
|inputenc| do not belong to \babel, but they are included in the
- example because typically you will need them:
+ example because typically you will need them (however, the package
+ \textsf{inputenc} may be omitted with \LaTeX{} $\ge$ 2018-04-01 if
+ the encoding is UTF-8):
\begin{verbatim}
\documentclass{article}
@@ -375,8 +377,9 @@ detail: |\selectlanguage| is used for blocks of text, while
|\foreignlanguage| is for chunks of text inside paragraphs.
\begin{example}
-A full bilingual document follows. The main language is |french|,
-which is activated when the document begins.
+A full bilingual document follows. The main language is |french|, which
+is activated when the document begins. The package \textsf{inputenc}
+may be omitted with \LaTeX{} $\ge$ 2018-04-01 if the encoding is UTF-8.
\begin{verbatim}
\documentclass{article}
@@ -1879,8 +1882,8 @@ sometimes necessary, but not always trivial.
\renewcommand\contentsname{Foo}%
}
\end{verbatim}
- As of 3.15, there is no need to hide spaces with \texttt{\%}
-(\babel{} removes them), but it is advisable to do it.
+As of 3.15, there is no need to hide spaces with \texttt{\%%
+} (\babel{} removes them), but it is advisable to do it.
\item The new way, which is found in |bulgarian|, |azerbaijani|,
|spanish|, |french|, |turkish|, |icelandic|, |vietnamese| and a few
more, as well as in languages created with |\babelprovide| and its
@@ -1909,7 +1912,7 @@ unselected: |\noextras|\m{lang}.
fits your needs? You may then define quickly a language with the
help of the following macro in the preamble.
-\Describe\babelprovide{\oarg{options}\marg{language-name}}
+\Describe{\babelprovide}{\oarg{options}\marg{language-name}}
Defines the internal structure of the language with some defaults: the
hyphen rules, if not available, are set to the current ones, left and
@@ -2012,9 +2015,32 @@ relevant.
|ini|-based languages).
\end{note}
+\subsection{Digits}
+
+\New{3.20} A few |ini| files define a field named |digits.native|. When
+it is present, two macros are created: |\<language>digits| and
+|\<language>counter| (only \xetex{} and \luatex{}). With the first, a
+string of ‘Latin’ digits are converted to the native digits of that
+language; the second takes a counter name as argument. With option
+|maparabic| in |\babelprovide|, |\arabic| is redefined to produce the
+native digits (this is done \textit{globally}, to avoid inconsistencies
+in, for example, page numbering).
+
+For example:
+\begin{verbatim}
+\babelprovide[import=te]{telugu} % Telugu better with XeTeX
+ % Or also, if you want:
+ % \babelprovide[import=te, maparabic]{telugu}
+\babelfont{rm}{Gautami}
+\begin{document}
+\telugudigits{1234}
+\telugucounter{section}
+\end{document}
+\end{verbatim}
+
\subsection{Getting the current language name}
-\Describe\languagename{}
+\Describe{\languagename}{}
The control sequence |\languagename| contains the name of the
current language.
@@ -2024,7 +2050,7 @@ current language.
Heiko Oberdiek.
\end{warning}
-\Describe\iflanguage{\marg{language}\marg{true}\marg{false}}
+\Describe{\iflanguage}{\marg{language}\marg{true}\marg{false}}
If more than one language is used, it might be necessary to know which
language is active at a specific time. This can be checked by a call
@@ -2042,7 +2068,7 @@ respectively.
\subsection{Hyphenation tools}
-\Describe\babelhyphen{%
+\Describe{\babelhyphen}{%
\colorbox{thegrey}{\ttfamily\hskip-.2em*\hskip-.2em}\marg{type}}
\DescribeOther\babelhyphen{%
\colorbox{thegrey}{\ttfamily\hskip-.2em*\hskip-.2em}\marg{text}}
@@ -3737,8 +3763,8 @@ help from Bernd Raichle, for which I am grateful.
% little bit of literate programming.
%
% \begin{macrocode}
-%<<version=3.19>>
-%<<date=2018/04/25>>
+%<<version=3.20>>
+%<<date=2018/05/02>>
% \end{macrocode}
%
% \section{Tools}
@@ -4205,24 +4231,6 @@ help from Bernd Raichle, for which I am grateful.
\bbl@languages
\fi
\ifodd\bbl@engine
- \def\bbl@loadbidi#1{%
- \let\bbl@beforeforeign\leavevmode
- \AtEndOfPackage{\EnableBabelHook{babel-bidi}}%
- \RequirePackage{luatexbase}%
- \directlua{
- require('babel-bidi.lua')
- require('babel-bidi-#1.lua')
- luatexbase.add_to_callback('pre_linebreak_filter',
- Babel.pre_otfload_v,
- 'Babel.pre_otfload_v',
- luatexbase.priority_in_callback('pre_linebreak_filter',
- 'luaotfload.node_processor') or nil)
- luatexbase.add_to_callback('hpack_filter',
- Babel.pre_otfload_h,
- 'Babel.pre_otfload_h',
- luatexbase.priority_in_callback('hpack_filter',
- 'luaotfload.node_processor') or nil)
- }}
\let\bbl@tempa\relax
\@ifpackagewith{babel}{bidi=basic}%
{\def\bbl@tempa{basic}}%
@@ -7613,6 +7621,8 @@ help from Bernd Raichle, for which I am grateful.
% the language is selected}
% \changes{babel~3.19}{2018/04/23}{New option - mapfont. Currently
% only with direction}
+% \changes{babel~3.20}{2018/05/01}{Handle native digits (TeX level).
+% New option - maparabic.}
%
% \begin{macrocode}
\bbl@trace{Creating languages and reading ini files}
@@ -7627,6 +7637,7 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@KVP@dir\@nil
\let\bbl@KVP@hyphenrules\@nil
\let\bbl@KVP@mapfont\@nil
+ \let\bbl@KVP@maparabic\@nil
\bbl@forkv{#1}{\bbl@csarg\def{KVP@##1}{##2}}% TODO - error handling
\ifx\bbl@KVP@captions\@nil
\let\bbl@KVP@captions\bbl@KVP@import
@@ -7676,7 +7687,48 @@ help from Bernd Raichle, for which I am grateful.
\fi
\bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}%
\fi
+ \ifcase\bbl@engine\else
+ \bbl@ifunset{bbl@dgnat@\languagename}{}%
+ {\expandafter\ifx\csname bbl@dgnat@\languagename\endcsname\@empty\else
+ \expandafter\expandafter\expandafter
+ \bbl@setdigits\csname bbl@dgnat@\languagename\endcsname
+ \ifx\bbl@KVP@maparabic\@nil\else
+ \expandafter\let\expandafter\@arabic
+ \csname bbl@counter@\languagename\endcsname
+ \fi
+ \fi}%
+ \fi
\let\languagename\bbl@savelangname}
+\def\bbl@setdigits#1#2#3#4#5{%
+ \bbl@exp{%
+ \def\<\languagename digits>####1{% ie, \langdigits
+ \<bbl@digits@\languagename>####1\\\@nil}%
+ \def\<\languagename counter>####1{% ie, \langcounter
+ \\\expandafter\<bbl@counter@\languagename>%
+ \\\csname c@####1\endcsname}%
+ \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang
+ \\\expandafter\<bbl@digits@\languagename>%
+ \\\number####1\\\@nil}}%
+ \def\bbl@tempa##1##2##3##4##5{%
+ \bbl@exp{% Wow, quite a lot of hashes! :-(
+ \def\<bbl@digits@\languagename>########1{%
+ \\\ifx########1\\\@nil % ie, \bbl@digits@lang
+ \\\else
+ \\\ifx0########1#1%
+ \\\else\\\ifx1########1#2%
+ \\\else\\\ifx2########1#3%
+ \\\else\\\ifx3########1#4%
+ \\\else\\\ifx4########1#5%
+ \\\else\\\ifx5########1##1%
+ \\\else\\\ifx6########1##2%
+ \\\else\\\ifx7########1##3%
+ \\\else\\\ifx8########1##4%
+ \\\else\\\ifx9########1##5%
+ \\\else########1%
+ \\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi
+ \\\expandafter\<bbl@digits@\languagename>%
+ \\\fi}}}%
+ \bbl@tempa}
% \end{macrocode}
%
% Depending on whether or not the language exists, we define two macros.
@@ -7858,10 +7910,12 @@ help from Bernd Raichle, for which I am grateful.
\bbl@exportkey{sbcp}{identification.script.tag.bcp47}{}%
\bbl@exportkey{sotf}{identification.script.tag.opentype}{DFLT}}
\let\bbl@secline@typography\bbl@inikv
+\let\bbl@secline@numbers\bbl@inikv
\def\bbl@after@ini{%
\bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}%
\bbl@exportkey{rgthm}{typography.righthyphenmin}{3}%
\bbl@exportkey{hyphr}{typography.hyphenrules}{}%
+ \bbl@exportkey{dgnat}{numbers.digits.native}{}%
\bbl@xin@{0.9}{\@nameuse{bbl@@kv@identification.version}}%
\ifin@
\bbl@warning{%
@@ -17594,6 +17648,9 @@ Babel.characters={
%
% TODO: math mode (as weak L?)
%
+% \changes{babel~3.20}{2018/05/01}{Adapted to exhyphens in luatex >=
+% 1.07. Fix - now attr@dir is mod 3.}
+%
% \begin{macrocode}
%<*basic-r>
Babel = Babel or {}
@@ -17655,15 +17712,22 @@ function Babel.bidi(head, ispar)
for item in node.traverse(head) do
-- three cases: glyph, dir, otherwise
- if item.id == node.id'glyph' then
+ if item.id == node.id'glyph'
+ or (item.id == 7 and item.subtype == 2) then
- local chardata = characters[item.char]
+ local itemchar
+ if item.id == 7 and item.subtype == 2 then
+ itemchar = item.replace.char
+ else
+ itemchar = item.char
+ end
+ local chardata = characters[itemchar]
dir = chardata and chardata.d or nil
if not dir then
for nn, et in ipairs(ranges) do
- if item.char < et[1] then
+ if itemchar < et[1] then
break
- elseif item.char <= et[2] then
+ elseif itemchar <= et[2] then
dir = et[3]
break
end
@@ -17683,7 +17747,7 @@ function Babel.bidi(head, ispar)
attr_dir = 0
for at in node.traverse(item.attr) do
if at.number == luatexbase.registernumber'bbl@attr@dir' then
- attr_dir = at.value
+ attr_dir = at.value % 3
end
end
if attr_dir == 1 then
@@ -17856,6 +17920,8 @@ end
% \end{macrocode}
%
% And here the Lua code for |bidi=basic|:
+% \changes{babel~3.20}{2018/05/01}{Adapted to exhyphens in luatex >=
+% 1.07. Fix - nsm in mapfont (eg, Arabic vowels)}
%
% \begin{macrocode}
%<*basic>
@@ -17959,28 +18025,40 @@ function Babel.bidi(head, ispar, hdir)
-- current one is not added until we start processing the neutrals.
-- three cases: glyph, dir, otherwise
- if item.id == GLYPH then
+ if item.id == GLYPH
+ or (item.id == 7 and item.subtype == 2) then
- local chardata = characters[item.char]
+ local d_font = nil
+ local item_r
+ if item.id == 7 and item.subtype == 2 then
+ item_r = item.replace -- automatic discs have just 1 glyph
+ else
+ item_r = item
+ end
+ local chardata = characters[item_r.char]
d = chardata and chardata.d or nil
- if not d then
+ if not d or d == 'nsm' then
for nn, et in ipairs(ranges) do
- if item.char < et[1] then
+ if item_r.char < et[1] then
break
- elseif item.char <= et[2] then
- d = et[3]
+ elseif item_r.char <= et[2] then
+ if not d then d = et[3]
+ elseif d == 'nsm' then d_font = et[3]
+ end
break
end
end
end
d = d or 'l'
-
- local temp = (d == 'l' and 0) or
- (d == 'r' and 1) or
- (d == 'al' and 2) or
- (d == 'an' and 2) or nil
- if temp and fontmap and fontmap[temp][item.font] then
- item.font = fontmap[temp][item.font]
+ d_font = d_font or d
+
+ d_font = (d_font == 'l' and 0) or
+ (d_font == 'nsm' and 0) or
+ (d_font == 'r' and 1) or
+ (d_font == 'al' and 2) or
+ (d_font == 'an' and 2) or nil
+ if d_font and fontmap and fontmap[d_font][item_r.font] then
+ item_r.font = fontmap[d_font][item_r.font]
end
if new_d then
diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins
index 11310359671..263fe3fdc96 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/04/25}
+\def\filedate{2018/05/02}
\def\batchfile{babel.ins}
\input docstrip.tex
@@ -122,6 +122,8 @@
\usepreamble\mainpreamble
+\csname UseRawInputEncoding\endcsname
+
% Dummy, it just read "modules" to be used when generating
% the actual file. There must be a better way.
\savingtrue
diff --git a/Master/texmf-dist/source/latex/babel/babel20180419.dtx b/Master/texmf-dist/source/latex/babel/babel20180419.dtx
index aec1595cc0c..fdfc5880c58 100644
--- a/Master/texmf-dist/source/latex/babel/babel20180419.dtx
+++ b/Master/texmf-dist/source/latex/babel/babel20180419.dtx
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2018/04/25 v3.19 The Babel package]
+\ProvidesFile{babel.dtx}[2018/05/02 v3.20 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -3705,8 +3705,8 @@ help from Bernd Raichle, for which I am grateful.
% little bit of literate programming.
%
% \begin{macrocode}
-%<<version=3.19>>
-%<<date=2018/04/25>>
+%<<version=3.20>>
+%<<date=2018/05/02>>
% \end{macrocode}
%
% \section{Tools}
diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx
index 1922daadf09..5d0621e86a7 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/04/25 v3.19]
+\ProvidesFile{bbcompat.dtx}[2018/05/02 v3.20]
%</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 44fcaac03ef..15764d5cab8 100644
--- a/Master/texmf-dist/source/latex/babel/locale.zip
+++ b/Master/texmf-dist/source/latex/babel/locale.zip
Binary files differ
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
index ab455dc3d4c..0d66b33ccde 100644
--- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
+++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
@@ -81,15 +81,22 @@ function Babel.bidi(head, ispar)
for item in node.traverse(head) do
-- three cases: glyph, dir, otherwise
- if item.id == node.id'glyph' then
+ if item.id == node.id'glyph'
+ or (item.id == 7 and item.subtype == 2) then
- local chardata = characters[item.char]
+ local itemchar
+ if item.id == 7 and item.subtype == 2 then
+ itemchar = item.replace.char
+ else
+ itemchar = item.char
+ end
+ local chardata = characters[itemchar]
dir = chardata and chardata.d or nil
if not dir then
for nn, et in ipairs(ranges) do
- if item.char < et[1] then
+ if itemchar < et[1] then
break
- elseif item.char <= et[2] then
+ elseif itemchar <= et[2] then
dir = et[3]
break
end
@@ -100,7 +107,7 @@ function Babel.bidi(head, ispar)
attr_dir = 0
for at in node.traverse(item.attr) do
if at.number == luatexbase.registernumber'bbl@attr@dir' then
- attr_dir = at.value
+ attr_dir = at.value % 3
end
end
if attr_dir == 1 then
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
index c5104648763..3f13f99b773 100644
--- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
+++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
@@ -131,28 +131,40 @@ function Babel.bidi(head, ispar, hdir)
-- current one is not added until we start processing the neutrals.
-- three cases: glyph, dir, otherwise
- if item.id == GLYPH then
+ if item.id == GLYPH
+ or (item.id == 7 and item.subtype == 2) then
- local chardata = characters[item.char]
+ local d_font = nil
+ local item_r
+ if item.id == 7 and item.subtype == 2 then
+ item_r = item.replace -- automatic discs have just 1 glyph
+ else
+ item_r = item
+ end
+ local chardata = characters[item_r.char]
d = chardata and chardata.d or nil
- if not d then
+ if not d or d == 'nsm' then
for nn, et in ipairs(ranges) do
- if item.char < et[1] then
+ if item_r.char < et[1] then
break
- elseif item.char <= et[2] then
- d = et[3]
+ elseif item_r.char <= et[2] then
+ if not d then d = et[3]
+ elseif d == 'nsm' then d_font = et[3]
+ end
break
end
end
end
d = d or 'l'
-
- local temp = (d == 'l' and 0) or
- (d == 'r' and 1) or
- (d == 'al' and 2) or
- (d == 'an' and 2) or nil
- if temp and fontmap and fontmap[temp][item.font] then
- item.font = fontmap[temp][item.font]
+ d_font = d_font or d
+
+ d_font = (d_font == 'l' and 0) or
+ (d_font == 'nsm' and 0) or
+ (d_font == 'r' and 1) or
+ (d_font == 'al' and 2) or
+ (d_font == 'an' and 2) or nil
+ if d_font and fontmap and fontmap[d_font][item_r.font] then
+ item_r.font = fontmap[d_font][item_r.font]
end
if new_d then
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def
index ed07f9563db..4a4e31018df 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}[2018/04/25 3.19 Babel common definitions]
+\ProvidesFile{babel.def}[2018/05/02 3.20 Babel common definitions]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -1311,6 +1311,7 @@
\let\bbl@KVP@dir\@nil
\let\bbl@KVP@hyphenrules\@nil
\let\bbl@KVP@mapfont\@nil
+ \let\bbl@KVP@maparabic\@nil
\bbl@forkv{#1}{\bbl@csarg\def{KVP@##1}{##2}}% TODO - error handling
\ifx\bbl@KVP@captions\@nil
\let\bbl@KVP@captions\bbl@KVP@import
@@ -1360,7 +1361,48 @@
\fi
\bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}%
\fi
+ \ifcase\bbl@engine\else
+ \bbl@ifunset{bbl@dgnat@\languagename}{}%
+ {\expandafter\ifx\csname bbl@dgnat@\languagename\endcsname\@empty\else
+ \expandafter\expandafter\expandafter
+ \bbl@setdigits\csname bbl@dgnat@\languagename\endcsname
+ \ifx\bbl@KVP@maparabic\@nil\else
+ \expandafter\let\expandafter\@arabic
+ \csname bbl@counter@\languagename\endcsname
+ \fi
+ \fi}%
+ \fi
\let\languagename\bbl@savelangname}
+\def\bbl@setdigits#1#2#3#4#5{%
+ \bbl@exp{%
+ \def\<\languagename digits>####1{% ie, \langdigits
+ \<bbl@digits@\languagename>####1\\\@nil}%
+ \def\<\languagename counter>####1{% ie, \langcounter
+ \\\expandafter\<bbl@counter@\languagename>%
+ \\\csname c@####1\endcsname}%
+ \def\<bbl@counter@\languagename>####1{% ie, \bbl@counter@lang
+ \\\expandafter\<bbl@digits@\languagename>%
+ \\\number####1\\\@nil}}%
+ \def\bbl@tempa##1##2##3##4##5{%
+ \bbl@exp{% Wow, quite a lot of hashes! :-(
+ \def\<bbl@digits@\languagename>########1{%
+ \\\ifx########1\\\@nil % ie, \bbl@digits@lang
+ \\\else
+ \\\ifx0########1#1%
+ \\\else\\\ifx1########1#2%
+ \\\else\\\ifx2########1#3%
+ \\\else\\\ifx3########1#4%
+ \\\else\\\ifx4########1#5%
+ \\\else\\\ifx5########1##1%
+ \\\else\\\ifx6########1##2%
+ \\\else\\\ifx7########1##3%
+ \\\else\\\ifx8########1##4%
+ \\\else\\\ifx9########1##5%
+ \\\else########1%
+ \\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi\\\fi
+ \\\expandafter\<bbl@digits@\languagename>%
+ \\\fi}}}%
+ \bbl@tempa}
\def\bbl@provide@new#1{%
\@namedef{date#1}{}% marks lang exists - required by \StartBabelCommands
\@namedef{extras#1}{}%
@@ -1495,10 +1537,12 @@
\bbl@exportkey{sbcp}{identification.script.tag.bcp47}{}%
\bbl@exportkey{sotf}{identification.script.tag.opentype}{DFLT}}
\let\bbl@secline@typography\bbl@inikv
+\let\bbl@secline@numbers\bbl@inikv
\def\bbl@after@ini{%
\bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}%
\bbl@exportkey{rgthm}{typography.righthyphenmin}{3}%
\bbl@exportkey{hyphr}{typography.hyphenrules}{}%
+ \bbl@exportkey{dgnat}{numbers.digits.native}{}%
\bbl@xin@{0.9}{\@nameuse{bbl@@kv@identification.version}}%
\ifin@
\bbl@warning{%
diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty
index 453dc5afde1..defc080ce7d 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.sty
+++ b/Master/texmf-dist/tex/generic/babel/babel.sty
@@ -32,7 +32,7 @@
%% extension |.ins|) which are part of the distribution.
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2018/04/25 3.19 The Babel package]
+\ProvidesPackage{babel}[2018/05/02 3.20 The Babel package]
\@ifpackagewith{babel}{debug}
{\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}%
\let\bbl@debug\@firstofone}
@@ -186,24 +186,6 @@
\bbl@languages
\fi
\ifodd\bbl@engine
- \def\bbl@loadbidi#1{%
- \let\bbl@beforeforeign\leavevmode
- \AtEndOfPackage{\EnableBabelHook{babel-bidi}}%
- \RequirePackage{luatexbase}%
- \directlua{
- require('babel-bidi.lua')
- require('babel-bidi-#1.lua')
- luatexbase.add_to_callback('pre_linebreak_filter',
- Babel.pre_otfload_v,
- 'Babel.pre_otfload_v',
- luatexbase.priority_in_callback('pre_linebreak_filter',
- 'luaotfload.node_processor') or nil)
- luatexbase.add_to_callback('hpack_filter',
- Babel.pre_otfload_h,
- 'Babel.pre_otfload_h',
- luatexbase.priority_in_callback('hpack_filter',
- 'luaotfload.node_processor') or nil)
- }}
\let\bbl@tempa\relax
\@ifpackagewith{babel}{bidi=basic}%
{\def\bbl@tempa{basic}}%
diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
index 2f746b1c779..9e4269e11b8 100644
--- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg
+++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg
@@ -36,7 +36,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{hyphen.cfg}[2018/04/25 3.19 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2018/05/02 3.20 Babel hyphens]
\xdef\bbl@format{\jobname}
\ifx\AtBeginDocument\@undefined
\def\@empty{}
@@ -67,7 +67,7 @@
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\fi
-\toks8{Babel <3.19> and hyphenation patterns for }%
+\toks8{Babel <3.20> and hyphenation patterns for }%
\def\process@line#1#2 #3 #4 {%
\ifx=#1%
\process@synonym{#2}%
diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf
index 10004499411..e6a5aad4c3e 100644
--- a/Master/texmf-dist/tex/generic/babel/nil.ldf
+++ b/Master/texmf-dist/tex/generic/babel/nil.ldf
@@ -31,7 +31,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension |.ins|) which are part of the distribution.
%%
-\ProvidesLanguage{nil}[2018/04/25 3.19 Nil language]
+\ProvidesLanguage{nil}[2018/05/02 3.20 Nil language]
\LdfInit{nil}{datenil}
\ifx\l@nohyphenation\@undefined
\@nopatterns{nil}
diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def
index 0c5f6c2d68d..ba84053fe3e 100644
--- a/Master/texmf-dist/tex/generic/babel/switch.def
+++ b/Master/texmf-dist/tex/generic/babel/switch.def
@@ -36,7 +36,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{switch.def}[2018/04/25 3.19 Babel switching mechanism]
+\ProvidesFile{switch.def}[2018/05/02 3.20 Babel switching mechanism]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -57,8 +57,8 @@
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\fi
-\def\bbl@version{3.19}
-\def\bbl@date{2018/04/25}
+\def\bbl@version{3.20}
+\def\bbl@date{2018/05/02}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl@usehooks{adddialect}{{#1}{#2}}%