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/l3sort/l3sort.dtx15
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx13
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx31
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx47
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/expl3.dtx4
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3.ins93
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3basics.dtx233
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx30
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3box.dtx15
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx115
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3clist.dtx99
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3expan.dtx18
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3file.dtx79
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3format.ins92
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3int.dtx167
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3keys.dtx480
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx16
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx143
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx204
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prop.dtx348
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3quark.dtx19
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3seq.dtx327
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx122
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3tl.dtx232
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3token.dtx219
-rw-r--r--Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx6
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx6
28 files changed, 1104 insertions, 2075 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx b/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx
index b73a9084484..0733e3a1cba 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3sort.dtx 4491 2013-05-12 16:22:18Z bruno $
+\GetIdInfo$Id: l3sort.dtx 4566 2013-07-24 19:34:45Z bruno $
{L3 Experimental sorting functions}
%</driver|package>
%<*driver>
@@ -280,10 +280,11 @@
% The first argument to \cs{@@_main:NNNnNn} is the final
% assignment function used, either \cs{tl_set:Nn} or
% \cs{tl_gset:Nn} to control local versus global results.
-% The second argument is what mapping function is used
-% when storing items to \tn{toks} registers. The third
-% is used to build back the correct kind of list from the
-% contents of the \tn{toks} registers. Fourth and fifth
+% The second argument is what mapping function is used when storing
+% items to \tn{toks} registers, and the third breaks away from the
+% loop. The fourth is used to build back the correct kind of list
+% from the contents of the \tn{toks} registers, including the leading
+% \cs{s__seq} and trailing \cs{s_obj_end}. Fifth and sixth
% arguments are the variable to sort, and the sorting method
% as inline code.
% \begin{macrocode}
@@ -291,13 +292,13 @@
{
\@@_main:NNNnNn \tl_set:Nn
\seq_map_inline:Nn \seq_map_break:
- { \@@_toks:NNw \exp_not:N \__seq_item:n 0 ; }
+ { \s__seq \@@_toks:NNw \exp_not:N \__seq_item:n 0 ; \s_obj_end }
}
\cs_new_protected_nopar:Npn \seq_gsort:Nn
{
\@@_main:NNNnNn \tl_gset:Nn
\seq_map_inline:Nn \seq_map_break:
- { \@@_toks:NNw \exp_not:N \__seq_item:n 0 ; }
+ { \s__seq \@@_toks:NNw \exp_not:N \__seq_item:n 0 ; \s_obj_end }
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
index 1ab8905e6aa..82a8e0ae577 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3regex.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3regex.dtx 4576 2013-07-24 21:40:24Z joseph $
{L3 Experimental regular expressions}
%</driver|package>
%<*driver>
@@ -2542,13 +2542,12 @@
{
\token_if_eq_meaning:NNT \@@_compile_special:N #1
{
- \str_case:nnn { #2 }
+ \str_case:nn { #2 }
{
: { \@@_compile_class_posix:NNNNw }
= { \__msg_kernel_warning:nnx { regex } { posix-unsupported } { = } }
. { \__msg_kernel_warning:nnx { regex } { posix-unsupported } { . } }
}
- { }
}
\@@_compile_raw:N [ #1 #2
}
@@ -3164,7 +3163,7 @@
\@@_show_push:n {~}
#2
\exp_last_unbraced:Nf
- \int_case:nnn { \l_@@_show_lines_int }
+ \int_case:nnF { \l_@@_show_lines_int }
{
{0}
{
@@ -3206,7 +3205,7 @@
\cs_new:Npn \@@_show_anchor_to_str:N #1
{
anchor~at~
- \str_case:nnn { #1 }
+ \str_case:nnF { #1 }
{
{ \l_@@_min_pos_int } { start~(\iow_char:N\\A) }
{ \l_@@_start_pos_int } { start~of~match~(\iow_char:N\\G) }
@@ -5439,11 +5438,13 @@
\flag_clear:n { @@_end }
\tl_set:Nx \l_@@_internal_a_tl
{
+ \s__seq
\int_step_function:nnnN
{ \c_two * \l_@@_max_state_int }
\c_one
{ \l_@@_submatch_int - \c_one }
\@@_extract_seq_aux:n
+ \s_obj_end
}
\int_compare:nNnF
{ \flag_height:n { @@_begin } + \flag_height:n { @@_end } }
@@ -5934,7 +5935,7 @@
\str_if_eq_x:nnF { #1 #2 } { 1 0 }
{
, ~ repeated ~
- \int_case:nnn {#2}
+ \int_case:nnF {#2}
{
{ -1 } { #1~or~more~times,~\bool_if:NTF #3 { lazy } { greedy } }
{ 0 } { #1~times }
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 3237dc3aaa4..10eea3278f4 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx
@@ -547,13 +547,24 @@
\cs_new:Npn \seq_format:Nn #1#2
{
\tl_to_str:f
- { \@@_seq:of {#1} { \@@_parse:n {#2} } }
+ {
+ \@@_seq:ff { \exp_after:wN \@@_seq_extract:w #1 }
+ { \@@_parse:n {#2} }
+ }
}
\cs_generate_variant:Nn \seq_format:Nn { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_seq:nn, \@@_seq:of}
+% \begin{macro}[aux, rEXP]{\@@_seq_extract:w}
+% Extract the contents of a sequence as items of the form
+% |\__seq_item:n| \Arg{item}.
+% \begin{macrocode}
+\cs_new:Npn \@@_seq_extract:w \s__seq #1 \s_obj_end { \exp_stop_f: #1 }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[aux, EXP]{\@@_seq:nn, \@@_seq:ff}
% The first argument is the contents of a \texttt{seq} variable. The
% second is a parsed \meta{format specification}. Set up the loop.
% \begin{macrocode}
@@ -563,7 +574,7 @@
#1
{ ? \@@_seq_end:w } { }
}
-\cs_generate_variant:Nn \@@_seq:nn { of }
+\cs_generate_variant:Nn \@@_seq:nn { ff }
% \end{macrocode}
% \end{macro}
%
@@ -644,7 +655,7 @@
\int_compare:nNnTF {#7} < \c_zero
{ \@@_put:nw { - } }
{
- \str_case:nnn {#3}
+ \str_case:nnF {#3}
{
{ ~ } { \@@_put:ow { \c_catcode_other_space_tl } }
{ + } { \@@_put:nw { + } }
@@ -657,7 +668,7 @@
\__msg_kernel_expandable_error:nnnn
{ str } { invalid-precision-format } {#5} {int}
}
- \str_case:nnn {#6}
+ \str_case:nnF {#6}
{
{ ? } { \@@_int:NwnnNNn \use:n }
{ d } { \@@_int:NwnnNNn \use:n }
@@ -757,7 +768,7 @@
\token_if_eq_meaning:NNTF 2 #8
{ \@@_put:nw { - } }
{
- \str_case:nnn {#3}
+ \str_case:nnF {#3}
{
{ ~ } { \@@_put:ow { \c_catcode_other_space_tl } }
{ + } { \@@_put:nw { + } }
@@ -768,7 +779,7 @@
\tl_if_empty:nTF {#5}
{ \@@_put:nw { { 6} } }
{ \@@_put:nw { {#5} } }
- \str_case:nnn {#6}
+ \str_case:nnF {#6}
{
{ e } { \@@_fp:wnnnNNw \@@_fp_e:wn }
{ f } { \@@_fp:wnnnNNw \@@_fp_f:wn }
@@ -828,7 +839,7 @@
\group_end:
\cs_new:Npn \@@_fp_e:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{
- \int_case:nnn {#1}
+ \int_case:nnF {#1}
{
{0} { \use:nf { 0 . } { \prg_replicate:nn {#4} { 0 } } e 0 }
{2} { inf }
@@ -869,7 +880,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_fp_f:wn \s__fp \__fp_chk:w #1#2#3 ; #4
{
- \int_case:nnn {#1}
+ \int_case:nnF {#1}
{
{0} { \use:nf { 0 . } { \prg_replicate:nn {#4} { 0 } } }
{2} { inf }
@@ -907,7 +918,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_fp_g:wn \s__fp \__fp_chk:w #1#2 ; #3
{
- \int_case:nnn {#1}
+ \int_case:nnF {#1}
{
{0} { 0 }
{2} { inf }
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
index 836bb0481f2..90a2575bcd0 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{expl3}
-\GetIdInfo$Id: l3str.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3str.dtx 4576 2013-07-24 21:40:24Z joseph $
{L3 Experimental strings}
%</driver|package>
%<*driver>
@@ -334,42 +334,51 @@
% is logically \texttt{true}.
% \end{function}
%
-% \begin{function}[added = 2012-06-03, EXP]{\str_case:nnn, \str_case:onn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\str_case:nn, \str_case:on}
% \begin{syntax}
-% \cs{str_case:nnn} \Arg{test string} \\
+% \cs{str_case:nnTF} \Arg{test string} \\
% ~~|{| \\
-% ~~~~\Arg{string case1} \Arg{code case1} \\
-% ~~~~\Arg{string case2} \Arg{code case2} \\
+% ~~~~\Arg{string case_1} \Arg{code case_1} \\
+% ~~~~\Arg{string case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
-% ~~~~\Arg{string case$\sb{n}$} \Arg{code case$\sb{n}$} \\
+% ~~~~\Arg{string case_n} \Arg{code case_n} \\
% ~~|}| \\
-% ~~\Arg{else case}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function compares the \meta{test string} in turn with each
% of the \meta{string cases}. If the two are equal (as described for
% \cs{str_if_eq:nnTF} then the
-% associated \meta{code} is left in the input stream. If none of
-% the tests are \texttt{true} then the \texttt{else code} will be
-% left in the input stream.
+% associated \meta{code} is left in the input stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{str_case:nn}, which does nothing if there is no match, is also
+% available.
% \end{function}
%
-% \begin{function}[added = 2012-06-05, EXP]{\str_case_x:nnn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\str_case_x:nn}
% \begin{syntax}
% \cs{str_case_x:nnn} \Arg{test string} \\
% ~~|{| \\
-% ~~~~\Arg{string case1} \Arg{code case1} \\
-% ~~~~\Arg{string case2} \Arg{code case2} \\
+% ~~~~\Arg{string case_1} \Arg{code case_1} \\
+% ~~~~\Arg{string case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
-% ~~~~\Arg{string case$\sb{n}$} \Arg{code case$\sb{n}$} \\
+% ~~~~\Arg{string case_n} \Arg{code case_n} \\
% ~~|}| \\
-% ~~\Arg{else case}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function compares the full expansion of the \meta{test string}
% in turn with the full expansion of the \meta{string cases}. If the two
% full expansions are equal (as described for \cs{str_if_eq:nnTF} then the
-% associated \meta{code} is left in the input stream. If none of the tests
-% are \texttt{true} then the \texttt{else code} will be left in the input
-% stream. The \meta{test string} is expanded in each comparison, and must
+% associated \meta{code} is left in the input stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{str_case_x:nn}, which does nothing if there is no match, is also
+% available.
+% The \meta{test string} is expanded in each comparison, and must
% always yield the same result: for example, random numbers must
% not be used within this string.
% \end{function}
@@ -1013,7 +1022,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\str_case:nnn, \str_case:onn, \str_case_x:nnn}
+% \begin{macro}[EXP, TF]{\str_case:nn, \str_case:on, \str_case_x:nn}
% Defined in \pkg{l3basics} at present.
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
index 612cfb35e2c..56754ad3f02 100644
--- a/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/expl3.dtx
@@ -49,8 +49,8 @@
%<*driver|package>
\def\ExplFileName{expl3}
\def\ExplFileDescription{L3 Experimental code bundle wrapper}
-\def\ExplFileDate{2013/07/12}
-\def\ExplFileVersion{4544}
+\def\ExplFileDate{2013/07/28}
+\def\ExplFileVersion{4582}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3.ins b/Master/texmf-dist/source/latex/l3kernel/l3.ins
deleted file mode 100644
index b869a70fee5..00000000000
--- a/Master/texmf-dist/source/latex/l3kernel/l3.ins
+++ /dev/null
@@ -1,93 +0,0 @@
-\iffalse meta-comment
-
-File l3.ins Copyright (C) 2011,2012 The LaTeX3 Project
-
-It may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), either version 1.3c of this
-license or (at your option) any later version. The latest version
-of this license is in the file
-
- http://www.latex-project.org/lppl.txt
-
-This file is part of the "l3kernel bundle" (The Work in LPPL)
-and all files in that bundle must be distributed together.
-
-The released version of this bundle is available from CTAN.
-
-\fi
-
-\let\jobname\relax
-\input l3docstrip.dtx
-\askforoverwritefalse
-
-\preamble
-
-EXPERIMENTAL CODE
-
-Do not distribute this file without also distributing the
-source files specified above.
-
-Do not distribute a modified version of this file.
-
-\endpreamble
-% stop docstrip adding \endinput
-\postamble
-\endpostamble
-
-\keepsilent
-
-% ===== PACKAGE ONLY ======
-\generate{\file{expl3.sty} {\from{expl3.dtx} {package}}}
-% ========================
-\generate{\file{l3bootstrap.sty} {\from{l3bootstrap.dtx}{package}}}
-\generate{\file{l3names.sty} {\from{l3names.dtx} {package}}}
-\generate{\file{l3basics.sty} {\from{l3basics.dtx} {package}}}
-\generate{\file{l3expan.sty} {\from{l3expan.dtx} {package}}}
-\generate{\file{l3tl.sty} {\from{l3tl.dtx} {package}}}
-\generate{\file{l3seq.sty} {\from{l3seq.dtx} {package}}}
-\generate{\file{l3int.sty} {\from{l3int.dtx} {package}}}
-\generate{\file{l3quark.sty} {\from{l3quark.dtx} {package}}}
-\generate{\file{l3prg.sty} {\from{l3prg.dtx} {package}}}
-\generate{\file{l3clist.sty} {\from{l3clist.dtx} {package}}}
-\generate{\file{l3token.sty} {\from{l3token.dtx} {package}}}
-\generate{\file{l3prop.sty} {\from{l3prop.dtx} {package}}}
-\generate{\file{l3msg.sty} {\from{l3msg.dtx} {package}}}
-\generate{\file{l3file.sty} {\from{l3file.dtx} {package}}}
-\generate{\file{l3skip.sty} {\from{l3skip.dtx} {package}}}
-\generate{\file{l3keys.sty} {\from{l3keys.dtx} {package}}}
-\generate
- {%
- \file{l3fp.sty}
- {%
- \from{l3fp.dtx} {package}
- \from{l3fp-aux.dtx} {package}
- \from{l3fp-traps.dtx} {package}
- \from{l3fp-round.dtx} {package}
- \from{l3fp-parse.dtx} {package}
- \from{l3fp-logic.dtx} {package}
- \from{l3fp-basics.dtx} {package}
- \from{l3fp-extended.dtx}{package}
- \from{l3fp-expo.dtx} {package}
- \from{l3fp-trig.dtx} {package}
- \from{l3fp-convert.dtx} {package}
- \from{l3fp-assign.dtx} {package}
- \from{l3fp-old.dtx} {package}
- }%
- }
-\generate{\file{l3box.sty} {\from{l3box.dtx} {package}}}
-\generate{\file{l3coffins.sty} {\from{l3coffins.dtx} {package}}}
-\generate{\file{l3color.sty} {\from{l3color.dtx} {package}}}
-\generate{\file{l3luatex.sty} {\from{l3luatex.dtx} {package}}}
-\generate{\file{l3candidates.sty}{\from{l3candidates.dtx}{package}}}
-
-\generate{\file{l3doc.cls} {\from{l3doc.dtx} {class}}}
-\generate{\file{l3doc.ist} {\from{l3doc.dtx} {docist}}}
-
-\generate{\file{l3dvipdfmx.def} {\from{l3drivers.dtx} {package,dvipdfmx} }}
-\generate{\file{l3dvips.def} {\from{l3drivers.dtx} {package,dvips} }}
-\generate{\file{l3pdfmode.def} {\from{l3drivers.dtx} {package,pdfmode} }}
-\generate{\file{l3xdvipdfmx.def} {\from{l3drivers.dtx} {package,xdvipdfmx}}}
-
-\generate{\file{l3docstrip.tex} {\from{l3docstrip.dtx} {program}}}
-
-\endbatchfile
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
index b00dee6ec9e..a43c8fec53f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3basics.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3basics.dtx 4521 2013-07-09 11:45:31Z joseph $
+\GetIdInfo$Id: l3basics.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Basic definitions}
%</driver|package>
%<*driver>
@@ -1122,26 +1122,30 @@
% is logically \texttt{true}.
% \end{function}
%
-% \begin{function}[added = 2012-06-03, EXP]{\str_case:nnn, \str_case:onn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\str_case:nn, \str_case:on}
% \begin{syntax}
-% \cs{str_case:nnn} \Arg{test string} \\
+% \cs{str_case:nnTF} \Arg{test string} \\
% ~~|{| \\
% ~~~~\Arg{string case_1} \Arg{code case_1} \\
% ~~~~\Arg{string case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
% ~~~~\Arg{string case_n} \Arg{code case_n} \\
% ~~|}| \\
-% ~~\Arg{else code}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function compares the \meta{test string} in turn with each
% of the \meta{string cases}. If the two are equal (as described for
% \cs{str_if_eq:nnTF} then the
-% associated \meta{code} is left in the input stream. If none of
-% the tests are \texttt{true} then the \texttt{else code} will be
-% left in the input stream.
+% associated \meta{code} is left in the input stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{str_case:nn}, which does nothing if there is no match, is also
+% available.
% \end{function}
%
-% \begin{function}[added = 2012-06-05, EXP]{\str_case_x:nnn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\str_case_x:nn}
% \begin{syntax}
% \cs{str_case_x:nnn} \Arg{test string} \\
% ~~|{| \\
@@ -1150,15 +1154,20 @@
% ~~~~\ldots \\
% ~~~~\Arg{string case_n} \Arg{code case_n} \\
% ~~|}| \\
-% ~~\Arg{else code}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function compares the full expansion of the \meta{test string}
% in turn with the full expansion of the \meta{string cases}. If the two
% full expansions are equal (as described for \cs{str_if_eq:nnTF} then the
-% associated \meta{code} is left in the input stream. If none of the tests
-% are \texttt{true} then the \texttt{else code} will be left in the input
-% stream. The \meta{test string} is expanded in each comparison, and must
-% always yield the same result: for example, random numbers should
+% associated \meta{code} is left in the input stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{str_case_x:nn}, which does nothing if there is no match, is also
+% available.
+% The \meta{test string} is expanded in each comparison, and must
+% always yield the same result: for example, random numbers must
% not be used within this string.
% \end{function}
%
@@ -1350,12 +1359,13 @@
%
% \begin{function}{\__prg_case_end:nw}
% \begin{syntax}
-% \cs{__prg_case_end:nw} \Arg{code} \meta{tokens} \cs{q_recursion_stop}
+% \cs{__prg_case_end:nw} \Arg{code} \meta{tokens} \cs{q_mark} \Arg{true code} \cs{q_mark} \Arg{false code} \cs{q_stop}
% \end{syntax}
-% Used to terminate case statements (\cs{int_case:nnn}, \emph{etc.})
+% Used to terminate case statements (\cs{int_case:nnTF}, \emph{etc.})
% by removing trailing \meta{tokens} and the end marker
-% \cs{q_recursion_stop}, and inserting the \meta{code} for the successful
-% case.
+% \cs{q_stop}, inserting the \meta{code} for the successful
+% case (if one is found) and either the \texttt{true code} or
+% \texttt{false code} for the over all outcome, as appropriate.
% \end{function}
%
% \begin{function}{\__str_if_eq_x_return:nn}
@@ -3071,28 +3081,70 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\str_case:nnn, \str_case_x:nnn}
+% \begin{macro}[EXP]{\str_case:nn, \str_case_x:nn}
+% \begin{macro}[EXP, TF]{\str_case:nn, \str_case_x:nn}
+% \begin{macro}[EXP, aux]{\__str_case:nnTF, \__str_case_x:nnTF}
% \begin{macro}[int, EXP]{\__prg_case_end:nw}
% \begin{macro}[aux, EXP]
% {\__str_case:nw, \__str_case_x:nw, \__str_case_end:nw}
-% No calculations for strings, otherwise no surprises.
-% \begin{macrocode}
-\cs_new:Npn \str_case:nnn #1#2#3
+% The aim here is to allow the case statement to be evaluated
+% using a known number of expansion steps (two), and without
+% needing to use an explicit \enquote{end of recursion} marker.
+% That is achieved by using the test input as the final case,
+% as this will always be true. The trick is then to tidy up
+% the output such that the appropriate case code plus either
+% the \texttt{true} or \texttt{false} branch code is inserted.
+% \begin{macrocode}
+\cs_new:Npn \str_case:nn #1#2
+ {
+ \tex_romannumeral:D
+ \__str_case:nnTF {#1} {#2} { } { }
+ }
+\cs_new:Npn \str_case:nnT #1#2#3
{
\tex_romannumeral:D
- \__str_case:nw {#1} #2 {#1} {#3} \q_recursion_stop
+ \__str_case:nnTF {#1} {#2} {#3} { }
}
+\cs_new:Npn \str_case:nnF #1#2
+ {
+ \tex_romannumeral:D
+ \__str_case:nnTF {#1} {#2} { }
+ }
+\cs_new:Npn \str_case:nnTF #1#2
+ {
+ \tex_romannumeral:D
+ \__str_case:nnTF {#1} {#2}
+ }
+\cs_new:Npn \__str_case:nnTF #1#2#3#4
+ { \__str_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop }
\cs_new:Npn \__str_case:nw #1#2#3
{
\str_if_eq:nnTF {#1} {#2}
{ \__str_case_end:nw {#3} }
{ \__str_case:nw {#1} }
}
-\cs_new:Npn \str_case_x:nnn #1#2#3
+\cs_new:Npn \str_case_x:nn #1#2
+ {
+ \tex_romannumeral:D
+ \__str_case_x:nnTF {#1} {#2} { } { }
+ }
+\cs_new:Npn \str_case_x:nnT #1#2#3
+ {
+ \tex_romannumeral:D
+ \__str_case_x:nnTF {#1} {#2} {#3} { }
+ }
+\cs_new:Npn \str_case_x:nnF #1#2
+ {
+ \tex_romannumeral:D
+ \__str_case_x:nnTF {#1} {#2} { }
+ }
+\cs_new:Npn \str_case_x:nnTF #1#2
{
\tex_romannumeral:D
- \__str_case_x:nw {#1} #2 {#1} {#3} \q_recursion_stop
+ \__str_case_x:nnTF {#1} {#2}
}
+\cs_new:Npn \__str_case_x:nnTF #1#2#3#4
+ { \__str_case_x:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop }
\cs_new:Npn \__str_case_x:nw #1#2#3
{
\str_if_eq_x:nnTF {#1} {#2}
@@ -3100,15 +3152,26 @@
{ \__str_case_x:nw {#1} }
}
% \end{macrocode}
-% Here, |#1| will be the code needed, |#2| will be any remaining case
-% or cases, and the \cs{c_zero} stops the \tn{romannumeral}.
-% \begin{macrocode}
-\cs_new:Npn \__prg_case_end:nw #1#2 \q_recursion_stop { \c_zero #1 }
+% To tidy up the recursion, there are two outcomes. If there was a hit to
+% one of the cases searched for, then |#1| will be the code to insert,
+% |#2| will be the \emph{next} case to check on and |#3| will be all of
+% the rest of the cases code. That means that |#4| will be the \texttt{true}
+% branch code, and |#5| will be tidy up the spare \cs{q_mark} and the
+% \texttt{false} branch. On the other hand, if none of the cases matched
+% then we arrive here using the \enquote{termination} case of comparing
+% the search with itself. That means that |#1| will be empty, |#2| will be
+% the first \cs{q_mark} and so |#4| will be the \texttt{false} code (the
+% \texttt{true} code is mopped up by |#3|).
+% \begin{macrocode}
+\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
+ { \c_zero #1 #4 }
\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Breaking out of mapping functions}
%
@@ -3150,117 +3213,11 @@
%
% \subsection{Deprecated functions}
%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \cs_gnew_nopar:Npn \cs_new_nopar:Npn
-\cs_new_eq:NN \cs_gnew:Npn \cs_new:Npn
-\cs_new_eq:NN \cs_gnew_protected_nopar:Npn \cs_new_protected_nopar:Npn
-\cs_new_eq:NN \cs_gnew_protected:Npn \cs_new_protected:Npn
-\cs_new_eq:NN \cs_gnew_nopar:Npx \cs_new_nopar:Npx
-\cs_new_eq:NN \cs_gnew:Npx \cs_new:Npx
-\cs_new_eq:NN \cs_gnew_protected_nopar:Npx \cs_new_protected_nopar:Npx
-\cs_new_eq:NN \cs_gnew_protected:Npx \cs_new_protected:Npx
-\cs_new_eq:NN \cs_gnew_nopar:cpn \cs_new_nopar:cpn
-\cs_new_eq:NN \cs_gnew:cpn \cs_new:cpn
-\cs_new_eq:NN \cs_gnew_protected_nopar:cpn \cs_new_protected_nopar:cpn
-\cs_new_eq:NN \cs_gnew_protected:cpn \cs_new_protected:cpn
-\cs_new_eq:NN \cs_gnew_nopar:cpx \cs_new_nopar:cpx
-\cs_new_eq:NN \cs_gnew:cpx \cs_new:cpx
-\cs_new_eq:NN \cs_gnew_protected_nopar:cpx \cs_new_protected_nopar:cpx
-\cs_new_eq:NN \cs_gnew_protected:cpx \cs_new_protected:cpx
-%</deprecated>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \cs_gnew_eq:NN \cs_new_eq:NN
-\cs_new_eq:NN \cs_gnew_eq:cN \cs_new_eq:cN
-\cs_new_eq:NN \cs_gnew_eq:Nc \cs_new_eq:Nc
-\cs_new_eq:NN \cs_gnew_eq:cc \cs_new_eq:cc
-%</deprecated>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \cs_gundefine:N \cs_undefine:N
-\cs_new_eq:NN \cs_gundefine:c \cs_undefine:c
-%</deprecated>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \group_execute_after:N \group_insert_after:N
-%</deprecated>
-% \end{macrocode}
-%
-% Deprecated 2011-09-06, for removal by 2011-12-31.
-%
-% \begin{variable}
-% {
-% \c_pdftex_is_engine_bool, \c_luatex_is_engine_bool,
-% \c_xetex_is_engine_bool
-% }
-% Predicates are better
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \c_luatex_is_engine_bool \luatex_if_engine_p:
-\cs_new_eq:NN \c_pdftex_is_engine_bool \pdftex_if_engine_p:
-\cs_new_eq:NN \c_xetex_is_engine_bool \xetex_if_engine_p:
-%</deprecated>
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}[EXP]
-% {
-% \use_i_after_fi:nw,
-% \use_i_after_else:nw,
-% \use_i_after_or:nw,
-% \use_i_after_orelse:nw
-% }
-% These functions return the first argument after ending the conditional.
-% This is rather specialized, and we want to de-emphasize the use of
-% primitive \TeX{} conditionals.
-% \begin{macrocode}
-%<*deprecated>
-\cs_set:Npn \use_i_after_fi:nw #1 \fi: { \fi: #1 }
-\cs_set:Npn \use_i_after_else:nw #1 \else: #2 \fi: { \fi: #1 }
-\cs_set:Npn \use_i_after_or:nw #1 \or: #2 \fi: { \fi: #1 }
-\cs_set:Npn \use_i_after_orelse:nw #1#2#3 \fi: { \fi: #1 }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2011-09-07, for removal by 2011-12-31.
-%
-% \begin{macro}{\cs_set_eq:NwN}
-% \begin{macrocode}
-%<*deprecated>
-\tex_let:D \cs_set_eq:NwN \tex_let:D
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-06-05 for removal after 2012-12-31.
-%
-% \begin{macro}[pTF, EXP]{\str_if_eq:xx}
-% Not really true \texttt{x}-type expansion
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \str_if_eq_p:xx \str_if_eq_x_p:nn
-\cs_new_eq:NN \str_if_eq:xxT \str_if_eq_x:nnT
-\cs_new_eq:NN \str_if_eq:xxF \str_if_eq_x:nnF
-\cs_new_eq:NN \str_if_eq:xxTF \str_if_eq_x:nnTF
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\chk_if_free_cs:N}
+% \begin{macro}{\str_case:nnn, \str_case_x:nnn}
+% Deprecated 2013-07-15.
% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \chk_if_free_cs:N \__chk_if_free_cs:N
-%</deprecated>
+\cs_new_eq:NN \str_case:nnn \str_case:nnF
+\cs_new_eq:NN \str_case_x:nnn \str_case_x:nnF
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index 9ce55b15be3..22b8f3ccd5c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -119,7 +119,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-\GetIdInfo$Id: l3bootstrap.dtx 4420 2013-01-08 20:00:04Z joseph $
+\GetIdInfo$Id: l3bootstrap.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Bootstrap code}
%</driver|package>
%<*driver>
@@ -663,34 +663,6 @@
% \end{macrocode}
% \end{variable}
%
-% \subsection{Deprecated functions}
-%
-% Deprecated 2012-06-19 for removal after 2012-12-31.
-%
-% \begin{macro}{\ExplSyntaxNamesOn, \ExplSyntaxNamesOff}
-% These can be set up early, as they are not used anywhere in the
-% package or format itself. Using an \tn{edef} here makes the
-% definitions that bit clearer later.
-% \begin{macrocode}
-%<*deprecated>
-\protected\edef\ExplSyntaxNamesOn
- {%
- \expandafter\noexpand
- \csname\detokenize{char_set_catcode_letter:n}\endcsname{58}%
- \expandafter\noexpand
- \csname\detokenize{char_set_catcode_letter:n}\endcsname{95}%
- }
-\protected\edef\ExplSyntaxNamesOff
- {%
- \expandafter\noexpand
- \csname\detokenize{char_set_catcode_other:n}\endcsname{58}%
- \expandafter\noexpand
- \csname\detokenize{char_set_catcode_math_subscript:n}\endcsname{95}%
- }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
index ddb859bd03a..537ae210617 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3box.dtx Copyright (C) 2005-2012 The LaTeX3 Project
+%% File: l3box.dtx Copyright (C) 2005-2013 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3box.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3box.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Experimental boxes}
%</driver|package>
%<*driver>
@@ -1245,17 +1245,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Deprecated functions}
-%
-% \begin{variable}{\l_last_box}
-% Deprecated 2011-11-13, for removal by 2012-02-28.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \l_last_box \tex_lastbox:D
-%</deprecated>
-% \end{macrocode}
-% \end{variable}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
index 1eaf1bdeb0f..f9faeada808 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3candidates.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3candidates.dtx 4521 2013-07-09 11:45:31Z joseph $
+\GetIdInfo$Id: l3candidates.dtx 4576 2013-07-24 21:40:24Z joseph $
{L3 Experimental additions to l3kernel}
%</driver|package>
%<*driver>
@@ -2154,25 +2154,29 @@
% \end{macrocode}
%
% \begin{macro}[rEXP]{\prop_map_tokens:Nn, \prop_map_tokens:cn}
-% \begin{macro}[aux]{\@@_map_tokens:nwn}
-% The mapping grabs one key--value pair at a time, and stops when
-% reaching the marker key \cs{q_recursion_tail}, which
-% cannot appear in normal keys since those are strings. The odd
-% construction |\use:n {#1}| allows |#1| to contain any token.
+% \begin{macro}[aux]{\@@_map_tokens:nwwn}
+% The mapping is very similar to \cs{prop_map_function:NN}. It grabs
+% one key--value pair at a time, and stops when reaching the marker
+% key \cs{q_recursion_tail}, which cannot appear in normal keys since
+% those are strings. The odd construction |\use:n {#1}| allows |#1|
+% to contain any token without interfering with \cs{prop_map_break:}.
+% Argument |#2| of \cs{@@_map_tokens:nwwn} is empty, with two
+% exceptions: it is \cs{s_@@} the first time and \cs{s_obj_end} the
+% last.
% \begin{macrocode}
\cs_new:Npn \prop_map_tokens:Nn #1#2
{
- \exp_last_unbraced:Nno \@@_map_tokens:nwn {#2} #1
- \s_@@ \q_recursion_tail \s_@@ { }
+ \exp_last_unbraced:Nno \@@_map_tokens:nwwn {#2} #1
+ \@@_pair:wn \q_recursion_tail \s_@@ { }
\__prg_break_point:Nn \prop_map_break: { }
}
-\cs_new:Npn \@@_map_tokens:nwn #1 \s_@@ #2 \s_@@ #3
+\cs_new:Npn \@@_map_tokens:nwwn #1#2 \@@_pair:wn #3 \s_@@ #4
{
- \if_meaning:w \q_recursion_tail #2
+ \if_meaning:w \q_recursion_tail #3
\exp_after:wN \prop_map_break:
\fi:
- \use:n {#1} {#2} {#3}
- \@@_map_tokens:nwn {#1}
+ \use:n {#1} {#3} {#4}
+ \@@_map_tokens:nwwn {#1}
}
\cs_generate_variant:Nn \prop_map_tokens:Nn { c }
% \end{macrocode}
@@ -2180,7 +2184,7 @@
% \end{macro}
%
% \begin{macro}[EXP]{\prop_get:Nn, \prop_get:cn}
-% \begin{macro}[aux, EXP]{\@@_get_Nn:nwn}
+% \begin{macro}[aux, EXP]{\@@_get_Nn:nwwn}
% Getting the value corresponding to a key in a property list in an
% expandable fashion is similar to mapping some tokens. Go through
% the property list one \meta{key}--\meta{value} pair at a time: the
@@ -2194,15 +2198,15 @@
% \begin{macrocode}
\cs_new:Npn \prop_get:Nn #1#2
{
- \exp_last_unbraced:Noo \@@_get_Nn:nwn { \tl_to_str:n {#2} } #1
- \s_@@ \tl_to_str:n {#2} \s_@@ { }
+ \exp_last_unbraced:Noo \@@_get_Nn:nwwn { \tl_to_str:n {#2} } #1
+ \@@_pair:wn \tl_to_str:n {#2} \s_@@ { }
\__prg_break_point:
}
-\cs_new:Npn \@@_get_Nn:nwn #1 \s_@@ #2 \s_@@ #3
+\cs_new:Npn \@@_get_Nn:nwwn #1#2 \@@_pair:wn #3 \s_@@ #4
{
- \str_if_eq_x:nnTF {#1} {#2}
- { \__prg_break:n { \exp_not:n {#3} } }
- { \@@_get_Nn:nwn {#1} }
+ \str_if_eq_x:nnTF {#1} {#3}
+ { \__prg_break:n { \exp_not:n {#4} } }
+ { \@@_get_Nn:nwwn {#1} }
}
\cs_generate_variant:Nn \prop_get:Nn { c }
% \end{macrocode}
@@ -2216,26 +2220,26 @@
% \end{macrocode}
%
% \begin{macro}{\seq_item:Nn, \seq_item:cn}
-% \begin{macro}[aux]{\@@_item:nnn}
+% \begin{macro}[aux]{\@@_item:wNn, \@@_item:nnn}
% The idea here is to find the offset of the item from the left, then use
% a loop to grab the correct item. If the resulting offset is too large,
% then the stop code |{ ? \__prg_break: } { }| will be used by the auxiliary,
% terminating the loop and returning nothing at all.
% \begin{macrocode}
-\cs_new:Npn \seq_item:Nn #1#2
+\cs_new:Npn \seq_item:Nn #1 { \exp_after:wN \@@_item:wNn #1 #1 }
+\cs_new:Npn \@@_item:wNn \s_@@ #1 \s_obj_end #2#3
{
- \exp_last_unbraced:Nfo \@@_item:nnn
+ \exp_args:Nf \@@_item:nnn
{
\int_eval:n
{
- \int_compare:nNnT {#2} < \c_zero
- { \seq_count:N #1 + \c_one + }
- #2
+ \int_compare:nNnT {#3} < \c_zero
+ { \seq_count:N #2 + \c_one + }
+ #3
}
}
#1
- { ? \__prg_break: }
- { }
+ { ? \__prg_break: } { }
\__prg_break_point:
}
\cs_new:Npn \@@_item:nnn #1#2#3
@@ -2255,34 +2259,33 @@
% \seq_mapthread_function:NNN, \seq_mapthread_function:NcN,
% \seq_mapthread_function:cNN, \seq_mapthread_function:ccN
% }
-% \begin{macro}[aux]{\@@_mapthread_function:NN}
+% \begin{macro}[aux]
+% {\@@_mapthread_function:wNN, \@@_mapthread_function:wNw}
% \begin{macro}[aux]{\@@_mapthread_function:Nnnwnn}
-% The idea here is to first expand both of the sequences, adding the usual
-% |{ ? \__prg_break: } { }| to the end of each one. This is most conveniently
-% done in two steps using an auxiliary function. The mapping then throws
-% away the first token of |#2| and |#5|, which for items in the sequences
-% will both be \cs{@@_item:n}. The function to be mapped will then be
-% applied to the two entries. When the code hits the end of one of the
-% sequences, the break material will stop the entire loop and tidy up. This
-% avoids needing to find the count of the two sequences, or worrying about
-% which is longer.
+% The idea here is to first expand both of the sequences, adding the
+% usual |{ ? \__prg_break: } { }| to the end of each one. This is
+% most conveniently done in two steps using an auxiliary function.
+% The mapping then throws away the first tokens of |#2| and |#5|,
+% which for items in the sequences will both be \cs{s_@@}
+% \cs{@@_item:n}. The function to be mapped will then be applied to
+% the two entries. When the code hits the end of one of the
+% sequences, the break material will stop the entire loop and tidy up.
+% This avoids needing to find the count of the two sequences, or
+% worrying about which is longer.
% \begin{macrocode}
\cs_new:Npn \seq_mapthread_function:NNN #1#2#3
+ { \exp_after:wN \@@_mapthread_function:wNN #2 #1 #3 }
+\cs_new:Npn \@@_mapthread_function:wNN \s_@@ #1 \s_obj_end #2#3
{
- \exp_after:wN \@@_mapthread_function:NN
- \exp_after:wN #3
- \exp_after:wN #1
- #2
- { ? \__prg_break: } { }
+ \exp_after:wN \@@_mapthread_function:wNw #2 #3
+ #1 { ? \__prg_break: } { }
\__prg_break_point:
}
-\cs_new:Npn \@@_mapthread_function:NN #1#2
+\cs_new:Npn \@@_mapthread_function:wNw \s_@@ #1 \s_obj_end #2
{
- \exp_after:wN \@@_mapthread_function:Nnnwnn
- \exp_after:wN #1
- #2
- { ? \__prg_break: } { }
- \q_stop
+ \@@_mapthread_function:Nnnwnn #2
+ #1 { ? \__prg_break: } { }
+ \q_stop
}
\cs_new:Npn \@@_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6
{
@@ -2316,22 +2319,22 @@
\cs_new_protected:Npn \seq_set_from_clist:NN #1#2
{
\tl_set:Nx #1
- { \clist_map_function:NN #2 \@@_wrap_item:n }
+ { \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n \s_obj_end }
}
\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2
{
\tl_set:Nx #1
- { \clist_map_function:nN {#2} \@@_wrap_item:n }
+ { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n \s_obj_end }
}
\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2
{
\tl_gset:Nx #1
- { \clist_map_function:NN #2 \@@_wrap_item:n }
+ { \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n \s_obj_end }
}
\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2
{
\tl_gset:Nx #1
- { \clist_map_function:nN {#2} \@@_wrap_item:n }
+ { \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n \s_obj_end }
}
\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc }
\cs_generate_variant:Nn \seq_set_from_clist:NN { c , cc }
@@ -2347,7 +2350,7 @@
% {\seq_reverse:N, \seq_reverse:c, \seq_greverse:N, \seq_greverse:c}
% \begin{macro}[aux]{\@@_tmp:w}
% \begin{macro}[aux]{\@@_reverse:NN}
-% \begin{macro}[aux]{\@@_reverse_item:nwn}
+% \begin{macro}[aux]{\@@_reverse_setup:w, \@@_reverse_item:nwn}
% Previously, \cs{seq_reverse:N} was coded by collecting the items
% in reverse order after an \cs{exp_stop_f:} marker.
% \begin{verbatim}
@@ -2389,9 +2392,11 @@
{
\cs_set_eq:NN \@@_tmp:w \@@_item:n
\cs_set_eq:NN \@@_item:n \@@_reverse_item:nwn
- #1 #2 { #2 \exp_not:n { } }
+ #1 #2 { \exp_after:wN \@@_reverse_setup:w #2 }
\cs_set_eq:NN \@@_item:n \@@_tmp:w
}
+\cs_new:Npn \@@_reverse_setup:w #1 \s_obj_end
+ { #1 \exp_not:n { } \s_obj_end }
\cs_new:Npn \@@_reverse_item:nwn #1 #2 \exp_not:n #3
{
#2
@@ -2669,7 +2674,7 @@
{
\exp_args:Nf \@@_act_output:n
{
- \exp_args:NNo \str_case:nnn #2 {#1}
+ \exp_args:NNo \str_case:nnF #2 {#1}
{ \exp_stop_f: #2 }
}
}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
index 1065a889bc5..9b26d172cae 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3clist.dtx
@@ -37,7 +37,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3clist.dtx 4500 2013-05-26 11:18:19Z bruno $
+\GetIdInfo$Id: l3clist.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Comma separated lists}
%</driver|package>
%<*driver>
@@ -1438,7 +1438,7 @@
{
\clist_if_exist:NTF #1
{
- \int_case:nnn { \clist_count:N #1 }
+ \int_case:nnF { \clist_count:N #1 }
{
{ 0 } { }
{ 1 } { \exp_after:wN \@@_use:wwn #1 , , { } }
@@ -1507,101 +1507,6 @@
% \end{variable}
% \end{variable}
%
-% \subsection{Deprecated interfaces}
-%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\clist_top:NN, \clist_top:cN}
-% \UnitTested
-% These are old stack functions.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \clist_top:NN \clist_get:NN
-\cs_new_eq:NN \clist_top:cN \clist_get:cN
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\clist_remove_element:Nn,\clist_gremove_element:Nn}
-% \UnitTested
-% An older name for \cs{clist_remove_all:Nn}.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \clist_remove_element:Nn \clist_remove_all:Nn
-\cs_new_eq:NN \clist_gremove_element:Nn \clist_gremove_all:Nn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\clist_display:N, \clist_display:c}
-% An older name for \cs{clist_show:N}.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \clist_display:N \clist_show:N
-\cs_new_eq:NN \clist_display:c \clist_show:c
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated on 2011-09-05, for removal by 2011-12-31.
-%
-% \begin{macro}
-% {
-% \clist_trim_spaces:N, \clist_trim_spaces:c,
-% \clist_gtrim_spaces:N, \clist_gtrim_spaces:c
-% }
-% Since clist items are now always stripped from their surrounding
-% spaces, it is redundant to provide these functions.
-% The \cs{@@_trim_spaces:n} function is now internal,
-% deprecated for use outside the kernel.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \clist_trim_spaces:N #1 { \clist_set:No #1 {#1} }
-\cs_new_protected:Npn \clist_gtrim_spaces:N #1 { \clist_gset:No #1 {#1} }
-\cs_generate_variant:Nn \clist_trim_spaces:N { c }
-\cs_generate_variant:Nn \clist_gtrim_spaces:N { c }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated on 2012-05-10, for removal by 2012-08-31.
-%
-% \begin{macro}[pTF]
-% {\clist_if_eq:NN, \clist_if_eq:Nc, \clist_if_eq:cN, \clist_if_eq:cc}
-% Simple copies from the token list variable material.
-% \begin{macrocode}
-%<*deprecated>
-\prg_new_eq_conditional:NNn \clist_if_eq:NN \tl_if_eq:NN { p , T , F , TF }
-\prg_new_eq_conditional:NNn \clist_if_eq:Nc \tl_if_eq:Nc { p , T , F , TF }
-\prg_new_eq_conditional:NNn \clist_if_eq:cN \tl_if_eq:cN { p , T , F , TF }
-\prg_new_eq_conditional:NNn \clist_if_eq:cc \tl_if_eq:cc { p , T , F , TF }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-05-13 for removal by 2012-11-31.
-%
-% \begin{macro}{\clist_length:N, \clist_length:c, \clist_length:n}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \clist_length:N \clist_count:N
-\cs_new_eq:NN \clist_length:n \clist_count:c
-\cs_new_eq:NN \clist_length:c \clist_count:n
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-05-19 for removal by 2012-11-31.
-%
-% \begin{macro}{\clist_use:N, \clist_use:c}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \clist_use:N \tl_use:N
-\cs_new_eq:NN \clist_use:c \tl_use:c
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
index 9d19c801958..d238f97b31f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3expan.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3expan.dtx 4521 2013-07-09 11:45:31Z joseph $
+\GetIdInfo$Id: l3expan.dtx 4565 2013-07-24 08:21:51Z joseph $
{L3 Argument expansion}
%</driver|package>
%<*driver>
@@ -1672,7 +1672,8 @@
%
% \begin{macro}[EXP,pTF]
% {\str_if_eq:Vn, \str_if_eq:on, \str_if_eq:nV, \str_if_eq:no, \str_if_eq:VV}
-% \begin{macro}[EXP]{\str_case:onn}
+% \begin{macro}[EXP]{\str_case:on}
+% \begin{macro}[EXP, TF]{\str_case:on}
% These cannot come earlier as they need \cs{cs_generate_variant:Nn}.
% \begin{macrocode}
\cs_generate_variant:Nn \str_if_eq_p:nn { V , o }
@@ -1683,10 +1684,21 @@
\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 }
-\cs_generate_variant:Nn \str_case:nnn { o }
+\cs_generate_variant:Nn \str_case:nn { o }
+\cs_generate_variant:Nn \str_case:nnT { o }
+\cs_generate_variant:Nn \str_case:nnF { o }
+\cs_generate_variant:Nn \str_case:nnTF { o }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\str_case:onn}
+% Deprecated 2013-07-15.
+% \begin{macrocode}
+\cs_new_eq:NN \str_case:onn \str_case:onF
+% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%</initex|package>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
index 6b76cf6b341..3e2f06dacce 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3file.dtx 4483 2013-05-01 10:57:41Z bruno $
+\GetIdInfo$Id: l3file.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 File and I/O operations}
%</driver|package>
%<*driver>
@@ -1678,83 +1678,6 @@
}
% \end{macrocode}
%
-% \subsection{Deprecated functions}
-%
-% Deprecated on 2012-06-28, for removal by 2012-12-31.
-%
-% \begin{macro}{\iow_wrap:xnnnN}
-% This was renamed and one unneeded argument was removed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \iow_wrap:xnnnN #1#2#3#4#5
- { \iow_wrap:nnnN {#1} {#2} {#4} #5 }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated on 2012-06-24, for removal by 2012-12-31.
-%
-% \begin{variable}{\l_iow_line_length_int}
-% Simple rename. Here we copy the \TeX{} register.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \l_iow_line_length_int \l_iow_line_count_int
-%</deprecated>
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}{\ior_to:NN, \ior_gto:NN, \ior_str_to:NN, \ior_str_gto:NN}
-% The local variants are renames, while the global variants are
-% deprecated and add the \TeX{} primitive \tn{global}.
-% \begin{macrocode}
-\cs_new_eq:NN \ior_to:NN \ior_get:NN
-\cs_new_protected_nopar:Npn \ior_gto:NN { \tex_global:D \ior_to:NN }
-\cs_new_eq:NN \ior_str_to:NN \ior_get_str:NN
-\cs_new_protected_nopar:Npn \ior_str_gto:NN { \tex_global:D \ior_str_to:NN }
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated on 2012-02-10, for removal by 2012-05-31.
-%
-% \begin{macro}{\iow_now_when_avail:Nn, \iow_now_when_avail:Nx}
-% For writing only if the stream requested is open at all.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \iow_now_when_avail:Nn #1
- { \cs_if_free:NTF #1 { \use_none:n } { \iow_now:Nn #1 } }
-\cs_new_protected:Npn \iow_now_when_avail:Nx #1
- { \cs_if_free:NTF #1 { \use_none:n } { \iow_now:Nx #1 } }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\iow_now_buffer_safe:Nn, \iow_now_buffer_safe:Nx}
-% This is much more easily done using the wrapping system: there is
-% an expansion there, so a bit of a hack is needed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \iow_now_buffer_safe:Nn #1#2
- { \iow_wrap:xnnnN { \exp_not:n {#2} } { } \c_zero { } \iow_now:Nn #1 }
-\cs_new_protected:Npn \iow_now_buffer_safe:Nx #1#2
- { \iow_wrap:xnnnN {#2} { } \c_zero { } \iow_now:Nn #1 }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ior_open_streams:}
-% \begin{macro}{\iow_open_streams:}
-% Slightly misleading names.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \ior_open_streams: \ior_list_streams:
-\cs_new_eq:NN \iow_open_streams: \iow_list_streams:
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3format.ins b/Master/texmf-dist/source/latex/l3kernel/l3format.ins
deleted file mode 100644
index 76fe0ee3e76..00000000000
--- a/Master/texmf-dist/source/latex/l3kernel/l3format.ins
+++ /dev/null
@@ -1,92 +0,0 @@
-\iffalse meta-comment
-
-File l3format.ins Copyright (C) 2011,2012 The LaTeX3 Project
-
-It may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), either version 1.3c of this
-license or (at your option) any later version. The latest version
-of this license is in the file
-
- http://www.latex-project.org/lppl.txt
-
-This file is part of the "l3kernel bundle" (The Work in LPPL)
-and all files in that bundle must be distributed together.
-
-The released version of this bundle is available from CTAN.
-
-\fi
-
-\let\jobname\relax
-\input l3docstrip.dtx
-\askforoverwritefalse
-
-\preamble
-
-EXPERIMENTAL CODE
-
-Do not distribute this file without also distributing the
-source files specified above.
-
-Do not distribute a modified version of this file.
-
-\endpreamble
-% stop docstrip adding \endinput
-\postamble
-\endpostamble
-
-\keepsilent
-
-\generate
- {
- \file{l3format.ltx}
- {
- \from{l3bootstrap.dtx} {initex}
- \from{l3names.dtx} {initex}
- \from{l3basics.dtx} {initex}
- \from{l3expan.dtx} {initex}
- \from{l3tl.dtx} {initex}
- \from{l3seq.dtx} {initex}
- % ===== ===FORMAT ONLY =========
- \from{l3alloc.dtx} {initex}
- % ==============================
- \from{l3int.dtx} {initex}
- \from{l3quark.dtx} {initex}
- \from{l3prg.dtx} {initex}
- \from{l3clist.dtx} {initex}
- \from{l3token.dtx} {initex}
- \from{l3prop.dtx} {initex}
- \from{l3msg.dtx} {initex}
- \from{l3file.dtx} {initex}
- \from{l3skip.dtx} {initex}
- \from{l3keys.dtx} {initex}
- \from{l3fp.dtx} {initex}
- \from{l3fp-aux.dtx} {initex}
- \from{l3fp-traps.dtx} {initex}
- \from{l3fp-round.dtx} {initex}
- \from{l3fp-parse.dtx} {initex}
- \from{l3fp-logic.dtx} {initex}
- \from{l3fp-basics.dtx} {initex}
- \from{l3fp-extended.dtx}{initex}
- \from{l3fp-expo.dtx} {initex}
- \from{l3fp-trig.dtx} {initex}
- \from{l3fp-convert.dtx} {initex}
- \from{l3fp-assign.dtx} {initex}
- \from{l3fp-old.dtx} {initex}
- \from{l3box.dtx} {initex}
- \from{l3coffins.dtx} {initex}
- \from{l3color.dtx} {initex}
- \from{l3luatex.dtx} {initex}
- \from{l3candidates.dtx} {initex}
- % ======== FORMAT ONLY =========
- \from{l3final.dtx} {initex}
- % ==============================
- }
- }
-
-\generate{\file{l3dvips.ltx} {\from{l3drivers.dtx}{initex,dvips} }}
-\generate{\file{l3pdfmode.ltx} {\from{l3drivers.dtx}{initex,pdfmode} }}
-\generate{\file{l3xdvipdfmx.ltx}{\from{l3drivers.dtx}{initex,xdvipdfmx}}}
-
-\generate{\file{l3docstrip.tex}{\from{l3docstrip.dtx}{program}}}
-
-\endbatchfile \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
index f1f034553aa..de6e4d72b6a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3int.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3int.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3int.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Integers}
%</driver|package>
%<*driver>
@@ -342,25 +342,29 @@
% \end{center}
% \end{function}
%
-% \begin{function}[added = 2012-06-03, EXP]{\int_case:nnn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\int_case:nn}
% \begin{syntax}
-% \cs{int_case:nnn} \Arg{test integer expression} \\
+% \cs{int_case:nnTF} \Arg{test integer expression} \\
% ~~|{| \\
% ~~~~\Arg{intexpr case_1} \Arg{code case_1} \\
% ~~~~\Arg{intexpr case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
% ~~~~\Arg{intexpr case_n} \Arg{code case_n} \\
% ~~|}| \\
-% ~~\Arg{else code}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function evaluates the \meta{test integer expression} and
% compares this in turn to each of the
% \meta{integer expression cases}. If the two are equal then the
-% associated \meta{code} is left in the input stream. If none of
-% the tests are \texttt{true} then the \texttt{else code} will be
-% left in the input stream. For example
+% associated \meta{code} is left in the input stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{int_case:nn}, which does nothing if there is no match, is also
+% available. For example
% \begin{verbatim}
-% \int_case:nnn
+% \int_case:nnF
% { 2 * 5 }
% {
% { 5 } { Small }
@@ -1464,23 +1468,36 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\int_case:nnn}
-% \begin{macro}[aux]{\@@_case:nnn}
+% \begin{macro}[EXP]{\int_case:nn}
+% \begin{macro}[EXP, TF]{\int_case:nn}
+% \begin{macro}[aux]{\@@_case:nnTF}
% \begin{macro}[aux]{\@@_case:nw, \@@_case_end:nw}
% For integer cases, the first task to fully expand the check
-% condition. After that, a loop is started to compare each possible
-% value and stop if the test is true. The tested value is put at the
-% end to ensure that there is necessarily a match, which will fire the
-% \enquote{else} pathway. The leading \tn{romannumeral} triggers an
-% expansion which is then stopped in \cs{@@_case_end:nw}.
+% condition. The over all idea is then much the same as for
+% \cs{str_case:nn(TF)} as described in \pkg{l3basics}.
% \begin{macrocode}
-\cs_new:Npn \int_case:nnn #1
+\cs_new:Npn \int_case:nnTF #1
+ {
+ \tex_romannumeral:D
+ \exp_args:Nf \@@_case:nnTF { \int_eval:n {#1} }
+ }
+\cs_new:Npn \int_case:nnT #1#2#3
+ {
+ \tex_romannumeral:D
+ \exp_args:Nf \@@_case:nnTF { \int_eval:n {#1} } {#2} {#3} { }
+ }
+\cs_new:Npn \int_case:nnF #1#2
+ {
+ \tex_romannumeral:D
+ \exp_args:Nf \@@_case:nnTF { \int_eval:n {#1} } {#2} { }
+ }
+\cs_new:Npn \int_case:nn #1#2
{
\tex_romannumeral:D
- \exp_args:Nf \@@_case:nnn { \int_eval:n {#1} }
+ \exp_args:Nf \@@_case:nnTF { \int_eval:n {#1} } {#2} { } { }
}
-\cs_new:Npn \@@_case:nnn #1#2#3
- { \@@_case:nw {#1} #2 {#1} {#3} \q_recursion_stop }
+\cs_new:Npn \@@_case:nnTF #1#2#3#4
+ { \@@_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop }
\cs_new:Npn \@@_case:nw #1#2#3
{
\int_compare:nNnTF {#1} = {#2}
@@ -1492,6 +1509,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[pTF]{\int_if_odd:n}
% \UnitTested
@@ -1720,13 +1738,13 @@
{
\exp_args:NNo \exp_args:No \@@_to_symbols:nnnn
{
- \int_case:nnn
+ \int_case:nn
{ 1 + \int_mod:nn { #1 - 1 } {#2} }
- {#3} { }
+ {#3}
}
{#1} {#2} {#3}
}
- { \int_case:nnn {#1} {#3} { } }
+ { \int_case:nn {#1} {#3} }
}
\cs_new:Npn \@@_to_symbols:nnnn #1#2#3#4
{
@@ -1863,7 +1881,7 @@
}
% \end{macrocode}
% Convert to a letter only if necessary, otherwise simply return the
-% value unchanged. It would be cleaner to use \cs{int_case:nnn},
+% value unchanged. It would be cleaner to use \cs{int_case:nn},
% but in our case, the cases are contiguous, so it is forty times faster
% to use the \cs{if_case:w} primitive. The first \cs{exp_after:wN}
% expands the conditional, jumping to the correct case, the second one
@@ -2338,107 +2356,10 @@
%
% \subsection{Deprecated functions}
%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\int_convert_from_base_ten:nn}
-% \begin{macro}{\int_convert_to_symbols:nnn}
-% \begin{macro}{\int_convert_to_base_ten:nn}
-% Some simple renames.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \int_convert_from_base_ten:nn \int_to_base:nn
-\cs_new_eq:NN \int_convert_to_symbols:nnn \int_to_symbols:nnn
-\cs_new_eq:NN \int_convert_to_base_ten:nn \int_from_base:nn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\int_to_symbol:n}
-% \begin{macro}[aux]{\int_to_symbol_math:n}
-% \begin{macro}[aux]{\int_to_symbol_text:n}
-% \UnitTested
-% This is rather too tied to \LaTeXe{}.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_nopar:Npn \int_to_symbol:n
- {
- \scan_align_safe_stop:
- \mode_if_math:TF
- { \int_to_symbol_math:n }
- { \int_to_symbol_text:n }
- }
-\cs_new:Npn \int_to_symbol_math:n #1
- {
- \int_to_symbols:nnn {#1} { 9 }
- {
- { 1 } { * }
- { 2 } { \dagger }
- { 3 } { \ddagger }
- { 4 } { \mathsection }
- { 5 } { \mathparagraph }
- { 6 } { \| }
- { 7 } { ** }
- { 8 } { \dagger \dagger }
- { 9 } { \ddagger \ddagger }
- }
- }
-\cs_new:Npn \int_to_symbol_text:n #1
- {
- \int_to_symbols:nnn {#1} { 9 }
- {
- { 1 } { \textasteriskcentered }
- { 2 } { \textdagger }
- { 3 } { \textdaggerdbl }
- { 4 } { \textsection }
- { 5 } { \textparagraph }
- { 6 } { \textbardbl }
- { 7 } { \textasteriskcentered \textasteriskcentered }
- { 8 } { \textdagger \textdagger }
- { 9 } { \textdaggerdbl \textdaggerdbl }
- }
- }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\if_num:w}
-% Deprecated 2012-05-30 for removal after 2012-11-30.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \if_num:w \if_int_compare:w
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{variable}{\l_tmpc_int}
-% Deprecated 2012-07-04 for removal after 2012-12-31.
-% \begin{macrocode}
-%<*deprecated>
-\int_new:N \l_tmpc_int
-%</deprecated>
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{macro}{\int_eval:w, \int_eval_end:}
-% Deprecated 2012-07-13 for removal after 2012-12-31.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \int_eval:w \@@_eval:w
-\cs_new_eq:NN \int_eval_end: \@@_eval_end:
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\int_value:w}
-% Deprecated 2012-07-14 for removal after 2012-12-31.
+% \begin{macro}{\int_case:nnn}
+% Deprecated 2013-07-15.
% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \int_value:w \@@_value:w
-%</deprecated>
+\cs_new_eq:NN \int_case:nnn \int_case:nnF
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
index 3ad30990c73..e5c80030f7e 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3keys.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3keys.dtx 4544 2013-07-12 07:14:52Z joseph $
+\GetIdInfo$Id: l3keys.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Experimental key-value interfaces}
%</driver|package>
%<*driver>
@@ -122,7 +122,7 @@
%
% Key names may contain any tokens, as they are handled internally
% using \cs{tl_to_str:n}. As will be discussed in
-% section~\ref{sec:subdivision}, it is suggested that the character
+% section~\ref{sec:l3keys:subdivision}, it is suggested that the character
% |/| is reserved for sub-division of keys into logical
% groups. Functions and variables are \emph{not} expanded when creating
% key names, and so
@@ -281,6 +281,16 @@
% (which must a floating point expression). If the variable does not exist,
% it will be created globally at the point that the key is set up.
% \end{function}
+%
+% \begin{function}[added = 2013-07-14]
+% {.groups:n}
+% \begin{syntax}
+% \meta{key} .groups:n = \meta{groups}
+% \end{syntax}
+% Defines \meta{key} as belonging to the \meta{groups} declared. Groups
+% provide a \enquote{secondary axis} for selectively setting keys, and are
+% described in Section~\ref{sec:l3keys:selective}.
+% \end{function}
%
% \begin{function}[updated = 2013-07-09]
% {.initial:n, .initial:V, .initial:o, .initial:x}
@@ -391,7 +401,7 @@
% \end{function}
%
% \section{Sub-dividing keys}
-% \label{sec:subdivision}
+% \label{sec:l3keys:subdivision}
%
% When creating large numbers of keys, it may be desirable to divide
% them into several sub-groups for a given module. This can be achieved
@@ -612,10 +622,12 @@
% \begin{function}[added = 2011-08-23]
% {
% \keys_set_known:nnN, \keys_set_known:nVN,
-% \keys_set_known:nvN, \keys_set_known:noN
+% \keys_set_known:nvN, \keys_set_known:noN,
+% \keys_set_known:nn, \keys_set_known:nV,
+% \keys_set_known:nv, \keys_set_known:no
% }
% \begin{syntax}
-% \cs{keys_set_known:nn} \Arg{module} \Arg{keyval list} \meta{tl}
+% \cs{keys_set_known:nnN} \Arg{module} \Arg{keyval list} \meta{tl}
% \end{syntax}
% In some cases, the desired behavior is to simply ignore unknown keys,
% collecting up information on these for later processing. The
@@ -624,7 +636,81 @@
% are not processed further by the parser.
% The key--value pairs for each \emph{unknown} key name will be
% stored in the \meta{tl} in a comma-separated form (\emph{i.e.}~an edited
-% version of the \meta{keyval list}).
+% version of the \meta{keyval list}). The \cs{keys_set_known:nn} version skips
+% this stage.
+% \end{function}
+%
+% \section{Selective key setting}
+% \label{sec:l3keys:selective}
+%
+% In some cases it may be useful to be able to select only some keys for
+% setting, even though these keys have the same path. For example, with
+% a set of keys defined using
+% \begin{verbatim}
+% \keys define:nn { mymodule }
+% {
+% key-one .code:n = { \my_func:n {#1} } ,
+% key-two .tl_set:N = \l_my_a_tl ,
+% key-three .tl_set:N = \l_my_b_tl ,
+% key-four .fp_set:N = \l_my_a_fp ,
+% }
+% \end{verbatim}
+% the use of \cs{keys_set:nn} will attempt to set all four keys. However, in
+% some contexts it may only be sensible to set some keys, or to control the
+% order of setting. To do this, keys may be assigned to \emph{groups}:
+% arbitrary sets which are independent of the key tree. Thus modifying the
+% example to read
+% \begin{verbatim}
+% \keys define:nn { mymodule }
+% {
+% key-one .code:n = { \my_func:n {#1} } ,
+% key-one .groups:n = { first } ,
+% key-two .tl_set:N = \l_my_a_tl ,
+% key-two .groups:n = { first } ,
+% key-three .tl_set:N = \l_my_b_tl ,
+% key-three .groups:n = { second } ,
+% key-four .fp_set:N = \l_my_a_fp ,
+% }
+% \end{verbatim}
+% will assign \texttt{key-one} and \texttt{key-two} to group \texttt{first},
+% \texttt{key-three} to group \texttt{second}, while \texttt{key-four} is
+% not assigned to a group.
+%
+% Selective key setting may be achieved either by selecting one or more
+% groups to be made \enquote{active}, or by marking one or more groups to
+% be ignored in key setting.
+%
+% \begin{function}[added = 2013-07-14]
+% {
+% \keys_set_filter:nnnN, \keys_set_filter:nnVN,
+% \keys_set_filter:nnvN, \keys_set_filter:nnoN,
+% \keys_set_filter:nnn, \keys_set_filter:nnV,
+% \keys_set_filter:nnv, \keys_set_filter:nno
+% }
+% \begin{syntax}
+% \cs{keys_set_filter:nnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{tl}
+% \end{syntax}
+% Actives key filtering in an \enquote{opt-out} sense: keys assigned to any
+% of the \meta{groups} specified will be ignored. The \meta{groups} are
+% given as a comma-separated list. Unknown keys are not assigned to any
+% group and will thus always be set. The key--value pairs for each
+% key which is filtered out will be stored in the \meta{tl} in a
+% comma-separated form (\emph{i.e.}~an edited version of the \meta{keyval
+% list}). The \cs{keys_set_filter:nnn} version skips this stage.
+% \end{function}
+%
+% \begin{function}[added = 2013-07-14]
+% {
+% \keys_set_groups:nnn, \keys_set_groups:nnV,
+% \keys_set_groups:nnv, \keys_set_groups:nno
+% }
+% \begin{syntax}
+% \cs{keys_set_groups:nnn} \Arg{module} \Arg{groups} \Arg{keyval list}
+% \end{syntax}
+% Actives key filtering in an \enquote{opt-in} sense: only keys assigned to
+% one or more of the \meta{groups} specified will be set. The \meta{groups} are
+% given as a comma-separated list. Unknown keys are not assigned to any
+% group and will thus never be set.
% \end{function}
%
% \section{Utility functions for keys}
@@ -968,11 +1054,11 @@
%<@@=keys>
% \end{macrocode}
%
-% \begin{variable}{\c_@@_code_root_tl, \c_@@_vars_root_tl}
+% \begin{variable}{\c_@@_code_root_tl, \c_@@_info_root_tl}
% The prefixes for the code and variables of the keys themselves.
% \begin{macrocode}
\tl_const:Nn \c_@@_code_root_tl { key~code~>~ }
-\tl_const:Nn \c_@@_vars_root_tl { key~var~>~ }
+\tl_const:Nn \c_@@_info_root_tl { key~info~>~ }
% \end{macrocode}
% \end{variable}
%
@@ -983,14 +1069,6 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_value_forbidden_tl, \c_@@_value_required_tl}
-% Two marker token lists.
-% \begin{macrocode}
-\tl_const:Nn \c_@@_value_forbidden_tl { forbidden }
-\tl_const:Nn \c_@@_value_required_tl { required }
-% \end{macrocode}
-% \end{variable}
-%
% \begin{variable}{\l_keys_choice_int, \l_keys_choice_tl}
% Publicly accessible data on which choice is being used when several
% are generated as a set.
@@ -999,6 +1077,15 @@
\tl_new:N \l_keys_choice_tl
% \end{macrocode}
% \end{variable}
+%
+% \begin{variable}{\l_@@_groups_clist}
+% Used for storing and recovering the list of groups which apply to a key:
+% set as a comma list but at one point we have to use this for a token
+% list recovery.
+% \begin{macrocode}
+\clist_new:N \l_@@_groups_clist
+% \end{macrocode}
+% \end{variable}
%
% \begin{variable}{\l_keys_key_tl}
% The name of a key itself: needed when setting keys.
@@ -1021,6 +1108,13 @@
\bool_new:N \l_@@_no_value_bool
% \end{macrocode}
% \end{variable}
+%
+% \begin{variable}{\l_@@_only_known_bool}
+% Used to track if only \enquote{known} keys are being set.
+% \begin{macrocode}
+\bool_new:N \l_@@_only_known_bool
+% \end{macrocode}
+% \end{variable}
%
% \begin{variable}{\l_keys_path_tl}
% The \enquote{path} of the current key is stored here: this is
@@ -1037,11 +1131,28 @@
\tl_new:N \l_@@_property_tl
% \end{macrocode}
% \end{variable}
+%
+% \begin{variable}{\l_@@_selective_bool, \l_@@_filtered_bool}
+% Two flags for using key groups: one to indicate that \enquote{selective}
+% setting is active, a second to specify which type (\enquote{opt-in}
+% or \enquote{opt-out}).
+% \begin{macrocode}
+\bool_new:N \l_@@_selective_bool
+\bool_new:N \l_@@_filtered_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_selective_seq}
+% The list of key groups being filtered in or out during selective setting.
+% \begin{macrocode}
+\seq_new:N \l_@@_selective_seq
+% \end{macrocode}
+% \end{variable}
%
-% \begin{variable}{\l_@@_unknown_clist}
-% Used when setting only known keys to store those left over.
+% \begin{variable}{\l_@@_unused_clist}
+% Used when setting only some keys to store those left over.
% \begin{macrocode}
-\tl_new:N \l_@@_unknown_clist
+\tl_new:N \l_@@_unused_clist
% \end{macrocode}
% \end{variable}
%
@@ -1051,6 +1162,13 @@
\tl_new:N \l_keys_value_tl
% \end{macrocode}
% \end{variable}
+%
+% \begin{variable}{\l_@@_tmp_bool}
+% Scratch space.
+% \begin{macrocode}
+\bool_new:N \l_@@_tmp_bool
+% \end{macrocode}
+% \end{variable}
%
% \subsection{The key defining mechanism}
%
@@ -1259,31 +1377,43 @@
%
% \begin{macro}[int]
% {\@@_cmd_set:nn, \@@_cmd_set:nx, \@@_cmd_set:Vn, \@@_cmd_set:Vo}
-% \begin{macro}[aux]{\@@_cmd_set:n}
% Creating a new command means tidying up the properties and then making
% the internal function which actually does the work.
% \begin{macrocode}
\cs_new_protected:Npn \@@_cmd_set:nn #1#2
{
- \@@_cmd_set:n {#1}
+ \prop_clear_new:c { \c_@@_info_root_tl #1 }
\cs_set:cpn { \c_@@_code_root_tl #1 } ##1 {#2}
}
\cs_generate_variant:Nn \@@_cmd_set:nn { nx , Vn , Vo }
-\cs_new_protected:Npn \@@_cmd_set:n #1
- {
- \tl_clear_new:c { \c_@@_vars_root_tl #1 .default }
- \tl_set:cn { \c_@@_vars_root_tl #1 .default } { \q_no_value }
- \tl_clear_new:c { \c_@@_vars_root_tl #1 .req }
- }
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[int]{\@@_default_set:n}
% Setting a default value is easy.
% \begin{macrocode}
\cs_new_protected:Npn \@@_default_set:n #1
- { \tl_set:cn { \c_@@_vars_root_tl \l_keys_path_tl .default } {#1} }
+ {
+ \prop_if_exist:cT { \c_@@_info_root_tl \l_keys_path_tl }
+ { \prop_put:cnn { \c_@@_info_root_tl \l_keys_path_tl } { default } {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\@@_groups_set:n}
+% Assigning a key to one or more groups uses comma lists. So that the comma
+% list is \enquote{well-behaved} later, the storage is done via a stored
+% list here, which does the normalisation.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_groups_set:n #1
+ {
+ \prop_if_exist:cT { \c_@@_info_root_tl \l_keys_path_tl }
+ {
+ \clist_set:Nn \l_@@_groups_clist {#1}
+ \prop_put:cnV { \c_@@_info_root_tl \l_keys_path_tl }
+ { groups } \l_@@_groups_clist
+ }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1359,13 +1489,16 @@
%
% \begin{macro}[int]{\@@_value_requirement:n}
% Values can be required or forbidden by having the appropriate marker
-% set.
+% set. First, both the required and forbidden ones are clear, just in case!
% \begin{macrocode}
\cs_new_protected:Npn \@@_value_requirement:n #1
{
- \tl_set_eq:cc
- { \c_@@_vars_root_tl \l_keys_path_tl .req }
- { c_@@_value_ #1 _tl }
+ \prop_if_exist:cT { \c_@@_info_root_tl \l_keys_path_tl }
+ {
+ \prop_remove:cn { \c_@@_info_root_tl \l_keys_path_tl } { required }
+ \prop_remove:cn { \c_@@_info_root_tl \l_keys_path_tl } { forbidden }
+ \prop_put:cnn { \c_@@_info_root_tl \l_keys_path_tl } {#1} { true }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1522,6 +1655,14 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{.groups:n}
+% A single property to create groups of keys.
+% \begin{macrocode}
+\cs_new_protected:cpn { \c_@@_props_root_tl .groups:n } #1
+ { \@@_groups_set:n {#1} }
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{.initial:n, .initial:V, .initial:o, .initial:x}
% The standard hand-off approach.
@@ -1656,7 +1797,7 @@
% \begin{macro}[aux]{\@@_set:nnn, \@@_set:onn}
% A simple wrapper again.
% \begin{macrocode}
-\cs_new_protected:Npn \keys_set:nn
+\cs_new_protected_nopar:Npn \keys_set:nn
{ \@@_set:onn { \l_@@_module_tl } }
\cs_new_protected:Npn \@@_set:nnn #1#2#3
{
@@ -1675,28 +1816,83 @@
% \keys_set_known:nnN, \keys_set_known:nVN,
% \keys_set_known:nvN, \keys_set_known:noN
% }
-% \begin{macro}[aux]{\@@_set_known:nnnN, \@@_set_known:onnN}
+% \begin{macro}
+% {
+% \keys_set_known:nn, \keys_set_known:nV,
+% \keys_set_known:nv, \keys_set_known:no
+% }
+% Setting known keys simply means setting the appropriate flag, then
+% running the standard code.
% \begin{macrocode}
-\cs_new_protected:Npn \keys_set_known:nnN
- { \@@_set_known:onnN { \l_@@_module_tl } }
-\cs_new_protected:Npn \@@_set_known:nnnN #1#2#3#4
+\cs_new_protected:Npn \keys_set_known:nnN #1#2#3
{
- \tl_set:Nx \l_@@_module_tl { \tl_to_str:n {#2} }
- \clist_clear:N \l_@@_unknown_clist
- \cs_set_eq:NN \@@_execute_unknown: \@@_execute_unknown_alt:
- \keyval_parse:NNn \@@_set_elt:n \@@_set_elt:nn {#3}
- \cs_set_eq:NN \@@_execute_unknown: \@@_execute_unknown_std:
- \tl_set:Nn \l_@@_module_tl {#1}
- \cs_set_eq:NN #4 \l_@@_unknown_clist
+ \clist_clear:N \l_@@_unused_clist
+ \keys_set_known:nn {#1} {#2}
+ \tl_set:Nx #3 { \exp_not:o { \l_@@_unused_clist } }
}
\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no }
-\cs_generate_variant:Nn \@@_set_known:nnnN { o }
+\cs_new_protected:Npn \keys_set_known:nn #1#2
+ {
+ \bool_set_true:N \l_@@_only_known_bool
+ \keys_set:nn {#1} {#2}
+ \bool_set_false:N \l_@@_only_known_bool
+ }
+\cs_generate_variant:Nn \keys_set_known:nn { nV , nv , no }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}
+% {
+% \keys_set_filter:nnnN, \keys_set_filter:nnVN, \keys_set_filter:nnvN
+% \keys_set_filter:nnoN
+% }
+% \begin{macro}
+% {
+% \keys_set_filter:nnn, \keys_set_filter:nnV, \keys_set_filter:nnv
+% \keys_set_filter:nno
+% }
+% \begin{macro}
+% {
+% \keys_set_groups:nnn, \keys_set_groups:nnV, \keys_set_groups:nnv
+% \keys_set_groups:nno
+% }
+% The idea of setting keys in a selective manner again uses flags
+% wrapped around the basic code.
+% \begin{macrocode}
+\cs_new_protected:Npn \keys_set_filter:nnnN #1#2#3#4
+ {
+ \clist_clear:N \l_@@_unused_clist
+ \keys_set_filter:nnn {#1} {#2} {#3}
+ \tl_set:Nx #4 { \exp_not:o { \l_@@_unused_clist } }
+ }
+\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \keys_set_filter:nnn #1#2#3
+ {
+ \bool_set_true:N \l_@@_selective_bool
+ \bool_set_true:N \l_@@_filtered_bool
+ \seq_set_from_clist:Nn \l_@@_selective_seq {#2}
+ \keys_set:nn {#1} {#3}
+ \bool_set_false:N \l_@@_selective_bool
+ }
+\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
+\cs_new_protected:Npn \keys_set_groups:nnn #1#2#3
+ {
+ \bool_set_true:N \l_@@_selective_bool
+ \bool_set_false:N \l_@@_filtered_bool
+ \seq_set_from_clist:Nn \l_@@_selective_seq {#2}
+ \keys_set:nn {#1} {#3}
+ \bool_set_false:N \l_@@_selective_bool
+ }
+\cs_generate_variant:Nn \keys_set_groups:nnn { nnV , nnv , nno }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[int]{\@@_set_elt:n, \@@_set_elt:nn}
% \begin{macro}[aux]{\@@_set_elt_aux:nn}
+% \begin{macro}[aux]{\@@_set_elt_aux:, \@@_set_elt_selective:}
% A shared system once again. First, set the current path and add a
% default if needed. There are then checks to see if the a value is
% required or forbidden. If everything passes, move on to execute the
@@ -1717,6 +1913,12 @@
\tl_set:Nx \l_keys_key_tl { \tl_to_str:n {#1} }
\tl_set:Nx \l_keys_path_tl { \l_@@_module_tl / \l_keys_key_tl }
\@@_value_or_default:n {#2}
+ \bool_if:NTF \l_@@_selective_bool
+ { \@@_set_elt_selective: }
+ { \@@_set_elt_aux: }
+ }
+\cs_new_protected_nopar:Npn \@@_set_elt_aux:
+ {
\bool_if:nTF
{
\@@_if_value_p:n { required } &&
@@ -1740,6 +1942,64 @@
}
}
% \end{macrocode}
+% If selective setting is active, there are a number of possible sub-cases
+% to consider. The key name may not be known at all or if it is, it may not
+% have any groups assigned. There is then the question of whether the
+% selection is opt-in or opt-out.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_set_elt_selective:
+ {
+ \prop_if_exist:cTF { \c_@@_info_root_tl \l_keys_path_tl }
+ {
+ \prop_get:cnNTF { \c_@@_info_root_tl \l_keys_path_tl }
+ { groups } \l_@@_groups_clist
+ { \@@_check_groups: }
+ {
+ \bool_if:NTF \l_@@_filtered_bool
+ { \@@_set_elt_aux: }
+ { \@@_store_unused: }
+ }
+ }
+ {
+ \bool_if:NTF \l_@@_filtered_bool
+ { \@@_set_elt_aux: }
+ { \@@_store_unused: }
+ }
+ }
+% \end{macrocode}
+% In the case where selective setting requires a comparison of the list
+% of groups which apply to a key with the list of those which have been
+% set active. That requires two mappings, and again a different outcome
+% depending on whether opt-in or opt-out is set.
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_check_groups:
+ {
+ \bool_set_false:N \l_@@_tmp_bool
+ \seq_map_inline:Nn \l_@@_selective_seq
+ {
+ \clist_map_inline:Nn \l_@@_groups_clist
+ {
+ \str_if_eq:nnT {##1} {####1}
+ {
+ \bool_set_true:N \l_@@_tmp_bool
+ \clist_map_break:n { \seq_map_break: }
+ }
+ }
+ }
+ \bool_if:NTF \l_@@_tmp_bool
+ {
+ \bool_if:NTF \l_@@_filtered_bool
+ { \@@_store_unused: }
+ { \@@_set_elt_aux: }
+ }
+ {
+ \bool_if:NTF \l_@@_filtered_bool
+ { \@@_set_elt_aux: }
+ { \@@_store_unused: }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
% \end{macro}
% \end{macro}
%
@@ -1749,18 +2009,13 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_value_or_default:n #1
{
- \tl_set:Nn \l_keys_value_tl {#1}
- \bool_if:NT \l_@@_no_value_bool
+ \bool_if:NTF \l_@@_no_value_bool
{
- \quark_if_no_value:cF { \c_@@_vars_root_tl \l_keys_path_tl .default }
- {
- \cs_if_exist:cT { \c_@@_vars_root_tl \l_keys_path_tl .default }
- {
- \tl_set_eq:Nc \l_keys_value_tl
- { \c_@@_vars_root_tl \l_keys_path_tl .default }
- }
- }
+ \prop_get:cnNF { \c_@@_info_root_tl \l_keys_path_tl }
+ { default } \l_keys_value_tl
+ { \tl_clear:N \l_keys_value_tl }
}
+ { \tl_set:Nn \l_keys_value_tl {#1} }
}
% \end{macrocode}
% \end{macro}
@@ -1771,44 +2026,39 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_if_value:n #1 { p }
{
- \tl_if_eq:ccTF { c_@@_value_ #1 _tl }
- { \c_@@_vars_root_tl \l_keys_path_tl .req }
- { \prg_return_true: }
+ \prop_if_exist:cTF { \c_@@_info_root_tl \l_keys_path_tl }
+ {
+ \prop_if_in:cnTF { \c_@@_info_root_tl \l_keys_path_tl } {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
{ \prg_return_false: }
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}[int]{\@@_execute:}
-% \begin{macro}[aux]
-% {
-% \@@_execute_unknown:,
-% \@@_execute_unknown_std:,
-% \@@_execute_unknown_alt:
-% }
+% \begin{macro}[aux]{\@@_execute_unknown:}
% \begin{macro}[aux, EXP]{\@@_execute:nn}
+% \begin{macro}[aux]{\@@_store_unused:}
% Actually executing a key is done in two parts. First, look for the
% key itself, then look for the \texttt{unknown} key with the same
-% path. If both of these fail, complain.
+% path. If both of these fail, complain. What exactly happens if a key
+% is unknown depends on whether unknown keys are being skipped or if
+% an error should be raised.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_execute:
{ \@@_execute:nn { \l_keys_path_tl } { \@@_execute_unknown: } }
\cs_new_protected_nopar:Npn \@@_execute_unknown:
{
- \@@_execute:nn { \l_@@_module_tl / unknown }
- {
- \__msg_kernel_error:nnxx { kernel } { key-unknown }
- { \l_keys_path_tl } { \l_@@_module_tl }
- }
- }
-\cs_new_eq:NN \@@_execute_unknown_std: \@@_execute_unknown:
-\cs_new_protected_nopar:Npn \@@_execute_unknown_alt:
- {
- \clist_put_right:Nx \l_@@_unknown_clist
+ \bool_if:NTF \l_@@_only_known_bool
+ { \@@_store_unused: }
{
- \exp_not:o \l_keys_key_tl
- \bool_if:NF \l_@@_no_value_bool
- { = { \exp_not:o \l_keys_value_tl } }
+ \@@_execute:nn { \l_@@_module_tl / unknown }
+ {
+ \__msg_kernel_error:nnxx { kernel } { key-unknown }
+ { \l_keys_path_tl } { \l_@@_module_tl }
+ }
}
}
\cs_new:Npn \@@_execute:nn #1#2
@@ -1820,10 +2070,20 @@
}
{#2}
}
+\cs_new_protected_nopar:Npn \@@_store_unused:
+ {
+ \clist_put_right:Nx \l_@@_unused_clist
+ {
+ \exp_not:o \l_keys_key_tl
+ \bool_if:NF \l_@@_no_value_bool
+ { = { \exp_not:o \l_keys_value_tl } }
+ }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[int, EXP]{\@@_choice_find:n}
% Executing a choice has two parts. First, try the choice given, then
@@ -1934,46 +2194,34 @@
% \end{macrocode}
%
% \subsection{Deprecated functions}
-%
-% Deprecated on 2013-07-09.
%
% \begin{macro}[int]{\@@_choice_code_store:n, \@@_choice_code_store:x}
-% The code for making multiple choices is stored in a token list.
+% \begin{macro}{.choice_code:n, .choice_code:x}
+% \begin{macro}[int]{\@@_choices_generate:n}
+% \begin{macro}[aux]{\@@_choices_generate_aux:n}
+% \begin{macro}{.generate_choices:n}
+% Deprecated on 2013-07-09.
% \begin{macrocode}
\cs_new_protected:Npn \@@_choice_code_store:n #1
{
\cs_if_exist:cF
- { \c_@@_vars_root_tl \l_keys_path_tl .choice~code }
+ { \c_@@_info_root_tl \l_keys_path_tl .choice~code }
{
\tl_new:c
- { \c_@@_vars_root_tl \l_keys_path_tl .choice~code }
+ { \c_@@_info_root_tl \l_keys_path_tl .choice~code }
}
- \tl_set:cn { \c_@@_vars_root_tl \l_keys_path_tl .choice~code }
+ \tl_set:cn { \c_@@_info_root_tl \l_keys_path_tl .choice~code }
{#1}
}
\cs_generate_variant:Nn \@@_choice_code_store:n { x }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{.choice_code:n, .choice_code:x}
-% Storing the code for choices
-% \begin{macrocode}
\cs_new_protected:cpn { \c_@@_props_root_tl .choice_code:n } #1
{ \@@_choice_code_store:n {#1} }
\cs_new_protected:cpn { \c_@@_props_root_tl .choice_code:x } #1
{ \@@_choice_code_store:x {#1} }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_choices_generate:n}
-% \begin{macro}[aux]{\@@_choices_generate_aux:n}
-% Creating multiple-choices means setting up the \enquote{indicator}
-% code, then applying whatever the user wanted.
-% \begin{macrocode}
\cs_new_protected:Npn \@@_choices_generate:n #1
{
\cs_if_exist:cTF
- { \c_@@_vars_root_tl \l_keys_path_tl .choice~code }
+ { \c_@@_info_root_tl \l_keys_path_tl .choice~code }
{
\@@_choice_make:
\int_zero:N \l_keys_choice_int
@@ -1993,7 +2241,7 @@
\int_set:Nn \exp_not:N \l_keys_choice_int
{ \int_use:N \l_keys_choice_int }
\exp_not:v
- { \c_@@_vars_root_tl \l_keys_path_tl .choice~code }
+ { \c_@@_info_root_tl \l_keys_path_tl .choice~code }
}
}
\__msg_kernel_new:nnnn { kernel } { generate-choices-before-code }
@@ -2003,42 +2251,14 @@
Before~using~.generate_choices:n~the~code~should~be~defined~
with~'.choice_code:n'~or~'.choice_code:x'.
}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{.generate_choices:n}
-% Making choices is easy.
-% \begin{macrocode}
\cs_new_protected:cpn { \c_@@_props_root_tl .generate_choices:n } #1
{ \@@_choices_generate:n {#1} }
% \end{macrocode}
% \end{macro}
-%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\KV_process_space_removal_sanitize:NNn}
-% \begin{macro}{\KV_process_space_removal_no_sanitize:NNn}
-% \begin{macro}{\KV_process_no_space_removal_no_sanitize:NNn}
-% There is just one function for this now.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \KV_process_space_removal_sanitize:NNn \keyval_parse:NNn
-\cs_new_eq:NN \KV_process_space_removal_no_sanitize:NNn \keyval_parse:NNn
-\cs_new_eq:NN \KV_process_no_space_removal_no_sanitize:NNn \keyval_parse:NNn
-%</deprecated>
-% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-%
-% Internal material for removal by 2012-12-31.
-%
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \c_keys_code_root_tl \c__keys_code_root_tl
-%</deprecated>
-% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
%</initex|package>
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
index 5ae55447bf0..d6e34107c13 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3luatex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3luatex.dtx Copyright (C) 2010-2012 The LaTeX3 Project
+%% File: l3luatex.dtx Copyright (C) 2010-2013 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3luatex.dtx 4049 2012-08-03 14:01:40Z bruno $
+\GetIdInfo$Id: l3luatex.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Experimental LuaTeX-specific functions}
%</driver|package>
%<*driver>
@@ -500,18 +500,6 @@
}
% \end{macrocode}
%
-% \subsection{Deprecated functions}
-%
-% Deprecated 2011-12-21, for removal by 2012-03-31.
-%
-% \begin{variable}{\c_string_cctab}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \c_string_cctab \c_str_cctab
-%</deprecated>
-% \end{macrocode}
-% \end{variable}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index 9a10e278f2d..aa3cf3ca654 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3msg.dtx 4412 2013-01-08 12:23:19Z joseph $
+\GetIdInfo$Id: l3msg.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Messages}
%</driver|package>
%<*driver>
@@ -1874,6 +1874,8 @@
{ Erroneous~variable~#1 used! }
\@@_kernel_new:nnn { kernel } { misused-sequence }
{ A~sequence~was~misused. }
+\@@_kernel_new:nnn { kernel } { misused-prop }
+ { A~property~list~was~misused. }
\@@_kernel_new:nnn { kernel } { negative-replication }
{ Negative~argument~for~\prg_replicate:nn. }
\@@_kernel_new:nnn { kernel } { unknown-comparison }
@@ -2117,145 +2119,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Deprecated functions}
-%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\msg_class_new:nn}
-% This is only ever used in a |set| fashion.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \msg_class_new:nn \msg_class_set:nn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \msg_trace:nnxxxx, \msg_trace:nnxxx, \msg_trace:nnxx,
-% \msg_trace:nnx, \msg_trace:nn
-% }
-% The performance here is never going to be good enough for tracing
-% code, so let's be realistic.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \msg_trace:nnxxxx \msg_log:nnxxxx
-\cs_new_eq:NN \msg_trace:nnxxx \msg_log:nnxxx
-\cs_new_eq:NN \msg_trace:nnxx \msg_log:nnxx
-\cs_new_eq:NN \msg_trace:nnx \msg_log:nnx
-\cs_new_eq:NN \msg_trace:nn \msg_log:nn
-%</deprecated>
-% \end{macrocode}
-%\end{macro}
-%
-% \begin{macro}{\msg_generic_new:nnn}
-% \begin{macro}{\msg_generic_new:nn}
-% \begin{macro}{\msg_generic_set:nnn}
-% \begin{macro}{\msg_generic_set:nn}
-% \begin{macro}{\msg_direct_interrupt:xxxxx}
-% \begin{macro}{\msg_direct_log:xx}
-% \begin{macro}{\msg_direct_term:xx}
-% These were all too low-level.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \msg_generic_new:nnn #1#2#3 { \deprecated }
-\cs_new_protected:Npn \msg_generic_new:nn #1#2 { \deprecated }
-\cs_new_protected:Npn \msg_generic_set:nnn #1#2#3 { \deprecated }
-\cs_new_protected:Npn \msg_generic_set:nn #1#2 { \deprecated }
-\cs_new_protected:Npn \msg_direct_interrupt:xxxxx #1#2#3#4#5 { \deprecated }
-\cs_new_protected:Npn \msg_direct_log:xx #1#2 { \deprecated }
-\cs_new_protected:Npn \msg_direct_term:xx #1#2 { \deprecated }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_kernel_bug:x}
-% \begin{variable}{\c_@@_kernel_bug_text_tl, \c_@@_kernel_bug_more_text_tl}
-% \begin{macrocode}
-%<*deprecated>
-\cs_set_protected:Npn \@@_kernel_bug:x #1
- {
- \msg_interrupt:nnn { \c_@@_kernel_bug_text_tl }
- {
- #1
- \msg_see_documentation_text:n { LaTeX3 }
- }
- { \c_@@_kernel_bug_more_text_tl }
- }
-\tl_const:Nn \c_@@_kernel_bug_text_tl
- { This~is~a~LaTeX~bug:~check~coding! }
-\tl_const:Nn \c_@@_kernel_bug_more_text_tl
- {
- There~is~a~coding~bug~somewhere~around~here. \\
- This~probably~needs~examining~by~an~expert.
- \c_msg_return_text_tl
- }
-%</deprecated>
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-%
-% Deprecated on 2012-06-28, for removal by 2012-12-31.
-%
-% \begin{macro}{\msg_newline:, \msg_two_newlines:}
-% New lines are printed in the same way as for low-level file writing.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_nopar:Npn \msg_newline: { ^^J }
-\cs_new_nopar:Npn \msg_two_newlines: { ^^J ^^J }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\msg_log:x, \msg_term:x}
-% \begin{macro}{\msg_interrupt:xxx}
-% These were all misnamed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_generate_variant:Nn \msg_log:n { x }
-\cs_generate_variant:Nn \msg_term:n { x }
-\cs_generate_variant:Nn \msg_interrupt:nnn { xxx }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Deprecated on 2012-06-29, for removal by 2012-12-31.
-%
-% \begin{macro}{\msg_class_set:nn}
-% Setting up a message class does two tasks. Any existing redirection
-% is cleared, and the various message functions are created
-% to simply use the code stored for the message.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \msg_class_set:nn #1#2
- {
- \cs_if_exist:cTF { @@_ #1 _code:nnnnnn }
- \cs_set_protected:cpn
- \cs_new_protected:cpn
- { @@_ #1 _code:nnnnnn } ##1##2##3##4##5##6 {#2}
- \prop_clear_new:c { l_@@_redirect_ #1 _prop }
- \cs_set_protected_nopar:cpn { msg_ #1 :nnxxxx }
- { \@@_use:nnnnnnn {#1} }
- \cs_set_protected:cpx { msg_ #1 :nnxxx } ##1##2##3##4##5
- { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} {##3} {##4} {##5} { } }
- \cs_set_protected:cpx { msg_ #1 :nnxx } ##1##2##3##4
- { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} {##3} {##4} { } { } }
- \cs_set_protected:cpx { msg_ #1 :nnx } ##1##2##3
- { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} {##3} { } { } { } }
- \cs_set_protected:cpx { msg_ #1 :nn } ##1##2
- { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} { } { } { } { } }
- }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 231c324274a..60e96a8351d 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3prg.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3prg.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Control structures}
%</driver|package>
%<*driver>
@@ -1645,208 +1645,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Deprecated functions}
-%
-% These were deprecated on 2012-02-08, and will be removed entirely by
-% 2012-05-31.
-%
-% \begin{macro}[aux]{\prg_define_quicksort:nnn}
-% |#1| is the name, |#2| and |#3| are the tokens enclosing the
-% argument. For the somewhat strange \meta{clist} type which doesn't
-% enclose the items but uses a separator we define it by hand
-% afterwards. When doing the first pass, the algorithm wraps all
-% elements in braces and then uses a generic quicksort which works
-% on token lists.
-%
-% As an example
-% \begin{quote}
-% |\prg_define_quicksort:nnn{seq}{\seq_elt:w}{\seq_elt_end:w}|
-% \end{quote}
-% defines the user function |\seq_quicksort:n| and furthermore
-% expects to use the two functions |\seq_quicksort_compare:nnTF|
-% which compares the items and |\seq_quicksort_function:n| which is
-% placed before each sorted item. It is up to the programmer to
-% define these functions when needed. For the |seq| type a sequence
-% is a token list variable, so one additionally has to define
-% \begin{quote}
-% |\cs_set_nopar:Npn \seq_quicksort:N{\exp_args:No\seq_quicksort:n}|
-% \end{quote}
-%
-%
-% For details on the implementation see \enquote{Sorting in \TeX{}'s Mouth}
-% by Bernd Raichle. Firstly we define the function for parsing the
-% initial list and then the braced list afterwards.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \prg_define_quicksort:nnn #1#2#3 {
- \cs_set:cpx{#1_quicksort:n}##1{
- \exp_not:c{#1_quicksort_start_partition:w} ##1
- \exp_not:n{#2\q_nil#3\q_stop}
- }
- \cs_set:cpx{#1_quicksort_braced:n}##1{
- \exp_not:c{#1_quicksort_start_partition_braced:n} ##1
- \exp_not:N\q_nil\exp_not:N\q_stop
- }
- \cs_set:cpx {#1_quicksort_start_partition:w} #2 ##1 #3{
- \exp_not:N \quark_if_nil:nT {##1}\exp_not:N \use_none_delimit_by_q_stop:w
- \exp_not:c{#1_quicksort_do_partition_i:nnnw} {##1}{}{}
- }
- \cs_set:cpx {#1_quicksort_start_partition_braced:n} ##1 {
- \exp_not:N \quark_if_nil:nT {##1}\exp_not:N \use_none_delimit_by_q_stop:w
- \exp_not:c{#1_quicksort_do_partition_i_braced:nnnn} {##1}{}{}
- }
-%</deprecated>
-% \end{macrocode}
-% Now for doing the partitions.
-% \begin{macrocode}
-%<*deprecated>
- \cs_set:cpx {#1_quicksort_do_partition_i:nnnw} ##1##2##3 #2 ##4 #3 {
- \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
- {
- \exp_not:c{#1_quicksort_compare:nnTF}{##1}{##4}
- \exp_not:c{#1_quicksort_partition_greater_ii:nnnn}
- \exp_not:c{#1_quicksort_partition_less_ii:nnnn}
- }
- {##1}{##2}{##3}{##4}
- }
- \cs_set:cpx {#1_quicksort_do_partition_i_braced:nnnn} ##1##2##3##4 {
- \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
- {
- \exp_not:c{#1_quicksort_compare:nnTF}{##1}{##4}
- \exp_not:c{#1_quicksort_partition_greater_ii_braced:nnnn}
- \exp_not:c{#1_quicksort_partition_less_ii_braced:nnnn}
- }
- {##1}{##2}{##3}{##4}
- }
- \cs_set:cpx {#1_quicksort_do_partition_ii:nnnw} ##1##2##3 #2 ##4 #3 {
- \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
- {
- \exp_not:c{#1_quicksort_compare:nnTF}{##4}{##1}
- \exp_not:c{#1_quicksort_partition_less_i:nnnn}
- \exp_not:c{#1_quicksort_partition_greater_i:nnnn}
- }
- {##1}{##2}{##3}{##4}
- }
- \cs_set:cpx {#1_quicksort_do_partition_ii_braced:nnnn} ##1##2##3##4 {
- \exp_not:N \quark_if_nil:nTF {##4} \exp_not:c {#1_do_quicksort_braced:nnnnw}
- {
- \exp_not:c{#1_quicksort_compare:nnTF}{##4}{##1}
- \exp_not:c{#1_quicksort_partition_less_i_braced:nnnn}
- \exp_not:c{#1_quicksort_partition_greater_i_braced:nnnn}
- }
- {##1}{##2}{##3}{##4}
- }
-%</deprecated>
-% \end{macrocode}
-% This part of the code handles the two branches in each
-% sorting. Again we will also have to do it braced.
-% \begin{macrocode}
-%<*deprecated>
- \cs_set:cpx {#1_quicksort_partition_less_i:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_i:nnnw}{##1}{##2}{{##4}##3}}
- \cs_set:cpx {#1_quicksort_partition_less_ii:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_ii:nnnw}{##1}{##2}{##3{##4}}}
- \cs_set:cpx {#1_quicksort_partition_greater_i:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_i:nnnw}{##1}{{##4}##2}{##3}}
- \cs_set:cpx {#1_quicksort_partition_greater_ii:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_ii:nnnw}{##1}{##2{##4}}{##3}}
- \cs_set:cpx {#1_quicksort_partition_less_i_braced:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_i_braced:nnnn}{##1}{##2}{{##4}##3}}
- \cs_set:cpx {#1_quicksort_partition_less_ii_braced:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_ii_braced:nnnn}{##1}{##2}{##3{##4}}}
- \cs_set:cpx {#1_quicksort_partition_greater_i_braced:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_i_braced:nnnn}{##1}{{##4}##2}{##3}}
- \cs_set:cpx {#1_quicksort_partition_greater_ii_braced:nnnn} ##1##2##3##4{
- \exp_not:c{#1_quicksort_do_partition_ii_braced:nnnn}{##1}{##2{##4}}{##3}}
-%</deprecated>
-% \end{macrocode}
-% Finally, the big kahuna! This is where the sub-lists are sorted.
-% \begin{macrocode}
-%<*deprecated>
- \cs_set:cpx {#1_do_quicksort_braced:nnnnw} ##1##2##3##4\q_stop {
- \exp_not:c{#1_quicksort_braced:n}{##2}
- \exp_not:c{#1_quicksort_function:n}{##1}
- \exp_not:c{#1_quicksort_braced:n}{##3}
- }
-}
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\prg_quicksort:n}
-% A simple version. Sorts a list of tokens, uses the function
-% |\prg_quicksort_compare:nnTF| to compare items, and places the
-% function |\prg_quicksort_function:n| in front of each of them.
-% \begin{macrocode}
-%<*deprecated>
-\prg_define_quicksort:nnn {prg}{}{}
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\prg_quicksort_function:n}
-% \begin{macro}{\prg_quicksort_compare:nnTF}
-% \begin{macrocode}
-%<*deprecated>
-\cs_set:Npn \prg_quicksort_function:n {\ERROR}
-\cs_set:Npn \prg_quicksort_compare:nnTF {\ERROR}
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% These were deprecated on 2011-05-27 and will be removed entirely by
-% 2011-08-31.
-%
-% \begin{macro}{\prg_new_map_functions:Nn}
-% \begin{macro}{\prg_set_map_functions:Nn}
-% As we have restructured the structured variables, these are no
-% longer needed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \prg_new_map_functions:Nn #1#2 { \deprecated }
-\cs_new_protected:Npn \prg_set_map_functions:Nn #1#2 { \deprecated }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Deprecated 2012-06-03 for removal after 2012-12-31.
-%
-% \begin{macro}[EXP]
-% {
-% \prg_case_int:nnn, \prg_case_str:nnn, \prg_case_str:onn,
-% \prg_case_str:xxn, \prg_case_tl:Nnn, \prg_case_tl:cnn
-% }
-% Moved to more sensible modules.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \prg_case_int:nnn \int_case:nnn
-\cs_new_eq:NN \prg_case_str:nnn \str_case:nnn
-\cs_new_eq:NN \prg_case_str:onn \str_case:onn
-\cs_new_eq:NN \prg_case_str:xxn \str_case_x:nnn
-\cs_new_eq:NN \prg_case_tl:Nnn \tl_case:Nnn
-\cs_new_eq:NN \prg_case_tl:cnn \tl_case:cnn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-06-04 for removal after 2012-12-31.
-%
-% \begin{macro}
-% {
-% \prg_stepwise_function:nnnN, \prg_stepwise_inline:nnnn,
-% \prg_stepwise_variable:nnnNn
-% }
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \prg_stepwise_function:nnnN \int_step_function:nnnN
-\cs_new_eq:NN \prg_stepwise_inline:nnnn \int_step_inline:nnnn
-\cs_new_eq:NN \prg_stepwise_variable:nnnNn \int_step_variable:nnnNn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
index 3046ae59e8b..50472ab8754 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3prop.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3prop.dtx 4423 2013-01-09 00:05:30Z bruno $
+\GetIdInfo$Id: l3prop.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Property lists}
%</driver|package>
%<*driver>
@@ -433,8 +433,18 @@
% \section{Internal property list functions}
%
% \begin{variable}{\s__prop}
-% The internal token used to separate out property list entries,
-% surrounding each \meta{key}.
+% The internal token used at the beginning of property lists. This is
+% also used after each \meta{key} (see \cs{__prop_pair:wn}).
+% \end{variable}
+%
+% \begin{variable}{\__prop_pair:wn}
+% \begin{syntax}
+% \cs{__prop_pair:wn} \meta{key} \cs{s__prop} \Arg{item}
+% \end{syntax}
+% The internal token used to begin each key--value pair in the
+% property list. If expanded outside of a mapping or manipulation
+% function, an error will be raised. The definition should always be
+% set globally.
% \end{variable}
%
% \begin{variable}{\l__prop_internal_tl}
@@ -494,18 +504,33 @@
%
% A property list is a macro whose top-level expansion is for the form
% \begin{quote}
-% \cs{s_@@} \meta{key_1} \cs{s_@@} \Arg{value_1} \\
+% \cs{s_@@}
+% \cs{@@_pair:wn} \meta{key_1} \cs{s_@@} \Arg{value_1} \\
% \ldots{} \\
-% \cs{s_@@} \meta{key_n} \cs{s_@@} \Arg{value_n} \\
+% \cs{@@_pair:wn} \meta{key_n} \cs{s_@@} \Arg{value_n} \\
+% \cs{s_obj_end}
% \end{quote}
+% where the separators \cs{s_@@} and \cs{s_obj_end} are scan marks
+% (equal to \cs{scan_stop:}), and \cs{@@_pair:wn} can be used to map
+% through the property list.
%
% \begin{macro}[int]{\s_@@}
-% A private scan mark is used as a marker surrounding each key.
+% A private scan mark is used as a marker after each key, and at the
+% very beginning of the property list.
% \begin{macrocode}
\__scan_new:N \s_@@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[int]{\@@_pair:wn}
+% The delimiter is always defined, but when misused simply triggers an
+% error and removes its argument.
+% \begin{macrocode}
+\cs_new:Npn \@@_pair:wn #1 \s_@@ #2
+ { \__msg_kernel_expandable_error:nn { kernel } { misused-prop } }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{variable}{\l_@@_internal_tl}
% Token list used to store the new key--value pair inserted by
% \cs{prop_put:Nnn} and friends.
@@ -515,19 +540,23 @@
% \end{variable}
%
% \begin{variable}[tested = m3prop004]{\c_empty_prop}
-% An empty prop is an empty token list.
+% An empty prop.
% \begin{macrocode}
-\cs_new_eq:NN \c_empty_prop \c_empty_tl
+\tl_const:Nn \c_empty_prop { \s_@@ \s_obj_end }
% \end{macrocode}
% \end{variable}
%
% \subsection{Allocation and initialisation}
%
% \begin{macro}[tested = m3prop001]{\prop_new:N, \prop_new:c}
-% Internally, property lists are just token lists.
+% Property lists are initialized with the value \cs{c_empty_prop}.
% \begin{macrocode}
-\cs_new_eq:NN \prop_new:N \tl_new:N
-\cs_new_eq:NN \prop_new:c \tl_new:c
+\cs_new_protected:Npn \prop_new:N #1
+ {
+ \__chk_if_free_cs:N #1
+ \cs_gset_eq:NN #1 \c_empty_prop
+ }
+\cs_generate_variant:Nn \prop_new:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -535,22 +564,26 @@
% \begin{macro}[tested = m3prop001]{\prop_gclear:N, \prop_gclear:c}
% The same idea for clearing.
% \begin{macrocode}
-\cs_new_eq:NN \prop_clear:N \tl_clear:N
-\cs_new_eq:NN \prop_clear:c \tl_clear:c
-\cs_new_eq:NN \prop_gclear:N \tl_gclear:N
-\cs_new_eq:NN \prop_gclear:c \tl_gclear:c
+\cs_new_protected:Npn \prop_clear:N #1
+ { \prop_set_eq:NN #1 \c_empty_prop }
+\cs_generate_variant:Nn \prop_clear:N { c }
+\cs_new_protected:Npn \prop_gclear:N #1
+ { \prop_gset_eq:NN #1 \c_empty_prop }
+\cs_generate_variant:Nn \prop_gclear:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}[tested = m3prop001]{\prop_clear_new:N, \prop_clear_new:c}
% \begin{macro}[tested = m3prop001]{\prop_gclear_new:N, \prop_gclear_new:c}
-% Once again a simple copy from the token list functions.
+% Once again a simple variation of the token list functions.
% \begin{macrocode}
-\cs_new_eq:NN \prop_clear_new:N \tl_clear_new:N
-\cs_new_eq:NN \prop_clear_new:c \tl_clear_new:c
-\cs_new_eq:NN \prop_gclear_new:N \tl_gclear_new:N
-\cs_new_eq:NN \prop_gclear_new:c \tl_gclear_new:c
+\cs_new_protected:Npn \prop_clear_new:N #1
+ { \prop_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new:N #1 } }
+\cs_generate_variant:Nn \prop_clear_new:N { c }
+\cs_new_protected:Npn \prop_gclear_new:N #1
+ { \prop_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new:N #1 } }
+\cs_generate_variant:Nn \prop_gclear_new:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -559,7 +592,7 @@
% {\prop_set_eq:NN, \prop_set_eq:cN, \prop_set_eq:Nc, \prop_set_eq:cc}
% \begin{macro}[tested = m3prop001]
% {\prop_gset_eq:NN, \prop_gset_eq:cN, \prop_gset_eq:Nc, \prop_gset_eq:cc}
-% Once again, these are simply copies from the token list functions.
+% These are simply copies from the token list functions.
% \begin{macrocode}
\cs_new_eq:NN \prop_set_eq:NN \tl_set_eq:NN
\cs_new_eq:NN \prop_set_eq:Nc \tl_set_eq:Nc
@@ -587,6 +620,14 @@
%
% \subsection{Accessing data in property lists}
%
+% \begin{macro}[EXP]{\@@_strip_end:w}
+% Strip the \cs{s_obj_end} marker from an expanded property list
+% variable.
+% \begin{macrocode}
+\cs_new:Npn \@@_strip_end:w #1 \s_obj_end { \exp_not:n {#1} }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}[int]{\@@_split:NnTF}
% \begin{macro}[aux]{\@@_split_aux:NnTF}
% \begin{macro}[aux, EXP]{\@@_split_aux:w}
@@ -600,7 +641,7 @@
% \meta{key} is turned into a string.
% \begin{quote}
% \cs{cs_set:Npn} \cs{@@_split_aux:w} |#1| \\
-% \quad \cs{s_@@} \meta{key} \cs{s_@@} |#2| \\
+% \quad \cs{@@_pair:wn} \meta{key} \cs{s_@@} |#2| \\
% \quad |#3| \cs{q_mark} |#4| |#5| \cs{q_stop} \\
% \quad |{| |#4| \Arg{true code} \Arg{false code} |}|
% \end{quote}
@@ -611,7 +652,8 @@
% \cs{use_i:nn}, and |#5| is additional tokens that we do not care
% about. The \meta{true code} is left in the input stream, and can
% use the parameters |#1|, |#2|, |#3| for the three parts of the
-% property list as desired.
+% property list as desired. Namely, the original property list is in
+% this case |#1| \cs{@@_pair:wn} \meta{key} \cs{s_@@} |{#2}| |#3|.
%
% If the \meta{key} is not there, then the \meta{function} is
% \cs{use_ii:nn}, which keeps the \meta{false code}.
@@ -621,10 +663,10 @@
\cs_new_protected:Npn \@@_split_aux:NnTF #1#2#3#4
{
\cs_set:Npn \@@_split_aux:w ##1
- \s_@@ #2 \s_@@ ##2 ##3 \q_mark ##4 ##5 \q_stop
+ \@@_pair:wn #2 \s_@@ ##2 ##3 \q_mark ##4 ##5 \q_stop
{ ##4 {#3} {#4} }
\exp_after:wN \@@_split_aux:w #1 \q_mark \use_i:nn
- \s_@@ #2 \s_@@ { } \q_mark \use_ii:nn \q_stop
+ \@@_pair:wn #2 \s_@@ { } \q_mark \use_ii:nn \q_stop
}
\cs_new:Npn \@@_split_aux:w { }
% \end{macrocode}
@@ -766,7 +808,7 @@
% \prop_gput:cnn, \prop_gput:cnV, \prop_gput:cno, \prop_gput:cnx,
% \prop_gput:cVn, \prop_gput:cVV, \prop_gput:con, \prop_gput:coo
% }
-% \begin{macro}[aux]{\@@_put:NNNnn}
+% \begin{macro}[aux]{\@@_put:NNnn}
% Since the branches of \cs{@@_split:NnTF} are used as the replacement
% text of an internal macro, and since the \meta{key} and new
% \meta{value} may contain arbitrary tokens, it is not safe to include
@@ -774,23 +816,30 @@
% storing in \cs{l_@@_internal_tl} tokens which (after
% \texttt{x}-expansion) encode the key--value pair. This variable can
% safely be used in \cs{@@_split:NnTF}. If the \meta{key} was absent,
-% append the new key--value to the list. Otherwise concatenate the
-% extracts |##1| and |##3| with the new key--value pair
-% \cs{l_@@_internal_tl}. The updated entry is placed at the same spot
-% as the original \meta{key} in the property list, preserving the
-% order of entries.
+% append the new key--value to the list (\cs{@@_strip_end:w} moves the
+% \cs{s_obj_end} marker). Otherwise concatenate the extracts |##1|
+% and |##3| with the new key--value pair \cs{l_@@_internal_tl}. The
+% updated entry is placed at the same spot as the original \meta{key}
+% in the property list, preserving the order of entries.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \prop_put:Nnn
- { \@@_put:NNNnn \tl_set:Nx \tl_put_right:Nx }
-\cs_new_protected_nopar:Npn \prop_gput:Nnn
- { \@@_put:NNNnn \tl_gset:Nx \tl_gput_right:Nx }
-\cs_new_protected:Npn \@@_put:NNNnn #1#2#3#4#5
+\cs_new_protected_nopar:Npn \prop_put:Nnn { \@@_put:NNnn \tl_set:Nx }
+\cs_new_protected_nopar:Npn \prop_gput:Nnn { \@@_put:NNnn \tl_gset:Nx }
+\cs_new_protected:Npn \@@_put:NNnn #1#2#3#4
{
\tl_set:Nn \l_@@_internal_tl
- { \s_@@ \tl_to_str:n {#4} \s_@@ { \exp_not:n {#5} } }
- \@@_split:NnTF #3 {#4}
- { #1 #3 { \exp_not:n {##1} \l_@@_internal_tl \exp_not:n {##3} } }
- { #2 #3 { \l_@@_internal_tl } }
+ {
+ \exp_not:N \@@_pair:wn \tl_to_str:n {#3}
+ \s_@@ { \exp_not:n {#4} }
+ }
+ \@@_split:NnTF #2 {#3}
+ { #1 #2 { \exp_not:n {##1} \l_@@_internal_tl \exp_not:n {##3} } }
+ {
+ #1 #2
+ {
+ \exp_after:wN \@@_strip_end:w #2
+ \l_@@_internal_tl \s_obj_end
+ }
+ }
}
\cs_generate_variant:Nn \prop_put:Nnn
{ NnV , Nno , Nnx , NV , NVV , No , Noo }
@@ -816,16 +865,25 @@
% convert the key to a string using \cs{tl_to_str:n}.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \prop_put_if_new:Nnn
- { \@@_put_if_new:NNnn \tl_put_right:Nx }
+ { \@@_put_if_new:NNnn \tl_set:Nx }
\cs_new_protected_nopar:Npn \prop_gput_if_new:Nnn
- { \@@_put_if_new:NNnn \tl_gput_right:Nx }
+ { \@@_put_if_new:NNnn \tl_gset:Nx }
\cs_new_protected:Npn \@@_put_if_new:NNnn #1#2#3#4
{
\tl_set:Nn \l_@@_internal_tl
- { \s_@@ \tl_to_str:n {#3} \s_@@ \exp_not:n { {#4} } }
+ {
+ \exp_not:N \@@_pair:wn \tl_to_str:n {#3}
+ \s_@@ \exp_not:n { {#4} }
+ }
\@@_split:NnTF #2 {#3}
{ }
- { #1 #2 { \l_@@_internal_tl } }
+ {
+ #1 #2
+ {
+ \exp_after:wN \@@_strip_end:w #2
+ \l_@@_internal_tl \s_obj_end
+ }
+ }
}
\cs_generate_variant:Nn \prop_put_if_new:Nnn { c }
\cs_generate_variant:Nn \prop_gput_if_new:Nnn { c }
@@ -847,10 +905,15 @@
% \begin{macro}[pTF, tested = m3prop003]{\prop_if_empty:N, \prop_if_empty:c}
% Same test as for token lists.
% \begin{macrocode}
-\prg_new_eq_conditional:NNn \prop_if_empty:N \tl_if_empty:N
- { p , T , F , TF }
-\prg_new_eq_conditional:NNn \prop_if_empty:c \tl_if_empty:c
- { p , T , F , TF }
+\prg_new_conditional:Npnn \prop_if_empty:N #1 { p , T , F , TF }
+ {
+ \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 }
% \end{macrocode}
% \end{macro}
%
@@ -859,7 +922,7 @@
% \prop_if_in:Nn, \prop_if_in:NV, \prop_if_in:No,
% \prop_if_in:cn, \prop_if_in:cV, \prop_if_in:co
% }
-% \begin{macro}[aux]{\@@_if_in:nwn,\@@_if_in:N}
+% \begin{macro}[aux,EXP]{\@@_if_in:nwwn,\@@_if_in:N}
% Testing expandably if a key is in a property list
% requires to go through the key--value pairs one by one.
% This is rather slow, and a faster test would be
@@ -867,47 +930,47 @@
% \prg_new_protected_conditional:Npnn \prop_if_in:Nn #1 #2
% {
% \@@_split:NnTF #1 {#2}
-% {
-% \prg_return_true:
-% \use_none:nnn
-% }
-% { \prg_return_false: }
+% { \prg_return_true: }
+% { \prg_return_false: }
% }
% \end{verbatim}
% but \cs{@@_split:NnTF} is non-expandable.
%
-% Instead, the key is compared to each key in turn using \cs{str_if_eq_x:nn},
-% which is expandable. To terminate the mapping, we append to the property
-% list the key that is searched for. This second
-% \cs{tl_to_str:n} is not expanded at the start, but only when included
-% in the \cs{str_if_eq_x:nn}. It cannot make the breaking mechanism choke,
-% because the arbitrary token list material is enclosed in braces.
-% When ending, we test the next token: it is either \cs{s_@@}
-% or \cs{q_recursion_tail} in the case of a missing key.
+% Instead, the key is compared to each key in turn using
+% \cs{str_if_eq_x:nn}, which is expandable. To terminate the mapping,
+% we append to the property list the key that is searched for. This
+% second \cs{tl_to_str:n} is not expanded at the start, but only when
+% included in the \cs{str_if_eq_x:nn}. It cannot make the breaking
+% mechanism choke, because the arbitrary token list material is
+% enclosed in braces. The second argument of \cs{@@_if_in:nwwn} is
+% most often empty. When the \meta{key} is found in the list,
+% \cs{@@_if_in:N} receives \cs{s_@@} or \cs{s_obj_end}, and if it is
+% found as the extra item, the function receives
+% \cs{q_recursion_tail}, easily recognizable.
+%
% Here, \cs{prop_map_function:NN} is not sufficient for the mapping,
% since it can only map a single token, and cannot carry the key that
% is searched for.
% \begin{macrocode}
\prg_new_conditional:Npnn \prop_if_in:Nn #1#2 { p , T , F , TF }
{
- \exp_last_unbraced:Noo \@@_if_in:nwn
- { \tl_to_str:n {#2} } #1
- \s_@@ \tl_to_str:n {#2} \s_@@ { }
- \q_recursion_tail
+ \exp_last_unbraced:Noo \@@_if_in:nwwn { \tl_to_str:n {#2} } #1
+ \@@_pair:wn \tl_to_str:n {#2} \s_@@ { }
+ \q_recursion_tail
\__prg_break_point:
}
-\cs_new:Npn \@@_if_in:nwn #1 \s_@@ #2 \s_@@ #3
+\cs_new:Npn \@@_if_in:nwwn #1#2 \@@_pair:wn #3 \s_@@ #4
{
- \str_if_eq_x:nnTF {#1} {#2}
+ \str_if_eq_x:nnTF {#1} {#3}
{ \@@_if_in:N }
- { \@@_if_in:nwn {#1} }
+ { \@@_if_in:nwwn {#1} }
}
\cs_new:Npn \@@_if_in:N #1
{
- \if_meaning:w \s_@@ #1
- \prg_return_true:
- \else:
+ \if_meaning:w \q_recursion_tail #1
\prg_return_false:
+ \else:
+ \prg_return_true:
\fi:
\__prg_break:
}
@@ -959,27 +1022,27 @@
% \prop_map_function:NN, \prop_map_function:Nc,
% \prop_map_function:cN, \prop_map_function:cc
% }
-% \begin{macro}[aux]{\@@_map_function:Nwn}
+% \begin{macro}[aux]{\@@_map_function:Nwwn}
% The fastest way to do a recursion here is to use an
-% \cs{if_meaning:w} test: the keys are strings, and thus
-% cannot match the marker \cs{q_recursion_tail}.
-% A special case to note is when the key |#2| is empty:
-% then \cs{q_recursion_tail} is compared to \cs{exp_after:wN},
-% also different.
+% \cs{if_meaning:w} test: the keys are strings, and thus cannot match
+% the marker \cs{q_recursion_tail}. A special case to note is when
+% the key |#3| is empty: then \cs{q_recursion_tail} is compared to
+% \cs{exp_after:wN}, also different. Note that |#2| can only consist
+% of \cs{s_@@} and/or \cs{s_obj_end}.
% \begin{macrocode}
\cs_new:Npn \prop_map_function:NN #1#2
{
- \exp_last_unbraced:NNo \@@_map_function:Nwn #2
- #1 \s_@@ \q_recursion_tail \s_@@ { }
+ \exp_last_unbraced:NNo \@@_map_function:Nwwn #2 #1
+ \@@_pair:wn \q_recursion_tail \s_@@ { }
\__prg_break_point:Nn \prop_map_break: { }
}
-\cs_new:Npn \@@_map_function:Nwn #1 \s_@@ #2 \s_@@ #3
+\cs_new:Npn \@@_map_function:Nwwn #1#2 \@@_pair:wn #3 \s_@@ #4
{
- \if_meaning:w \q_recursion_tail #2
+ \if_meaning:w \q_recursion_tail #3
\exp_after:wN \prop_map_break:
\fi:
- #1 {#2} {#3}
- \@@_map_function:Nwn #1
+ #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 }
@@ -988,17 +1051,26 @@
% \end{macro}
%
% \begin{macro}[tested = m3prop003]{\prop_map_inline:Nn, \prop_map_inline:cn}
-% Mapping in line requires a nesting level counter.
+% Mapping in line requires a nesting level counter. Store the current
+% definition of \cs{@@_pair:wn}, and define it anew. At the end of
+% the loop, revert to the earlier definition. Note that besides pairs
+% of the form \cs{@@_pair:wn} \meta{key} \cs{s_@@} \Arg{value}, there
+% are a leading and a trailing tokens, but both are equal to
+% \cs{scan_stop:}, hence have no effect in such inline mapping.
% \begin{macrocode}
\cs_new_protected:Npn \prop_map_inline:Nn #1#2
{
+ \cs_gset_eq:cN
+ { __prg_map_ \int_use:N \g__prg_map_int :wn } \@@_pair:wn
\int_gincr:N \g__prg_map_int
- \cs_gset:cpn { __prg_map_ \int_use:N \g__prg_map_int :w } ##1##2 {#2}
- \exp_last_unbraced:Nco \@@_map_function:Nwn
- { __prg_map_ \int_use:N \g__prg_map_int :w }
- #1
- \s_@@ \q_recursion_tail \s_@@ { }
- \__prg_break_point:Nn \prop_map_break: { \int_gdecr:N \g__prg_map_int }
+ \cs_gset:Npn \@@_pair:wn ##1 \s_@@ ##2 {#2}
+ #1
+ \__prg_break_point:Nn \prop_map_break:
+ {
+ \int_gdecr:N \g__prg_map_int
+ \cs_gset_eq:Nc \@@_pair:wn
+ { __prg_map_ \int_use:N \g__prg_map_int :wn }
+ }
}
\cs_generate_variant:Nn \prop_map_inline:Nn { c }
% \end{macrocode}
@@ -1032,100 +1104,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Deprecated interfaces}
-%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\prop_display:N, \prop_display:c}
-% An older name for \cs{prop_show:N}.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \prop_display:N \prop_show:N
-\cs_new_eq:NN \prop_display:c \prop_show:c
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\prop_gget:NnN, \prop_gget:NVN, \prop_gget:cnN, \prop_gget:cVN}
-% \begin{macro}[aux]{\prop_gget_aux:Nnnn}
-% Getting globally is no longer supported: this is a conceptual change, so
-% the necessary code for the transition is provided directly.
-% \begin{macrocode}
-%<*deprecated>
-\tl_new:N \l_@@_internal_tl
-\cs_new_protected:Npn \prop_gget:NnN #1#2#3
- {
- \prop_get:NnN #1 {#2} \l_@@_internal_tl
- \tl_gset_eq:NN #3 \l_@@_internal_tl
- }
-\cs_generate_variant:Nn \prop_gget:NnN { NV }
-\cs_generate_variant:Nn \prop_gget:NnN { c , cV }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\prop_get_gdel:NnN}
-% This name seems very odd.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \prop_get_gdel:NnN \prop_gpop:NnN
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[TF]{\prop_if_in:cc}
-% A hang-over from an ancient implementation
-% \begin{macrocode}
-%<*deprecated>
-\cs_generate_variant:Nn \prop_if_in:NnT { cc }
-\cs_generate_variant:Nn \prop_if_in:NnF { cc }
-\cs_generate_variant:Nn \prop_if_in:NnTF { cc }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\prop_gput:ccx}
-% Another one.
-% \begin{macrocode}
-%<*deprecated>
-\cs_generate_variant:Nn \prop_gput:Nnn { ccx }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[pTF]
-% {\prop_if_eq:NN, \prop_if_eq:Nc, \prop_if_eq:cN, \prop_if_eq:cc}
-% These ones do no even make sense!
-% \begin{macrocode}
-%<*deprecated>
-\prg_new_eq_conditional:NNn \prop_if_eq:NN \tl_if_eq:NN { p , T , F , TF }
-\prg_new_eq_conditional:NNn \prop_if_eq:cN \tl_if_eq:cN { p , T , F , TF }
-\prg_new_eq_conditional:NNn \prop_if_eq:Nc \tl_if_eq:Nc { p , T , F , TF }
-\prg_new_eq_conditional:NNn \prop_if_eq:cc \tl_if_eq:cc { p , T , F , TF }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated on 2012-05-12, for removal by 2012-11-30.
-%
-% \begin{macro}{\prop_del:Nn, \prop_del:NV, \prop_del:cn, \prop_del:cV}
-% \begin{macro}{\prop_gdel:Nn, \prop_gdel:NV, \prop_gdel:cn, \prop_gdel:cV}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \prop_del:Nn \prop_remove:Nn
-\cs_new_eq:NN \prop_del:NV \prop_remove:NV
-\cs_new_eq:NN \prop_del:cn \prop_remove:cn
-\cs_new_eq:NN \prop_del:cV \prop_remove:cV
-\cs_new_eq:NN \prop_gdel:Nn \prop_gremove:Nn
-\cs_new_eq:NN \prop_gdel:NV \prop_gremove:NV
-\cs_new_eq:NN \prop_gdel:cn \prop_gremove:cn
-\cs_new_eq:NN \prop_gdel:cV \prop_gremove:cV
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
index 145a9f4e369..26d3c4d78f7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3quark.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3quark.dtx 4521 2013-07-09 11:45:31Z joseph $
+\GetIdInfo$Id: l3quark.dtx 4564 2013-07-21 02:12:33Z bruno $
{L3 Quarks}
%</driver|package>
%<*driver>
@@ -663,6 +663,23 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{variable}{\s__seq}
+% This private scan mark is needed by \pkg{l3seq}, but that is loaded
+% before the quark module, hence its definition is deferred.
+% \begin{macrocode}
+\__scan_new:N \s__seq
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\s_obj_end}
+% This scan mark is used both in \pkg{l3seq} and \pkg{l3prop}. This
+% token ought to be defined in a \pkg{l3obj} module if we decide to go
+% in that direction. In the mean-time, we need it to be set.
+% \begin{macrocode}
+\__scan_new:N \s_obj_end
+% \end{macrocode}
+% \end{variable}
+%
% \subsection{Deprecated quark functions}
%
% \begin{macro}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
index 82c08c35f60..a697739d8da 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3seq.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3seq.dtx 4500 2013-05-26 11:18:19Z bruno $
+\GetIdInfo$Id: l3seq.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Sequences and stacks}
%</driver|package>
%<*driver>
@@ -719,9 +719,14 @@
%
% \section{Internal sequence functions}
%
+% \begin{variable}{\s__seq}
+% This scan mark (equal to \cs{scan_stop:}) marks the beginning of a
+% sequence variable.
+% \end{variable}
+%
% \begin{function}[EXP]{\__seq_item:n}
% \begin{syntax}
-% \cs{__seq_item:n} \meta{item}
+% \cs{__seq_item:n} \Arg{item}
% \end{syntax}
% The internal token used to begin each sequence entry. If expanded
% outside of a mapping or manipulation function, an error will be
@@ -770,15 +775,19 @@
%</package>
% \end{macrocode}
%
-% A sequence is a control sequence whose top-level expansion is of
-% the form \enquote{\cs{@@_item:n} \marg{item_1}
-% \ldots \cs{@@_item:n} \marg{item_n}}. An earlier implementation
-% used the structure \enquote{\cs{seq_elt:w} \meta{item_1}
-% \cs{seq_elt_end:} \ldots \cs{seq_elt:w} \meta{item_n}
-% \cs{seq_elt_end:}}. This allows rapid searching using a delimited
-% function, but is not suitable for items containing |{|, |}| and |#|
-% tokens, and also leads to the loss of surrounding braces
-% around items.
+% A sequence is a control sequence whose top-level expansion is of the
+% form \enquote{\cs{s_@@} \cs{@@_item:n} \marg{item_1} \ldots
+% \cs{@@_item:n} \marg{item_n} \cs{s_obj_end}}, with a leading scan
+% mark, $n$~items of the same form, and a trailing scan mark. An
+% earlier implementation used the structure \enquote{\cs{seq_elt:w}
+% \meta{item_1} \cs{seq_elt_end:} \ldots \cs{seq_elt:w} \meta{item_n}
+% \cs{seq_elt_end:}}. This allowed rapid searching using a delimited
+% function, but was not suitable for items containing |{|, |}| and |#|
+% tokens, and also lead to the loss of surrounding braces around items.
+%
+% \begin{variable}{\s_@@}
+% The variable is defined in the \pkg{l3quark} module, loaded later.
+% \end{variable}
%
% \begin{macro}[int]{\@@_item:n}
% The delimiter is always defined, but when used incorrectly simply
@@ -802,9 +811,9 @@
% \end{variable}
%
% \begin{variable}{\c_empty_seq}
-% Simply copy the empty token list.
+% A sequence with no item, following the structure mentioned above.
% \begin{macrocode}
-\cs_new_eq:NN \c_empty_seq \c_empty_tl
+\tl_const:Nn \c_empty_seq { \s_@@ \s_obj_end }
% \end{macrocode}
% \end{variable}
%
@@ -812,10 +821,14 @@
%
% \begin{macro}{\seq_new:N,\seq_new:c}
% \UnitTested
-% Internally, sequences are just token lists.
+% Sequences are initialized to \cs{c_empty_seq}.
% \begin{macrocode}
-\cs_new_eq:NN \seq_new:N \tl_new:N
-\cs_new_eq:NN \seq_new:c \tl_new:c
+\cs_new_protected:Npn \seq_new:N #1
+ {
+ \__chk_if_free_cs:N #1
+ \cs_gset_eq:NN #1 \c_empty_seq
+ }
+\cs_generate_variant:Nn \seq_new:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -823,12 +836,14 @@
% \UnitTested
% \begin{macro}{\seq_gclear:N, \seq_gclear:c}
% \UnitTested
-% Clearing sequences is just the same as clearing token lists.
+% Clearing a sequence is similar to setting it equal to the empty one.
% \begin{macrocode}
-\cs_new_eq:NN \seq_clear:N \tl_clear:N
-\cs_new_eq:NN \seq_clear:c \tl_clear:c
-\cs_new_eq:NN \seq_gclear:N \tl_gclear:N
-\cs_new_eq:NN \seq_gclear:c \tl_gclear:c
+\cs_new_protected:Npn \seq_clear:N #1
+ { \seq_set_eq:NN #1 \c_empty_seq }
+\cs_generate_variant:Nn \seq_clear:N { c }
+\cs_new_protected:Npn \seq_gclear:N #1
+ { \seq_gset_eq:NN #1 \c_empty_seq }
+\cs_generate_variant:Nn \seq_gclear:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -837,12 +852,14 @@
% \UnitTested
% \begin{macro}{\seq_gclear_new:N, \seq_gclear_new:c}
% \UnitTested
-% Once again a copy from the token list functions.
+% Once again we copy code from the token list functions.
% \begin{macrocode}
-\cs_new_eq:NN \seq_clear_new:N \tl_clear_new:N
-\cs_new_eq:NN \seq_clear_new:c \tl_clear_new:c
-\cs_new_eq:NN \seq_gclear_new:N \tl_gclear_new:N
-\cs_new_eq:NN \seq_gclear_new:c \tl_gclear_new:c
+\cs_new_protected:Npn \seq_clear_new:N #1
+ { \seq_if_exist:NTF #1 { \seq_clear:N #1 } { \seq_new:N #1 } }
+\cs_generate_variant:Nn \seq_clear_new:N { c }
+\cs_new_protected:Npn \seq_gclear_new:N #1
+ { \seq_if_exist:NTF #1 { \seq_gclear:N #1 } { \seq_new:N #1 } }
+\cs_generate_variant:Nn \seq_gclear_new:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -852,7 +869,7 @@
% \begin{macro}
% {\seq_gset_eq:NN, \seq_gset_eq:cN, \seq_gset_eq:Nc, \seq_gset_eq:cc}
% \UnitTested
-% Once again, these are simple copies from the token list functions.
+% Copying a sequence is the same as copying the underlying token list.
% \begin{macrocode}
\cs_new_eq:NN \seq_set_eq:NN \tl_set_eq:NN
\cs_new_eq:NN \seq_set_eq:Nc \tl_set_eq:Nc
@@ -877,8 +894,10 @@
% \@@_set_split_auxi:w, \@@_set_split_auxii:w,
% \@@_set_split_end:
% }
-% The goal is to split a given token list at a marker,
-% strip spaces from each item, and remove one set of
+% When the separator is empty, everything is very simple, just map
+% \cs{@@_wrap_item:n} through the items of the last argument.
+% For non-trivial separators, the goal is to split a given token list
+% at the marker, strip spaces from each item, and remove one set of
% outer braces if after removing leading and trailing
% spaces the item is enclosed within braces. After
% \cs{tl_replace_all:Nnn}, the token list \cs{l_@@_internal_a_tl}
@@ -900,10 +919,13 @@
{ \@@_set_split:NNnn \tl_set:Nx }
\cs_new_protected_nopar:Npn \seq_gset_split:Nnn
{ \@@_set_split:NNnn \tl_gset:Nx }
-\cs_new_protected:Npn \@@_set_split:NNnn #1 #2 #3 #4
+\cs_new_protected:Npn \@@_set_split:NNnn #1#2#3#4
{
\tl_if_empty:nTF {#3}
- { #1 #2 { \tl_map_function:nN {#4} \@@_wrap_item:n } }
+ {
+ \tl_set:Nn \l_@@_internal_a_tl
+ { \tl_map_function:nN {#4} \@@_wrap_item:n }
+ }
{
\tl_set:Nn \l_@@_internal_a_tl
{
@@ -917,8 +939,8 @@
\@@_set_split_auxi:w \prg_do_nothing:
}
\tl_set:Nx \l_@@_internal_a_tl { \l_@@_internal_a_tl }
- #1 #2 { \l_@@_internal_a_tl }
}
+ #1 #2 { \s_@@ \l_@@_internal_a_tl \s_obj_end }
}
\cs_new:Npn \@@_set_split_auxi:w #1 \@@_set_split_end:
{
@@ -939,15 +961,25 @@
% \UnitTested
% \begin{macro}{\seq_gconcat:NNN, \seq_gconcat:ccc}
% \UnitTested
-% Concatenating sequences is easy.
+% \begin{macro}[aux,EXP]{\@@_concat:NN, \@@_concat:w}
+% When concatenating sequences, one must take care of the trailing
+% \cs{s_obj_end} and leading \cs{s_@@}. The second argument of
+% \cs{@@_concat:NN} is \cs{s_@@}, and \cs{@@_concat:w} removes
+% \cs{s_obj_end} by a delimited approach. The result starts with
+% \cs{s_@@} (of the first sequence), which stops \texttt{f}-expansion.
% \begin{macrocode}
-\cs_new_eq:NN \seq_concat:NNN \tl_concat:NNN
-\cs_new_eq:NN \seq_gconcat:NNN \tl_gconcat:NNN
-\cs_new_eq:NN \seq_concat:ccc \tl_concat:ccc
-\cs_new_eq:NN \seq_gconcat:ccc \tl_gconcat:ccc
+\cs_new_protected:Npn \seq_concat:NNN #1#2#3
+ { \tl_set:Nf #1 { \exp_last_unbraced:NNo \@@_concat:NN #2 #3 } }
+\cs_new_protected:Npn \seq_gconcat:NNN #1#2#3
+ { \tl_gset:Nf #1 { \exp_last_unbraced:NNo \@@_concat:NN #2 #3 } }
+\cs_new:Npn \@@_concat:NN #1#2 { \exp_after:wN \@@_concat:w #1 }
+\cs_new:Npn \@@_concat:w #1 \s_obj_end {#1}
+\cs_generate_variant:Nn \seq_concat:NNN { ccc }
+\cs_generate_variant:Nn \seq_gconcat:NNN { ccc }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[pTF]{\seq_if_exist:N, \seq_if_exist:c}
% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
@@ -967,51 +999,85 @@
% }
% \UnitTested
% \begin{macro}{
-% \seq_put_right:Nn, \seq_put_right:NV, \seq_put_right:Nv,
-% \seq_put_right:No, \seq_put_right:Nx,
-% \seq_put_right:cn, \seq_put_right:cV, \seq_put_right:cv,
-% \seq_put_right:co, \seq_put_right:cx
+% \seq_gput_left:Nn, \seq_gput_left:NV, \seq_gput_left:Nv,
+% \seq_gput_left:No, \seq_gput_left:Nx,
+% \seq_gput_left:cn, \seq_gput_left:cV, \seq_gput_left:cv,
+% \seq_gput_left:co, \seq_gput_left:cx
% }
-% \UnitTested
-% The code here is just a wrapper for adding to token lists.
+% \begin{macro}[aux,EXP]{\@@_put_left_aux:w}
+% When adding to the left of a sequence, remove \cs{s_@@}. This is
+% done by \cs{@@_put_left_aux:w}, which also stops
+% \texttt{f}-expansion.
% \begin{macrocode}
\cs_new_protected:Npn \seq_put_left:Nn #1#2
- { \tl_put_left:Nn #1 { \@@_item:n {#2} } }
-\cs_new_protected:Npn \seq_put_right:Nn #1#2
- { \tl_put_right:Nn #1 { \@@_item:n {#2} } }
+ {
+ \tl_set:Nx #1
+ {
+ \exp_not:n { \s_@@ \@@_item:n {#2} }
+ \exp_not:f { \exp_after:wN \@@_put_left_aux:w #1 }
+ }
+ }
+\cs_new_protected:Npn \seq_gput_left:Nn #1#2
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_not:n { \s_@@ \@@_item:n {#2} }
+ \exp_not:f { \exp_after:wN \@@_put_left_aux:w #1 }
+ }
+ }
+\cs_new:Npn \@@_put_left_aux:w \s_@@ { \exp_stop_f: }
\cs_generate_variant:Nn \seq_put_left:Nn { NV , Nv , No , Nx }
\cs_generate_variant:Nn \seq_put_left:Nn { c , cV , cv , co , cx }
-\cs_generate_variant:Nn \seq_put_right:Nn { NV , Nv , No , Nx }
-\cs_generate_variant:Nn \seq_put_right:Nn { c , cV , cv , co , cx }
+\cs_generate_variant:Nn \seq_gput_left:Nn { NV , Nv , No , Nx }
+\cs_generate_variant:Nn \seq_gput_left:Nn { c , cV , cv , co , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{
-% \seq_gput_left:Nn, \seq_gput_left:NV, \seq_gput_left:Nv,
-% \seq_gput_left:No, \seq_gput_left:Nx,
-% \seq_gput_left:cn, \seq_gput_left:cV, \seq_gput_left:cv,
-% \seq_gput_left:co, \seq_gput_left:cx
+% \seq_put_right:Nn, \seq_put_right:NV, \seq_put_right:Nv,
+% \seq_put_right:No, \seq_put_right:Nx,
+% \seq_put_right:cn, \seq_put_right:cV, \seq_put_right:cv,
+% \seq_put_right:co, \seq_put_right:cx
% }
+% \UnitTested
% \begin{macro}{
% \seq_gput_right:Nn, \seq_gput_right:NV, \seq_gput_right:Nv,
% \seq_gput_right:No, \seq_gput_right:Nx,
% \seq_gput_right:cn, \seq_gput_right:cV,\seq_gput_right:cv,
% \seq_gput_right:co, \seq_gput_right:cx
% }
-% The same for global addition.
+% \begin{macro}[aux,EXP]{\@@_put_right_aux:w}
+% When adding to the right of a sequence, remove \cs{s_obj_end}. This
+% is done by \cs{@@_put_right_aux:w}, which takes its result through
+% \cs{exp_not:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \seq_gput_left:Nn #1#2
- { \tl_gput_left:Nn #1 { \@@_item:n {#2} } }
+\cs_new_protected:Npn \seq_put_right:Nn #1#2
+ {
+ \tl_set:Nx #1
+ {
+ \exp_after:wN \@@_put_right_aux:w #1
+ \exp_not:n { \@@_item:n {#2} \s_obj_end }
+ }
+ }
\cs_new_protected:Npn \seq_gput_right:Nn #1#2
- { \tl_gput_right:Nn #1 { \@@_item:n {#2} } }
-\cs_generate_variant:Nn \seq_gput_left:Nn { NV , Nv , No , Nx }
-\cs_generate_variant:Nn \seq_gput_left:Nn { c , cV , cv , co , cx }
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_after:wN \@@_put_right_aux:w #1
+ \exp_not:n { \@@_item:n {#2} \s_obj_end }
+ }
+ }
+\cs_new:Npn \@@_put_right_aux:w #1 \s_obj_end { \exp_not:n {#1} }
\cs_generate_variant:Nn \seq_gput_right:Nn { NV , Nv , No , Nx }
\cs_generate_variant:Nn \seq_gput_right:Nn { c , cV , cv , co , cx }
+\cs_generate_variant:Nn \seq_put_right:Nn { NV , Nv , No , Nx }
+\cs_generate_variant:Nn \seq_put_right:Nn { c , cV , cv , co , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Modifying sequences}
%
@@ -1113,12 +1179,20 @@
%
% \begin{macro}[pTF]{\seq_if_empty:N, \seq_if_empty:c}
% \UnitTested
-% Simple copies from the token list variable material.
+% Similar to token lists, we compare with the empty sequence.
% \begin{macrocode}
-\prg_new_eq_conditional:NNn \seq_if_empty:N \tl_if_empty:N
- { p , T , F , TF }
-\prg_new_eq_conditional:NNn \seq_if_empty:c \tl_if_empty:c
- { p , T , F , TF }
+\prg_new_conditional:Npnn \seq_if_empty:N #1 { p , T , F , TF }
+ {
+ \if_meaning:w #1 \c_empty_seq
+ \prg_return_true:
+ \else:
+ \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 }
% \end{macrocode}
% \end{macro}
%
@@ -1197,22 +1271,21 @@
%
% \begin{macro}{\seq_get_left:NN, \seq_get_left:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_get_left:NnwN}
+% \begin{macro}[aux]{\@@_get_left:wnw}
% Getting an item from the left of a sequence is pretty easy: just
-% trim off the first item after removing the \cs{@@_item:n} at
-% the start. We first append a \cs{q_no_value} item to cover the case
-% of an empty sequence
+% trim off the first item after \cs{@@_item:n} at the start. We
+% append a \cs{q_no_value} item to cover the case of an empty sequence
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_left:NN #1#2
{
\tl_set:Nx #2
{
- \exp_after:wN \@@_get_left:Nnw
+ \exp_after:wN \@@_get_left:wnw
#1 \@@_item:n { \q_no_value } \q_stop
}
}
-\cs_new:Npn \@@_get_left:Nnw \@@_item:n #1#2 \q_stop
- { \exp_not:n {#1} }
+\cs_new:Npn \@@_get_left:wnw #1 \@@_item:n #2#3 \q_stop
+ { \exp_not:n {#2} }
\cs_generate_variant:Nn \seq_get_left:NN { c }
% \end{macrocode}
% \end{macro}
@@ -1222,7 +1295,7 @@
% \UnitTested
% \begin{macro}{\seq_gpop_left:NN, \seq_gpop_left:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_pop_left:NNN, \@@_pop_left:NnwNNN}
+% \begin{macro}[aux]{\@@_pop_left:NNN, \@@_pop_left:wnwNNN}
% The approach to popping an item is pretty similar to that to get
% an item, with the only difference being that the sequence itself has
% to be redefined. This makes it more sensible to use an auxiliary
@@ -1233,11 +1306,12 @@
\cs_new_protected_nopar:Npn \seq_gpop_left:NN
{ \@@_pop:NNNN \@@_pop_left:NNN \tl_gset:Nn }
\cs_new_protected:Npn \@@_pop_left:NNN #1#2#3
- { \exp_after:wN \@@_pop_left:NnwNNN #2 \q_stop #1#2#3 }
-\cs_new_protected:Npn \@@_pop_left:NnwNNN \@@_item:n #1#2 \q_stop #3#4#5
+ { \exp_after:wN \@@_pop_left:wnwNNN #2 \q_stop #1#2#3 }
+\cs_new_protected:Npn \@@_pop_left:wnwNNN
+ #1 \@@_item:n #2#3 \q_stop #4#5#6
{
- #3 #4 {#2}
- \tl_set:Nn #5 {#1}
+ #4 #5 { #1 #3 }
+ \tl_set:Nn #6 {#2}
}
\cs_generate_variant:Nn \seq_pop_left:NN { c }
\cs_generate_variant:Nn \seq_gpop_left:NN { c }
@@ -1248,7 +1322,7 @@
%
% \begin{macro}{\seq_get_right:NN, \seq_get_right:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_get_right_loop:nn}
+% \begin{macro}[aux]{\@@_get_right_setup:wN, \@@_get_right_loop:nn}
% First prepend \cs{q_no_value}, then take two arguments at a time.
% Apart from the right-hand end of the sequence, this be a brace group
% followed by \cs{@@_item:n}. The \cs{use_none:nn} removes both of
@@ -1258,9 +1332,11 @@
% \cs{use_none:n} to get rid of a trailing \cs{@@_get_right_loop:nn}.
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_right:NN #1#2
+ { \exp_after:wN \@@_get_right_setup:wN #1 #2 }
+\cs_new_protected:Npn \@@_get_right_setup:wN \s_@@ #1 \s_obj_end #2
{
- \exp_after:wN \@@_get_right_loop:nn
- \exp_after:wN \q_no_value
+ \@@_get_right_loop:nn
+ \q_no_value
#1
{
??
@@ -1283,6 +1359,7 @@
% \begin{macro}{\seq_gpop_right:NN, \seq_gpop_right:cN}
% \UnitTested
% \begin{macro}[aux]{\@@_pop_right_aux:NNN, \@@_pop_right_loop:nn}
+% \begin{macro}[aux, EXP]{\@@_pop_right_setup:w}
% The approach to popping from the right is a bit more involved, but does
% use some of the same ideas as getting from the right. What is needed is a
% \enquote{flexible length} way to set a token list variable. This is
@@ -1307,18 +1384,18 @@
\cs_set_eq:NN \seq_tmp:w \@@_item:n
\cs_set_eq:NN \@@_item:n \scan_stop:
#1 #2
- { \if_false: } \fi:
- \exp_after:wN \exp_after:wN
- \exp_after:wN \@@_pop_right_loop:nn
- \exp_after:wN \use_none:n
+ { \if_false: } \fi: \s_@@
+ \exp_after:wN \@@_pop_right_setup:w
#2
{
- \if_false: { \fi: }
+ \s_obj_end \if_false: { \fi: }
\tex_afterassignment:D \use_none:n
\tl_set:Nx #3
}
\cs_set_eq:NN \@@_item:n \seq_tmp:w
}
+\cs_new:Npn \@@_pop_right_setup:w \s_@@ #1 \s_obj_end
+ { \exp_after:wN \@@_pop_right_loop:nn \use_none:n #1 }
\cs_new:Npn \@@_pop_right_loop:nn #1#2
{
#2 { \exp_not:n {#1} }
@@ -1330,6 +1407,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}[TF]{\seq_get_left:NN, \seq_get_left:cN}
% \begin{macro}[TF]{\seq_get_right:NN, \seq_get_right:cN}
@@ -1402,7 +1480,7 @@
%
% \begin{macro}{\seq_map_function:NN, \seq_map_function:cN}
% \UnitTested
-% \begin{macro}[aux]{\@@_map_function:NNn}
+% \begin{macro}[aux,rEXP]{\@@_map_function:wN,\@@_map_function:NNn}
% The idea here is to apply the code of |#2| to each item in the
% sequence without altering the definition of \cs{@@_item:n}. This
% is done as by noting that every odd token in the sequence must be
@@ -1411,9 +1489,10 @@
% loop without needing to do a (relatively-expensive) quark test.
% \begin{macrocode}
\cs_new:Npn \seq_map_function:NN #1#2
+ { \exp_after:wN \@@_map_function:wN #1 #2 }
+\cs_new:Npn \@@_map_function:wN \s_@@ #1 \s_obj_end #2
{
- \exp_after:wN \@@_map_function:NNn \exp_after:wN #2 #1
- { ? \seq_map_break: } { }
+ \@@_map_function:NNn #2 #1 { ? \seq_map_break: } { }
\__prg_break_point:Nn \seq_map_break: { }
}
\cs_new:Npn \@@_map_function:NNn #1#2#3
@@ -1501,7 +1580,7 @@
\cs_generate_variant:Nn \seq_map_variable:NNn { c , cc }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\seq_count:N, \seq_count:c}
% \begin{macro}[aux]{\@@_count:n}
% Counting the items in a sequence is done using the same approach as for
@@ -1526,25 +1605,29 @@
%
% \begin{macro}[EXP]{\seq_use:Nnnn, \seq_use:cnnn}
% \begin{macro}[EXP, aux]
-% {\@@_use:NnNnn, \@@_use:nwwwwnwn, \@@_use:nwwn}
+% {\@@_use:wnwnn, \@@_use_setup:w, \@@_use:nwwwwnwn, \@@_use:nwwn}
% \begin{macro}[EXP]{\seq_use:Nn, \seq_use:cn}
% See \cs{clist_use:Nnnn} for a general explanation. The main
% difference is that we use \cs{@@_item:n} as a delimiter rather than
-% commas. We also need to add \cs{@@_item:n} at various places.
+% commas. We also need to add \cs{@@_item:n} at various places, and
+% \cs{s_@@} and \cs{s_obj_end}.
% \begin{macrocode}
\cs_new:Npn \seq_use:Nnnn #1#2#3#4
{
\seq_if_exist:NTF #1
{
- \int_case:nnn { \seq_count:N #1 }
+ \int_case:nnF { \seq_count:N #1 }
{
{ 0 } { }
- { 1 } { \exp_after:wN \@@_use:NnNnn #1 \@@_item:n { } { } }
- { 2 } { \exp_after:wN \@@_use:NnNnn #1 {#2} }
+ { 1 }
+ {
+ \exp_after:wN \@@_use:wnwnn #1
+ \@@_item:n { } \s_obj_end { }
+ }
+ { 2 } { \exp_after:wN \@@_use:wnwnn #1 {#2} }
}
{
- \exp_after:wN \@@_use:nwwwwnwn
- \exp_after:wN { \exp_after:wN } #1 \@@_item:n
+ \exp_after:wN \@@_use_setup:w #1 \@@_item:n
\q_mark { \@@_use:nwwwwnwn {#3} }
\q_mark { \@@_use:nwwn {#4} }
\q_stop { }
@@ -1553,8 +1636,11 @@
{ \__msg_kernel_expandable_error:nnn { kernel } { bad-variable } {#1} }
}
\cs_generate_variant:Nn \seq_use:Nnnn { c }
-\cs_new:Npn \@@_use:NnNnn \@@_item:n #1 \@@_item:n #2#3
- { \exp_not:n { #1 #3 #2 } }
+\cs_new:Npn \@@_use:wnwnn
+ #1 \@@_item:n #2#3 \@@_item:n #4#5 \s_obj_end #6
+ { \exp_not:n { #2 #6 #4 } }
+\cs_new:Npn \@@_use_setup:w \s_@@ #1 \s_obj_end
+ { \@@_use:nwwwwnwn { } #1 }
\cs_new:Npn \@@_use:nwwwwnwn
#1 \@@_item:n #2 \@@_item:n #3 \@@_item:n #4#5
\q_mark #6#7 \q_stop #8
@@ -1675,55 +1761,6 @@
% \end{macrocode}
% \end{variable}
%
-% \subsection{Deprecated interfaces}
-%
-% A few functions which are no longer documented: these were moved
-% here on or before 2011-04-20, and will be removed entirely by
-% 2011-07-20.
-%
-% \begin{macro}{\seq_top:NN, \seq_top:cN}
-% These are old stack functions.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \seq_top:NN \seq_get_left:NN
-\cs_new_eq:NN \seq_top:cN \seq_get_left:cN
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\seq_display:N, \seq_display:c}
-% An older name for \cs{seq_show:N}.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \seq_display:N \seq_show:N
-\cs_new_eq:NN \seq_display:c \seq_show:c
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-05-13 for removal by 2012-11-30.
-%
-% \begin{macro}{\seq_length:N, \seq_length:c}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \seq_length:N \seq_count:N
-\cs_new_eq:NN \seq_length:c \seq_count:c
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-05-23 for removal by 2012-08-30.
-%
-% \begin{macro}{\seq_use:N, \seq_use:c}
-% A simple short cut for a mapping.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new:Npn \seq_use:N #1 { \seq_use:Nn #1 { } }
-\cs_generate_variant:Nn \seq_use:N { c }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 1a9d70f8756..f7af3985dd1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3skip.dtx 4444 2013-01-13 20:27:20Z bruno $
+\GetIdInfo$Id: l3skip.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Dimensions and skips}
%</driver|package>
%<*driver>
@@ -271,26 +271,30 @@
% \end{center}
% \end{function}
%
-% \begin{function}[added = 2012-06-03, EXP]{\dim_case:nnn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\dim_case:nn}
% \begin{syntax}
-% \cs{dim_case:nnn} \Arg{test dimension expression} \\
+% \cs{dim_case:nnTF} \Arg{test dimension expression} \\
% ~~|{| \\
% ~~~~\Arg{dimexpr case_1} \Arg{code case_1} \\
% ~~~~\Arg{dimexpr case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
% ~~~~\Arg{dimexpr case_n} \Arg{code case_n} \\
% ~~|}| \\
-% ~~\Arg{else code}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function evaluates the \meta{test dimension expression} and
% compares this in turn to each of the
% \meta{dimension expression cases}. If the two are equal then the
-% associated \meta{code} is left in the input stream. If none of
-% the tests are \texttt{true} then the \texttt{else code} will be
-% left in the input stream. For example
+% associated \meta{code} is left in the input stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{dim_case:nn}, which does nothing if there is no match, is also
+% available. For example
% \begin{verbatim}
% \dim_set:Nn \l_tmpa_dim { 5 pt }
-% \dim_case:nnn
+% \dim_case:nnF
% { 2 \l_tmpa_dim }
% {
% { 5 pt } { Small }
@@ -1209,30 +1213,48 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\dim_case:nnn}
-% \begin{macro}[aux, EXP]{\@@_case_aux:nnn}
-% \begin{macro}[aux, EXP]{\@@_case_aux:nw,\@@_case_end:nw}
-% The dimension function is the same as the \texttt{int} version, so there
-% is not much to say here.
+% \begin{macro}[EXP]{\dim_case:nn}
+% \begin{macro}[EXP, TF]{\dim_case:nn}
+% \begin{macro}[aux]{\@@_case:nnTF}
+% \begin{macro}[aux]{\@@_case:nw, \@@_case_end:nw}
+% For dimension cases, the first task to fully expand the check
+% condition. The over all idea is then much the same as for
+% \cs{str_case:nn(TF)} as described in \pkg{l3basics}.
% \begin{macrocode}
-\cs_new:Npn \dim_case:nnn #1
+\cs_new:Npn \dim_case:nnTF #1
{
\tex_romannumeral:D
- \exp_args:Nf \@@_case_aux:nnn { \dim_eval:n {#1} }
+ \exp_args:Nf \@@_case:nnTF { \dim_eval:n {#1} }
}
-\cs_new:Npn \@@_case_aux:nnn #1#2#3
- { \@@_case_aux:nw {#1} #2 {#1} {#3} \q_recursion_stop }
-\cs_new:Npn \@@_case_aux:nw #1#2#3
+\cs_new:Npn \dim_case:nnT #1#2#3
+ {
+ \tex_romannumeral:D
+ \exp_args:Nf \@@_case:nnTF { \dim_eval:n {#1} } {#2} {#3} { }
+ }
+\cs_new:Npn \dim_case:nnF #1#2
+ {
+ \tex_romannumeral:D
+ \exp_args:Nf \@@_case:nnTF { \dim_eval:n {#1} } {#2} { }
+ }
+\cs_new:Npn \dim_case:nn #1#2
+ {
+ \tex_romannumeral:D
+ \exp_args:Nf \@@_case:nnTF { \dim_eval:n {#1} } {#2} { } { }
+ }
+\cs_new:Npn \@@_case:nnTF #1#2#3#4
+ { \@@_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop }
+\cs_new:Npn \@@_case:nw #1#2#3
{
\dim_compare:nNnTF {#1} = {#2}
{ \@@_case_end:nw {#3} }
- { \@@_case_aux:nw {#1} }
+ { \@@_case:nw {#1} }
}
\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Dimension expression loops}
%
@@ -1848,69 +1870,13 @@
%
% \subsection{Deprecated functions}
%
-% Deprecated on 2012-05-10, for removal by 2012-08-31.
-%
-% \begin{macro}[EXP, pTF]{\skip_if_infinite_glue:n}
-% Reverse of \cs{skip_if_finite:nTF}.
+% \begin{macro}{\dim_case:nnn}
+% Deprecated 2013-07-15.
% \begin{macrocode}
-%<*deprecated>
-\prg_new_conditional:Npnn \skip_if_infinite_glue:n #1 { p , T , F , TF }
- { \skip_if_finite:nTF {#1} \prg_return_false: \prg_return_true: }
-%</deprecated>
+\cs_new_eq:NN \dim_case:nnn \dim_case:nnF
% \end{macrocode}
% \end{macro}
%
-% Deprecated 2012-06-03 for removal after 2012-12-31.
-%
-% \begin{macro}[EXP]{\prg_case_dim:nnn}
-% Moved here, was in \pkg{l3prg} but load order means we define it here
-% now.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \prg_case_dim:nnn \dim_case:nnn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dim_eval:w, \dim_eval_end:}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \dim_eval:w \__dim_eval:w
-\cs_new_eq:NN \dim_eval_end: \__dim_eval_end:
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\dim_set_max:Nn, \dim_set_max:cn}
-% \begin{macro}{\dim_set_min:Nn, \dim_set_min:cn}
-% \begin{macro}{\dim_gset_max:Nn, \dim_gset_max:cn}
-% \begin{macro}{\dim_gset_min:Nn, \dim_gset_min:cn}
-% \begin{macro}[aux]{\@@_set_max:NNNn}
-% Deprecated on 2012-09-09 for removal after 2012-12-31.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected_nopar:Npn \dim_set_max:Nn
- { \@@_set_max:NNNn < \dim_set:Nn }
-\cs_new_protected_nopar:Npn \dim_gset_max:Nn
- { \@@_set_max:NNNn < \dim_gset:Nn }
-\cs_new_protected_nopar:Npn \dim_set_min:Nn
- { \@@_set_max:NNNn > \dim_set:Nn }
-\cs_new_protected_nopar:Npn \dim_gset_min:Nn
- { \@@_set_max:NNNn > \dim_gset:Nn }
-\cs_new_protected:Npn \@@_set_max:NNNn #1#2#3#4
- { \dim_compare:nNnT {#3} #1 {#4} { #2 #3 {#4} } }
-\cs_generate_variant:Nn \dim_set_max:Nn { c }
-\cs_generate_variant:Nn \dim_gset_max:Nn { c }
-\cs_generate_variant:Nn \dim_set_min:Nn { c }
-\cs_generate_variant:Nn \dim_gset_min:Nn { c }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
index e4c1329a728..a9eb3dc4376 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3tl.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3tl.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Token lists}
%</driver|package>
%<*driver>
@@ -153,8 +153,7 @@
% \begin{syntax}
% \cs{tl_clear:N} \meta{tl~var}
% \end{syntax}
-% Clears all entries from the \meta{tl~var} within the scope of
-% the current \TeX{} group.
+% Clears all entries from the \meta{tl~var}.
% \end{function}
%
% \begin{function}
@@ -487,23 +486,28 @@
% token count $1$ according to \cs{tl_count:n}.
% \end{function}
%
-% \begin{function}[added = 2012-06-03, EXP]{\tl_case:Nnn, \tl_case:cnn}
+% \begin{function}[added = 2013-07-24, EXP, TF]{\tl_case:Nnn, \tl_case:cnn}
% \begin{syntax}
-% \cs{tl_case:Nnn} \meta{test token list variable} \\
+% \cs{tl_case:NnTF} \meta{test token list variable} \\
% ~~"{" \\
% ~~~~\meta{token list variable case_1} \Arg{code case_1} \\
% ~~~~\meta{token list variable case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
% ~~~~\meta{token list variable case_n} \Arg{code case_n} \\
% ~~"}" \\
-% ~~\Arg{else code}
+% ~~\Arg{true code}
+% ~~\Arg{false code}
% \end{syntax}
% This function compares the \meta{test token list variable} in turn
% with each of the \meta{token list variable cases}. If the two
% are equal (as described for \cs{tl_if_eq:NNTF})
% then the associated \meta{code} is left in the input
-% stream. If none of the tests are \texttt{true} then the
-% \texttt{else code} will be left in the input stream.
+% stream. If any of the
+% cases are matched, the \meta{true code} is also inserted into the
+% input stream (after the code for the appropriate case), while if none
+% match then the \meta{false code} is inserted. The function
+% \cs{tl_case:Nn}, which does nothing if there is no match, is also
+% available.
% \end{function}
%
% \section{Mapping to token lists}
@@ -1775,27 +1779,52 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\tl_case:Nnn, \tl_case:cnn}
+% \begin{macro}[EXP]{\tl_case:Nn, \tl_case:cn}
+% \begin{macro}[EXP, TF]{\tl_case:Nn, \tl_case:cn}
+% \begin{macro}[EXP, aux]{\@@_case:nnTF}
% \begin{macro}[aux, EXP]{\@@_case:Nw}
% \begin{macro}[aux, EXP]{\@@_case_end:nw}
+% Similar set up to \cs{str_case:nn(TF)} as described in \pkg{l3basics}.
% \begin{macrocode}
-\cs_new:Npn \tl_case:Nnn #1#2#3
+\cs_new:Npn \tl_case:Nn #1#2
{
\tex_romannumeral:D
- \@@_case:Nw #1 #2 #1 {#3} \q_recursion_stop
+ \@@_case:NnTF #1 {#2} { } { }
}
+\cs_new:Npn \tl_case:NnT #1#2#3
+ {
+ \tex_romannumeral:D
+ \@@_case:NnTF #1 {#2} {#3} { }
+ }
+\cs_new:Npn \tl_case:NnF #1#2#3
+ {
+ \tex_romannumeral:D
+ \@@_case:NnTF #1 {#2} { } {#3}
+ }
+\cs_new:Npn \tl_case:NnTF #1#2
+ {
+ \tex_romannumeral:D
+ \@@_case:NnTF #1 {#2}
+ }
+\cs_new:Npn \@@_case:NnTF #1#2#3#4
+ { \@@_case:Nw #1 #2 #1 { } \q_mark {#3} \q_mark {#4} \q_stop }
\cs_new:Npn \@@_case:Nw #1#2#3
{
\tl_if_eq:NNTF #1 #2
{ \@@_case_end:nw {#3} }
{ \@@_case:Nw #1 }
}
-\cs_generate_variant:Nn \tl_case:Nnn { c }
+\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 }
\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Mapping to token lists}
%
@@ -2585,182 +2614,11 @@
%
% \subsection{Deprecated functions}
%
-% \begin{macro}{\tl_new:Nn, \tl_new:cn, \tl_new:Nx}
-% Use either \cs{tl_const:Nn} or \cs{tl_new:N}.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected:Npn \tl_new:Nn #1#2
- {
- \tl_new:N #1
- \tl_gset:Nn #1 {#2}
- }
-\cs_generate_variant:Nn \tl_new:Nn { c }
-\cs_generate_variant:Nn \tl_new:Nn { Nx }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\tl_gset:Nc}
-% \begin{macro}{\tl_set:Nc}
-% This was useful once, but nowadays does not make much sense.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_protected_nopar:Npn \tl_gset:Nc
- { \tex_global:D \tl_set:Nc }
-\cs_new_protected:Npn \tl_set:Nc #1#2
- { \tl_set:No #1 { \cs:w #2 \cs_end: } }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\tl_replace_in:Nnn, \tl_replace_in:cnn}
-% \begin{macro}{\tl_greplace_in:Nnn, \tl_greplace_in:cnn}
-% \begin{macro}{\tl_replace_all_in:Nnn, \tl_replace_all_in:cnn}
-% \begin{macro}{\tl_greplace_all_in:Nnn, \tl_greplace_all_in:cnn}
-% These are renamed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \tl_replace_in:Nnn \tl_replace_once:Nnn
-\cs_new_eq:NN \tl_replace_in:cnn \tl_replace_once:cnn
-\cs_new_eq:NN \tl_greplace_in:Nnn \tl_greplace_once:Nnn
-\cs_new_eq:NN \tl_greplace_in:cnn \tl_greplace_once:cnn
-\cs_new_eq:NN \tl_replace_all_in:Nnn \tl_replace_all:Nnn
-\cs_new_eq:NN \tl_replace_all_in:cnn \tl_replace_all:cnn
-\cs_new_eq:NN \tl_greplace_all_in:Nnn \tl_greplace_all:Nnn
-\cs_new_eq:NN \tl_greplace_all_in:cnn \tl_greplace_all:cnn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\tl_remove_in:Nn, \tl_remove_in:cn}
-% \begin{macro}{\tl_gremove_in:Nn, \tl_gremove_in:cn}
-% \begin{macro}{\tl_remove_all_in:Nn, \tl_remove_all_in:cn}
-% \begin{macro}{\tl_gremove_all_in:Nn, \tl_gremove_all_in:cn}
-% Also renamed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \tl_remove_in:Nn \tl_remove_once:Nn
-\cs_new_eq:NN \tl_remove_in:cn \tl_remove_once:cn
-\cs_new_eq:NN \tl_gremove_in:Nn \tl_gremove_once:Nn
-\cs_new_eq:NN \tl_gremove_in:cn \tl_gremove_once:cn
-\cs_new_eq:NN \tl_remove_all_in:Nn \tl_remove_all:Nn
-\cs_new_eq:NN \tl_remove_all_in:cn \tl_remove_all:cn
-\cs_new_eq:NN \tl_gremove_all_in:Nn \tl_gremove_all:Nn
-\cs_new_eq:NN \tl_gremove_all_in:cn \tl_gremove_all:cn
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\tl_elt_count:n, \tl_elt_count:V, \tl_elt_count:o}
-% \begin{macro}{\tl_elt_count:N, \tl_elt_count:c}
-% Another renaming job.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \tl_elt_count:n \tl_count:n
-\cs_new_eq:NN \tl_elt_count:V \tl_count:V
-\cs_new_eq:NN \tl_elt_count:o \tl_count:o
-\cs_new_eq:NN \tl_elt_count:N \tl_count:N
-\cs_new_eq:NN \tl_elt_count:c \tl_count:c
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\tl_head_i:n}
-% \begin{macro}{\tl_head_i:w}
-% \begin{macro}{\tl_head_iii:n}
-% \begin{macro}{\tl_head_iii:f}
-% \begin{macro}{\tl_head_iii:w}
-% Two renames, and a few that are rather too specialised.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \tl_head_i:n \tl_head:n
-\cs_new_eq:NN \tl_head_i:w \tl_head:w
-\cs_new:Npn \tl_head_iii:n #1 { \tl_head_iii:w #1 \q_stop }
-\cs_generate_variant:Nn \tl_head_iii:n { f }
-\cs_new:Npn \tl_head_iii:w #1#2#3#4 \q_stop {#1#2#3}
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% Deprecated on 2012-05-13 for removal by 2012-08-31.
-%
-% \begin{macro}{\tl_length_tokens:n}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \tl_length_tokens:n \tl_count_tokens:n
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-05-13 for removal by 2012-11-31.
-%
-% \begin{macro}
-% {\tl_length:N, \tl_length:c, \tl_length:n, \tl_length:V, \tl_length:o}
-% Renames.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \tl_length:N \tl_count:N
-\cs_new_eq:NN \tl_length:c \tl_count:c
-\cs_new_eq:NN \tl_length:n \tl_count:n
-\cs_new_eq:NN \tl_length:V \tl_count:V
-\cs_new_eq:NN \tl_length:o \tl_count:o
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-06-05 for removal after 2012-12-31.
-%
-% \begin{macro}[pTF]{\tl_if_empty:x}
-% We can test expandably the emptiness of an expanded token list
-% thanks to the primitive \tn{pdfstrcmp} which expands its argument:
-% a token list is empty if and only if its string representation is
-% empty.
-% \begin{macrocode}
-%<*deprecated>
-\prg_new_conditional:Npnn \tl_if_empty:x #1 { p , T , F , TF }
- { \__str_if_eq_x_return:nn { } {#1} }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% Deprecated 2012-07-08 for removal after 2012-10-31.
-%
-% \begin{macro}[EXP, pTF]{\tl_if_head_group:n}
-% \begin{macro}[EXP, pTF]{\tl_if_head_N_type:n}
-% \begin{macro}[EXP, pTF]{\tl_if_head_space:n}
-% \begin{macrocode}
-%<*deprecated>
-\prg_new_eq_conditional:NNn \tl_if_head_group:n \tl_if_head_is_group:n
- { p , T , F , TF }
-\prg_new_eq_conditional:NNn \tl_if_head_N_type:n \tl_if_head_is_N_type:n
- { p , T , F , TF }
-\prg_new_eq_conditional:NNn \tl_if_head_space:n \tl_if_head_is_space:n
- { p , T , F , TF }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\tl_tail:w}
-% Deprecated 2012-09-01 for removal after 2012-12-31. This is broken as
-% it will strip braces from a case such as |a{bc}|.
+% \begin{macro}{\tl_case:Nnn, \tl_case:cnn}
+% Deprecated 2013-07-15.
% \begin{macrocode}
-%<*deprecated>
-\cs_new:Npn \tl_tail:w #1#2 \q_stop {#2}
-%</deprecated>
+\cs_new_eq:NN \tl_case:Nnn \tl_case:NnF
+\cs_new_eq:NN \tl_case:cnn \tl_case:cnF
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
index 34427af0d1d..0b0024d2003 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3token.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3token.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3token.dtx 4581 2013-07-28 08:38:50Z joseph $
{L3 Experimental token manipulation}
%</driver|package>
%<*driver>
@@ -2256,223 +2256,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Deprecated functions}
-%
-% Deprecated on 2011-05-27, for removal by 2011-08-31.
-%
-% \begin{macro}{\char_set_catcode:w}
-% \begin{macro}{\char_set_mathcode:w}
-% \begin{macro}{\char_set_lccode:w}
-% \begin{macro}{\char_set_uccode:w}
-% \begin{macro}{\char_set_sfcode:w}
-% Primitives renamed.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \char_set_catcode:w \tex_catcode:D
-\cs_new_eq:NN \char_set_mathcode:w \tex_mathcode:D
-\cs_new_eq:NN \char_set_lccode:w \tex_lccode:D
-\cs_new_eq:NN \char_set_uccode:w \tex_uccode:D
-\cs_new_eq:NN \char_set_sfcode:w \tex_sfcode:D
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\char_value_catcode:w}
-% \begin{macro}{\char_show_value_catcode:w}
-% \begin{macro}{\char_value_mathcode:w}
-% \begin{macro}{\char_show_value_mathcode:w}
-% \begin{macro}{\char_value_lccode:w}
-% \begin{macro}{\char_show_value_lccode:w}
-% \begin{macro}{\char_value_uccode:w}
-% \begin{macro}{\char_show_value_uccode:w}
-% \begin{macro}{\char_value_sfcode:w}
-% \begin{macro}{\char_show_value_sfcode:w}
-% More |w| functions we should not have.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_nopar:Npn \char_value_catcode:w { \tex_the:D \char_set_catcode:w }
-\cs_new_nopar:Npn \char_show_value_catcode:w
- { \tex_showthe:D \char_set_catcode:w }
-\cs_new_nopar:Npn \char_value_mathcode:w { \tex_the:D \char_set_mathcode:w }
-\cs_new_nopar:Npn \char_show_value_mathcode:w
- { \tex_showthe:D \char_set_mathcode:w }
-\cs_new_nopar:Npn \char_value_lccode:w { \tex_the:D \char_set_lccode:w }
-\cs_new_nopar:Npn \char_show_value_lccode:w
- { \tex_showthe:D \char_set_lccode:w }
-\cs_new_nopar:Npn \char_value_uccode:w { \tex_the:D \char_set_uccode:w }
-\cs_new_nopar:Npn \char_show_value_uccode:w
- { \tex_showthe:D \char_set_uccode:w }
-\cs_new_nopar:Npn \char_value_sfcode:w { \tex_the:D \char_set_sfcode:w }
-\cs_new_nopar:Npn \char_show_value_sfcode:w
- { \tex_showthe:D \char_set_sfcode:w }
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\peek_after:NN}
-% \begin{macro}{\peek_gafter:NN}
-% The second argument here must be |w|.
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \peek_after:NN \peek_after:Nw
-\cs_new_eq:NN \peek_gafter:NN \peek_gafter:Nw
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Functions deprecated 2011-05-28 for removal by 2011-08-31.
-%
-% \begin{macro}{\c_alignment_tab_token}
-% \begin{macro}{\c_math_shift_token}
-% \begin{macro}{\c_letter_token}
-% \begin{macro}{\c_other_char_token}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \c_alignment_tab_token \c_alignment_token
-\cs_new_eq:NN \c_math_shift_token \c_math_toggle_token
-\cs_new_eq:NN \c_letter_token \c_catcode_letter_token
-\cs_new_eq:NN \c_other_char_token \c_catcode_other_token
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\c_active_char_token}
-% An odd one: this was never a |token|!
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \c_active_char_token \c_catcode_active_tl
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \char_make_escape:N ,
-% \char_make_group_begin:N ,
-% \char_make_group_end:N ,
-% \char_make_math_toggle:N ,
-% \char_make_alignment:N ,
-% \char_make_end_line:N ,
-% \char_make_parameter:N ,
-% \char_make_math_superscript:N ,
-% \char_make_math_subscript:N ,
-% \char_make_ignore:N ,
-% \char_make_space:N ,
-% \char_make_letter:N ,
-% \char_make_other:N ,
-% \char_make_active:N ,
-% \char_make_comment:N ,
-% \char_make_invalid:N
-% }
-% \begin{macro}
-% {
-% \char_make_escape:n ,
-% \char_make_group_begin:n ,
-% \char_make_group_end:n ,
-% \char_make_math_toggle:n ,
-% \char_make_alignment:n ,
-% \char_make_end_line:n ,
-% \char_make_parameter:n ,
-% \char_make_math_superscript:n ,
-% \char_make_math_subscript:n ,
-% \char_make_ignore:n ,
-% \char_make_space:n ,
-% \char_make_letter:n ,
-% \char_make_other:n ,
-% \char_make_active:n ,
-% \char_make_comment:n ,
-% \char_make_invalid:n
-% }
-% Two renames in one block!
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \char_make_escape:N \char_set_catcode_escape:N
-\cs_new_eq:NN \char_make_begin_group:N \char_set_catcode_group_begin:N
-\cs_new_eq:NN \char_make_end_group:N \char_set_catcode_group_end:N
-\cs_new_eq:NN \char_make_math_shift:N \char_set_catcode_math_toggle:N
-\cs_new_eq:NN \char_make_alignment_tab:N \char_set_catcode_alignment:N
-\cs_new_eq:NN \char_make_end_line:N \char_set_catcode_end_line:N
-\cs_new_eq:NN \char_make_parameter:N \char_set_catcode_parameter:N
-\cs_new_eq:NN \char_make_math_superscript:N
- \char_set_catcode_math_superscript:N
-\cs_new_eq:NN \char_make_math_subscript:N
- \char_set_catcode_math_subscript:N
-\cs_new_eq:NN \char_make_ignore:N \char_set_catcode_ignore:N
-\cs_new_eq:NN \char_make_space:N \char_set_catcode_space:N
-\cs_new_eq:NN \char_make_letter:N \char_set_catcode_letter:N
-\cs_new_eq:NN \char_make_other:N \char_set_catcode_other:N
-\cs_new_eq:NN \char_make_active:N \char_set_catcode_active:N
-\cs_new_eq:NN \char_make_comment:N \char_set_catcode_comment:N
-\cs_new_eq:NN \char_make_invalid:N \char_set_catcode_invalid:N
-\cs_new_eq:NN \char_make_escape:n \char_set_catcode_escape:n
-\cs_new_eq:NN \char_make_begin_group:n \char_set_catcode_group_begin:n
-\cs_new_eq:NN \char_make_end_group:n \char_set_catcode_group_end:n
-\cs_new_eq:NN \char_make_math_shift:n \char_set_catcode_math_toggle:n
-\cs_new_eq:NN \char_make_alignment_tab:n \char_set_catcode_alignment:n
-\cs_new_eq:NN \char_make_end_line:n \char_set_catcode_end_line:n
-\cs_new_eq:NN \char_make_parameter:n \char_set_catcode_parameter:n
-\cs_new_eq:NN \char_make_math_superscript:n
- \char_set_catcode_math_superscript:n
-\cs_new_eq:NN \char_make_math_subscript:n
- \char_set_catcode_math_subscript:n
-\cs_new_eq:NN \char_make_ignore:n \char_set_catcode_ignore:n
-\cs_new_eq:NN \char_make_space:n \char_set_catcode_space:n
-\cs_new_eq:NN \char_make_letter:n \char_set_catcode_letter:n
-\cs_new_eq:NN \char_make_other:n \char_set_catcode_other:n
-\cs_new_eq:NN \char_make_active:n \char_set_catcode_active:n
-\cs_new_eq:NN \char_make_comment:n \char_set_catcode_comment:n
-\cs_new_eq:NN \char_make_invalid:n \char_set_catcode_invalid:n
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[pTF]{\token_if_alignment_tab:N}
-% \begin{macro}[pTF]{\token_if_math_shift:N}
-% \begin{macro}[pTF]{\token_if_other_char:N}
-% \begin{macro}[pTF]{\token_if_active_char:N}
-% \begin{macrocode}
-%<*deprecated>
-\cs_new_eq:NN \token_if_alignment_tab_p:N \token_if_alignment_p:N
-\cs_new_eq:NN \token_if_alignment_tab:NT \token_if_alignment:NT
-\cs_new_eq:NN \token_if_alignment_tab:NF \token_if_alignment:NF
-\cs_new_eq:NN \token_if_alignment_tab:NTF \token_if_alignment:NTF
-\cs_new_eq:NN \token_if_math_shift_p:N \token_if_math_toggle_p:N
-\cs_new_eq:NN \token_if_math_shift:NT \token_if_math_toggle:NT
-\cs_new_eq:NN \token_if_math_shift:NF \token_if_math_toggle:NF
-\cs_new_eq:NN \token_if_math_shift:NTF \token_if_math_toggle:NTF
-\cs_new_eq:NN \token_if_other_char_p:N \token_if_other_p:N
-\cs_new_eq:NN \token_if_other_char:NT \token_if_other:NT
-\cs_new_eq:NN \token_if_other_char:NF \token_if_other:NF
-\cs_new_eq:NN \token_if_other_char:NTF \token_if_other:NTF
-\cs_new_eq:NN \token_if_active_char_p:N \token_if_active_p:N
-\cs_new_eq:NN \token_if_active_char:NT \token_if_active:NT
-\cs_new_eq:NN \token_if_active_char:NF \token_if_active:NF
-\cs_new_eq:NN \token_if_active_char:NTF \token_if_active:NTF
-%</deprecated>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
index 7c3661493a1..3e32750aeeb 100644
--- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx
@@ -37,8 +37,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}[2013/07/12]
-%<package>\@ifpackagelater{expl3}{2013/07/12}
+\RequirePackage{expl3}[2013/07/28]
+%<package>\@ifpackagelater{expl3}{2013/07/28}
%<package> {}
%<package> {%
%<package> \PackageError{l3keys2e}{Support package l3kernel too old}
@@ -50,7 +50,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: l3keys2e.dtx 4544 2013-07-12 07:14:52Z joseph $
+\GetIdInfo$Id: l3keys2e.dtx 4582 2013-07-28 08:57:13Z joseph $
{LaTeX2e option processing using LaTeX3 keys}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
index be5242226ba..a51b54ea376 100644
--- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
@@ -41,8 +41,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}[2013/07/12]
-%<package>\@ifpackagelater{expl3}{2013/07/12}
+\RequirePackage{expl3}[2013/07/28]
+%<package>\@ifpackagelater{expl3}{2013/07/28}
%<package> {}
%<package> {%
%<package> \PackageError{xparse}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xparse.dtx 4544 2013-07-12 07:14:52Z joseph $
+\GetIdInfo$Id: xparse.dtx 4582 2013-07-28 08:57:13Z joseph $
{L3 Experimental document command parser}
%</driver|package>
%<*driver>
diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
index 4730ece2af6..6455094ead6 100644
--- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx
@@ -41,8 +41,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}[2013/07/12]
-%<package>\@ifpackagelater{expl3}{2013/03/12}
+\RequirePackage{expl3}[2013/07/28]
+%<package>\@ifpackagelater{expl3}{2013/07/28}
%<package> {}
%<package> {%
%<package> \PackageError{xtemplate}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xtemplate.dtx 4544 2013-07-12 07:14:52Z joseph $
+\GetIdInfo$Id: xtemplate.dtx 4582 2013-07-28 08:57:13Z joseph $
{L3 Experimental prototype document functions}
%</driver|package>
%<*driver>