texlive[51309] Master/texmf-dist: babel (3jun19)
commits+karl at tug.org
commits+karl at tug.org
Mon Jun 3 23:35:43 CEST 2019
Revision: 51309
http://tug.org/svn/texlive?view=revision&revision=51309
Author: karl
Date: 2019-06-03 23:35:43 +0200 (Mon, 03 Jun 2019)
Log Message:
-----------
babel (3jun19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/babel/README.md
trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
trunk/Master/texmf-dist/source/latex/babel/babel.dtx
trunk/Master/texmf-dist/source/latex/babel/babel.ins
trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
trunk/Master/texmf-dist/source/latex/babel/locale.zip
trunk/Master/texmf-dist/tex/generic/babel/babel.def
trunk/Master/texmf-dist/tex/generic/babel/babel.sty
trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
trunk/Master/texmf-dist/tex/generic/babel/luababel.def
trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
trunk/Master/texmf-dist/tex/generic/babel/switch.def
trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
Modified: trunk/Master/texmf-dist/doc/latex/babel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/babel/README.md 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/doc/latex/babel/README.md 2019-06-03 21:35:43 UTC (rev 51309)
@@ -1,4 +1,4 @@
-## Babel 3.31
+## Babel 3.32
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -41,7 +41,7 @@
If the bug turns out to be with third-party software then please
contact the developer, and not us!
-You may also report them to the author more informally on:
+You may also report them to the current maintainer more informally on:
http://www.texnia.com/contact.html
@@ -51,20 +51,28 @@
### Latest changes
```
+3.32 2019-06-03
+ - CJK line breaking is now disabled in verbatim (lua).
+ - New - \babelcharproperty, to change the direction, mirroring
+ glyph and line break properties (lua).
+ - Basic support for the picture environment (with pict2e) and pgf
+ (lua, somewhat experimental).
+ - Start support for harftex (just try - it may work).
+
3.31 2019-05-04
- - Basic support for line breaking with CJK scripts.
+ - Basic support for line breaking with CJK scripts (lua)
- layout=tabular now works with the 'array' package (and some
- others).
+ others; lua).
3.30 2019-04-22
- - Fix - dir in boxes inside math (hopefully now it works).
- - Option mapdigits for \babelprovide (only luatex), which
- converts European digits to local ones.
+ - Fix - dir in boxes inside math (hopefully now it works; lua).
+ - Option mapdigits for \babelprovide, which converts European
+ digits to local ones (lua).
3.29 2019-04-03
- The fix for boxes inside math is incompatible with ams.
Removed (a better fix is under study).
- - Options bidi-l and bidi-r (for the bidi package).
+ - Options bidi-l and bidi-r (for the bidi package; xe).
3.28 2019-04-01
- Fixes - wrong dir after math, in math inside tabular, in weak L
@@ -85,7 +93,7 @@
3.25 2018-10-03
- Fixes for 3.23 - mapfont=direction could raise an error.
- Language and Script were not always defined correctly.
+ - Language and Script were not always defined correctly.
- Improved tentative support for Thai, Lao and Khmer in both
luatex and xetex.
@@ -143,4 +151,4 @@
```
Javier Bezos
-2019/05/04
+2019/06/03
Modified: trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/babel/babel.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.dtx 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.dtx 2019-06-03 21:35:43 UTC (rev 51309)
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2019/05/04 v3.31 The Babel package]
+\ProvidesFile{babel.dtx}[2019/06/03 v3.32 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -91,7 +91,7 @@
\def\verbatim{\begin{shaded*}\bblxv\vskip-\baselineskip\vskip2.5\parsep}
\def\endverbatim{\bblexv\vskip-2\baselineskip\end{shaded*}}
\catcode`\_=\active
-\def_{\bgroup\let_\egroup\color{thered}}
+\def_{\bgroup\let_\egroup\leavevmode\color{thered}}
\def\MacroFont{\fontencoding \encodingdefault \fontfamily\ttdefault
\fontseries\mddefault \fontshape\updefault \small \catcode`\_=\active}
\definecolor{shadecolor}{rgb}{0.96,0.96,0.93}
@@ -233,7 +233,7 @@
\item Changes and new features with relation to version 3.8 are
highlighted with \New{X.XX}\hspace{-.5em}. The most recent features
- could be still unstable. Please, report any issues you find on
+ could be still unstable. Please, report any issues you find in
\texttt{https://github.com/latex3/babel/issues}, which is better
than just complaining on an e-mail list or a web forum.
@@ -240,7 +240,7 @@
\item If you are interested in the \TeX{} multilingual support, please
join the \textsf{kadingira} list on
\texttt{http://tug.org/mailman/listinfo/kadingira}. You can follow
- the development of \babel{} on
+ the development of \babel{} in
\texttt{https://github.com/latex3/babel} (which provides some sample
files, too).
@@ -1212,7 +1212,7 @@
patterns for the latter in \luatex{}. Some quick patterns could help,
with something similar to:
\begingroup
-\setmonofont[Script=Lao]{DejaVu Sans Mono}
+\setmonofont[Script=Lao,Scale=MatchLowercase]{DejaVu Sans Mono}
\begin{verbatim}
\babelprovide[import,hyphenrules=+]{lao}
\babelpatterns[lao]{1ດ 1ມ 1ແ 1ອ 1ງ 1ກ 1າ} % Random
@@ -1223,10 +1223,16 @@
language names must be sorted out, so you may need to set them
explicitly in |\babelfont|, as well as |CJKShape|. \luatex{} does
basic line breaking, but currently \xetex{} does not (you may load
- \textsf{zhspacing}). Anyway, CJK texts are are best set with a
+ \textsf{zhspacing}). Although for a few words and shorts texts the
+ |ini| files should be fine, CJK texts are are best set with a
dedicated framework (\textsf{CJK}, \textsf{luatexja}, \textsf{kotex},
- \textsf{CTeX}...), although for a few words and shorts texts \babel{}
- should be fine.
+ \textsf{CTeX}...), . Actually, this is what the |ldf| does in
+ |japanese| with \luatex, because the following piece of code loads
+ \textsf{luatexja}:
+\begin{verbatim}
+\documentclass{ltjbook}
+\usepackage[japanese]{babel}
+\end{verbatim}
\end{description}
\end{note}
@@ -2370,7 +2376,10 @@
\New{3.31} (Only \luatex.) With |\babelprovide| and |import|ed CJK
languages, a simple generic line breaking algorithm (push-out-first) is
-applied, based on a selection of the Unicode rules.
+applied, based on a selection of the Unicode rules (\New{3.32} it is
+disabled in verbatim mode, or more precisely when the hyphenrules
+are set to |nohyphenation|). It can be activated alternatively by
+setting explicitly the |intraspace|.
\New{3.27} Interword spacing for Thai, Lao and Khemer is activated
automatically if a language with one of those scripts are loaded with
@@ -2440,11 +2449,12 @@
essentially stable, but, of course, it is not bug free and there
could 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 very likely until
- (Northern) Winter. This applies to text, but \textbf{graphical}
- elements, including the |picture| environment and PDF or PS based
- graphics, are not yet correctly handled (far from trivial). Also,
- indexes and the like are under study, as well as math.
+ A basic stable version for other engines must wait. This applies to
+ text; there is a basic support for \textbf{graphical} elements,
+ including the |picture| environment (with \textsf{pict2e}) and
+ \textsf{pfg/tikz}. Also, indexes and the like are under study, as
+ well as math (there are progresses in the latter, too, but for
+ example |cases| may fail).
An effort is being made to avoid incompatibilities in the future
(this one of the reason currently bidi must be explicitly requested
@@ -2456,7 +2466,7 @@
\Describe{bidi=}{\texttt{default} $\string|$ \texttt{basic}
$\string|$ \texttt{basic-r} $\string|$ \texttt{bidi-l} $\string|$
- \texttt{bidi-l}}
+ \texttt{bidi-r}}
\New{3.14} Selects the bidi algorithm to be used. With |default| the
bidi mechanism is just activated (by default it is not), but every
@@ -2463,12 +2473,12 @@
change must by marked up. In \xetex{} and \pdftex{} this is the only
option.
-In \luatex, |basic-r| provides a simple and fast method for R
-text, which handles numbers and unmarked L text within an R context in
-typical cases. \New{3.19} Finally, |basic| supports both L and R text
-and it is the preferred method (support for |basic-r| is now limited).
-(They are named \texttt{basic} mainly because they only consider the
-intrinsic direction of scripts and weak directionality.)
+In \luatex, |basic-r| provides a simple and fast method for R text,
+which handles numbers and unmarked L text within an R context many in
+typical cases. \New{3.19} Finally, |basic| supports both L and R text,
+and it is the preferred method (support for |basic-r| is currently
+limited). (They are named \texttt{basic} mainly because they only
+consider the intrinsic direction of scripts and weak directionality.)
\New{3.29} In \xetex, |bidi-r| and |bidi-l| resort to the package
\textsf{bidi} (by Vafa Khalighi). Integration is still somewhat
@@ -2475,6 +2485,12 @@
tentative, but it mostly works. For RL documents use the former, and
for LR ones use the latter.
+\New{3.32} There is some experimental support for \textsf{harftex}.
+Since it is based on \luatex, the option |basic| mostly works. You may
+need to deactivate the |rtlm| or the |rtla| font features (besides
+loading \textsf{harfload} before \babel and activating |mode=harf|;
+there is a sample in the GitHub repository).
+
There are samples on GitHub, under \texttt{/required/babel/samples}.
See particularly |lua-bidibasic.tex| and |lua-secenum.tex|.
@@ -2482,11 +2498,7 @@
The following text comes from the Arabic Wikipedia (article about
Arabia). Copy-pasting some text from the Wikipedia is a good way to
test this feature. Remember |basic-r| is available in \luatex{}
- only.\footnote{At the time of this writing some Arabic fonts are not
- rendered correctly by the default \luatex{} font loader, with
- misplaced kerns inside some words, so double check the resulting
- text. Have a look at the workaround available on GitHub, under
- \texttt{/required/babel/samples}}
+ only.
\begingroup
% If you are looking at the code to see how it has been written, you
% will be disappointed :-). The following example is built ad hoc to
@@ -2531,25 +2543,25 @@
\setmonofont[Scale=.87,Script=Arabic]{DejaVu Sans Mono} \catcode`@=13
\def@#1{\ifcase#1\relax \egroup \or \bgroup\textdir TRT \else
\bgroup\textdir TLT \pardir TLT \fi}
- \begin{verbatim}
- \documentclass{book}
+\begin{verbatim}
+\documentclass{book}
- \usepackage[english, _bidi=basic_]{babel}
+\usepackage[english, _bidi=basic_]{babel}
- \babelprovide[_mapfont=direction_]{arabic}
+\babelprovide[_mapfont=direction_]{arabic}
- \babelfont{rm}{Crimson}
- \babelfont[*arabic]{rm}{FreeSerif}
+\babelfont{rm}{Crimson}
+\babelfont[*arabic]{rm}{FreeSerif}
- \begin{document}
+\begin{document}
- Most Arabic speakers consider the two varieties to be two registers
- of one language, although the two registers can be referred to in
- Arabic as @1فصحى العصر@0 \textit{fuṣḥā l-ʻaṣr} (MSA) and
- @1فصحى التراث@0 \textit{fuṣḥā t-turāth} (CA).
+Most Arabic speakers consider the two varieties to be two registers
+of one language, although the two registers can be referred to in
+Arabic as @1فصحى العصر@0 \textit{fuṣḥā l-ʻaṣr} (MSA) and
+ at 1فصحى التراث@0 \textit{fuṣḥā t-turāth} (CA).
- \end{document}
- \end{verbatim}
+\end{document}
+\end{verbatim}
\endgroup
In this example, and thanks to |mapfont=direction|, any Arabic letter
(because the language is |arabic|) changes its font to that set for
@@ -2565,9 +2577,9 @@
|\hbox|’es). If you need |\ref| ranges, the best option is to define
a dedicated macro like this (to avoid explicit direction changes in the
body; here |\texthe| must be defined to select the main language):
- \begin{verbatim}
- \newcommand\refrange[2]{\babelsublr{\texthe{\ref{#1}}-\texthe{\ref{#2}}}}
- \end{verbatim}
+\begin{verbatim}
+\newcommand\refrange[2]{\babelsublr{\texthe{\ref{#1}}-\texthe{\ref{#2}}}}
+\end{verbatim}
In a future a more complete method, reading recursively boxed text, may
be added.
@@ -2579,7 +2591,8 @@
\texttt{contents} $\string|$
\texttt{footnotes} $\string|$
\texttt{captions} $\string|$
- \texttt{columns} $\string|$
+ \texttt{columns} $\string|$
+ \texttt{graphics} $\string|$
\texttt{extras}}
\New{3.16} \textit{To be expanded}. Selects which layout elements are
@@ -2652,6 +2665,12 @@
it might be ignored by some packages and classes (or even raise an
error). \New{3.18}.
+\item[graphics] modifies the |picture| environment so that the whole
+ figure is L but the text is R. It \textit{does not} work with the
+ standard |picture|, and \textit{pict2e} is required if you want
+ sloped lines. It attempts to do the same for \textsf{pgf/tikz}.
+ Somewhat experimental. \New{3.32}.
+
\item[extras] is used for miscellaneous readjustments which do not fit into
the previous groups. Currently redefines in \luatex{} |\underline| and
|\LaTeX2e| \New{3.19}.
@@ -2768,7 +2787,7 @@
events. Some hooks are predefined when \luatex{} and \xetex{} are
used.
-\Describe\AddBabelHook{\marg{name}\marg{event}\marg{code}}
+\Describe{\AddBabelHook}{\marg{name}\marg{event}\marg{code}}
The same name can be applied to several events. Hooks may be enabled
and disabled for all defined events with
@@ -2841,7 +2860,7 @@
file. Used by \file{luababel.def}.
\end{description}
-\Describe\BabelContentsFiles{}
+\Describe{\BabelContentsFiles}{}
\New{3.9a} This macro contains a list of ``toc'' types
requiring a command to switch the language. Its default value is
|toc,lof,lot|, but you may redefine it with |\renewcommand| (it's up
@@ -2910,8 +2929,9 @@
Most of them work out of the box, but some may require extra fonts,
encoding files, a preprocessor or even a complete framework (like
-CJK). For example, if you have got the \textsf{velthuis/devnag} package,
-you can create a file with extension |.dn|:
+\textsf{CJK} or \textsf{luatexja}). For example, if you have got the
+\textsf{velthuis/devnag} package, you can create a file with extension
+|.dn|:
\begin{verbatim}
\documentclass{article}
\usepackage[hindi]{babel}
@@ -2922,12 +2942,32 @@
Then you preprocess it with |devnag| \m{file}, which creates
\m{file}|.tex|; you can then typeset the latter with \LaTeX.
-\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{Unicode character properties in \luatex}
+\New{3.32} Part of the \babel{} job is to apply Unicode rules to some
+script-specific features based on some properties. Currently, they are
+3, namely, direction (ie, bidi class), mirroring glyphs, and line
+breaking for CJK scripts. These properties are stored in \textsf{lua}
+tables, which you can modify with the following macro.
+
+\Describe{\babelcharproperty}{\marg{char-code}\oarg{to-char-code}%
+ \marg{propertry}\marg{value}}
+
+\New{3.32} Here, \marg{char-code} is a number (with \TeX{} syntax).
+With the optional argument, you can set a range of values. There are
+three properties (with a short name, taken from Unicode): |direction|
+(|bc|), |mirror| (|bmg|), |linebreak| (|lb|). The settings are global.
+
+For example:
+\begin{verbatim}
+\babelcharproperty{`¿}{mirror}{`?}
+\babelcharproperty{`-}{direction}{l} % or al, r, en, an, on, et, cs
+\babelcharproperty{`)}{linebreak}{cl} % or id, op, cl, ns, ex, in, hy
+\end{verbatim}
+
+This command is allowed only in vertical mode (the preamble or between
+paragraphs).
+
\subsection{Tips, workarounds, know issues and notes}
\begin{itemize}
@@ -3896,8 +3936,6 @@
%
% \fi
%
-% \changes{babel~3.8e}{2005/03/24}{Many enhancements to the text by
-% Andrew Young}
% \changes{babel~3.9c}{2013/04/04}{Added the ``modifiers'' mechanism}
% \changes{babel~3.9g}{2013/06/01}{bbplain merged}
% \changes{babel~3.9k}{2014/03/23}{Code and doc reorganized, and some
@@ -3997,8 +4035,8 @@
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.31>>
-%<<date=2019/05/04>>
+%<<version=3.32>>
+%<<date=2019/06/03>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -4111,7 +4149,6 @@
% \end{macrocode}
% \end{macro}
%
-%
% \begin{macro}{\bbl at ifunset}
% To check if a macro is defined, we create a new macro, which does
% the same as |\@ifundefined|. However, in an $\epsilon$-tex engine,
@@ -4203,6 +4240,32 @@
\expandafter\bbl at replace@aux#1#2\bbl at nil#2%
\edef#1{\the\toks@}}
% \end{macrocode}
+%
+% An extensison to the previous macro. It takes into account the
+% parameters, and it is string based (ie, if you replace |elax| by
+% |ho|, then |\relax| becomes |\rho|). No checking is done at all,
+% because it is not a general purpose macro, and it is used by \babel{}
+% only when it works (an example where it does \textit{not} work is in
+% |\bbl at TG@@date|). It may change! (to add new features).
+%
+% \begin{macrocode}
+\expandafter\def\expandafter\bbl at parsedef\detokenize{macro:}#1->#2\relax{%
+ \def\bbl at tempa{#1}%
+ \def\bbl at tempb{#2}}
+\def\bbl at sreplace#1#2#3{%
+ \begingroup
+ \expandafter\bbl at parsedef\meaning#1\relax
+ \def\bbl at tempc{#2}%
+ \edef\bbl at tempc{\expandafter\strip at prefix\meaning\bbl at tempc}%
+ \def\bbl at tempd{#3}%
+ \edef\bbl at tempd{\expandafter\strip at prefix\meaning\bbl at tempd}%
+ \bbl at exp{\\\bbl at replace\\\bbl at tempb{\bbl at tempc}{\bbl at tempd}}%
+ \bbl at exp{%
+ \endgroup
+ \\\makeatletter % "internal" macros with @ are assumed
+ \\\scantokens{\def\\#1\bbl at tempa{\bbl at tempb}}%
+ \catcode64=\the\catcode64\relax}} % Restore @
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\bbl at exp}
@@ -4391,7 +4454,6 @@
% compatibility issues with other packages an defines a few
% aditional package options.
%
-%
% Apart from all the language options below we also have a few options
% that influence the behavior of language definition files.
%
@@ -4445,6 +4507,7 @@
%
% \changes{babel~3.30}{2019/04/22}{Callbacks aren't specific to
% bidi any more, so they are moved.}
+% \changes{babel~3.32}{2019/05/30}{Consider Harf.}
%
% \begin{macrocode}
\ifx\bbl at languages\@undefined\else
@@ -4466,6 +4529,8 @@
\bbl at languages
\fi
\ifodd\bbl at engine
+ % Harftex is evolving, so the callback is not harcoded, just in case
+ \def\bbl at harfpreline{Harf pre_linebreak_filter callback}%
\def\bbl at activate@preotf{%
\let\bbl at activate@preotf\relax % only once
\directlua{
@@ -4498,13 +4563,19 @@
Babel.pre_otfload_v,
'Babel.pre_otfload_v',
luatexbase.priority_in_callback('pre_linebreak_filter',
- 'luaotfload.node_processor') or nil)
+ '\bbl at harfpreline')
+ or luatexbase.priority_in_callback('pre_linebreak_filter',
+ 'luaotfload.node_processor')
+ or nil)
%
luatexbase.add_to_callback('hpack_filter',
Babel.pre_otfload_h,
'Babel.pre_otfload_h',
luatexbase.priority_in_callback('hpack_filter',
- 'luaotfload.node_processor') or nil)
+ '\bbl at harfpreline')
+ or luatexbase.priority_in_callback('hpack_filter',
+ 'luaotfload.node_processor')
+ or nil)
}}
\let\bbl at tempa\relax
\@ifpackagewith{babel}{bidi=basic}%
@@ -5162,7 +5233,6 @@
\lowercase{\endgroup#1~}}
% \end{macrocode}
%
-%
% \begin{macro}{\bbl at redefine}
% To redefine a command, we save the old meaning of the macro.
% Then we redefine it to call the original macro with the
@@ -5332,6 +5402,10 @@
\def\<bbl at e@#2>{\the\toks@{\bbl at ens@fontenc}}}}
\def\bbl at ensure#1#2#3{% 1: include 2: exclude 3: fontenc
\def\bbl at tempb##1{% elt for (excluding) \bbl at captionslist list
+ \ifx##1\@undefined % 3.32 - Don't assume the macros exists
+ \edef##1{\noexpand\bbl at nocaption
+ {\bbl at stripslash##1}{\languagename\bbl at stripslash##1}}%
+ \fi
\ifx##1\@empty\else
\in@{##1}{#2}%
\ifin@\else
@@ -5502,8 +5576,6 @@
% to switch to the correct language at the beginning of the
% document.
%
-% \changes{babel~3.8l}{2008/07/06}{Use \cs{bbl at patterns}}
-%
% \begin{macrocode}
\def\main at language#1{%
\def\bbl at main@language{#1}%
@@ -5805,7 +5877,6 @@
% single character shorthand. If that doesn't exist we check for a
% shorthand with an argument.
%
-% \changes{babel~3.8b}{2004/04/19}{Now use \cs{bbl at sh@select}}
% \changes{babel~3.9a}{2012/08/18}{Instead of the ``copy-paste pattern''
% a new macro is used}
%
@@ -5910,7 +5981,6 @@
% will expand to either |\bbl at firstcs| or |\bbl at scndcs|. Hence two
% more arguments need to follow it.
%
-% \changes{babel~3.8b}{2004/04/19}{Added command}
% \changes{babel~3.9a}{2012/08/18}{Removed \cs{string}s, because the
% char are already string'ed}
%
@@ -6029,9 +6099,6 @@
% \item the code to be executed when the shorthand is encountered.
% \end{enumerate}
%
-% \changes{babel~3.8b}{2004/04/19}{We need to support shorthands with
-% and without argument in different groups; added the name of the
-% group to the storage macro}
% \changes{babel~3.9a}{2012/07/03}{Check if shorthands are redefined}
%
% \begin{macrocode}
@@ -6233,8 +6300,6 @@
%
% \begin{macro}{\@notshorthand}
%
-% \changes{v3.8d}{2004/11/20}{Error message added}
-%
% \begin{macrocode}
\def\@notshorthand#1{%
\bbl at error{%
@@ -7605,9 +7670,6 @@
% \begin{macro}{\glq}
% \begin{macro}{\grq}
%
-% \changes{babel~3.8b}{2004/05/02}{Made \cs{glq} fontencoding
-% dependent as well}
-%
% The `german' single quotes.
%
% \begin{macrocode}
@@ -7636,9 +7698,6 @@
% \begin{macro}{\glqq}
% \begin{macro}{\grqq}
%
-% \changes{babel~3.8b}{2004/05/02}{Made \cs{grqq} fontencoding
-% dependent as well}
-%
% The `german' double quotes.
%
% \begin{macrocode}
@@ -7667,9 +7726,6 @@
% \begin{macro}{\flq}
% \begin{macro}{\frq}
%
-% \changes{babel~3.8b}{2004/05/02}{Made \cs{flq} and \cs{frq}
-% fontencoding dependent}
-%
% The `french' single guillemets.
%
% \begin{macrocode}
@@ -7685,9 +7741,6 @@
% \begin{macro}{\flqq}
% \begin{macro}{\frqq}
%
-% \changes{babel~3.8b}{2004/05/02}{Made \cs{flqq} and \cs{frqq}
-% fontencoding dependent}
-%
% The `french' double guillemets.
%
% \begin{macrocode}
@@ -7711,9 +7764,6 @@
%
% \begin{macro}{\umlauthigh}
%
-% \changes{v3.8a}{2004/02/19}{Use \cs{leavevmode}\cs{bgroup} to
-% prevent problems when this command occurs in vertical mode.}
-%
% \begin{macro}{\umlautlow}
% To be able to provide both positions of |\"| we provide two
% commands to switch the positioning, the default will be
@@ -7755,9 +7805,6 @@
% we'll change this font dimension and this is always done
% globally.
%
-% \changes{v3.8a}{2004/02/19}{Use \cs{leavevmode}\cs{bgroup} to
-% prevent problems when this command occurs in vertical mode.}
-%
% Then we compute the new x-height in such a way that the umlaut
% character is lowered to the base character. The value of
% \texttt{.45ex} depends on the \MF\ parameters with which the
@@ -7907,6 +7954,8 @@
% \changes{3.30}{2019/04/22}{Native digits (lua level).}
% \changes{3.30}{2019/04/22}{New attribute in luatex for `locale'. Also
% \cs{localeid}}
+% \changes{3.32}{2019/05/30}{Activate CJK line breaking with an explicit
+% intraspace.}
%
% \begin{macrocode}
\bbl at trace{Creating languages and reading ini files}
@@ -8008,11 +8057,14 @@
\fi
\bbl at exp{\\\bbl at add\\\bbl at mapselect{\\\bbl at mapdir{\languagename}}}%
\fi
- % For Southeast Asian, if interspace in ini -- TODO: as hook
+ % For East Asian, Southeast Asian, if interspace in ini - TODO: as hook?
+ \ifx\bbl at KVP@intraspace\@nil\else % We may override the ini
+ \bbl at csarg\edef{intsp@#2}{\bbl at KVP@intraspace}%
+ \fi
\ifcase\bbl at engine\or
\bbl at ifunset{bbl at intsp@\languagename}{}%
{\expandafter\ifx\csname bbl at intsp@\languagename\endcsname\@empty\else
- \bbl at xin@{\bbl at cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore}%
+ \bbl at xin@{\bbl at cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore,Kana}%
\ifin@
\bbl at cjkintraspace
\directlua{
@@ -8020,19 +8072,13 @@
Babel.locale_props = Babel.locale_props or {}
Babel.locale_props[\the\localeid].linebreak = 'c'
}%
- \ifx\bbl at KVP@intraspace\@nil
- \bbl at exp{%
- \\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
- \fi
+ \bbl at exp{\\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
\ifx\bbl at KVP@intrapenalty\@nil
\bbl at intrapenalty0\@@
\fi
\else
\bbl at seaintraspace
- \ifx\bbl at KVP@intraspace\@nil
- \bbl at exp{%
- \\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
- \fi
+ \bbl at exp{\\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
\directlua{
Babel = Babel or {}
Babel.sea_ranges = Babel.sea_ranges or {}
@@ -8044,9 +8090,6 @@
\fi
\fi
\fi
- \ifx\bbl at KVP@intraspace\@nil\else % We may override the ini
- \expandafter\bbl at intraspace\bbl at KVP@intraspace\@@
- \fi
\ifx\bbl at KVP@intrapenalty\@nil\else
\expandafter\bbl at intrapenalty\bbl at KVP@intrapenalty\@@
\fi}%
@@ -8905,18 +8948,11 @@
% with the text that is put into them. To achieve this we need to
% adapt the definition of |\markright| and |\markboth| somewhat.
%
-% \changes{babel~3.8c}{2004/05/26}{No need to add \emph{anything} to
-% an empty mark; prevented this by checking the contents of the
-% argument}
-% \changes{babel~3.8f}{2005/05/15}{Make the definition independent of
-% the original definition; expand \cs{languagename} before passing
-% it into the token registers}
% \changes{babel~3.9t}{2017/04/23}{Refactored \cs{markright} and
% \cs{markboth}}
% \changes{babel~3.23}{2018/09/01}{Trick to isolate the bidi in page
% numbers}
%
-%
% We check whether the argument is empty; if it is, we just make
% sure the scratch token register is empty. Next, we store the
% argument to |\markright| in the scratch token register. This way
@@ -8958,15 +8994,6 @@
% |\@mkboth| has already been set. If so we neeed to do that again
% with the new definition of |\markboth|.
%
-% \changes{babel~3.8c}{2004/05/26}{No need to add \emph{anything} to
-% an empty mark, prevented this by checking the contents of the
-% arguments}
-% \changes{babel~3.8f}{2005/05/15}{Make the definition independent of
-% the original definition; expand \cs{languagename} before passing
-% it into the token registers}
-% \changes{babel~3.8j}{2008/03/21}{Added setting of \cs{@mkboth} (PR
-% 3826)}
-%
% \begin{macrocode}
\ifx\@mkboth\markboth
\def\bbl at tempc{\let\@mkboth\markboth}
@@ -9085,10 +9112,6 @@
% \begin{macro}{\vrefpagenum}
% \begin{macro}{\Ref}
%
-% \changes{babel~3.8g}{2005/05/21}{We also need to adapt \cs{Ref}
-% which needs to be able to uppercase the first letter of the
-% expansion of \cs{ref}}
-%
% When the package varioref is in use we need to modify its
% internal command |\@@vpageref| in order to prevent problems when
% an active character ends up in the argument of |\vref|.
@@ -9152,9 +9175,6 @@
% Then we check whether the expansion of |\normal at char:| is not
% equal to |\relax|.
%
-% \changes{babel~3.8b}{2004/04/19}{added \cs{string} to prevent
-% unwanted expansion of the colon}
-%
% \begin{macrocode}
{\expandafter\ifx\csname normal at char\string:\endcsname\relax
\else
@@ -9177,9 +9197,6 @@
%
% \begin{macro}{\pdfstringdefDisableCommands}
%
-% \changes{babel~3.8j}{2008/03/16}{Inform \pkg{hyperref} to use
-% shorthands at system level (PR4006)}
-%
% A number of interworking problems between \pkg{babel} and
% \pkg{hyperref} are tackled by \pkg{hyperref} itself. The
% following code was introduced to prevent some annoying warnings
@@ -10016,7 +10033,6 @@
% update the value of |\language| and call |\originalTeX|
% to bring \TeX\ in a certain pre-defined state.
%
-% \changes{babel~3.8l}{2008/07/06}{Use \cs{bbl at patterns}}
% \changes{babel~3.9a}{2012/07/27}{Moved \cs{bbl at patterns} to the
% correct place, after setting the extras for the current
% language}
@@ -10293,7 +10309,6 @@
%
% \begin{macro}{\bbl at patterns}
%
-% \changes{babel~3.8l}{2008/07/06}{Macro added}
% \changes{babel~3.9a}{2012/08/28}{Extended to set hyphenation
% exceptions as defined with \cs{babelhyphenation}}
% \changes{babel~3.9m}{2015/07/25}{Preset \cs{bbl at pttnlist} and
@@ -10354,9 +10369,6 @@
% |\lccode|'s and font encodings are not set at all, so in most
% cases you should use |otherlanguage*|.
%
-% \changes{babel~3.8j}{2008/03/16}{Also set the hyphenmin parameters to
-% the correct value (PR3997)}
-% \changes{babel~3.8l}{2008/07/06}{Use \cs{bbl at patterns}}
% \changes{3.15}{2017/10/30}{Don't set language name. Use temp macro.}
% \changes{3.15}{2018/02/14}{Fix - didn't work with polyglossia}
%
@@ -10675,7 +10687,6 @@
<@Define core switching macros@>
% \end{macrocode}
%
-%
% \begin{macro}{\process at line}
% Each line in the file \file{language.dat} is processed by
% |\process at line| after it is read. The first thing this macro does
@@ -10957,9 +10968,6 @@
% Check for the end of the file. We must reverse the test for
% |\ifeof| without |\else|. Then reactivate the default patterns.
%
-% \changes{babel~3.8m}{2008/07/08}{Also restore the name of the
-% language in \cs{languagename} (PR 4039)}
-%
% \begin{macrocode}
\begingroup
\def\bbl at elt#1#2#3#4{%
@@ -11290,7 +11298,6 @@
%<</Font selection>>
% \end{macrocode}
%
-%
% \section{Hooks for XeTeX and LuaTeX}
%
% \subsection{XeTeX}
@@ -11450,6 +11457,9 @@
% Consider |txtbabel| as a shorthand for \textit{tex--xet babel},
% which is the bidi model in both \pdftex{} and \xetex{}.
%
+% \changes{3.33}{2019/05/04}{\cs{@tabular}, \cs{list}, etc., are
+% patched, instead of redefined.}
+%
% \begin{macrocode}
%<*texxet>
\bbl at trace{Redefinitions for bidi layout}
@@ -11478,122 +11488,39 @@
\parfillskip\bbl at endskip}
\fi
\IfBabelLayout{lists}
- {\def\list#1#2{%
- \ifnum \@listdepth >5\relax
- \@toodeep
- \else
- \global\advance\@listdepth\@ne
- \fi
- \rightmargin\z@
- \listparindent\z@
- \itemindent\z@
- \csname @list\romannumeral\the\@listdepth\endcsname
- \def\@itemlabel{#1}%
- \let\makelabel\@mklab
- \@nmbrlistfalse
- #2\relax
- \@trivlist
- \parskip\parsep
- \parindent\listparindent
- \advance\linewidth-\rightmargin
- \advance\linewidth-\leftmargin
- \advance\@totalleftmargin
- \ifcase\bbl at thepardir\leftmargin\else\rightmargin\fi
- \parshape\@ne\@totalleftmargin\linewidth
- \ignorespaces}%
- \ifcase\bbl at engine
- \def\labelenumii{)\theenumii(}%
- \def\p at enumiii{\p at enumii)\theenumii(}%
- \fi
- \def\@verbatim{%
- \trivlist \item\relax
- \if at minipage\else\vskip\parskip\fi
- \bbl at startskip\textwidth
- \advance\bbl at startskip-\linewidth
- \bbl at endskip\z at skip
- \parindent\z@
- \parfillskip\@flushglue
- \parskip\z at skip
- \@@par
- \language\l at nohyphenation
- \@tempswafalse
- \def\par{%
- \if at tempswa
- \leavevmode\null
- \@@par\penalty\interlinepenalty
- \else
- \@tempswatrue
- \ifhmode\@@par\penalty\interlinepenalty\fi
- \fi}%
- \let\do\@makeother \dospecials
- \obeylines \verbatim at font \@noligs
- \everypar\expandafter{\the\everypar\unpenalty}}}
+ {\bbl at sreplace\list
+ {\@totalleftmargin\leftmargin}{\@totalleftmargin\bbl at listleftmargin}%
+ \def\bbl at listleftmargin{%
+ \ifcase\bbl at thepardir\leftmargin\else\rightmargin\fi}%
+ \ifcase\bbl at engine
+ \def\labelenumii{)\theenumii(}% pdftex doesn't reverse ()
+ \def\p at enumiii{\p at enumii)\theenumii(}%
+ \fi
+ \bbl at sreplace\@verbatim
+ {\leftskip\@totalleftmargin}%
+ {\bbl at startskip\textwidth
+ \advance\bbl at startskip-\linewidth}%
+ \bbl at sreplace\@verbatim
+ {\rightskip\z at skip}%
+ {\bbl at endskip\z at skip}}%
{}
\IfBabelLayout{contents}
- {\def\@dottedtocline#1#2#3#4#5{%
- \ifnum#1>\c at tocdepth\else
- \vskip \z@ \@plus.2\p@
- {\bbl at startskip#2\relax
- \bbl at endskip\@tocrmarg
- \parfillskip-\bbl at endskip
- \parindent#2\relax
- \@afterindenttrue
- \interlinepenalty\@M
- \leavevmode
- \@tempdima#3\relax
- \advance\bbl at startskip\@tempdima
- \null\nobreak\hskip-\bbl at startskip
- {#4}\nobreak
- \leaders\hbox{%
- $\m at th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}%
- \hfill\nobreak
- \hb at xt@\@pnumwidth{\hfil\normalfont\normalcolor#5}%
- \par}%
- \fi}}
+ {\bbl at sreplace\@dottedtocline{\leftskip}{\bbl at startskip}%
+ \bbl at sreplace\@dottedtocline{\rightskip}{\bbl at endskip}}
{}
\IfBabelLayout{columns}
- {\def\@outputdblcol{%
- \if at firstcolumn
- \global\@firstcolumnfalse
- \global\setbox\@leftcolumn\copy\@outputbox
- \splitmaxdepth\maxdimen
- \vbadness\maxdimen
- \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
- \setbox\@outputbox\vsplit\@outputbox to\maxdimen
- \toks@\expandafter{\topmark}%
- \xdef\@firstcoltopmark{\the\toks@}%
- \toks@\expandafter{\splitfirstmark}%
- \xdef\@firstcolfirstmark{\the\toks@}%
- \ifx\@firstcolfirstmark\@empty
- \global\let\@setmarks\relax
- \else
- \gdef\@setmarks{%
- \let\firstmark\@firstcolfirstmark
- \let\topmark\@firstcoltopmark}%
- \fi
- \else
- \global\@firstcolumntrue
- \setbox\@outputbox\vbox{%
- \hb at xt@\textwidth{%
- \hskip\columnwidth
- \hfil
- {\normalcolor\vrule \@width\columnseprule}%
- \hfil
- \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
- \hskip-\textwidth
- \hb at xt@\columnwidth{\box\@outputbox \hss}%
- \hskip\columnsep
- \hskip\columnwidth}}%
- \@combinedblfloats
- \@setmarks
- \@outputpage
- \begingroup
- \@dblfloatplacement
- \@startdblcolumn
- \@whilesw\if at fcolmade \fi{\@outputpage
- \@startdblcolumn}%
- \endgroup
- \fi}}%
+ {\bbl at sreplace\@outputdblcol{\hb at xt@\textwidth}{\bbl at outputhbox}%
+ \def\bbl at outputhbox#1{%
+ \hb at xt@\textwidth{%
+ \hskip\columnwidth
+ \hfil
+ {\normalcolor\vrule \@width\columnseprule}%
+ \hfil
+ \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hskip-\textwidth
+ \hb at xt@\columnwidth{\box\@outputbox \hss}%
+ \hskip\columnsep
+ \hskip\columnwidth}}}%
{}
<@Footnote changes@>
\IfBabelLayout{footnotes}%
@@ -11603,7 +11530,7 @@
{}
% \end{macrocode}
%
-% Implicitly reverses sectioning labels in |bidi=basic-r|, because
+% Implicitly reverses sectioning labels in |bidi=basic|, because
% the full stop is not in contact with L numbers any more. I
% think there must be a better way.
%
@@ -11989,6 +11916,7 @@
%
% \changes{babel~3.24}{2018/09/24}{Lua code for interword spacing
% in Southeast Asian scripts.}
+% \changes{babel~3.32}{2019/05/25}{Don't break with CJK if nohyphenation.}
%
% \textit{In progress.} Replace regular (ie, implicit) discretionaries
% by spaceskips, based on the previous glyph (which I think makes
@@ -12080,13 +12008,15 @@
local last_char = nil
local quad = 655360 % 10 pt = 655360 = 10 * 65536
local last_class = nil
+ local last_lang = nil
for item in node.traverse(head) do
if item.id == GLYPH then
+
+ local lang = item.lang
local LOCALE = node.get_attribute(item,
luatexbase.registernumber'bbl at attr@locale')
-
local props = Babel.locale_props[LOCALE]
class = Babel.cjk_class[item.char].c
@@ -12100,7 +12030,9 @@
br = 0
end
- if br == 1 and props.linebreak == 'c' then
+ if br == 1 and props.linebreak == 'c' and
+ lang ~= \the\l at nohyphenation\space and
+ last_lang ~= \the\l at nohyphenation then
local intrapenalty = props.intrapenalty
if intrapenalty ~= 0 then
local n = node.new(14, 0) % penalty
@@ -12117,6 +12049,7 @@
quad = font.getfont(item.font).size
last_class = class
+ last_lang = lang
else % if penalty, glue or anything else
last_class = nil
end
@@ -12146,11 +12079,11 @@
%
% \subsection{CJK line breaking}
%
-% Minimal line breaking for CJK scripts, mainly intended by simple
+% Minimal line breaking for CJK scripts, mainly intended for simple
% documents and short texts as a secundary language. Only line
% breaking, with a little stretching for justification, without any
-% attempt to adjust the spacing. It is based (but does not strictly
-% follows) on the Unicode algorithm.
+% attempt to adjust the spacing. It is based on (but does not strictly
+% follow) the Unicode algorithm.
%
% We first need a little table with the corresponding line breaking
% properties. A few characters have an additional key for the width
@@ -12157,7 +12090,7 @@
% (fullwidth \textit{vs.} halfwidth), not yet used. There is a separate
% file, defined below.
%
-% \changes{3.31}{2019/05/04}{Simple CJK line breaking}
+% \changes{3.31}{2019/05/04}{Simple CJK line breaking.}
%
% \textit{Work in progress.}
%
@@ -12199,6 +12132,53 @@
\AtBeginDocument{\bbl at luafixboxdir}
% \end{macrocode}
%
+% \changes{3.32}{2019/05/23}{New - \cs{babelcharproperty}.}
+%
+% The code for |\babelcharproperty| is straightforward. Just note the
+% modified lua table can be different.
+%
+% \begin{macrocode}
+\newcommand\babelcharproperty[1]{%
+ \count@=#1\relax
+ \ifvmode
+ \expandafter\bbl at chprop
+ \else
+ \bbl at error{\string\babelcharproperty\space can be used only in\\%
+ vertical mode (preamble or between paragraphs)}%
+ {See the manual for futher info}%
+ \fi}
+\newcommand\bbl at chprop[3][\the\count@]{%
+ \@tempcnta=#1\relax
+ \bbl at ifunset{bbl at chprop@#2}%
+ {\bbl at error{No property named '#2'. Allowed values are\\%
+ direction (bc), mirror (bmg), and linebreak (lb)}%
+ {See the manual for futher info}}%
+ {}%
+ \loop
+ \@nameuse{bbl at chprop@#2}{#3}%
+ \ifnum\count@<\@tempcnta
+ \advance\count@\@ne
+ \repeat}
+\def\bbl at chprop@direction#1{%
+ \directlua{
+ Babel.characters[\the\count@] = Babel.characters[\the\count@] or {}
+ Babel.characters[\the\count@]['d'] = '#1'
+ }}
+\let\bbl at chprop@bc\bbl at chprop@direction
+\def\bbl at chprop@mirror#1{%
+ \directlua{
+ Babel.characters[\the\count@] = Babel.characters[\the\count@] or {}
+ Babel.characters[\the\count@]['m'] = '\number#1'
+ }}
+\let\bbl at chprop@bmg\bbl at chprop@mirror
+\def\bbl at chprop@linebreak#1{%
+ \directlua{
+ Babel.Babel.cjk_characters[\the\count@] = Babel.Babel.cjk_characters[\the\count@] or {}
+ Babel.Babel.cjk_characters[\the\count@]['c'] = '#1'
+ }}
+\let\bbl at chprop@lb\bbl at chprop@linebreak
+% \end{macrocode}
+%
% \subsection{Layout}
%
% \textbf{Work in progress}.
@@ -12206,17 +12186,24 @@
% Unlike \xetex{}, \luatex{} requires only minimal changes for
% right-to-left layouts, particularly in monolingual documents (the
% engine itself reverses boxes -- including column order or headings
-% --, margins, etc.) and with |bidi=basic-r|, without having to patch
+% --, margins, etc.) with |bidi=basic|, without having to patch
% almost any macro where text direction is relevant.
%
% |\@hangfrom| is useful in many contexts and it is redefined always
% with the |layout| option.
%
-% There are, however, a number of issues when the text direction is
-% not the same as the box direction (as set by |\bodydir|), and when
+% There are, however, a number of issues when the text direction is not
+% the same as the box direction (as set by |\bodydir|), and when
% |\parbox| and |\hangindent| are involved. Fortunately, latest
% releases of \luatex{} simplify a lot the solution with |\shapemode|.
%
+% With the issue \#15 I realized commands are best patched, instead of
+% redefined. With a few lines, a modification could be applied to
+% several classes and packages. Now, |tabular| seems to work (at least
+% in simple cases) with \textsf{array}, \textsf{tabularx},
+% \textsf{hhline}, \textsf{colortbl}, \textsf{longtable},
+% \textsf{booktabs}, etc. However, \textsf{dcolumn} still fails.
+%
% \changes{3.18}{2018/02/14}{\cs{bbl at nextfake}, similar to the old
% \cs{nextfakemath} in Omega}
% \changes{3.19}{2018/04/23}{Patch \cs{@eqnnum}, somewhat ad hoc. To be
@@ -12269,11 +12256,9 @@
\ifx\bbl at tabular\@tabular\else
\bbl at replace\@tabular{$}{\bbl at nextfake$}%
\fi}}
- {}
+ {}
\IfBabelLayout{lists}
- {\expandafter\def\expandafter\bbl at toreplace\expandafter{\list{##1}{##2}}%
- \bbl at replace\bbl at toreplace{\parshape}{\bbl at listparshape}%
- \bbl at exp{\def\\\list##1##2{\the\toks@}}% \toks@ <- implicit result
+ {\bbl at sreplace\list{\parshape}{\bbl at listparshape}%
\def\bbl at listparshape#1#2#3{%
\parshape #1 #2 #3 %
\ifnum\bbl at getluadir{page}=\bbl at getluadir{par}\else
@@ -12280,19 +12265,37 @@
\shapemode\tw@
\fi}}
{}
+\IfBabelLayout{graphics}
+ {\let\bbl at pictresetdir\relax
+ \def\bbl at pictsetdir{%
+ \ifcase\bbl at thetextdir
+ \let\bbl at pictresetdir\relax
+ \else
+ \textdir TLT\relax
+ \def\bbl at pictresetdir{\textdir TRT\relax}%
+ \fi}%
+ \bbl at sreplace\@picture{\hskip-}{\bbl at pictsetdir\hskip-}%
+ \def\put(#1,#2)#3{% Not easy to patch. Better redefine.
+ \@killglue
+ \raise#2\unitlength
+ \hb at xt@\z@{\kern#1\unitlength{\bbl at pictresetdir#3}\hss}}%
+ \AtBeginDocument
+ {\ifx\tikz at atbegin@node\@undefined\else
+ \bbl at sreplace\pgfpicture{\pgfpicturetrue}{\bbl at pictsetdir\pgfpicturetrue}%
+ \bbl at add\pgfsys at beginpicture{\bbl at pictsetdir}%
+ \bbl at add\tikz at atbegin@node{\bbl at pictresetdir}%
+ \fi}}
+ {}
% \end{macrocode}
%
% Implicitly reverses sectioning labels in bidi=basic-r, because
% the full stop is not in contact with L numbers any more. I
-% think there must be a better way. Assumes |bidi=basic-r|, but
+% think there must be a better way. Assumes |bidi=basic|, but
% there are some additional readjustments for |bidi=default|.
%
% \begin{macrocode}
\IfBabelLayout{counters}%
- {\def\@textsuperscript#1{{% lua has separate settings for math
- \m at th
- \mathdir\pagedir % required with basic-r; ok with default, too
- \ensuremath{^{\mbox {\fontsize \sf at size \z@ #1}}}}}%
+ {\bbl at sreplace\@textsuperscript{\m at th}{\m at th\mathdir\pagedir}%
\let\bbl at latinarabic=\@arabic
\def\@arabic#1{\babelsublr{\bbl at latinarabic#1}}%
\@ifpackagewith{babel}{bidi=default}%
@@ -12318,10 +12321,7 @@
%
% \begin{macrocode}
\IfBabelLayout{extras}%
- {\def\underline#1{%
- \relax
- \ifmmode\@@underline{#1}%
- \else\bbl at nextfake$\@@underline{\hbox{#1}}\m at th$\relax\fi}%
+ {\bbl at sreplace\underline{$\@@underline}{\bbl at nextfake$\@@underline}%
\DeclareRobustCommand{\LaTeXe}{\mbox{\m at th
\if b\expandafter\@car\f at series\@nil\boldmath\fi
\babelsublr{%
@@ -19399,12 +19399,13 @@
% command, \texttt{nil} could be an `unknown' language in which
% case we have to make it known.
%
+% \changes{babel-3.32}{2019/05/21}{Don't set it to
+% \cs{l at nohyphenation}, best reserved fo special uses.}
+%
% \begin{macrocode}
-\ifx\l at nohyphenation\@undefined
- \@nopatterns{nil}
- \adddialect\l at nil0
-\else
- \let\l at nil\l at nohyphenation
+\ifx\l at nil\@undefined
+ \newlanguage\l at nil
+ \@namedef{bbl at hyphendata@\the\l at nil}{{}{}}% Remove warning
\fi
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex/babel/babel.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.ins 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.ins 2019-06-03 21:35:43 UTC (rev 51309)
@@ -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{2019/05/04}
+\def\filedate{2019/06/03}
\def\batchfile{babel.ins}
\input docstrip.tex
Modified: trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx 2019-06-03 21:35:43 UTC (rev 51309)
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2019/05/04 v3.31]
+\ProvidesFile{bbcompat.dtx}[2019/06/03 v3.32]
%</dtx>
%
%% File 'bbcompat.dtx'
Modified: trunk/Master/texmf-dist/source/latex/babel/locale.zip
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.def 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.def 2019-06-03 21:35:43 UTC (rev 51309)
@@ -41,7 +41,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{babel.def}[2019/05/04 3.31 Babel common definitions]
+\ProvidesFile{babel.def}[2019/06/03 3.32 Babel common definitions]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -187,6 +187,22 @@
\fi}%
\expandafter\bbl at replace@aux#1#2\bbl at nil#2%
\edef#1{\the\toks@}}
+\expandafter\def\expandafter\bbl at parsedef\detokenize{macro:}#1->#2\relax{%
+ \def\bbl at tempa{#1}%
+ \def\bbl at tempb{#2}}
+\def\bbl at sreplace#1#2#3{%
+ \begingroup
+ \expandafter\bbl at parsedef\meaning#1\relax
+ \def\bbl at tempc{#2}%
+ \edef\bbl at tempc{\expandafter\strip at prefix\meaning\bbl at tempc}%
+ \def\bbl at tempd{#3}%
+ \edef\bbl at tempd{\expandafter\strip at prefix\meaning\bbl at tempd}%
+ \bbl at exp{\\\bbl at replace\\\bbl at tempb{\bbl at tempc}{\bbl at tempd}}%
+ \bbl at exp{%
+ \endgroup
+ \\\makeatletter % "internal" macros with @ are assumed
+ \\\scantokens{\def\\#1\bbl at tempa{\bbl at tempb}}%
+ \catcode64=\the\catcode64\relax}} % Restore @
\def\bbl at exp#1{%
\begingroup
\let\\\noexpand
@@ -296,6 +312,10 @@
\def\<bbl at e@#2>{\the\toks@{\bbl at ens@fontenc}}}}
\def\bbl at ensure#1#2#3{% 1: include 2: exclude 3: fontenc
\def\bbl at tempb##1{% elt for (excluding) \bbl at captionslist list
+ \ifx##1\@undefined % 3.32 - Don't assume the macros exists
+ \edef##1{\noexpand\bbl at nocaption
+ {\bbl at stripslash##1}{\languagename\bbl at stripslash##1}}%
+ \fi
\ifx##1\@empty\else
\in@{##1}{#2}%
\ifin@\else
@@ -1402,11 +1422,14 @@
\fi
\bbl at exp{\\\bbl at add\\\bbl at mapselect{\\\bbl at mapdir{\languagename}}}%
\fi
- % For Southeast Asian, if interspace in ini -- TODO: as hook
+ % For East Asian, Southeast Asian, if interspace in ini - TODO: as hook?
+ \ifx\bbl at KVP@intraspace\@nil\else % We may override the ini
+ \bbl at csarg\edef{intsp@#2}{\bbl at KVP@intraspace}%
+ \fi
\ifcase\bbl at engine\or
\bbl at ifunset{bbl at intsp@\languagename}{}%
{\expandafter\ifx\csname bbl at intsp@\languagename\endcsname\@empty\else
- \bbl at xin@{\bbl at cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore}%
+ \bbl at xin@{\bbl at cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore,Kana}%
\ifin@
\bbl at cjkintraspace
\directlua{
@@ -1414,19 +1437,13 @@
Babel.locale_props = Babel.locale_props or {}
Babel.locale_props[\the\localeid].linebreak = 'c'
}%
- \ifx\bbl at KVP@intraspace\@nil
- \bbl at exp{%
- \\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
- \fi
+ \bbl at exp{\\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
\ifx\bbl at KVP@intrapenalty\@nil
\bbl at intrapenalty0\@@
\fi
\else
\bbl at seaintraspace
- \ifx\bbl at KVP@intraspace\@nil
- \bbl at exp{%
- \\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
- \fi
+ \bbl at exp{\\\bbl at intraspace\bbl at cs{intsp@\languagename}\\\@@}%
\directlua{
Babel = Babel or {}
Babel.sea_ranges = Babel.sea_ranges or {}
@@ -1438,9 +1455,6 @@
\fi
\fi
\fi
- \ifx\bbl at KVP@intraspace\@nil\else % We may override the ini
- \expandafter\bbl at intraspace\bbl at KVP@intraspace\@@
- \fi
\ifx\bbl at KVP@intrapenalty\@nil\else
\expandafter\bbl at intrapenalty\bbl at KVP@intrapenalty\@@
\fi}%
Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.sty 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.sty 2019-06-03 21:35:43 UTC (rev 51309)
@@ -33,7 +33,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2019/05/04 3.31 The Babel package]
+\ProvidesPackage{babel}[2019/06/03 3.32 The Babel package]
\@ifpackagewith{babel}{debug}
{\providecommand\bbl at trace[1]{\message{^^J[ #1 ]}}%
\let\bbl at debug\@firstofone}
@@ -138,6 +138,22 @@
\fi}%
\expandafter\bbl at replace@aux#1#2\bbl at nil#2%
\edef#1{\the\toks@}}
+\expandafter\def\expandafter\bbl at parsedef\detokenize{macro:}#1->#2\relax{%
+ \def\bbl at tempa{#1}%
+ \def\bbl at tempb{#2}}
+\def\bbl at sreplace#1#2#3{%
+ \begingroup
+ \expandafter\bbl at parsedef\meaning#1\relax
+ \def\bbl at tempc{#2}%
+ \edef\bbl at tempc{\expandafter\strip at prefix\meaning\bbl at tempc}%
+ \def\bbl at tempd{#3}%
+ \edef\bbl at tempd{\expandafter\strip at prefix\meaning\bbl at tempd}%
+ \bbl at exp{\\\bbl at replace\\\bbl at tempb{\bbl at tempc}{\bbl at tempd}}%
+ \bbl at exp{%
+ \endgroup
+ \\\makeatletter % "internal" macros with @ are assumed
+ \\\scantokens{\def\\#1\bbl at tempa{\bbl at tempb}}%
+ \catcode64=\the\catcode64\relax}} % Restore @
\def\bbl at exp#1{%
\begingroup
\let\\\noexpand
@@ -187,6 +203,8 @@
\bbl at languages
\fi
\ifodd\bbl at engine
+ % Harftex is evolving, so the callback is not harcoded, just in case
+ \def\bbl at harfpreline{Harf pre_linebreak_filter callback}%
\def\bbl at activate@preotf{%
\let\bbl at activate@preotf\relax % only once
\directlua{
@@ -219,13 +237,19 @@
Babel.pre_otfload_v,
'Babel.pre_otfload_v',
luatexbase.priority_in_callback('pre_linebreak_filter',
- 'luaotfload.node_processor') or nil)
+ '\bbl at harfpreline')
+ or luatexbase.priority_in_callback('pre_linebreak_filter',
+ 'luaotfload.node_processor')
+ or nil)
%
luatexbase.add_to_callback('hpack_filter',
Babel.pre_otfload_h,
'Babel.pre_otfload_h',
luatexbase.priority_in_callback('hpack_filter',
- 'luaotfload.node_processor') or nil)
+ '\bbl at harfpreline')
+ or luatexbase.priority_in_callback('hpack_filter',
+ 'luaotfload.node_processor')
+ or nil)
}}
\let\bbl at tempa\relax
\@ifpackagewith{babel}{bidi=basic}%
Modified: trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg 2019-06-03 21:35:43 UTC (rev 51309)
@@ -37,7 +37,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{hyphen.cfg}[2019/05/04 3.31 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2019/06/03 3.32 Babel hyphens]
\xdef\bbl at format{\jobname}
\ifx\AtBeginDocument\@undefined
\def\@empty{}
Modified: trunk/Master/texmf-dist/tex/generic/babel/luababel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/luababel.def 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/luababel.def 2019-06-03 21:35:43 UTC (rev 51309)
@@ -392,13 +392,15 @@
local last_char = nil
local quad = 655360 % 10 pt = 655360 = 10 * 65536
local last_class = nil
+ local last_lang = nil
for item in node.traverse(head) do
if item.id == GLYPH then
+ local lang = item.lang
+
local LOCALE = node.get_attribute(item,
luatexbase.registernumber'bbl at attr@locale')
-
local props = Babel.locale_props[LOCALE]
class = Babel.cjk_class[item.char].c
@@ -412,7 +414,9 @@
br = 0
end
- if br == 1 and props.linebreak == 'c' then
+ if br == 1 and props.linebreak == 'c' and
+ lang ~= \the\l at nohyphenation\space and
+ last_lang ~= \the\l at nohyphenation then
local intrapenalty = props.intrapenalty
if intrapenalty ~= 0 then
local n = node.new(14, 0) % penalty
@@ -429,6 +433,7 @@
quad = font.getfont(item.font).size
last_class = class
+ last_lang = lang
else % if penalty, glue or anything else
last_class = nil
end
@@ -643,6 +648,45 @@
end
}}
\AtBeginDocument{\bbl at luafixboxdir}
+\newcommand\babelcharproperty[1]{%
+ \count@=#1\relax
+ \ifvmode
+ \expandafter\bbl at chprop
+ \else
+ \bbl at error{\string\babelcharproperty\space can be used only in\\%
+ vertical mode (preamble or between paragraphs)}%
+ {See the manual for futher info}%
+ \fi}
+\newcommand\bbl at chprop[3][\the\count@]{%
+ \@tempcnta=#1\relax
+ \bbl at ifunset{bbl at chprop@#2}%
+ {\bbl at error{No property named '#2'. Allowed values are\\%
+ direction (bc), mirror (bmg), and linebreak (lb)}%
+ {See the manual for futher info}}%
+ {}%
+ \loop
+ \@nameuse{bbl at chprop@#2}{#3}%
+ \ifnum\count@<\@tempcnta
+ \advance\count@\@ne
+ \repeat}
+\def\bbl at chprop@direction#1{%
+ \directlua{
+ Babel.characters[\the\count@] = Babel.characters[\the\count@] or {}
+ Babel.characters[\the\count@]['d'] = '#1'
+ }}
+\let\bbl at chprop@bc\bbl at chprop@direction
+\def\bbl at chprop@mirror#1{%
+ \directlua{
+ Babel.characters[\the\count@] = Babel.characters[\the\count@] or {}
+ Babel.characters[\the\count@]['m'] = '\number#1'
+ }}
+\let\bbl at chprop@bmg\bbl at chprop@mirror
+\def\bbl at chprop@linebreak#1{%
+ \directlua{
+ Babel.Babel.cjk_characters[\the\count@] = Babel.Babel.cjk_characters[\the\count@] or {}
+ Babel.Babel.cjk_characters[\the\count@]['c'] = '#1'
+ }}
+\let\bbl at chprop@lb\bbl at chprop@linebreak
\bbl at trace{Redefinitions for bidi layout}
\ifx\@eqnnum\@undefined\else
\ifx\bbl at attr@dir\@undefined\else
@@ -686,11 +730,9 @@
\ifx\bbl at tabular\@tabular\else
\bbl at replace\@tabular{$}{\bbl at nextfake$}%
\fi}}
- {}
+ {}
\IfBabelLayout{lists}
- {\expandafter\def\expandafter\bbl at toreplace\expandafter{\list{##1}{##2}}%
- \bbl at replace\bbl at toreplace{\parshape}{\bbl at listparshape}%
- \bbl at exp{\def\\\list##1##2{\the\toks@}}% \toks@ <- implicit result
+ {\bbl at sreplace\list{\parshape}{\bbl at listparshape}%
\def\bbl at listparshape#1#2#3{%
\parshape #1 #2 #3 %
\ifnum\bbl at getluadir{page}=\bbl at getluadir{par}\else
@@ -697,11 +739,29 @@
\shapemode\tw@
\fi}}
{}
+\IfBabelLayout{graphics}
+ {\let\bbl at pictresetdir\relax
+ \def\bbl at pictsetdir{%
+ \ifcase\bbl at thetextdir
+ \let\bbl at pictresetdir\relax
+ \else
+ \textdir TLT\relax
+ \def\bbl at pictresetdir{\textdir TRT\relax}%
+ \fi}%
+ \bbl at sreplace\@picture{\hskip-}{\bbl at pictsetdir\hskip-}%
+ \def\put(#1,#2)#3{% Not easy to patch. Better redefine.
+ \@killglue
+ \raise#2\unitlength
+ \hb at xt@\z@{\kern#1\unitlength{\bbl at pictresetdir#3}\hss}}%
+ \AtBeginDocument
+ {\ifx\tikz at atbegin@node\@undefined\else
+ \bbl at sreplace\pgfpicture{\pgfpicturetrue}{\bbl at pictsetdir\pgfpicturetrue}%
+ \bbl at add\pgfsys at beginpicture{\bbl at pictsetdir}%
+ \bbl at add\tikz at atbegin@node{\bbl at pictresetdir}%
+ \fi}}
+ {}
\IfBabelLayout{counters}%
- {\def\@textsuperscript#1{{% lua has separate settings for math
- \m at th
- \mathdir\pagedir % required with basic-r; ok with default, too
- \ensuremath{^{\mbox {\fontsize \sf at size \z@ #1}}}}}%
+ {\bbl at sreplace\@textsuperscript{\m at th}{\m at th\mathdir\pagedir}%
\let\bbl at latinarabic=\@arabic
\def\@arabic#1{\babelsublr{\bbl at latinarabic#1}}%
\@ifpackagewith{babel}{bidi=default}%
@@ -762,10 +822,7 @@
\BabelFootnote\mainfootnote{}{}{}}
{}
\IfBabelLayout{extras}%
- {\def\underline#1{%
- \relax
- \ifmmode\@@underline{#1}%
- \else\bbl at nextfake$\@@underline{\hbox{#1}}\m at th$\relax\fi}%
+ {\bbl at sreplace\underline{$\@@underline}{\bbl at nextfake$\@@underline}%
\DeclareRobustCommand{\LaTeXe}{\mbox{\m at th
\if b\expandafter\@car\f at series\@nil\boldmath\fi
\babelsublr{%
Modified: trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/nil.ldf 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/nil.ldf 2019-06-03 21:35:43 UTC (rev 51309)
@@ -32,13 +32,11 @@
%% extension |.ins|) which are part of the distribution.
%%
-\ProvidesLanguage{nil}[2019/05/04 3.31 Nil language]
+\ProvidesLanguage{nil}[2019/06/03 3.32 Nil language]
\LdfInit{nil}{datenil}
-\ifx\l at nohyphenation\@undefined
- \@nopatterns{nil}
- \adddialect\l at nil0
-\else
- \let\l at nil\l at nohyphenation
+\ifx\l at nil\@undefined
+ \newlanguage\l at nil
+ \@namedef{bbl at hyphendata@\the\l at nil}{{}{}}% Remove warning
\fi
\providehyphenmins{\CurrentOption}{\m at ne\m at ne}
\let\captionsnil\@empty
Modified: trunk/Master/texmf-dist/tex/generic/babel/switch.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/switch.def 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/switch.def 2019-06-03 21:35:43 UTC (rev 51309)
@@ -37,7 +37,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{switch.def}[2019/05/04 3.31 Babel switching mechanism]
+\ProvidesFile{switch.def}[2019/06/03 3.32 Babel switching mechanism]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -58,8 +58,8 @@
\countdef\last at language=19
\def\addlanguage{\alloc at 9\language\chardef\@cclvi}
\fi
-\def\bbl at version{3.31}
-\def\bbl at date{2019/05/04}
+\def\bbl at version{3.32}
+\def\bbl at date{2019/06/03}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl at usehooks{adddialect}{{#1}{#2}}%
Modified: trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def 2019-06-03 21:34:56 UTC (rev 51308)
+++ trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def 2019-06-03 21:35:43 UTC (rev 51309)
@@ -58,122 +58,39 @@
\parfillskip\bbl at endskip}
\fi
\IfBabelLayout{lists}
- {\def\list#1#2{%
- \ifnum \@listdepth >5\relax
- \@toodeep
- \else
- \global\advance\@listdepth\@ne
- \fi
- \rightmargin\z@
- \listparindent\z@
- \itemindent\z@
- \csname @list\romannumeral\the\@listdepth\endcsname
- \def\@itemlabel{#1}%
- \let\makelabel\@mklab
- \@nmbrlistfalse
- #2\relax
- \@trivlist
- \parskip\parsep
- \parindent\listparindent
- \advance\linewidth-\rightmargin
- \advance\linewidth-\leftmargin
- \advance\@totalleftmargin
- \ifcase\bbl at thepardir\leftmargin\else\rightmargin\fi
- \parshape\@ne\@totalleftmargin\linewidth
- \ignorespaces}%
- \ifcase\bbl at engine
- \def\labelenumii{)\theenumii(}%
- \def\p at enumiii{\p at enumii)\theenumii(}%
- \fi
- \def\@verbatim{%
- \trivlist \item\relax
- \if at minipage\else\vskip\parskip\fi
- \bbl at startskip\textwidth
- \advance\bbl at startskip-\linewidth
- \bbl at endskip\z at skip
- \parindent\z@
- \parfillskip\@flushglue
- \parskip\z at skip
- \@@par
- \language\l at nohyphenation
- \@tempswafalse
- \def\par{%
- \if at tempswa
- \leavevmode\null
- \@@par\penalty\interlinepenalty
- \else
- \@tempswatrue
- \ifhmode\@@par\penalty\interlinepenalty\fi
- \fi}%
- \let\do\@makeother \dospecials
- \obeylines \verbatim at font \@noligs
- \everypar\expandafter{\the\everypar\unpenalty}}}
+ {\bbl at sreplace\list
+ {\@totalleftmargin\leftmargin}{\@totalleftmargin\bbl at listleftmargin}%
+ \def\bbl at listleftmargin{%
+ \ifcase\bbl at thepardir\leftmargin\else\rightmargin\fi}%
+ \ifcase\bbl at engine
+ \def\labelenumii{)\theenumii(}% pdftex doesn't reverse ()
+ \def\p at enumiii{\p at enumii)\theenumii(}%
+ \fi
+ \bbl at sreplace\@verbatim
+ {\leftskip\@totalleftmargin}%
+ {\bbl at startskip\textwidth
+ \advance\bbl at startskip-\linewidth}%
+ \bbl at sreplace\@verbatim
+ {\rightskip\z at skip}%
+ {\bbl at endskip\z at skip}}%
{}
\IfBabelLayout{contents}
- {\def\@dottedtocline#1#2#3#4#5{%
- \ifnum#1>\c at tocdepth\else
- \vskip \z@ \@plus.2\p@
- {\bbl at startskip#2\relax
- \bbl at endskip\@tocrmarg
- \parfillskip-\bbl at endskip
- \parindent#2\relax
- \@afterindenttrue
- \interlinepenalty\@M
- \leavevmode
- \@tempdima#3\relax
- \advance\bbl at startskip\@tempdima
- \null\nobreak\hskip-\bbl at startskip
- {#4}\nobreak
- \leaders\hbox{%
- $\m at th\mkern\@dotsep mu\hbox{.}\mkern\@dotsep mu$}%
- \hfill\nobreak
- \hb at xt@\@pnumwidth{\hfil\normalfont\normalcolor#5}%
- \par}%
- \fi}}
+ {\bbl at sreplace\@dottedtocline{\leftskip}{\bbl at startskip}%
+ \bbl at sreplace\@dottedtocline{\rightskip}{\bbl at endskip}}
{}
\IfBabelLayout{columns}
- {\def\@outputdblcol{%
- \if at firstcolumn
- \global\@firstcolumnfalse
- \global\setbox\@leftcolumn\copy\@outputbox
- \splitmaxdepth\maxdimen
- \vbadness\maxdimen
- \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
- \setbox\@outputbox\vsplit\@outputbox to\maxdimen
- \toks@\expandafter{\topmark}%
- \xdef\@firstcoltopmark{\the\toks@}%
- \toks@\expandafter{\splitfirstmark}%
- \xdef\@firstcolfirstmark{\the\toks@}%
- \ifx\@firstcolfirstmark\@empty
- \global\let\@setmarks\relax
- \else
- \gdef\@setmarks{%
- \let\firstmark\@firstcolfirstmark
- \let\topmark\@firstcoltopmark}%
- \fi
- \else
- \global\@firstcolumntrue
- \setbox\@outputbox\vbox{%
- \hb at xt@\textwidth{%
- \hskip\columnwidth
- \hfil
- {\normalcolor\vrule \@width\columnseprule}%
- \hfil
- \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
- \hskip-\textwidth
- \hb at xt@\columnwidth{\box\@outputbox \hss}%
- \hskip\columnsep
- \hskip\columnwidth}}%
- \@combinedblfloats
- \@setmarks
- \@outputpage
- \begingroup
- \@dblfloatplacement
- \@startdblcolumn
- \@whilesw\if at fcolmade \fi{\@outputpage
- \@startdblcolumn}%
- \endgroup
- \fi}}%
+ {\bbl at sreplace\@outputdblcol{\hb at xt@\textwidth}{\bbl at outputhbox}%
+ \def\bbl at outputhbox#1{%
+ \hb at xt@\textwidth{%
+ \hskip\columnwidth
+ \hfil
+ {\normalcolor\vrule \@width\columnseprule}%
+ \hfil
+ \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hskip-\textwidth
+ \hb at xt@\columnwidth{\box\@outputbox \hss}%
+ \hskip\columnsep
+ \hskip\columnwidth}}}%
{}
\bbl at trace{Bidi footnotes}
\ifx\bbl at beforeforeign\leavevmode
More information about the tex-live-commits
mailing list