diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index ba137345670..43829b42af7 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty @@ -50,8 +50,8 @@ %% %% ----------------------------------------------------------------------- %% -\RequirePackage{expl3}[2014/07/20] -\@ifpackagelater{expl3}{2014/07/20} +\RequirePackage{expl3}[2014/08/25] +\@ifpackagelater{expl3}{2014/08/25} {} {% \PackageError{xparse}{Support package l3kernel too old} @@ -63,7 +63,7 @@ }% \endinput } -\GetIdInfo$Id: xparse.dtx 5241 2014-07-20 09:44:41Z joseph $ +\GetIdInfo$Id: xparse.dtx 5378 2014-08-25 10:59:48Z joseph $ {L3 Experimental document command parser} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -116,7 +116,7 @@ { \cs_if_exist:NTF #1 { - \__msg_kernel_warning:nnxx { xparse } { redefine-command } + \__msg_kernel_info:nnxx { xparse } { redefine-command } { \token_to_str:N #1 } { \tl_to_str:n {#2} } } { @@ -199,7 +199,7 @@ { \cs_if_exist:cTF {#1} { - \__msg_kernel_warning:nnxx { xparse } { redefine-environment } + \__msg_kernel_info:nnxx { xparse } { redefine-environment } {#1} { \tl_to_str:n {#2} } } { @@ -956,15 +956,15 @@ \group_align_safe_begin: \tex_escapechar:D = 92 \scan_stop: \tl_clear:N \l__xparse_v_arg_tl - \peek_N_type:TF - { \__xparse_grab_v_aux_test:N } + \peek_meaning_remove_ignore_spaces:NTF \c_group_begin_token { - \peek_meaning_remove:NTF \c_group_begin_token - { - \group_align_safe_end: - \__xparse_grab_v_bgroup: - } - { \__xparse_grab_v_aux_abort: } + \group_align_safe_end: + \__xparse_grab_v_bgroup: + } + { + \peek_N_type:TF + { \__xparse_grab_v_aux_test:N } + { \__xparse_grab_v_aux_abort:n { } } } } \cs_new_protected_nopar:Npn \__xparse_grab_v_group_end: @@ -976,19 +976,19 @@ } \cs_new_protected:Npn \__xparse_grab_v_aux_test:N #1 { - \__xparse_grab_v_aux_put:N #1 \__xparse_grab_v_token_if_char:NTF #1 { + \__xparse_grab_v_aux_put:N #1 \__xparse_grab_v_aux_catcodes: \__xparse_grab_v_aux_loop:N #1 } - { \__xparse_grab_v_aux_abort: } + { \__xparse_grab_v_aux_abort:n {#1} #1 } } \cs_new_protected:Npn \__xparse_grab_v_aux_loop:N #1 { \peek_N_type:TF { \__xparse_grab_v_aux_loop:NN #1 } - { \__xparse_grab_v_aux_abort: } + { \__xparse_grab_v_aux_abort:n { } } } \cs_new_protected:Npn \__xparse_grab_v_aux_loop:NN #1 #2 { @@ -1001,7 +1001,7 @@ \__xparse_grab_v_aux_loop:N #1 } } - { \__xparse_grab_v_aux_abort: #2 } + { \__xparse_grab_v_aux_abort:n {#2} #2 } } \cs_new_protected_nopar:Npn \__xparse_grab_v_aux_loop_end: { @@ -1021,7 +1021,7 @@ { \peek_N_type:TF { \__xparse_grab_v_bgroup_loop:N } - { \__xparse_grab_v_aux_abort: } + { \__xparse_grab_v_aux_abort:n { } } } \cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:N #1 { @@ -1044,7 +1044,7 @@ \__xparse_grab_v_bgroup_loop: } } - { \__xparse_grab_v_aux_abort: #1 } + { \__xparse_grab_v_aux_abort:n {#1} #1 } } \cs_new_protected_nopar:Npn \__xparse_grab_v_aux_catcodes: { @@ -1055,28 +1055,26 @@ { \char_set_catcode_other:n { \tex_endlinechar:D } } { \char_set_catcode_parameter:n { \tex_endlinechar:D } } } -\cs_new_protected_nopar:Npn \__xparse_grab_v_aux_abort: +\cs_new_protected:Npn \__xparse_grab_v_aux_abort:n #1 { \__xparse_grab_v_group_end: \__xparse_add_arg:o \c__xparse_no_value_tl - \exp_after:wN \__xparse_grab_v_aux_abort:w \l__xparse_args_tl \q_stop - } -\cs_new_protected:Npn \__xparse_grab_v_aux_abort:w #1 #2 \q_stop - { \group_begin: \char_set_lccode:nn { `\# } { \tex_endlinechar:D } \tl_to_lowercase:n { \group_end: \peek_meaning_remove:NTF ## } { - \__msg_kernel_error:nnxx { xparse } { verbatim-newline } - { \token_to_str:N #1 } + \__msg_kernel_error:nnxxx { xparse } { verbatim-newline } + { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } { \tl_to_str:N \l__xparse_v_arg_tl } + { \tl_to_str:n {#1} } \l__xparse_v_rest_of_signature_tl \l__xparse_args_tl } { - \__msg_kernel_error:nnxx { xparse } { verbatim-already-tokenized } - { \token_to_str:N #1 } + \__msg_kernel_error:nnxxx { xparse } { verbatim-tokenized } + { \exp_after:wN \token_to_str:N \l__xparse_fn_tl } { \tl_to_str:N \l__xparse_v_arg_tl } + { \tl_to_str:n {#1} } \l__xparse_v_rest_of_signature_tl \l__xparse_args_tl } } @@ -1515,41 +1513,45 @@ but~this~is~not~a~document~environment. } \__msg_kernel_new:nnnn { xparse } { verbatim-newline } - { Verbatim~argument~of~#1~ended~by~end~of~line. } + { Verbatim~argument~of~'#1'~ended~by~end~of~line. } { - The~verbatim~argument~of~#1~cannot~contain~more~than~one~line,~but~the~end~ + The~verbatim~argument~of~'#1'~cannot~contain~more~than~one~line,~ + but~the~end~ of~the~current~line~has~been~reached.~You~have~probably~forgotten~the~ closing~delimiter. \\ \\ - LaTeX~will~ignored~'#2'. + LaTeX~will~ignore~'#2'. + } +\__msg_kernel_new:nnnn { xparse } { verbatim-tokenized } + { + The~verbatim~command~'#1'~cannot~be~used~inside~an~argument.~ } -\__msg_kernel_new:nnnn { xparse } { verbatim-already-tokenized } - { Verbatim~command~#1~illegal~in~command~argument. } { - The~command~#1~takes~a~verbatim~argument.~It~may~not~appear~within~ - the~argument~of~another~function. + The~command~'#1'~takes~a~verbatim~argument.~ + It~may~not~appear~within~the~argument~of~another~function.~ + It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } . \\ \\ LaTeX~will~ignore~'#2'. } \__msg_kernel_new:nnn { xparse } { define-command } { - Defining~document~command~#1~ - with~arg.~spec.~'#2'~\msg_line_context:. + Defining~command~#1~ + with~sig.~'#2'~\msg_line_context:. } \__msg_kernel_new:nnn { xparse } { define-environment } { - Defining~document~environment~'#1'~ - with~arg.~spec.~'#2'~\msg_line_context:. + Defining~environment~'#1'~ + with~sig.~'#2'~\msg_line_context:. } \__msg_kernel_new:nnn { xparse } { redefine-command } { - Redefining~document~command~#1~ - with~arg.~spec.~'#2'~\msg_line_context:. + Redefining~command~#1~ + with~sig.~'#2'~\msg_line_context:. } \__msg_kernel_new:nnn { xparse } { redefine-environment } { - Redefining~document~environment~'#1'~ - with~arg.~spec.~'#2'~\msg_line_context:. + Redefining~environment~'#1'~ + with~sig.~'#2'~\msg_line_context:. } \cs_new_eq:NN \BooleanFalse \c_false_bool \cs_new_eq:NN \BooleanTrue \c_true_bool |