[latex3-commits] [git/LaTeX3-latex3-latex2e] master: New: \IfBabelShorthand. Now attempts to define Script/Language if not in fontspec. (9dab130)

Javier javier at dante.de
Mon Aug 27 19:06:14 CEST 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/9dab13013bee13166a31db196384d2e4b446bc89

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

commit 9dab13013bee13166a31db196384d2e4b446bc89
Author: Javier <javier at localhost>
Date:   Mon Aug 27 19:05:47 2018 +0200

    New: \IfBabelShorthand. Now attempts to define Script/Language if not in fontspec.


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

9dab13013bee13166a31db196384d2e4b446bc89
 required/babel/README.md    |    4 +--
 required/babel/babel.dtx    |   74 +++++++++++++++++++++----------------------
 required/babel/babel.ins    |    2 +-
 required/babel/babel.pdf    |  Bin 654756 -> 654042 bytes
 required/babel/bbcompat.dtx |    2 +-
 5 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/required/babel/README.md b/required/babel/README.md
index 3e98c84..5cb7818 100644
--- a/required/babel/README.md
+++ b/required/babel/README.md
@@ -1,4 +1,4 @@
-## Babel 3.22.1358
+## Babel 3.22.1381
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -129,5 +129,5 @@ respective authors.
 ```
 
 Javier Bezos
-2018/08/04
+2018/08/27
 
diff --git a/required/babel/babel.dtx b/required/babel/babel.dtx
index d07479f..ae4cc57 100644
--- a/required/babel/babel.dtx
+++ b/required/babel/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2018/08/04 v3.22.1358 The Babel package]
+\ProvidesFile{babel.dtx}[2018/08/27 v3.22.1381 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -616,7 +616,9 @@ This environment was originally intended for intermixing left-to-right
 typesetting with right-to-left typesetting in engines not supporting a
 change in the writing direction inside a line. However, by default it
 never complied with the documented behavior and it is just a version as
-environment of |\foreignlanguage|.
+environment of |\foreignlanguage|, except when the option |bidi| is 
+set -- in this case, |\foreignlanguage| emits a |\leavevmode|, while 
+|otherlanguage*| does not.
 
 \Describe{\begin\menv{hyphenrules}}{\marg{language}\Eenv{hyphenrules}}
 
@@ -2736,23 +2738,11 @@ you can create a file with extension |.dn|:
 Then you preprocess it with |devnag| \m{file}, which creates
 \m{file}|.tex|; you can then typeset the latter with \LaTeX.
 
-\subsection{Some remarks on \luatex{} support}
-
-Complex scripts require not only \babel{} but also |fontspec|, which in
-turn relies on \textsf{luaotfload}. Unfortunately, at the time of this
-writing, there are some issues with the latter and its development
-seems stuck. Here is some remarks based on \TeX Live as of June 2018:
-\begin{itemize}
-\item [To be revised: With Arabic, some internal kerns are 
-  misplaced...]
-\item Hebrew works, except Niqqud marks, which sometimes are misplaced.
-  (Interestingly, some fonts fail at this respect with \xetex, too.)
-\item Most Devanagari fonts work, but you may need to set the OTF 
-  language to \texttt{deva} (default is \texttt{dev2}).
-\item Thai fonts works, too, but \babel{} does not handle correctly 
-  line breaking (work in progress).
-\item 
-\end{itemize}
+\begin{note}
+  Please, for info about the support in luatex for some complex scripts,
+  see the wiki, on \texttt{https://github.com/latex3/latex2e/wiki/%
+  Babel:-Remarks-on-the-luatex-support-for-some-scripts}.
+\end{note}
 
 \subsection{Tips, workarounds, know issues and notes}
 
@@ -3898,8 +3888,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.22.1358>>
-%<<date=2018/08/04>>
+%<<version=3.22.1381>>
+%<<date=2018/08/27>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -4536,7 +4526,7 @@ help from Bernd Raichle, for which I am grateful.
 %    wrapped (in |babel.def|) to define only those given.
 %
 %    A bit of optimization: if there is no |shorthands=|, then
-%    |\bbl at ifshorthands| is always true, and it is always false if
+%    |\bbl at ifshorthand| is always true, and it is always false if
 %    |shorthands| is empty. Also, some code makes sense only with
 %    |shorthands=...|.
 %
@@ -4559,7 +4549,7 @@ help from Bernd Raichle, for which I am grateful.
 \else
 %    \end{macrocode}
 %
-%    The following macro tests if a shortand is one of the allowed
+%    The following macro tests if a shorthand is one of the allowed
 %    ones.
 %
 %    \begin{macrocode}
@@ -5134,7 +5124,7 @@ help from Bernd Raichle, for which I am grateful.
 %    case you need them for some reason).
 %
 %    \begin{macrocode}
-\def\bbl at evargs{,% don't delete the comma
+\def\bbl at evargs{,% <- don't delete this comma
   everylanguage=1,loadkernel=1,loadpatterns=1,loadexceptions=1,%
   adddialect=2,patterns=2,defaultcommands=0,encodedcommands=2,write=0,%
   beforeextras=0,afterextras=0,stopcommands=0,stringprocess=0,%
@@ -6200,6 +6190,16 @@ help from Bernd Raichle, for which I am grateful.
 \fi
 %    \end{macrocode}
 %
+% \changes{babel~3.23}{2018/08/26}{Added \cs{IfBabelShorthand}}
+%
+% You may want to test if a character is a shorthand. Mainly intended 
+% for packages, and therefore marked with camel case. Note it does not 
+% test whether the shorthand is on or off.
+%
+%    \begin{macrocode}
+\def\IfBabelShorthand#1#2#3{\bbl at ifunset{bbl at active@\string#1}{#3}{#2}}
+%    \end{macrocode}
+%
 % \changes{babel~3.9a}{2012/12/27}{Removed redundant system declarations}
 %
 %  \begin{macro}{\bbl at prim@s}
@@ -6208,12 +6208,11 @@ help from Bernd Raichle, for which I am grateful.
 % \changes{babel~3.9a}{2012/07/29}{\cs{bbl at pr@m at s} rewritten to
 %    take into account catcodes for both the quote and the hat}
 %
-%    One of the internal macros that are involved in substituting
-%    |\prime| for each right quote in mathmode is |\prim at s|. This
-%    checks if the next character is a right quote. When the right
-%    quote is active, the definition of this macro needs to be adapted
-%    to look also for an active right quote; the hat could be active,
-%    too.
+% One of the internal macros that are involved in substituting |\prime|
+% for each right quote in mathmode is |\prim at s|. This checks if the
+% next character is a right quote. When the right quote is active, the
+% definition of this macro needs to be adapted to look also for an
+% active right quote; the hat could be active, too.
 %
 %    \begin{macrocode}
 \def\bbl at prim@s{%
@@ -8202,16 +8201,17 @@ help from Bernd Raichle, for which I am grateful.
     {}%
   \bbl at csarg\let{lsys@#1}\@empty
   \bbl at ifunset{bbl at sname@#1}{\bbl at csarg\gdef{sname@#1}{Default}}{}%
-  \bbl at ifunset{bbl at sotf#1}{\bbl at csarg\gdef{sotf@#1}{DFLT}}{}%
+  \bbl at ifunset{bbl at sotf@#1}{\bbl at csarg\gdef{sotf@#1}{DFLT}}{}%
   \bbl at csarg\bbl at add@list{lsys@#1}{Script=\bbl at cs{sname@#1}}%
   \bbl at ifunset{bbl at lname@#1}{}%
     {\bbl at csarg\bbl at add@list{lsys@#1}{Language=\bbl at cs{lname@#1}}}%
-  \bbl at csarg\bbl at toglobal{lsys@#1}}%
- %  \bbl at exp{% TODO - should be global
- %    \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl at cs{sname@#1}}%
- %      {\\\newfontscript{\bbl at cs{sname@#1}}{\bbl at cs{sotf@#1}}}%
- %    \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl at cs{lname@#1}}%
- %      {\\\newfontlanguage{\bbl at cs{lname@#1}}{\bbl at cs{lotf@#1}}}}}
+  \bbl at csarg\bbl at toglobal{lsys@#1}%}%
+  \bbl at exp{% TODO - should be global, but even local does its job
+           % I'm still not sure -- must investigate 
+    \<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl at cs{sname@#1}}%
+      {\\\newfontscript{\bbl at cs{sname@#1}}{\bbl at cs{sotf@#1}}}%
+    \<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl at cs{lname@#1}}%
+      {\\\newfontlanguage{\bbl at cs{lname@#1}}{\bbl at cs{lotf@#1}}}}}
 %    \end{macrocode}
 %
 % The following |ini| reader ignores everything but the
diff --git a/required/babel/babel.ins b/required/babel/babel.ins
index a19957b..e268f60 100644
--- a/required/babel/babel.ins
+++ b/required/babel/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{2018/08/04}
+\def\filedate{2018/08/27}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/required/babel/babel.pdf b/required/babel/babel.pdf
index bcfc9ea..b0f20d7 100644
Binary files a/required/babel/babel.pdf and b/required/babel/babel.pdf differ
diff --git a/required/babel/bbcompat.dtx b/required/babel/bbcompat.dtx
index 87ad33c..b68f3d4 100644
--- a/required/babel/bbcompat.dtx
+++ b/required/babel/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2018/08/04 v3.22.1358]
+\ProvidesFile{bbcompat.dtx}[2018/08/27 v3.22.1381]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list