summaryrefslogtreecommitdiff
path: root/macros/latex/required
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-07-14 03:02:49 +0000
committerNorbert Preining <norbert@preining.info>2020-07-14 03:02:49 +0000
commita23384c1d210b665587f954b540d2b2dbc6c2de0 (patch)
treebb4c06348f6bd392a283c9a27f763a55a55e1bba /macros/latex/required
parent6f2b7e75418a2fad9e80f85a4c97d3fa4da8978b (diff)
CTAN sync 202007140302
Diffstat (limited to 'macros/latex/required')
-rw-r--r--macros/latex/required/babel/base/README.md21
-rw-r--r--macros/latex/required/babel/base/babel.dtx105
-rw-r--r--macros/latex/required/babel/base/babel.ins2
-rw-r--r--macros/latex/required/babel/base/babel.pdfbin793176 -> 792238 bytes
-rw-r--r--macros/latex/required/babel/base/bbcompat.dtx2
5 files changed, 80 insertions, 50 deletions
diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md
index 6ac28f4107..51b28dd172 100644
--- a/macros/latex/required/babel/base/README.md
+++ b/macros/latex/required/babel/base/README.md
@@ -1,4 +1,4 @@
-## Babel 3.46
+## Babel 3.47
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -7,11 +7,11 @@ lualatex out of the box. A few even work with plain formats.
The latest stable version is available on <https://ctan.org/pkg/babel>.
-Changes in version 3.46 are described in:
+Changes in version 3.47 are described in:
-https://github.com/latex3/babel/wiki/What's-new-in-babel-3.46
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.47
-Included is a set of ini files for about 200 languages.
+Included is a set of ini files for about 200 languages.
The best way to install and/or update it is with the help of package
managers.
@@ -44,7 +44,19 @@ respective authors.
### Latest changes
```
+3.47 2020-07-13
+ - Fixes:
+ - Spurious spaces when autoloading locales (bug introduced
+ in 3.46 when fixing #80).
+ - In dtx files, autoloading printed some spurious text
+ (because % is set to ignore, #87).
+ - New - \getlocaleproperty*, which doesn't raise an error.
+ - Basic ini+tex templates for about 500 languages in the GitHub
+ repository.
+
3.46 2020-07-06
+ - Languages can now be optionally selected with their BCP 47
+ tags.
- \BabelEnsureInfo now loads the basic data for the requested
languages immediately (formerly it was done at the end of the
preamble).
@@ -56,6 +68,7 @@ respective authors.
- Locale info was not loaded if the name had uppercase letters
in some OSs (#80).
- The [..|..] syntax in ini dates didn't recognize 'digits'.
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.46
3.45 2020-06-10
- Minor fixes in Hindi, Ancient Greek, Macedonian.
diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx
index 736f7e25bf..acc0b3953c 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}[2020/07/07 v3.46 The Babel package]
+\ProvidesFile{babel.dtx}[2020/07/13 v3.47 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -2304,13 +2304,15 @@ 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:
\begin{verbatim}
-Package babel Warning: \mylangchaptername not set. Please, define
-(babel) it in the preamble with something like:
+Package babel Warning: \mylangchaptername not set. Please, define it
+(babel) after the language has been loaded (typically
+(babel) in the preamble) with something like:
(babel) \renewcommand\maylangchaptername{..}
(babel) Reported on input line 18.
\end{verbatim}
-In most cases, you will only need to define a few macros.
+In most cases, you will only need to define a few macros. Note
+languages loaded on the fly are not yet available in the preamble.
\begin{example}
If you need a language named |arhinish|:
@@ -2710,7 +2712,9 @@ expandable, and the available fields are:
counterintuitive.
\end{warning}
-\Describe{\getlocaleproperty}{\marg{macro}\marg{locale}\marg{property}}
+\Describe{\getlocaleproperty}{%
+ \colorbox{thegrey}{\ttfamily\hskip-.2em*\hskip-.2em}%
+ \marg{macro}\marg{locale}\marg{property}}
\New{3.42} The value of any locale property as set by the |ini| files
(or added/modified with |\babelprovide|) can be retrieved and stored in
@@ -2721,6 +2725,10 @@ a macro with this command. For example, after:
the macro |\hechap| will contain the string
{\fontspec[Scale=.87,Script=Hebrew]{Liberation Mono}\textdir TRT פרק}.
+If the key does not exist, the macro is set to |\relax| and an error is
+raised. \New{3.47} With the starred version no error is raised, so that
+you can take your own actions with undefined properties.
+
\Babel{} remembers which |ini| files have been loaded. There is a loop
named |\LocaleForEach| to traverse the list, where |#1| is the name of
the current item, so that |\LocaleForEach{\message{ **#1** }}| just
@@ -3942,7 +3950,8 @@ but if you want to do it, here are a few guidelines.
\end{itemize}
The following page provides a starting point:
-\texttt{http://www.texnia.com/incubator.html}.
+\texttt{http://www.texnia.com/incubator.html}. See also
+\texttt{https://github.com/latex3/babel/wiki/List-of-locale-templates}.
If you need further assistance and technical advice in the
development of language styles, I am willing to help you. And of
@@ -4682,8 +4691,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.46>>
-%<<date=2020/07/07>>
+%<<version=3.47>>
+%<<date=2020/07/13>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -4965,6 +4974,19 @@ help from Bernd Raichle, for which I am grateful.
\else
\@ne
\fi
+% \end{macrocode}
+%
+% A somewhat hackish tool (hence its name) to avoid spurious spaces in
+% some contexts.
+%
+% \begin{macrocode}
+\def\bbl@bsphack{%
+ \ifhmode
+ \hskip\z@skip
+ \def\bbl@esphack{\loop\ifdim\lastskip>\z@\unskip\repeat\unskip}%
+ \else
+ \let\bbl@esphack\@empty
+ \fi}
%<</Basic macros>>
% \end{macrocode}
%
@@ -5090,8 +5112,9 @@ help from Bernd Raichle, for which I am grateful.
\global\@namedef{#2}{\textbf{?#1?}}%
\@nameuse{#2}%
\bbl@warning{%
- \@backslashchar#2 not set. Please, define\\%
- it in the preamble with something like:\\%
+ \@backslashchar#2 not set. Please, define it\\%
+ after the language has been loaded (typically\\%
+ in the preamble) with something like:\\%
\string\renewcommand\@backslashchar#2{..}\\%
Reported}}
\def\bbl@tentative{\protect\bbl@tentative@i}
@@ -7204,18 +7227,12 @@ help from Bernd Raichle, for which I am grateful.
\bbl@id@assign
% switch captions, date
\ifcase\bbl@select@type
- \ifhmode
- \hskip\z@skip % trick to ignore spaces
- \csname captions#1\endcsname\relax
- \csname date#1\endcsname\relax
- \loop\ifdim\lastskip>\z@\unskip\repeat\unskip
- \else
+ \bbl@bsphack
\csname captions#1\endcsname\relax
\csname date#1\endcsname\relax
- \fi
+ \bbl@esphack
\else
- \ifhmode
- \hskip\z@skip % trick to ignore spaces
+ \bbl@bsphack
\bbl@xin@{,captions,}{,\bbl@select@opts,}%
\ifin@
\csname captions#1\endcsname\relax
@@ -7224,17 +7241,7 @@ help from Bernd Raichle, for which I am grateful.
\ifin@ % if \foreign... within \<lang>date
\csname date#1\endcsname\relax
\fi
- \loop\ifdim\lastskip>\z@\unskip\repeat\unskip
- \else
- \bbl@xin@{,captions,}{,\bbl@select@opts,}%
- \ifin@
- \csname captions#1\endcsname\relax
- \fi
- \bbl@xin@{,date,}{,\bbl@select@opts,}%
- \ifin@
- \csname date#1\endcsname\relax
- \fi
- \fi
+ \bbl@esphack
\fi
% switch extras
\bbl@usehooks{beforeextras}{}%
@@ -7651,8 +7658,9 @@ help from Bernd Raichle, for which I am grateful.
\global\@namedef{#2}{\textbf{?#1?}}%
\@nameuse{#2}%
\bbl@warning{%
- \@backslashchar#2 not set. Please, define\\%
- it in the preamble with something like:\\%
+ \@backslashchar#2 not set. Please, define it\\%
+ after the language has been loaded (typically\\%
+ in the preamble) with something like:\\%
\string\renewcommand\@backslashchar#2{..}\\%
Reported}}
\def\bbl@tentative{\protect\bbl@tentative@i}
@@ -10278,6 +10286,7 @@ help from Bernd Raichle, for which I am grateful.
% \global\@namedef{bbl@lcname@#2}{#2}%
\bbl@id@assign
\let\bbl@KVP@captions\@nil
+ \let\bbl@KVP@date\@nil
\let\bbl@KVP@import\@nil
\let\bbl@KVP@main\@nil
\let\bbl@KVP@script\@nil
@@ -10306,7 +10315,7 @@ help from Bernd Raichle, for which I am grateful.
{\ifx\bbl@initoload\relax
\begingroup
\def\BabelBeforeIni##1##2{\gdef\bbl@KVP@import{##1}\endinput}%
- \bbl@input@ini{#2}%
+ \bbl@input@texini{#2}%
\endgroup
\else
\xdef\bbl@KVP@import{\bbl@initoload}%
@@ -10548,7 +10557,7 @@ help from Bernd Raichle, for which I am grateful.
\let\BabelBeforeIni\@gobbletwo
\chardef\atcatcode=\catcode`\@
\catcode`\@=11\relax
- \bbl@input@ini{\bbl@cs{rqtex@\languagename}}%
+ \bbl@input@texini{\bbl@cs{rqtex@\languagename}}%
\catcode`\@=\atcatcode
\let\atcatcode\relax
\fi}%
@@ -10674,7 +10683,7 @@ help from Bernd Raichle, for which I am grateful.
{\def\BabelBeforeIni##1##2{%
\begingroup
\catcode`\[=12 \catcode`\]=12 \catcode`\==12
- \catcode`\;=12 \catcode`\|=12 %
+ \catcode`\;=12 \catcode`\|=12 \catcode`\%=14
\let\bbl@ini@captions@aux\@gobbletwo
\def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}%
\bbl@read@ini{##1}0%
@@ -10692,7 +10701,7 @@ help from Bernd Raichle, for which I am grateful.
\endgroup}%
\begingroup % boxed, to avoid extra spaces:
\ifx\bbl@initoload\relax
- \bbl@input@ini{#1}%
+ \bbl@input@texini{#1}%
\else
\setbox\z@\hbox{\BabelBeforeIni{\bbl@initoload}{}}%
\fi
@@ -10748,8 +10757,13 @@ help from Bernd Raichle, for which I am grateful.
\ifx\bbl@readstream\@undefined
\csname newread\endcsname\bbl@readstream
\fi
-\def\bbl@input@ini#1{%
- \bbl@exp{\lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}}}
+\def\bbl@input@texini#1{%
+ \bbl@bsphack
+ \bbl@exp{%
+ \catcode`\\\%=14
+ \lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}%
+ \catcode`\\\%=\the\catcode`\%\relax}%
+ \bbl@esphack}
\def\bbl@inipreread#1=#2\@@{%
\bbl@trim@def\bbl@tempa{#1}% Redundant below !!
\bbl@trim\toks@{#2}%
@@ -11187,11 +11201,11 @@ help from Bernd Raichle, for which I am grateful.
\begingroup
\bbl@add\bbl@secpost@identification{\closein\bbl@readstream }%
\catcode`\[=12 \catcode`\]=12 \catcode`\==12
- \catcode`\;=12 \catcode`\|=12 %
+ \catcode`\;=12 \catcode`\|=12 \catcode`\%=14
\bbl@read@ini{##1}1%
\endinput % babel- .tex may contain onlypreamble's
\endgroup}% boxed, to avoid extra spaces:
- {\bbl@input@ini{#1}}}
+ {\bbl@input@texini{#1}}}
% \end{macrocode}
%
% Alphabetic counters must be converted from a space separated list to
@@ -11287,14 +11301,18 @@ help from Bernd Raichle, for which I am grateful.
% |\bbl@read@ini|.
%
% \begin{macrocode}
-\newcommand\getlocaleproperty[3]{%
+\newcommand\getlocaleproperty{%
+ \@ifstar\bbl@getproperty@s\bbl@getproperty@x}
+\def\bbl@getproperty@s#1#2#3{%
\let#1\relax
\def\bbl@elt##1##2##3{%
\bbl@ifsamestring{##1/##2}{#3}%
{\providecommand#1{##3}%
\def\bbl@elt####1####2####3{}}%
{}}%
- \bbl@cs{inidata@#2}%
+ \bbl@cs{inidata@#2}}%
+\def\bbl@getproperty@x#1#2#3{%
+ \bbl@getproperty@s{#1}{#2}{#3}%
\ifx#1\relax
\bbl@error
{Unknown key for locale '#2':\\%
@@ -11386,8 +11404,7 @@ help from Bernd Raichle, for which I am grateful.
\newif\ifbbl@bcptoname
\@namedef{bbl@ADJ@bcp47.toname@on}{%
\bbl@bcptonametrue
- \BabelEnsureInfo
- }
+ \BabelEnsureInfo}
\@namedef{bbl@ADJ@bcp47.toname@off}{%
\bbl@bcptonamefalse}
% TODO: use babel name, override
diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins
index 5c8abdc75d..f967de9e71 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{2020/07/07}
+\def\filedate{2020/07/13}
\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 0a1444e583..1e8c2a087d 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 84777f9f2a..9a2431ff45 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}[2020/07/07 v3.46]
+\ProvidesFile{bbcompat.dtx}[2020/07/13 v3.47]
%</dtx>
%
%% File 'bbcompat.dtx'