summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx32
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx30
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx27
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3color.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3doc.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx825
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx64
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx38
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3final.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3flag.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx7
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx37
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx14
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3regex.dtx44
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx42
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx20
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sort.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3str.dtx36
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3sys.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx55
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx2
-rw-r--r--Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx8
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx35
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx8
60 files changed, 744 insertions, 706 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
index ddc962cb6fc..ed2ae18ad5d 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-convert.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -252,7 +252,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3str-convert}{2017/12/05}{}
+\ProvidesExplPackage{l3str-convert}{2017/12/16}{}
{L3 Experimental string encoding conversions}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
index 19803a88d63..75413e2def3 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -163,7 +163,7 @@
%
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{l3str-format}{2017/12/05}{}
+\ProvidesExplPackage{l3str-format}{2017/12/16}{}
{L3 Experimental string formatting}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
index 0165c9d0aa5..9e1e0141cc5 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
@@ -54,7 +54,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -673,7 +673,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xcoffins}{2017/12/05}{}
+\ProvidesExplPackage{xcoffins}{2017/12/16}{}
{L3 Experimental design level coffins}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
index dea566a0c17..b114d9f7f8d 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx
@@ -24,8 +24,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2017/12/05]
-%<package>\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+%<package>\@ifpackagelater{expl3}{2017/12/16}
%<package> {}
%<package> {%
%<package> \PackageError{l3galley}{Support package l3kernel too old}
@@ -59,7 +59,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -685,7 +685,7 @@
%
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{l3galley}{2017/12/05}{}
+\ProvidesExplPackage{l3galley}{2017/12/16}{}
{L3 Experimental galley code}
%</package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx
index b8b07b405b5..5e6ff4615ea 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/xgalley.dtx
@@ -45,7 +45,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -732,7 +732,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xgalley}{2017/12/05}{}
+\ProvidesExplPackage{xgalley}{2017/12/16}{}
{L3 Experimental galley}
\RequirePackage{xparse,xtemplate,l3galley}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 14e40ea9520..21436da3cfb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -21,7 +21,7 @@
% for those people who are interested.
%
%<*driver|generic|package>
-\def\ExplFileDate{2017/12/05}%
+\def\ExplFileDate{2017/12/16}%
%</driver|generic|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
index 1c408f8decc..6079cba8274 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3alloc.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index 120abdb963c..cff05458c4d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 6e43a24ef40..e6262cbd3e8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -138,7 +138,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index 4120bdc39b0..fcba0ecaa6f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -637,7 +637,7 @@
% 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:Nnn}
+% {\box_autosize_to_wd_and_ht:Nnn, \box_autosize_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}
@@ -656,7 +656,7 @@
% \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:Nnn}
+% {\box_autosize_to_wd_and_ht_plus_dp:Nnn, \box_autosize_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}
@@ -1051,14 +1051,10 @@
{ \if_hbox:N #1 \prg_return_true: \else: \prg_return_false: \fi: }
\prg_new_conditional:Npnn \box_if_vertical:N #1 { p , T , F , TF }
{ \if_vbox:N #1 \prg_return_true: \else: \prg_return_false: \fi: }
-\cs_generate_variant:Nn \box_if_horizontal_p:N { c }
-\cs_generate_variant:Nn \box_if_horizontal:NT { c }
-\cs_generate_variant:Nn \box_if_horizontal:NF { c }
-\cs_generate_variant:Nn \box_if_horizontal:NTF { c }
-\cs_generate_variant:Nn \box_if_vertical_p:N { c }
-\cs_generate_variant:Nn \box_if_vertical:NT { c }
-\cs_generate_variant:Nn \box_if_vertical:NF { c }
-\cs_generate_variant:Nn \box_if_vertical:NTF { c }
+\prg_generate_conditional_variant:Nnn \box_if_horizontal:N
+ { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nnn \box_if_vertical:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1069,10 +1065,8 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \box_if_empty:N #1 { p , T , F , TF }
{ \if_box_empty:N #1 \prg_return_true: \else: \prg_return_false: \fi: }
-\cs_generate_variant:Nn \box_if_empty_p:N { c }
-\cs_generate_variant:Nn \box_if_empty:NT { c }
-\cs_generate_variant:Nn \box_if_empty:NF { c }
-\cs_generate_variant:Nn \box_if_empty:NTF { c }
+\prg_generate_conditional_variant:Nnn \box_if_empty:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1680,7 +1674,7 @@
\tex_kern:D -\l_@@_left_new_dim
\hbox:n
{
- \__driver_box_use_rotate:Nn
+ \driver_box_use_rotate:Nn
\l_@@_internal_box
\l_@@_angle_fp
}
@@ -1980,8 +1974,8 @@
% {
% \box_autosize_to_wd_and_ht:Nnn ,
% \box_autosize_to_wd_and_ht:cnn ,
-% \box_autosize_to_wd_and_ht_plus_dp:cnn ,
-% \box_autosize_to_wd_and_ht_plus_dp:Nnn
+% \box_autosize_to_wd_and_ht_plus_dp:Nnn ,
+% \box_autosize_to_wd_and_ht_plus_dp:cnn
% }
% \begin{macro}{\@@_autosize:Nnnn}
% Although autosizing a box uses dimensions, it has more in common in
@@ -2018,7 +2012,7 @@
{
\hbox_set:Nn \l_@@_internal_box
{
- \__driver_box_use_scale:Nnn
+ \driver_box_use_scale:Nnn
#1
\l_@@_scale_x_fp
\l_@@_scale_y_fp
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index 00137d96bed..e7539a4bec2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -240,6 +240,21 @@
% respectively. The two scale factors should be given as real numbers.
% \end{function}
%
+% \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}
+%
% \section{Additions to \pkg{l3file}}
%
% \begin{function}[added = 2017-07-11]{\file_get_mdfive_hash:nN}
@@ -1125,13 +1140,13 @@
%<@@=box>
% \end{macrocode}
%
-% \subsection{Viewing part of a box}
+% \subsubsection{Viewing part of a box}
%
% \begin{macro}{\box_clip:N, \box_clip: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 } }
+ { \hbox_set:Nn #1 { \driver_box_use_clip:N #1 } }
\cs_generate_variant:Nn \box_clip:N { c }
% \end{macrocode}
% \end{macro}
@@ -1295,7 +1310,7 @@
%<@@=coffin>
% \end{macrocode}
%
-% \subsection{Rotating coffins}
+% \subsubsection{Rotating coffins}
%
% \begin{variable}{\l_@@_sin_fp}
% \begin{variable}{\l_@@_cos_fp}
@@ -1590,7 +1605,7 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Resizing coffins}
+% \subsubsection{Resizing coffins}
%
% \begin{variable}{\l_@@_scale_x_fp}
% \begin{variable}{\l_@@_scale_y_fp}
@@ -2226,8 +2241,7 @@
#1 {#3} {#6}
\@@_mapthread_function:Nnnwnn #1 #4 \q_stop
}
-\cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc }
-\cs_generate_variant:Nn \seq_mapthread_function:NNN { c , cc }
+\cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc , c , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2418,7 +2432,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, pTF]{\sys_if_shell_unrestricted:}
+% \begin{macro}[EXP, pTF]{\sys_if_shell_restricted:}
% Performs a check for whether \emph{restricted} shell escape is
% enabled. This returns false if unrestricted shell escape is
% enabled. Unrestricted shell escape is not considered a superset
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index d7a063b7aae..f0ee5ad54b5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -1155,9 +1155,7 @@
\prg_return_true:
\fi:
}
-\cs_generate_variant:Nn \clist_get:NNT { c }
-\cs_generate_variant:Nn \clist_get:NNF { c }
-\cs_generate_variant:Nn \clist_get:NNTF { c }
+\prg_generate_conditional_variant:Nnn \clist_get:NN { c } { T , F , TF }
\prg_new_protected_conditional:Npnn \clist_pop:NN #1#2 { T , F , TF }
{ \@@_pop_TF:NNN \tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \clist_gpop:NN #1#2 { T , F , TF }
@@ -1171,12 +1169,8 @@
\prg_return_true:
\fi:
}
-\cs_generate_variant:Nn \clist_pop:NNT { c }
-\cs_generate_variant:Nn \clist_pop:NNF { c }
-\cs_generate_variant:Nn \clist_pop:NNTF { c }
-\cs_generate_variant:Nn \clist_gpop:NNT { c }
-\cs_generate_variant:Nn \clist_gpop:NNF { c }
-\cs_generate_variant:Nn \clist_gpop:NNTF { c }
+\prg_generate_conditional_variant:Nnn \clist_pop:NN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \clist_gpop:NN { c } { T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1452,15 +1446,10 @@
{ \@@_tmp:w ,#1, {} {} ,#2, }
{ \prg_return_false: } { \prg_return_true: }
}
-\cs_generate_variant:Nn \clist_if_in:NnT { NV , No }
-\cs_generate_variant:Nn \clist_if_in:NnT { c , cV , co }
-\cs_generate_variant:Nn \clist_if_in:NnF { NV , No }
-\cs_generate_variant:Nn \clist_if_in:NnF { c , cV , co }
-\cs_generate_variant:Nn \clist_if_in:NnTF { NV , No }
-\cs_generate_variant:Nn \clist_if_in:NnTF { c , cV , co }
-\cs_generate_variant:Nn \clist_if_in:nnT { nV , no }
-\cs_generate_variant:Nn \clist_if_in:nnF { nV , no }
-\cs_generate_variant:Nn \clist_if_in:nnTF { nV , no }
+\prg_generate_conditional_variant:Nnn \clist_if_in:Nn
+ { NV , No , c , cV , co } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \clist_if_in:nn
+ { nV , no } { T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 824d6d13d88..3f45836f0d6 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -464,10 +464,8 @@
}
{ \prg_return_false: }
}
-\cs_generate_variant:Nn \coffin_if_exist_p:N { c }
-\cs_generate_variant:Nn \coffin_if_exist:NT { c }
-\cs_generate_variant:Nn \coffin_if_exist:NF { c }
-\cs_generate_variant:Nn \coffin_if_exist:NTF { c }
+\prg_generate_conditional_variant:Nnn \coffin_if_exist:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
index 675558805c3..9ed12f0f551 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3color.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
index 410aa76dc98..c4bfa10758a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3deprecation.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
index 280cb751886..7f600a15642 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx
@@ -70,14 +70,14 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2017/12/05}{}
+\ProvidesExplClass{l3doc}{2017/12/16}{}
{L3 Experimental documentation class}
%</class>
% \fi
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
% \maketitle
% \tableofcontents
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
index b29d4acf100..d11bd14e7f9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 9d442e2fe77..5ccd56959c7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -45,7 +45,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -69,56 +69,59 @@
% \item \texttt{xdvipdfmx}: The driver used by \XeTeX{}.
% \end{itemize}
%
-% The code here is all very low-level, and should not in general be used
-% outside of the kernel. It is also important to note that many of the
-% functions here are closely tied to the immediate level \enquote{up},
-% and they must be used in the correct contexts.
+% This module provides code closely tied to the exact driver in use: broadly,
+% the functions here are implemented entirely independently for each case.
+% As such, they often rely on higher-level code to provide necessary but
+% shared operations. For example, in box rotation and scaling the functions
+% here do no correct the final size of the box: this will always be required
+% and thus is handled in the \pkg{box} module.
+%
+% Several of the operations here are low-level, and so may be used only in
+% restricted contexts. Some also require understanding of PostScript/PDF
+% concepts to be used corrected as they take \enquote{raw} arguments, similar
+% in format to those used by the underlying driver.
+%
+% The functions in this module should be regarded as experimental with
+% the following exceptions:
+% \begin{itemize}
+% \item \dots
+% \end{itemize}
%
% \section{Box clipping}
%
-% \begin{function}[added = 2011-11-11]{\__driver_box_use_clip:N}
+% \begin{function}[added = 2017-12-13]{\driver_box_use_clip:N}
% \begin{syntax}
-% \cs{__driver_box_use_clip:N} \meta{box}
+% \cs{driver_box_use_clip:N} \meta{box}
% \end{syntax}
% Inserts the content of the \meta{box} at the current insertion point
% such that any material outside of the bounding box is not displayed
% by the driver. The material in the \meta{box} is still placed in the
% output stream: the clipping takes place at a driver level.
-%
-% This function should only be used within a surrounding horizontal
-% box construct.
% \end{function}
%
% \section{Box rotation and scaling}
%
-% \begin{function}[added = 2016-05-12]{\__driver_box_use_rotate:Nn}
+% \begin{function}[added = 2017-12-13]{\driver_box_use_rotate:Nn}
% \begin{syntax}
-% \cs{__driver_box_use_rotate:Nn} \meta{box} \Arg{angle}
+% \cs{driver_box_use_rotate:Nn} \meta{box} \Arg{angle}
% \end{syntax}
% Inserts the content of the \meta{box} at the current insertion point
% rotated by the \meta{angle} (expressed in degrees). The material is
-% inserted with no apparent height or width, and is rotated such the
-% the \TeX{} reference point of the box is the center of rotation and
-% remains the reference point after rotation. It is the responsibility of
-% the code using this function to adjust the apparent size of the box to
-% be correct at the \TeX{} side.
-%
-% This function should only be used within a surrounding horizontal
-% box construct.
+% rotated such the the \TeX{} reference point of the box is the center of
+% rotation and remains the reference point after rotation. It is the
+% responsibility of the code using this function to adjust the apparent
+% size of the inserted material.
% \end{function}
%
-% \begin{function}[added = 2016-05-12]{\__driver_box_use_scale:Nnn}
+% \begin{function}[added = 2017-12-13]{\driver_box_use_scale:Nnn}
% \begin{syntax}
-% \cs{__driver_box_use_scale:Nnn} \meta{box} \Arg{x-scale} \Arg{y-scale}
+% \cs{driver_box_use_scale:Nnn} \meta{box} \Arg{x-scale} \Arg{y-scale}
% \end{syntax}
% Inserts the content of the \meta{box} at the current insertion point
-% scale by the \meta{x-scale} and \meta{y-scale}. The material is
-% inserted with no apparent height or width. It is the responsibility of
-% the code using this function to adjust the apparent size of the box to
-% be correct at the \TeX{} side.
-%
-% This function should only be used within a surrounding horizontal
-% box construct.
+% scale by the \meta{x-scale} and \meta{y-scale}. The reference point
+% of the material will be unchanged. It is the responsibility of the
+% code using this function to adjust the apparent size of the inserted
+% material.
% \end{function}
%
% \section{Color support}
@@ -158,11 +161,11 @@
% graphic creation.
%
% \begin{function}
-% { \__driver_draw_begin:, \__driver_draw_end:}
+% {\driver_draw_begin:, \driver_draw_end:}
% \begin{syntax}
-% \cs{__driver_draw_begin:}
+% \cs{driver_draw_begin:}
% \meta{content}
-% \cs{__driver_draw_end:}
+% \cs{driver_draw_end:}
% \end{syntax}
% Defines a drawing environment. This is a scope for the purposes of
% the graphics state. Depending on the driver, other set up may or may not
@@ -173,11 +176,11 @@
% \end{function}
%
% \begin{function}
-% {\__driver_draw_scope_begin:, \__driver_draw_scope_end:}
+% {\driver_draw_scope_begin:, \driver_draw_scope_end:}
% \begin{syntax}
-% \cs{__driver_draw_scope_begin:}
+% \cs{driver_draw_scope_begin:}
% \meta{content}
-% \cs{__driver_draw_scope_end:}
+% \cs{driver_draw_scope_end:}
% \end{syntax}
% Defines a scope for drawing settings and so on. Changes to the graphic
% state and concepts such as color or linewidth are localised to a scope.
@@ -189,17 +192,17 @@
%
% \subsection{Path construction}
%
-% \begin{function}{\__driver_draw_moveto:nn}
+% \begin{function}{\driver_draw_moveto:nn}
% \begin{syntax}
-% \cs{__driver_draw_move:nn} \Arg{x} \Arg{y}
+% \cs{driver_draw_move:nn} \Arg{x} \Arg{y}
% \end{syntax}
% Moves the current drawing reference point to (\meta{x}, \meta{y});
% any active transformation matrix applies.
% \end{function}
%
-% \begin{function}{\__driver_draw_lineto:nn}
+% \begin{function}{\driver_draw_lineto:nn}
% \begin{syntax}
-% \cs{__driver_draw_lineto:nn} \Arg{x} \Arg{y}
+% \cs{driver_draw_lineto:nn} \Arg{x} \Arg{y}
% \end{syntax}
% Adds a path from the current drawing reference point to
% (\meta{x}, \meta{y}); any active transformation matrix applies. Note
@@ -207,9 +210,9 @@
% the path may be discarded or used as a clip without appearing itself.
% \end{function}
%
-% \begin{function}{\__driver_draw_curveto:nnnnnn}
+% \begin{function}{\driver_draw_curveto:nnnnnn}
% \begin{syntax}
-% \cs{__driver_draw_curveto:nnnnnn} \Arg{x_1} \Arg{y_1}
+% \cs{driver_draw_curveto:nnnnnn} \Arg{x_1} \Arg{y_1}
% \Arg{x_2} \Arg{y_2} \Arg{x_3} \Arg{y_3}
% \end{syntax}
% Adds a Bezier curve path from the current drawing reference point to
@@ -220,9 +223,9 @@
% without appearing itself.
% \end{function}
%
-% \begin{function}{\__driver_draw_rectangle:nnnn}
+% \begin{function}{\driver_draw_rectangle:nnnn}
% \begin{syntax}
-% \cs{__driver_draw_rectangle:nnnn} \Arg{x} \Arg{y} \Arg{width} \Arg{height}
+% \cs{driver_draw_rectangle:nnnn} \Arg{x} \Arg{y} \Arg{width} \Arg{height}
% \end{syntax}
% Adds rectangular path from (\meta{x_1}, \meta{y_1}) of \meta{height}
% and \meta{width}; any active transformation matrix applies. Note that
@@ -230,9 +233,9 @@
% path may be discarded or used as a clip without appearing itself.
% \end{function}
%
-% \begin{function}{\__driver_draw_closepath:}
+% \begin{function}{\driver_draw_closepath:}
% \begin{syntax}
-% \cs{__driver_draw_closepath:}
+% \cs{driver_draw_closepath:}
% \end{syntax}
% Closes an existing path, adding a line from the current point to the
% start of path. Note that nothing is drawn until a fill or stroke
@@ -242,13 +245,13 @@
%
% \subsection{Stroking and filling}
%
-% \begin{function}{\__driver_draw_stroke:, \__driver_draw_closestroke:}
+% \begin{function}{\driver_draw_stroke:, \driver_draw_closestroke:}
% \begin{syntax}
% \meta{path construction}
-% \cs{__driver_draw_stroke:}
+% \cs{driver_draw_stroke:}
% \end{syntax}
% Draws a line along the current path, which is also closed by
-% \cs{__driver_draw_closestroke:}. The nature of the line drawn
+% \cs{driver_draw_closestroke:}. The nature of the line drawn
% is influenced by settings for
% \begin{itemize}
% \item Line thickness
@@ -261,14 +264,14 @@
% The path may also be used for clipping.
% \end{function}
%
-% \begin{function}{\__driver_draw_fill:, \__driver_draw_fillstroke:}
+% \begin{function}{\driver_draw_fill:, \driver_draw_fillstroke:}
% \begin{syntax}
% \meta{path construction}
-% \cs{__driver_draw_fill:}
+% \cs{driver_draw_fill:}
% \end{syntax}
% Fills the area surrounded by the current path: this will be closed prior
% to filling if it is not already. The \texttt{fillstroke} version also
-% strokes the path as described for \cs{__driver_draw_stroke:}. The fill is
+% strokes the path as described for \cs{driver_draw_stroke:}. The fill is
% influenced by the setting for fill color (or the current color if no
% specific stroke color is set). The path may also be used for clipping.
% For paths which are self-intersecting or comprising multiple parts, the
@@ -276,9 +279,9 @@
% winding number rule unless the even-odd rule is active.
% \end{function}
%
-% \begin{function}{\__driver_draw_nonzero_rule:, \__driver_draw_evenodd_rule:}
+% \begin{function}{\driver_draw_nonzero_rule:, \driver_draw_evenodd_rule:}
% \begin{syntax}
-% \cs{__driver_draw_nonzero_rule:}
+% \cs{driver_draw_nonzero_rule:}
% \end{syntax}
% Active either the non-zero winding number or the even-odd rule,
% respectively, for determining what is inside a fill or clip area.
@@ -286,10 +289,10 @@
% and apply on an ongoing basis.
% \end{function}
%
-% \begin{function}{\__driver_draw_clip:}
+% \begin{function}{\driver_draw_clip:}
% \begin{syntax}
% \meta{path construction}
-% \cs{__driver_draw_clip:}
+% \cs{driver_draw_clip:}
% \end{syntax}
% Indicates that the current path should be used for clipping, such that
% any subsequent material outside of the path (but within the current
@@ -299,10 +302,10 @@
% path as shown.
% \end{function}
%
-% \begin{function}{\__driver_draw_discardpath:}
+% \begin{function}{\driver_draw_discardpath:}
% \begin{syntax}
% \meta{path construction}
-% \cs{__driver_draw_discardpath:}
+% \cs{driver_draw_discardpath:}
% \end{syntax}
% Discards the current path without stroking or filling. This is primarily
% useful for paths constructed purely for clipping, as this alone does not
@@ -311,16 +314,16 @@
%
% \subsection{Stroke options}
%
-% \begin{function}{\__driver_draw_linewidth:n}
+% \begin{function}{\driver_draw_linewidth:n}
% \begin{syntax}
-% \cs{__driver_draw_linewidth:n} \Arg{dimexpr}
+% \cs{driver_draw_linewidth:n} \Arg{dimexpr}
% \end{syntax}
% Sets the width to be used for stroking to \meta{dimexpr}.
% \end{function}
%
-% \begin{function}{\__driver_draw_dash:nn}
+% \begin{function}{\driver_draw_cap_dash:nn}
% \begin{syntax}
-% \cs{__driver_draw_dash:nn} \Arg{dash pattern} \Arg{phase}
+% \cs{driver_draw_dash:nn} \Arg{dash pattern} \Arg{phase}
% \end{syntax}
% Sets the pattern of dashing to be used when stroking a line. The
% \meta{dash pattern} should be a comma-separated list of dimension
@@ -340,12 +343,12 @@
%
% \begin{function}
% {
-% \__driver_draw_cap_butt: ,
-% \__driver_draw_cap_rectangle: ,
-% \__driver_draw_cap_round:
+% \driver_draw_cap_butt: ,
+% \driver_draw_cap_rectangle: ,
+% \driver_draw_cap_round:
% }
% \begin{syntax}
-% \cs{__driver_draw_cap_butt:}
+% \cs{driver_draw_cap_butt:}
% \end{syntax}
% Sets the style of terminal stroke position to one of butt, rectangle or
% round.
@@ -353,19 +356,19 @@
%
% \begin{function}
% {
-% \__driver_draw_join_bevel: ,
-% \__driver_draw_join_miter: ,
-% \__driver_draw_join_round:
+% \driver_draw_join_bevel: ,
+% \driver_draw_join_miter: ,
+% \driver_draw_join_round:
% }
% \begin{syntax}
-% \cs{__driver_draw_cap_butt:}
+% \cs{driver_draw_cap_butt:}
% \end{syntax}
% Sets the style of stroke joins to one of bevel, miter or round.
% \end{function}
%
-% \begin{function}{\__driver_draw_miterlimit:n}
+% \begin{function}{\driver_draw_miterlimit:n}
% \begin{syntax}
-% \cs{__driver_draw_miterlimit:n} \Arg{dimexpr}
+% \cs{driver_draw_miterlimit:n} \Arg{dimexpr}
% \end{syntax}
% Sets the miter limit of lines joined as a miter, as described in the
% PDF and PostScript manuals.
@@ -375,12 +378,12 @@
%
% \begin{function}
% {
-% \__driver_draw_color_cmyk:nnnn ,
-% \__driver_draw_color_cmyk_fill:nnnn ,
-% \__driver_draw_color_cmyk_stroke:nnnn
+% \driver_draw_color_cmyk:nnnn ,
+% \driver_draw_fill_cmyk:nnnn ,
+% \driver_draw_stroke_cmyk:nnnn
% }
% \begin{syntax}
-% \cs{__driver_draw_color_cmyk:nnnn} \Arg{cyan} \Arg{magneta} \Arg{yellow}
+% \cs{driver_draw_color_cmyk:nnnn} \Arg{cyan} \Arg{magneta} \Arg{yellow}
% \Arg{black}
% \end{syntax}
% Sets the color for drawing to the CMYK values specified, all of which are
@@ -392,12 +395,12 @@
%
% \begin{function}
% {
-% \__driver_draw_color_gray:n ,
-% \__driver_draw_color_gray_fill:n ,
-% \__driver_draw_color_gray_stroke:n
+% \driver_draw_color_gray:n ,
+% \driver_draw_fill_gray:n ,
+% \driver_draw_stroke_gray:n
% }
% \begin{syntax}
-% \cs{__driver_draw_color_gray:n} \Arg{gray}
+% \cs{driver_draw_color_gray:n} \Arg{gray}
% \end{syntax}
% Sets the color for drawing to the grayscale value specified, which is
% fp expressions which should evaluate to between $0$ and $1$. The
@@ -408,12 +411,12 @@
%
% \begin{function}
% {
-% \__driver_draw_color_rgb:nnn ,
-% \__driver_draw_color_rgb_fill:nnn ,
-% \__driver_draw_color_rgb_stroke:nnn
+% \driver_draw_color_rgb:nnn ,
+% \driver_draw_fill_rgb:nnn ,
+% \driver_draw_stroke_rgb:nnn
% }
% \begin{syntax}
-% \cs{__driver_draw_color_rgb:nnn} \Arg{red} \Arg{green} \Arg{blue}
+% \cs{driver_draw_color_rgb:nnn} \Arg{red} \Arg{green} \Arg{blue}
% \end{syntax}
% Sets the color for drawing to the RGB values specified, all of which are
% fp expressions which should evaluate to between $0$ and $1$. The
@@ -424,9 +427,9 @@
%
% \subsection{Inserting \TeX{} material}
%
-% \begin{function}{\__driver_draw_hbox:Nnnnnnn}
+% \begin{function}{\driver_draw_hbox:Nnnnnnn}
% \begin{syntax}
-% \cs{__driver_draw_hbox:Nnnnnnn} \meta{box}
+% \cs{driver_draw_hbox:Nnnnnnn} \meta{box}
% \Arg{a} \Arg{b} \Arg{c} \Arg{d} \Arg{x} \Arg{y}
% \end{syntax}
% Inserts the \meta{box} as an hbox with the box reference point placed
@@ -440,9 +443,9 @@
%
% \subsection{Coordinate system transformations}
%
-% \begin{function}{\__driver_draw_transformcm:nnnnnn}
+% \begin{function}{\driver_draw_transformcm:nnnnnn}
% \begin{syntax}
-% \cs{__driver_draw_transformcm:nnnnnn} \Arg{a} \Arg{b} \Arg{c} \Arg{d}
+% \cs{driver_draw_transformcm:nnnnnn} \Arg{a} \Arg{b} \Arg{c} \Arg{d}
% \Arg{x} \Arg{y}
% \end{syntax}
% Applies the transformation matrix $[a b c d]$ and offset vector
@@ -776,12 +779,12 @@
%
% \subsubsection{Box operations}
%
-% \begin{macro}{\@@_box_use_clip:N}
+% \begin{macro}{\driver_box_use_clip:N}
% Much the same idea as for the PDF mode version but with a slightly
% different syntax for creating the clip path. To avoid any scaling
% issues we need the absolute length auxiliary here.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_clip:N #1
+\cs_new_protected:Npn \driver_box_use_clip:N #1
{
\@@_scope_begin:
\@@_literal:n
@@ -802,12 +805,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_rotate:Nn}
+% \begin{macro}{\driver_box_use_rotate:Nn}
% Rotating using \texttt{dvips} does not require that the box dimensions
% are altered and has a very convenient built-in operation. Zero rotation
% must be written as |0| not |-0| so there is a quick test.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_rotate:Nn #1#2
+\cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2
{
\@@_scope_begin:
\@@_literal:n
@@ -823,11 +826,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_scale:Nnn}
+% \begin{macro}{\driver_box_use_scale:Nnn}
% The \texttt{dvips} driver once again has a dedicated operation we can
% use here.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_scale:Nnn #1#2#3
+\cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3
{
\@@_scope_begin:
\@@_literal:n
@@ -847,7 +850,7 @@
% \begin{macro}{\@@_image_getbb_eps:n}
% Simply use the generic function.
% \begin{macrocode}
-\cs_new_eq:NN \@@_image_getbb_eps:n \__image_read_bb:n
+\cs_new_eq:NN \@@_image_getbb_eps:n \image_read_bb:n
% \end{macrocode}
% \end{macro}
%
@@ -875,7 +878,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_begin:, \@@_draw_end:}
+% \begin{macro}{\driver_draw_begin:, \driver_draw_end:}
% The |ps::[begin]| special here deals with positioning but allows us to
% continue on to a matching |ps::[end]|: contrast with |ps:|, which positions
% but where we can't split material between separate calls. The
@@ -883,14 +886,14 @@
% scale and $y$-axis direction. The reference point at the start of the box
% is saved (as |l3x|/|l3y|) as it is needed when inserting various items.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_begin:
+\cs_new_protected:Npn \driver_draw_begin:
{
\tex_special:D { ps::[begin] }
\tex_special:D { ps::~save }
\tex_special:D { ps::~/l3x~currentpoint~/l3y~exch~def~def }
\tex_special:D { ps::~@beginspecial }
}
-\cs_new_protected:Npn \@@_draw_end:
+\cs_new_protected:Npn \driver_draw_end:
{
\tex_special:D { ps::~@endspecial }
\tex_special:D { ps::~restore }
@@ -899,20 +902,20 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_scope_begin:, \@@_draw_scope_end:}
+% \begin{macro}{\driver_draw_scope_begin:, \driver_draw_scope_end:}
% Scope here may need to contain saved definitions, so the entire memory
% rather than just the graphic state has to be sent to the stack.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_scope_begin:
+\cs_new_protected:Npn \driver_draw_scope_begin:
{ \@@_draw_literal:n { save } }
-\cs_new_protected:Npn \@@_draw_scope_end:
+\cs_new_protected:Npn \driver_draw_scope_end:
{ \@@_draw_literal:n { restore } }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
-% \begin{macro}{\@@_draw_rectangle:nnnn}
-% \begin{macro}{\@@_draw_curveto:nnnnnn}
+% \begin{macro}{\driver_draw_moveto:nn, \driver_draw_lineto:nn}
+% \begin{macro}{\driver_draw_rectangle:nnnn}
+% \begin{macro}{\driver_draw_curveto:nnnnnn}
% Path creation operations mainly resolve directly to PostScript primitive
% steps, with only the need to convert to \texttt{bp}. Notice that
% \texttt{x}-type expansion is included here to ensure that any variable
@@ -920,17 +923,17 @@
% no native rectangular path command (without also clipping, filling or
% stroking), so that task is done using a small amount of PostScript.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_moveto:nn #1#2
+\cs_new_protected:Npn \driver_draw_moveto:nn #1#2
{
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ moveto }
}
-\cs_new_protected:Npn \@@_draw_lineto:nn #1#2
+\cs_new_protected:Npn \driver_draw_lineto:nn #1#2
{
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ lineto }
}
-\cs_new_protected:Npn \@@_draw_rectangle:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_rectangle:nnnn #1#2#3#4
{
\@@_draw_literal:x
{
@@ -939,7 +942,7 @@
moveto~dup~0~rlineto~exch~0~exch~rlineto~neg~0~rlineto~closepath
}
}
-\cs_new_protected:Npn \@@_draw_curveto:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \driver_draw_curveto:nnnnnn #1#2#3#4#5#6
{
\@@_draw_literal:x
{
@@ -954,13 +957,13 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
+% \begin{macro}{\driver_draw_evenodd_rule:, \driver_draw_nonzero_rule:}
% \begin{variable}{\g_@@_draw_eor_bool}
% The even-odd rule here can be implemented as a simply switch.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_evenodd_rule:
+\cs_new_protected:Npn \driver_draw_evenodd_rule:
{ \bool_gset_true:N \g_@@_draw_eor_bool }
-\cs_new_protected:Npn \@@_draw_nonzero_rule:
+\cs_new_protected:Npn \driver_draw_nonzero_rule:
{ \bool_gset_false:N \g_@@_draw_eor_bool }
\bool_new:N \g_@@_draw_eor_bool
% \end{macrocode}
@@ -969,13 +972,13 @@
%
% \begin{macro}
% {
-% \@@_draw_closepath: ,
-% \@@_draw_stroke: ,
-% \@@_draw_closestroke: ,
-% \@@_draw_fill: ,
-% \@@_draw_fillstroke: ,
-% \@@_draw_clip: ,
-% \@@_draw_discardpath:
+% \driver_draw_closepath: ,
+% \driver_draw_stroke: ,
+% \driver_draw_closestroke: ,
+% \driver_draw_fill: ,
+% \driver_draw_fillstroke: ,
+% \driver_draw_clip: ,
+% \driver_draw_discardpath:
% }
% \begin{variable}{\g_@@_draw_clip_bool}
% Unlike PDF, PostScript doesn't track separate colors for strokes and other
@@ -988,9 +991,9 @@
% using a \TeX{} switch. All of the operations end with a new path instruction
% as they do not terminate (again in contrast to PDF).
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_closepath:
+\cs_new_protected:Npn \driver_draw_closepath:
{ \@@_draw_literal:n { closepath } }
-\cs_new_protected:Npn \@@_draw_stroke:
+\cs_new_protected:Npn \driver_draw_stroke:
{
\@@_draw_literal:n { currentdict~/l3sc~known~{gsave~l3sc}~if }
\@@_draw_literal:n { stroke }
@@ -1006,12 +1009,12 @@
\@@_draw_literal:n { newpath }
\bool_gset_false:N \g_@@_draw_clip_bool
}
-\cs_new_protected:Npn \@@_draw_closestroke:
+\cs_new_protected:Npn \driver_draw_closestroke:
{
- \@@_draw_closepath:
- \@@_draw_stroke:
+ \driver_draw_closepath:
+ \driver_draw_stroke:
}
-\cs_new_protected:Npn \@@_draw_fill:
+\cs_new_protected:Npn \driver_draw_fill:
{
\@@_draw_literal:n { currentdict~/l3fc~known~{gsave~l3fc}~if }
\@@_draw_literal:x
@@ -1031,7 +1034,7 @@
\@@_draw_literal:n { newpath }
\bool_gset_false:N \g_@@_draw_clip_bool
}
-\cs_new_protected:Npn \@@_draw_fillstroke:
+\cs_new_protected:Npn \driver_draw_fillstroke:
{
\@@_draw_literal:n { currentdict~/l3fc~known~{gsave~l3fc}~if }
\@@_draw_literal:x
@@ -1054,10 +1057,10 @@
\@@_draw_literal:n { newpath }
\bool_gset_false:N \g_@@_draw_clip_bool
}
-\cs_new_protected:Npn \@@_draw_clip:
+\cs_new_protected:Npn \driver_draw_clip:
{ \bool_gset_true:N \g_@@_draw_clip_bool }
\bool_new:N \g_@@_draw_clip_bool
-\cs_new_protected:Npn \@@_draw_discardpath:
+\cs_new_protected:Npn \driver_draw_discardpath:
{
\bool_if:NT \g_@@_draw_clip_bool
{
@@ -1074,19 +1077,19 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}{\@@_draw_dash:nn}
+% \begin{macro}{\driver_draw_cap_dash:nn}
% \begin{macro}{\@@_draw_dash:n}
-% \begin{macro}{\@@_draw_linewidth:n}
-% \begin{macro}{\@@_draw_miterlimit:n}
+% \begin{macro}{\driver_draw_linewidth:n}
+% \begin{macro}{\driver_draw_miterlimit:n}
% \begin{macro}
% {
-% \@@_draw_cap_butt:, \@@_draw_cap_round:, \@@_draw_cap_rectangle:,
-% \@@_draw_join_miter:, \@@_draw_join_round:, \@@_draw_join_bevel:
+% \driver_draw_cap_butt:, \driver_draw_cap_round:, \driver_draw_cap_rectangle:,
+% \driver_draw_join_miter:, \driver_draw_join_round:, \driver_draw_join_bevel:
% }
% Converting paths to output is again a case of mapping directly to
% PostScript operations.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_dash:nn #1#2
+\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2
{
\@@_draw_literal:x
{
@@ -1098,24 +1101,24 @@
}
\cs_new:Npn \@@_draw_dash:n #1
{ \dim_to_decimal_in_bp:n {#1} ~ }
-\cs_new_protected:Npn \@@_draw_linewidth:n #1
+\cs_new_protected:Npn \driver_draw_linewidth:n #1
{
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ setlinewidth }
}
-\cs_new_protected:Npn \@@_draw_miterlimit:n #1
+\cs_new_protected:Npn \driver_draw_miterlimit:n #1
{ \@@_draw_literal:x { \fp_eval:n {#1} ~ setmiterlimit } }
-\cs_new_protected:Npn \@@_draw_cap_butt:
+\cs_new_protected:Npn \driver_draw_cap_butt:
{ \@@_draw_literal:n { 0 ~ setlinecap } }
-\cs_new_protected:Npn \@@_draw_cap_round:
+\cs_new_protected:Npn \driver_draw_cap_round:
{ \@@_draw_literal:n { 1 ~ setlinecap } }
-\cs_new_protected:Npn \@@_draw_cap_rectangle:
+\cs_new_protected:Npn \driver_draw_cap_rectangle:
{ \@@_draw_literal:n { 2 ~ setlinecap } }
-\cs_new_protected:Npn \@@_draw_join_miter:
+\cs_new_protected:Npn \driver_draw_join_miter:
{ \@@_draw_literal:n { 0 ~ setlinejoin } }
-\cs_new_protected:Npn \@@_draw_join_round:
+\cs_new_protected:Npn \driver_draw_join_round:
{ \@@_draw_literal:n { 1 ~ setlinejoin } }
-\cs_new_protected:Npn \@@_draw_join_bevel:
+\cs_new_protected:Npn \driver_draw_join_bevel:
{ \@@_draw_literal:n { 2 ~ setlinejoin } }
% \end{macrocode}
% \end{macro}
@@ -1127,21 +1130,21 @@
% \begin{macro}{\_@@_draw_color_reset:}
% \begin{macro}
% {
-% \@@_draw_color_cmyk:nnnn ,
-% \@@_draw_color_cmyk_fill:nnnn ,
-% \@@_draw_color_cmyk_stroke:nnnn
+% \driver_draw_color_cmyk:nnnn ,
+% \driver_draw_fill_cmyk:nnnn ,
+% \driver_draw_stroke_cmyk:nnnn
% }
% \begin{macro}
% {
-% \@@_draw_color_gray:n ,
-% \@@_draw_color_gray_fill:n ,
-% \@@_draw_color_gray_stroke:n
+% \driver_draw_color_gray:n ,
+% \driver_draw_fill_gray:n ,
+% \driver_draw_stroke_gray:n
% }
% \begin{macro}
% {
-% \@@_draw_color_rgb:nnn ,
-% \@@_draw_color_rgb_fill:nnn ,
-% \@@_draw_color_rgb_stroke:nnn
+% \driver_draw_color_rgb:nnn ,
+% \driver_draw_fill_rgb:nnn ,
+% \driver_draw_stroke_rgb:nnn
% }
% To allow color to be defined for strokes and fills separately and to
% respect scoping, the data needs to be stored at the PostScript level.
@@ -1153,7 +1156,7 @@
\@@_draw_literal:n { currentdic~/l3fc~known~{ /l3fc~ { } ~def }~if }
\@@_draw_literal:n { currentdic~/l3sc~known~{ /l3sc~ { } ~def }~if }
}
-\cs_new_protected:Npn \@@_draw_color_cmyk:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_color_cmyk:nnnn #1#2#3#4
{
\@@_draw_literal:x
{
@@ -1163,7 +1166,7 @@
}
\@@_draw_color_reset:
}
-\cs_new_protected:Npn \@@_draw_color_cmyk_fill:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn #1#2#3#4
{
\@@_draw_literal:x
{
@@ -1176,9 +1179,9 @@
def
}
}
-\cs_new_protected:Npn \@@_draw_color_cmyk_stroke:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn #1#2#3#4
{
- \__driver_draw_literal:x
+ \@@_draw_literal:x
{
/l3sc ~
{
@@ -1189,16 +1192,16 @@
def
}
}
-\cs_new_protected:Npn \@@_draw_color_gray:n #1
+\cs_new_protected:Npn \driver_draw_color_gray:n #1
{
\@@_draw_literal:x { fp_eval:n {#1} ~ setgray }
\@@_draw_color_reset:
}
-\cs_new_protected:Npn \@@_draw_color_gray_fill:n #1
+\cs_new_protected:Npn \driver_draw_fill_gray:n #1
{ \@@_draw_literal:x { /l3fc ~ { \fp_eval:n {#1} ~ setgray } ~ def } }
-\cs_new_protected:Npn \@@_draw_color_gray_stroke:n #1
+\cs_new_protected:Npn \driver_draw_stroke_gray:n #1
{ \@@_draw_literal:x { /l3sc ~ { \fp_eval:n {#1} ~ setgray } ~ def } }
-\cs_new_protected:Npn \@@_draw_color_rgb:nnn #1#2#3
+\cs_new_protected:Npn \driver_draw_color_rgb:nnn #1#2#3
{
\@@_draw_literal:x
{
@@ -1207,7 +1210,7 @@
}
\@@_draw_color_reset:
}
-\cs_new_protected:Npn \@@_draw_color_rgb_fill:nnn #1#2#3
+\cs_new_protected:Npn \driver_draw_fill_rgb:nnn #1#2#3
{
\@@_draw_literal:x
{
@@ -1219,7 +1222,7 @@
def
}
}
-\cs_new_protected:Npn \@@_draw_color_rgb_stroke:nnn #1#2#3
+\cs_new_protected:Npn \driver_draw_stroke_rgb:nnn #1#2#3
{
\@@_draw_literal:x
{
@@ -1237,12 +1240,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_transformcm:nnnnnn}
+% \begin{macro}{\driver_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
% two are a displacement vector. Once again, force evaluation to allow for
% caching.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_transformcm:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \driver_draw_transformcm:nnnnnn #1#2#3#4#5#6
{
\@@_draw_literal:x
{
@@ -1257,7 +1260,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_hbox:Nnnnnnn}
+% \begin{macro}{\driver_draw_hbox:Nnnnnnn}
% Inside a picture |@beginspecial|/|@endspecial| are active, which is
% normally a good thing but means that the position and scaling would be off
% if the box was inserted directly. Instead, we need to reverse the effect of
@@ -1267,11 +1270,11 @@
% drawing origin so has to be done purely in driver code not using \TeX{}
% offsets.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7
+\cs_new_protected:Npn \driver_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7
{
\@@_scope_begin:
\tex_special:D { ps::[end] }
- \@@_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} {#6} {#7}
+ \driver_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} {#6} {#7}
\tex_special:D { ps::~72~Resolution~div~72~VResolution~div~neg~scale }
\tex_special:D { ps::~magscale~{1~DVImag~div~dup~scale}~if }
\tex_special:D { ps::~l3x~neg~l3y~neg~translate }
@@ -1355,7 +1358,7 @@
%
% \subsubsection{Box operations}
%
-% \begin{macro}{\@@_box_use_clip:N}
+% \begin{macro}{\driver_box_use_clip:N}
% The general method is to save the current location, define a clipping path
% equivalent to the bounding box, then insert the content at the current
% position and in a zero width box. The \enquote{real} width is then made up
@@ -1364,7 +1367,7 @@
% as much code as possible and uses the same conversions (and so same
% rounding errors) in all cases.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_clip:N #1
+\cs_new_protected:Npn \driver_box_use_clip:N #1
{
\@@_scope_begin:
\@@_literal:n
@@ -1382,7 +1385,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_rotate:Nn}
+% \begin{macro}{\driver_box_use_rotate:Nn}
% \begin{variable}{\l_@@_cos_fp, \l_@@_sin_fp}
% Rotations are set using an affine transformation matrix which therefore
% requires sine/cosine values not the angle itself. We store the rounded
@@ -1391,7 +1394,7 @@
% with problematic display programs. Note that numbers are compared to~$0$
% after rounding.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_rotate:Nn #1#2
+\cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2
{
\@@_scope_begin:
\box_set_wd:Nn #1 { 0pt }
@@ -1421,11 +1424,11 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_scale:Nnn}
+% \begin{macro}{\driver_box_use_scale:Nnn}
% The same idea as for rotation but without the complexity of signs and
% cosines.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_scale:Nnn #1#2#3
+\cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3
{
\@@_scope_begin:
\@@_matrix:n
@@ -1467,13 +1470,13 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_image_getbb_jpg:n #1
{
- \int_zero:N \l__image_page_int
- \tl_clear:N \l__image_pagebox_tl
+ \int_zero:N \l_image_page_int
+ \tl_clear:N \l_image_pagebox_tl
\tl_set:Nx \l_@@_image_attr_tl
{
- \tl_if_empty:NF \l__image_decode_tl
- { :D \l__image_decode_tl }
- \bool_if:NT \l__image_interpolate_bool
+ \tl_if_empty:NF \l_image_decode_tl
+ { :D \l_image_decodearray_tl }
+ \bool_if:NT \l_image_interpolate_bool
{ :I }
}
\tl_clear:N \l_@@_image_attr_tl
@@ -1482,27 +1485,19 @@
\cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
\cs_new_protected:Npn \@@_image_getbb_pdf:n #1
{
- \tl_clear:N \l__image_decode_tl
- \bool_set_false:N \l__image_interpolate_bool
+ \tl_clear:N \l_image_decode_tl
+ \bool_set_false:N \l_image_interpolate_bool
\tl_set:Nx \l_@@_image_attr_tl
{
- : \l__image_pagebox_tl
- \int_compare:nNnT \l__image_page_int > 1
- { :P \int_use:N \l__image_page_int }
+ : \l_image_pagebox_tl
+ \int_compare:nNnT \l_image_page_int > 1
+ { :P \int_use:N \l_image_page_int }
}
\@@_image_getbb_auxi:n {#1}
}
\cs_new_protected:Npn \@@_image_getbb_auxi:n #1
{
- \dim_zero:N \l__image_llx_dim
- \dim_zero:N \l__image_lly_dim
- \dim_if_exist:cTF { c__image_ #1 \l_@@_image_attr_tl _urx_dim }
- {
- \dim_set_eq:Nc \l__image_urx_dim
- { c__image_ #1 \l_@@_image_attr_tl _urx_dim }
- \dim_set_eq:Nc \l__image_ury_dim
- { c__image_ #1 \l_@@_image_attr_tl _ury_dim }
- }
+ \image_bb_restore:xF { #1 \l_@@_image_attr_tl }
{ \@@_image_getbb_auxii:n {#1} }
}
% \begin{macrocode}
@@ -1515,32 +1510,29 @@
{
\tex_immediate:D \pdftex_pdfximage:D
\bool_lazy_or:nnT
- { \l__image_interpolate_bool }
- { ! \tl_if_empty_p:N \l__image_decode_tl }
+ { \l_image_interpolate_bool }
+ { ! \tl_if_empty_p:N \l_image_decodearray_tl }
{
attr ~
{
- \tl_if_empty:NF \l__image_decode_tl
- { /Decode~[ \l__image_decode_tl ] }
- \bool_if:NT \l__image_interpolate_bool
+ \tl_if_empty:NF \l_image_decode_tl
+ { /Decode~[ \l_image_decodearray_tl ] }
+ \bool_if:NT \l_image_interpolate_bool
{ /Interpolate~true }
}
}
- \int_compare:nNnT \l__image_page_int > 0
- { page ~ \int_use:N \l__image_page_int }
- \tl_if_empty:NF \l__image_pagebox_tl
- { \l__image_pagebox_tl }
+ \int_compare:nNnT \l_image_page_int > 0
+ { page ~ \int_use:N \l_image_page_int }
+ \tl_if_empty:NF \l_image_pagebox_tl
+ { \l_image_pagebox_tl }
{#1}
- \hbox_set:Nn \l__image_tmp_box
+ \hbox_set:Nn \l_@@_tmp_box
{ \pdftex_pdfrefximage:D \pdftex_pdflastximage:D }
- \dim_set:Nn \l__image_urx_dim { \box_wd:N \l__image_tmp_box }
- \dim_set:Nn \l__image_ury_dim { \box_ht:N \l__image_tmp_box }
- \int_const:cn { c__image_ #1 \l_@@_image_attr_tl _int }
+ \dim_set:Nn \l_image_urx_dim { \box_wd:N \l_@@_tmp_box }
+ \dim_set:Nn \l_image_ury_dim { \box_ht:N \l_@@_tmp_box }
+ \int_const:cn { c_@@_image_ #1 \l_@@_image_attr_tl _int }
{ \tex_the:D \pdftex_pdflastximage:D }
- \dim_const:cn { c__image_ #1 \l_@@_image_attr_tl _urx_dim }
- { \l__image_urx_dim }
- \dim_const:cn { c__image_ #1 \l_@@_image_attr_tl _ury_dim }
- { \l__image_ury_dim }
+ \image_bb_save:x { #1 \l_@@_image_attr_tl }
}
% \end{macrocode}
% \end{macro}
@@ -1555,7 +1547,7 @@
\cs_new_protected:Npn \@@_image_include_jpg:n #1
{
\pdftex_pdfrefximage:D
- \int_use:c { c__image_ #1 \l_@@_image_attr_tl _int }
+ \int_use:c { c_@@_image_ #1 \l_@@_image_attr_tl _int }
}
\cs_new_eq:NN \@@_image_include_pdf:n \@@_image_include_jpg:n
\cs_new_eq:NN \@@_image_include_png:n \@@_image_include_jpg:n
@@ -1603,11 +1595,11 @@
%
% \subsubsection{Box operations}
%
-% \begin{macro}{\@@_box_use_clip:N}
-% The code here is idential to that for \texttt{pdfmode}: unlike rotation and
+% \begin{macro}{\driver_box_use_clip:N}
+% The code here is identical to that for \texttt{pdfmode}: unlike rotation and
% scaling, there is no higher-level support in the driver for clipping.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_clip:N #1
+\cs_new_protected:Npn \driver_box_use_clip:N #1
{
\@@_scope_begin:
\@@_literal:n
@@ -1625,7 +1617,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_rotate:Nn}
+% \begin{macro}{\driver_box_use_rotate:Nn}
% Rotating in \texttt{(x)}dvipdmfx can be implemented using either PDF or
% driver-specific code. The former approach however is not \enquote{aware}
% of the content of boxes: this means that any embedded links would not be
@@ -1634,7 +1626,7 @@
% version (notice the rotation angle here is positive). As for
% \texttt{dvips}, zero rotation is written as |0| not |-0|.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_rotate:Nn #1#2
+\cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2
{
\@@_scope_begin:
\tex_special:D
@@ -1650,11 +1642,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_scale:Nnn}
+% \begin{macro}{\driver_box_use_scale:Nnn}
% Much the same idea for scaling: use the higher-level driver operation to allow
% for box content.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_scale:Nnn #1#2#3
+\cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3
{
\@@_scope_begin:
\tex_special:D
@@ -1679,20 +1671,20 @@
% Simply use the generic functions: only for \texttt{dvipdfmx} in the
% extraction cases.
% \begin{macrocode}
-\cs_new_eq:NN \@@_image_getbb_eps:n \__image_read_bb:n
+\cs_new_eq:NN \@@_image_getbb_eps:n \image_read_bb:n
%<*dvipdfmx>
\cs_new_protected:Npn \@@_image_getbb_jpg:n #1
{
- \int_zero:N \l__image_page_int
- \tl_clear:N \l__image_pagebox_tl
- \__image_extract_bb:n {#1}
+ \int_zero:N \l_image_page_int
+ \tl_clear:N \l_image_pagebox_tl
+ \image_extract_bb:n {#1}
}
\cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
\cs_new_protected:Npn \@@_image_getbb_pdf:n #1
{
- \tl_clear:N \l__image_decode_tl
- \bool_set_false:N \l__image_interpolate_bool
- \__image_extract_bb:n {#1}
+ \tl_clear:N \l_image_decode_tl
+ \bool_set_false:N \l_image_interpolate_bool
+ \image_extract_bb:n {#1}
}
%</dvipdfmx>
% \end{macrocode}
@@ -1739,23 +1731,23 @@
{
\@@_image_include_auxii:xnn
{
- \tl_if_empty:NF \l__image_pagebox_tl
- { : \l__image_pagebox_tl }
- \int_compare:nNnT \l__image_page_int > 1
- { :P \int_use:N \l__image_page_int }
- \tl_if_empty:NF \l__image_decode_tl
- { :D \l__image_decode_tl }
- \bool_if:NT \l__image_interpolate_bool
+ \tl_if_empty:NF \l_image_pagebox_tl
+ { : \l_image_pagebox_tl }
+ \int_compare:nNnT \l_image_page_int > 1
+ { :P \int_use:N \l_image_page_int }
+ \tl_if_empty:NF \l_image_decode_tl
+ { :D \l_image_decodearray_tl }
+ \bool_if:NT \l_image_interpolate_bool
{ :I }
}
{#1} {#2}
}
\cs_new_protected:Npn \@@_image_include_auxii:nnn #1#2#3
{
- \int_if_exist:cTF { c__image_ #2#1 _int }
+ \int_if_exist:cTF { c_@@_image_ #2#1 _int }
{
\tex_special:D
- { pdf:usexobj~@image \int_use:c { c__image_ #2#1 _int } }
+ { pdf:usexobj~@image \int_use:c { c_@@_image_ #2#1 _int } }
}
{ \@@_image_include_auxiii:nn {#2} {#1} {#3} }
}
@@ -1769,31 +1761,31 @@
\cs_new_protected:Npn \@@_image_include_auxiii:nnn #1#2#3
{
\int_gincr:N \g_@@_image_int
- \int_const:cn { c__image_ #1#2 _int } { \g_@@_image_int }
+ \int_const:cn { c_@@_image_ #1#2 _int } { \g_@@_image_int }
\tex_special:D
{
pdf:#3~
- @image \int_use:c { c__image_ #1#2 _int }
- \int_compare:nNnT \l__image_page_int > 1
- { page ~ \int_use:N \l__image_page_int \c_space_tl }
- \tl_if_empty:NF \l__image_pagebox_tl
+ @image \int_use:c { c_@@_image_ #1#2 _int }
+ \int_compare:nNnT \l_image_page_int > 1
+ { page ~ \int_use:N \l_image_page_int \c_space_tl }
+ \tl_if_empty:NF \l_image_pagebox_tl
{
- pagebox ~ \l__image_pagebox_tl \c_space_tl
+ pagebox ~ \l_image_pagebox_tl \c_space_tl
bbox ~
- \dim_to_decimal_in_bp:n \l__image_llx_dim \c_space_tl
- \dim_to_decimal_in_bp:n \l__image_lly_dim \c_space_tl
- \dim_to_decimal_in_bp:n \l__image_urx_dim \c_space_tl
- \dim_to_decimal_in_bp:n \l__image_ury_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_image_llx_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_image_lly_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_image_urx_dim \c_space_tl
+ \dim_to_decimal_in_bp:n \l_image_ury_dim \c_space_tl
}
(#1)
\bool_lazy_or:nnT
- { \l__image_interpolate_bool }
- { ! \tl_if_empty_p:N \l__image_decode_tl }
+ { \l_image_interpolate_bool }
+ { ! \tl_if_empty_p:N \l_image_decodearray_tl }
{
<<
- \tl_if_empty:NF \l__image_decode_tl
- { /Decode~[ \l__image_decode_tl ] }
- \bool_if:NT \l__image_interpolate_bool
+ \tl_if_empty:NF \l_image_decode_tl
+ { /Decode~[ \l_image_decodearray_tl ] }
+ \bool_if:NT \l_image_interpolate_bool
{ /Interpolate~true> }
>>
}
@@ -1833,21 +1825,21 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_image_getbb_jpg:n #1
{
- \int_zero:N \l__image_page_int
- \tl_clear:N \l__image_pagebox_tl
+ \int_zero:N \l_image_page_int
+ \tl_clear:N \l_image_pagebox_tl
\@@_image_getbb_auxi:nN {#1} \xetex_picfile:D
}
\cs_new_eq:NN \@@_image_getbb_png:n \@@_image_getbb_jpg:n
\cs_new_protected:Npn \@@_image_getbb_pdf:n #1
{
- \tl_clear:N \l__image_decode_tl
- \bool_set_false:N \l__image_interpolate_bool
+ \tl_clear:N \l_image_decode_tl
+ \bool_set_false:N \l_image_interpolate_bool
\@@_image_getbb_auxi:nN {#1} \xetex_pdffile:D
}
\cs_new_protected:Npn \@@_image_getbb_auxi:nN #1#2
{
- \int_compare:nNnTF \l__image_page_int > 1
- { \@@_image_getbb_auxii:VnN \l__image_page_int {#1} #2 }
+ \int_compare:nNnTF \l_image_page_int > 1
+ { \@@_image_getbb_auxii:VnN \l_image_page_int {#1} #2 }
{ \@@_image_getbb_auxiii:nNnn {#1} #2 }
}
\cs_new_protected:Npn \@@_image_getbb_auxii:nnN #1#2#3
@@ -1855,8 +1847,8 @@
\cs_generate_variant:Nn \@@_image_getbb_auxii:nnN { V }
\cs_new_protected:Npn \@@_image_getbb_auxiii:nNnn #1#2#3#4
{
- \tl_if_empty:NTF \l__image_pagebox_tl
- { \@@_image_getbb_auxiv:VnNnn \l__image_pagebox_tl }
+ \tl_if_empty:NTF \l_image_pagebox_tl
+ { \@@_image_getbb_auxiv:VnNnn \l_image_pagebox_tl }
{ \@@_image_getbb_auxv:nNnn }
{#1} #2 {#3} {#4}
}
@@ -1871,24 +1863,15 @@
\cs_generate_variant:Nn \@@_image_getbb_auxiv:nnNnn { V }
\cs_new_protected:Npn \@@_image_getbb_auxv:nNnn #1#2#3#4
{
- \dim_zero:N \l__image_llx_dim
- \dim_zero:N \l__image_lly_dim
- \dim_if_exist:cTF { c__image_ #1#3 _urx_dim }
- {
- \dim_set_eq:Nc \l__image_urx_dim { c__image_ #1#3 _urx_dim }
- \dim_set_eq:Nc \l__image_ury_dim { c__image_ #1#3 _ury_dim }
- }
+ \image_bb_restore:nF {#1#3}
{ \@@_image_getbb_auxvi:nNnn {#1} #2 {#3} {#4} }
}
\cs_new_protected:Npn \@@_image_getbb_auxvi:nNnn #1#2#3#4
{
- \hbox_set:Nn \l__image_tmp_box { #2 #1 ~ #4 }
- \dim_set:Nn \l__image_utx_dim { \box_wd:N \l__image_tmp_box }
- \dim_set:Nn \l__image_ury_dim { \box_ht:N \l__image_tmp_box }
- \dim_const:cn { c__image_ #1#3 _urx_dim }
- { \l__image_urx_dim }
- \dim_const:cn { c__image_ #1#3 _ury_dim }
- { \l__image_ury_dim }
+ \hbox_set:Nn \l_@@_tmp_box { #2 #1 ~ #4 }
+ \dim_set:Nn \l_image_utx_dim { \box_wd:N \l_@@_tmp_box }
+ \dim_set:Nn \l_image_ury_dim { \box_ht:N \l_@@_tmp_box }
+ \image_bb_save:n {#1#3}
}
\cs_new:Npn \@@_image_getbb_pagebox:w #1 box {#1}
% \end{macrocode}
@@ -1904,14 +1887,14 @@
% For PDF images, properly supporting the |pagebox| concept in \XeTeX{}
% is best done using the |\xetex_pdffile:D| primitive. The syntax here
% is the same as for the image measurement part, although we know at this
-% stage that there must be some valid setting for \cs{l__image_pagebox_tl}.
+% stage that there must be some valid setting for \cs{l_image_pagebox_tl}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_image_include_pdf:n #1
{
\xetex_pdffile:D "#1" ~
- \int_compare:nNnT \l__image_page_int > 0
- { page~ \int_use:N \l__image_page_int }
- \@@_image_getbb_auxiv:VnNnn \l__image_pagebox_tl
+ \int_compare:nNnT \l_image_page_int > 0
+ { page~ \int_use:N \l_image_page_int }
+ \@@_image_getbb_auxiv:VnNnn \l_image_pagebox_tl
}
% \end{macrocode}
% \end{macro}
@@ -1939,46 +1922,46 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_begin:, \@@_draw_end:}
+% \begin{macro}{\driver_draw_begin:, \driver_draw_end:}
% No special requirements here, so simply set up a drawing scope.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_begin:
- { \@@_draw_scope_begin: }
-\cs_new_protected:Npn \@@_draw_end:
- { \@@_draw_scope_end: }
+\cs_new_protected:Npn \driver_draw_begin:
+ { \driver_draw_scope_begin: }
+\cs_new_protected:Npn \driver_draw_end:
+ { \driver_draw_scope_end: }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_scope_begin:, \@@_draw_scope_end:}
+% \begin{macro}{\driver_draw_scope_begin:, \driver_draw_scope_end:}
% In contrast to a general scope, a drawing scope is always done using
% the PDF operators so is the same for all relevant drivers.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_scope_begin:
+\cs_new_protected:Npn \driver_draw_scope_begin:
{ \@@_draw_literal:n { q } }
-\cs_new_protected:Npn \@@_draw_scope_end:
+\cs_new_protected:Npn \driver_draw_scope_end:
{ \@@_draw_literal:n { Q } }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
-% \begin{macro}{\@@_draw_curveto:nnnnnn}
-% \begin{macro}{\@@_draw_rectangle:nnnn}
+% \begin{macro}{\driver_draw_moveto:nn, \driver_draw_lineto:nn}
+% \begin{macro}{\driver_draw_curveto:nnnnnn}
+% \begin{macro}{\driver_draw_rectangle:nnnn}
% Path creation operations all resolve directly to PDF primitive steps, with
% only the need to convert to \texttt{bp}. Notice that \texttt{x}-type
% expansion is included here to ensure that any variable values are
% forced to literals before any possible caching.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_moveto:nn #1#2
+\cs_new_protected:Npn \driver_draw_moveto:nn #1#2
{
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ m }
}
-\cs_new_protected:Npn \@@_draw_lineto:nn #1#2
+\cs_new_protected:Npn \driver_draw_lineto:nn #1#2
{
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ l }
}
-\cs_new_protected:Npn \@@_draw_curveto:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \driver_draw_curveto:nnnnnn #1#2#3#4#5#6
{
\@@_draw_literal:x
{
@@ -1988,7 +1971,7 @@
c
}
}
-\cs_new_protected:Npn \@@_draw_rectangle:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_rectangle:nnnn #1#2#3#4
{
\@@_draw_literal:x
{
@@ -2002,13 +1985,13 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
+% \begin{macro}{\driver_draw_evenodd_rule:, \driver_draw_nonzero_rule:}
% \begin{variable}{\g_@@_draw_eor_bool}
% The even-odd rule here can be implemented as a simply switch.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_evenodd_rule:
+\cs_new_protected:Npn \driver_draw_evenodd_rule:
{ \bool_gset_true:N \g_@@_draw_eor_bool }
-\cs_new_protected:Npn \@@_draw_nonzero_rule:
+\cs_new_protected:Npn \driver_draw_nonzero_rule:
{ \bool_gset_false:N \g_@@_draw_eor_bool }
\bool_new:N \g_@@_draw_eor_bool
% \end{macrocode}
@@ -2017,56 +2000,56 @@
%
% \begin{macro}
% {
-% \@@_draw_closepath: ,
-% \@@_draw_stroke: ,
-% \@@_draw_closestroke: ,
-% \@@_draw_fill: ,
-% \@@_draw_fillstroke: ,
-% \@@_draw_clip: ,
-% \@@_draw_discardpath:
+% \driver_draw_closepath: ,
+% \driver_draw_stroke: ,
+% \driver_draw_closestroke: ,
+% \driver_draw_fill: ,
+% \driver_draw_fillstroke: ,
+% \driver_draw_clip: ,
+% \driver_draw_discardpath:
% }
% Converting paths to output is again a case of mapping directly to
% PDF operations.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_closepath:
+\cs_new_protected:Npn \driver_draw_closepath:
{ \@@_draw_literal:n { h } }
-\cs_new_protected:Npn \@@_draw_stroke:
+\cs_new_protected:Npn \driver_draw_stroke:
{ \@@_draw_literal:n { S } }
-\cs_new_protected:Npn \@@_draw_closestroke:
+\cs_new_protected:Npn \driver_draw_closestroke:
{ \@@_draw_literal:n { s } }
-\cs_new_protected:Npn \@@_draw_fill:
+\cs_new_protected:Npn \driver_draw_fill:
{
\@@_draw_literal:x
{ f \bool_if:NT \g_@@_draw_eor_bool * }
}
-\cs_new_protected:Npn \@@_draw_fillstroke:
+\cs_new_protected:Npn \driver_draw_fillstroke:
{
\@@_draw_literal:x
{ B \bool_if:NT \g_@@_draw_eor_bool * }
}
-\cs_new_protected:Npn \@@_draw_clip:
+\cs_new_protected:Npn \driver_draw_clip:
{
\@@_draw_literal:x
{ W \bool_if:NT \g_@@_draw_eor_bool * }
}
-\cs_new_protected:Npn \@@_draw_discardpath:
+\cs_new_protected:Npn \driver_draw_discardpath:
{ \@@_draw_literal:n { n } }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_dash:nn}
+% \begin{macro}{\driver_draw_cap_dash:nn}
% \begin{macro}{\@@_draw_dash:n}
-% \begin{macro}{\@@_draw_linewidth:n}
-% \begin{macro}{\@@_draw_miterlimit:n}
+% \begin{macro}{\driver_draw_linewidth:n}
+% \begin{macro}{\driver_draw_miterlimit:n}
% \begin{macro}
% {
-% \@@_draw_cap_butt:, \@@_draw_cap_round:, \@@_draw_cap_rectangle:,
-% \@@_draw_join_miter:, \@@_draw_join_round:, \@@_draw_join_bevel:
+% \driver_draw_cap_butt:, \driver_draw_cap_round:, \driver_draw_cap_rectangle:,
+% \driver_draw_join_miter:, \driver_draw_join_round:, \driver_draw_join_bevel:
% }
% Converting paths to output is again a case of mapping directly to
% PDF operations.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_dash:nn #1#2
+\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2
{
\@@_draw_literal:x
{
@@ -2078,24 +2061,24 @@
}
\cs_new:Npn \@@_draw_dash:n #1
{ \dim_to_decimal_in_bp:n {#1} ~ }
-\cs_new_protected:Npn \@@_draw_linewidth:n #1
+\cs_new_protected:Npn \driver_draw_linewidth:n #1
{
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ w }
}
-\cs_new_protected:Npn \@@_draw_miterlimit:n #1
+\cs_new_protected:Npn \driver_draw_miterlimit:n #1
{ \@@_draw_literal:x { \fp_eval:n {#1} ~ M } }
-\cs_new_protected:Npn \@@_draw_cap_butt:
+\cs_new_protected:Npn \driver_draw_cap_butt:
{ \@@_draw_literal:n { 0 ~ J } }
-\cs_new_protected:Npn \@@_draw_cap_round:
+\cs_new_protected:Npn \driver_draw_cap_round:
{ \@@_draw_literal:n { 1 ~ J } }
-\cs_new_protected:Npn \@@_draw_cap_rectangle:
+\cs_new_protected:Npn \driver_draw_cap_rectangle:
{ \@@_draw_literal:n { 2 ~ J } }
-\cs_new_protected:Npn \@@_draw_join_miter:
+\cs_new_protected:Npn \driver_draw_join_miter:
{ \@@_draw_literal:n { 0 ~ j } }
-\cs_new_protected:Npn \@@_draw_join_round:
+\cs_new_protected:Npn \driver_draw_join_round:
{ \@@_draw_literal:n { 1 ~ j } }
-\cs_new_protected:Npn \@@_draw_join_bevel:
+\cs_new_protected:Npn \driver_draw_join_bevel:
{ \@@_draw_literal:n { 2 ~ j } }
% \end{macrocode}
% \end{macro}
@@ -2106,29 +2089,29 @@
%
% \begin{macro}
% {
-% \@@_draw_color_cmyk:nnnn ,
-% \@@_draw_color_cmyk_fill:nnnn ,
-% \@@_draw_color_cmyk_stroke:nnnn
+% \driver_draw_color_cmyk:nnnn ,
+% \driver_draw_fill_cmyk:nnnn ,
+% \driver_draw_stroke_cmyk:nnnn
% }
% \begin{macro}{\@@_draw_color_cmyk_aux:nnnn}
% \begin{macro}
% {
-% \@@_draw_color_gray:n ,
-% \@@_draw_color_gray_fill:n ,
-% \@@_draw_color_gray_stroke:n
+% \driver_draw_color_gray:n ,
+% \driver_draw_fill_gray:n ,
+% \driver_draw_stroke_gray:n
% }
% \begin{macro}{\@@_draw_color_gray_aux:n}
% \begin{macro}
% {
-% \@@_draw_color_rgb:nnn ,
-% \@@_draw_color_rgb_fill:nnn ,
-% \@@_draw_color_rgb_stroke:nnn
+% \driver_draw_color_rgb:nnn ,
+% \driver_draw_fill_rgb:nnn ,
+% \driver_draw_stroke_rgb:nnn
% }
% \begin{macro}{\@@_draw_color_rgb_aux:nnn}
% Yet more fast conversion, all using the FPU to allow for expressions
% in numerical input.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_color_cmyk:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_color_cmyk:nnnn #1#2#3#4
{
\use:x
{
@@ -2144,7 +2127,7 @@
\@@_draw_literal:n
{ #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K }
}
-\cs_new_protected:Npn \@@_draw_color_cmyk_fill:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn #1#2#3#4
{
\@@_draw_literal:x
{
@@ -2153,7 +2136,7 @@
k
}
}
-\cs_new_protected:Npn \@@_draw_color_cmyk_stroke:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn #1#2#3#4
{
\@@_draw_literal:x
{
@@ -2162,7 +2145,7 @@
K
}
}
-\cs_new_protected:Npn \@@_draw_color_gray:n #1
+\cs_new_protected:Npn \driver_draw_color_gray:n #1
{
\use:x
{ \@@_draw_color_gray_aux:n { \fp_eval:n {#1} } }
@@ -2171,11 +2154,11 @@
{
\@@_draw_literal:n { #1 ~ g ~ #1 ~ G }
}
-\cs_new_protected:Npn \@@_draw_color_gray_fill:n #1
+\cs_new_protected:Npn \driver_draw_fill_gray:n #1
{ \@@_draw_literal:x { \fp_eval:n {#1} ~ g } }
-\cs_new_protected:Npn \@@_draw_color_gray_stroke:n #1
+\cs_new_protected:Npn \driver_draw_stroke_gray:n #1
{ \@@_draw_literal:x { \fp_eval:n {#1} ~ G } }
-\cs_new_protected:Npn \@@_draw_color_rgb:nnn #1#2#3
+\cs_new_protected:Npn \driver_draw_color_rgb:nnn #1#2#3
{
\use:x
{
@@ -2190,12 +2173,12 @@
\@@_draw_literal:n
{ #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG }
}
-\cs_new_protected:Npn \@@_draw_color_rgb_fill:nnn #1#2#3
+\cs_new_protected:Npn \driver_draw_fill_rgb:nnn #1#2#3
{
\@@_draw_literal:x
{ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg }
}
-\cs_new_protected:Npn \@@_draw_color_rgb_stroke:nnn #1#2#3
+\cs_new_protected:Npn \driver_draw_stroke_rgb:nnn #1#2#3
{
\@@_draw_literal:x
{ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG }
@@ -2208,12 +2191,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_transformcm:nnnnnn}
+% \begin{macro}{\driver_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
% two are a displacement vector. Once again, force evaluation to allow for
% caching.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_transformcm:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \driver_draw_transformcm:nnnnnn #1#2#3#4#5#6
{
\@@_draw_literal:x
{
@@ -2226,7 +2209,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_hbox:Nnnnnnn}
+% \begin{macro}{\driver_draw_hbox:Nnnnnnn}
% \begin{variable}{\l_@@_tmp_box}
% Inserting a \TeX{} box transformed to the requested position and using
% the current matrix is done using a mixture of \TeX{} and low-level
@@ -2235,13 +2218,13 @@
% operation can never be cached, the scope is set directly not using the
% \texttt{draw} version.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7
+\cs_new_protected:Npn \driver_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7
{
\hbox_set:Nn \l_@@_tmp_box
{
\tex_kern:D \__dim_eval:n {#6}
\@@_scope_begin:
- \@@_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5}
+ \driver_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5}
{ 0pt } { 0pt }
\box_move_up:nn {#7} { \box_use:N #1 }
\@@_scope_end:
@@ -2306,7 +2289,7 @@
%
% \subsubsection{Box operations}
%
-% \begin{macro}{\@@_box_use_clip:N}
+% \begin{macro}{\driver_box_use_clip:N}
% \begin{variable}{\g_@@_clip_path_int}
% Clipping in SVG is more involved than with other drivers. The first issue
% is that the clipping path must be defined separately from where it is used,
@@ -2317,7 +2300,7 @@
% up and down using scopes to allow for the depth of the \TeX{} box and
% keep the reference point the same!
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_clip:N #1
+\cs_new_protected:Npn \driver_box_use_clip:N #1
{
\int_gincr:N \g_@@_clip_path_int
\@@_literal:n
@@ -2381,12 +2364,12 @@
% \end{variable}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_rotate:Nn}
+% \begin{macro}{\driver_box_use_rotate:Nn}
% Rotation has a dedicated operation which includes a centre-of-rotation
% optional pair. That can be picked up from the driver syntax, so there is
% no need to worry about the transformation matrix.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_rotate:Nn #1#2
+\cs_new_protected:Npn \driver_box_use_rotate:Nn #1#2
{
\@@_scope_begin:n
{
@@ -2402,12 +2385,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_use_scale:Nnn}
+% \begin{macro}{\driver_box_use_scale:Nnn}
% In contrast to rotation, we have to account for the current position in this
% case. That is done using a couple of translations in addition to the scaling
% (which is therefore done backward with a flip).
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_use_scale:Nnn #1#2#3
+\cs_new_protected:Npn \driver_box_use_scale:Nnn #1#2#3
{
\@@_scope_begin:n
{
@@ -2434,8 +2417,8 @@
% \begin{macro}{\@@_image_getbb_png:n, \@@_image_getbb_jpg:n}
% These can be included by extracting the bounding box data.
% \begin{macrocode}
-\cs_new_eq:NN \@@_image_getbb_png:n \__image_extract_bb:n
-\cs_new_eq:NN \@@_image_getbb_jpg:n \__image_extract_bb:n
+\cs_new_eq:NN \@@_image_getbb_png:n \image_extract_bb:n
+\cs_new_eq:NN \@@_image_getbb_jpg:n \image_extract_bb:n
% \end{macrocode}
% \end{macro}
%
@@ -2453,8 +2436,8 @@
\tex_special:D
{
dvisvgm:img~
- \dim_to_decimal:n { \l__image_ury_dim } ~
- \dim_to_decimal:n { \l__image_ury_dim } ~
+ \dim_to_decimal:n { \l_image_ury_dim } ~
+ \dim_to_decimal:n { \l_image_ury_dim } ~
\@@_image_include_bitmap_quote:w #1 " " \q_stop
}
}
@@ -2474,21 +2457,21 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_begin:, \@@_draw_end:}
+% \begin{macro}{\driver_draw_begin:, \driver_draw_end:}
% A drawing needs to be set up such that the co-ordinate system is
% translated. That is done inside a scope, which as described below
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_begin:
+\cs_new_protected:Npn \driver_draw_begin:
{
- \@@_draw_scope_begin:
+ \driver_draw_scope_begin:
\@@_draw_scope:n { transform="translate({?x},{?y})~scale(1,-1)" }
}
-\cs_new_protected:Npn \@@_draw_end:
- { \@@_draw_scope_end: }
+\cs_new_protected:Npn \driver_draw_end:
+ { \driver_draw_scope_end: }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_scope_begin:, \@@_draw_scope_end:}
+% \begin{macro}{\driver_draw_scope_begin:, \driver_draw_scope_end:}
% \begin{macro}{\@@_draw_scope:n, \@@_draw_scope:x}
% \begin{variable}{\g_@@_draw_scope_int, \l_@@_draw_scope_int}
% Several settings that with other drivers are \enquote{stand alone} have
@@ -2499,7 +2482,7 @@
% used to save the value between scopes. The result is that no direct action
% is needed when creating a scope.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_scope_begin:
+\cs_new_protected:Npn \driver_draw_scope_begin:
{
\int_set_eq:NN
\l_@@_draw_scope_int
@@ -2507,7 +2490,7 @@
\group_begin:
\int_gzero:N \g_@@_draw_scope_int
}
-\cs_new_protected:Npn \@@_draw_scope_end:
+\cs_new_protected:Npn \driver_draw_scope_end:
{
\prg_replicate:nn
{ \g_@@_draw_scope_int }
@@ -2530,9 +2513,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
-% \begin{macro}{\@@_draw_rectangle:nnnn}
-% \begin{macro}{\@@_draw_curveto:nnnnnn}
+% \begin{macro}{\driver_draw_moveto:nn, \driver_draw_lineto:nn}
+% \begin{macro}{\driver_draw_rectangle:nnnn}
+% \begin{macro}{\driver_draw_curveto:nnnnnn}
% \begin{macro}{\@@_draw_add_to_path:n}
% \begin{variable}{\g_@@_draw_path_tl}
% Once again, some work is needed to get path constructs correct. Rather
@@ -2542,17 +2525,17 @@
% be fully expanded there is no need to worry about the internal
% \texttt{x}-type expansion.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_moveto:nn #1#2
+\cs_new_protected:Npn \driver_draw_moveto:nn #1#2
{
\@@_draw_add_to_path:n
{ M ~ \dim_to_decimal:n {#1} ~ \dim_to_decimal:n {#2} }
}
-\cs_new_protected:Npn \@@_draw_lineto:nn #1#2
+\cs_new_protected:Npn \driver_draw_lineto:nn #1#2
{
\@@_draw_add_to_path:n
{ L ~ \dim_to_decimal:n {#1} ~ \dim_to_decimal:n {#2} }
}
-\cs_new_protected:Npn \@@_draw_rectangle:nnnn #1#2#3#4
+\cs_new_protected:Npn \driver_draw_rectangle:nnnn #1#2#3#4
{
\@@_draw_add_to_path:n
{
@@ -2563,7 +2546,7 @@
Z
}
}
-\cs_new_protected:Npn \@@_draw_curveto:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \driver_draw_curveto:nnnnnn #1#2#3#4#5#6
{
\@@_draw_add_to_path:n
{
@@ -2590,12 +2573,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_evenodd_rule:, \@@_draw_nonzero_rule:}
+% \begin{macro}{\driver_draw_evenodd_rule:, \driver_draw_nonzero_rule:}
% The fill rules here have to be handled as scopes.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_evenodd_rule:
+\cs_new_protected:Npn \driver_draw_evenodd_rule:
{ \@@_draw_scope:n { fill-rule="evenodd" } }
-\cs_new_protected:Npn \@@_draw_nonzero_rule:
+\cs_new_protected:Npn \driver_draw_nonzero_rule:
{ \@@_draw_scope:n { fill-rule="nonzero" } }
% \end{macrocode}
% \end{macro}
@@ -2603,13 +2586,13 @@
% \begin{macro}{\@@_draw_path:n}
% \begin{macro}
% {
-% \@@_draw_closepath: ,
-% \@@_draw_stroke: ,
-% \@@_draw_closestroke: ,
-% \@@_draw_fill: ,
-% \@@_draw_fillstroke: ,
-% \@@_draw_clip: ,
-% \@@_draw_discardpath:
+% \driver_draw_closepath: ,
+% \driver_draw_stroke: ,
+% \driver_draw_closestroke: ,
+% \driver_draw_fill: ,
+% \driver_draw_fillstroke: ,
+% \driver_draw_clip: ,
+% \driver_draw_discardpath:
% }
% \begin{variable}{\g_@@_draw_clip_bool}
% \begin{variable}{\g_@@_draw_path_int}
@@ -2619,7 +2602,7 @@
% for path drawing: not essential but avoids constructing them twice.
% Discarding a path needs a separate function as it's not quite the same.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_closepath:
+\cs_new_protected:Npn \driver_draw_closepath:
{ \@@_draw_add_to_path:n { Z } }
\cs_new_protected:Npn \@@_draw_path:n #1
{
@@ -2652,21 +2635,21 @@
\bool_gset_false:N \g_@@_draw_clip_bool
}
\int_new:N \g_@@_path_int
-\cs_new_protected:Npn \@@_draw_stroke:
+\cs_new_protected:Npn \driver_draw_stroke:
{ \@@_draw_path:n { style="fill:none" } }
-\cs_new_protected:Npn \@@_draw_closestroke:
+\cs_new_protected:Npn \driver_draw_closestroke:
{
- \@@_draw_closepath:
- \@@_draw_stroke:
+ \driver_draw_closepath:
+ \driver_draw_stroke:
}
-\cs_new_protected:Npn \@@_draw_fill:
+\cs_new_protected:Npn \driver_draw_fill:
{ \@@_draw_path:n { style="stroke:none" } }
-\cs_new_protected:Npn \@@_draw_fillstroke:
+\cs_new_protected:Npn \driver_draw_fillstroke:
{ \@@_draw_path:n { } }
-\cs_new_protected:Npn \@@_draw_clip:
+\cs_new_protected:Npn \driver_draw_clip:
{ \bool_gset_true:N \g_@@_draw_clip_bool }
\bool_new:N \g_@@_draw_clip_bool
-\cs_new_protected:Npn \@@_draw_discardpath:
+\cs_new_protected:Npn \driver_draw_discardpath:
{
\bool_if:NT \g_@@_draw_clip_bool
{
@@ -2693,21 +2676,21 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_dash:nn}
+% \begin{macro}{\driver_draw_cap_dash:nn}
% \begin{macro}{\@@_draw_dash:n}
% \begin{macro}{\@@_draw_dash_aux:nn}
-% \begin{macro}{\@@_draw_linewidth:n}
-% \begin{macro}{\@@_draw_miterlimit:n}
+% \begin{macro}{\driver_draw_linewidth:n}
+% \begin{macro}{\driver_draw_miterlimit:n}
% \begin{macro}
% {
-% \@@_draw_cap_butt:, \@@_draw_cap_round:, \@@_draw_cap_rectangle:,
-% \@@_draw_join_miter:, \@@_draw_join_round:, \@@_draw_join_bevel:
+% \driver_draw_cap_butt:, \driver_draw_cap_round:, \driver_draw_cap_rectangle:,
+% \driver_draw_join_miter:, \driver_draw_join_round:, \driver_draw_join_bevel:
% }
% All of these ideas are properties of scopes in SVG. The only slight
% complexity is converting the dash array properly (doing any required
% maths).
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_dash:nn #1#2
+\cs_new_protected:Npn \driver_draw_cap_dash:nn #1#2
{
\use:x
{
@@ -2731,21 +2714,21 @@
stroke-offset=" #2 "
}
}
-\cs_new_protected:Npn \@@_draw_linewidth:n #1
+\cs_new_protected:Npn \driver_draw_linewidth:n #1
{ \@@_draw_scope:x { stroke-width=" \dim_to_decimal:n {#1} " } }
-\cs_new_protected:Npn \@@_draw_miterlimit:n #1
+\cs_new_protected:Npn \driver_draw_miterlimit:n #1
{ \@@_draw_scope:x { stroke-miterlimit=" \fp_eval:n {#1} " } }
-\cs_new_protected:Npn \@@_draw_cap_butt:
+\cs_new_protected:Npn \driver_draw_cap_butt:
{ \@@_draw_scope:n { stroke-linecap="butt" } }
-\cs_new_protected:Npn \@@_draw_cap_round:
+\cs_new_protected:Npn \driver_draw_cap_round:
{ \@@_draw_scope:n { stroke-linecap="round" } }
-\cs_new_protected:Npn \@@_draw_cap_rectangle:
+\cs_new_protected:Npn \driver_draw_cap_rectangle:
{ \@@_draw_scope:n { stroke-linecap="square" } }
-\cs_new_protected:Npn \@@_draw_join_miter:
+\cs_new_protected:Npn \driver_draw_join_miter:
{ \@@_draw_scope:n { stroke-linejoin="miter" } }
-\cs_new_protected:Npn \@@_draw_join_round:
+\cs_new_protected:Npn \driver_draw_join_round:
{ \@@_draw_scope:n { stroke-linejoin="round" } }
-\cs_new_protected:Npn \@@_draw_join_bevel:
+\cs_new_protected:Npn \driver_draw_join_bevel:
{ \@@_draw_scope:n { stroke-linejoin="bevel" } }
% \end{macrocode}
% \end{macro}
@@ -2757,21 +2740,21 @@
%
% \begin{macro}
% {
-% \@@_draw_color_cmyk:nnnn ,
-% \@@_draw_color_cmyk_fill:nnnn ,
-% \@@_draw_color_cmyk_stroke:nnnn
+% \driver_draw_color_cmyk:nnnn ,
+% \driver_draw_fill_cmyk:nnnn ,
+% \driver_draw_stroke_cmyk:nnnn
% }
% \begin{macro}
% {
-% \@@_draw_color_gray:n ,
-% \@@_draw_color_gray_fill:n ,
-% \@@_draw_color_gray_stroke:n
+% \driver_draw_color_gray:n ,
+% \driver_draw_fill_gray:n ,
+% \driver_draw_stroke_gray:n
% }
% \begin{macro}
% {
-% \@@_draw_color_rgb:nnn ,
-% \@@_draw_color_rgb_fill:nnn ,
-% \@@_draw_color_rgb_stroke:nnn
+% \driver_draw_color_rgb:nnn ,
+% \driver_draw_fill_rgb:nnn ,
+% \driver_draw_stroke_rgb:nnn
% }
% SVG only works with RGB colors, so there is some conversion to
% do. The values also need to be given as percentages, which means a
@@ -2788,11 +2771,11 @@
}
#1 #2
}
-\cs_new_protected:Npn \@@_draw_color_cmyk:nnnn
+\cs_new_protected:Npn \driver_draw_color_cmyk:nnnn
{ \@@_draw_color_cmyk_aux:NNnnnnn \c_true_bool \c_true_bool }
-\cs_new_protected:Npn \@@_draw_color_cmyk_fill:nnnn
+\cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn
{ \@@_draw_color_cmyk_aux:NNnnnnn \c_false_bool \c_true_bool }
-\cs_new_protected:Npn \@@_draw_color_cmyk_stroke:nnnn
+\cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn
{ \@@_draw_color_cmyk_aux:NNnnnnn \c_true_bool \c_false_bool }
\cs_new_protected:Npn \@@_draw_color_gray_aux:NNn #1#2#3
{
@@ -2806,11 +2789,11 @@
\cs_new_protected:Npn \@@_draw_color_gray_aux:nNN #1
{ \@@_draw_color_rgb_auxii:nnnNN {#1} {#1} {#1} }
\cs_generate_variant:Nn \@@_draw_color_gray_aux:nNN { x }
-\cs_new_protected:Npn \@@_draw_color_gray:n
+\cs_new_protected:Npn \driver_draw_color_gray:n
{ \@@_draw_color_gray_aux:NNn \c_true_bool \c_true_bool }
-\cs_new_protected:Npn \@@_draw_color_gray_fill:n
+\cs_new_protected:Npn \driver_draw_fill_gray:n
{ \@@_draw_color_gray_aux:NNn \c_false_bool \c_true_bool }
-\cs_new_protected:Npn \@@_draw_color_gray_stroke:n
+\cs_new_protected:Npn \driver_draw_stroke_gray:n
{ \@@_draw_color_gray_aux:NNn \c_true_bool \c_false_bool }
\cs_new_protected:Npn \@@_draw_color_rgb_auxi:NNnnn #1#2#3#4#5
{
@@ -2854,23 +2837,23 @@
}
}
}
-\cs_new_protected:Npn \@@_draw_color_rgb:nnn
+\cs_new_protected:Npn \driver_draw_color_rgb:nnn
{ \@@_draw_color_rgb_auxi:NNnnn \c_true_bool \c_true_bool }
-\cs_new_protected:Npn \@@_draw_color_rgb_fill:nnn
+\cs_new_protected:Npn \driver_draw_fill_rgb:nnn
{ \@@_draw_color_rgb_auxi:NNnnn \c_false_bool \c_true_bool }
-\cs_new_protected:Npn \@@_draw_color_rgb_stroke:nnn
+\cs_new_protected:Npn \driver_draw_stroke_rgb:nnn
{ \@@_draw_color_rgb_auxi:NNnnn \c_true_bool \c_false_bool }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_draw_transformcm:nnnnnn}
+% \begin{macro}{\driver_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
% two are a displacement vector. Once again, force evaluation to allow for
% caching.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_transformcm:nnnnnn #1#2#3#4#5#6
+\cs_new_protected:Npn \driver_draw_transformcm:nnnnnn #1#2#3#4#5#6
{
\@@_draw_scope:x
{
@@ -2888,15 +2871,15 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_draw_hbox:Nnnnnnn}
+% \begin{macro}{\driver_draw_hbox:Nnnnnnn}
% No special savings can be made here: simply displace the box inside
% a scope. As there is nothing to re-box, just make the box passed of
% zero size.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7
+\cs_new_protected:Npn \driver_draw_hbox:Nnnnnnn #1#2#3#4#5#6#7
{
\@@_scope_begin:
- \@@_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} {#6} {#7}
+ \driver_draw_transformcm:nnnnnn {#2} {#3} {#4} {#5} {#6} {#7}
\@@_literal:n
{
< g~
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index 5479105b596..d932e646c2f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -120,7 +120,8 @@
% denote primitives that should not be used directly.
% \end{itemize}
%
-% \begin{function}[updated = 2017-11-28]{\cs_generate_variant:Nn}
+% \begin{function}[updated = 2017-11-28]
+% {\cs_generate_variant:Nn, \cs_generate_variant:cn}
% \begin{syntax}
% \cs{cs_generate_variant:Nn} \meta{parent control sequence} \Arg{variant argument specifiers}
% \end{syntax}
@@ -1546,7 +1547,7 @@
%<@@=cs>
% \end{macrocode}
%
-% \begin{macro}{\cs_generate_variant:Nn}
+% \begin{macro}{\cs_generate_variant:Nn, \cs_generate_variant:cn}
% \begin{arguments}
% \item Base form of a function; \emph{e.g.},~\cs{tl_set:Nn}
% \item One or more variant argument specifiers; e.g., |{Nx,c,cx}|
@@ -1570,6 +1571,8 @@
\exp_after:wN #1
\tl_to_str:n {#2} , \scan_stop: , \q_recursion_stop
}
+\cs_new_protected:Npn \cs_generate_variant:cn
+ { \exp_args:Nc \cs_generate_variant:Nn }
% \end{macrocode}
% \end{macro}
%
@@ -1992,6 +1995,61 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}
+% {
+% \prg_generate_conditional_variant:Nnn,
+% \@@_generate_variant:nnNnn,
+% \@@_generate_variant:w,
+% \@@_generate_variant:n,
+% \@@_generate_variant_p_form:nnn,
+% \@@_generate_variant_T_form:nnn,
+% \@@_generate_variant_F_form:nnn,
+% \@@_generate_variant_TF_form:nnn,
+% }
+% \begin{macrocode}
+\cs_new_protected:Npn \prg_generate_conditional_variant:Nnn #1
+ { \__cs_split_function:NN #1 \@@_generate_variant:nnNnn }
+\cs_new_protected:Npn \@@_generate_variant:nnNnn #1#2#3#4#5
+ {
+ \if_meaning:w \c_false_bool #3
+ \__msg_kernel_error:nnx { kernel } { missing-colon }
+ { \token_to_str:c {#1} }
+ \use_i_delimit_by_q_stop:nw
+ \fi:
+ \exp_after:wN \@@_generate_variant:w
+ \tl_to_str:n {#5} , \scan_stop: , \q_recursion_stop
+ \use_none_delimit_by_q_stop:w \q_mark {#1} {#2} {#4} \q_stop
+ }
+\cs_new_protected:Npn \@@_generate_variant:w
+ #1 , #2 \q_mark #3#4#5
+ {
+ \if_meaning:w \scan_stop: #1 \scan_stop:
+ \if_meaning:w \q_nil #1 \q_nil
+ \use_i:nnn
+ \fi:
+ \exp_after:wN \use_none_delimit_by_q_recursion_stop:w
+ \else:
+ \cs_if_exist_use:cTF { @@_generate_variant_#1_form:nnn }
+ { {#3} {#4} {#5} }
+ {
+ \__msg_kernel_error:nnxx
+ { kernel } { conditional-form-unknown }
+ {#1} { \token_to_str:c { #3 : #4 } }
+ }
+ \fi:
+ \@@_generate_variant:w #2 \q_mark {#3} {#4} {#5}
+ }
+\cs_new_protected:Npn \@@_generate_variant_p_form:nnn #1#2
+ { \cs_generate_variant:cn { #1 _p : #2 } }
+\cs_new_protected:Npn \@@_generate_variant_T_form:nnn #1#2
+ { \cs_generate_variant:cn { #1 : #2 T } }
+\cs_new_protected:Npn \@@_generate_variant_F_form:nnn #1#2
+ { \cs_generate_variant:cn { #1 : #2 F } }
+\cs_new_protected:Npn \@@_generate_variant_TF_form:nnn #1#2
+ { \cs_generate_variant:cn { #1 : #2 TF } }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 271a66e704f..211c204a7d8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -600,7 +600,7 @@
% and MiK\TeX{} systems.
% \end{variable}
%
-% \subsection{Constant input--output streams}
+% \subsection{Constant input--output streams, and variables}
%
% \begin{variable}{\c_term_ior}
% Constant input stream for reading from the terminal. Reading from this
@@ -611,11 +611,25 @@
% \end{verbatim}
% \end{variable}
%
+% \begin{variable}[added = 2017-12-11]{\g_tmpa_ior, \g_tmpb_ior}
+% Scratch input stream for global use. 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}
+%
% \begin{variable}{\c_log_iow, \c_term_iow}
% Constant output streams for writing to the log and to the terminal
% (plus the log), respectively.
% \end{variable}
%
+% \begin{variable}[added = 2017-12-11]{\g_tmpa_iow, \g_tmpb_iow}
+% Scratch output stream for global use. 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}
+%
% \subsection{Primitive conditionals}
%
% \begin{function}[EXP]{\if_eof:w}
@@ -1216,6 +1230,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\g_tmpa_ior, \g_tmpb_ior}
+% The usual scratch space.
+% \begin{macrocode}
+\ior_new:N \g_tmpa_ior
+\ior_new:N \g_tmpb_ior
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\ior_open:Nn, \ior_open:cn}
% Use the conditional version, with an error if the file is not found.
% \begin{macrocode}
@@ -1241,9 +1263,7 @@
\prg_return_true:
}
}
-\cs_generate_variant:Nn \ior_open:NnT { c }
-\cs_generate_variant:Nn \ior_open:NnF { c }
-\cs_generate_variant:Nn \ior_open:NnTF { c }
+\prg_generate_conditional_variant:Nnn \ior_open:Nn { c } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1560,6 +1580,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\g_tmpa_iow, \g_tmpb_iow}
+% The usual scratch space.
+% \begin{macrocode}
+\iow_new:N \g_tmpa_iow
+\iow_new:N \g_tmpb_iow
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\@@_new:N}
% As for read streams, copy \tn{newwrite} in package mode, making sure
% that it is not \tn{outer}.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
index babef188b69..3ab6b77bbb5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3final.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
index 81b44527cee..6df896757a3 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3flag.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
index 165aa66f09a..c7e6b55d65a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-assign.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
% \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 a62a2eb6718..9b6d2366310 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
index 20cf9ed759c..8f7e365eeec 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-basics.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
index 3d6a2b04121..c727afc5696 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-convert.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index e04403ccadb..715a3cf5339 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index d4b82639a68..0e24d860cce 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
index 6008c321da8..d8cfecfbc28 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-logic.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 8b3157fa376..03bd96b4b81 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
index 1ae8f1727c1..cc1864eb9eb 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-random.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
index 46122b59ead..2b088b5832e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-round.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index 61aab83a401..bdc717a2221 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
% \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 f5ffadf5220..73c97574dd4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-trig.dtx
@@ -38,7 +38,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
index a927a2344fe..54019a2baaf 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index f0e0cca5938..53945625ced 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -1307,12 +1307,10 @@
% \begin{macrocode}
\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \int_set_eq:NN #1#2 { #1 = #2 }
-\cs_generate_variant:Nn \int_set_eq:NN { c }
-\cs_generate_variant:Nn \int_set_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \int_set_eq:NN { c , Nc , cc }
\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \int_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
-\cs_generate_variant:Nn \int_gset_eq:NN { c }
-\cs_generate_variant:Nn \int_gset_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \int_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
index 3441f7ab0d7..a2bb2d9e1fd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3intarray.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index c6d11150a4d..1ccd2b357c2 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 581b8e8469b..2cbe4a5b78f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index b3810e18fff..940c93558ed 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 66f91b4b932..d41bd08ab72 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
index a46bef6643c..d24e44b4f9f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3oldmodules.dtx
@@ -42,7 +42,7 @@
% }
%
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 6c4bb867e3b..c6456f25a63 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -880,10 +880,7 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \bool_if_p:N { c }
-\cs_generate_variant:Nn \bool_if:NT { c }
-\cs_generate_variant:Nn \bool_if:NF { c }
-\cs_generate_variant:Nn \bool_if:NTF { c }
+\prg_generate_conditional_variant:Nnn \bool_if:N { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 303ce59414d..ddbc1f46644 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -894,12 +894,8 @@
}
{ \prg_return_false: }
}
-\cs_generate_variant:Nn \prop_pop:NnNT { c }
-\cs_generate_variant:Nn \prop_pop:NnNF { c }
-\cs_generate_variant:Nn \prop_pop:NnNTF { c }
-\cs_generate_variant:Nn \prop_gpop:NnNT { c }
-\cs_generate_variant:Nn \prop_gpop:NnNF { c }
-\cs_generate_variant:Nn \prop_gpop:NnNTF { c }
+\prg_generate_conditional_variant:Nnn \prop_pop:NnN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \prop_gpop:NnN { c } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1009,10 +1005,8 @@
\tl_if_eq:NNTF #1 \c_empty_prop
\prg_return_true: \prg_return_false:
}
-\cs_generate_variant:Nn \prop_if_empty_p:N { c }
-\cs_generate_variant:Nn \prop_if_empty:NT { c }
-\cs_generate_variant:Nn \prop_if_empty:NF { c }
-\cs_generate_variant:Nn \prop_if_empty:NTF { c }
+\prg_generate_conditional_variant:Nnn \prop_if_empty:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1073,14 +1067,8 @@
\fi:
\__prg_break:
}
-\cs_generate_variant:Nn \prop_if_in_p:Nn { NV , No }
-\cs_generate_variant:Nn \prop_if_in_p:Nn { c , cV , co }
-\cs_generate_variant:Nn \prop_if_in:NnT { NV , No }
-\cs_generate_variant:Nn \prop_if_in:NnT { c , cV , co }
-\cs_generate_variant:Nn \prop_if_in:NnF { NV , No }
-\cs_generate_variant:Nn \prop_if_in:NnF { c , cV , co }
-\cs_generate_variant:Nn \prop_if_in:NnTF { NV , No }
-\cs_generate_variant:Nn \prop_if_in:NnTF { c , cV , co }
+\prg_generate_conditional_variant:Nnn \prop_if_in:Nn
+ { NV , No , c , cV , co } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1105,12 +1093,8 @@
}
{ \prg_return_false: }
}
-\cs_generate_variant:Nn \prop_get:NnNT { NV , No }
-\cs_generate_variant:Nn \prop_get:NnNF { NV , No }
-\cs_generate_variant:Nn \prop_get:NnNTF { NV , No }
-\cs_generate_variant:Nn \prop_get:NnNT { c , cV , co }
-\cs_generate_variant:Nn \prop_get:NnNF { c , cV , co }
-\cs_generate_variant:Nn \prop_get:NnNTF { c , cV , co }
+\prg_generate_conditional_variant:Nnn \prop_get:NnN
+ { NV , No , c , cV , co } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1143,8 +1127,7 @@
#1 {#3} {#4}
\@@_map_function:Nwwn #1
}
-\cs_generate_variant:Nn \prop_map_function:NN { Nc }
-\cs_generate_variant:Nn \prop_map_function:NN { c , cc }
+\cs_generate_variant:Nn \prop_map_function:NN { Nc , c , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index a63a99c1385..8a1adeb756a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -522,10 +522,8 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \quark_if_no_value_p:N { c }
-\cs_generate_variant:Nn \quark_if_no_value:NT { c }
-\cs_generate_variant:Nn \quark_if_no_value:NF { c }
-\cs_generate_variant:Nn \quark_if_no_value:NTF { c }
+\prg_generate_conditional_variant:Nnn \quark_if_no_value:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -562,10 +560,8 @@
{ \@@_if_no_value:w {} #1 {} ? ! \q_no_value ? ? ! }
}
\cs_new:Npn \@@_if_no_value:w #1 \q_no_value #2 ? #3 ? ! { #1 #2 }
-\cs_generate_variant:Nn \quark_if_nil_p:n { V , o }
-\cs_generate_variant:Nn \quark_if_nil:nTF { V , o }
-\cs_generate_variant:Nn \quark_if_nil:nT { V , o }
-\cs_generate_variant:Nn \quark_if_nil:nF { V , o }
+\prg_generate_conditional_variant:Nnn \quark_if_nil:n
+ { V , o } { p , TF , T , F }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
index 80aa7a25547..3808ec66d17 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3regex.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -118,21 +118,21 @@
% possible, thus avoiding matching underscores.
% \item |[+-]?\d+| matches an explicit integer with at most one
% sign.
-% \item \verb*"[+-\ ]*\d+\ *" matches an explicit integer with any
+% \item \verb*"[+\-\ ]*\d+\ *" matches an explicit integer with any
% number of $+$ and $-$ signs, with spaces allowed except within the
% mantissa, and sourrounded by spaces.
-% \item \verb*"[+-\ ]*(\d+|\d*\.\d+)\ *" matches an explict integer or
+% \item \verb*"[+\-\ ]*(\d+|\d*\.\d+)\ *" matches an explict integer or
% decimal number; using \verb*"[.,]" instead of \verb*"\." would allow
% the comma as a decimal marker.
% \item
-% \verb*"[+-\ ]*(\d+|\d*\.\d+)\ *((?i)pt|in|[cem]m|ex|[bs]p|[dn]d|[pcn]c)\ *"
-% matches an explicit dimension with any unit that \TeX{} knows, where
+% \verb*"[+\-\ ]*(\d+|\d*\.\d+)\ *((?i)pt|in|[cem]m|ex|[bs]p|[dn]d|[pcn]c)\ *"
+% \allowbreak matches an explicit dimension with any unit that \TeX{} knows, where
% \verb*"(?i)" means to treat lowercase and uppercase letters
% identically.
-% \item \verb*"[+-\ ]*((?i)nan|inf|(\d+|\d*\.\d+)(\ *e[+-\ ]*\d+)?)\ *"
+% \item \verb*"[+\-\ ]*((?i)nan|inf|(\d+|\d*\.\d+)(\ *e[+-\ ]*\d+)?)\ *"
% matches an explicit floating point number or the special values
-% \verb*"nan" and \verb*"inf" (with signs).
-% \item \verb*"[+-\ ]*(\d+|\cC.)\ *" matches an explicit integer or
+% \verb*"nan" and \verb*"inf" (with signs and spaces allowed).
+% \item \verb*"[+\-\ ]*(\d+|\cC.)\ *" matches an explicit integer or
% control sequence (without checking whether it is an integer
% variable).
% \item |\G.*?\K| at the beginning of a regular expression matches and
@@ -143,7 +143,7 @@
% \cs{regex_extract_all:nnN}.
% \end{itemize}
% While it is impossible for a regular expression to match only integer
-% expressions, \verb*"[+-\(]*\d+\)*([+-*/][+-\(]*\d+\)*)*" matches among
+% expressions, \verb*"[+\-\(]*\d+\)*([+\-*/][+\-\(]*\d+\)*)*" matches among
% other things all valid integer expressions (made only with explicit
% integers). One should follow it with further testing.
%
@@ -663,6 +663,22 @@
% locally to \meta{tl~var}.
% \end{function}
%
+% \subsection{Constants and variables}
+%
+% \begin{variable}[added = 2017-12-11]{\l_tmpa_regex, \l_tmpb_regex}
+% Scratch regex for local 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}
+%
+% \begin{variable}[added = 2017-12-11]{\g_tmpa_regex, \g_tmpb_regex}
+% Scratch regex 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}
+%
% \subsection{Bugs, misfeatures, future work, and other possibilities}
%
% The following need to be done now.
@@ -5587,6 +5603,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\l_tmpa_regex, \l_tmpb_regex, \g_tmpa_regex, \g_tmpb_regex}
+% The usual scratch space.
+% \begin{macrocode}
+\regex_new:N \l_tmpa_regex
+\regex_new:N \l_tmpb_regex
+\regex_new:N \g_tmpa_regex
+\regex_new:N \g_tmpb_regex
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\regex_set:Nn, \regex_gset:Nn, \regex_const:Nn}
% Compile, then store the result in the user variable with the
% appropriate assignment function.
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 75f1273c32e..0182e9bf0b5 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -1415,10 +1415,8 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \seq_if_empty_p:N { c }
-\cs_generate_variant:Nn \seq_if_empty:NT { c }
-\cs_generate_variant:Nn \seq_if_empty:NF { c }
-\cs_generate_variant:Nn \seq_if_empty:NTF { c }
+\prg_generate_conditional_variant:Nnn \seq_if_empty:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1457,12 +1455,8 @@
}
\cs_new:Npn \@@_if_in:
{ \__prg_break:n { \group_end: \prg_return_true: } }
-\cs_generate_variant:Nn \seq_if_in:NnT { NV , Nv , No , Nx }
-\cs_generate_variant:Nn \seq_if_in:NnT { c , cV , cv , co , cx }
-\cs_generate_variant:Nn \seq_if_in:NnF { NV , Nv , No , Nx }
-\cs_generate_variant:Nn \seq_if_in:NnF { c , cV , cv , co , cx }
-\cs_generate_variant:Nn \seq_if_in:NnTF { NV , Nv , No , Nx }
-\cs_generate_variant:Nn \seq_if_in:NnTF { c , cV , cv , co , cx }
+\prg_generate_conditional_variant:Nnn \seq_if_in:Nn
+ { NV , Nv , No , Nx , c , cV , cv , co , cx } { T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1638,12 +1632,10 @@
{ \@@_pop_TF:NNNN \prg_do_nothing: \seq_get_left:NN #1#2 }
\prg_new_protected_conditional:Npnn \seq_get_right:NN #1#2 { T , F , TF }
{ \@@_pop_TF:NNNN \prg_do_nothing: \seq_get_right:NN #1#2 }
-\cs_generate_variant:Nn \seq_get_left:NNT { c }
-\cs_generate_variant:Nn \seq_get_left:NNF { c }
-\cs_generate_variant:Nn \seq_get_left:NNTF { c }
-\cs_generate_variant:Nn \seq_get_right:NNT { c }
-\cs_generate_variant:Nn \seq_get_right:NNF { c }
-\cs_generate_variant:Nn \seq_get_right:NNTF { c }
+\prg_generate_conditional_variant:Nnn \seq_get_left:NN
+ { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \seq_get_right:NN
+ { c } { T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1662,18 +1654,10 @@
{ \@@_pop_TF:NNNN \@@_pop_right:NNN \tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2 { T , F , TF }
{ \@@_pop_TF:NNNN \@@_pop_right:NNN \tl_gset:Nx #1 #2 }
-\cs_generate_variant:Nn \seq_pop_left:NNT { c }
-\cs_generate_variant:Nn \seq_pop_left:NNF { c }
-\cs_generate_variant:Nn \seq_pop_left:NNTF { c }
-\cs_generate_variant:Nn \seq_gpop_left:NNT { c }
-\cs_generate_variant:Nn \seq_gpop_left:NNF { c }
-\cs_generate_variant:Nn \seq_gpop_left:NNTF { c }
-\cs_generate_variant:Nn \seq_pop_right:NNT { c }
-\cs_generate_variant:Nn \seq_pop_right:NNF { c }
-\cs_generate_variant:Nn \seq_pop_right:NNTF { c }
-\cs_generate_variant:Nn \seq_gpop_right:NNT { c }
-\cs_generate_variant:Nn \seq_gpop_right:NNF { c }
-\cs_generate_variant:Nn \seq_gpop_right:NNTF { c }
+\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \seq_pop_right:NN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \seq_gpop_right:NN { c } { T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index a20a48ccc66..be237db6c17 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -1171,13 +1171,11 @@
\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \dim_set_eq:NN #1#2
{ #1 = #2 \scan_stop: }
-\cs_generate_variant:Nn \dim_set_eq:NN { c }
-\cs_generate_variant:Nn \dim_set_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \dim_set_eq:NN { c , Nc , cc }
\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \dim_gset_eq:NN #1#2
{ \tex_global:D #1 = #2 \scan_stop: }
-\cs_generate_variant:Nn \dim_gset_eq:NN { c }
-\cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \dim_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1766,11 +1764,9 @@
% All straightforward.
% \begin{macrocode}
\cs_new_protected:Npn \skip_set_eq:NN #1#2 { #1 = #2 }
-\cs_generate_variant:Nn \skip_set_eq:NN { c }
-\cs_generate_variant:Nn \skip_set_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \skip_set_eq:NN { c , Nc , cc }
\cs_new_protected:Npn \skip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
-\cs_generate_variant:Nn \skip_gset_eq:NN { c }
-\cs_generate_variant:Nn \skip_gset_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \skip_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2073,12 +2069,10 @@
% \begin{macrocode}
\__debug_patch:nnNNpn { \__debug_chk_var_local:N #1 } { }
\cs_new_protected:Npn \muskip_set_eq:NN #1#2 { #1 = #2 }
-\cs_generate_variant:Nn \muskip_set_eq:NN { c }
-\cs_generate_variant:Nn \muskip_set_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \muskip_set_eq:NN { c , Nc , cc }
\__debug_patch:nnNNpn { \__debug_chk_var_global:N #1 } { }
\cs_new_protected:Npn \muskip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
-\cs_generate_variant:Nn \muskip_gset_eq:NN { c }
-\cs_generate_variant:Nn \muskip_gset_eq:NN { Nc , cc }
+\cs_generate_variant:Nn \muskip_gset_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
index fdbf90b082a..d4fa71146b4 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sort.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
index 2c1d4158c55..f192b81948d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3str.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -1163,14 +1163,8 @@
= 0 \exp_stop_f:
\prg_return_true: \else: \prg_return_false: \fi:
}
-\cs_generate_variant:Nn \str_if_eq_p:nn { V , o }
-\cs_generate_variant:Nn \str_if_eq_p:nn { nV , no , VV }
-\cs_generate_variant:Nn \str_if_eq:nnT { V , o }
-\cs_generate_variant:Nn \str_if_eq:nnT { nV , no , VV }
-\cs_generate_variant:Nn \str_if_eq:nnF { V , o }
-\cs_generate_variant:Nn \str_if_eq:nnF { nV , no , VV }
-\cs_generate_variant:Nn \str_if_eq:nnTF { V , o }
-\cs_generate_variant:Nn \str_if_eq:nnTF { nV , no , VV }
+\prg_generate_conditional_variant:Nnn \str_if_eq:nn
+ { V , o , nV , no , VV } { p , T , F , TF }
\prg_new_conditional:Npnn \str_if_eq_x:nn #1#2 { p , T , F , TF }
{
\if_int_compare:w \@@_if_eq_x:nn {#1} {#2} = 0 \exp_stop_f:
@@ -1189,14 +1183,12 @@
\if_int_compare:w \@@_if_eq_x:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
= 0 \exp_stop_f: \prg_return_true: \else: \prg_return_false: \fi:
}
-\cs_generate_variant:Nn \str_if_eq:NNT { c , Nc , cc }
-\cs_generate_variant:Nn \str_if_eq:NNF { c , Nc , cc }
-\cs_generate_variant:Nn \str_if_eq:NNTF { c , Nc , cc }
-\cs_generate_variant:Nn \str_if_eq_p:NN { c , Nc , cc }
+\prg_generate_conditional_variant:Nnn \str_if_eq:NN
+ { c , Nc , cc } { T , F , TF , p }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[TF]{\str_if_in:Nn, \str_if_in:cn \str_if_in:nn}
+% \begin{macro}[TF]{\str_if_in:Nn, \str_if_in:cn, \str_if_in:nn}
% Everything here needs to be detokenized but beyond that it is a
% simple token list test. It would be faster to fine-tune the |T|,
% |F|, |TF| variants by calling the appropriate variant of
@@ -1208,9 +1200,8 @@
{ \tl_if_in:nnTF { \tl_to_str:N #1 } { \tl_to_str:n {#2} } }
{ \prg_return_true: } { \prg_return_false: }
}
-\cs_generate_variant:Nn \str_if_in:NnT { c }
-\cs_generate_variant:Nn \str_if_in:NnF { c }
-\cs_generate_variant:Nn \str_if_in:NnTF { c }
+\prg_generate_conditional_variant:Nnn \str_if_in:Nn
+ { c } { T , F , TF }
\prg_new_protected_conditional:Npnn \str_if_in:nn #1#2 { T , F , TF }
{
\use:x
@@ -1251,9 +1242,8 @@
\cs_new:Npn \@@_case:nnTF #1#2#3#4
{ \@@_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop }
\cs_generate_variant:Nn \str_case:nn { o , nV , nv }
-\cs_generate_variant:Nn \str_case:nnT { o , nV , nv }
-\cs_generate_variant:Nn \str_case:nnF { o , nV , nv }
-\cs_generate_variant:Nn \str_case:nnTF { o , nV , nv }
+\prg_generate_conditional_variant:Nnn \str_case:nn
+ { o , nV , nv } { T , F , TF }
\cs_new:Npn \@@_case:nw #1#2#3
{
\str_if_eq:nnTF {#1} {#2}
@@ -1297,8 +1287,11 @@
% \subsection{Mapping to strings}
%
% \begin{macro}[rEXP]{\str_map_function:NN, \str_map_function:cN}
+% \begin{macro}[rEXP]{\str_map_function:nN}
% \begin{macro}{\str_map_inline:Nn, \str_map_inline:cn}
+% \begin{macro}{\str_map_inline:nn}
% \begin{macro}{\str_map_variable:NNn, \str_map_variable:cNn}
+% \begin{macro}{\str_map_variable:nNn}
% \begin{macro}{\str_map_break:}
% \begin{macro}{\str_map_break:n}
% \begin{macro}[rEXP]{\@@_map_function:w, \@@_map_function:Nn}
@@ -1395,6 +1388,9 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Accessing specific characters in a string}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
index ca66e140933..dc275b1236e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3sys.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
index 99b729d8ed5..f84510166f1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-analysis.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
index 5c59209de34..a6a7a25e4cd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl-build.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index 52ebf4eb95c..086b68ffdde 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -1900,14 +1900,8 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \tl_if_blank:n #1 { p , T , F , TF }
{ \@@_if_empty_return:o { \use_none:n #1 ? } }
-\cs_generate_variant:Nn \tl_if_blank_p:n { V }
-\cs_generate_variant:Nn \tl_if_blank:nT { V }
-\cs_generate_variant:Nn \tl_if_blank:nF { V }
-\cs_generate_variant:Nn \tl_if_blank:nTF { V }
-\cs_generate_variant:Nn \tl_if_blank_p:n { o }
-\cs_generate_variant:Nn \tl_if_blank:nT { o }
-\cs_generate_variant:Nn \tl_if_blank:nF { o }
-\cs_generate_variant:Nn \tl_if_blank:nTF { o }
+\prg_generate_conditional_variant:Nnn \tl_if_blank:n
+ { V , o } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1924,10 +1918,8 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \tl_if_empty_p:N { c }
-\cs_generate_variant:Nn \tl_if_empty:NT { c }
-\cs_generate_variant:Nn \tl_if_empty:NF { c }
-\cs_generate_variant:Nn \tl_if_empty:NTF { c }
+\prg_generate_conditional_variant:Nnn \tl_if_empty:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -1954,10 +1946,8 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \tl_if_empty_p:n { V }
-\cs_generate_variant:Nn \tl_if_empty:nTF { V }
-\cs_generate_variant:Nn \tl_if_empty:nT { V }
-\cs_generate_variant:Nn \tl_if_empty:nF { V }
+\prg_generate_conditional_variant:Nnn \tl_if_empty:n
+ { V } { p , TF , T , F }
% \end{macrocode}
% \end{macro}
%
@@ -2000,10 +1990,8 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \tl_if_eq_p:NN { Nc , c , cc }
-\cs_generate_variant:Nn \tl_if_eq:NNTF { Nc , c , cc }
-\cs_generate_variant:Nn \tl_if_eq:NNT { Nc , c , cc }
-\cs_generate_variant:Nn \tl_if_eq:NNF { Nc , c , cc }
+\prg_generate_conditional_variant:Nnn \tl_if_eq:NN
+ { Nc , c , cc } { p , TF , T , F }
% \end{macrocode}
% \end{macro}
%
@@ -2037,9 +2025,8 @@
\cs_new_protected:Npn \tl_if_in:NnT { \exp_args:No \tl_if_in:nnT }
\cs_new_protected:Npn \tl_if_in:NnF { \exp_args:No \tl_if_in:nnF }
\cs_new_protected:Npn \tl_if_in:NnTF { \exp_args:No \tl_if_in:nnTF }
-\cs_generate_variant:Nn \tl_if_in:NnT { c }
-\cs_generate_variant:Nn \tl_if_in:NnF { c }
-\cs_generate_variant:Nn \tl_if_in:NnTF { c }
+\prg_generate_conditional_variant:Nnn \tl_if_in:Nn
+ { c } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
@@ -2069,13 +2056,12 @@
{ \prg_return_false: } { \prg_return_true: }
\if_false: } \fi:
}
-\cs_generate_variant:Nn \tl_if_in:nnT { V , o , no }
-\cs_generate_variant:Nn \tl_if_in:nnF { V , o , no }
-\cs_generate_variant:Nn \tl_if_in:nnTF { V , o , no }
+\prg_generate_conditional_variant:Nnn \tl_if_in:nn
+ { V , o , no } { T , F , TF }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[TF, EXP]{\tl_if_novalue:n}
+% \begin{macro}[pTF, EXP]{\tl_if_novalue:n}
% \begin{macro}[EXP]{\@@_if_novalue:w}
% Tests for |-NoValue-|: this is similar to \cs{tl_if_in:nn} but set
% up to be expandable and to check the value exactly. The question
@@ -2084,7 +2070,7 @@
\use:x
{
\prg_new_conditional:Npnn \exp_not:N \tl_if_novalue:n ##1
- { T , F , TF }
+ { p , T , F , TF }
{
\exp_not:N \str_if_eq:onTF
{
@@ -2187,9 +2173,8 @@
{ \@@_case:Nw #1 }
}
\cs_generate_variant:Nn \tl_case:Nn { c }
-\cs_generate_variant:Nn \tl_case:NnT { c }
-\cs_generate_variant:Nn \tl_case:NnF { c }
-\cs_generate_variant:Nn \tl_case:NnTF { c }
+\prg_generate_conditional_variant:Nnn \tl_case:Nn
+ { c } { T , F , TF }
% \end{macrocode}
% To tidy up the recursion, there are two outcomes. If there was a hit to
% one of the cases searched for, then |#1| is the code to insert,
@@ -2756,10 +2741,8 @@
\prg_return_false:
\fi:
}
-\cs_generate_variant:Nn \tl_if_head_eq_charcode_p:nN { f }
-\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { f }
-\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNT { f }
-\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNF { f }
+\prg_generate_conditional_variant:Nnn \tl_if_head_eq_charcode:nN
+ { f } { p , TF , T , F }
% \end{macrocode}
% For \cs{tl_if_head_eq_catcode:nN}, again we detect special cases
% with a \cs{tl_if_head_is_N_type:n}. Then we need to test if the
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 5c72190f6b8..cca43cdd93c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
index b904af63032..fa581df7a07 100644
--- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
@@ -23,8 +23,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2017/12/05]
-%<package>\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+%<package>\@ifpackagelater{expl3}{2017/12/16}
%<package> {}
%<package> {%
%<package> \PackageError{l3keys2e}{Support package l3kernel too old}
@@ -60,7 +60,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -131,7 +131,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3keys2e}{2017/12/05}{}
+\ProvidesExplPackage{l3keys2e}{2017/12/16}{}
{LaTeX2e option processing using LaTeX3 keys}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx
index 56b1613bab5..fae989a5d14 100644
--- a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx
@@ -23,8 +23,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2017/12/05]
-%<package>\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+%<package>\@ifpackagelater{expl3}{2017/12/16}
%<package> {}
%<package> {%
%<package> \PackageError{xfp}{Support package l3kernel too old}
@@ -62,7 +62,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -159,7 +159,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfp}{2017/12/05}{}
+\ProvidesExplPackage{xfp}{2017/12/16}{}
{L3 Floating point unit}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx
index 57c52c61b36..54057c4b5b4 100644
--- a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx
@@ -24,8 +24,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2017/12/05]
-%<package>\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+%<package>\@ifpackagelater{expl3}{2017/12/16}
%<package> {}
%<package> {%
%<package> \PackageError{xfrac}{Support package l3kernel too old}
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -533,7 +533,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfrac}{2017/12/05}{}
+\ProvidesExplPackage{xfrac}{2017/12/16}{}
{L3 Experimental split-level fractions}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
index 7dfc3d4d0eb..1cf07be68d5 100644
--- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
@@ -27,8 +27,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2017/12/05]
-%<package>\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+%<package>\@ifpackagelater{expl3}{2017/12/16}
%<package> {}
%<package> {%
%<package> \PackageError{xparse}{Support package l3kernel too old}
@@ -67,7 +67,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -520,14 +520,14 @@
%
% \begin{function}[EXP]{\IfBooleanT, \IfBooleanF, \IfBooleanTF}
% \begin{syntax}
-% \cs{IfBooleanTF} \meta{argument} \Arg{true code} \Arg{false code}
+% \cs{IfBooleanTF} \Arg{argument} \Arg{true code} \Arg{false code}
% \end{syntax}
% Used to test if \meta{argument} (|#1|, |#2|, \emph{etc.}) is
% \cs{BooleanTrue} or \cs{BooleanFalse}. For example
% \begin{verbatim}
% \NewDocumentCommand \foo { s m }
% {
-% \IfBooleanTF #1
+% \IfBooleanTF {#1}
% { \DoSomethingWithStar {#2} }
% { \DoSomethingWithoutStar {#2} }
% }
@@ -776,7 +776,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xparse}{2017/12/05}{}
+\ProvidesExplPackage{xparse}{2017/12/16}{}
{L3 Experimental document command parser}
% \end{macrocode}
%
@@ -4042,6 +4042,13 @@
(or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
argument~with~expandable~commands.
}
+\__msg_kernel_new:nnnn { xparse } { if-boolean }
+ { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
+ {
+ \c__msg_coding_error_text_tl
+ The~first~argument~of~\iow_char:N\\IfBoolean(TF/T/F)~must~be~
+ a~boolean~argument~obtained~from~parsing~'s'~or~'t'~arguments.
+ }
\__msg_kernel_new:nnnn { xparse } { inconsistent-long }
{ Inconsistent~long~arguments~for~expandable~command~'#1'. }
{
@@ -4377,9 +4384,19 @@
% normal \cs{c_true_bool} and \cs{c_false_bool}, so testing for them is
% done with the \cs{bool_if:NTF} functions from \textsf{l3prg}.
% \begin{macrocode}
-\cs_new_eq:NN \IfBooleanTF \bool_if:NTF
-\cs_new_eq:NN \IfBooleanT \bool_if:NT
-\cs_new_eq:NN \IfBooleanF \bool_if:NF
+\cs_new:Npn \IfBooleanTF #1
+ {
+ \bool_lazy_and:nnTF
+ { \tl_if_single_p:n {#1} }
+ { \tl_if_single_token_p:n #1 }
+ { \bool_if:NTF #1 }
+ {
+ \__msg_kernel_error:nnn { xparse } { if-boolean } {#1}
+ \use_ii:nn
+ }
+ }
+\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
+\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
index feffe2b561c..3d85476d9a4 100644
--- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
@@ -27,8 +27,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2017/12/05]
-%<package>\@ifpackagelater{expl3}{2017/12/05}
+\RequirePackage{expl3}[2017/12/16]
+%<package>\@ifpackagelater{expl3}{2017/12/16}
%<package> {}
%<package> {%
%<package> \PackageError{xtemplate}{Support package l3kernel too old}
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/05}
+% \date{Released 2017/12/16}
%
% \maketitle
%
@@ -682,7 +682,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xtemplate}{2017/12/05}{}
+\ProvidesExplPackage{xtemplate}{2017/12/16}{}
{L3 Experimental prototype document functions}
% \end{macrocode}
%