summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-28 21:53:53 +0000
committerKarl Berry <karl@freefriends.org>2013-07-28 21:53:53 +0000
commit476ef285597d50560f829ffd64532d75d937d06a (patch)
tree5c652f3fb3c6e7458bb762f660a005e2f77c3f80 /Master/texmf-dist/source/latex/l3experimental
parent9cad0f5f2f5f3df83a79cca1d848bf3a5feef241 (diff)
latex3 (28jul13)
git-svn-id: svn://tug.org/texlive/trunk@31299 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental')
-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
4 files changed, 64 insertions, 42 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}
%