[latex3-commits] [git/LaTeX3-latex3-babel] master: Fix #91 (\babelshorthand). Other minor changes. (8509f66)

Javier email at dante.de
Sun Aug 30 13:44:57 CEST 2020


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/8509f66d7b2c7e57b19ecd3b419e1a6d48bb5898

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

commit 8509f66d7b2c7e57b19ecd3b419e1a6d48bb5898
Author: Javier <email at localhost>
Date:   Sun Aug 30 13:44:57 2020 +0200

    Fix #91 (\babelshorthand). Other minor changes.


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

8509f66d7b2c7e57b19ecd3b419e1a6d48bb5898
 README.md    |   6 ++-
 babel.dtx    | 166 ++++++++++++++++++++++++++++++++---------------------------
 babel.ins    |   2 +-
 babel.pdf    | Bin 801579 -> 802844 bytes
 bbcompat.dtx |   2 +-
 5 files changed, 97 insertions(+), 79 deletions(-)

diff --git a/README.md b/README.md
index 02be7a9..6108f0d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.47.2089
+## Babel 3.47.2115
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -47,6 +47,10 @@ respective authors.
 3.48   2020-07-31 (development)
        - New tools to customize some labels (like chapters in CJK and
          Hungarian).
+       - Warning instead of error if neither 0 nor ZERO WIDTH SPACE is
+         found in Southeast Asian languages.
+       - Fixes:
+         - \babelshorthand didn't work with some dialects.
 
 3.47   2020-07-13
        - Fixes:
diff --git a/babel.dtx b/babel.dtx
index 072fe20..14e5bee 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/08/04 v3.47.2089 The Babel package]
+\ProvidesFile{babel.dtx}[2020/08/30 v3.47.2115 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -235,44 +235,45 @@ Xe\largetex
 \part{User guide}
 
 \begin{description}
-\item[\sffamily\color{messages}WHAT IS THIS DOCUMENT ABOUT?] This user
-  guide focuses on internationalization and localization with \LaTeX and
-  \pdftex, \xetex{} and \luatex. There are also some notes on its use
-  with Plain \TeX.
-
-\item[\sffamily\color{messages}WHAT IF I'M INTERESTED ONLY IN THE
-  LATEST CHANGES?] Changes and new features with relation to version 3.8
+\item[\sffamily\color{messages}What is this document about?] This user
+guide focuses on internationalization and localization with \LaTeX{}
+and \pdftex, \xetex{} and \luatex{} with the \babel{} package. There are
+also some notes on its use with Plain \TeX. Part II describes the code,
+and usually it can be ignored.
+
+\item[\sffamily\color{messages}What if I’m interested only in the
+  latest changes?] Changes and new features with relation to version 3.8
   are highlighted with \New{X.XX}\hspace{-.5em}, and there are some
   notes for the latest versions in
   \href{https://github.com/latex3/babel/wiki}{the \babel{} wiki}. The
-  most recent features could be still unstable. 
+  most recent features can be still unstable. 
 
-\item[\sffamily\color{messages}CAN I HELP?] Sure! If you are interested
+\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
-  could be caught in the development phase.
+  can be caught in the development phase.
   
-\item[\sffamily\color{messages}I'VE FOUND AN ERROR.] Please, report any
+\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.
 
-\item[\sffamily\color{messages}HOW CAN I CONTRIBUTE A NEW
-LANGUAGE?] See section \ref{contribute} for contributing a language.
+\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). 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}.
+\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.
+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}.
   
-\item[\sffamily\color{messages}I DON'T LIKE MANUALS. I PREFER SAMPLE
-  FILES.] This manual contains lots of examples and tips, but in GitHub
+\item[\sffamily\color{messages}I don’t like manuals. I prefer sample
+  files.] This manual contains lots of examples and tips, but in GitHub
   there are many
   \href{https://github.com/latex3/babel/tree/master/samples}{sample
   files}.
@@ -349,7 +350,7 @@ _\usepackage[russian]{babel}_
 \trouble{Paragraph ended before \textbackslash UTFviii at three@octets
 was complete}
 A common source of trouble is a wrong setting of the input encoding.
