[latex3-commits] [git/LaTeX3-latex3-babel] master: Fix spurious space introduced when fixing #80. (917a715)
Javier
email at dante.de
Mon Jul 13 18:06:42 CEST 2020
Repository : https://github.com/latex3/babel
On branch : master
Link : https://github.com/latex3/babel/commit/917a715a7967be16f88aeedcd58a9a12614ed956
>---------------------------------------------------------------
commit 917a715a7967be16f88aeedcd58a9a12614ed956
Author: Javier <email at localhost>
Date: Mon Jul 13 18:06:42 2020 +0200
Fix spurious space introduced when fixing #80.
>---------------------------------------------------------------
917a715a7967be16f88aeedcd58a9a12614ed956
README.md | 19 +++++++--
babel.dtx | 105 ++++++++++++++++++++++++++++---------------------
babel.ins | 2 +-
babel.pdf | Bin 793176 -> 792238 bytes
bbcompat.dtx | 2 +-
locale/ja/babel-ja.ini | 37 +++++++++--------
locale/ko/babel-ko.ini | 100 ++++++++++++++++++++++++----------------------
7 files changed, 153 insertions(+), 112 deletions(-)
diff --git a/README.md b/README.md
index 6ac28f4..51b28dd 100644
--- a/README.md
+++ b/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,9 +7,9 @@ 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.
@@ -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/babel.dtx b/babel.dtx
index 736f7e2..acc0b39 100644
--- a/babel.dtx
+++ b/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 at bsphack{%
+ \ifhmode
+ \hskip\z at skip
+ \def\bbl at esphack{\loop\ifdim\lastskip>\z@\unskip\repeat\unskip}%
+ \else
+ \let\bbl at 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 at 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 at tentative{\protect\bbl at tentative@i}
@@ -7204,18 +7227,12 @@ help from Bernd Raichle, for which I am grateful.
\bbl at id@assign
% switch captions, date
\ifcase\bbl at select@type
- \ifhmode
- \hskip\z at skip % trick to ignore spaces
- \csname captions#1\endcsname\relax
- \csname date#1\endcsname\relax
- \loop\ifdim\lastskip>\z@\unskip\repeat\unskip
- \else
+ \bbl at bsphack
\csname captions#1\endcsname\relax
\csname date#1\endcsname\relax
- \fi
+ \bbl at esphack
\else
- \ifhmode
- \hskip\z at skip % trick to ignore spaces
+ \bbl at bsphack
\bbl at xin@{,captions,}{,\bbl at 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 at xin@{,captions,}{,\bbl at select@opts,}%
- \ifin@
- \csname captions#1\endcsname\relax
- \fi
- \bbl at xin@{,date,}{,\bbl at select@opts,}%
- \ifin@
- \csname date#1\endcsname\relax
- \fi
- \fi
+ \bbl at esphack
\fi
% switch extras
\bbl at usehooks{beforeextras}{}%
@@ -7651,8 +7658,9 @@ help from Bernd Raichle, for which I am grateful.
\global\@namedef{#2}{\textbf{?#1?}}%
\@nameuse{#2}%
\bbl at 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 at tentative{\protect\bbl at tentative@i}
@@ -10278,6 +10286,7 @@ help from Bernd Raichle, for which I am grateful.
% \global\@namedef{bbl at lcname@#2}{#2}%
\bbl at id@assign
\let\bbl at KVP@captions\@nil
+ \let\bbl at KVP@date\@nil
\let\bbl at KVP@import\@nil
\let\bbl at KVP@main\@nil
\let\bbl at KVP@script\@nil
@@ -10306,7 +10315,7 @@ help from Bernd Raichle, for which I am grateful.
{\ifx\bbl at initoload\relax
\begingroup
\def\BabelBeforeIni##1##2{\gdef\bbl at KVP@import{##1}\endinput}%
- \bbl at input@ini{#2}%
+ \bbl at input@texini{#2}%
\endgroup
\else
\xdef\bbl at KVP@import{\bbl at initoload}%
@@ -10548,7 +10557,7 @@ help from Bernd Raichle, for which I am grateful.
\let\BabelBeforeIni\@gobbletwo
\chardef\atcatcode=\catcode`\@
\catcode`\@=11\relax
- \bbl at input@ini{\bbl at cs{rqtex@\languagename}}%
+ \bbl at input@texini{\bbl at 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 at ini@captions at aux\@gobbletwo
\def\bbl at inidate ####1.####2.####3.####4\relax ####5####6{}%
\bbl at 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 at initoload\relax
- \bbl at input@ini{#1}%
+ \bbl at input@texini{#1}%
\else
\setbox\z@\hbox{\BabelBeforeIni{\bbl at initoload}{}}%
\fi
@@ -10748,8 +10757,13 @@ help from Bernd Raichle, for which I am grateful.
\ifx\bbl at readstream\@undefined
\csname newread\endcsname\bbl at readstream
\fi
-\def\bbl at input@ini#1{%
- \bbl at exp{\lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}}}
+\def\bbl at input@texini#1{%
+ \bbl at bsphack
+ \bbl at exp{%
+ \catcode`\\\%=14
+ \lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}%
+ \catcode`\\\%=\the\catcode`\%\relax}%
+ \bbl at esphack}
\def\bbl at inipreread#1=#2\@@{%
\bbl at trim@def\bbl at tempa{#1}% Redundant below !!
\bbl at trim\toks@{#2}%
@@ -11187,11 +11201,11 @@ help from Bernd Raichle, for which I am grateful.
\begingroup
\bbl at add\bbl at secpost@identification{\closein\bbl at readstream }%
\catcode`\[=12 \catcode`\]=12 \catcode`\==12
- \catcode`\;=12 \catcode`\|=12 %
+ \catcode`\;=12 \catcode`\|=12 \catcode`\%=14
\bbl at read@ini{##1}1%
\endinput % babel- .tex may contain onlypreamble's
\endgroup}% boxed, to avoid extra spaces:
- {\bbl at input@ini{#1}}}
+ {\bbl at 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 at read@ini|.
%
% \begin{macrocode}
-\newcommand\getlocaleproperty[3]{%
+\newcommand\getlocaleproperty{%
+ \@ifstar\bbl at getproperty@s\bbl at getproperty@x}
+\def\bbl at getproperty@s#1#2#3{%
\let#1\relax
\def\bbl at elt##1##2##3{%
\bbl at ifsamestring{##1/##2}{#3}%
{\providecommand#1{##3}%
\def\bbl at elt####1####2####3{}}%
{}}%
- \bbl at cs{inidata@#2}%
+ \bbl at cs{inidata@#2}}%
+\def\bbl at getproperty@x#1#2#3{%
+ \bbl at getproperty@s{#1}{#2}{#3}%
\ifx#1\relax
\bbl at error
{Unknown key for locale '#2':\\%
@@ -11386,8 +11404,7 @@ help from Bernd Raichle, for which I am grateful.
\newif\ifbbl at bcptoname
\@namedef{bbl at ADJ@bcp47.toname at on}{%
\bbl at bcptonametrue
- \BabelEnsureInfo
- }
+ \BabelEnsureInfo}
\@namedef{bbl at ADJ@bcp47.toname at off}{%
\bbl at bcptonamefalse}
% TODO: use babel name, override
diff --git a/babel.ins b/babel.ins
index 5c8abdc..f967de9 100644
--- a/babel.ins
+++ b/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/babel.pdf b/babel.pdf
index 0a1444e..1e8c2a0 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 84777f9..9a2431f 100644
--- a/bbcompat.dtx
+++ b/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'
diff --git a/locale/ja/babel-ja.ini b/locale/ja/babel-ja.ini
index 851f410..2e25548 100644
--- a/locale/ja/babel-ja.ini
+++ b/locale/ja/babel-ja.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.5
-date = 2020-06-30
+version = 1.6
+date = 2020-07-10
name.local = 日本語
name.english = Japanese
name.babel = japanese
@@ -29,27 +29,30 @@ encodings =
derivate = no
[captions]
-preface =
-ref =
-abstract =
-bib =
-chapter =
-appendix =
-contents =
-listfigure =
-listtable =
-index =
-figure =
-table =
-part =
+; some key names are tentative
+preface = 前書き
+ref = 参考文献
+abstract = 概要
+bib = 参考文献
+prechapter = 第
+postchapter = 章
+appendix = 付録
+contents = 目次
+listfigure = 図目次
+listtable = 表目次
+index = 索引
+figure = 図
+table = 表
+part = 第
+postpart = 部
encl =
cc =
headto =
page =
see =
also =
-proof =
-glossary =
+proof = 証明
+glossary = 用語集
[captions.licr]
preface =
diff --git a/locale/ko/babel-ko.ini b/locale/ko/babel-ko.ini
index 88a619a..425073a 100644
--- a/locale/ko/babel-ko.ini
+++ b/locale/ko/babel-ko.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.6
-date = 2020-06-30
+version = 1.7
+date = 2020-07-10
name.local = 한국어
name.english = Korean
name.babel = korean
@@ -30,27 +30,34 @@ encodings =
derivate = no
[captions]
-preface =
-ref =
-abstract =
-bib =
-chapter =
-appendix =
-contents =
-listfigure =
-listtable =
-index =
-figure =
-table =
-part =
-encl =
-cc =
-headto =
-page =
+; names based on kotex
+preface = 서문
+ref = 참고 문헌
+abstract = 요 약
+bib = 참고 문헌
+prechapter = 제
+postchapter = 장
+appendix = 부록
+contents = 차 례
+listfigure = 그림 차례
+listtable = 표 차례
+index = 찾아보기
+figure = 그림
+table = 표
+prepart = 제
+postpart = 편
+encl = 동봉물
+cc = 사본
+headto = 받는이
+page = 페이지
+; see = \을~참고
see =
+; also = \을~함께~참고
also =
-proof =
-glossary =
+proof = 증명
+glossary = 용어집
+presection = 제
+postsection = 절
[captions.licr]
preface =
@@ -76,32 +83,32 @@ proof =
glossary =
[date.gregorian]
-date.long = [y]년 [M]월 [d]일
+date.long = [y|digits]年 [m|hanja.informal]月 [d|hanja.informal]日
date.short = [yy]. [M]. [d].
-months.wide.1 = 1월
-months.wide.2 = 2월
-months.wide.3 = 3월
-months.wide.4 = 4월
-months.wide.5 = 5월
-months.wide.6 = 6월
-months.wide.7 = 7월
-months.wide.8 = 8월
-months.wide.9 = 9월
-months.wide.10 = 10월
-months.wide.11 = 11월
-months.wide.12 = 12월
-months.narrow.1 = 1월
-months.narrow.2 = 2월
-months.narrow.3 = 3월
-months.narrow.4 = 4월
-months.narrow.5 = 5월
-months.narrow.6 = 6월
-months.narrow.7 = 7월
-months.narrow.8 = 8월
-months.narrow.9 = 9월
-months.narrow.10 = 10월
-months.narrow.11 = 11월
-months.narrow.12 = 12월
+months.wide.1 = 1月
+months.wide.2 = 2月
+months.wide.3 = 3月
+months.wide.4 = 4月
+months.wide.5 = 5月
+months.wide.6 = 6月
+months.wide.7 = 7月
+months.wide.8 = 8月
+months.wide.9 = 9月
+months.wide.10 = 10月
+months.wide.11 = 11月
+months.wide.12 = 12月
+months.narrow.1 = 1月
+months.narrow.2 = 2月
+months.narrow.3 = 3月
+months.narrow.4 = 4月
+months.narrow.5 = 5月
+months.narrow.6 = 6月
+months.narrow.7 = 7月
+months.narrow.8 = 8月
+months.narrow.9 = 9月
+months.narrow.10 = 10月
+months.narrow.11 = 11月
+months.narrow.12 = 12月
days.wide.mon = 월요일
days.wide.tue = 화요일
days.wide.wed = 수요일
@@ -158,6 +165,7 @@ punctuation = [‾ _ _ \\- - ‐ — ― 〜 ・ , , 、 ; ; \\: : !
[numbers]
defaultNumberingSystem = latn
+digits.native = 〇一二三四五六七八九
minimumGroupingDigits = 1
decimal = .
exponential = E
More information about the latex3-commits
mailing list.