[latex3-commits] [git/LaTeX3-latex3-babel] master: Fix #93. Bump to 3.48. (2ed74b9)

Javier email at dante.de
Tue Sep 1 15:23:52 CEST 2020


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/2ed74b904a8c3ec34357553c30a5194dc56a11ec

>---------------------------------------------------------------

commit 2ed74b904a8c3ec34357553c30a5194dc56a11ec
Author: Javier <email at localhost>
Date:   Tue Sep 1 15:23:52 2020 +0200

    Fix #93. Bump to 3.48.


>---------------------------------------------------------------

2ed74b904a8c3ec34357553c30a5194dc56a11ec
 babel.dtx                                        |  99 +++++++++++++----------
 samples/{numerals.pdf => hungarian-japanese.pdf} | Bin 186949 -> 228420 bytes
 samples/hungarian-japanese.tex                   |  54 +++++++++++++
 3 files changed, 109 insertions(+), 44 deletions(-)

diff --git a/babel.dtx b/babel.dtx
index 14e5bee..51153eb 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/08/30 v3.47.2115 The Babel package]
+\ProvidesFile{babel.dtx}[2020/09/01 v3.48 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -249,25 +249,26 @@ and usually it can be ignored.
   most recent features can be still unstable. 
 
 \item[\sffamily\color{messages}Can I help?] Sure! If you are interested
-  in the \TeX{} multilingual support, please join the
-  \href{http://tug.org/mailman/listinfo/kadingira}{kadingira mail
-  list}. You can follow the development of \babel{} in
-  \href{https://github.com/latex3/babel}{GitHub}; feel free to fork it
-  and make pull requests. If you are the author of a package, send to
-  me a few test files which I'll add to mine, so that possible issues
-  can be caught in the development phase.
-  
-\item[\sffamily\color{messages}I’ve found an error.] Please, report any
-  issues you find in
-  \href{https://github.com/latex3/babel/issues}{GitHub}, which is
-  better than just complaining on an e-mail list or a web forum.
+in the \TeX{} multilingual support, please join the
+\href{http://tug.org/mailman/listinfo/kadingira}{kadingira mail list}.
+You can follow the development of \babel{} in
+\href{https://github.com/latex3/babel}{GitHub} and make suggestions; feel
+free to fork it and make pull requests. If you are the author of a
+package, send to me a few test files which I'll add to mine, so that
+possible issues can be caught in the development phase.
+  
+\item[\sffamily\color{messages}It doesn't work for me!] You can ask for
+help in some forums like \textsf{tex.stackexchange}, but if you have
+found a bug, I strongly beg you to report it in
+\href{https://github.com/latex3/babel/issues}{GitHub}, which is much
+better than just complaining on an e-mail list or a web forum.
 
 \item[\sffamily\color{messages}How can I contribute a new
 language?] See section \ref{contribute} for contributing a language.
 
 \item[\sffamily\color{messages}I only need learn the most basic
 features.] The first subsections (1.1-1.3) describe the traditional way
-of loading a language (with |ldf| files), and usually is all you need.
+of loading a language (with |ldf| files), which is usually all you need.
 The alternative way based on |ini| files, which complements the
 previous one (it does \textit{not} replace it, although it is still
 necessary in some languages), is described below; go to \ref{inifiles}.
@@ -3787,6 +3788,14 @@ version of |\foreignlanguage|).
 For old an deprecated functions, see the wiki.
 
 \medskip
+\textbf{Labels}
+
+\New{3.48} There is some work in progress for \babel{} to deal with
+labels, both with the relation to captions (chapters, part), and how
+counters are used to define them. It is still somewhat tentative
+because it is far from trivial -- see the wiki for further details.
+
+\medskip
 \textbf{\string\babelprehyphenation}
 
 \New{3.44} Note it is tentative, but the current behavior for glyphs
@@ -4735,8 +4744,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.47.2115>>
-%<<date=2020/08/30>>
+%<<version=3.48>>
+%<<date=2020/09/01>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5758,8 +5767,10 @@ help from Bernd Raichle, for which I am grateful.
        \set at typeset@protect
        \expandafter\select at language@x\expandafter{\bbl at main@language}%
        \let\protect\noexpand
-       \edef\thepage{% TODO. Only with bidi. See also above
-         \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}}%
+       \ifcase\bbl at bidimode\else % Only with bidi. See also above
+         \edef\thepage{%
+           \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}%
+       \fi}%
    \fi}
   {\ifbbl at single\else
      \bbl at ifunset{markright }\bbl at redefine\bbl at redefinerobust
@@ -7062,11 +7073,12 @@ help from Bernd Raichle, for which I am grateful.
 %  \begin{macro}{\bbl at pop@lang}
 %    This macro stores its first element (which is delimited by the
 %    `+'-sign) in |\languagename| and stores the rest of the string
-%    (delimited by `-') in its third argument.
+%    in |\bbl at language@stack|.
 %
 %    \begin{macrocode}
-\def\bbl at pop@lang#1+#2&#3{%
-  \edef\languagename{#1}\xdef#3{#2}}
+\def\bbl at pop@lang#1+#2\@@{%
+  \edef\languagename{#1}%
+  \xdef\bbl at language@stack{#2}}
 %    \end{macrocode}
 %
 %  \end{macro}
@@ -7077,13 +7089,12 @@ help from Bernd Raichle, for which I am grateful.
 % result of that is that the argument string of |\bbl at pop@lang|
 % contains one or more language names, each followed by a `+'-sign
 % (zero language names won't occur as this macro will only be
-% called after something has been pushed on the stack) followed by
-% the `\&'-sign and finally the reference to the stack.
+% called after something has been pushed on the stack).
 %
 %    \begin{macrocode}
 \let\bbl at ifrestoring\@secondoftwo
 \def\bbl at pop@language{%
-  \expandafter\bbl at pop@lang\bbl at language@stack&\bbl at language@stack
+  \expandafter\bbl at pop@lang\bbl at language@stack\@@
   \let\bbl at ifrestoring\@firstoftwo
   \expandafter\bbl at set@language\expandafter{\languagename}%
   \let\bbl at ifrestoring\@secondoftwo}
@@ -10257,8 +10268,6 @@ help from Bernd Raichle, for which I am grateful.
 %
 % \subsection{Layout}
 %
-% \textbf{Work in progress}.
-%
 % Layout is mainly intended to set bidi documents, but there is at
 % least a tool useful in general.
 %
@@ -11055,10 +11064,10 @@ help from Bernd Raichle, for which I am grateful.
     \bbl at replace\bbl at tempa{.template}{}%
     \def\bbl at toreplace{#2}%
     \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
-    \bbl at replace\bbl at toreplace{[[}{\bbl at bktoname}%
-    \bbl at replace\bbl at toreplace{[}{\bbl at bktothe}% 
-    \bbl at replace\bbl at toreplace{]]}{\@@}% 
-    \bbl at replace\bbl at toreplace{]}{\@@}% 
+    \bbl at replace\bbl at toreplace{[[}{\csname}%
+    \bbl at replace\bbl at toreplace{[}{\csname the}% 
+    \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
+    \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
     \bbl at xin@{,\bbl at tempa,}{,chapter,}%
     \ifin@
       \bbl at patchchapter
@@ -11098,29 +11107,26 @@ help from Bernd Raichle, for which I am grateful.
 %    \end{macrocode}
 %
 % \textbf{Labels.} Captions must contain just strings, no
-% format at all, so there is new group in ini files. Currently there
-% are two 
+% format at all, so there is new group in ini files. 
 % 
 %    \begin{macrocode}
-\def\bbl at bktoname#1\@@{\csname#1name\endcsname} % TODO - ugly
-\def\bbl at bktothe#1\@@{\csname the#1\endcsname}
 \def\bbl at list@the{%
   part,chapter,section,subsection,subsubsection,paragraph,%
   subparagraph,enumi,enumii,enumiii,enumiv,equation,figure,%
-  table,page,footnote,mpfootnote,mpfn} % Include \thempfn?
+  table,page,footnote,mpfootnote,mpfn}
 \def\bbl at map@cnt#1{%  #1:roman,etc, // #2:enumi,etc
   \bbl at ifunset{bbl at map@#1@\languagename}%
     {\@nameuse{#1}}%
     {\@nameuse{bbl at map@#1@\languagename}}}
 \def\bbl at inikv@labels#1=#2\@@{%
-  \in@{map.}{#1}%
+  \in@{.map}{#1}%
   \ifin@
     \ifx\bbl at KVP@labels\@nil\else
-      \bbl at xin@{ maps }{ \bbl at KVP@labels\space}%
+      \bbl at xin@{ map }{ \bbl at KVP@labels\space}%
       \ifin@
         \def\bbl at tempc{#1}%
-        \bbl at replace\bbl at tempc{map.}{}%
-        \in@{,#2,}{,arabic,roman,Roman,alph,Alph,}%
+        \bbl at replace\bbl at tempc{.map}{}%
+        \in@{,#2,}{,arabic,roman,Roman,alph,Alph,fnsymbol,}%
         \bbl at exp{%
           \gdef\<bbl at map@\bbl at tempc @\languagename>%
             {\ifin@\<#2>\else\\\localecounter{#2}\fi}}%
@@ -11143,11 +11149,16 @@ help from Bernd Raichle, for which I am grateful.
   \else
     %
     % The following code is still under study. You can test it and make
-    % suggestions.
+    % suggestions. Eg, enumerate.2 = ([enumi]).([enumii]). It's
+    % language dependent.
     \in@{enumerate.}{#1}%
     \ifin@
       \def\bbl at tempa{#1}%
       \bbl at replace\bbl at tempa{enumerate.}{}%
+      \def\bbl at toreplace{#2}%
+      \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
+      \bbl at replace\bbl at toreplace{[}{\csname the}% 
+      \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
       \toks@\expandafter{\bbl at toreplace}%
       \bbl at exp{%
         \\\bbl at add\<extras\languagename>{%
@@ -11157,13 +11168,13 @@ help from Bernd Raichle, for which I am grateful.
     \fi
   \fi}
 %    \end{macrocode}
-%% 
+%
 % To show correctly some captions in a few languages, we need to patch
 % some internal macros, because the order is hardcoded. For example, in
 % Japanese the chapter number is surrounded by two string, while in
 % Hungarian is placed after. These replacement works in many classes,
-% but not all.
-
+% but not all. Actually, the following lines are somewhat tentative.
+%
 %    \begin{macrocode}
 \def\bbl at chaptype{chap}
 \ifx\@makechapterhead\@undefined
@@ -11376,7 +11387,7 @@ help from Bernd Raichle, for which I am grateful.
          \bbl at warning
            {Neither 0 nor ZERO WIDTH SPACE are available\\%
             in the current font, and therefore the hyphen\\%
-            will be printed. Try changing the fontspec\\%
+            will be printed. Try changing the fontspec's\\%
             'HyphenChar' to another value, but be aware\\%
             this setting is not safe (see the manual)}%
          \hyphenchar\font\defaulthyphenchar     
diff --git a/samples/numerals.pdf b/samples/hungarian-japanese.pdf
similarity index 55%
copy from samples/numerals.pdf
copy to samples/hungarian-japanese.pdf
index 8b55a11..420a3b9 100644
Binary files a/samples/numerals.pdf and b/samples/hungarian-japanese.pdf differ
diff --git a/samples/hungarian-japanese.tex b/samples/hungarian-japanese.tex
new file mode 100644
index 0000000..8e7ab51
--- /dev/null
+++ b/samples/hungarian-japanese.tex
@@ -0,0 +1,54 @@
+\documentclass{book}
+
+\usepackage
+  % [layout=sectioning]
+  {babel}
+
+\usepackage{hyperref}
+
+\babelprovide[
+  import, main,
+  % labels = map, labels/arabic.map = informal
+]{japanese}
+\babelprovide[import]{hungarian}
+
+\babelfont{rm}{IPAexMincho}
+\babelfont[hungarian]{rm}{FreeSerif}
+
+\begin{document}
+
+\tableofcontents
+
+\chapter{日本}
+
+日本語を通用する日本人が国民の大半を占める。自然地理的には、ユーラシア大陸の東縁に位置しており、環太平洋火山帯を構成する。島嶼国であり、領土の四方を海に囲まれているため地続きの国境は存在しない。日本列島は、離島も含めて6,848(時代により変動)の島を有する。気候区分は、北は亜寒帯から南は亜熱帯まで様々な気候区分に属している。
+
+\selectlanguage{hungarian}
+
+\chapter{Magyarország}
+
+A finnugor nyelvcsalád legnagyobb lélekszámú és legnyugatibb csoportját
+képező, vándorlásaik során török és keleti szláv népekkel érintkező, a
+Kárpát-medencében való letelepedésüket követően számos etnikai elemet
+és kulturális jelenséget magába olvasztó, illetve átvevő magyarság
+etnikai-táji szerkezete más európai népekéhez képest egységes.
+
+\selectlanguage{japanese}
+
+\appendix
+
+\chapter{日本}
+
+日本語を通用する日本人が国民の大半を占める。自然地理的には、ユーラシア大陸の東縁に位置しており、環太平洋火山帯を構成する。島嶼国であり、領土の四方を海に囲まれているため地続きの国境は存在しない。日本列島は、離島も含めて6,848(時代により変動)の島を有する。気候区分は、北は亜寒帯から南は亜熱帯まで様々な気候区分に属している。
+
+\selectlanguage{hungarian}
+
+\chapter{Magyarország}
+
+A finnugor nyelvcsalád legnagyobb lélekszámú és legnyugatibb csoportját
+képező, vándorlásaik során török és keleti szláv népekkel érintkező, a
+Kárpát-medencében való letelepedésüket követően számos etnikai elemet
+és kulturális jelenséget magába olvasztó, illetve átvevő magyarság
+etnikai-táji szerkezete más európai népekéhez képest egységes.
+
+\end{document}
\ No newline at end of file





More information about the latex3-commits mailing list.