summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-28 22:07:57 +0000
committerKarl Berry <karl@freefriends.org>2019-01-28 22:07:57 +0000
commit58716ee4be6eb8b578e9e7097971079d0e9d0b6a (patch)
tree04ad920aed8f772a75bad93e9ec399c067f44001 /Master/texmf-dist/source/latex/l3kernel
parent0e9654fedc389811d7b81b1d05f8a4a986caec1c (diff)
l3 (28jan19)
git-svn-id: svn://tug.org/texlive/trunk@49853 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx9
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx551
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx536
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx9
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx497
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx16
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx80
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3flag.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3format.ins6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx19
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3regex.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sort.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx262
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx40
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx6
53 files changed, 1467 insertions, 822 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 73eb2f404c3..be3e7eeb1c5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: expl3.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: expl3.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -21,7 +23,7 @@
% for those people who are interested.
%
%<*driver|generic|package>
-\def\ExplFileDate{2019-01-13}%
+\def\ExplFileDate{2019-01-28}%
%</driver|generic|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -49,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
index cbd58c8e296..73132b1e222 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3.ins
@@ -1,6 +1,8 @@
\iffalse meta-comment
-File l3.ins Copyright (C) 2011,2012,2014-2018 The LaTeX3 Project
+File l3.ins
+
+Copyright (C) 2011,2012,2014-2018 The LaTeX3 Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -33,7 +35,7 @@ license information is placed in the derived files.
\preamble
-Copyright (C) 1990-2018 The LaTeX3 Project
+Copyright (C) 1990-2019 The LaTeX3 Project
It may be distributed and/or modified under the conditions of
the LaTeX Project Public License (LPPL), either version 1.3c of
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index 68446087540..ea5a6332307 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3alloc.dtx Copyright (C) 1990-2012,2014-2019 The LaTeX3 Project
+%% File: l3alloc.dtx
+%
+% Copyright (C) 1990-2012,2014-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index c18e497be61..cb60f38390d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3basics.dtx Copyright (C) 1990-2019 The LaTeX3 project
+%% File: l3basics.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -947,9 +949,10 @@
% \emph{but} the function remains fully expandable, and parameter
% character (usually~|#|) need not be doubled.
% \begin{texnote}
-% \cs{use:e} the a wrapper around the primitive \tn{expanded}
+% \cs{use:e} is a wrapper around the primitive \tn{expanded}
% where it is available:
% it requires two expansions to complete its action.
+% When \tn{expanded} is not available this function is very slow.
% \end{texnote}
% \end{function}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 22b0b8a366b..5a6eb3ba7f8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3bootstrap.dtx Copyright (C) 2011-2019 The LaTeX3 project
+%% File: l3bootstrap.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -138,7 +140,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 281c910e1ce..747d32fc7b3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3box.dtx Copyright (C) 2005-2019 The LaTeX3 Project
+%% File: l3box.dtx
+%
+% Copyright (C) 2005-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -92,30 +94,6 @@
% Sets the content of \meta{box_1} equal to that of \meta{box_2}.
% \end{function}
%
-% \begin{function}
-% {
-% \box_set_eq_clear:NN, \box_set_eq_clear:cN,
-% \box_set_eq_clear:Nc, \box_set_eq_clear:cc
-% }
-% \begin{syntax}
-% \cs{box_set_eq_clear:NN} \meta{box_1} \meta{box_2}
-% \end{syntax}
-% Sets the content of \meta{box_1} within the current \TeX{} group
-% equal to that of \meta{box_2}, then clears \meta{box_2} globally.
-% \end{function}
-%
-% \begin{function}
-% {
-% \box_gset_eq_clear:NN, \box_gset_eq_clear:cN,
-% \box_gset_eq_clear:Nc, \box_gset_eq_clear:cc
-% }
-% \begin{syntax}
-% \cs{box_gset_eq_clear:NN} \meta{box_1} \meta{box_2}
-% \end{syntax}
-% Sets the content of \meta{box_1} equal to that of \meta{box_2}, then
-% clears \meta{box_2}. These assignments are global.
-% \end{function}
-%
% \begin{function}[EXP, pTF, added=2012-03-03]
% {\box_if_exist:N, \box_if_exist:c}
% \begin{syntax}
@@ -140,42 +118,6 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\box_use_drop:N, \box_use_drop:c}
-% \begin{syntax}
-% \cs{box_use_drop:N} \meta{box}
-% \end{syntax}
-% Inserts the current content of the \meta{box} onto the current
-% list for typesetting. An error is raised if the variable does
-% not exist or if it is invalid.
-%
-% The \meta{box} is then cleared at the group level the
-% box was set at, \emph{i.e.}~the current content is \enquote{dropped} entirely.
-% For example, with
-% \begin{verbatim}
-% \hbox_set:Nn \l_tmpa_box { A }
-% \group_begin:
-% \hbox_set:Nn \l_tmpa_box { B }
-% \group_begin:
-% \box_use_drop:N \l_tmpa_box
-% \group_end:
-% \box_show:N \l_tmpa_box
-% \group_end:
-% \box_show:N \l_tmpa_box
-% \end{verbatim}
-% the first use of \cs{box_show:N} will show an entirely cleared (void) box, and the
-% second will show the letter |A| in the box.
-%
-% This function is useful as boxes can contain an open-ended amount of material. As
-% such, they can have a significant memory impact on \TeX{}. At the same time, it is
-% often the case that once a box has been inserted, it is no longer needed at all.
-% Using \cs{box_use_drop:N} in these circumstances therefore offers improved memory
-% use and performance. It should therefore be preferred over \cs{box_use:N} where
-% it is clear that the content is no longer needed in the variable.
-% \begin{texnote}
-% This is the \TeX{} primitive \tn{box}.
-% \end{texnote}
-% \end{function}
-%
% \begin{function}{\box_move_right:nn, \box_move_left:nn}
% \begin{syntax}
% \cs{box_move_right:nn} \Arg{dimexpr} \Arg{box function}
@@ -237,28 +179,40 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}[updated = 2011-10-22]{\box_set_dp:Nn, \box_set_dp:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_set_dp:Nn, \box_set_dp:cn,
+% \box_gset_dp:Nn, \box_gset_dp:cn
+% }
% \begin{syntax}
% \cs{box_set_dp:Nn} \meta{box} \Arg{dimension expression}
% \end{syntax}
% Set the depth (below the baseline) of the \meta{box} to the value of
-% the \Arg{dimension expression}. This is a global assignment.
+% the \Arg{dimension expression}.
% \end{function}
%
-% \begin{function}[updated = 2011-10-22]{\box_set_ht:Nn, \box_set_ht:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_set_ht:Nn, \box_set_ht:cn,
+% \box_gset_ht:Nn, \box_gset_ht:cn
+% }
% \begin{syntax}
% \cs{box_set_ht:Nn} \meta{box} \Arg{dimension expression}
% \end{syntax}
% Set the height (above the baseline) of the \meta{box} to the value of
-% the \Arg{dimension expression}. This is a global assignment.
+% the \Arg{dimension expression}.
% \end{function}
%
-% \begin{function}[updated = 2011-10-22]{\box_set_wd:Nn, \box_set_wd:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_set_wd:Nn, \box_set_wd:cn,
+% \box_gset_wd:Nn, \box_gset_wd:cn
+% }
% \begin{syntax}
% \cs{box_set_wd:Nn} \meta{box} \Arg{dimension expression}
% \end{syntax}
% Set the width of the \meta{box} to the value of the
-% \Arg{dimension expression}. This is a global assignment.
+% \Arg{dimension expression}.
% \end{function}
%
% \section{Box conditionals}
@@ -475,18 +429,6 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\hbox_unpack_clear:N, \hbox_unpack_clear:c}
-% \begin{syntax}
-% \cs{hbox_unpack_clear:N} \meta{box}
-% \end{syntax}
-% Unpacks the content of the horizontal \meta{box}, retaining any stretching
-% or shrinking applied when the \meta{box} was set. The \meta{box} is
-% then cleared globally.
-% \begin{texnote}
-% This is the \TeX{} primitive \tn{unhbox}.
-% \end{texnote}
-% \end{function}
-%
% \section{Vertical mode boxes}
%
% Vertical boxes inherit their baseline from their contents. The
@@ -623,13 +565,91 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\vbox_unpack_clear:N, \vbox_unpack_clear:c}
+% \section{Using boxes efficiently}
+%
+% The functions above for using box contents work in exactly the same
+% way as for any other \pkg{expl3} variable. However, for efficiency
+% reasons, it is also useful to have functions which \emph{drop} box
+% contents on use. When a box is dropped, the box becomes empty at the group
+% level \emph{where the box was originally set} rather than necessarily
+% \emph{at the current group level}. For example, with
+% \begin{verbatim}
+% \hbox_set:Nn \l_tmpa_box { A }
+% \group_begin:
+% \hbox_set:Nn \l_tmpa_box { B }
+% \group_begin:
+% \box_use_drop:N \l_tmpa_box
+% \group_end:
+% \box_show:N \l_tmpa_box
+% \group_end:
+% \box_show:N \l_tmpa_box
+% \end{verbatim}
+% the first use of \cs{box_show:N} will show an entirely cleared (void) box, and the
+% second will show the letter |A| in the box.
+%
+% These functions should be preferred when the content of the box is no
+% longer required after use. Note that due to the unusual scoping behaviour of
+% \texttt{drop} functions they may be applied to both local and global boxes:
+% the latter will naturally be set and thus cleared at a global level.
+%
+% \begin{function}{\box_use_drop:N, \box_use_drop:c}
+% \begin{syntax}
+% \cs{box_use_drop:N} \meta{box}
+% \end{syntax}
+% Inserts the current content of the \meta{box} onto the current
+% list for typesetting then drops the box content. An error is raised if the
+% variable does not exist or if it is invalid. This function may be applied to
+% local or global boxes.
+% \begin{texnote}
+% This is the \tn{box} primitive.
+% \end{texnote}
+% \end{function}
+%
+% \begin{function}[added = 2019-01-17]
+% {
+% \box_set_eq_drop:NN, \box_set_eq_drop:cN,
+% \box_set_eq_drop:Nc, \box_set_eq_drop:cc
+% }
% \begin{syntax}
-% \cs{vbox_unpack:N} \meta{box}
+% \cs{box_set_eq_drop:NN} \meta{box_1} \meta{box_2}
+% \end{syntax}
+% Sets the content of \meta{box_1} equal to that of \meta{box_2}, then
+% drops \meta{box_2}.
+% \end{function}
+%
+% \begin{function}[added = 2019-01-17]
+% {
+% \box_gset_eq_drop:NN, \box_gset_eq_drop:cN,
+% \box_gset_eq_drop:Nc, \box_gset_eq_drop:cc
+% }
+% \begin{syntax}
+% \cs{box_gset_eq_drop:NN} \meta{box_1} \meta{box_2}
+% \end{syntax}
+% Sets the content of \meta{box_1} globally equal to that of \meta{box_2},
+% then drops \meta{box_2}.
+% \end{function}
+%
+% \begin{function}[added = 2019-01-17]
+% {\hbox_unpack_drop:N, \hbox_unpack_drop:c}
+% \begin{syntax}
+% \cs{hbox_unpack_drop:N} \meta{box}
+% \end{syntax}
+% Unpacks the content of the horizontal \meta{box}, retaining any stretching
+% or shrinking applied when the \meta{box} was set. The original \meta{box}
+% is then dropped.
+% \begin{texnote}
+% This is the \TeX{} primitive \tn{unhbox}.
+% \end{texnote}
+% \end{function}
+%
+% \begin{function}[added = 2019-01-17]
+% {\vbox_unpack_drop:N, \vbox_unpack_drop:c}
+% \begin{syntax}
+% \cs{vbox_unpack_drop:N} \meta{box}
% \end{syntax}
% Unpacks the content of the vertical \meta{box}, retaining any stretching
-% or shrinking applied when the \meta{box} was set. The \meta{box}
-% is then cleared globally.
+% or shrinking applied when the \meta{box} was set. The original \meta{box}
+% is then dropped.
% \begin{texnote}
% This is the \TeX{} primitive \tn{unvbox}.
% \end{texnote}
@@ -643,8 +663,11 @@
% On the other hand, rotation and resizing of boxed material can best be
% handled by modifying boxes. These transformations are described here.
%
-% \begin{function}[added = 2017-04-04]
-% {\box_autosize_to_wd_and_ht:Nnn, \box_autosize_to_wd_and_ht:cnn}
+% \begin{function}[added = 2017-04-04, updated = 2019-01-22]
+% {
+% \box_autosize_to_wd_and_ht:Nnn, \box_autosize_to_wd_and_ht:cnn,
+% \box_gautosize_to_wd_and_ht:Nnn, \box_gautosize_to_wd_and_ht:cnn,
+% }
% \begin{syntax}
% \cs{box_autosize_to_wd_and_ht:Nnn} \meta{box} \Arg{x-size} \Arg{y-size}
% \end{syntax}
@@ -658,12 +681,16 @@
% sizes cause the material in the \meta{box} to be reversed in direction,
% but the reference point of the \meta{box} is unchanged. Thus a negative
% \meta{y-size} results in the \meta{box} having a depth dependent on the
-% height of the original and \emph{vice versa}. The resizing applies within
-% the current \TeX{} group level.
+% height of the original and \emph{vice versa}.
% \end{function}
%
-% \begin{function}[added = 2017-04-04]
-% {\box_autosize_to_wd_and_ht_plus_dp:Nnn, \box_autosize_to_wd_and_ht_plus_dp:cnn}
+% \begin{function}[added = 2017-04-04, updated = 2019-01-22]
+% {
+% \box_autosize_to_wd_and_ht_plus_dp:Nnn,
+% \box_autosize_to_wd_and_ht_plus_dp:cnn,
+% \box_gautosize_to_wd_and_ht_plus_dp:Nnn,
+% \box_gautosize_to_wd_and_ht_plus_dp:cnn
+% }
% \begin{syntax}
% \cs{box_autosize_to_wd_and_ht_plus_dp:Nnn} \meta{box} \Arg{x-size} \Arg{y-size}
% \end{syntax}
@@ -677,12 +704,14 @@
% sizes cause the material in the \meta{box} to be reversed in direction,
% but the reference point of the \meta{box} is unchanged. Thus a negative
% \meta{y-size} results in the \meta{box} having a depth dependent on the
-% height of the original and \emph{vice versa}. The resizing applies within
-% the current \TeX{} group level.
+% height of the original and \emph{vice versa}.
% \end{function}
%
-% \begin{function}
-% {\box_resize_to_ht:Nn, \box_resize_to_ht:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_resize_to_ht:Nn, \box_resize_to_ht:cn,
+% \box_gresize_to_ht:Nn, \box_gresize_to_ht:cn
+% }
% \begin{syntax}
% \cs{box_resize_to_ht:Nn} \meta{box} \Arg{y-size}
% \end{syntax}
@@ -694,12 +723,14 @@
% material in the \meta{box} to be reversed in direction, but the reference
% point of the \meta{box} is unchanged. Thus a negative \meta{y-size}
% results in the \meta{box} having a depth dependent on the height of the
-% original and \emph{vice versa}. The resizing applies within the current
-% \TeX{} group level.
+% original and \emph{vice versa}.
% \end{function}
%
-% \begin{function}
-% {\box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn,
+% \box_gresize_to_ht_plus_dp:Nn, \box_gresize_to_ht_plus_dp:cn,
+% }
% \begin{syntax}
% \cs{box_resize_to_ht_plus_dp:Nn} \meta{box} \Arg{y-size}
% \end{syntax}
@@ -711,11 +742,14 @@
% the material in the \meta{box} to be reversed in direction, but the
% reference point of the \meta{box} is unchanged. Thus a negative
% \meta{y-size} results in the \meta{box} having a depth dependent on the
-% height of the original and \emph{vice versa}. The resizing applies within
-% the current \TeX{} group level.
+% height of the original and \emph{vice versa}.
% \end{function}
%
-% \begin{function}{\box_resize_to_wd:Nn, \box_resize_to_wd:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_resize_to_wd:Nn, \box_resize_to_wd:cn,
+% \box_gresize_to_wd:Nn, \box_gresize_to_wd:cn
+% }
% \begin{syntax}
% \cs{box_resize_to_wd:Nn} \meta{box} \Arg{x-size}
% \end{syntax}
@@ -726,12 +760,14 @@
% material in the \meta{box} to be reversed in direction, but the reference
% point of the \meta{box} is unchanged. Thus a negative \meta{x-size}
% results in the \meta{box} having a depth dependent on the height of the
-% original and \emph{vice versa}. The resizing applies within the current
-% \TeX{} group level.
+% original and \emph{vice versa}.
% \end{function}
%
-% \begin{function}[added = 2014-07-03]
-% {\box_resize_to_wd_and_ht:Nnn, \box_resize_to_wd_and_ht:cnn}
+% \begin{function}[added = 2014-07-03, updated = 2019-01-22]
+% {
+% \box_resize_to_wd_and_ht:Nnn, \box_resize_to_wd_and_ht:cnn,
+% \box_gresize_to_wd_and_ht:Nnn, \box_gresize_to_wd_and_ht:cnn
+% }
% \begin{syntax}
% \cs{box_resize_to_wd_and_ht:Nnn} \meta{box} \Arg{x-size} \Arg{y-size}
% \end{syntax}
@@ -743,12 +779,16 @@
% the \meta{box} to be reversed in direction, but the reference point of the
% \meta{box} is unchanged. Thus a negative \meta{y-size} results in
% the \meta{box} having a depth dependent on the height of the original and
-% \emph{vice versa}. The resizing applies within the current \TeX{} group
-% level.
+% \emph{vice versa}.
% \end{function}
%
-% \begin{function}[added = 2017-04-06]
-% {\box_resize_to_wd_and_ht_plus_dp:Nnn, \box_resize_to_wd_and_ht_plus_dp:cnn}
+% \begin{function}[added = 2017-04-06, updated = 2019-01-22]
+% {
+% \box_resize_to_wd_and_ht_plus_dp:Nnn,
+% \box_resize_to_wd_and_ht_plus_dp:cnn,
+% \box_gresize_to_wd_and_ht_plus_dp:Nnn,
+% \box_gresize_to_wd_and_ht_plus_dp:cnn
+% }
% \begin{syntax}
% \cs{box_resize_to_wd_and_ht_plus_dp:Nnn} \meta{box} \Arg{x-size} \Arg{y-size}
% \end{syntax}
@@ -760,11 +800,14 @@
% the \meta{box} to be reversed in direction, but the reference point of the
% \meta{box} is unchanged. Thus a negative \meta{y-size} results in
% the \meta{box} having a depth dependent on the height of the original and
-% \emph{vice versa}. The resizing applies within the current \TeX{} group
-% level.
+% \emph{vice versa}.
% \end{function}
%
-% \begin{function}{\box_rotate:Nn, \box_rotate:cn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_rotate:Nn, \box_rotate:cn,
+% \box_grotate:Nn, \box_grotate:cn
+% }
% \begin{syntax}
% \cs{box_rotate:Nn} \meta{box} \Arg{angle}
% \end{syntax}
@@ -773,10 +816,13 @@
% horizontally such that it is at the left side of the smallest rectangle
% enclosing the rotated material. The updated \meta{box} is an |hbox|,
% irrespective of the nature of the \meta{box} before the rotation is applied.
-% The rotation applies within the current \TeX{} group level.
% \end{function}
%
-% \begin{function}{\box_scale:Nnn, \box_scale:cnn}
+% \begin{function}[updated = 2019-01-22]
+% {
+% \box_scale:Nnn, \box_scale:cnn,
+% \box_gscale:Nnn, \box_gscale:cnn
+% }
% \begin{syntax}
% \cs{box_scale:Nnn} \meta{box} \Arg{x-scale} \Arg{y-scale}
% \end{syntax}
@@ -787,8 +833,7 @@
% scalings cause the material in the \meta{box} to be reversed in
% direction, but the reference point of the \meta{box} is unchanged.
% Thus a negative \meta{y-scale} results in the \meta{box} having a depth
-% dependent on the height of the original and \emph{vice versa}. The resizing
-% applies within the current \TeX{} group level.
+% dependent on the height of the original and \emph{vice versa}.
% \end{function}
%
% \section{Primitive box conditionals}
@@ -941,27 +986,25 @@
%
% \begin{macro}
% {
-% \box_set_eq_clear:NN, \box_set_eq_clear:cN,
-% \box_set_eq_clear:Nc, \box_set_eq_clear:cc
+% \box_set_eq_drop:NN, \box_set_eq_drop:cN,
+% \box_set_eq_drop:Nc, \box_set_eq_drop:cc
% }
-% \testfile*
% \begin{macro}
% {
-% \box_gset_eq_clear:NN, \box_gset_eq_clear:cN,
-% \box_gset_eq_clear:Nc, \box_gset_eq_clear:cc
+% \box_gset_eq_drop:NN, \box_gset_eq_drop:cN,
+% \box_gset_eq_drop:Nc, \box_gset_eq_drop:cc
% }
-% \testfile*
-% Assigning the contents of a box to be another box.
-% This clears the second box globally (that's how \TeX{} does it).
+% Assigning the contents of a box to be another box, then drops the
+% original box.
% \begin{macrocode}
\__kernel_patch:nnNNpn { \__kernel_chk_var_local:N #1 } { }
-\cs_new_protected:Npn \box_set_eq_clear:NN #1#2
+\cs_new_protected:Npn \box_set_eq_drop:NN #1#2
{ \tex_setbox:D #1 \tex_box:D #2 }
\__kernel_patch:nnNNpn { \__kernel_chk_var_global:N #1 } { }
-\cs_new_protected:Npn \box_gset_eq_clear:NN #1#2
+\cs_new_protected:Npn \box_gset_eq_drop:NN #1#2
{ \tex_global:D \tex_setbox:D #1 \tex_box:D #2 }
-\cs_generate_variant:Nn \box_set_eq_clear:NN { c , Nc , cc }
-\cs_generate_variant:Nn \box_gset_eq_clear:NN { c , Nc , cc }
+\cs_generate_variant:Nn \box_set_eq_drop:NN { c , Nc , cc }
+\cs_generate_variant:Nn \box_gset_eq_drop:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -998,20 +1041,38 @@
% \begin{macro}{\box_set_ht:Nn, \box_set_ht:cn}
% \begin{macro}{\box_set_dp:Nn, \box_set_dp:cn}
% \begin{macro}{\box_set_wd:Nn, \box_set_wd:cn}
-% Setting the size is easy: all primitive work. These primitives are not
-% expandable, so the derived functions are not either.
+% Setting the size whilst respecting local scope requires copying;
+% the same issue does not come up when working globally.
% When debugging, the dimension expression |#2| is surrounded by
% parentheses to catch early termination.
% \begin{macrocode}
\cs_new_protected:Npn \box_set_dp:Nn #1#2
+ {
+ \tex_setbox:D #1 = \tex_copy:D #1
+ \box_dp:N #1 \@@_dim_eval:n {#2}
+ }
+\cs_generate_variant:Nn \box_set_dp:Nn { c }
+\cs_new_protected:Npn \box_gset_dp:Nn #1#2
{ \box_dp:N #1 \@@_dim_eval:n {#2} }
+\cs_generate_variant:Nn \box_gset_dp:Nn { c }
\cs_new_protected:Npn \box_set_ht:Nn #1#2
+ {
+ \tex_setbox:D #1 = \tex_copy:D #1
+ \box_ht:N #1 \@@_dim_eval:n {#2}
+ }
+\cs_generate_variant:Nn \box_set_ht:Nn { c }
+\cs_new_protected:Npn \box_gset_ht:Nn #1#2
{ \box_ht:N #1 \@@_dim_eval:n {#2} }
+\cs_generate_variant:Nn \box_gset_ht:Nn { c }
\cs_new_protected:Npn \box_set_wd:Nn #1#2
- { \box_wd:N #1 \@@_dim_eval:n {#2} }
-\cs_generate_variant:Nn \box_set_ht:Nn { c }
-\cs_generate_variant:Nn \box_set_dp:Nn { c }
+ {
+ \tex_setbox:D #1 = \tex_copy:D #1
+ \box_wd:N #1 \@@_dim_eval:n {#2}
+ }
\cs_generate_variant:Nn \box_set_wd:Nn { c }
+\cs_new_protected:Npn \box_gset_wd:Nn #1#2
+ { \box_wd:N #1 \@@_dim_eval:n {#2} }
+\cs_generate_variant:Nn \box_gset_wd:Nn { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1355,14 +1416,14 @@
% \end{macro}
%
% \begin{macro}{\hbox_unpack:N, \hbox_unpack:c}
-% \begin{macro}{\hbox_unpack_clear:N, \hbox_unpack_clear:c}
+% \begin{macro}{\hbox_unpack_drop:N, \hbox_unpack_drop:c}
% \testfile*
% Unpacking a box and if requested also clear it.
% \begin{macrocode}
\cs_new_eq:NN \hbox_unpack:N \tex_unhcopy:D
-\cs_new_eq:NN \hbox_unpack_clear:N \tex_unhbox:D
+\cs_new_eq:NN \hbox_unpack_drop:N \tex_unhbox:D
\cs_generate_variant:Nn \hbox_unpack:N { c }
-\cs_generate_variant:Nn \hbox_unpack_clear:N { c }
+\cs_generate_variant:Nn \hbox_unpack_drop:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1537,14 +1598,14 @@
% \end{macro}
%
% \begin{macro}{\vbox_unpack:N, \vbox_unpack:c}
-% \begin{macro}{\vbox_unpack_clear:N, \vbox_unpack_clear:c}
+% \begin{macro}{\vbox_unpack_drop:N, \vbox_unpack_drop:c}
% \testfile*
% Unpacking a box and if requested also clear it.
% \begin{macrocode}
\cs_new_eq:NN \vbox_unpack:N \tex_unvcopy:D
-\cs_new_eq:NN \vbox_unpack_clear:N \tex_unvbox:D
+\cs_new_eq:NN \vbox_unpack_drop:N \tex_unvbox:D
\cs_generate_variant:Nn \vbox_unpack:N { c }
-\cs_generate_variant:Nn \vbox_unpack_clear:N { c }
+\cs_generate_variant:Nn \vbox_unpack_drop:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1627,7 +1688,12 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\box_rotate:Nn}
+% \begin{macro}
+% {
+% \box_rotate:Nn, \box_rotate:cn,
+% \box_grotate:Nn, \box_grotate:cn
+% }
+% \begin{macro}{\@@_rotate:NnN}
% \begin{macro}{\@@_rotate:N}
% \begin{macro}{\@@_rotate_xdir:nnN, \@@_rotate_ydir:nnN}
% \begin{macro}
@@ -1640,8 +1706,14 @@
% clearer
% \begin{macrocode}
\cs_new_protected:Npn \box_rotate:Nn #1#2
+ { \@@_rotate:NnN #1 {#2} \hbox_set:Nn }
+\cs_generate_variant:Nn \box_rotate:Nn { c }
+\cs_new_protected:Npn \box_grotate:Nn #1#2
+ { \@@_rotate:NnN #1 {#2} \hbox_gset:Nn }
+\cs_generate_variant:Nn \box_grotate:Nn { c }
+\cs_new_protected:Npn \@@_rotate:NnN #1#2#3
{
- \hbox_set:Nn #1
+ #3 #1
{
\fp_set:Nn \l_@@_angle_fp {#2}
\fp_set:Nn \l_@@_sin_fp { sind ( \l_@@_angle_fp ) }
@@ -1664,7 +1736,7 @@
% The next step is to work out the $x$ and $y$ coordinates of vertices of
% the rotated box in relation to its original coordinates. The box can be
% visualized with vertices $B$, $C$, $D$ and $E$ is illustrated
-% (Figure~\ref{fig:l3candidates:rotation}). The vertex $O$ is the reference point
+% (Figure~\ref{fig:l3box:rotation}). The vertex $O$ is the reference point
% on the baseline, and in this implementation is also the centre of rotation.
% \begin{figure}
% \centering
@@ -1682,7 +1754,7 @@
% \put(21,59){O}
% \end{picture}
% \caption{Co-ordinates of a box prior to rotation.}
-% \label{fig:l3candidates:rotation}
+% \label{fig:l3box:rotation}
% \end{figure}
% The formulae are, for a point $P$ and angle $\alpha$:
% \[
@@ -1830,6 +1902,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{variable}{\l_@@_scale_x_fp, \l_@@_scale_y_fp}
% Scaling is potentially-different in the two axes.
@@ -1840,7 +1913,13 @@
% \end{variable}
%
% \begin{macro}
-% {\box_resize_to_wd_and_ht_plus_dp:Nnn, \box_resize_to_wd_and_ht_plus_dp:cnn}
+% {
+% \box_resize_to_wd_and_ht_plus_dp:Nnn,
+% \box_resize_to_wd_and_ht_plus_dp:cnn,
+% \box_gresize_to_wd_and_ht_plus_dp:Nnn,
+% \box_gresize_to_wd_and_ht_plus_dp:cnn
+% }
+% \begin{macro}{\@@_resize_to_wd_and_ht_plus_dp:NnnN}
% \begin{macro}{\@@_resize_set_corners:N}
% \begin{macro}{\@@_resize:N}
% \begin{macro}{\@@_resize:NNN}
@@ -1849,7 +1928,19 @@
% \begin{macrocode}
\cs_new_protected:Npn \box_resize_to_wd_and_ht_plus_dp:Nnn #1#2#3
{
- \hbox_set:Nn #1
+ \@@_resize_to_wd_and_ht_plus_dp:NnnN #1 {#2} {#3}
+ \hbox_set:Nn
+ }
+\cs_generate_variant:Nn \box_resize_to_wd_and_ht_plus_dp:Nnn { c }
+\cs_new_protected:Npn \box_gresize_to_wd_and_ht_plus_dp:Nnn #1#2#3
+ {
+ \@@_resize_to_wd_and_ht_plus_dp:NnnN #1 {#2} {#3}
+ \hbox_gset:Nn
+ }
+\cs_generate_variant:Nn \box_gresize_to_wd_and_ht_plus_dp:Nnn { c }
+\cs_new_protected:Npn \@@_resize_to_wd_and_ht_plus_dp:NnnN #1#2#3#4
+ {
+ #4 #1
{
\@@_resize_set_corners:N #1
% \end{macrocode}
@@ -1873,7 +1964,6 @@
\@@_resize:N #1
}
}
-\cs_generate_variant:Nn \box_resize_to_wd_and_ht_plus_dp:Nnn { c }
\cs_new_protected:Npn \@@_resize_set_corners:N #1
{
\dim_set:Nn \l_@@_top_dim { \box_ht:N #1 }
@@ -1908,11 +1998,32 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\box_resize_to_ht:Nn, \box_resize_to_ht:cn}
-% \begin{macro}{\box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn}
-% \begin{macro}{\box_resize_to_wd:Nn, \box_resize_to_wd:cn}
-% \begin{macro}{\box_resize_to_wd_and_ht:Nnn, \box_resize_to_wd_and_ht:cnn}
+% \begin{macro}
+% {
+% \box_resize_to_ht:Nn, \box_resize_to_ht:cn,
+% \box_gresize_to_ht:Nn, \box_gresize_to_ht:cn
+% }
+% \begin{macro}{\@@_resize_to_ht:NnN}
+% \begin{macro}
+% {
+% \box_resize_to_ht_plus_dp:Nn, \box_resize_to_ht_plus_dp:cn,
+% \box_gresize_to_ht_plus_dp:Nn, \box_gresize_to_ht_plus_dp:cn
+% }
+% \begin{macro}{\@@_resize_to_ht_plus_dp:NnN}
+% \begin{macro}
+% {
+% \box_resize_to_wd:Nn, \box_resize_to_wd:cn,
+% \box_gresize_to_wd:Nn, \box_gresize_to_wd:cn
+% }
+% \begin{macro}{\@@_resize_to_wd:NnN}
+% \begin{macro}
+% {
+% \box_resize_to_wd_and_ht:Nnn, \box_resize_to_wd_and_ht:cnn,
+% \box_gresize_to_wd_and_ht:Nnn, \box_gresize_to_wd_and_ht:cnn
+% }
+% \begin{macro}{\@@_resize_to_wd_ht:NnnN}
% Scaling to a (total) height or to a width is a simplified version of the main
% resizing operation, with the scale simply copied between the two parts. The
% internal auxiliary is called using the scaling value twice, as the sign for
@@ -1920,8 +2031,14 @@
% for the general case).
% \begin{macrocode}
\cs_new_protected:Npn \box_resize_to_ht:Nn #1#2
+ { \@@_resize_to_ht:NnN #1 {#2} \hbox_set:Nn }
+\cs_generate_variant:Nn \box_resize_to_ht:Nn { c }
+\cs_new_protected:Npn \box_gresize_to_ht:Nn #1#2
+ { \@@_resize_to_ht:NnN #1 {#2} \hbox_gset:Nn }
+\cs_generate_variant:Nn \box_gresize_to_ht:Nn { c }
+\cs_new_protected:Npn \@@_resize_to_ht:NnN #1#2#3
{
- \hbox_set:Nn #1
+ #3 #1
{
\@@_resize_set_corners:N #1
\fp_set:Nn \l_@@_scale_y_fp
@@ -1933,8 +2050,13 @@
\@@_resize:N #1
}
}
-\cs_generate_variant:Nn \box_resize_to_ht:Nn { c }
\cs_new_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2
+ { \@@_resize_to_ht_plus_dp:NnN #1 {#2} \hbox_set:Nn }
+\cs_generate_variant:Nn \box_resize_to_ht_plus_dp:Nn { c }
+\cs_new_protected:Npn \box_gresize_to_ht_plus_dp:Nn #1#2
+ { \@@_resize_to_ht_plus_dp:NnN #1 {#2} \hbox_gset:Nn }
+\cs_generate_variant:Nn \box_gresize_to_ht_plus_dp:Nn { c }
+\cs_new_protected:Npn \@@_resize_to_ht_plus_dp:NnN #1#2#3
{
\hbox_set:Nn #1
{
@@ -1948,10 +2070,15 @@
\@@_resize:N #1
}
}
-\cs_generate_variant:Nn \box_resize_to_ht_plus_dp:Nn { c }
\cs_new_protected:Npn \box_resize_to_wd:Nn #1#2
+ { \@@_resize_to_wd:NnN #1 {#2} \hbox_set:Nn }
+\cs_generate_variant:Nn \box_resize_to_wd:Nn { c }
+\cs_new_protected:Npn \box_gresize_to_wd:Nn #1#2
+ { \@@_resize_to_wd:NnN #1 {#2} \hbox_gset:Nn }
+\cs_generate_variant:Nn \box_gresize_to_wd:Nn { c }
+\cs_new_protected:Npn \@@_resize_to_wd:NnN #1#2#3
{
- \hbox_set:Nn #1
+ #3 #1
{
\@@_resize_set_corners:N #1
\fp_set:Nn \l_@@_scale_x_fp
@@ -1960,10 +2087,15 @@
\@@_resize:N #1
}
}
-\cs_generate_variant:Nn \box_resize_to_wd:Nn { c }
\cs_new_protected:Npn \box_resize_to_wd_and_ht:Nnn #1#2#3
+ { \@@_resize_to_wd_and_ht:NnnN #1 {#2} {#3} \hbox_set:Nn }
+\cs_generate_variant:Nn \box_resize_to_wd_and_ht:Nnn { c }
+\cs_new_protected:Npn \box_gresize_to_wd_and_ht:Nnn #1#2#3
+ { \@@_resize_to_wd_and_ht:NnnN #1 {#2} {#3} \hbox_gset:Nn }
+\cs_generate_variant:Nn \box_gresize_to_wd_and_ht:Nnn { c }
+\cs_new_protected:Npn \@@_resize_to_wd_and_ht:NnnN #1#2#3#4
{
- \hbox_set:Nn #1
+ #4 #1
{
\@@_resize_set_corners:N #1
\fp_set:Nn \l_@@_scale_x_fp
@@ -1976,15 +2108,23 @@
\@@_resize:N #1
}
}
-\cs_generate_variant:Nn \box_resize_to_wd_and_ht:Nnn { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\box_scale:Nnn, \box_scale:cnn}
-% \begin{macro}{\@@_scale_aux:N}
+% \begin{macro}
+% {
+% \box_scale:Nnn, \box_scale:cnn,
+% \box_gscale:Nnn, \box_gscale:cnn
+% }
+% \begin{macro}{\@@_scale:NnnN}
+% \begin{macro}{\@@_scale:N}
% When scaling a box, setting the scaling itself is easy enough. The
% new dimensions are also relatively easy to find, allowing only for
% the need to keep them positive in all cases. Once that is done then
@@ -1993,16 +2133,21 @@
% with the auto-resizing functions.
% \begin{macrocode}
\cs_new_protected:Npn \box_scale:Nnn #1#2#3
+ { \@@_scale:NnnN #1 {#2} {#3} \hbox_set:Nn }
+\cs_generate_variant:Nn \box_scale:Nnn { c }
+\cs_new_protected:Npn \box_gscale:Nnn #1#2#3
+ { \@@_scale:NnnN #1 {#2} {#3} \hbox_gset:Nn }
+\cs_generate_variant:Nn \box_gscale:Nnn { c }
+\cs_new_protected:Npn \@@_scale:NnnN #1#2#3#4
{
- \hbox_set:Nn #1
+ #4 #1
{
\fp_set:Nn \l_@@_scale_x_fp {#2}
\fp_set:Nn \l_@@_scale_y_fp {#3}
- \@@_scale_aux:N #1
+ \@@_scale:N #1
}
}
-\cs_generate_variant:Nn \box_scale:Nnn { c }
-\cs_new_protected:Npn \@@_scale_aux:N #1
+\cs_new_protected:Npn \@@_scale:N #1
{
\dim_set:Nn \l_@@_top_dim { \box_ht:N #1 }
\dim_set:Nn \l_@@_bottom_dim { -\box_dp:N #1 }
@@ -2019,35 +2164,52 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
-% \box_autosize_to_wd_and_ht:Nnn ,
-% \box_autosize_to_wd_and_ht:cnn ,
-% \box_autosize_to_wd_and_ht_plus_dp:Nnn ,
-% \box_autosize_to_wd_and_ht_plus_dp:cnn
+% \box_autosize_to_wd_and_ht:Nnn ,
+% \box_autosize_to_wd_and_ht:cnn ,
+% \box_gautosize_to_wd_and_ht:Nnn ,
+% \box_gautosize_to_wd_and_ht:cnn ,
+% \box_autosize_to_wd_and_ht_plus_dp:Nnn ,
+% \box_autosize_to_wd_and_ht_plus_dp:cnn ,
+% \box_gautosize_to_wd_and_ht_plus_dp:Nnn ,
+% \box_gautosize_to_wd_and_ht_plus_dp:cnn
% }
-% \begin{macro}{\@@_autosize:Nnnn}
+% \begin{macro}{\@@_autosize:NnnnN}
% Although autosizing a box uses dimensions, it has more in common in
% implementation with scaling. As such, most of the real work here is
% done elsewhere.
% \begin{macrocode}
\cs_new_protected:Npn \box_autosize_to_wd_and_ht:Nnn #1#2#3
- { \@@_autosize:Nnnn #1 {#2} {#3} { \box_ht:N #1 } }
+ { \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 } \hbox_set:Nn }
+\cs_generate_variant:Nn \box_autosize_to_wd_and_ht:Nnn { c }
+\cs_new_protected:Npn \box_gautosize_to_wd_and_ht:Nnn #1#2#3
+ { \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 } \hbox_gset:Nn }
\cs_generate_variant:Nn \box_autosize_to_wd_and_ht:Nnn { c }
\cs_new_protected:Npn \box_autosize_to_wd_and_ht_plus_dp:Nnn #1#2#3
- { \@@_autosize:Nnnn #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 } }
+ {
+ \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 }
+ \hbox_set:Nn
+ }
\cs_generate_variant:Nn \box_autosize_to_wd_and_ht_plus_dp:Nnn { c }
-\cs_new_protected:Npn \@@_autosize:Nnnn #1#2#3#4
+\cs_new_protected:Npn \box_gautosize_to_wd_and_ht_plus_dp:Nnn #1#2#3
{
- \hbox_set:Nn #1
+ \@@_autosize:NnnnN #1 {#2} {#3} { \box_ht:N #1 + \box_dp:N #1 }
+ \hbox_gset:Nn
+ }
+\cs_generate_variant:Nn \box_gautosize_to_wd_and_ht_plus_dp:Nnn { c }
+\cs_new_protected:Npn \@@_autosize:NnnnN #1#2#3#4#5
+ {
+ #5 #1
{
\fp_set:Nn \l_@@_scale_x_fp { ( #2 ) / \box_wd:N #1 }
\fp_set:Nn \l_@@_scale_y_fp { ( #3 ) / ( #4 ) }
\fp_compare:nNnTF \l_@@_scale_x_fp > \l_@@_scale_y_fp
{ \fp_set_eq:NN \l_@@_scale_x_fp \l_@@_scale_y_fp }
{ \fp_set_eq:NN \l_@@_scale_y_fp \l_@@_scale_x_fp }
- \@@_scale_aux:N #1
+ \@@_scale:N #1
}
}
% \end{macrocode}
@@ -2108,6 +2270,49 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Deprecated functions}
+%
+% \begin{macro}
+% {
+% \box_set_eq_clear:NN, \box_set_eq_clear:cN,
+% \box_set_eq_clear:Nc, \box_set_eq_clear:cc
+% }
+% \begin{macro}
+% {
+% \box_gset_eq_clear:NN, \box_gset_eq_clear:cN,
+% \box_gset_eq_clear:Nc, \box_gset_eq_clear:cc
+% }
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \box_set_eq_drop:N }
+\cs_new_protected:Npn \box_set_eq_clear:NN #1#2
+ { \tex_setbox:D #1 \tex_box:D #2 }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \box_gset_eq_drop:N }
+\cs_new_protected:Npn \box_gset_eq_clear:NN #1#2
+ { \tex_global:D \tex_setbox:D #1 \tex_box:D #2 }
+\cs_generate_variant:Nn \box_set_eq_clear:NN { c , Nc , cc }
+\cs_generate_variant:Nn \box_gset_eq_clear:NN { c , Nc , cc }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hbox_unpack_clear:N, \hbox_unpack_clear:c}
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \hbox_unpack_drop:N }
+\cs_new_protected:Npn \hbox_unpack_clear:N
+ { \hbox_unpack_drop:N }
+\cs_generate_variant:Nn \hbox_unpack_clear:N { c }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\vbox_unpack_clear:N, \vbox_unpack_clear:c}
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \vbox_unpack_drop:N }
+\cs_new_protected:Npn \vbox_unpack_clear:N
+ { \vbox_unpack_drop:N }
+\cs_generate_variant:Nn \vbox_unpack_clear:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index 59509d55283..54892ac54e5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3candidates.dtx Copyright (C) 2012-2019 The LaTeX3 Project
+%% File: l3candidates.dtx
+%
+% Copyright (C) 2012-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -42,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -141,14 +143,15 @@
%
% \subsection{Viewing part of a box}
%
-% \begin{function}{\box_clip:N, \box_clip:c}
+% \begin{function}[updated = 2019-01-23]
+% {\box_clip:N, \box_clip:c, \box_gclip:N, \box_gclip:c}
% \begin{syntax}
% \cs{box_clip:N} \meta{box}
% \end{syntax}
% Clips the \meta{box} in the output so that only material inside the
% bounding box is displayed in the output. The updated \meta{box} is an
% hbox, irrespective of the nature of the \meta{box} before the clipping is
-% applied. The clipping applies within the current \TeX{} group level.
+% applied.
%
% \textbf{These functions require the \LaTeX3 native drivers: they do
% not work with the \LaTeXe{} \pkg{graphics} drivers!}
@@ -161,9 +164,13 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\box_trim:Nnnnn, \box_trim:cnnnn}
+% \begin{function}[added = 2019-01-23]
+% {
+% \box_set_trim:Nnnnn, \box_set_trim:cnnnn,
+% \box_gset_trim:Nnnnn, \box_gset_trim:cnnnn
+% }
% \begin{syntax}
-% \cs{box_trim:Nnnnn} \meta{box} \Arg{left} \Arg{bottom} \Arg{right} \Arg{top}
+% \cs{box_set_trim:Nnnnn} \meta{box} \Arg{left} \Arg{bottom} \Arg{right} \Arg{top}
% \end{syntax}
% Adjusts the bounding box of the \meta{box} \meta{left} is removed from
% the left-hand edge of the bounding box, \meta{right} from the right-hand
@@ -172,14 +179,18 @@
% unless \cs{box_clip:N} is subsequently applied.
% The updated \meta{box} is an
% hbox, irrespective of the nature of the \meta{box} before the trim
-% operation is applied. The adjustment applies within the current \TeX{}
-% group level. The behavior of the operation where the trims requested is
+% operation is applied.
+% The behavior of the operation where the trims requested is
% greater than the size of the box is undefined.
% \end{function}
%
-% \begin{function}{\box_viewport:Nnnnn, \box_viewport:cnnnn}
+% \begin{function}[added = 2019-01-23]
+% {
+% \box_set_viewport:Nnnnn, \box_set_viewport:cnnnn,
+% \box_gset_viewport:Nnnnn, \box_gset_viewport:cnnnn
+% }
% \begin{syntax}
-% \cs{box_viewport:Nnnnn} \meta{box} \Arg{llx} \Arg{lly} \Arg{urx} \Arg{ury}
+% \cs{box_set_viewport:Nnnnn} \meta{box} \Arg{llx} \Arg{lly} \Arg{urx} \Arg{ury}
% \end{syntax}
% Adjusts the bounding box of the \meta{box} such that it has lower-left
% co-ordinates (\meta{llx}, \meta{lly}) and upper-right co-ordinates
@@ -189,13 +200,16 @@
% subsequently applied.
% The updated \meta{box} is an
% hbox, irrespective of the nature of the \meta{box} before the viewport
-% operation is applied. The adjustment applies within the current \TeX{}
-% group level.
+% operation is applied.
% \end{function}
%
% \section{Additions to \pkg{l3coffins}}
%
-% \begin{function}{\coffin_resize:Nnn, \coffin_resize:cnn}
+% \begin{function}[updated = 2019-01-23]
+% {
+% \coffin_resize:Nnn, \coffin_resize:cnn,
+% \coffin_gresize:Nnn, \coffin_gresize:cnn
+% }
% \begin{syntax}
% \cs{coffin_resize:Nnn} \meta{coffin} \Arg{width} \Arg{total-height}
% \end{syntax}
@@ -203,7 +217,11 @@
% both of which should be given as dimension expressions.
% \end{function}
%
-% \begin{function}{\coffin_rotate:Nn, \coffin_rotate:cn}
+% \begin{function}
+% {
+% \coffin_rotate:Nn, \coffin_rotate:cn,
+% \coffin_grotate:Nn, \coffin_grotate:cn
+% }
% \begin{syntax}
% \cs{coffin_rotate:Nn} \meta{coffin} \Arg{angle}
% \end{syntax}
@@ -213,7 +231,11 @@
% the bounding box of the coffin growing unnecessarily.
% \end{function}
%
-% \begin{function}{\coffin_scale:Nnn, \coffin_scale:cnn}
+% \begin{function}[updated = 2019-01-23]
+% {
+% \coffin_scale:Nnn, \coffin_scale:cnn,
+% \coffin_gscale:Nnn, \coffin_gscale:cnn
+% }
% \begin{syntax}
% \cs{coffin_scale:Nnn} \meta{coffin} \Arg{x-scale} \Arg{y-scale}
% \end{syntax}
@@ -224,19 +246,6 @@
%
% \section{Additions to \pkg{l3expan}}
%
-% \begin{function}[added = 2017-12-12]{\prg_generate_conditional_variant:Nnn}
-% \begin{syntax}
-% \cs{prg_generate_conditional_variant:Nnn} \cs[no-index]{\meta{name}:\meta{arg spec}} \Arg{variant argument specifiers} \Arg{condition specifiers}
-% \end{syntax}
-% Defines argument-specifier variants of conditionals. This is
-% equivalent to running \cs{cs_generate_variant:Nn} \meta{conditional}
-% \Arg{variant argument specifiers} on each \meta{conditional}
-% described by the \meta{condition specifiers}. These base-form
-% \meta{conditionals} are obtained from the \meta{name} and \meta{arg
-% spec} as described for \cs{prg_new_conditional:Npnn}, and they
-% should be defined.
-% \end{function}
-%
% \begin{function}[added = 2018-04-04]{\exp_args_generate:n}
% \begin{syntax}
% \cs{exp_args_generate:n} \Arg{variant argument specifiers}
@@ -863,6 +872,25 @@
%
% \section{Additions to \pkg{l3sys}}
%
+% \begin{function}[added = 2019-01-16]{\sys_shell_get:nnN}
+% \begin{function}[TF,added = 2019-01-16]{\sys_shell_get:nnN}
+% \begin{syntax}
+% \cs{sys_shell_get:nnN} \Arg{shell~command} \Arg{setup} \meta{tl~var}
+% \cs{sys_shell_get:nnNTF} \Arg{shell~command} \Arg{setup} \meta{tl~var} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Defines \meta{tl} to the text returned by the \meta{shell command}.
+% The \meta{shell command} is converted to a string using
+% \cs{tl_to_str:n}. Category codes may need to be set appropriately
+% via the \meta{setup} argument, which is run just before running the
+% \meta{shell command} (in a group).
+% If shell escape is disabled, the \meta{tl~var} will be empty.
+% Note that quote characters (|"|) \emph{cannot} be used inside the
+% \meta{shell command}. The \cs{sys_shell_get:nnNTF} conditional
+% returns \texttt{true} if the shell is available and no quote is
+% detected, and \texttt{false} otherwise.
+% \end{function}
+% \end{function}
+%
% \begin{variable}[added = 2018-05-02]{\c_sys_engine_version_str}
% The version string of the current engine, in the same form as
% given in the banner issued when running a job. For \pdfTeX{}
@@ -1231,48 +1259,6 @@
% to add these to the kernel where they are well-documented
% (\emph{e.g.}~in Unicode Consortium or relevant government publications).
%
-% \begin{function}[added = 2014-06-25]
-% {
-% \tl_set_from_file:Nnn, \tl_set_from_file:cnn,
-% \tl_gset_from_file:Nnn, \tl_gset_from_file:cnn
-% }
-% \begin{syntax}
-% \cs{tl_set_from_file:Nnn} \meta{tl} \Arg{setup} \Arg{filename}
-% \end{syntax}
-% Defines \meta{tl} to the contents of \meta{filename}.
-% Category codes may need to be set appropriately via the \meta{setup}
-% argument.
-% \end{function}
-%
-% \begin{function}[added = 2014-06-25]
-% {
-% \tl_set_from_file_x:Nnn, \tl_set_from_file_x:cnn,
-% \tl_gset_from_file_x:Nnn, \tl_gset_from_file_x:cnn
-% }
-% \begin{syntax}
-% \cs{tl_set_from_file_x:Nnn} \meta{tl} \Arg{setup} \Arg{filename}
-% \end{syntax}
-% Defines \meta{tl} to the contents of \meta{filename}, expanding
-% the contents of the file as it is read. Category codes and other
-% definitions may need to be set appropriately via the \meta{setup}
-% argument.
-% \end{function}
-%
-% \begin{function}[added = 2018-07-23]
-% {
-% \tl_set_from_shell:Nnn, \tl_set_from_shell:cnn,
-% \tl_gset_from_shell:Nnn, \tl_gset_from_shell:cnn
-% }
-% \begin{syntax}
-% \cs{tl_set_from_shell:Nnn} \meta{tl~var} \Arg{setup} \Arg{shell~command}
-% \end{syntax}
-% Defines \meta{tl} to the text returned by the \meta{shell command}.
-% Category codes may need to be set appropriately via the \meta{setup}
-% argument. If shell escape is disabled, the \meta{tl~var} will be empty.
-% Note that quote characters (|"|) \emph{cannot} be used inside the
-% \meta{shell command}.
-% \end{function}
-%
% \begin{function}[EXP, added = 2017-07-15]
% {
% \tl_range_braced:Nnn, \tl_range_braced:cnn, \tl_range_braced:nnn,
@@ -1521,20 +1507,34 @@
%
% \subsubsection{Viewing part of a box}
%
-% \begin{macro}{\box_clip:N, \box_clip:c}
+% \begin{macro}{\box_clip:N, \box_clip:c, \box_gclip:N, \box_gclip:c}
% A wrapper around the driver-dependent code.
% \begin{macrocode}
\cs_new_protected:Npn \box_clip:N #1
{ \hbox_set:Nn #1 { \driver_box_use_clip:N #1 } }
\cs_generate_variant:Nn \box_clip:N { c }
+\cs_new_protected:Npn \box_gclip:N #1
+ { \hbox_gset:Nn #1 { \driver_box_use_clip:N #1 } }
+\cs_generate_variant:Nn \box_gclip:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\box_trim:Nnnnn, \box_trim:cnnnn}
+% \begin{macro}
+% {
+% \box_set_trim:Nnnnn, \box_set_trim:cnnnn,
+% \box_gset_trim:Nnnnn, \box_gset_trim:cnnnn
+% }
+% \begin{macro}{\@@_set_trim:NnnnnN}
% Trimming from the left- and right-hand edges of the box is easy: kern the
% appropriate parts off each side.
% \begin{macrocode}
-\cs_new_protected:Npn \box_trim:Nnnnn #1#2#3#4#5
+\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5
+ { \@@_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN }
+\cs_generate_variant:Nn \box_set_trim:Nnnnn { c }
+\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5
+ { \@@_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN }
+\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c }
+\cs_new_protected:Npn \@@_set_trim:NnnnnN #1#2#3#4#5#6
{
\hbox_set:Nn \l_@@_internal_box
{
@@ -1556,7 +1556,7 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_down:nn \c_zero_dim
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_dp:Nn \l_@@_internal_box { \box_dp:N #1 - (#3) }
}
@@ -1564,7 +1564,7 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_down:nn { (#3) - \box_dp:N #1 }
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_dp:Nn \l_@@_internal_box \c_zero_dim
}
@@ -1576,7 +1576,7 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_up:nn \c_zero_dim
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_ht:Nn \l_@@_internal_box
{ \box_ht:N \l_@@_internal_box - (#5) }
@@ -1585,22 +1585,33 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_up:nn { (#5) - \box_ht:N \l_@@_internal_box }
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_ht:Nn \l_@@_internal_box \c_zero_dim
}
- \box_set_eq:NN #1 \l_@@_internal_box
+ #6 #1 \l_@@_internal_box
}
-\cs_generate_variant:Nn \box_trim:Nnnnn { c }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\box_viewport:Nnnnn, \box_viewport:cnnnn}
+% \begin{macro}
+% {
+% \box_set_viewport:Nnnnn, \box_set_viewport:cnnnn,
+% \box_gset_viewport:Nnnnn, \box_gset_viewport:cnnnn
+% }
+% \begin{macro}{\@@_viewport:NnnnnN}
% The same general logic as for the trim operation, but with absolute
% dimensions. As a result, there are some things to watch out for in the
% vertical direction.
% \begin{macrocode}
-\cs_new_protected:Npn \box_viewport:Nnnnn #1#2#3#4#5
+\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5
+ { \@@_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN }
+\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c }
+\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5
+ { \@@_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN }
+\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c }
+\cs_new_protected:Npn \@@_set_viewport:NnnnnN #1#2#3#4#5#6
{
\hbox_set:Nn \l_@@_internal_box
{
@@ -1613,13 +1624,13 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_down:nn \c_zero_dim
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_dp:Nn \l_@@_internal_box { - \@@_dim_eval:n {#3} }
}
{
\hbox_set:Nn \l_@@_internal_box
- { \box_move_down:nn {#3} { \box_use:N \l_@@_internal_box } }
+ { \box_move_down:nn {#3} { \box_use_drop:N \l_@@_internal_box } }
\box_set_dp:Nn \l_@@_internal_box \c_zero_dim
}
\dim_compare:nNnTF {#5} > \c_zero_dim
@@ -1627,7 +1638,7 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_up:nn \c_zero_dim
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_ht:Nn \l_@@_internal_box
{
@@ -1640,15 +1651,15 @@
\hbox_set:Nn \l_@@_internal_box
{
\box_move_up:nn { - \@@_dim_eval:n {#5} }
- { \box_use:N \l_@@_internal_box }
+ { \box_use_drop:N \l_@@_internal_box }
}
\box_set_ht:Nn \l_@@_internal_box \c_zero_dim
}
- \box_set_eq:NN #1 \l_@@_internal_box
+ #6 #1 \l_@@_internal_box
}
-\cs_generate_variant:Nn \box_viewport:Nnnnn { c }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \subsection{Additions to \pkg{l3coffins}}
%
@@ -1676,6 +1687,14 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_corners_prop, \l_@@_poles_prop}
+% Used to avoid needing to track scope for intermediate steps.
+% \begin{macrocode}
+\prop_new:N \l_@@_corners_prop
+\prop_new:N \l_@@_poles_prop
+% \end{macrocode}
+% \end{variable}
+%
% \begin{variable}{\l_@@_bounding_shift_dim}
% The shift of the bounding box of a coffin from the real content.
% \begin{macrocode}
@@ -1700,7 +1719,12 @@
% \end{variable}
% \end{variable}
%
-% \begin{macro}{\coffin_rotate:Nn, \coffin_rotate:cn}
+% \begin{macro}
+% {
+% \coffin_rotate:Nn, \coffin_rotate:cn,
+% \coffin_grotate:Nn, \coffin_grotate:cn
+% }
+% \begin{macro}{\@@_rotate:NnNN}
% Rotating a coffin requires several steps which can be conveniently
% run together. The sine and cosine of the angle in degrees are
% computed. This is then used to set \cs{l_@@_sin_fp} and
@@ -1708,16 +1732,28 @@
% of the procedure.
% \begin{macrocode}
\cs_new_protected:Npn \coffin_rotate:Nn #1#2
+ { \@@_rotate:NnNN #1 {#2} \box_rotate:Nn \prop_set_eq:cN }
+\cs_new_protected:Npn \coffin_grotate:Nn #1#2
+ { \@@_rotate:NnNN #1 {#2} \box_grotate:Nn \prop_gset_eq:cN }
+\cs_new_protected:Npn \@@_rotate:NnNN #1#2#3#4
{
\fp_set:Nn \l_@@_sin_fp { sind ( #2 ) }
\fp_set:Nn \l_@@_cos_fp { cosd ( #2 ) }
% \end{macrocode}
+% Use a local copy of the property lists to avoid needing to pass the
+% name and scope around.
+% \begin{macrocode}
+ \prop_set_eq:Nc \l_@@_corners_prop
+ { coffin ~ \@@_to_value:N #1 ~ corners }
+ \prop_set_eq:Nc \l_@@_poles_prop
+ { coffin ~ \@@_to_value:N #1 ~ poles }
+% \end{macrocode}
% The corners and poles of the coffin can now be rotated around the
% origin. This is best achieved using mapping functions.
% \begin{macrocode}
- \prop_map_inline:cn { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_corners_prop
{ \@@_rotate_corner:Nnnn #1 {##1} ##2 }
- \prop_map_inline:cn { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_poles_prop
{ \@@_rotate_pole:Nnnnnn #1 {##1} ##2 }
% \end{macrocode}
% The bounding box of the coffin needs to be rotated, and to do this
@@ -1733,7 +1769,7 @@
% \begin{macrocode}
\@@_find_corner_maxima:N #1
\@@_find_bounding_shift:
- \box_rotate:Nn #1 {#2}
+ #3 #1 {#2}
% \end{macrocode}
% The correction of the box position itself takes place here. The idea
% is that the bounding box for a coffin is tight up to the content, and
@@ -1765,19 +1801,27 @@
\box_set_dp:Nn \l_@@_internal_box { 0 pt }
\box_set_wd:Nn \l_@@_internal_box
{ \l_@@_right_corner_dim - \l_@@_left_corner_dim }
- \hbox_set:Nn #1 { \box_use:N \l_@@_internal_box }
+ \hbox_set:Nn #1 { \box_use_drop:N \l_@@_internal_box }
% \end{macrocode}
% The final task is to move the poles and corners such that they are
% back in alignment with the box reference point.
% \begin{macrocode}
- \prop_map_inline:cn { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_corners_prop
{ \@@_shift_corner:Nnnn #1 {##1} ##2 }
- \prop_map_inline:cn { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_poles_prop
{ \@@_shift_pole:Nnnnnn #1 {##1} ##2 }
+% \end{macrocode}
+% Update the coffin data.
+% \begin{macrocode}
+ #4 { coffin ~ \@@_to_value:N #1 ~ corners }
+ \l_@@_corners_prop
+ #4 { coffin ~ \@@_to_value:N #1 ~ poles }
+ \l_@@_poles_prop
}
\cs_generate_variant:Nn \coffin_rotate:Nn { c }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_set_bounding:N}
% The bounding box corners for a coffin are easy enough to find: this
@@ -1821,7 +1865,7 @@
\cs_new_protected:Npn \@@_rotate_corner:Nnnn #1#2#3#4
{
\@@_rotate_vector:nnNN {#3} {#4} \l_@@_x_dim \l_@@_y_dim
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop } {#2}
+ \prop_put:Nnx \l_@@_corners_prop {#2}
{ { \dim_use:N \l_@@_x_dim } { \dim_use:N \l_@@_y_dim } }
}
% \end{macrocode}
@@ -1838,7 +1882,7 @@
\@@_rotate_vector:nnNN {#3} {#4} \l_@@_x_dim \l_@@_y_dim
\@@_rotate_vector:nnNN {#5} {#6}
\l_@@_x_prime_dim \l_@@_y_prime_dim
- \@@_set_pole:Nnx #1 {#2}
+ \prop_put:Nnx \l_@@_poles_prop {#2}
{
{ \dim_use:N \l_@@_x_dim } { \dim_use:N \l_@@_y_dim }
{ \dim_use:N \l_@@_x_prime_dim }
@@ -1892,7 +1936,7 @@
\dim_set:Nn \l_@@_right_corner_dim { -\c_max_dim }
\dim_set:Nn \l_@@_bottom_corner_dim { \c_max_dim }
\dim_set:Nn \l_@@_left_corner_dim { \c_max_dim }
- \prop_map_inline:cn { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_corners_prop
{ \@@_find_corner_maxima_aux:nn ##2 }
}
\cs_new_protected:Npn \@@_find_corner_maxima_aux:nn #1#2
@@ -1939,7 +1983,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_shift_corner:Nnnn #1#2#3#4
{
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _ prop } {#2}
+ \prop_put:Nnx \l_@@_corners_prop {#2}
{
{ \dim_eval:n { #3 - \l_@@_left_corner_dim } }
{ \dim_eval:n { #4 - \l_@@_bottom_corner_dim } }
@@ -1947,7 +1991,7 @@
}
\cs_new_protected:Npn \@@_shift_pole:Nnnnnn #1#2#3#4#5#6
{
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _ prop } {#2}
+ \prop_put:Nnx \l_@@_poles_prop {#2}
{
{ \dim_eval:n { #3 - \l_@@_left_corner_dim } }
{ \dim_eval:n { #4 - \l_@@_bottom_corner_dim } }
@@ -1980,7 +2024,12 @@
% \end{variable}
% \end{variable}
%
-% \begin{macro}{\coffin_resize:Nnn, \coffin_resize:cnn}
+% \begin{macro}
+% {
+% \coffin_resize:Nnn, \coffin_resize:cnn,
+% \coffin_gresize:Nnn, \coffin_gresize:cnn
+% }
+% \begin{macro}{\@@_resize:NnnNN}
% Resizing a coffin begins by setting up the user-friendly names for
% the dimensions of the coffin box. The new sizes are then turned into
% scale factor. This is the same operation as takes place for the
@@ -1989,6 +2038,20 @@
% \begin{macrocode}
\cs_new_protected:Npn \coffin_resize:Nnn #1#2#3
{
+ \@@_resize:NnnNN #1 {#2} {#3}
+ \box_resize_to_wd_and_ht_plus_dp:Nnn
+ \prop_set_eq:cN
+ }
+\cs_generate_variant:Nn \coffin_resize:Nnn { c }
+\cs_new_protected:Npn \coffin_gresize:Nnn #1#2#3
+ {
+ \@@_resize:NnnNN #1 {#2} {#3}
+ \box_gresize_to_wd_and_ht_plus_dp:Nnn
+ \prop_gset_eq:cN
+ }
+\cs_generate_variant:Nn \coffin_gresize:Nnn { c }
+\cs_new_protected:Npn \@@_resize:NnnNN #1#2#3#4#5
+ {
\fp_set:Nn \l_@@_scale_x_fp
{ \dim_to_fp:n {#2} / \dim_to_fp:n { \coffin_wd:N #1 } }
\fp_set:Nn \l_@@_scale_y_fp
@@ -1996,22 +2059,26 @@
\dim_to_fp:n {#3}
/ \dim_to_fp:n { \coffin_ht:N #1 + \coffin_dp:N #1 }
}
- \box_resize_to_wd_and_ht_plus_dp:Nnn #1 {#2} {#3}
- \@@_resize_common:Nnn #1 {#2} {#3}
+ #4 #1 {#2} {#3}
+ \@@_resize_common:NnnN #1 {#2} {#3} #5
}
-\cs_generate_variant:Nn \coffin_resize:Nnn { c }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\@@_resize_common:Nnn}
+% \begin{macro}{\@@_resize_common:NnnN}
% The poles and corners of the coffin are scaled to the appropriate
% places before actually resizing the underlying box.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_resize_common:Nnn #1#2#3
+\cs_new_protected:Npn \@@_resize_common:NnnN #1#2#3#4
{
- \prop_map_inline:cn { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_set_eq:Nc \l_@@_corners_prop
+ { coffin ~ \@@_to_value:N #1 ~ corners }
+ \prop_set_eq:Nc \l_@@_poles_prop
+ { coffin ~ \@@_to_value:N #1 ~ poles }
+ \prop_map_inline:Nn \l_@@_corners_prop
{ \@@_scale_corner:Nnnn #1 {##1} ##2 }
- \prop_map_inline:cn { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_poles_prop
{ \@@_scale_pole:Nnnnnn #1 {##1} ##2 }
% \end{macrocode}
% Negative $x$-scaling values place the poles in the wrong
@@ -2019,18 +2086,25 @@
% \begin{macrocode}
\fp_compare:nNnT \l_@@_scale_x_fp < \c_zero_fp
{
- \prop_map_inline:cn
- { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_corners_prop
{ \@@_x_shift_corner:Nnnn #1 {##1} ##2 }
- \prop_map_inline:cn
- { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:Nn \l_@@_poles_prop
{ \@@_x_shift_pole:Nnnnnn #1 {##1} ##2 }
}
+ #4 { coffin ~ \@@_to_value:N #1 ~ corners }
+ \l_@@_corners_prop
+ #4 { coffin ~ \@@_to_value:N #1 ~ poles }
+ \l_@@_poles_prop
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\coffin_scale:Nnn, \coffin_scale:cnn}
+% \begin{macro}
+% {
+% \coffin_scale:Nnn, \coffin_scale:cnn,
+% \coffin_gscale:Nnn, \coffin_gscale:cnn
+% }
+% \begin{macro}{\coffin_scale:NnnNN}
% For scaling, the opposite calculation is done to find the new
% dimensions for the coffin. Only the total height is needed, as this
% is the shift required for corners and poles. The scaling is done
@@ -2038,22 +2112,29 @@
% without needing to use the \texttt{fp} module.
% \begin{macrocode}
\cs_new_protected:Npn \coffin_scale:Nnn #1#2#3
+ { \@@_scale:NnnNN #1 {#2} {#3} \box_scale:Nnn \prop_set_eq:cN }
+\cs_generate_variant:Nn \coffin_scale:Nnn { c }
+\cs_new_protected:Npn \coffin_gscale:Nnn #1#2#3
+ { \@@_scale:NnnNN #1 {#2} {#3} \box_gscale:Nnn \prop_gset_eq:cN }
+\cs_generate_variant:Nn \coffin_gscale:Nnn { c }
+\cs_new_protected:Npn \@@_scale:NnnNN #1#2#3#4#5
{
\fp_set:Nn \l_@@_scale_x_fp {#2}
\fp_set:Nn \l_@@_scale_y_fp {#3}
- \box_scale:Nnn #1 { \l_@@_scale_x_fp } { \l_@@_scale_y_fp }
+ #4 #1 { \l_@@_scale_x_fp } { \l_@@_scale_y_fp }
\dim_set:Nn \l_@@_internal_dim
{ \coffin_ht:N #1 + \coffin_dp:N #1 }
\dim_set:Nn \l_@@_scaled_total_height_dim
{ \fp_abs:n { \l_@@_scale_y_fp } \l_@@_internal_dim }
\dim_set:Nn \l_@@_scaled_width_dim
{ -\fp_abs:n { \l_@@_scale_x_fp } \coffin_wd:N #1 }
- \@@_resize_common:Nnn #1
+ \@@_resize_common:NnnN #1
{ \l_@@_scaled_width_dim } { \l_@@_scaled_total_height_dim }
+ #5
}
-\cs_generate_variant:Nn \coffin_scale:Nnn { c }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_scale_vector:nnNN}
% This functions scales a vector from the origin using the pre-set scale
@@ -2078,13 +2159,13 @@
\cs_new_protected:Npn \@@_scale_corner:Nnnn #1#2#3#4
{
\@@_scale_vector:nnNN {#3} {#4} \l_@@_x_dim \l_@@_y_dim
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop } {#2}
+ \prop_put:Nnx \l_@@_corners_prop {#2}
{ { \dim_use:N \l_@@_x_dim } { \dim_use:N \l_@@_y_dim } }
}
\cs_new_protected:Npn \@@_scale_pole:Nnnnnn #1#2#3#4#5#6
{
\@@_scale_vector:nnNN {#3} {#4} \l_@@_x_dim \l_@@_y_dim
- \@@_set_pole:Nnx #1 {#2}
+ \prop_put:Nnx \l_@@_poles_prop {#2}
{
{ \dim_use:N \l_@@_x_dim } { \dim_use:N \l_@@_y_dim }
{#5} {#6}
@@ -2101,14 +2182,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_x_shift_corner:Nnnn #1#2#3#4
{
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop } {#2}
+ \prop_put:Nnx \l_@@_corners_prop {#2}
{
{ \dim_eval:n { #3 + \box_wd:N #1 } } {#4}
}
}
\cs_new_protected:Npn \@@_x_shift_pole:Nnnnnn #1#2#3#4#5#6
{
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _prop } {#2}
+ \prop_put:Nnx \l_@@_poles_prop {#2}
{
{ \dim_eval:n { #3 + \box_wd:N #1 } } {#4}
{#5} {#6}
@@ -2942,6 +3023,71 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_internal_tl}
+% \begin{macrocode}
+\tl_new:N \l_@@_internal_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_marker_tl}
+% The same idea as the marker for rescanning token lists.
+% \begin{macrocode}
+\tl_const:Nx \c_@@_marker_tl { : \token_to_str:N : }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[TF]{\sys_shell_get:nnN}
+% \begin{macro}{\sys_shell_get:nnN,\@@_get:nnN,\@@_get_do:Nw}
+% Setting using a shell is at this level just a slightly specialised file
+% operation, with an additional check for quotes, as these are not supported.
+% \begin{macrocode}
+\cs_new_protected:Npn \sys_shell_get:nnN #1#2#3
+ {
+ \sys_shell_get:nnNF {#1} {#2} #3
+ { \tl_clear:N #3 }
+ }
+\prg_new_protected_conditional:Npnn \sys_shell_get:nnN #1#2#3 { T , F , TF }
+ {
+ \sys_if_shell:TF
+ { \exp_args:No \@@_get:nnN { \tl_to_str:n {#1} } {#2} #3 }
+ { \prg_return_false: }
+ }
+\cs_new_protected:Npn \@@_get:nnN #1#2#3
+ {
+ \tl_if_in:nnTF {#1} { " }
+ {
+ \__kernel_msg_error:nnx
+ { kernel } { quote-in-shell } {#1}
+ \prg_return_false:
+ }
+ {
+ \if_false: { \fi:
+ \group_begin:
+ \int_set_eq:NN \tex_tracingnesting:D \c_zero_int
+ \exp_args:No \tex_everyeof:D { \c_@@_marker_tl }
+ #2 \scan_stop:
+ \exp_after:wN \@@_get_do:Nw
+ \exp_after:wN #3
+ \exp_after:wN \prg_do_nothing:
+ \tex_input:D | "#1" \scan_stop:
+ \if_false: } \fi:
+ \prg_return_true:
+ }
+ }
+\exp_args:Nno \use:nn
+ { \cs_new_protected:Npn \@@_get_do:Nw #1#2 }
+ { \c_@@_marker_tl }
+ {
+ \group_end:
+ \tl_set:No #1 {#2}
+ }
+\__kernel_msg_new:nnnn { kernel } { quote-in-shell }
+ { Quotes~in~shell~command~'#1'. }
+ { Shell~commands~cannot~contain~quotes~("). }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{variable}{\c_sys_platform_str}
% Detecting the platform on \LuaTeX{} is easy: for other engines, we use
% the fact that the two common cases have special null files. It is possible
@@ -3144,136 +3290,52 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}
+% \subsubsection{Deprecated functions}
+%
+% \begin{macro}[deprecated = 2020-12-31]
% {
-% \tl_set_from_file:Nnn, \tl_set_from_file:cnn,
-% \tl_gset_from_file:Nnn, \tl_gset_from_file:cnn
+% \tl_set_from_file:Nnn, \tl_set_from_file:cnn,
+% \tl_gset_from_file:Nnn, \tl_gset_from_file:cnn,
+% \tl_set_from_file_x:Nnn, \tl_set_from_file_x:cnn,
+% \tl_gset_from_file_x:Nnn, \tl_gset_from_file_x:cnn
% }
-% \begin{macro}{\@@_set_from_file:NNnn}
-% \begin{macro}{\@@_from_file_do:w}
-% \begin{macro}{\@@_set_from:nNNn}
-% The approach here is similar to that for doing a rescan, and so the same
-% internals can be reused. Thus the plan is to insert a pair of tokens of
-% the same charcode but different catcodes after the file has been read.
-% This plus \cs{exp_not:N} allows the primitive to be used to carry out
-% a set operation.
-% \begin{macrocode}
-\cs_new_protected:Npn \tl_set_from_file:Nnn
- { \@@_set_from_file:NNnn \tl_set:Nn }
-\cs_new_protected:Npn \tl_gset_from_file:Nnn
- { \@@_set_from_file:NNnn \tl_gset:Nn }
-\cs_generate_variant:Nn \tl_set_from_file:Nnn { c }
-\cs_generate_variant:Nn \tl_gset_from_file:Nnn { c }
-\cs_new_protected:Npn \@@_set_from_file:NNnn #1#2#3#4
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN }
+\cs_new_protected:Npn \tl_set_from_file:Nnn #1#2#3
+ { \file_get:nnN {#2} {#3} #1 }
+\cs_generate_variant:Nn \tl_set_from_file:Nnn { c }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN }
+\cs_new_protected:Npn \tl_gset_from_file:Nnn #1#2#3
{
- \file_get_full_name:nN {#4} \l_@@_file_name_str
- \str_if_empty:NTF \l_@@_file_name_str
- { \__kernel_file_missing:n {#4} }
- {
- \exp_args:NV \@@_set_from:nNNn
- \l_@@_file_name_str
- #1 #2 {#3}
- }
+ \group_begin:
+ \file_get:nnN {#3} {#2} \l_@@_internal_a_tl
+ \tl_gset_eq:NN #1 \l_@@_internal_a_tl
+ \group_end:
}
-\exp_args:Nno \use:nn
- { \cs_new_protected:Npn \@@_from_file_do:w #1 }
- { \c_@@_rescan_marker_tl }
- { \tl_set:No \l_@@_internal_a_tl {#1} }
-\cs_new_protected:Npn \@@_set_from:nNNn #1#2#3#4
+\cs_generate_variant:Nn \tl_gset_from_file:Nnn { c }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN }
+\cs_new_protected:Npn \tl_set_from_file_x:Nnn #1#2#3
{
\group_begin:
- \exp_args:No \tex_everyeof:D
- { \c_@@_rescan_marker_tl \exp_not:N }
- #4 \scan_stop:
- \exp_after:wN \@@_from_file_do:w
- \exp_after:wN \prg_do_nothing:
- \tex_input:D #1 \scan_stop:
+ \file_get:nnN {#3} {#2} \l_@@_internal_a_tl
+ #2 \scan_stop:
+ \tl_set:Nx \l_@@_internal_a_tl { \l_@@_internal_a_tl }
\exp_args:NNNo \group_end:
- #2 #3 \l_@@_internal_a_tl
+ \tl_set:Nn #1 \l_@@_internal_a_tl
}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \tl_set_from_file_x:Nnn, \tl_set_from_file_x:cnn,
-% \tl_gset_from_file_x:Nnn, \tl_gset_from_file_x:cnn
-% }
-% \begin{macro}{\@@_set_from_file_x:NNnn}
-% When reading a file and allowing expansion of the content, the set up
-% only needs to prevent \TeX{} complaining about the end of the file. That
-% is done simply, with a group then used to trap the definition needed.
-% Once the business is done using some scratch space, the tokens can be
-% transferred to the real target.
-% \begin{macrocode}
-\cs_new_protected:Npn \tl_set_from_file_x:Nnn
- { \@@_set_from_file_x:NNnn \tl_set:Nn }
-\cs_new_protected:Npn \tl_gset_from_file_x:Nnn
- { \@@_set_from_file_x:NNnn \tl_gset:Nn }
-\cs_generate_variant:Nn \tl_set_from_file_x:Nnn { c }
-\cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c }
-\cs_new_protected:Npn \@@_set_from_file_x:NNnn #1#2#3#4
+\cs_generate_variant:Nn \tl_set_from_file_x:Nnn { c }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \file_get:nnN }
+\cs_new_protected:Npn \tl_gset_from_file_x:Nnn #1#2#3
{
- \file_get_full_name:nN {#4} \l_@@_file_name_str
- \str_if_empty:NTF \l_@@_file_name_str
- { \__kernel_file_missing:n {#4} }
- {
- \group_begin:
- \tex_everyeof:D { \exp_not:N }
- #3 \scan_stop:
- \tl_set:Nx \l_@@_internal_a_tl
- { \tex_input:D \l_@@_file_name_str \c_space_token }
- \exp_args:NNNo \group_end:
- #1 #2 \l_@@_internal_a_tl
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{variable}{\l_@@_file_name_str}
-% \begin{macrocode}
-\str_new:N \l_@@_file_name_str
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}
-% {
-% \tl_set_from_shell:Nnn, \tl_set_from_shell:cnn,
-% \tl_gset_from_shell:Nnn, \tl_gset_from_shell:cnn
-% }
-% \begin{macro}{\@@_set_from_shell:NNnn}
-% Setting using a shell is at this level just a slightly specialised file
-% operation.
-% \begin{macrocode}
-\cs_new_protected:Npn \tl_set_from_shell:Nnn
- { \@@_set_from_shell:NNnn \tl_set:Nn }
-\cs_generate_variant:Nn \tl_set_from_shell:Nnn { c }
-\cs_new_protected:Npn \tl_gset_from_shell:Nnn
- { \@@_set_from_shell:NNnn \tl_gset:Nn }
-\cs_generate_variant:Nn \tl_gset_from_shell:Nnn { c }
-\cs_new_protected:Npn \@@_set_from_shell:NNnn #1#2#3#4
- {
- \sys_if_shell:TF
- {
- \tl_set:Nn \l_@@_internal_a_tl {#4}
- \tl_if_in:NnTF \l_@@_internal_a_tl { " }
- {
- \__kernel_msg_error:nnx
- { kernel } { quote-in-shell } {#4}
- }
- { \@@_set_from:nNNn { | " #4 " } #1 #2 {#3} }
- }
- { #1 #2 { } }
+ \group_begin:
+ \file_get:nnN {#3} {#2} \l_@@_internal_a_tl
+ #2 \scan_stop:
+ \tl_gset:Nx #1 { \l_@@_internal_a_tl }
+ \group_end:
}
-\__kernel_msg_new:nnnn { kernel } { quote-in-shell }
- { Quotes~in~shell~command~'#1'. }
- { Shell~commands~cannot~contain~quotes~("). }
+\cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c }
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \subsubsection{Unicode case changing}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index c069b5cb9da..6a74eb43eb4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -1,8 +1,9 @@
% \iffalse meta-comment
%
-%% File: l3clist.dtx Copyright (C) 2004-2011,2019 Frank Mittelbach,
-%% The LaTeX3 project
-%% (C) 2012-2019 The LaTeX3 Project
+%% File: l3clist.dtx
+%
+% Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
+% (C) 2012-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -43,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 83fbbc8f593..38f13a49dcb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3coffins.dtx Copyright (C) 2010-2019 The LaTeX3 Project
+%% File: l3coffins.dtx
+%
+% Copyright (C) 2010-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -62,21 +64,29 @@
% initially empty.
% \end{function}
%
-% \begin{function}[added = 2011-08-17]{\coffin_clear:N, \coffin_clear:c}
+% \begin{function}[added = 2011-08-17, updated = 2019-01-21]
+% {
+% \coffin_clear:N, \coffin_clear:c,
+% \coffin_gclear:N, \coffin_gclear:c
+% }
% \begin{syntax}
% \cs{coffin_clear:N} \meta{coffin}
% \end{syntax}
-% Clears the content of the \meta{coffin} within the current \TeX{}
-% group level.
+% Clears the content of the \meta{coffin}.
% \end{function}
%
-% \begin{function}[added = 2011-08-17]
-% {\coffin_set_eq:NN, \coffin_set_eq:Nc, \coffin_set_eq:cN, \coffin_set_eq:cc}
+% \begin{function}[added = 2011-08-17, updated = 2019-01-21]
+% {
+% \coffin_set_eq:NN, \coffin_set_eq:Nc,
+% \coffin_set_eq:cN, \coffin_set_eq:cc
+% \coffin_gset_eq:NN, \coffin_gset_eq:Nc,
+% \coffin_gset_eq:cN, \coffin_gset_eq:cc
+% }
% \begin{syntax}
% \cs{coffin_set_eq:NN} \meta{coffin_1} \meta{coffin_2}
% \end{syntax}
% Sets both the content and poles of \meta{coffin_1} equal to those
-% of \meta{coffin_2} within the current \TeX\ group level.
+% of \meta{coffin_2}.
% \end{function}
%
% \begin{function}[EXP, pTF, added = 2012-06-20]
@@ -94,7 +104,10 @@
% current \TeX\ group level.
%
% \begin{function}[added = 2011-08-17, updated = 2011-09-03]
-% {\hcoffin_set:Nn, \hcoffin_set:cn}
+% {
+% \hcoffin_set:Nn, \hcoffin_set:cn,
+% \hcoffin_gset:Nn, \hcoffin_gset:cn
+% }
% \begin{syntax}
% \cs{hcoffin_set:Nn} \meta{coffin} \Arg{material}
% \end{syntax}
@@ -103,8 +116,11 @@
% then set up based on the size of the typeset material.
% \end{function}
%
-% \begin{function}[added = 2011-09-10]
-% {\hcoffin_set:Nw, \hcoffin_set:cw, \hcoffin_set_end:}
+% \begin{function}[added = 2011-09-10, updated = 2019-01-21]
+% {
+% \hcoffin_set:Nw, \hcoffin_set:cw, \hcoffin_set_end:,
+% \hcoffin_gset:Nw, \hcoffin_gset:cw, \hcoffin_gset_end:
+% }
% \begin{syntax}
% \cs{hcoffin_set:Nw} \meta{coffin} \meta{material} \cs{hcoffin_set_end:}
% \end{syntax}
@@ -115,8 +131,11 @@
% environment in a coffin.
% \end{function}
%
-% \begin{function}[added = 2011-08-17, updated = 2012-05-22]
-% {\vcoffin_set:Nnn, \vcoffin_set:cnn}
+% \begin{function}[added = 2011-08-17, updated = 2019-01-21]
+% {
+% \vcoffin_set:Nnn, \vcoffin_set:cnn,
+% \vcoffin_gset:Nnn, \vcoffin_gset:cnn
+% }
% \begin{syntax}
% \cs{vcoffin_set:Nnn} \meta{coffin} \Arg{width} \Arg{material}
% \end{syntax}
@@ -126,8 +145,11 @@
% size of the typeset material.
% \end{function}
%
-% \begin{function}[added = 2011-09-10, updated = 2012-05-22]
-% {\vcoffin_set:Nnw, \vcoffin_set:cnw, \vcoffin_set_end:}
+% \begin{function}[added = 2011-09-10, updated = 2019-01-21]
+% {
+% \vcoffin_set:Nnw, \vcoffin_set:cnw, \vcoffin_set_end:,
+% \vcoffin_gset:Nnw, \vcoffin_gset:cnw, \vcoffin_gset_end:
+% }
% \begin{syntax}
% \cs{vcoffin_set:Nnw} \meta{coffin} \Arg{width} \meta{material} \cs{vcoffin_set_end:}
% \end{syntax}
@@ -139,8 +161,11 @@
% environment in a coffin.
% \end{function}
%
-% \begin{function}[added = 2012-07-20]
-% {\coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn}
+% \begin{function}[added = 2012-07-20, updated = 2019-01-21]
+% {
+% \coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn,
+% \coffin_gset_horizontal_pole:Nnn, \coffin_gset_horizontal_pole:cnn
+% }
% \begin{syntax}
% \cs{coffin_set_horizontal_pole:Nnn} \meta{coffin}
% ~~\Arg{pole} \Arg{offset}
@@ -151,8 +176,11 @@
% \meta{offset} should be given as a dimension expression.
% \end{function}
%
-% \begin{function}[added = 2012-07-20]
-% {\coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn}
+% \begin{function}[added = 2012-07-20, updated = 2019-01-21]
+% {
+% \coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn,
+% \coffin_gset_vertical_pole:Nnn, \coffin_gset_vertical_pole:cnn
+% }
% \begin{syntax}
% \cs{coffin_set_vertical_pole:Nnn} \meta{coffin} \Arg{pole} \Arg{offset}
% \end{syntax}
@@ -164,10 +192,12 @@
%
% \section{Joining and using coffins}
%
-% \begin{function}
+% \begin{function}[updated = 2019-01-22]
% {
% \coffin_attach:NnnNnnnn, \coffin_attach:cnnNnnnn,
-% \coffin_attach:Nnncnnnn, \coffin_attach:cnncnnnn
+% \coffin_attach:Nnncnnnn, \coffin_attach:cnncnnnn,
+% \coffin_gattach:NnnNnnnn, \coffin_gattach:cnnNnnnn,
+% \coffin_gattach:Nnncnnnn, \coffin_gattach:cnncnnnn
% }
% \begin{syntax}
% \cs{coffin_attach:NnnNnnnn}
@@ -188,10 +218,12 @@
% expressions.
% \end{function}
%
-% \begin{function}
+% \begin{function}[updated = 2019-01-22]
% {
% \coffin_join:NnnNnnnn, \coffin_join:cnnNnnnn,
-% \coffin_join:Nnncnnnn, \coffin_join:cnncnnnn
+% \coffin_join:Nnncnnnn, \coffin_join:cnncnnnn,
+% \coffin_gjoin:NnnNnnnn, \coffin_gjoin:cnnNnnnn,
+% \coffin_gjoin:Nnncnnnn, \coffin_gjoin:cnncnnnn
% }
% \begin{syntax}
% \cs{coffin_join:NnnNnnnn}
@@ -324,6 +356,13 @@
% code and so should only be used for short-term storage.
% \end{variable}
%
+% \begin{variable}[added = 2019-01-24]{\g_tmpa_coffin, \g_tmpb_coffin}
+% Scratch coffins for global assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -468,7 +507,7 @@
{
\cs_if_exist:NTF #1
{
- \cs_if_exist:cTF { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \cs_if_exist:cTF { coffin ~ \@@_to_value:N #1 ~ poles }
{ \prg_return_true: }
{ \prg_return_false: }
}
@@ -496,7 +535,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\coffin_clear:N, \coffin_clear:c}
+% \begin{macro}
+% {
+% \coffin_clear:N, \coffin_clear:c,
+% \coffin_gclear:N, \coffin_gclear:c
+% }
% Clearing coffins means emptying the box and resetting all of the
% structures.
% \begin{macrocode}
@@ -509,28 +552,33 @@
}
}
\cs_generate_variant:Nn \coffin_clear:N { c }
+\cs_new_protected:Npn \coffin_gclear:N #1
+ {
+ \@@_if_exist:NT #1
+ {
+ \box_gclear:N #1
+ \@@_greset_structure:N #1
+ }
+ }
+\cs_generate_variant:Nn \coffin_gclear:N { c }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\coffin_new:N, \coffin_new:c}
% Creating a new coffin means making the underlying box and adding the
-% data structures. These are created globally, as there is a need to
-% avoid any strange effects if the coffin is created inside a group.
-% This means that the usual rule about \cs[no-index]{l_\ldots}
-% variables has to be broken. The \cs{debug_suspend:} and
-% \cs{debug_resume:} functions prevent these checks. They also
-% prevent \cs{prop_clear_new:c} from writing useless information to
+% data structures. The \cs{debug_suspend:} and \cs{debug_resume:} functions
+% prevent \cs{prop_gclear_new:c} from writing useless information to
% the log file.
% \begin{macrocode}
\cs_new_protected:Npn \coffin_new:N #1
{
\box_new:N #1
\debug_suspend:
- \prop_clear_new:c { l_@@_corners_ \@@_to_value:N #1 _prop }
- \prop_clear_new:c { l_@@_poles_ \@@_to_value:N #1 _prop }
- \prop_gset_eq:cN { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_gclear_new:c { coffin ~ \@@_to_value:N #1 ~ corners }
+ \prop_gclear_new:c { coffin ~ \@@_to_value:N #1 ~ poles }
+ \prop_gset_eq:cN { coffin ~ \@@_to_value:N #1 ~ corners }
\c_@@_corners_prop
- \prop_gset_eq:cN { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_gset_eq:cN { coffin ~ \@@_to_value:N #1 ~ poles }
\c_@@_poles_prop
\debug_resume:
}
@@ -538,7 +586,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\hcoffin_set:Nn, \hcoffin_set:cn}
+% \begin{macro}
+% {
+% \hcoffin_set:Nn, \hcoffin_set:cn,
+% \hcoffin_gset:Nn, \hcoffin_gset:cn
+% }
% Horizontal coffins are relatively easy: set the appropriate box,
% reset the structures then update the handle positions.
% \begin{macrocode}
@@ -551,16 +603,32 @@
\color_ensure_current:
#2
}
- \@@_reset_structure:N #1
- \@@_update_poles:N #1
- \@@_update_corners:N #1
+ \@@_update:N #1
}
}
\cs_generate_variant:Nn \hcoffin_set:Nn { c }
+\cs_new_protected:Npn \hcoffin_gset:Nn #1#2
+ {
+ \@@_if_exist:NT #1
+ {
+ \hbox_gset:Nn #1
+ {
+ \color_ensure_current:
+ #2
+ }
+ \@@_gupdate:N #1
+ }
+ }
+\cs_generate_variant:Nn \hcoffin_gset:Nn { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\vcoffin_set:Nnn, \vcoffin_set:cnn}
+% \begin{macro}
+% {
+% \vcoffin_set:Nnn, \vcoffin_set:cnn,
+% \vcoffin_gset:Nnn, \vcoffin_gset:cnn
+% }
+% \begin{macro}{\@@_set_vertical:NnnNN}
% Setting vertical coffins is more complex. First, the material is
% typeset with a given width. The default handles and poles are set as
% for a horizontal coffin, before finding the top baseline using a
@@ -571,9 +639,21 @@
% \begin{macrocode}
\cs_new_protected:Npn \vcoffin_set:Nnn #1#2#3
{
+ \@@_set_vertical:NnnNN #1 {#2} {#3}
+ \vbox_set:Nn \@@_update:N
+ }
+\cs_generate_variant:Nn \vcoffin_set:Nnn { c }
+\cs_new_protected:Npn \vcoffin_gset:Nnn #1#2#3
+ {
+ \@@_set_vertical:NnnNN #1 {#2} {#3}
+ \vbox_gset:Nn \@@_gupdate:N
+ }
+\cs_generate_variant:Nn \vcoffin_gset:Nnn { c }
+\cs_new_protected:Npn \@@_set_vertical:NnnNN #1#2#3#4#5
+ {
\@@_if_exist:NT #1
{
- \vbox_set:Nn #1
+ #4 #1
{
\dim_set:Nn \tex_hsize:D {#2}
%<*package>
@@ -582,9 +662,7 @@
%</package>
#3
}
- \@@_reset_structure:N #1
- \@@_update_poles:N #1
- \@@_update_corners:N #1
+ #5 #1
\vbox_set_top:Nn \l_@@_internal_box { \vbox_unpack:N #1 }
\@@_set_pole:Nnx #1 { T }
{
@@ -599,12 +677,13 @@
\box_clear:N \l_@@_internal_box
}
}
-\cs_generate_variant:Nn \vcoffin_set:Nnn { c }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\hcoffin_set:Nw, \hcoffin_set:cw}
-% \begin{macro}{\hcoffin_set_end:}
+% \begin{macro}
+% {\hcoffin_set:Nw, \hcoffin_set:cw, \hcoffin_gset:Nw, \hcoffin_gset:cw}
+% \begin{macro}{\hcoffin_set_end:, \hcoffin_gset_end:}
% These are the \enquote{begin}/\enquote{end} versions of the above:
% watch the grouping!
% \begin{macrocode}
@@ -616,38 +695,64 @@
\cs_set_protected:Npn \hcoffin_set_end:
{
\hbox_set_end:
- \@@_reset_structure:N #1
- \@@_update_poles:N #1
- \@@_update_corners:N #1
+ \@@_update:N #1
}
}
}
-\cs_new_protected:Npn \hcoffin_set_end: { }
\cs_generate_variant:Nn \hcoffin_set:Nw { c }
+\cs_new_protected:Npn \hcoffin_gset:Nw #1
+ {
+ \@@_if_exist:NT #1
+ {
+ \hbox_gset:Nw #1 \color_ensure_current:
+ \cs_set_protected:Npn \hcoffin_gset_end:
+ {
+ \hbox_gset_end:
+ \@@_gupdate:N #1
+ }
+ }
+ }
+\cs_generate_variant:Nn \hcoffin_gset:Nw { c }
+\cs_new_protected:Npn \hcoffin_set_end: { }
+\cs_new_protected:Npn \hcoffin_gset_end: { }
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
-% \end{macro}\end{macro}
-%
-% \begin{macro}{\vcoffin_set:Nnw, \vcoffin_set:cnw}
-% \begin{macro}{\vcoffin_set_end:}
+% \begin{macro}
+% {\vcoffin_set:Nnw, \vcoffin_set:cnw, \vcoffin_gset:Nnw, \vcoffin_gset:cnw}
+% \begin{macro}{\@@_set_vertical:NnNNNNw}
+% \begin{macro}{\vcoffin_set_end:, \vcoffin_gset_end:}
% The same for vertical coffins.
% \begin{macrocode}
\cs_new_protected:Npn \vcoffin_set:Nnw #1#2
{
+ \@@_set_vertical:NnNNNNw #1 {#2} \vbox_set:Nw
+ \vcoffin_set_end:
+ \vbox_set_end: \@@_update:N
+ }
+\cs_generate_variant:Nn \vcoffin_set:Nnw { c }
+\cs_new_protected:Npn \vcoffin_gset:Nnw #1#2
+ {
+ \@@_set_vertical:NnNNNNw #1 {#2} \vbox_gset:Nw
+ \vcoffin_gset_end:
+ \vbox_gset_end: \@@_gupdate:N
+ }
+\cs_generate_variant:Nn \vcoffin_gset:Nnw { c }
+\cs_new_protected:Npn \@@_set_vertical:NnNNNNw #1#2#3#4#5#6
+ {
\@@_if_exist:NT #1
{
- \vbox_set:Nw #1
+ #3 #1
\dim_set:Nn \tex_hsize:D {#2}
%<*package>
\dim_set_eq:NN \linewidth \tex_hsize:D
\dim_set_eq:NN \columnwidth \tex_hsize:D
%</package>
- \cs_set_protected:Npn \vcoffin_set_end:
+ \cs_set_protected:Npn #4
{
- \vbox_set_end:
- \@@_reset_structure:N #1
- \@@_update_poles:N #1
- \@@_update_corners:N #1
+ #5
+ #6 #1
\vbox_set_top:Nn \l_@@_internal_box { \vbox_unpack:N #1 }
\@@_set_pole:Nnx #1 { T }
{
@@ -664,15 +769,16 @@
}
}
\cs_new_protected:Npn \vcoffin_set_end: { }
-\cs_generate_variant:Nn \vcoffin_set:Nnw { c }
+\cs_new_protected:Npn \vcoffin_gset_end: { }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
% \coffin_set_eq:NN, \coffin_set_eq:Nc,
-% \coffin_set_eq:cN, \coffin_set_eq:cc
+% \coffin_gset_eq:cN, \coffin_gset_eq:cc
% }
% Setting two coffins equal is just a wrapper around other functions.
% \begin{macrocode}
@@ -681,10 +787,25 @@
\@@_if_exist:NT #1
{
\box_set_eq:NN #1 #2
- \@@_set_eq_structure:NN #1 #2
+ \prop_set_eq:cc { coffin ~ \@@_to_value:N #1 ~ corners }
+ { coffin ~ \@@_to_value:N #2 ~ corners }
+ \prop_set_eq:cc { coffin ~ \@@_to_value:N #1 ~ poles }
+ { coffin ~ \@@_to_value:N #2 ~ poles }
}
}
\cs_generate_variant:Nn \coffin_set_eq:NN { c , Nc , cc }
+\cs_new_protected:Npn \coffin_gset_eq:NN #1#2
+ {
+ \@@_if_exist:NT #1
+ {
+ \box_gset_eq:NN #1 #2
+ \prop_gset_eq:cc { coffin ~ \@@_to_value:N #1 ~ corners }
+ { coffin ~ \@@_to_value:N #2 ~ corners }
+ \prop_gset_eq:cc { coffin ~ \@@_to_value:N #1 ~ poles }
+ { coffin ~ \@@_to_value:N #2 ~ poles }
+ }
+ }
+\cs_generate_variant:Nn \coffin_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
%
@@ -698,7 +819,6 @@
% yet.
% \begin{macrocode}
\coffin_new:N \c_empty_coffin
-\tex_setbox:D \c_empty_coffin = \tex_hbox:D { }
\coffin_new:N \l_@@_aligned_coffin
\coffin_new:N \l_@@_aligned_internal_coffin
% \end{macrocode}
@@ -706,11 +826,14 @@
% \end{variable}
% \end{variable}
%
-% \begin{variable}{\l_tmpa_coffin, \l_tmpb_coffin}
+% \begin{variable}
+% {\l_tmpa_coffin, \l_tmpb_coffin, \g_tmpa_coffin, \g_tmpb_coffin}
% The usual scratch space.
% \begin{macrocode}
\coffin_new:N \l_tmpa_coffin
\coffin_new:N \l_tmpb_coffin
+\coffin_new:N \g_tmpa_coffin
+\coffin_new:N \g_tmpb_coffin
% \end{macrocode}
% \end{variable}
%
@@ -742,7 +865,7 @@
\cs_new_protected:Npn \@@_get_pole:NnN #1#2#3
{
\prop_get:cnNF
- { l_@@_poles_ \@@_to_value:N #1 _prop } {#2} #3
+ { coffin ~ \@@_to_value:N #1 ~ poles } {#2} #3
{
\__kernel_msg_error:nnxx { kernel } { unknown-coffin-pole }
{ \exp_not:n {#2} } { \token_to_str:N #1 }
@@ -752,43 +875,38 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_reset_structure:N}
+% \begin{macro}{\@@_reset_structure:N, \@@_greset_structure:N}
% Resetting the structure is a simple copy job.
% \begin{macrocode}
\cs_new_protected:Npn \@@_reset_structure:N #1
{
- \prop_set_eq:cN { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_set_eq:cN { coffin ~ \@@_to_value:N #1 ~ corners }
\c_@@_corners_prop
- \prop_set_eq:cN { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_set_eq:cN { coffin ~ \@@_to_value:N #1 ~ poles }
\c_@@_poles_prop
}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_set_eq_structure:NN, \@@_gset_eq_structure:NN}
-% Setting coffin structures equal simply means copying the property
-% list.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_set_eq_structure:NN #1#2
+\cs_new_protected:Npn \@@_greset_structure:N #1
{
- \prop_set_eq:cc { l_@@_corners_ \@@_to_value:N #1 _prop }
- { l_@@_corners_ \@@_to_value:N #2 _prop }
- \prop_set_eq:cc { l_@@_poles_ \@@_to_value:N #1 _prop }
- { l_@@_poles_ \@@_to_value:N #2 _prop }
- }
-\cs_new_protected:Npn \@@_gset_eq_structure:NN #1#2
- {
- \prop_gset_eq:cc { l_@@_corners_ \@@_to_value:N #1 _prop }
- { l_@@_corners_ \@@_to_value:N #2 _prop }
- \prop_gset_eq:cc { l_@@_poles_ \@@_to_value:N #1 _prop }
- { l_@@_poles_ \@@_to_value:N #2 _prop }
+ \prop_gset_eq:cN { coffin ~ \@@_to_value:N #1 ~ corners }
+ \c_@@_corners_prop
+ \prop_gset_eq:cN { coffin ~ \@@_to_value:N #1 ~ poles }
+ \c_@@_poles_prop
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}
-% {\coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn}
-% \begin{macro}{\coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn}
+% {
+% \coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn,
+% \coffin_gset_horizontal_pole:Nnn, \coffin_gset_horizontal_pole:cnn
+% }
+% \begin{macro}{\@@_set_horizontal_pole:NnnN}
+% \begin{macro}
+% {
+% \coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn,
+% \coffin_gset_vertical_pole:Nnn, \coffin_gset_vertical_pole:cnn
+% }
+% \begin{macro}{\@@_set_vertical_pole:NnnN}
% \begin{macro}{\@@_set_pole:Nnn, \@@_set_pole:Nnx}
% Setting the pole of a coffin at the user/designer level requires a
% bit more care. The idea here is to provide a reasonable interface to
@@ -796,10 +914,17 @@
% three-argument version is used internally to do a direct setting.
% \begin{macrocode}
\cs_new_protected:Npn \coffin_set_horizontal_pole:Nnn #1#2#3
+ { \@@_set_horizontal_pole:NnnN #1 {#2} {#3} \prop_put:cnx }
+\cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c }
+\cs_new_protected:Npn \coffin_gset_horizontal_pole:Nnn #1#2#3
+ { \@@_set_horizontal_pole:NnnN #1 {#2} {#3} \prop_gput:cnx }
+\cs_generate_variant:Nn \coffin_gset_horizontal_pole:Nnn { c }
+\cs_new_protected:Npn \@@_set_horizontal_pole:NnnN #1#2#3#4
{
\@@_if_exist:NT #1
{
- \@@_set_pole:Nnx #1 {#2}
+ #4 { coffin ~ \@@_to_value:N #1 ~ poles }
+ {#2}
{
{ 0pt } { \dim_eval:n {#3} }
{ 1000pt } { 0pt }
@@ -807,10 +932,17 @@
}
}
\cs_new_protected:Npn \coffin_set_vertical_pole:Nnn #1#2#3
+ { \@@_set_vertical_pole:NnnN #1 {#2} {#3} \prop_put:cnx }
+\cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c }
+\cs_new_protected:Npn \coffin_gset_vertical_pole:Nnn #1#2#3
+ { \@@_set_vertical_pole:NnnN #1 {#2} {#3} \prop_gput:cnx }
+ \cs_generate_variant:Nn \coffin_gset_vertical_pole:Nnn { c }
+\cs_new_protected:Npn \@@_set_vertical_pole:NnnN #1#2#3#4
{
\@@_if_exist:NT #1
{
- \@@_set_pole:Nnx #1 {#2}
+ #4 { coffin ~ \@@_to_value:N #1 ~ poles }
+ {#2}
{
{ \dim_eval:n {#3} } { 0pt }
{ 0pt } { 1000pt }
@@ -819,47 +951,81 @@
}
\cs_new_protected:Npn \@@_set_pole:Nnn #1#2#3
{
- \prop_put:cnn { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_put:cnn { coffin ~ \@@_to_value:N #1 ~ poles }
{#2} {#3}
}
-\cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c }
-\cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c }
\cs_generate_variant:Nn \@@_set_pole:Nnn { Nnx }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_update:N, \@@_gupdate:N}
+% Simple shortcuts.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_update:N #1
+ {
+ \@@_reset_structure:N #1
+ \@@_update_corners:N #1
+ \@@_update_poles:N #1
+ }
+\cs_new_protected:Npn \@@_gupdate:N #1
+ {
+ \@@_greset_structure:N #1
+ \@@_gupdate_corners:N #1
+ \@@_gupdate_poles:N #1
+ }
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\@@_update_corners:N}
+% \begin{macro}{\@@_update_corners:N, \@@_gupdate_corners:N}
+% \begin{macro}{\@@_update_corners:NN}
+% \begin{macro}{\@@_update_corners:NNN}
% Updating the corners of a coffin is straight-forward as at this stage
% there can be no rotation. So the corners of the content are just those
% of the underlying \TeX{} box.
% \begin{macrocode}
\cs_new_protected:Npn \@@_update_corners:N #1
+ { \@@_update_corners:NN #1 \prop_put:Nnx }
+\cs_new_protected:Npn \@@_gupdate_corners:N #1
+ { \@@_update_corners:NN #1 \prop_gput:Nnx }
+\cs_new_protected:Npn \@@_update_corners:NN #1#2
+ {
+ \exp_args:Nc \@@_update_corners:NNN
+ { coffin ~ \@@_to_value:N #1 ~ corners }
+ #1 #2
+ }
+\cs_new_protected:Npn \@@_update_corners:NNN #1#2#3
{
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop }
+ #3 #1
{ tl }
- { { 0pt } { \dim_eval:n { \box_ht:N #1 } } }
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop }
+ { { 0pt } { \dim_eval:n { \box_ht:N #2 } } }
+ #3 #1
{ tr }
{
- { \dim_eval:n { \box_wd:N #1 } }
- { \dim_eval:n { \box_ht:N #1 } }
+ { \dim_eval:n { \box_wd:N #2 } }
+ { \dim_eval:n { \box_ht:N #2 } }
}
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop }
+ #3 #1
{ bl }
- { { 0pt } { \dim_eval:n { -\box_dp:N #1 } } }
- \prop_put:cnx { l_@@_corners_ \@@_to_value:N #1 _prop }
+ { { 0pt } { \dim_eval:n { -\box_dp:N #2 } } }
+ #3 #1
{ br }
{
- { \dim_eval:n { \box_wd:N #1 } }
- { \dim_eval:n { -\box_dp:N #1 } }
+ { \dim_eval:n { \box_wd:N #2 } }
+ { \dim_eval:n { -\box_dp:N #2 } }
}
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\@@_update_poles:N}
+% \begin{macro}{\@@_update_poles:N, \@@_gupdate_poles:N}
+% \begin{macro}{\@@_update_poles:NN}
+% \begin{macro}{\@@_update_poles:NNN}
% This function is called when a coffin is set, and updates the poles to
% reflect the nature of size of the box. Thus this function only alters
% poles where the default position is dependent on the size of the box.
@@ -867,41 +1033,53 @@
% coffins.
% \begin{macrocode}
\cs_new_protected:Npn \@@_update_poles:N #1
+ { \@@_update_poles:NN #1 \prop_put:Nnx }
+\cs_new_protected:Npn \@@_gupdate_poles:N #1
+ { \@@_update_poles:NN #1 \prop_gput:Nnx }
+\cs_new_protected:Npn \@@_update_poles:NN #1#2
+ {
+ \exp_args:Nc \@@_update_poles:NNN
+ { coffin ~ \@@_to_value:N #1 ~ poles }
+ #1 #2
+ }
+\cs_new_protected:Npn \@@_update_poles:NNN #1#2#3
{
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _prop } { hc }
+ #3 #1 { hc }
{
- { \dim_eval:n { 0.5 \box_wd:N #1 } }
+ { \dim_eval:n { 0.5 \box_wd:N #2 } }
{ 0pt } { 0pt } { 1000pt }
}
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _prop } { r }
+ #3 #1 { r }
{
- { \dim_eval:n { \box_wd:N #1 } }
+ { \dim_eval:n { \box_wd:N #2 } }
{ 0pt } { 0pt } { 1000pt }
}
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _prop } { vc }
+ #3 #1 { vc }
{
{ 0pt }
- { \dim_eval:n { ( \box_ht:N #1 - \box_dp:N #1 ) / 2 } }
+ { \dim_eval:n { ( \box_ht:N #2 - \box_dp:N #2 ) / 2 } }
{ 1000pt }
{ 0pt }
}
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _prop } { t }
+ #3 #1 { t }
{
{ 0pt }
- { \dim_eval:n { \box_ht:N #1 } }
+ { \dim_eval:n { \box_ht:N #2 } }
{ 1000pt }
{ 0pt }
}
- \prop_put:cnx { l_@@_poles_ \@@_to_value:N #1 _prop } { b }
+ #3 #1 { b }
{
{ 0pt }
- { \dim_eval:n { -\box_dp:N #1 } }
+ { \dim_eval:n { -\box_dp:N #2 } }
{ 1000pt }
{ 0pt }
}
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Coffins: calculation of pole intersections}
%
@@ -1107,8 +1285,11 @@
% \begin{macro}
% {
% \coffin_join:NnnNnnnn, \coffin_join:cnnNnnnn,
-% \coffin_join:Nnncnnnn , \coffin_join:cnncnnnn
+% \coffin_join:Nnncnnnn, \coffin_join:cnncnnnn,
+% \coffin_gjoin:NnnNnnnn, \coffin_gjoin:cnnNnnnn,
+% \coffin_gjoin:Nnncnnnn, \coffin_gjoin:cnncnnnn
% }
+% \begin{macro}{\@@_join:NnnNnnnnN}
% This command joins two coffins, using a horizontal and vertical pole
% from each coffin and making an offset between the two. The result
% is stored as the as a third coffin, which has all of its handles
@@ -1117,6 +1298,18 @@
% \begin{macrocode}
\cs_new_protected:Npn \coffin_join:NnnNnnnn #1#2#3#4#5#6#7#8
{
+ \@@_join:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8}
+ \coffin_set_eq:NN
+ }
+\cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc }
+\cs_new_protected:Npn \coffin_gjoin:NnnNnnnn #1#2#3#4#5#6#7#8
+ {
+ \@@_join:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8}
+ \coffin_gset_eq:NN
+ }
+\cs_generate_variant:Nn \coffin_gjoin:NnnNnnnn { c , Nnnc , cnnc }
+\cs_new_protected:Npn \@@_join:NnnNnnnnN #1#2#3#4#5#6#7#8#9
+ {
\@@_align:NnnNnnnnN
#1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_@@_aligned_coffin
% \end{macrocode}
@@ -1144,9 +1337,8 @@
\@@_reset_structure:N \l_@@_aligned_coffin
\prop_clear:c
{
- l_@@_corners_
- \@@_to_value:N \l_@@_aligned_coffin
- _prop
+ coffin ~ \@@_to_value:N \l_@@_aligned_coffin
+ \c_space_tl corners
}
\@@_update_poles:N \l_@@_aligned_coffin
% \end{macrocode}
@@ -1170,18 +1362,21 @@
{ \l_@@_offset_x_dim } { \l_@@_offset_y_dim }
}
\@@_update_vertical_poles:NNN #1 #4 \l_@@_aligned_coffin
- \coffin_set_eq:NN #1 \l_@@_aligned_coffin
+ #9 #1 \l_@@_aligned_coffin
}
-\cs_generate_variant:Nn \coffin_join:NnnNnnnn { c , Nnnc , cnnc }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
% \coffin_attach:NnnNnnnn, \coffin_attach:cnnNnnnn,
-% \coffin_attach:Nnncnnnn, \coffin_attach:cnncnnnn
+% \coffin_attach:Nnncnnnn, \coffin_attach:cnncnnnn,
+% \coffin_gattach:NnnNnnnn, \coffin_gattach:cnnNnnnn,
+% \coffin_gattach:Nnncnnnn, \coffin_gattach:cnncnnnn
% }
-% \begin{macro}{\coffin_attach_mark:NnnNnnnn}
+% \begin{macro}{\@@_attach:NnnNnnnnN}
+% \begin{macro}{\@@_attach_mark:NnnNnnnn}
% A more simple version of the above, as it simply uses the size of the
% first coffin for the new one. This means that the work here is rather
% simplified compared to the above code. The function used when marking
@@ -1190,6 +1385,18 @@
% \begin{macrocode}
\cs_new_protected:Npn \coffin_attach:NnnNnnnn #1#2#3#4#5#6#7#8
{
+ \@@_attach:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8}
+ \coffin_set_eq:NN
+ }
+\cs_generate_variant:Nn \coffin_attach:NnnNnnnn { c , Nnnc , cnnc }
+\cs_new_protected:Npn \coffin_gattach:NnnNnnnn #1#2#3#4#5#6#7#8
+ {
+ \@@_gattach:NnnNnnnnN #1 {#2} {#3} #4 {#5} {#6} {#7} {#8}
+ \coffin_gset_eq:NN
+ }
+\cs_generate_variant:Nn \coffin_gattach:NnnNnnnn { c , Nnnc , cnnc }
+\cs_new_protected:Npn \@@_attach:NnnNnnnnN #1#2#3#4#5#6#7#8#9
+ {
\@@_align:NnnNnnnnN
#1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_@@_aligned_coffin
\box_set_ht:Nn \l_@@_aligned_coffin { \box_ht:N #1 }
@@ -1198,10 +1405,10 @@
\@@_reset_structure:N \l_@@_aligned_coffin
\prop_set_eq:cc
{
- l_@@_corners_
- \@@_to_value:N \l_@@_aligned_coffin _prop
+ coffin ~ \@@_to_value:N \l_@@_aligned_coffin
+ \c_space_tl corners
}
- { l_@@_corners_ \@@_to_value:N #1 _prop }
+ { coffin ~ \@@_to_value:N #1 ~ corners }
\@@_update_poles:N \l_@@_aligned_coffin
\@@_offset_poles:Nnn #1 { 0pt } { 0pt }
\@@_offset_poles:Nnn #4
@@ -1209,7 +1416,7 @@
\@@_update_vertical_poles:NNN #1 #4 \l_@@_aligned_coffin
\coffin_set_eq:NN #1 \l_@@_aligned_coffin
}
-\cs_new_protected:Npn \coffin_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8
+\cs_new_protected:Npn \@@_attach_mark:NnnNnnnn #1#2#3#4#5#6#7#8
{
\@@_align:NnnNnnnnN
#1 {#2} {#3} #4 {#5} {#6} {#7} {#8} \l_@@_aligned_coffin
@@ -1218,10 +1425,10 @@
\box_set_wd:Nn \l_@@_aligned_coffin { \box_wd:N #1 }
\box_set_eq:NN #1 \l_@@_aligned_coffin
}
-\cs_generate_variant:Nn \coffin_attach:NnnNnnnn { c , Nnnc , cnnc }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_align:NnnNnnnnN}
% The internal function aligns the two coffins into a third one, but
@@ -1270,7 +1477,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_offset_poles:Nnn #1#2#3
{
- \prop_map_inline:cn { l_@@_poles_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:cn { coffin ~ \@@_to_value:N #1 ~ poles }
{ \@@_offset_pole:Nnnnnnn #1 {##1} ##2 {#2} {#3} }
}
\cs_new_protected:Npn \@@_offset_pole:Nnnnnnn #1#2#3#4#5#6#7#8
@@ -1299,15 +1506,15 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_offset_corners:Nnn #1#2#3
{
- \prop_map_inline:cn { l_@@_corners_ \@@_to_value:N #1 _prop }
+ \prop_map_inline:cn { coffin ~ \@@_to_value:N #1 ~ corners }
{ \@@_offset_corner:Nnnnn #1 {##1} ##2 {#2} {#3} }
}
\cs_new_protected:Npn \@@_offset_corner:Nnnnn #1#2#3#4#5#6
{
\prop_put:cnx
{
- l_@@_corners_
- \@@_to_value:N \l_@@_aligned_coffin _prop
+ coffin ~ \@@_to_value:N \l_@@_aligned_coffin
+ \c_space_tl corners
}
{ #1 - #2 }
{
@@ -1367,6 +1574,14 @@
% \end{macro}
% \end{macro}
%
+% \begin{variable}{\c_@@_empty_coffin}
+% An empty-but-horizontal coffin.
+% \begin{macrocode}
+\coffin_new:N \c_@@_empty_coffin
+\tex_setbox:D \c_@@_empty_coffin = \tex_hbox:D { }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\coffin_typeset:Nnnnn, \coffin_typeset:cnnnn}
% Typesetting a coffin means aligning it with the current position,
% which is done using a coffin with no content at all. As well as aligning to
@@ -1375,7 +1590,7 @@
\cs_new_protected:Npn \coffin_typeset:Nnnnn #1#2#3#4#5
{
\mode_leave_vertical:
- \@@_align:NnnNnnnnN \c_empty_coffin { H } { l }
+ \@@_align:NnnNnnnnN \c_@@_empty_coffin { H } { l }
#1 {#2} {#3} {#4} {#5} \l_@@_aligned_coffin
\box_use_drop:N \l_@@_aligned_coffin
}
@@ -1506,7 +1721,7 @@
\rule { 1pt } { 1pt }
%</package>
}
- \coffin_attach_mark:NnnNnnnn #1 {#2} {#3}
+ \@@_attach_mark:NnnNnnnn #1 {#2} {#3}
\l_@@_display_pole_coffin { hc } { vc } { 0pt } { 0pt }
\hcoffin_set:Nn \l_@@_display_coord_coffin
{
@@ -1527,7 +1742,7 @@
{ #3 #2 } \l_@@_internal_tl
\quark_if_no_value:NTF \l_@@_internal_tl
{
- \coffin_attach_mark:NnnNnnnn #1 {#2} {#3}
+ \@@_attach_mark:NnnNnnnn #1 {#2} {#3}
\l_@@_display_coord_coffin { l } { vc }
{ 1pt } { 0pt }
}
@@ -1543,7 +1758,7 @@
}
\cs_new_protected:Npn \@@_mark_handle_aux:nnnnNnn #1#2#3#4#5#6#7
{
- \coffin_attach_mark:NnnNnnnn #5 {#6} {#7}
+ \@@_attach_mark:NnnNnnnn #5 {#6} {#7}
\l_@@_display_coord_coffin {#1} {#2}
{ #3 \l_@@_display_offset_dim }
{ #4 \l_@@_display_offset_dim }
@@ -1576,7 +1791,7 @@
%</package>
}
\prop_set_eq:Nc \l_@@_display_poles_prop
- { l_@@_poles_ \@@_to_value:N #1 _prop }
+ { coffin ~ \@@_to_value:N #1 ~ poles }
\@@_get_pole:NnN #1 { H } \l_@@_pole_a_tl
\@@_get_pole:NnN #1 { T } \l_@@_pole_b_tl
\tl_if_eq:NNT \l_@@_pole_a_tl \l_@@_pole_b_tl
@@ -1720,7 +1935,7 @@
}
{
\prop_map_function:cN
- { l_@@_poles_ \@@_to_value:N #2 _prop }
+ { coffin ~ \@@_to_value:N #2 ~ poles }
\msg_show_item_unbraced:nn
}
{ }
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx
index 6611138e8ff..99cb6c24eec 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color-base.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3color-base.dtx Copyright (C) 2011,2012,2014,2016-2019 The LaTeX3 Project
+%% File: l3color-base.dtx
+%
+% Copyright (C) 2011,2012,2014,2016-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
index 0f0b345b67a..bfbdb25504c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3deprecation.dtx (C) Copyright 2017-2019 The LaTeX3 Project
+%% File: l3deprecation.dtx
+%
+% Copyright (C) 2017-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index d33b28c5860..38c0c4cd8d5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3doc.dtx Copyright (C) 1990-2019 The LaTeX3 project
+%% File: l3doc.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -77,7 +79,7 @@ and all files in that bundle must be distributed together.
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
% \maketitle
% \tableofcontents
%
@@ -2984,10 +2986,10 @@ and all files in that bundle must be distributed together.
{
\llap
{
- \hbox_unpack_clear:N \l_@@_macro_index_box
+ \hbox_unpack_drop:N \l_@@_macro_index_box
\vtop to \baselineskip
{
- \vbox_unpack_clear:N \l_@@_macro_box
+ \vbox_unpack_drop:N \l_@@_macro_box
\vss
}
}
@@ -3050,7 +3052,7 @@ and all files in that bundle must be distributed together.
\@@_if_macro_internal:nF {#1}
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} }
\hbox_set:Nw \l_@@_macro_index_box
- \hbox_unpack_clear:N \l_@@_macro_index_box
+ \hbox_unpack_drop:N \l_@@_macro_index_box
\int_gincr:N \c@CodelineNo
\@@_special_index:nn {#1} { main }
\int_gdecr:N \c@CodelineNo
@@ -3073,7 +3075,7 @@ and all files in that bundle must be distributed together.
{
\vbox_set:Nn \l_@@_macro_box
{
- \vbox_unpack_clear:N \l_@@_macro_box
+ \vbox_unpack_drop:N \l_@@_macro_box
\hbox { \llap { \@@_print_macroname:nN {#1} #2 \ } }
}
\int_incr:N \l_@@_macro_int
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index 4dffd5e6fcb..5db66040359 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -1,6 +1,8 @@
% \iffalse
%
-%% File l3dosctrip.dtx Copyright (C) 2012,2014-2019 The LaTeX3 Project
+%% File l3dosctrip.dtx
+%
+% Copyright (C) 2012,2014-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -61,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 41628e06ebb..fe7ad30190f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3drivers.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3drivers.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -554,23 +556,23 @@
%<*package>
\ProvidesExplFile
%<*dvipdfmx>
- {l3dvidpfmx.def}{2019-01-13}{}
+ {l3dvipdfmx.def}{2019-01-28}{}
{L3 Experimental driver: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3dvips.def}{2019-01-13}{}
+ {l3dvips.def}{2019-01-28}{}
{L3 Experimental driver: dvips}
%</dvips>
%<*dvisvgm>
- {l3dvisvgm.def}{2019-01-13}{}
+ {l3dvisvgm.def}{2019-01-28}{}
{L3 Experimental driver: dvisvgm}
%</dvisvgm>
%<*pdfmode>
- {l3pdfmode.def}{2019-01-13}{}
+ {l3pdfmode.def}{2019-01-28}{}
{L3 Experimental driver: PDF mode}
%</pdfmode>
%<*xdvipdfmx>
- {l3xdvidpfmx.def}{2019-01-13}{}
+ {l3xdvipdfmx.def}{2019-01-28}{}
{L3 Experimental driver: xdvipdfmx}
%</xdvipdfmx>
%</package>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index fce3c20242e..4204f1550cd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3expan.dtx Copyright (C) 1990-2019 The LaTeX3 project
+%% File: l3expan.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 75130a10858..1fc35e1cd1b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3file.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3file.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -42,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -590,6 +592,21 @@
% \cs{l_file_search_path_seq}.
% \end{function}
%
+% \begin{function}[added = 2019-01-16]{\file_get:nnN}
+% \begin{function}[TF, added = 2019-01-16]{\file_get:nnN}
+% \begin{syntax}
+% \cs{file_get:nnN} \Arg{filename} \Arg{setup} \meta{tl}
+% \cs{file_get:nnNTF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Defines \meta{tl} to the contents of \meta{filename}.
+% Category codes may need to be set appropriately via the \meta{setup}
+% argument.
+% While \cs{file_get:nnN} produces an error if the file is not found,
+% \cs{file_get:nnNTF} runs the \meta{true code} (after the assignment
+% to \meta{tl}) if the file is found and \meta{false code} otherwise.
+% \end{function}
+% \end{function}
+%
% \begin{function}[updated = 2017-06-26]
% {\file_get_full_name:nN, \file_get_full_name:VN}
% \begin{syntax}
@@ -2152,6 +2169,65 @@
% \end{macro}
% \end{macro}
%
+% \begin{variable}{\c_@@_marker_tl}
+% The same idea as the marker for rescanning token lists: this pair of
+% tokens cannot appear in a file that is being input.
+% \begin{macrocode}
+\tl_const:Nx \c_@@_marker_tl { : \token_to_str:N : }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[TF]{\file_get:nnN}
+% \begin{macro}{\file_get:nnN,\@@_get_aux:nnN,\@@_get_do:Nw}
+% The approach here is similar to that for \cs{tl_set_rescan:Nnn}.
+% The file contents are grabbed as an argument delimited by
+% \cs{c_@@_marker_tl}. A few subtleties: braces in \cs{if_false:}
+% \ldots{} \cs{fi:} to deal with possible alignment tabs,
+% \tn{tracingnesting} to avoid a warning about a group being closed
+% inside the \tn{scantokens}, and \cs{prg_return_true:} is placed
+% after the end-of-file marker.
+% \begin{macrocode}
+\cs_new_protected:Npn \file_get:nnN #1#2#3
+ {
+ \file_get:nnNF {#1} {#2} #3
+ { \__kernel_file_missing:n {#1} }
+ }
+\prg_new_protected_conditional:Npnn \file_get:nnN #1#2#3 { T , F , TF }
+ {
+ \file_get_full_name:nN {#1} \l_@@_full_name_str
+ \str_if_empty:NTF \l_@@_full_name_str
+ { \prg_return_false: }
+ {
+ \exp_args:NV \@@_get_aux:nnN
+ \l_@@_full_name_str
+ {#2} #3
+ \prg_return_true:
+ }
+ }
+\cs_new_protected:Npn \@@_get_aux:nnN #1#2#3
+ {
+ \if_false: { \fi:
+ \group_begin:
+ \int_set_eq:NN \tex_tracingnesting:D \c_zero_int
+ \exp_args:No \tex_everyeof:D { \c_@@_marker_tl }
+ #2 \scan_stop:
+ \exp_after:wN \@@_get_do:Nw
+ \exp_after:wN #3
+ \exp_after:wN \prg_do_nothing:
+ \tex_input:D #1 \scan_stop:
+ \if_false: } \fi:
+ }
+\exp_args:Nno \use:nn
+ { \cs_new_protected:Npn \@@_get_do:Nw #1#2 }
+ { \c_@@_marker_tl }
+ {
+ \group_end:
+ \tl_set:No #1 {#2}
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\file_get_full_name:nN, \file_get_full_name:VN}
% \begin{macro}{\@@_get_full_name_search:nN}
% The way to test if a file exists is to try to open it: if it does
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index dfdd9fa3d65..e4b3dde8316 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3final.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3final.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
index a927922da8e..92a45411152 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3flag.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3flag.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
index 7953e36624c..1af3587b031 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3format.ins
+++ b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
@@ -1,6 +1,8 @@
\iffalse meta-comment
-File l3format.ins Copyright (C) 2011,2012,2014-2018 The LaTeX3 Project
+File l3format.ins
+
+Copyright (C) 2011,2012,2014-2018 The LaTeX3 Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -33,7 +35,7 @@ license information is placed in the derived files.
\preamble
-Copyright (C) 1990-2018 The LaTeX3 Project
+Copyright (C) 1990-2019 The LaTeX3 Project
It may be distributed and/or modified under the conditions of
the LaTeX Project Public License (LPPL), either version 1.3c of
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index a215a574742..2c413701ff2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-assign.dtx Copyright (C) 2011-2019 The LaTeX3 project
+%% File: l3fp-assign.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
% \maketitle
%
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index 51440d490a9..f5ec47bbcf0 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-aux.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-aux.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index 56b66cc108a..03532ae67a4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-basics.dtx Copyright (C) 2011-2014,2016-2019 The LaTeX3 Project
+%% File: l3fp-basics.dtx
+%
+% Copyright (C) 2011-2014,2016-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index 78a2edd6dbd..02e606b3918 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-convert.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-convert.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index b1e0634f82b..a16a429fb15 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-expo.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-expo.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index 996574dcd6f..b34abc8ec6e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-extended.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-extended.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 86e20b1c863..becc0e704cf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-logic.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-logic.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index b6c51c5ba64..547cd0c73dc 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-parse.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-parse.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
index c352dce9ded..4ee82b86820 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-random.dtx Copyright (C) 2016-2019 The LaTeX3 Project
+%% File: l3fp-random.dtx
+%
+% Copyright (C) 2016-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index fcff6062512..1e70adf9a74 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-round.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-round.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index 18c72878f56..1d24bb9969a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-traps.dtx Copyright (C) 2011-2014,2016-2019 The LaTeX3 Project
+%% File: l3fp-traps.dtx
+%
+% Copyright (C) 2011-2014,2016-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
% \maketitle
%
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
index a174ea0369e..8f88bb22468 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp-trig.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp-trig.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -38,7 +40,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index add8932dab5..0790877d877 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fp.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3fp.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -47,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
index 702c67415c2..db31916ae19 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fparray.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3fparray.dtx Copyright (C) 2018-2019 The LaTeX3 Project
+%% File: l3fparray.dtx
+%
+% Copyright (C) 2018-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -42,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index cf431631a52..7814b278243 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3int.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3int.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
index ec1413b5f13..81c3ec6251e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3intarray.dtx Copyright (C) 2017-2019 The LaTeX3 Project
+%% File: l3intarray.dtx
+%
+% Copyright (C) 2017-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -42,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
index c5bf6831f8a..a2e12741b58 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3kernel-functions.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3kernel-functions.dtx Copyright (C) 2018-2019 The LaTeX3 project
+%% File: l3kernel-functions.dtx
+%
+% Copyright (C) 2018-2019 The LaTeX3 project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index 714981e3690..9fdcda9e6aa 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3keys.dtx Copyright (C) 2006-2019 The LaTeX3 Project
+%% File: l3keys.dtx
+%
+% Copyright (C) 2006-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 69b5259d2af..7c371f2e616 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3luatex.dtx Copyright (C) 2010-2019 The LaTeX3 Project
+%% File: l3luatex.dtx
+%
+% Copyright (C) 2010-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index 19e088591d0..fe4010b94aa 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3msg.dtx Copyright (C) 2009-2019 The LaTeX3 Project
+%% File: l3msg.dtx
+%
+% Copyright (C) 2009-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index cdb4b644cf4..6ea1dc27c8f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3names.dtx Copyright (C) 1990-2019 The LaTeX3 project
+%% File: l3names.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index cc8a354b139..c6135bc2728 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3prg.dtx Copyright (C) 2005-2019 The LaTeX3 Project
+%% File: l3prg.dtx
+%
+% Copyright (C) 2005-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -200,6 +202,19 @@
% the expansion of the conditional code. This includes other instances of either of these functions.
% \end{function}
%
+% \begin{function}[added = 2017-12-12]{\prg_generate_conditional_variant:Nnn}
+% \begin{syntax}
+% \cs{prg_generate_conditional_variant:Nnn} \cs[no-index]{\meta{name}:\meta{arg spec}} \Arg{variant argument specifiers} \Arg{condition specifiers}
+% \end{syntax}
+% Defines argument-specifier variants of conditionals. This is
+% equivalent to running \cs{cs_generate_variant:Nn} \meta{conditional}
+% \Arg{variant argument specifiers} on each \meta{conditional}
+% described by the \meta{condition specifiers}. These base-form
+% \meta{conditionals} are obtained from the \meta{name} and \meta{arg
+% spec} as described for \cs{prg_new_conditional:Npnn}, and they
+% should be defined.
+% \end{function}
+%
% \section{The boolean data type}
%
% This section describes a boolean data type which is closely
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index a838f63da53..86e901ddb51 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3prop.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3prop.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index 1e914178aeb..3e98198cce3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3quark.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3quark.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
index e0590775beb..b5d27a75f3d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3regex.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3regex.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index d3d84605e69..77fb5b94654 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3seq.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3seq.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index ba43b3423a1..31a92b553d9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -1,7 +1,9 @@
% \iffalse meta-comment
%
-%% File: l3skip.dtx Copyright (C) 2004-2011,2019 Frank Mittelbach, The LaTeX3 Project
-%% (C) 2012-2019 The LaTeX3 Project
+%% File: l3skip.dtx
+%
+% Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
+% (C) 2012-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -42,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
index 9eb3205101c..aa3d23116aa 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
@@ -1,6 +1,8 @@
% \iffalse
%
-%% File l3sort.dtx (C) Copyright 2012-2019 The LaTeX3 Project
+%% File l3sort.dtx
+%
+% Copyright (C) 2012-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index e880e334980..5d3cb07f29e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3str.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3str.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index f9186c2e376..ffd7594fc27 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3sys.dtx Copyright (C) 2015-2019 The LaTeX3 Project
+%% File: l3sys.dtx
+%
+% Copyright (C) 2015-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
index b02fa0654af..29c9ce4f67c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3tl-analysis.dtx Copyright (C) 2011-2019 The LaTeX3 Project
+%% File: l3tl-analysis.dtx
+%
+% Copyright (C) 2011-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -42,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index e8aee01c660..f10e5b74fdf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3tl.dtx Copyright (C) 1990-2019 The LaTeX3 Project
+%% File: l3tl.dtx
+%
+% Copyright (C) 1990-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -283,7 +285,7 @@
% supported, it is often preferable to find alternative approaches
% to achieving outcomes rather than rescanning tokens (for example
% construction of token lists token-by-token with intervening category
-% code changes).
+% code changes or using \cs{char_generate:nn}).
%
% \begin{function}[updated = 2015-08-11]
% {
@@ -1532,16 +1534,16 @@
% \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx
% }
% \begin{macro}{\tl_rescan:nn}
-% \begin{macro}{\@@_set_rescan:NNnn, \@@_set_rescan_multi:n}
-% \begin{macro}[EXP]{\@@_rescan:w}
-% These functions use a common auxiliary. After some initial setup
-% explained below, and the user setup |#3| (followed by
-% \cs{scan_stop:} to be safe), the tokens are rescanned by
-% \cs{@@_set_rescan:n} and stored into \cs{l_@@_internal_a_tl}, then
-% passed to |#1#2| outside the group after expansion. The auxiliary
-% \cs{@@_set_rescan:n} is defined later: in the simplest case, this
-% auxiliary calls \cs{@@_set_rescan_multi:n}, whose code is included
-% here to help understand the approach.
+% \begin{macro}{\@@_set_rescan:NNnn, \@@_set_rescan_multi:nNN}
+% \begin{macro}[EXP]{\@@_rescan:NNw}
+% In a group, after some initial setup explained below and the user
+% setup~|#3| (followed by \cs{scan_stop:} to be safe), there is a call
+% to \cs{@@_set_rescan:nNN}. This shared auxiliary distinguishes
+% single-line and multi-line files as explained below. In the
+% simplest case of multi-line files it calls (with the same arguments)
+% \cs{@@_set_rescan_multi:nNN}, whose code is included here to help
+% understand the approach: it rescans its argument |#1|, closes the
+% group, and performs the assignment.
%
% One difficulty when rescanning is that \tn{scantokens} treats the
% argument as a file, and without the correct settings a \TeX{} error
@@ -1549,60 +1551,64 @@
% \begin{verbatim}
% ! File ended while scanning definition of ...
% \end{verbatim}
-% The standard solution is to use an \texttt{x}-expanding assignment
-% and set \tn{everyeof} to \cs{exp_not:N} to suppress the error at
-% the end of the file. Since the rescanned tokens should not be
-% expanded, they are taken as a delimited argument of an
-% auxiliary which wraps them in \cs{exp_not:n} (in fact
-% \cs{exp_not:o}, as there is a \cs{prg_do_nothing:} to avoid losing
-% braces). The delimiter cannot appear within the rescanned token
-% list because it contains twice the same character, with different
-% catcodes.
-%
-% The difference between single-line and multiple-line files
-% complicates the story, as explained below.
+% A related minor issue is a warning due to opening a group before the
+% \tn{scantokens} and closing it inside that temporary file; we avoid
+% that by setting \tn{tracingnesting}. The standard solution to the
+% ``File ended'' error is to grab the rescanned tokens as a delimited
+% argument of an auxiliary, here \cs{@@_set_rescan:NNw}, that performs
+% the assignment, then let \TeX{} ``execute'' the end of file marker.
+% As usual in delimited arguments we use \cs{prg_do_nothing:} to avoid
+% stripping an outer set braces: this is removed by using
+% \texttt{o}-expanding assignments. The delimiter cannot appear
+% within the rescanned token list because it contains twice the same
+% character, with different catcodes.
+%
+% For \cs{tl_rescan:nn} we cannot simply call \cs{@@_set_rescan:NNnn}
+% \cs{prg_do_nothing:} \cs{use:n} because that would leave the
+% end-of-file marker \emph{after} the result of rescanning. If that
+% rescanned result is code that looks further in the input stream for
+% arguments, it would break.
+%
+% The two \cs{if_false:} \ldots{} \cs{fi:} are there to prevent
+% alignment tabs to cause a change of tabular cell while rescanning.
% \begin{macrocode}
\cs_new_protected:Npn \tl_set_rescan:Nnn
- { \@@_set_rescan:NNnn \tl_set:Nn }
+ { \@@_set_rescan:NNnn \tl_set:No }
\cs_new_protected:Npn \tl_gset_rescan:Nnn
- { \@@_set_rescan:NNnn \tl_gset:Nn }
-\cs_new_protected:Npn \tl_rescan:nn
- { \@@_set_rescan:NNnn \prg_do_nothing: \use:n }
+ { \@@_set_rescan:NNnn \tl_gset:No }
+\cs_new_protected:Npn \tl_rescan:nn #1#2
+ {
+ \tl_set_rescan:Nnn \l_@@_internal_a_tl {#1} {#2}
+ \exp_after:wN \tl_clear:N \exp_after:wN \l_@@_internal_a_tl
+ \l_@@_internal_a_tl
+ }
\cs_new_protected:Npn \@@_set_rescan:NNnn #1#2#3#4
{
- \tl_if_empty:nTF {#4}
- {
- \group_begin:
- #3
- \group_end:
- #1 #2 { }
- }
- {
- \group_begin:
- \exp_args:No \tex_everyeof:D
- { \c_@@_rescan_marker_tl \exp_not:N }
- \int_compare:nNnT \tex_endlinechar:D = { 32 }
- { \int_set:Nn \tex_endlinechar:D { -1 } }
- \tex_newlinechar:D \tex_endlinechar:D
- #3 \scan_stop:
- \exp_args:No \@@_set_rescan:n { \tl_to_str:n {#4} }
- \exp_args:NNNo
- \group_end:
- #1 #2 \l_@@_internal_a_tl
- }
+ \if_false: { \fi:
+ \group_begin:
+ \int_set_eq:NN \tex_tracingnesting:D \c_zero_int
+ \exp_args:No \tex_everyeof:D { \c_@@_rescan_marker_tl }
+ \int_compare:nNnT \tex_endlinechar:D = { 32 }
+ { \int_set:Nn \tex_endlinechar:D { -1 } }
+ \int_set_eq:NN \tex_newlinechar:D \tex_endlinechar:D
+ #3 \scan_stop:
+ \exp_args:No \@@_set_rescan:nNN { \tl_to_str:n {#4} } #1 #2
+ \if_false: } \fi:
}
-\cs_new_protected:Npn \@@_set_rescan_multi:n #1
+\cs_new_protected:Npn \@@_set_rescan_multi:nNN #1#2#3
{
- \tl_set:Nx \l_@@_internal_a_tl
- {
- \exp_after:wN \@@_rescan:w
- \exp_after:wN \prg_do_nothing:
- \tex_scantokens:D {#1}
- }
+ \exp_after:wN \@@_rescan:NNw
+ \exp_after:wN #2
+ \exp_after:wN #3
+ \exp_after:wN \prg_do_nothing:
+ \tex_scantokens:D {#1}
}
\exp_args:Nno \use:nn
- { \cs_new:Npn \@@_rescan:w #1 } \c_@@_rescan_marker_tl
- { \exp_not:o {#1} }
+ { \cs_new:Npn \@@_rescan:NNw #1#2#3 } \c_@@_rescan_marker_tl
+ {
+ \group_end:
+ #1 #2 {#3}
+ }
\cs_generate_variant:Nn \tl_set_rescan:Nnn { Nno , Nnx }
\cs_generate_variant:Nn \tl_set_rescan:Nnn { c , cno , cnx }
\cs_generate_variant:Nn \tl_gset_rescan:Nnn { Nno , Nnx }
@@ -1614,10 +1620,10 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_set_rescan:n, \@@_set_rescan:NnTF}
-% \begin{macro}{\@@_set_rescan_single:nn, \@@_set_rescan_single_aux:nn}
-% This function calls \cs{@@_set_rescan_multiple:n} or
-% \cs{@@_set_rescan_single:nn} |{ ' }| depending on whether its
+% \begin{macro}{\@@_set_rescan:nNN}
+% \begin{macro}{\@@_set_rescan_single:nnNN, \@@_set_rescan_single_aux:nnNN}
+% This function calls \cs{@@_set_rescan_multi:nNN} or
+% \cs{@@_set_rescan_single:nnNN} |{ ' }| depending on whether its
% argument is a single-line fragment of code/data or is made of
% multiple lines by testing for the presence of a \tn{newlinechar}
% character. If \tn{newlinechar} is out of range, the argument is
@@ -1639,12 +1645,11 @@
%
% For a single line, no \tn{endlinechar} should be added, so it is
% set to $-1$, and spaces should not be removed.
-%
% Trailing spaces and tabs are a difficult matter, as \TeX{} removes
% these at a very low level. The only way to preserve them is to
% rescan not the argument but the argument followed by a character
-% with a reasonable category code. Here, $11$ (letter), $12$ (other)
-% and $13$ (active) are accepted, as these are suitable for
+% with a reasonable category code. Here, $11$ (letter) and $12$ (other)
+% are accepted, as these are convenient, suitable for
% delimiting an argument, and it is very unlikely that none of the
% ASCII characters are in one of these categories. To avoid
% selecting one particular character to put at the end, whose
@@ -1654,86 +1659,59 @@
% range of characters whose standard category is letter or other,
% thus minimizing the number of steps needed by the loop (most often
% just a single one). Once a valid character is found, run some code
-% very similar to \cs{@@_set_rescan_multi:n}, except that
-% \cs{@@_rescan:w} must be redefined to also remove the additional
-% character (with the appropriate catcode). Getting the delimiter
-% with the right catcode requires using \tn{scantokens} inside an
-% \texttt{x}-expansion, hence using the previous definition of
-% \cs{@@_rescan:w} as well. The odd \cs{exp_not:N} \cs{use:n}
-% ensures that the trailing \cs{exp_not:N} in \tn{everyeof} does
-% not prevent the expansion of \cs{c_@@_rescan_marker_tl}, but
-% rather of a closing brace (this does nothing).
-% If no valid character is found, similar code is ran,
-% and the only difference is that trailing spaces are not preserved
-% (bear in mind that this only happens if no character between $39$
-% and $127$ has catcode letter, other or active).
-%
-% There is also some work to preserve leading spaces: test whether
-% the first character (given by \cs{str_head:n}, with an extra space
-% to circumvent a limitation of \texttt{f}-expansion) has catcode
-% $10$ and add what \TeX{} would add in the middle of a line for any
-% sequence of such characters: a single space with catcode $10$ and
-% character code $32$.
+% very similar to \cs{@@_set_rescan_multi:nNN} but with that character
+% put at the start and end. The auxiliary \cs{@@_rescan:NNw} must be
+% redefined to also remove the additional character (with the
+% appropriate catcode thanks to \cs{char_generate:nn}). If no valid
+% character is found (very rare), fall-back on
+% \cs{@@_set_rescan_multi:nNN}.
% \begin{macrocode}
-\group_begin:
- \tex_catcode:D `\^^@ = 12 \scan_stop:
- \cs_new_protected:Npn \@@_set_rescan:n #1
- {
- \int_compare:nNnTF \tex_newlinechar:D < 0
- { \use_ii:nn }
- {
- \char_set_lccode:nn { 0 } { \tex_newlinechar:D }
- \tex_lowercase:D { \@@_set_rescan:NnTF ^^@ } {#1}
- }
- { \@@_set_rescan_multi:n }
- { \@@_set_rescan_single:nn { ' } }
- {#1}
- }
- \cs_new_protected:Npn \@@_set_rescan:NnTF #1#2
- { \tl_if_in:nnTF {#2} {#1} }
- \cs_new_protected:Npn \@@_set_rescan_single:nn #1
- {
- \int_compare:nNnTF
- { \char_value_catcode:n { `#1 } / 3 } = 4
- { \@@_set_rescan_single_aux:nn {#1} }
- {
- \int_compare:nNnTF { `#1 } < { `\~ }
- {
- \char_set_lccode:nn { 0 } { `#1 + 1 }
- \tex_lowercase:D { \@@_set_rescan_single:nn { ^^@ } }
- }
- { \@@_set_rescan_single_aux:nn { } }
- }
- }
- \cs_new_protected:Npn \@@_set_rescan_single_aux:nn #1#2
- {
- \int_set:Nn \tex_endlinechar:D { -1 }
- \use:x
- {
- \exp_not:N \use:n
- {
- \exp_not:n { \cs_set:Npn \@@_rescan:w ##1 }
- \exp_after:wN \@@_rescan:w
- \exp_after:wN \prg_do_nothing:
- \tex_scantokens:D {#1}
- }
- \c_@@_rescan_marker_tl
- }
- { \exp_not:o {##1} }
- \tl_set:Nx \l_@@_internal_a_tl
+\cs_new_protected:Npn \@@_set_rescan:nNN #1
+ {
+ \int_compare:nNnTF \tex_newlinechar:D < 0
+ { \use_ii:nn }
+ {
+ \exp_args:Nnf \tl_if_in:nnTF {#1}
+ { \char_generate:nn { \tex_newlinechar:D } { 12 } }
+ }
+ { \@@_set_rescan_multi:nNN }
{
- \int_compare:nNnT
- {
- \char_value_catcode:n
- { \exp_last_unbraced:Nf ` { \str_head:n {#2} } ~ }
- }
- = { 10 } { ~ }
- \exp_after:wN \@@_rescan:w
- \exp_after:wN \prg_do_nothing:
- \tex_scantokens:D { #2 #1 }
+ \int_set:Nn \tex_endlinechar:D { -1 }
+ \@@_set_rescan_single:nnNN { `' }
}
- }
-\group_end:
+ {#1}
+ }
+\cs_new_protected:Npn \@@_set_rescan_single:nnNN #1
+ {
+ \int_compare:nNnTF
+ { \char_value_catcode:n {#1} / 2 } = 6
+ {
+ \exp_args:Nf \@@_set_rescan_single_aux:nnNN
+ { \char_generate:nn {#1} { \char_value_catcode:n {#1} } }
+ }
+ {
+ \int_compare:nNnTF {#1} < { `\~ }
+ {
+ \exp_args:Nf \@@_set_rescan_single:nnNN
+ { \int_eval:n { #1 + 1 } }
+ }
+ { \@@_set_rescan_multi:nNN }
+ }
+ }
+\cs_new_protected:Npn \@@_set_rescan_single_aux:nnNN #1#2#3#4
+ {
+ \exp_args:Nno \use:nn
+ { \cs_set:Npn \@@_rescan:NNw ##1##2##3 #1 }
+ \c_@@_rescan_marker_tl
+ {
+ \group_end:
+ ##1 ##2 { \use_none:n ##3 }
+ }
+ \exp_after:wN \@@_rescan:NNw
+ \exp_after:wN #3
+ \exp_after:wN #4
+ \tex_scantokens:D { #1 #2 #1 }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index d94b08dc5a4..3725929968d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3token.dtx Copyright (C) 2005-2019 The LaTeX3 Project
+%% File: l3token.dtx
+%
+% Copyright (C) 2005-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%
@@ -121,7 +123,7 @@
% be an active character.
% \end{function}
%
-% \begin{function}[EXP, added = 2015-09-09, updated = 2018-04-19]
+% \begin{function}[EXP, added = 2015-09-09, updated = 2019-01-16]
% {\char_generate:nn}
% \begin{syntax}
% \cs{char_generate:nn} \Arg{charcode} \Arg{catcode}
@@ -144,6 +146,9 @@
% and other values raise an error. The \meta{charcode} may be any one valid
% for the engine in use.
% Active characters cannot be generated in older versions of \XeTeX{}.
+% \begin{texnote}
+% Exactly two expansions are needed to produce the character.
+% \end{texnote}
% \end{function}
%
% \begin{variable}[added = 2011-09-05]{\c_catcode_other_space_tl}
@@ -1415,7 +1420,9 @@
% Engine-dependent definitions are now needed for the implementation. For
% \LuaTeX{} and \XeTeX{} there is engine-level support.
% They can do cases that macro emulation can't. All of those are filtered
-% out here using a primitive-based boolean expression for speed.
+% out here using a primitive-based boolean expression to avoid fixing
+% the category code of the null character used in the false branch
+% (for 8-bit engines).
% The final level is the basic definition at the engine level: the arguments
% here are integers so there is no need to worry about them too much.
% Older versions of \XeTeX{} cannot generate active characters so we filter
@@ -1465,7 +1472,7 @@
}
\else:
% \end{macrocode}
-% For engines where \tn{Ucharcat} isn't available (or emulated) then we have
+% For engines where \tn{Ucharcat} isn't available or emulated, we have
% to work in macros, and cover only the $8$-bit range. The first stage is
% to build up a |tl| containing |^^@| with each category code that can
% be accessed in this way, with an error set up for the other cases. This
@@ -1483,21 +1490,8 @@
\tl_set:Nx \l_@@_tmp_tl { \l_@@_tmp_tl }
\char_set_catcode_math_toggle:n { 0 }
\tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ }
-% \end{macrocode}
-% As \TeX{} is very unhappy if if finds an alignment character inside
-% a primitive \tn{halign} even when skipping false branches, some precautions
-% are required. \TeX{} is happy if the token is hidden inside
-% \tn{unexpanded} (which needs to be the primitive). The expansion chain here
-% is required so that the conditional gets cleaned up correctly (other code
-% assumes there is exactly one token to skip during the clean-up).
-% \begin{macrocode}
\char_set_catcode_alignment:n { 0 }
- \tl_put_right:Nn \l_@@_tmp_tl
- {
- \or:
- \__kernel_exp_not:w \exp_after:wN
- { \exp_after:wN ^^@ \exp_after:wN }
- }
+ \tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ }
\tl_put_right:Nn \l_@@_tmp_tl { \or: }
\char_set_catcode_parameter:n { 0 }
\tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ }
@@ -1550,15 +1544,23 @@
%<*initex>
\int_step_function:nnN { 0 } { 255 } \@@_tmp:n
%</initex>
+% \end{macrocode}
+% As \TeX{} is very unhappy if if finds an alignment character inside
+% a primitive \tn{halign} even when skipping false branches, some
+% precautions are required. \TeX{} is happy if the token is hidden
+% between braces within \cs{if_false:} \dots{} \cs{fi:}.
+% \begin{macrocode}
\cs_new:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
{
#3
+ \if_false: { \fi:
\exp_after:wN \exp_after:wN
\exp_after:wN \exp_end:
\exp_after:wN \exp_after:wN
\if_case:w #2
\exp_last_unbraced:Nv \exp_stop_f:
{ c_@@_ \@@_int_to_roman:w #1 _tl }
+ \or: }
\fi:
}
\fi:
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
index bb483438469..e7f145d469b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode.dtx
@@ -1,6 +1,8 @@
% \iffalse meta-comment
%
-%% File: l3unicode.dtx Copyright (C) 2018-2019 The LaTeX3 Project
+%% File: l3unicode.dtx
+%
+% Copyright (C) 2018-2019 The LaTeX3 Project
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -41,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-13}
+% \date{Released 2019-01-28}
%
% \maketitle
%