[latex3-commits] [git/LaTeX3-latex3-babel] main: Fix #131. (0eccb92)

Javier email at dante.de
Sun Jul 4 12:25:25 CEST 2021


Repository : https://github.com/latex3/babel
On branch  : main
Link       : https://github.com/latex3/babel/commit/0eccb92781de169675322a7c0e08a0af52d2eebd

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

commit 0eccb92781de169675322a7c0e08a0af52d2eebd
Author: Javier <email at localhost>
Date:   Sun Jul 4 12:25:25 2021 +0200

    Fix #131.


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

0eccb92781de169675322a7c0e08a0af52d2eebd
 README.md    |   6 ++++--
 babel.dtx    |  39 ++++++++++++++++++++++++++++++++++++---
 babel.ins    |   2 +-
 babel.pdf    | Bin 847339 -> 849972 bytes
 bbcompat.dtx |   2 +-
 5 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 9150416..f414ffd 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.61.2419
+## Babel 3.61.2423
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages. Many
@@ -47,7 +47,9 @@ respective authors.
 ### Summary of Latest changes
 ```
 3.62   2021-??-??
-       * No errors with undefined languages in aux file.
+       * No errors with unknown languages in aux file.
+       * Fixes:
+         - Locale dependent quotes with CJK (#131).
        
 3.61   2021-06-28
        * Improved justification=kashida/elongated: hboxes (lua).
diff --git a/babel.dtx b/babel.dtx
index 586232b..5aa591e 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/06/30 v3.61.2419 The Babel package]
+\ProvidesFile{babel.dtx}[2021/07/04 v3.61.2423 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -697,6 +697,14 @@ This command can be used as environment, too.
   code with an additional grouping level.
 \end{warning}
 
+\begin{warning}
+  |\selectlanguage| should not be used inside some boxed environments
+  (like floats or |minipage|) to switch the language if you need the
+  information written to the |aux| be correctly synchronized. This
+  rarely happens, but if it were the case, you must use |otherlanguage|
+  instead.
+\end{warning}
+
 \Describe{\foreignlanguage}{\oarg{option-list}\marg{language}\marg{text}}
 
 The command |\foreignlanguage| takes two arguments; the second argument
@@ -746,6 +754,8 @@ environment with an additional grouping, like braces |{}|.
 
 Spaces after the environment are ignored.
 
+
+
 \Describe{\begin\menv{otherlanguage*}}%
 {\oarg{option-list}\marg{language}\Eenv{otherlanguage*}}
 
@@ -4980,8 +4990,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.61.2419>>
-%<<date=2021/06/30>>
+%<<version=3.61.2423>>
+%<<date=2021/07/04>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -11073,6 +11083,24 @@ help from Bernd Raichle, for which I am grateful.
     \bbl at csarg\edef{intsp@#2}{\bbl at KVP@intraspace}%
   \fi
   \bbl at provide@intraspace
+  % == Line breaking: CJK quotes ==
+  \ifcase\bbl at engine\or
+    \bbl at xin@{/c}{/\bbl at cl{lnbrk}}%
+    \ifin@
+      \bbl at ifunset{bbl at quote@\languagename}{}%
+        {\directlua{
+           Babel.locale_props[\the\localeid].cjk_quotes = {}
+           local cs = 'op'
+           for c in string.utfvalues(%
+               [[\csname bbl at quote@\languagename\endcsname]]) do
+             if Babel.cjk_characters[c].c == 'qu' then
+               Babel.locale_props[\the\localeid].cjk_quotes[c] = cs
+             end
+             cs = ( cs == 'op') and 'cl' or 'op'
+           end
+        }}%
+    \fi
+  \fi
   % == Line breaking: justification ==
   \ifx\bbl at KVP@justification\@nil\else
      \let\bbl at KVP@linebreaking\bbl at KVP@justification
@@ -11615,6 +11643,7 @@ help from Bernd Raichle, for which I am grateful.
     \bbl at exportkey{intsp}{typography.intraspace}{}%
     \bbl at exportkey{frspc}{typography.frenchspacing}{u}%
     \bbl at exportkey{chrng}{characters.ranges}{}%
+    \bbl at exportkey{quote}{characters.delimiters.quotes}{}%
     \bbl at exportkey{dgnat}{numbers.digits.native}{}%
     \ifnum#1=\tw@           % only (re)new
       \bbl at exportkey{rqtex}{identification.require.babel}{}%
@@ -13755,6 +13784,10 @@ help from Bernd Raichle, for which I am grateful.
 
           local class = Babel.cjk_class[item.char].c
           
+          if props.cjk_quotes and props.cjk_quotes[item.char] then
+            class = props.cjk_quotes[item.char]
+          end
+
           if class == 'cp' then class = 'cl' end % )] as CL
           if class == 'id' then class = 'I' end
 
diff --git a/babel.ins b/babel.ins
index 60f055e..7fae72e 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{2021/06/30}
+\def\filedate{2021/07/04}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index cc789d9..ac269e4 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 9c021ec..49e09cb 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/06/30 v3.61.2419]
+\ProvidesFile{bbcompat.dtx}[2021/07/04 v3.61.2423]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.