summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx40
1 files changed, 24 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx
index 58e6b1b7706..ffb0ebb92f0 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx
@@ -36,8 +36,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}[2015/07/28]
-%<package>\@ifpackagelater{expl3}{2015/07/28}
+\RequirePackage{expl3}[2015/09/06]
+%<package>\@ifpackagelater{expl3}{2015/09/06}
%<package> {}
%<package> {%
%<package> \PackageError{l3str}{Support package l3kernel too old}
@@ -49,7 +49,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3str-expl.dtx 5700 2015-07-28 19:26:39Z joseph $
+\GetIdInfo$Id: l3str-expl.dtx 5925 2015-09-06 09:25:46Z joseph $
{L3 Experimental strings}
\def\ExplFileName{l3str}
%</driver|package>
@@ -455,9 +455,17 @@
% \c_percent_str
% }
% For all of those strings, use \cs{cs_to_str:N} to get characters with
-% the correct category code.
+% the correct category code. The conditional for \cs{c_backslash_str}
+% is needed as while this code is experimental others may also
+% define the name (see \pkg{xpatch} for example).
% \begin{macrocode}
+%<*package>
+\cs_if_exist:NF \c_backslash_str
+ { \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } }
+%</package>
+%<*initex>
\str_const:Nx \c_backslash_str { \cs_to_str:N \\ }
+%</initex>
\str_const:Nx \c_left_brace_str { \cs_to_str:N \{ }
\str_const:Nx \c_right_brace_str { \cs_to_str:N \} }
\str_const:Nx \c_hash_str { \cs_to_str:N \# }
@@ -678,12 +686,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP, aux]{\@@_skip_c_zero:w}
+% \begin{macro}[EXP, aux]{\@@_skip_exp_end:w}
% \begin{macro}[EXP, aux]
% {\@@_skip_loop:wNNNNNNNN, \@@_skip_end:w, \@@_skip_end:NNNNNNNN}
% Removes |max(#1,0)| characters from the input stream, and then
-% leaves \cs{c_zero}. This should be expanded using
-% \cs{tex_romannumeral:D}. We remove characters $8$ at a time until
+% leaves \cs{exp_end:}. This should be expanded using
+% \cs{exp:w}. We remove characters $8$ at a time until
% there are at most $8$ to remove. Then we do a dirty trick: the
% \cs{if_case:w} construction leaves between $0$ and $8$ times the
% \cs{or:} control sequence, and those \cs{or:} become arguments of
@@ -692,10 +700,10 @@
% of \cs{@@_skip_end:NNNNNNNN} are the two \cs{or:}, and $6$
% characters from the input stream, exactly what we wanted to
% remove. Then close the \cs{if_case:w} conditional with \cs{fi:}, and
-% stop the initial expansion with \cs{c_zero} (see places where
-% \cs{@@_skip_c_zero:w} is called).
+% stop the initial expansion with \cs{exp_end:} (see places where
+% \cs{@@_skip_exp_end:w} is called).
% \begin{macrocode}
-\cs_new:Npn \@@_skip_c_zero:w #1;
+\cs_new:Npn \@@_skip_exp_end:w #1;
{
\if_int_compare:w #1 > \c_eight
\exp_after:wN \@@_skip_loop:wNNNNNNNN
@@ -706,13 +714,13 @@
#1 ;
}
\cs_new:Npn \@@_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
- { \exp_after:wN \@@_skip_c_zero:w \int_use:N \__int_eval:w #1 - \c_eight ; }
+ { \exp_after:wN \@@_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; }
\cs_new:Npn \@@_skip_end:w #1 ;
{
\exp_after:wN \@@_skip_end:NNNNNNNN
\if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or:
}
-\cs_new:Npn \@@_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \c_zero }
+\cs_new:Npn \@@_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -724,7 +732,7 @@
% \@@_collect_end:wn, \@@_collect_end:nnnnnnnnw
% }
% Collects |max(#1,0)| characters, and removes everything else until
-% \cs{q_stop}. This is somewhat similar to \cs{@@_skip_c_zero:w}, but
+% \cs{q_stop}. This is somewhat similar to \cs{@@_skip_exp_end:w}, but
% accepts integer expression arguments. This time we can only grab
% $7$ characters at a time. At the end, we use an \cs{if_case:w}
% trick again, so that the $8$ first arguments of
@@ -807,7 +815,7 @@
{ \use_none_delimit_by_q_stop:w }
{
\exp_after:wN \use_i_delimit_by_q_stop:nw
- \tex_romannumeral:D \exp_after:wN \@@_skip_c_zero:w
+ \exp:w \exp_after:wN \@@_skip_exp_end:w
\int_use:N \__int_eval:w #1 + #2 ;
}
}
@@ -816,7 +824,7 @@
{ \use_none_delimit_by_q_stop:w }
{
\exp_after:wN \use_i_delimit_by_q_stop:nw
- \tex_romannumeral:D \@@_skip_c_zero:w #1 ; { }
+ \exp:w \@@_skip_exp_end:w #1 ; { }
}
}
}
@@ -896,7 +904,7 @@
{
\exp_after:wN \@@_collect_delimit_by_q_stop:w
\int_use:N \__int_eval:w #2 - #1 \exp_after:wN ;
- \tex_romannumeral:D \@@_skip_c_zero:w #1 ;
+ \exp:w \@@_skip_exp_end:w #1 ;
}
% \end{macrocode}
% \end{macro}