summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/csquotes/csq-compat.def2
-rw-r--r--macros/latex/contrib/csquotes/csquotes.def2
-rw-r--r--macros/latex/contrib/csquotes/csquotes.pdfbin291928 -> 291911 bytes
-rw-r--r--macros/latex/contrib/csquotes/csquotes.sty32
-rw-r--r--macros/latex/contrib/csquotes/csquotes.tex8
-rw-r--r--macros/latex/required/babel/base/README.md10
-rw-r--r--macros/latex/required/babel/base/babel.dtx280
-rw-r--r--macros/latex/required/babel/base/babel.ins2
-rw-r--r--macros/latex/required/babel/base/babel.pdfbin702531 -> 723535 bytes
-rw-r--r--macros/latex/required/babel/base/bbcompat.dtx2
-rw-r--r--macros/luatex/generic/luamplib/NEWS3
-rw-r--r--macros/luatex/generic/luamplib/luamplib.dtx24
-rw-r--r--macros/luatex/generic/luamplib/luamplib.pdfbin149386 -> 149508 bytes
13 files changed, 264 insertions, 101 deletions
diff --git a/macros/latex/contrib/csquotes/csq-compat.def b/macros/latex/contrib/csquotes/csq-compat.def
index 61e880d956..6ed72d174b 100644
--- a/macros/latex/contrib/csquotes/csq-compat.def
+++ b/macros/latex/contrib/csquotes/csq-compat.def
@@ -1,5 +1,5 @@
\ProvidesFile{csq-compat.def}
- [2019-11-11 v2.5f csquotes backwards compatibility (JAW)]
+ [2019-11-14 v5.2g csquotes backwards compatibility (JAW)]
\def\csq@getversion#1{%
\expandafter\csq@getversion@i
diff --git a/macros/latex/contrib/csquotes/csquotes.def b/macros/latex/contrib/csquotes/csquotes.def
index a6b7fe10a5..ec7834d752 100644
--- a/macros/latex/contrib/csquotes/csquotes.def
+++ b/macros/latex/contrib/csquotes/csquotes.def
@@ -1,5 +1,5 @@
\ProvidesFile{csquotes.def}
- [2019-11-11 v2.5f csquotes generic definitions (JAW)]
+ [2019-11-14 v5.2g csquotes generic definitions (JAW)]
% Set defaults
diff --git a/macros/latex/contrib/csquotes/csquotes.pdf b/macros/latex/contrib/csquotes/csquotes.pdf
index ceff68e660..a1507080d4 100644
--- a/macros/latex/contrib/csquotes/csquotes.pdf
+++ b/macros/latex/contrib/csquotes/csquotes.pdf
Binary files differ
diff --git a/macros/latex/contrib/csquotes/csquotes.sty b/macros/latex/contrib/csquotes/csquotes.sty
index 7c68115a9b..9cc48633a2 100644
--- a/macros/latex/contrib/csquotes/csquotes.sty
+++ b/macros/latex/contrib/csquotes/csquotes.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{csquotes}
- [2019-11-11 v2.5f context-sensitive quotations (JAW)]
+ [2019-11-14 v5.2g context-sensitive quotations (JAW)]
%% Compatibility and requirements
@@ -781,25 +781,21 @@
\endgroup}}
\def\csq@resetstyle{%
- \ifundef\babelname
- {\csq@resetstyle@i{\languagename}}%
- {\csq@resetstyle@i{\babelname}}}
+ \ifnum\csq@reset=\@ne
+ \ifundef\babelname
+ {\ifundef\languagename
+ {\csq@warn@multilang{Cannot detect current language}}
+ {\csq@resetstyle@i{\languagename}}}%
+ {\csq@resetstyle@i{\babelname}}%
+ \fi}
\def\csq@resetstyle@i#1{%
- \begingroup
- \edef\csq@tempa{\endgroup
- \noexpand\csq@resetstyle@ii{#1}}%
- \csq@tempa}
-
-\def\csq@resetstyle@ii#1{%
- \ifnum\csq@reset=\@ne
- \ifx\csq@currentstyle#1
- \else
- \ifcsundef{csq@qstyle@#1}
- {\csq@warn@style#1
- \csq@setstyle{fallback}}
- {\csq@setstyle{#1}}%
- \fi
+ \ifx\csq@currentstyle#1\relax
+ \else
+ \ifcsundef{csq@qstyle@#1}
+ {\csq@warn@style#1
+ \csq@setstyle{fallback}}
+ {\csq@setstyle{#1}}%
\fi}
\def\csq@savelang{%
diff --git a/macros/latex/contrib/csquotes/csquotes.tex b/macros/latex/contrib/csquotes/csquotes.tex
index 47e7bfea8d..a0e0090190 100644
--- a/macros/latex/contrib/csquotes/csquotes.tex
+++ b/macros/latex/contrib/csquotes/csquotes.tex
@@ -18,8 +18,8 @@
url={http://www.ctan.org/pkg/csquotes/},
author={Philipp Lehman, Joseph Wright},
email={joseph.wright@morningstar2.co.uk},
- revision={2.5f},
- date={2019-11-11}}
+ revision={5.2g},
+ date={2019-11-14}}
\hypersetup{%
pdftitle={The csquotes Package},
@@ -1542,6 +1542,10 @@ The scope of these hooks must always be confined to a group.
This revision history is a list of changes relevant to users of this package. Changes of a more technical nature which do not affect the user interface or the behavior of the package are not included in the list. If an entry in the revision history states that a feature has been \emph{extended}, this indicates a syntactically backwards compatible modification, such as the addition of an optional argument to an existing command. Entries stating that a feature has been \emph{modified}, \emph{renamed}, or \emph{removed} demand attention. They indicate a modification which may require changes to existing documents in some, hopefully rare, cases. The \opt{version} option from \secref{opt:opt} may be helpful in this case. The numbers on the right indicate the relevant section of this manual.
\begin{changelog}
+\begin{release}{5.2g}{2019-11-14}
+\item Fix issue with \cmd{languagename}
+\end{release}
+
\begin{release}{5.2f}{2019-11-11}
\item Added language option \opt{serbian}\see{opt:opt}
\item Improved \sty{polyglossia} support\see{opt:opt}
diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md
index d0aa434945..1052b9b40b 100644
--- a/macros/latex/required/babel/base/README.md
+++ b/macros/latex/required/babel/base/README.md
@@ -1,4 +1,4 @@
-## Babel 3.35
+## Babel 3.36
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -51,6 +51,14 @@ respective authors.
### Latest changes
```
+3.36 2019-11-14
+ - New - \babeladjust, with options: bidi.text, bidi.mirroring,
+ bidi.mapdigits, layout.tabular, layout.lists, linebreak.sea,
+ linebreak.cjk. There are still some limitations.
+ - New - ini for Polytonic Greek, thanks to Claudio Beccari.
+ - Fix - Language and script set for Chinese Tradicional and
+ Chinese Simplified.
+
3.35 2019-10-15
- \markboth and \markright made robust with a recent LaTeX.
- Shorthands work in bibs and refs even with safe=none.
diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx
index 398c5e4ae3..7c64648ee5 100644
--- a/macros/latex/required/babel/base/babel.dtx
+++ b/macros/latex/required/babel/base/babel.dtx
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2019/10/15 v3.35 The Babel package]
+\ProvidesFile{babel.dtx}[2019/11/14 v3.36 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -1235,16 +1235,14 @@ for auxiliary tasks).
\end{verbatim}
\endgroup
Khemer clusters are rendered wrongly.
-\item[East Asia scripts] Internal inconsistencies in script and
- language names must be sorted out, so you may need to set them
- explicitly in |\babelfont|, as well as |CJKShape|. \luatex{} does
- basic line breaking, but currently \xetex{} does not (you may load
- \textsf{zhspacing}). Although for a few words and shorts texts the
- |ini| files should be fine, CJK texts are are best set with a
- dedicated framework (\textsf{CJK}, \textsf{luatexja}, \textsf{kotex},
- \textsf{CTeX}...), . Actually, this is what the |ldf| does in
- |japanese| with \luatex, because the following piece of code loads
- \textsf{luatexja}:
+\item[East Asia scripts] Settings for either Simplified of Tradicional
+should work out of the box. \luatex{} does basic line breaking, but
+currently \xetex{} does not (you may load \textsf{zhspacing}). Although
+for a few words and shorts texts the |ini| files should be fine, CJK
+texts are best set with a dedicated framework (\textsf{CJK},
+\textsf{luatexja}, \textsf{kotex}, \textsf{CTeX}, etc.). Actually, this
+is what the |ldf| does in |japanese| with \luatex, because the
+following piece of code loads \textsf{luatexja}:
\begin{verbatim}
\documentclass{ltjbook}
\usepackage[japanese]{babel}
@@ -2080,11 +2078,18 @@ existing language, too, as explained in the previous subsection).
\Describe{\babelprovide}{\oarg{options}\marg{language-name}}
-If the language |\marg{language-name}| has not been defined and there
-are no options, it creates an “empty” one in the following way: defines
-the internal structure of the language with some defaults: the hyphen
-rules, if not available, are set to the current ones, left and right
-hyphen mins are set to 2 and 3, but captions and date are not defined.
+If the language \m{language-name} has not been loaded as class or
+package option and there are no \m{options}, it creates an “empty” one
+with some defaults in its internal structure: the hyphen rules, if not
+available, are set to the current ones, left and right hyphen mins are
+set to 2 and 3. In either case, caption, date and language system are
+not defined.
+
+If no |ini| file is imported with |import|, \m{language-name} is
+relevant because in such a case the hyphenation rules are based on it
+as provided in the |ini| file corresponding to that name; the same
+applies to OpenType language and script.
+
Conveniently, some options allow to fill the language, and \babel{}
warns you about what to do if there is a missing string. Very likely
you will find alerts like that in the |log| file:
@@ -2213,8 +2218,8 @@ be added.} So, there should be at most 3 directives of this kind.
Sets the interword space for the writing system of the language, in em
units (so, |0 .1 0| is |0em plus .1em|). Like |\spaceskip|, the em unit
applied is that of the current text (more precisely, the previous
-glyph). Currently used only in Southeast Asian scrips, like Thai.
-Requires |import|.
+glyph). Currently used only in Southeast Asian scrips, like Thai, and
+CJK. Requires |import|.
\Describe{intrapenalty=}{\meta{penalty}}
Sets the interword penalty for the writing system of this language.
@@ -2995,7 +3000,7 @@ to set them for glyphs in the PUA).
With the optional argument, you can set a range of values. There are
three properties (with a short name, taken from Unicode): |direction|
(|bc|), |mirror| (|bmg|), |linebreak| (|lb|). The settings are global.
-
+
For example:
\begin{verbatim}
\babelcharproperty{`¿}{mirror}{`?}
@@ -3006,6 +3011,21 @@ For example:
This command is allowed only in vertical mode (the preamble or between
paragraphs).
+\subsection{Tweaking some features}
+
+\Describe{\babeladjust}{\marg{key-value-list}}
+
+\New{3.36} Sometimes you might need to disable some \babel{} features.
+Currently this macro understands the following keys (and only for
+\textsf{luatex}), with values |on| or |off|: |bidi.text|,
+|bidi.mirroring|, |bidi.mapdigits|, |layout.lists|, |layout.tabular|,
+|linebreak.sea|, |linebreak.cjk|. For example, you can set
+|\babeladjust{bidi.text=off}| if you are using an alternative algorithm
+or with large sections not requiring it. With \textsf{luahbtex} you may
+need |bidi.mirroring=off|. Use with care, because these options do not
+deactivate other related options (like paragraph direction with
+|bidi.text|).
+
\subsection{Tips, workarounds, known issues and notes}
\begin{itemize}
@@ -3151,6 +3171,16 @@ So, for example:
\babelFSfeatures{turkish}{Language=Turkish}
\end{verbatim}
+\medskip
+\textbf{Modifying values of |ini| files}
+
+\New{3.36} There is a way to modify the values of |ini| files when they
+get loaded with |\babelprovide|. To set, say, |digits.native| in the
+|numbers| section, use something like
+|numbers..digits.native=abcdefghij| (note the double dot between the
+section and the key name). The syntax may change, and currently it only
+redefines existing keys.
+
\section{Loading languages with \file{language.dat}}
\TeX{} and most engines based on it (pdf\TeX, \xetex, $\epsilon$-\TeX,
@@ -4073,8 +4103,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.35>>
-%<<date=2019/10/15>>
+%<<version=3.36>>
+%<<date=2019/11/14>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5665,11 +5695,9 @@ help from Bernd Raichle, for which I am grateful.
\bbl@usehooks{beforestart}{}%
\global\let\bbl@beforestart\relax}
\AtBeginDocument{%
- \bbl@beforestart
+ \@nameuse{bbl@beforestart}%
\if@filesw
- \immediate\write\@mainaux{%
- % \let\string\bbl@nostdfont\string\@gobble
- \string\bbl@beforestart}%
+ \immediate\write\@mainaux{\string\@nameuse{bbl@beforestart}}%
\fi
\expandafter\selectlanguage\expandafter{\bbl@main@language}%
\ifbbl@single % must go after the line above
@@ -8075,20 +8103,20 @@ help from Bernd Raichle, for which I am grateful.
\let\bbl@KVP@main\@nil
\let\bbl@KVP@script\@nil
\let\bbl@KVP@language\@nil
- \let\bbl@KVP@dir\@nil
- \let\bbl@KVP@hyphenrules\@nil
+ \let\bbl@KVP@hyphenrules\@nil % only for provide@new
\let\bbl@KVP@mapfont\@nil
\let\bbl@KVP@maparabic\@nil
\let\bbl@KVP@mapdigits\@nil
\let\bbl@KVP@intraspace\@nil
\let\bbl@KVP@intrapenalty\@nil
\bbl@forkv{#1}{% TODO - error handling
- \in@{/}{##1}%
+ \in@{..}{##1}%
\ifin@
\bbl@renewinikey##1\@@{##2}%
\else
\bbl@csarg\def{KVP@##1}{##2}%
\fi}%
+ % == import, captions ==
\ifx\bbl@KVP@import\@nil\else
\bbl@exp{\\\bbl@ifblank{\bbl@KVP@import}}%
{\begingroup
@@ -8121,28 +8149,32 @@ help from Bernd Raichle, for which I am grateful.
% At this point all parameters are defined if 'import'. Now we
% execute some code depending on them. But what about if nothing was
% imported? We just load the very basic parameters: ids and a few
- % more.
+ % more.
\bbl@ifunset{bbl@lname@#2}%
{\def\BabelBeforeIni##1##2{%
\begingroup
\catcode`\[=12 \catcode`\]=12 \catcode`\==12 %
\let\bbl@ini@captions@aux\@gobbletwo
\def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}%
- \bbl@read@ini{##1}%
+ \bbl@read@ini{##1}{basic data}%
\bbl@exportkey{chrng}{characters.ranges}{}%
\bbl@exportkey{dgnat}{numbers.digits.native}{}%
+ % \bbl@exportkey{hyphr}{typography.hyphenrules}{}%
+ % \bbl@exportkey{intsp}{typography.intraspace}{}%
\endgroup}% boxed, to avoid extra spaces:
{\setbox\z@\hbox{\InputIfFileExists{babel-#2.tex}{}{}}}}%
{}%
% -
- % Override script and language names with script= and language=
+ % == script, language ==
+ % Override the values from ini or defines them
\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
+ % == mapfont ==
+ % For bidi texts, to switch the font based on direction
\ifx\bbl@KVP@mapfont\@nil\else
\bbl@ifsamestring{\bbl@KVP@mapfont}{direction}{}%
{\bbl@error{Option `\bbl@KVP@mapfont' unknown for\\%
@@ -8167,15 +8199,16 @@ help from Bernd Raichle, for which I am grateful.
\fi
\bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}%
\fi
- % For East Asian, Southeast Asian, if interspace in ini - TODO: as hook?
- \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini
+ % == intraspace, intrapenalty ==
+ % For CJK, East Asian, Southeast Asian, if interspace in ini
+ \ifx\bbl@KVP@intraspace\@nil\else % We can override the ini or set
\bbl@csarg\edef{intsp@#2}{\bbl@KVP@intraspace}%
\fi
- \ifcase\bbl@engine\or
+ \ifcase\bbl@engine\or % lua
\bbl@ifunset{bbl@intsp@\languagename}{}%
{\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else
\bbl@xin@{\bbl@cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore,Kana}%
- \ifin@
+ \ifin@ % cjk
\bbl@cjkintraspace
\directlua{
Babel = Babel or {}
@@ -8186,7 +8219,7 @@ help from Bernd Raichle, for which I am grateful.
\ifx\bbl@KVP@intrapenalty\@nil
\bbl@intrapenalty0\@@
\fi
- \else
+ \else % sea
\bbl@seaintraspace
\bbl@exp{\\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
\directlua{
@@ -8203,9 +8236,9 @@ help from Bernd Raichle, for which I am grateful.
\ifx\bbl@KVP@intrapenalty\@nil\else
\expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
\fi}%
- \or
+ \or % xe
\bbl@xin@{\bbl@cs{sbcp@\languagename}}{Thai,Laoo,Khmr}%
- \ifin@
+ \ifin@ % sea (currently ckj not handled)
\bbl@ifunset{bbl@intsp@\languagename}{}%
{\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else
\ifx\bbl@KVP@intraspace\@nil
@@ -8230,6 +8263,7 @@ help from Bernd Raichle, for which I am grateful.
\fi}%
\fi
\fi
+ % == maparabic ==
% Native digits, if provided in ini (TeX level, xe and lua)
\ifcase\bbl@engine\else
\bbl@ifunset{bbl@dgnat@\languagename}{}%
@@ -8247,6 +8281,7 @@ help from Bernd Raichle, for which I am grateful.
\fi
\fi}%
\fi
+ % == mapdigits ==
% Native digits (lua level).
\ifodd\bbl@engine
\ifx\bbl@KVP@mapdigits\@nil\else
@@ -8283,6 +8318,7 @@ help from Bernd Raichle, for which I am grateful.
}}
\fi
\fi
+ % == require.babel in ini ==
% 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
@@ -8293,6 +8329,7 @@ help from Bernd Raichle, for which I am grateful.
\catcode`\@=\atcatcode
\let\atcatcode\relax
\fi}%
+ % == main ==
\ifx\bbl@KVP@main\@nil % Restore only if not 'main'
\let\languagename\bbl@savelangname
\chardef\localeid\bbl@savelocaleid\relax
@@ -8356,7 +8393,7 @@ help from Bernd Raichle, for which I am grateful.
\fi}%
\expandafter\bbl@tempb\bbl@captionslist\@empty
\else
- \bbl@read@ini{\bbl@KVP@captions}% Here all letters cat = 11
+ \bbl@read@ini{\bbl@KVP@captions}{data}% Here all letters cat = 11
\bbl@after@ini
\bbl@savestrings
\fi
@@ -8380,7 +8417,7 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl@provide@renew#1{%
\ifx\bbl@KVP@captions\@nil\else
\StartBabelCommands*{#1}{captions}%
- \bbl@read@ini{\bbl@KVP@captions}% Here all letters cat = 11
+ \bbl@read@ini{\bbl@KVP@captions}{data}% Here all letters cat = 11
\bbl@after@ini
\bbl@savestrings
\EndBabelCommands
@@ -8391,6 +8428,7 @@ help from Bernd Raichle, for which I am grateful.
\bbl@savedate
\EndBabelCommands
\fi
+ % == hyphenrules ==
\bbl@provide@hyphens{#1}}
% \end{macrocode}
%
@@ -8442,7 +8480,7 @@ help from Bernd Raichle, for which I am grateful.
% key/value pair. \textit{TODO - Work in progress.}
%
% \begin{macrocode}
-\def\bbl@read@ini#1{%
+\def\bbl@read@ini#1#2{%
\openin1=babel-#1.ini % FIXME - number must not be hardcoded
\ifeof1
\bbl@error
@@ -8458,11 +8496,12 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl@inipreread##1=##2\@@{%
\bbl@trim@def\bbl@tempa{##1}% Redundant below !!
% Move trims here ??
- \bbl@ifunset{bbl@KVP@\bbl@section/\bbl@tempa}%
+ \bbl@ifunset{bbl@KVP@\bbl@section..\bbl@tempa}%
{\expandafter\bbl@inireader\bbl@tempa=##2\@@}%
{}}%
\let\bbl@inireader\bbl@iniskip
- \bbl@info{Importing data from babel-#1.ini for \languagename}%
+ \bbl@info{Importing #2 for \languagename\\%
+ from babel-#1.ini. Reported}%
\loop
\if T\ifeof1F\fi T\relax % Trick, because inside \loop
\endlinechar\m@ne
@@ -8491,12 +8530,14 @@ help from Bernd Raichle, for which I am grateful.
\@nameuse{bbl@secpost@\bbl@section}% ends previous section
\def\bbl@section{#1}%
\def\bbl@elt##1##2{%
- \@namedef{bbl@KVP@#1/##1}{}}%
+ \@namedef{bbl@KVP@#1..##1}{}}%
\@nameuse{bbl@renew@#1}%
\@nameuse{bbl@secpre@#1}% starts current section
\bbl@ifunset{bbl@inikv@#1}%
{\let\bbl@inireader\bbl@iniskip}%
{\bbl@exp{\let\\\bbl@inireader\<bbl@inikv@#1>}}}
+\def\bbl@renewinikey#1..#2\@@#3{%
+ \bbl@csarg\bbl@add{renew@#1}{\bbl@elt{#2}{#3}}}
% \end{macrocode}
%
% Reads a key=val line and stores the trimmed val in
@@ -8527,13 +8568,20 @@ help from Bernd Raichle, for which I am grateful.
% the |ini| file. The following macros are the readers for
% |identification| and |typography|.
%
+% \changes{babel~3.36}{2019/10/30}{New fields for CJK, because OpenType
+% and the CLDR follow different models.}
+%
% \begin{macrocode}
\let\bbl@inikv@identification\bbl@inikv
\def\bbl@secpost@identification{%
- \bbl@exportkey{lname}{identification.name.english}{}%
+ \bbl@ifunset{bbl@@kv@identification.name.opentype}%
+ {\bbl@exportkey{lname}{identification.name.english}{}}%
+ {\bbl@exportkey{lname}{identification.name.opentype}{}}%
\bbl@exportkey{lbcp}{identification.tag.bcp47}{}%
\bbl@exportkey{lotf}{identification.tag.opentype}{dflt}%
- \bbl@exportkey{sname}{identification.script.name}{}%
+ \bbl@ifunset{bbl@@kv@identification.script.name.opentype}%
+ {\bbl@exportkey{sname}{identification.script.name}{}}%
+ {\bbl@exportkey{sname}{identification.script.name.opentype}{}}%
\bbl@exportkey{sbcp}{identification.script.tag.bcp47}{}%
\bbl@exportkey{sotf}{identification.script.tag.opentype}{DFLT}}
\let\bbl@inikv@typography\bbl@inikv
@@ -8699,7 +8747,7 @@ help from Bernd Raichle, for which I am grateful.
% \begin{macrocode}
\def\bbl@provide@lsys#1{%
\bbl@ifunset{bbl@lname@#1}%
- {\bbl@ini@ids{#1}}%
+ {\bbl@ini@basic{#1}}%
{}%
\bbl@csarg\let{lsys@#1}\@empty
\bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}%
@@ -8723,18 +8771,79 @@ help from Bernd Raichle, for which I am grateful.
% \changes{babel~3.34}{2019/08/05}{Added \cs{endinput}.}
%
% \begin{macrocode}
-\def\bbl@ini@ids#1{%
+\def\bbl@ini@basic#1{%
\def\BabelBeforeIni##1##2{%
\begingroup
\bbl@add\bbl@secpost@identification{\closein1 }%
\catcode`\[=12 \catcode`\]=12 \catcode`\==12 %
- \bbl@read@ini{##1}%
- \endinput
- \endgroup}% boxed, to avoid extra spaces:
+ \bbl@read@ini{##1}{font and identification data}%
+ \endinput % babel- .tex may contain onlypreamble's
+ \endgroup}% boxed, to avoid extra spaces:
{\setbox\z@\hbox{\InputIfFileExists{babel-#1.tex}{}{}}}}
-% \end{macrocode}
+% \section{Adjusting the Babel bahavior}
+%
+% \changes{babel~3.36}{2019/10/30}{New macro \cs{babeladjust}}
%
-% \section{The kernel of Babel (\texttt{babel.def}, only \LaTeX)}
+% A generic high level inteface is provided to adjust some global
+% and general settings.
+%
+% \begin{macrocode}
+\newcommand\babeladjust[1]{% TODO. Error handling.
+ \bbl@forkv{#1}{\@nameuse{bbl@ADJ@##1@##2}}}
+%
+\def\bbl@adjust@lua#1#2{%
+ \ifvmode
+ \ifnum\currentgrouplevel=\z@
+ \directlua{ Babel.#2 }%
+ \expandafter\expandafter\expandafter\@gobble
+ \fi
+ \fi
+ {\bbl@error % The error is gobbled if everything went ok.
+ {Currently, #1 related features can be adjusted only\\%
+ in the main vertical list.}%
+ {Maybe things change in the future, but this is what it is.}}}
+\@namedef{bbl@ADJ@bidi.mirroring@on}{%
+ \bbl@adjust@lua{bidi}{mirroring_enabled=true}}
+\@namedef{bbl@ADJ@bidi.mirroring@off}{%
+ \bbl@adjust@lua{bidi}{mirroring_enabled=false}}
+\@namedef{bbl@ADJ@bidi.text@on}{%
+ \bbl@adjust@lua{bidi}{bidi_enabled=true}}
+\@namedef{bbl@ADJ@bidi.text@off}{%
+ \bbl@adjust@lua{bidi}{bidi_enabled=false}}
+\@namedef{bbl@ADJ@bidi.mapdigits@on}{%
+ \bbl@adjust@lua{bidi}{digits_mapped=true}}
+\@namedef{bbl@ADJ@bidi.mapdigits@off}{%
+ \bbl@adjust@lua{bidi}{digits_mapped=false}}
+%
+\@namedef{bbl@ADJ@linebreak.sea@on}{%
+ \bbl@adjust@lua{linebreak}{sea_enabled=true}}
+\@namedef{bbl@ADJ@linebreak.sea@off}{%
+ \bbl@adjust@lua{linebreak}{sea_enabled=false}}
+\@namedef{bbl@ADJ@linebreak.cjk@on}{%
+ \bbl@adjust@lua{linebreak}{cjk_enabled=true}}
+\@namedef{bbl@ADJ@linebreak.cjk@off}{%
+ \bbl@adjust@lua{linebreak}{cjk_enabled=false}}
+%
+\def\bbl@adjust@layout#1{%
+ \ifvmode
+ #1%
+ \expandafter\@gobble
+ \fi
+ {\bbl@error % The error is gobbled if everything went ok.
+ {Currently, layout related features can be adjusted only\\%
+ in vertical mode.}%
+ {Maybe things change in the future, but this is what it is.}}}
+\@namedef{bbl@ADJ@layout.tabular@on}{%
+ \bbl@adjust@layout{\let\@tabular\bbl@NL@@tabular}}
+\@namedef{bbl@ADJ@layout.tabular@off}{%
+ \bbl@adjust@layout{\let\@tabular\bbl@OL@@tabular}}
+\@namedef{bbl@ADJ@layout.lists@on}{%
+ \bbl@adjust@layout{\let\list\bbl@NL@list}}
+\@namedef{bbl@ADJ@layout.lists@on}{%
+ \bbl@adjust@layout{\let\list\bbl@OL@list}}
+% \end{macrocode}
+%
+% \section{The kernel of Babel (\texttt{babel.def} for \LaTeX only)}
%
% \subsection{The redefinition of the style commands}
%
@@ -9824,13 +9933,25 @@ help from Bernd Raichle, for which I am grateful.
% or variant language, for which an already defined hyphenation
% table can be used.
%
+% \changes{babel~3.36}{2019/11/07}{Improved message, now showing the
+% language name}
+%
% \begin{macrocode}
\def\bbl@version{<@version@>}
\def\bbl@date{<@date@>}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl@usehooks{adddialect}{{#1}{#2}}%
- \wlog{\string#1 = a dialect from \string\language#2}}
+ \begingroup
+ \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@)}%
+ \def\bbl@elt####1####2####3####4{}%
+ \fi}%
+ \bbl@languages
+ \endgroup}
% \end{macrocode}
%
% \end{macro}
@@ -11355,7 +11476,7 @@ help from Bernd Raichle, for which I am grateful.
\bbl@ifunset{bbl@##1dflt@}%
{\@nameuse{##1family}%
\bbl@csarg\gdef{WFF@\f@family}{}% Flag
- \bbl@exp{\\\bbl@add\\\bbl@tempa{* \<##1family> / \f@family\\\\%
+ \bbl@exp{\\\bbl@add\\\bbl@tempa{* \<##1family>= \f@family\\\\%
\space\space\fontname\font\\\\}}%
\bbl@csarg\xdef{##1dflt@}{\f@family}%
\expandafter\xdef\csname ##1default\endcsname{\f@family}}%
@@ -11677,7 +11798,7 @@ help from Bernd Raichle, for which I am grateful.
\fi
\IfBabelLayout{lists}
{\bbl@sreplace\list
- {\@totalleftmargin\leftmargin}{\@totalleftmargin\bbl@listleftmargin}%
+ {\@totalleftmargin\leftmargin}{\@totalleftmargin\bbl@listleftmargin}%
\def\bbl@listleftmargin{%
\ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi}%
\ifcase\bbl@engine
@@ -12200,7 +12321,7 @@ help from Bernd Raichle, for which I am grateful.
for item in node.traverse(head) do
if item.id == GLYPH then
-
+
local lang = item.lang
local LOCALE = node.get_attribute(item,
@@ -12441,15 +12562,17 @@ help from Bernd Raichle, for which I am grateful.
\IfBabelLayout{tabular}
{\let\bbl@OL@@tabular\@tabular
\bbl@replace\@tabular{$}{\bbl@nextfake$}%
- \let\bbl@tabular\@tabular
+ \let\bbl@NL@@tabular\@tabular
\AtBeginDocument{%
- \ifx\bbl@tabular\@tabular\else
+ \ifx\bbl@NL@@tabular\@tabular\else
\bbl@replace\@tabular{$}{\bbl@nextfake$}%
+ \let\bbl@NL@@tabular\@tabular
\fi}}
{}
\IfBabelLayout{lists}
{\let\bbl@OL@list\list
\bbl@sreplace\list{\parshape}{\bbl@listparshape}%
+ \let\bbl@NL@list\list
\def\bbl@listparshape#1#2#3{%
\parshape #1 #2 #3 %
\ifnum\bbl@getluadir{page}=\bbl@getluadir{par}\else
@@ -12540,8 +12663,20 @@ help from Bernd Raichle, for which I am grateful.
% are `on'.}
%
% The file \textsf{babel-data-bidi.lua} currently only contains data. It is
-% a large and boring file and it's not shown here. See the generated
-% file.
+% a large and boring file and it is not shown here (see the generated file),
+% but here is a sample:
+%\begin{verbatim}
+% [0x25]={d='et'},
+% [0x26]={d='on'},
+% [0x27]={d='on'},
+% [0x28]={d='on', m=0x29},
+% [0x29]={d='on', m=0x28},
+% [0x2A]={d='on'},
+% [0x2B]={d='es'},
+% [0x2C]={d='cs'},
+%\end{verbatim}
+% For the meaning of these codes, see the Unicode standard.
+%
%\iffalse
% \begin{macrocode}
%<*bididata>
@@ -12549,8 +12684,6 @@ help from Bernd Raichle, for which I am grateful.
Babel = Babel or {}
--- TODO: merge ranges into characters, as meta index
-
Babel.ranges={
{0x0590, 0x05FF, 'r'},
{0x0600, 0x07BF, 'al'},
@@ -18650,7 +18783,7 @@ Babel.characters={
% \end{quote}
%
% Well, it took me some time to guess what the batch rules in UAX\#9
-% actually mean (in other word, \textit{what} they do and\textit{why},
+% actually mean (in other word, \textit{what} they do and \textit{why},
% and not only \textit{how}), but I think (or I hope) I've managed to
% understand them.
%
@@ -19335,7 +19468,18 @@ end
%
% \section{Data for CJK}
%
-% It is a boring file and it's not shown here. See the generated file.
+% It is a boring file and it is not shown here (see the generated file),
+% but here is a sample:
+%\begin{verbatim}
+% [0x0021]={c='ex'},
+% [0x0024]={c='pr'},
+% [0x0025]={c='po'},
+% [0x0028]={c='op'},
+% [0x0029]={c='cp'},
+% [0x002B]={c='pr'},
+%\end{verbatim}
+% For the meaning of these codes, see the Unicode standard.
+%
%\iffalse
% \begin{macrocode}
%<*cjkdata>
@@ -19621,11 +19765,15 @@ Babel.cjk_breaks = {
%
% \changes{babel-3.32}{2019/05/21}{Don't set it to
% \cs{l@nohyphenation}, best reserved fo special uses.}
+% \changes{babel~3.36}{2019/10/30}{Add nil to the language list.}
%
% \begin{macrocode}
\ifx\l@nil\@undefined
\newlanguage\l@nil
\@namedef{bbl@hyphendata@\the\l@nil}{{}{}}% Remove warning
+ \let\bbl@elt\relax
+ \edef\bbl@languages{% Add it to the list of languages
+ \bbl@languages\bbl@elt{nil}{\the\l@nil}{}{}}
\fi
% \end{macrocode}
%
diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins
index f8a7dbbfeb..e12e3c0458 100644
--- a/macros/latex/required/babel/base/babel.ins
+++ b/macros/latex/required/babel/base/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{2019/10/15}
+\def\filedate{2019/11/14}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf
index fe5f5e86d2..f1eafff046 100644
--- a/macros/latex/required/babel/base/babel.pdf
+++ b/macros/latex/required/babel/base/babel.pdf
Binary files differ
diff --git a/macros/latex/required/babel/base/bbcompat.dtx b/macros/latex/required/babel/base/bbcompat.dtx
index 2692f30f20..ea753554b2 100644
--- a/macros/latex/required/babel/base/bbcompat.dtx
+++ b/macros/latex/required/babel/base/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2019/10/15 v3.35]
+\ProvidesFile{bbcompat.dtx}[2019/11/14 v3.36]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/macros/luatex/generic/luamplib/NEWS b/macros/luatex/generic/luamplib/NEWS
index f1813b925e..338804cbd7 100644
--- a/macros/luatex/generic/luamplib/NEWS
+++ b/macros/luatex/generic/luamplib/NEWS
@@ -1,5 +1,8 @@
History of the luamplib package
+2019/11/14 2.20.3
+ * fix issue #86 (LaTeX command inside metapost label)
+
2019/10/11 2.20.2
* fix issue #84 (pgf package hinders \mpcolor process)
diff --git a/macros/luatex/generic/luamplib/luamplib.dtx b/macros/luatex/generic/luamplib/luamplib.dtx
index 0ca8f9dbc5..c93ff8c829 100644
--- a/macros/luatex/generic/luamplib/luamplib.dtx
+++ b/macros/luatex/generic/luamplib/luamplib.dtx
@@ -1158,22 +1158,22 @@ luamplib.verbatiminput = false
% \begin{macrocode}
local function protect_expansion (str)
if str then
- str = str:gsub("\\","\1Control\1")
- :gsub("%%","\1Comment\1")
- :gsub("#", "\1HashSign\1")
- :gsub("{", "\1LBrace\1")
- :gsub("}", "\1RBrace\1")
+ str = str:gsub("\\","!!!Control!!!")
+ :gsub("%%","!!!Comment!!!")
+ :gsub("#", "!!!HashSign!!!")
+ :gsub("{", "!!!LBrace!!!")
+ :gsub("}", "!!!RBrace!!!")
return format("\\unexpanded{%s}",str)
end
end
local function unprotect_expansion (str)
if str then
- return str:gsub("\1Control\1", "\\")
- :gsub("\1Comment\1", "%%")
- :gsub("\1HashSign\1","#")
- :gsub("\1LBrace\1", "{")
- :gsub("\1RBrace\1", "}")
+ return str:gsub("!!!Control!!!", "\\")
+ :gsub("!!!Comment!!!", "%%")
+ :gsub("!!!HashSign!!!","#")
+ :gsub("!!!LBrace!!!", "{")
+ :gsub("!!!RBrace!!!", "}")
end
end
@@ -1210,7 +1210,11 @@ local function process_mplibcode (data)
% \begin{macrocode}
if not luamplib.verbatiminput then
data = data:gsub("\".-\"", protect_expansion)
+
+ data = data:gsub("\\%%", "\0PerCent\0")
data = data:gsub("%%.-\n","")
+ data = data:gsub("%zPerCent%z", "\\%%")
+
run_tex_code(format("\\mplibtmptoks\\expanded{{%s}}",data))
data = texgettoks"mplibtmptoks"
% \end{macrocode}
diff --git a/macros/luatex/generic/luamplib/luamplib.pdf b/macros/luatex/generic/luamplib/luamplib.pdf
index 246a651787..8d3fc8f72b 100644
--- a/macros/luatex/generic/luamplib/luamplib.pdf
+++ b/macros/luatex/generic/luamplib/luamplib.pdf
Binary files differ