-Depending on the \LaTeX{} version you could get the following somewhat
+Depending on the \LaTeX{} version you can get the following somewhat
 cryptic error:
 \begin{verbatim}
 ! Paragraph ended before \UTFviii at three@octets was complete.
@@ -442,7 +443,7 @@ Examples of cases where |main| is useful are the following.
 
 \begin{note}
 Some classes load \babel{} with a hardcoded language option. Sometimes,
-the main language could be overridden with something like that before
+the main language can be overridden with something like that before
 |\documentclass|:
 \begin{verbatim}
 \PassOptionsToPackage{main=english}{babel}
@@ -959,7 +960,7 @@ system shorthands. Language-dependent user shorthands (new in
 \begin{example}
   Let's assume you want a unified set of shorthand for discretionaries
   (languages do not define shorthands consistently, and |"-|, |\-|,
-  |"=| have different meanings).  You could start with, say:
+  |"=| have different meanings).  You can start with, say:
 \begin{verbatim}
 \useshorthands*{"}
 \defineshorthand{"*}{\babelhyphen{soft}}
@@ -967,7 +968,7 @@ system shorthands. Language-dependent user shorthands (new in
 \end{verbatim}
   However, the behavior of hyphens is language-dependent. For example, in
   languages like Polish and Portuguese, a hard hyphen inside compound
-  words are repeated at the beginning of the next line. You could then
+  words are repeated at the beginning of the next line. You can then
   set:
 \begin{verbatim}
 \defineshorthand[*polish,*portuguese]{"-}{\babelhyphen{repeat}}
@@ -1369,7 +1370,7 @@ need to set explicitly the script to either |deva| or |dev2|, eg:
   hard-coded in \xetex). Lao seems to work, too, but there are no
   patterns for the latter in \luatex{}. Khemer clusters are rendered
   wrongly with the default renderer. The comment about Indic scripts
-  and \textsf{lualatex} also applies here. Some quick patterns could
+  and \textsf{lualatex} also applies here. Some quick patterns can
   help, with something similar to:
 \begingroup
 \setmonofont[Script=Lao,Scale=MatchLowercase]{DejaVu Sans Mono}
@@ -2134,7 +2135,7 @@ Svenska \foreignlanguage{hebrew}{@2עִבְרִית@0} svenska.
 \end{verbatim}
 \endgroup
 
-If on the other hand you have to resort to different fonts, you could
+If on the other hand you have to resort to different fonts, you can
 replace the red line above with, say:
 \setengine{luatex/xetex}
 \begin{verbatim}
@@ -2188,7 +2189,7 @@ to select fonts in addition to the three basic families.
   command, neither the script nor the language is passed. You must
   add them by hand. This is by design, for several reasons —for
   example, each font has its own set of features and a generic setting
-  for several of them could be problematic, and also a “lower-level”
+  for several of them can be problematic, and also a “lower-level”
   font selection is useful.
 \end{note}
 
@@ -2215,7 +2216,7 @@ to select fonts in addition to the three basic families.
   font 'FONT' with script 'SCRIPT' 'Default' language used instead'}.
 
   \textbf{This is \textit{not} and error.} This warning is shown by
-  \textsf{fontspec}, not by \babel. It could be irrelevant for English,
+  \textsf{fontspec}, not by \babel. It can be irrelevant for English,
   but not for many other languages, including Urdu and Turkish. This is
   a useful and harmless warning, and if everything is fine with your
   document the best thing you can do is just to ignore it altogether.
@@ -2382,7 +2383,7 @@ LICR (ie, with macros like |\'| or |\ss|) ones.
 \New{3.23} It may be used without a value. In such a case, the |ini|
 file set in the corresponding |babel-<language>.tex| (where
 |<language>| is the last argument in |\babelprovide|) is imported. See
-the list of recognized languages above. So, the previous example could 
+the list of recognized languages above. So, the previous example can 
 be written:
 \begin{verbatim}
 \babelprovide[_import_]{hungarian}
@@ -2438,7 +2439,7 @@ languages.
 \begin{verbatim}
 \usepackage[italian, greek.polutonic]{babel}
 \end{verbatim}
-  But if, say, accents in Greek are not shown correctly, you could try: 
+  But if, say, accents in Greek are not shown correctly, you can try: 
 \begin{verbatim}
 \usepackage[italian]{babel}
 \babelprovide[import, main]{polytonicgreek}
@@ -2485,7 +2486,7 @@ with |mapfont|. Characters can be added with |\babelcharproperty|.
   An alternative approach with \luatex{} and Harfbuzz is the font
   option |RawFeature={multiscript=auto}|. It does not switch the
   \babel{} language and therefore the line breaking rules, but in many
-  cases it could be enough.
+  cases it can be enough.
 \end{note}
 
 \Describe{mapfont=}{\texttt{direction}}
@@ -3097,7 +3098,7 @@ to ensure most of the ASCII letters and symbols are the right ones.
 
 No macros to select the writing direction are provided, either --
 writing direction is intrinsic to each script and therefore it is best
-set by the language (which could be a dummy one). Furthermore, there
+set by the language (which can be a dummy one). Furthermore, there
 are in fact two right-to-left modes, depending on the language, which
 differ in the way `weak' numeric characters are ordered (eg, Arabic
 \%123 \textit{vs} Hebrew 123\%).
@@ -3105,7 +3106,7 @@ differ in the way `weak' numeric characters are ordered (eg, Arabic
 \begin{warning}
   The current code for \textbf{text} in \luatex{} should be considered
   essentially stable, but, of course, it is not bug-free and there
-  could be improvements in the future, because setting bidi text has
+  can be improvements in the future, because setting bidi text has
   many subtleties (see for example <https://www.w3.org/TR/html-bidi/>).
   A basic stable version for other engines must wait. This applies to
   text; there is a basic support for \textbf{graphical} elements,
@@ -3278,7 +3279,7 @@ required by all engines.
   counters in general, as well as in \luatex{} with |bidi=default|;
   required in \luatex{} for numeric footnote marks $>$9 with
   |bidi=basic-r| (but \textit{not} with |bidi=basic|); note, however,
-  it could depend on the counter format.
+  it can depend on the counter format.
 
   With |counters|, |\arabic| is not only considered L text always (with
   |\babelsublr|, see below), but also an ``isolated'' block which does
@@ -3371,7 +3372,7 @@ RTL A \foreignlanguage{english}{ltr text \thechapter{} and still ltr} RTL B
 
 \Describe{\BabelPatchSection}{\marg{section-name}}
 
-Mainly for bidi text, but it could be useful in other cases.
+Mainly for bidi text, but it can be useful in other cases.
 |\BabelPatchSection| and the corresponding option |layout=sectioning|
 takes a more logical approach (at least in many cases) because it
 applies the global language to the section format (including the
@@ -3667,7 +3668,7 @@ deactivate other related options (like paragraph direction with
 \item If you use the document class \cls{book} \emph{and} you use
   |\ref| inside the argument of |\chapter| (or just use |\ref| inside
   |\MakeUppercase|), \LaTeX\ will keep complaining about an undefined
-  label.  To prevent such problems, you could revert to using
+  label.  To prevent such problems, you can revert to using
   uppercase labels, you can use |\lowercase{\ref{foo}}| inside the
   argument of |\chapter|, or, if you will not use shorthands in
   labels, set the |safe| option to |none| or |bib|.
@@ -3867,7 +3868,7 @@ german hyphen.ger
 With the previous settings, if the encoding when the language is
 selected is |T1| then the patterns in \file{hyphenT1.ger} are
 used, but otherwise use those in \file{hyphen.ger} (note the encoding
-could be set in |\extras|\m{lang}).
+can be set in |\extras|\m{lang}).
 
 A typical error when using \babel{} is the following:
 \begin{verbatim}
@@ -4035,11 +4036,11 @@ two parameters. For example:
 
 \DescribeMacro{\providehyphenmins}
 The macro |\providehyphenmins| should be used in the language
-definition files to set |\lefthyphenmin| and
-|\righthyphenmin|. This macro will check whether these parameters
-were provided by the hyphenation file before it takes any action.
-If these values have been already set, this command is ignored
-(currently, default pattern files do \textit{not} set them).
+definition files to set |\lefthyphenmin| and |\righthyphenmin|. This
+macro will check whether these parameters were provided by the
+hyphenation file before it takes any action. If these values have been
+already set, this command is ignored (currently, default pattern files
+do \textit{not} set them).
 
 \DescribeMacro{\captions\langvar}
 The macro |\captions|\langvar\ defines the macros that
@@ -4253,7 +4254,7 @@ instance, be used in adding instructions to a macro like
 |\extrasenglish|.
 
 Be careful when using this macro, because depending on the case the
-assignment could be either global (usually) or local (sometimes). That
+assignment can be either global (usually) or local (sometimes). That
 does not seem very consistent, but this behavior is preserved for
 backward compatibility. If you are using \pkg{etoolbox}, by Philipp
 Lehman, consider using the tools provided by this package instead of
@@ -4481,7 +4482,7 @@ optional one. This command, unlike |\SetString|, is executed always
 (even without |strings|), and it is intended for minor readjustments
 only.
 
-For example, as |T1| is the default case mapping in \LaTeX, we could
+For example, as |T1| is the default case mapping in \LaTeX, we can
 set for Turkish:
 \begin{verbatim}
 \StartBabelCommands{turkish}{}[ot1enc, fontenc=OT1]
@@ -4565,7 +4566,7 @@ corresponding place. A selective list follows:
   selected.
 
 \item |'| (with |activeacute|) had the original value when writing to an
-  auxiliary file, and things like an infinite loop could happen. It
+  auxiliary file, and things like an infinite loop can happen. It
   worked incorrectly with |^| (if activated) and also if deactivated.
 
 \item Active chars where not reset at the end of language options, and
@@ -4734,8 +4735,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.47.2089>>
-%<<date=2020/08/04>>
+%<<version=3.47.2115>>
+%<<date=2020/08/30>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5165,7 +5166,7 @@ help from Bernd Raichle, for which I am grateful.
   \bbl at warning{%
     Some functions for '#1' are tentative.\\%
     They might not work as expected and their behavior\\%
-    could change in the future.\\%
+    may change in the future.\\%
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
@@ -7273,17 +7274,17 @@ help from Bernd Raichle, for which I am grateful.
   % spurious spaces.  
   \bbl at bsphack
     \ifcase\bbl at select@type
+      \csname captions#1\endcsname\relax
+      \csname date#1\endcsname\relax
+    \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@  % if \foreign... within \<lang>date
         \csname date#1\endcsname\relax
-    \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@  % if \foreign... within \<lang>date
-          \csname date#1\endcsname\relax
-        \fi
+      \fi
     \fi
   \bbl at esphack
   % switch extras
@@ -8860,7 +8861,7 @@ help from Bernd Raichle, for which I am grateful.
      {\bbl at putsh@i#1\@empty\@nnil}%
      {\csname bbl at active@\string#1\endcsname}}
 \def\bbl at putsh@i#1#2\@nnil{%
-  \csname\languagename @sh@\string#1@%
+  \csname\language at group @sh@\string#1@%
     \ifx\@empty#2\else\string#2@\fi\endcsname}
 \ifx\bbl at opt@shorthands\@nnil\else
   \let\bbl at s@initiate at active@char\initiate at active@char
@@ -11124,17 +11125,18 @@ help from Bernd Raichle, for which I am grateful.
           \gdef\<bbl at map@\bbl at tempc @\languagename>%
             {\ifin@\<#2>\else\\\localecounter{#2}\fi}}%
         \bbl at foreach\bbl at list@the{%
-          \bbl at exp{\let\\\bbl at tempd\<the##1>}%
-          \bbl at exp{%
-            \\\bbl at sreplace\<the##1>%
-              {\<\bbl at tempc>{##1}}{\\\bbl at map@cnt{\bbl at tempc}{##1}}%
-            \\\bbl at sreplace\<the##1>%
-              {\<\@empty @\bbl at tempc>\<c@##1>}{\\\bbl at map@cnt{\bbl at tempc}{##1}}}%
-          \expandafter\ifx\csname the##1\endcsname\bbl at tempd\else
-            \toks@\expandafter\expandafter\expandafter{%
-              \csname the##1\endcsname}%
-            \expandafter\xdef\csname the##1\endcsname{{\the\toks@}}%
-          \fi}%
+          \bbl at ifunset{the##1}{}%
+            {\bbl at exp{\let\\\bbl at tempd\<the##1>}%
+             \bbl at exp{%
+               \\\bbl at sreplace\<the##1>%
+                 {\<\bbl at tempc>{##1}}{\\\bbl at map@cnt{\bbl at tempc}{##1}}%
+               \\\bbl at sreplace\<the##1>%
+                 {\<\@empty @\bbl at tempc>\<c@##1>}{\\\bbl at map@cnt{\bbl at tempc}{##1}}}%
+             \expandafter\ifx\csname the##1\endcsname\bbl at tempd\else
+               \toks@\expandafter\expandafter\expandafter{%
+                 \csname the##1\endcsname}%
+               \expandafter\xdef\csname the##1\endcsname{{\the\toks@}}%
+             \fi}}%
       \fi
     \fi
   %
@@ -11166,11 +11168,23 @@ help from Bernd Raichle, for which I am grateful.
 \def\bbl at chaptype{chap}
 \ifx\@makechapterhead\@undefined
   \let\bbl at patchchapter\relax
+\else\ifx\thechapter\@undefined
+  \let\bbl at patchchapter\relax
+\else\ifx\ps at headings\@undefined
+  \let\bbl at patchchapter\relax
 \else
   \def\bbl at patchchapter{%
     \global\let\bbl at patchchapter\relax
     \bbl at add\appendix{\def\bbl at chaptype{appx}}% Not harmful, I hope
     \bbl at toglobal\appendix
+    \bbl at sreplace\ps at headings
+      {\@chapapp\ \thechapter}%
+      {\bbl at chapterformat}%  
+    \bbl at toglobal\ps at headings
+    \bbl at sreplace\chaptermark
+      {\@chapapp\ \thechapter}%
+      {\bbl at chapterformat}%  
+    \bbl at toglobal\chaptermark
     \bbl at sreplace\@makechapterhead
       {\@chapapp\space\thechapter}%
       {\bbl at chapterformat}%
@@ -11179,7 +11193,7 @@ help from Bernd Raichle, for which I am grateful.
       \bbl at ifunset{bbl@\bbl at chaptype fmt@\languagename}%
         {\@chapapp\space\thechapter}
         {\@nameuse{bbl@\bbl at chaptype fmt@\languagename}}}}
-\fi
+\fi\fi\fi
 \ifx\@part\@undefined
   \let\bbl at patchpart\relax
 \else
@@ -11359,12 +11373,12 @@ help from Bernd Raichle, for which I am grateful.
        \else\iffontchar\font"200B
          \hyphenchar\font"200B
        \else
-         \bbl at error
+         \bbl at warning
            {Neither 0 nor ZERO WIDTH SPACE are available\\%
             in the current font, and therefore the hyphen\\%
-            will be printed. Try with 'HyphenChar', but be\\%
-            aware this setting is not safe (see the manual).}%
-           {See the manual.}%
+            will be printed. Try changing the fontspec\\%
+            'HyphenChar' to another value, but be aware\\%
+            this setting is not safe (see the manual)}%
          \hyphenchar\font\defaulthyphenchar     
        \fi\fi
      \fi}%
diff --git a/babel.ins b/babel.ins
index b797dee..f42c85c 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/08/04}
+\def\filedate{2020/08/30}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index bbf371d..1a80e50 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 5583b76..02d8745 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/08/04 v3.47.2089]
+\ProvidesFile{bbcompat.dtx}[2020/08/30 v3.47.2115]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.