diff options
author | Karl Berry <karl@freefriends.org> | 2015-09-06 23:19:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-09-06 23:19:17 +0000 |
commit | 3cb4e75696df6c7abebf17fbc606ca86dcdfb520 (patch) | |
tree | 729978e0726cdb9d9f34a3d2e249c71a82e07f97 /Master/texmf-dist/source/latex/l3experimental | |
parent | 32f50b97c2ae44e93225d1024afab9727fc02e00 (diff) |
l3 (6sep15)
git-svn-id: svn://tug.org/texlive/trunk@38305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental')
7 files changed, 89 insertions, 82 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx b/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx index 6d0cae589b0..a304a9110c1 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3sort/l3sort.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}[2015/07/28] -%<package>\@ifpackagelater{expl3}{2015/07/28} +\RequirePackage{expl3}[2015/09/06] +%<package>\@ifpackagelater{expl3}{2015/09/06} %<package> {} %<package> {% %<package> \PackageError{l3sort}{Support package l3kernel too old} @@ -50,7 +50,7 @@ %<package> }% %<package> \endinput %<package> } -\GetIdInfo$Id: l3sort.dtx 5700 2015-07-28 19:26:39Z joseph $ +\GetIdInfo$Id: l3sort.dtx 5925 2015-09-06 09:25:46Z joseph $ {L3 Experimental sorting functions} %</driver|package> %<*driver> diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx index d48b641bb3b..e95fd602974 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3flag.dtx @@ -36,8 +36,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2015/07/28] -%<package>\@ifpackagelater{expl3}{2015/07/28} +\RequirePackage{expl3}[2015/09/06] +%<package>\@ifpackagelater{expl3}{2015/09/06} %<package> {} %<package> {% %<package> \PackageError{l3flag}{Support package l3kernel too old} @@ -49,7 +49,7 @@ %<package> }% %<package> \endinput %<package> } -\GetIdInfo$Id: l3flag.dtx 5700 2015-07-28 19:26:39Z joseph $ +\GetIdInfo$Id: l3flag.dtx 5925 2015-09-06 09:25:46Z joseph $ {L3 Experimental flags} %</driver|package> %<*driver> diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx index 10bb159803f..81c2751ada7 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3regex.dtx @@ -36,8 +36,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2015/07/28] -%<package>\@ifpackagelater{expl3}{2015/07/28} +\RequirePackage{expl3}[2015/09/06] +%<package>\@ifpackagelater{expl3}{2015/09/06} %<package> {} %<package> {% %<package> \PackageError{l3regex}{Support package l3kernel too old} @@ -49,7 +49,7 @@ %<package> }% %<package> \endinput %<package> } -\GetIdInfo$Id: l3regex.dtx 5700 2015-07-28 19:26:39Z joseph $ +\GetIdInfo$Id: l3regex.dtx 5925 2015-09-06 09:25:46Z joseph $ {L3 Experimental regular expressions} %</driver|package> %<*driver> @@ -3146,7 +3146,7 @@ \@@_show_push:n { ~ } #1 \__tl_build_end: - \__msg_show_variable:n { >~Compiled~regex~#2: \l_@@_internal_a_tl } + \__msg_show_wrap:n { >~Compiled~regex~#2: \l_@@_internal_a_tl } } % \end{macrocode} % \end{macro} @@ -5750,7 +5750,7 @@ { Character~code~`#1'~too~large~in~`\iow_char:N\\x'~hexadecimal~sequence. } { You~wrote~something~like~ - `\iow_char:N\\x\{\int_to_hexadecimal:n{#1}\}'.~ + `\iow_char:N\\x\{\int_to_Hex:n{#1}\}'.~ The~character~code~#1~is~larger~than~ the~maximum~value~\int_use:N \c_max_char_int. } diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx index 58e6b1b7706..ffb0ebb92f0 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-expl.dtx @@ -36,8 +36,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2015/07/28] -%<package>\@ifpackagelater{expl3}{2015/07/28} +\RequirePackage{expl3}[2015/09/06] +%<package>\@ifpackagelater{expl3}{2015/09/06} %<package> {} %<package> {% %<package> \PackageError{l3str}{Support package l3kernel too old} @@ -49,7 +49,7 @@ %<package> }% %<package> \endinput %<package> } -\GetIdInfo$Id: l3str-expl.dtx 5700 2015-07-28 19:26:39Z joseph $ +\GetIdInfo$Id: l3str-expl.dtx 5925 2015-09-06 09:25:46Z joseph $ {L3 Experimental strings} \def\ExplFileName{l3str} %</driver|package> @@ -455,9 +455,17 @@ % \c_percent_str % } % For all of those strings, use \cs{cs_to_str:N} to get characters with -% the correct category code. +% the correct category code. The conditional for \cs{c_backslash_str} +% is needed as while this code is experimental others may also +% define the name (see \pkg{xpatch} for example). % \begin{macrocode} +%<*package> +\cs_if_exist:NF \c_backslash_str + { \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } } +%</package> +%<*initex> \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } +%</initex> \str_const:Nx \c_left_brace_str { \cs_to_str:N \{ } \str_const:Nx \c_right_brace_str { \cs_to_str:N \} } \str_const:Nx \c_hash_str { \cs_to_str:N \# } @@ -678,12 +686,12 @@ % \end{macro} % \end{macro} % -% \begin{macro}[EXP, aux]{\@@_skip_c_zero:w} +% \begin{macro}[EXP, aux]{\@@_skip_exp_end:w} % \begin{macro}[EXP, aux] % {\@@_skip_loop:wNNNNNNNN, \@@_skip_end:w, \@@_skip_end:NNNNNNNN} % Removes |max(#1,0)| characters from the input stream, and then -% leaves \cs{c_zero}. This should be expanded using -% \cs{tex_romannumeral:D}. We remove characters $8$ at a time until +% leaves \cs{exp_end:}. This should be expanded using +% \cs{exp:w}. We remove characters $8$ at a time until % there are at most $8$ to remove. Then we do a dirty trick: the % \cs{if_case:w} construction leaves between $0$ and $8$ times the % \cs{or:} control sequence, and those \cs{or:} become arguments of @@ -692,10 +700,10 @@ % of \cs{@@_skip_end:NNNNNNNN} are the two \cs{or:}, and $6$ % characters from the input stream, exactly what we wanted to % remove. Then close the \cs{if_case:w} conditional with \cs{fi:}, and -% stop the initial expansion with \cs{c_zero} (see places where -% \cs{@@_skip_c_zero:w} is called). +% stop the initial expansion with \cs{exp_end:} (see places where +% \cs{@@_skip_exp_end:w} is called). % \begin{macrocode} -\cs_new:Npn \@@_skip_c_zero:w #1; +\cs_new:Npn \@@_skip_exp_end:w #1; { \if_int_compare:w #1 > \c_eight \exp_after:wN \@@_skip_loop:wNNNNNNNN @@ -706,13 +714,13 @@ #1 ; } \cs_new:Npn \@@_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9 - { \exp_after:wN \@@_skip_c_zero:w \int_use:N \__int_eval:w #1 - \c_eight ; } + { \exp_after:wN \@@_skip_exp_end:w \int_use:N \__int_eval:w #1 - \c_eight ; } \cs_new:Npn \@@_skip_end:w #1 ; { \exp_after:wN \@@_skip_end:NNNNNNNN \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or: } -\cs_new:Npn \@@_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \c_zero } +\cs_new:Npn \@@_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: } % \end{macrocode} % \end{macro} % \end{macro} @@ -724,7 +732,7 @@ % \@@_collect_end:wn, \@@_collect_end:nnnnnnnnw % } % Collects |max(#1,0)| characters, and removes everything else until -% \cs{q_stop}. This is somewhat similar to \cs{@@_skip_c_zero:w}, but +% \cs{q_stop}. This is somewhat similar to \cs{@@_skip_exp_end:w}, but % accepts integer expression arguments. This time we can only grab % $7$ characters at a time. At the end, we use an \cs{if_case:w} % trick again, so that the $8$ first arguments of @@ -807,7 +815,7 @@ { \use_none_delimit_by_q_stop:w } { \exp_after:wN \use_i_delimit_by_q_stop:nw - \tex_romannumeral:D \exp_after:wN \@@_skip_c_zero:w + \exp:w \exp_after:wN \@@_skip_exp_end:w \int_use:N \__int_eval:w #1 + #2 ; } } @@ -816,7 +824,7 @@ { \use_none_delimit_by_q_stop:w } { \exp_after:wN \use_i_delimit_by_q_stop:nw - \tex_romannumeral:D \@@_skip_c_zero:w #1 ; { } + \exp:w \@@_skip_exp_end:w #1 ; { } } } } @@ -896,7 +904,7 @@ { \exp_after:wN \@@_collect_delimit_by_q_stop:w \int_use:N \__int_eval:w #2 - #1 \exp_after:wN ; - \tex_romannumeral:D \@@_skip_c_zero:w #1 ; + \exp:w \@@_skip_exp_end:w #1 ; } % \end{macrocode} % \end{macro} 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 24d50400ac3..e1298f9ca9d 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3str-format.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: l3str-format.dtx Copyright (C) 2012-2013 The LaTeX3 Project +%% File: l3str-format.dtx Copyright (C) 2012-2013,2015 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{expl3} -\GetIdInfo$Id: l3str-format.dtx 4745 2014-05-06 10:41:27Z joseph $ +\GetIdInfo$Id: l3str-format.dtx 5906 2015-09-02 13:17:05Z mittelba $ {L3 Experimental string formatting} %</driver|package> %<*driver> @@ -665,9 +665,9 @@ { { ? } { \@@_int:NwnnNNn \use:n } { d } { \@@_int:NwnnNNn \use:n } - { b } { \@@_int:NwnnNNn \int_to_binary:n } - { o } { \@@_int:NwnnNNn \int_to_octal:n } - { X } { \@@_int:NwnnNNn \int_to_hexadecimal:n } + { b } { \@@_int:NwnnNNn \int_to_bin:n } + { o } { \@@_int:NwnnNNn \int_to_oct:n } + { X } { \@@_int:NwnnNNn \int_to_Hex:n } } { \__msg_kernel_expandable_error:nnnn diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx index 69a198da208..e40e4fae79e 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: l3tl-analysis.dtx Copyright (C) 2011-2012 The LaTeX3 Project +%% File: l3tl-analysis.dtx Copyright (C) 2011-2012,2015 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{expl3} -\GetIdInfo$Id: l3tl-analysis.dtx 4745 2014-05-06 10:41:27Z joseph $ +\GetIdInfo$Id: l3tl-analysis.dtx 5899 2015-08-31 21:49:59Z joseph $ {L3 Experimental token lists analysis} %</driver|package> %<*driver> @@ -798,31 +798,26 @@ % in the input stream, and call \cs{@@_b_normals:ww} % with its first argument decremented. % \begin{macrocode} -\group_begin: - \char_set_catcode_other:N A - \char_set_catcode_other:N B - \char_set_catcode_other:N C - \char_set_uccode:nn { `? } { `D } - \tl_to_uppercase:n - { - \cs_new:Npn \@@_b_char:Nww #1 - { - \if_meaning:w #1 \tex_undefined:D ? \else: - \if_catcode:w #1 \c_catcode_other_token C \else: - \if_catcode:w #1 \c_catcode_letter_token B \else: - \if_catcode:w #1 \c_math_toggle_token 3 \else: - \if_catcode:w #1 \c_alignment_token 4 \else: - \if_catcode:w #1 \c_math_superscript_token 7 \else: - \if_catcode:w #1 \c_math_subscript_token 8 \else: - \if_catcode:w #1 \c_space_token A \else: - 6 - \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: - \__int_value:w `#1 \s__tl - \exp_after:wN \@@_b_normals:ww - \int_use:N \__int_eval:w \c_minus_one + - } - } -\group_end: +\cs_new:Npx \@@_b_char:Nww #1 + { + \exp_not:N \if_meaning:w #1 \exp_not:N \tex_undefined:D + \token_to_str:N D \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_catcode_other_token + \token_to_str:N C \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_catcode_letter_token + \token_to_str:N B \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_math_toggle_token 3 \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_alignment_token 4 \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_math_superscript_token 7 \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_math_subscript_token 8 \exp_not:N \else: + \exp_not:N \if_catcode:w #1 \c_space_token + \token_to_str:N A \exp_not:N \else: + 6 + \exp_not:n { \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: } + \exp_not:N \__int_value:w `#1 \s__tl + \exp_not:N \exp_after:wN \exp_not:N \@@_b_normals:ww + \exp_not:N \int_use:N \exp_not:N \__int_eval:w \c_minus_one + + } % \end{macrocode} % \end{macro} % @@ -949,33 +944,39 @@ % \subsection{Showing the results} % % \begin{macro}{\tl_show_analysis:N, \tl_show_analysis:n} -% \begin{macro}[int]{\@@_show:N} +% \begin{macro}[int]{\@@_show:} % Add to \cs{@@:n} a third pass to display tokens to the terminal. +% If the token list variable is not defined, throw the same error +% as \cs{tl_show:N} by simply calling that function. % \begin{macrocode} \cs_new_protected:Npn \tl_show_analysis:N #1 { - \exp_args:No \@@:n {#1} - \@@_show:N #1 + \tl_if_exist:NTF #1 + { + \exp_args:No \@@:n {#1} + \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-tl-analysis } + { \token_to_str:N #1 } { \tl_if_empty:NTF #1 { } { ? } } { } { } + \@@_show: + } + { \tl_show:N #1 } } \cs_new_protected:Npn \tl_show_analysis:n #1 { \@@:n {#1} - \tl_set:Nn \l_@@_internal_tl {#1} - \@@_show:N \l_@@_internal_tl + \__msg_show_pre:nnxxxx { LaTeX / kernel } { show-tl-analysis } + { } { \tl_if_empty:nTF {#1} { } { ? } } { } { } + \@@_show: } -\cs_new_protected:Npn \@@_show:N #1 +\cs_new_protected:Npn \@@_show: { \group_begin: - \use:x + \exp_args:NNx + \group_end: + \__msg_show_wrap:n { - \group_end: - \exp_not:n { \__msg_show_variable:Nnn #1 } - { tl-analysis } - { - \exp_after:wN \@@_show_loop:wNw \g_@@_result_tl - \s__tl { ? \__prg_break: } \s__tl - \__prg_break_point: - } + \exp_after:wN \@@_show_loop:wNw \g_@@_result_tl + \s__tl { ? \__prg_break: } \s__tl + \__prg_break_point: } } % \end{macrocode} @@ -1104,10 +1105,8 @@ % \begin{macrocode} \__msg_kernel_new:nnn { kernel } { show-tl-analysis } { - The~token~list~ - \str_if_eq:nnF {#1} { \l_@@_internal_tl } - { \token_to_str:N #1 ~ } - \tl_if_empty:NTF #1 + The~token~list~ \tl_if_empty:nF {#1} { #1 ~ } + \tl_if_empty:nTF {#2} { is~empty } { contains~the~tokens: } } diff --git a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx index 90441e87e97..ed9db8b5920 100644 --- a/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/xgalley/l3galley.dtx @@ -38,8 +38,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2015/07/28] -%<package>\@ifpackagelater{expl3}{2015/07/28} +\RequirePackage{expl3}[2015/09/06] +%<package>\@ifpackagelater{expl3}{2015/09/06} %<package> {} %<package> {% %<package> \PackageError{l3galley}{Support package l3kernel too old} @@ -51,7 +51,7 @@ %<package> }% %<package> \endinput %<package> } -\GetIdInfo$Id: l3galley.dtx 5700 2015-07-28 19:26:39Z joseph $ +\GetIdInfo$Id: l3galley.dtx 5925 2015-09-06 09:25:46Z joseph $ {L3 Experimental galley code} %</driver|package> %<*driver> @@ -1146,7 +1146,7 @@ \cs_new_protected_nopar:Npn \galley_par: { \s__par_omit - \exp_after:wN \@@_par_auxi: \tex_romannumeral:D - `0 + \exp_after:wN \@@_par_auxi: \exp:w \exp_continue_f:w } \cs_new_protected:Npn \@@_par_auxi: { |