diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 1332 |
1 files changed, 720 insertions, 612 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 2676787a1c3..c15781e05f6 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -82,8 +82,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3}% \def\ExplFileDescription{L3 programming layer}% -\def\ExplFileDate{2016/05/18}% -\def\ExplFileVersion{6512}% +\def\ExplFileDate{2016/10/19}% +\def\ExplFileVersion{6730}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -242,7 +242,7 @@ }% }% \endgroup -\GetIdInfo$Id: l3bootstrap.dtx 6412 2016-02-12 21:45:29Z joseph $ +\GetIdInfo$Id: l3bootstrap.dtx 6596 2016-06-13 21:29:58Z joseph $ {L3 Bootstrap code}% \begingroup \expandafter\ifx\csname directlua\endcsname\relax @@ -388,7 +388,7 @@ { \bool_if:NF \l__kernel_expl_bool { - \cs_set_protected_nopar:Npx \ExplSyntaxOff + \cs_set_protected:Npx \ExplSyntaxOff { \char_set_catcode:nn { 9 } { \char_value_catcode:n { 9 } } \char_set_catcode:nn { 32 } { \char_value_catcode:n { 32 } } @@ -402,7 +402,7 @@ \tex_endlinechar:D = \tex_the:D \tex_endlinechar:D \scan_stop: \bool_set_false:N \l__kernel_expl_bool - \cs_set_protected_nopar:Npn \ExplSyntaxOff { } + \cs_set_protected:Npn \ExplSyntaxOff { } } } \char_set_catcode_ignore:n { 9 } % tab @@ -449,7 +449,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3names.dtx 6433 2016-03-11 20:04:27Z joseph $ +\GetIdInfo$Id: l3names.dtx 6722 2016-10-13 10:22:35Z joseph $ {L3 Namespace for primitives} \let \tex_global:D \global \let \tex_let:D \let @@ -1023,7 +1023,7 @@ \__kernel_primitive:NN \XeTeXvariationname \xetex_variationname:D \__kernel_primitive:NN \XeTeXrevision \xetex_XeTeXrevision:D \__kernel_primitive:NN \XeTeXversion \xetex_XeTeXversion:D - \__kernel_primitive:NN \ifprimitive \pdftex_primitive:D + \__kernel_primitive:NN \ifprimitive \pdftex_ifprimitive:D \__kernel_primitive:NN \primitive \pdftex_primitive:D \__kernel_primitive:NN \shellescape \pdftex_shellescape:D \__kernel_primitive:NN \alignmark \luatex_alignmark:D @@ -1049,7 +1049,8 @@ \__kernel_primitive:NN \formatname \luatex_formatname:D \__kernel_primitive:NN \hjcode \luatex_hjcode:D \__kernel_primitive:NN \hpack \luatex_hpack:D - \__kernel_primitive:NN \hyphenationmin \luatex_hypenationmin:D + \__kernel_primitive:NN \hyphenationbounds \luatex_hyphenationbounds:D + \__kernel_primitive:NN \hyphenationmin \luatex_hyphenationmin:D \__kernel_primitive:NN \gleaders \luatex_gleaders:D \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D \__kernel_primitive:NN \lastnamedcs \luatex_lastnamedcs:D @@ -1057,12 +1058,15 @@ \__kernel_primitive:NN \letcharcode \luatex_letcharcode:D \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D \__kernel_primitive:NN \luafunction \luatex_luafunction:D + \__kernel_primitive:NN \luatexbanner \luatex_luatexbanner:D \__kernel_primitive:NN \luatexdatestamp \luatex_luatexdatestamp:D \__kernel_primitive:NN \luatexrevision \luatex_luatexrevision:D \__kernel_primitive:NN \luatexversion \luatex_luatexversion:D \__kernel_primitive:NN \mathdisplayskipmode \luatex_mathdisplayskipmode:D \__kernel_primitive:NN \matheqnogapstep \luatex_matheqnogapstep:D \__kernel_primitive:NN \mathoption \luatex_mathoption:D + \__kernel_primitive:NN \mathnolimitsmode \luatex_mathnolimitsmode:D + \__kernel_primitive:NN \mathrulesfam \luatex_mathrulesfam:D \__kernel_primitive:NN \mathscriptsmode \luatex_mathscriptsmode:D \__kernel_primitive:NN \mathstyle \luatex_mathstyle:D \__kernel_primitive:NN \mathsurroundskip \luatex_mathsurroundskip:D @@ -1084,6 +1088,7 @@ \__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D \__kernel_primitive:NN \scantextokens \luatex_scantextokens:D \__kernel_primitive:NN \setfontid \luatex_setfontid:D + \__kernel_primitive:NN \shapemode \luatex_shapemode:D \__kernel_primitive:NN \suppressifcsnameerror \luatex_suppressifcsnameerror:D \__kernel_primitive:NN \suppresslongerror \luatex_suppresslongerror:D \__kernel_primitive:NN \suppressmathparerror \luatex_suppressmathparerror:D @@ -1100,6 +1105,7 @@ \__kernel_primitive:NN \localleftbox \luatex_localleftbox:D \__kernel_primitive:NN \localrightbox \luatex_localrightbox:D \__kernel_primitive:NN \mathdir \luatex_mathdir:D + \__kernel_primitive:NN \linedir \luatex_linedir:D \__kernel_primitive:NN \pagebottomoffset \luatex_pagebottomoffset:D \__kernel_primitive:NN \pagedir \luatex_pagedir:D \__kernel_primitive:NN \pagerightoffset \luatex_pagerightoffset:D @@ -1190,6 +1196,8 @@ \__kernel_primitive:NN \Umathlimitbelowbgap \utex_limitbelowbgap:D \__kernel_primitive:NN \Umathlimitbelowkern \utex_limitbelowkern:D \__kernel_primitive:NN \Umathlimitbelowvgap \utex_limitbelowvgap:D + \__kernel_primitive:NN \Umathnolimitsubfactor \utex_nolimitsubfactor:D + \__kernel_primitive:NN \Umathnolimitsupfactor \utex_nolimitsupfactor:D \__kernel_primitive:NN \Umathopbinspacing \utex_opbinspacing:D \__kernel_primitive:NN \Umathopclosespacing \utex_opclosespacing:D \__kernel_primitive:NN \Umathopenbinspacing \utex_openbinspacing:D @@ -1441,7 +1449,7 @@ \tex_let:D \tex_middle:D \normalmiddle \tex_let:D \tex_right:D \normalright \tex_fi:D -%% File: l3basics.dtx Copyright (C) 1990-2015 The LaTeX3 project +%% File: l3basics.dtx Copyright (C) 1990-2016 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 @@ -1473,7 +1481,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3basics.dtx 6315 2015-11-22 22:49:22Z bruno $ +\GetIdInfo$Id: l3basics.dtx 6696 2016-09-01 16:09:52Z bruno $ {L3 Basic definitions} \tex_let:D \if_true: \tex_iftrue:D \tex_let:D \if_false: \tex_iffalse:D @@ -1534,32 +1542,32 @@ \tex_fi:D \tex_let:D \cs_set_nopar:Npn \tex_def:D \tex_let:D \cs_set_nopar:Npx \tex_edef:D -\etex_protected:D \cs_set_nopar:Npn \cs_set:Npn - { \tex_long:D \cs_set_nopar:Npn } -\etex_protected:D \cs_set_nopar:Npn \cs_set:Npx - { \tex_long:D \cs_set_nopar:Npx } -\etex_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npn - { \etex_protected:D \cs_set_nopar:Npn } -\etex_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npx - { \etex_protected:D \cs_set_nopar:Npx } -\cs_set_protected_nopar:Npn \cs_set_protected:Npn - { \etex_protected:D \tex_long:D \cs_set_nopar:Npn } -\cs_set_protected_nopar:Npn \cs_set_protected:Npx - { \etex_protected:D \tex_long:D \cs_set_nopar:Npx } +\etex_protected:D \tex_long:D \tex_def:D \cs_set:Npn + { \tex_long:D \tex_def:D } +\etex_protected:D \tex_long:D \tex_def:D \cs_set:Npx + { \tex_long:D \tex_edef:D } +\etex_protected:D \tex_long:D \tex_def:D \cs_set_protected_nopar:Npn + { \etex_protected:D \tex_def:D } +\etex_protected:D \tex_long:D \tex_def:D \cs_set_protected_nopar:Npx + { \etex_protected:D \tex_edef:D } +\etex_protected:D \tex_long:D \tex_def:D \cs_set_protected:Npn + { \etex_protected:D \tex_long:D \tex_def:D } +\etex_protected:D \tex_long:D \tex_def:D \cs_set_protected:Npx + { \etex_protected:D \tex_long:D \tex_edef:D } \tex_let:D \cs_gset_nopar:Npn \tex_gdef:D \tex_let:D \cs_gset_nopar:Npx \tex_xdef:D -\cs_set_protected_nopar:Npn \cs_gset:Npn - { \tex_long:D \cs_gset_nopar:Npn } -\cs_set_protected_nopar:Npn \cs_gset:Npx - { \tex_long:D \cs_gset_nopar:Npx } -\cs_set_protected_nopar:Npn \cs_gset_protected_nopar:Npn - { \etex_protected:D \cs_gset_nopar:Npn } -\cs_set_protected_nopar:Npn \cs_gset_protected_nopar:Npx - { \etex_protected:D \cs_gset_nopar:Npx } -\cs_set_protected_nopar:Npn \cs_gset_protected:Npn - { \etex_protected:D \tex_long:D \cs_gset_nopar:Npn } -\cs_set_protected_nopar:Npn \cs_gset_protected:Npx - { \etex_protected:D \tex_long:D \cs_gset_nopar:Npx } +\cs_set_protected:Npn \cs_gset:Npn + { \tex_long:D \tex_gdef:D } +\cs_set_protected:Npn \cs_gset:Npx + { \tex_long:D \tex_xdef:D } +\cs_set_protected:Npn \cs_gset_protected_nopar:Npn + { \etex_protected:D \tex_gdef:D } +\cs_set_protected:Npn \cs_gset_protected_nopar:Npx + { \etex_protected:D \tex_xdef:D } +\cs_set_protected:Npn \cs_gset_protected:Npn + { \etex_protected:D \tex_long:D \tex_gdef:D } +\cs_set_protected:Npn \cs_gset_protected:Npx + { \etex_protected:D \tex_long:D \tex_xdef:D } \cs_set_nopar:Npn \l__exp_internal_tl { } \cs_set:Npn \use:c #1 { \cs:w #1 \cs_end: } \cs_set_protected:Npn \use:x #1 @@ -1596,30 +1604,30 @@ \cs_set:Npn \use_none:nnnnnnn #1#2#3#4#5#6#7 { } \cs_set:Npn \use_none:nnnnnnnn #1#2#3#4#5#6#7#8 { } \cs_set:Npn \use_none:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { } -\cs_set_nopar:Npn \prg_return_true: +\cs_set:Npn \prg_return_true: { \exp_after:wN \use_i:nn \exp:w } -\cs_set_nopar:Npn \prg_return_false: +\cs_set:Npn \prg_return_false: { \exp_after:wN \use_ii:nn \exp:w} -\cs_set_protected_nopar:Npn \prg_set_conditional:Npnn +\cs_set_protected:Npn \prg_set_conditional:Npnn { \__prg_generate_conditional_parm:nnNpnn { set } { } } -\cs_set_protected_nopar:Npn \prg_new_conditional:Npnn +\cs_set_protected:Npn \prg_new_conditional:Npnn { \__prg_generate_conditional_parm:nnNpnn { new } { } } -\cs_set_protected_nopar:Npn \prg_set_protected_conditional:Npnn +\cs_set_protected:Npn \prg_set_protected_conditional:Npnn { \__prg_generate_conditional_parm:nnNpnn { set } { _protected } } -\cs_set_protected_nopar:Npn \prg_new_protected_conditional:Npnn +\cs_set_protected:Npn \prg_new_protected_conditional:Npnn { \__prg_generate_conditional_parm:nnNpnn { new } { _protected } } \cs_set_protected:Npn \__prg_generate_conditional_parm:nnNpnn #1#2#3#4# { \__cs_split_function:NN #3 \__prg_generate_conditional:nnNnnnnn {#1} {#2} {#4} } -\cs_set_protected_nopar:Npn \prg_set_conditional:Nnn +\cs_set_protected:Npn \prg_set_conditional:Nnn { \__prg_generate_conditional_count:nnNnn { set } { } } -\cs_set_protected_nopar:Npn \prg_new_conditional:Nnn +\cs_set_protected:Npn \prg_new_conditional:Nnn { \__prg_generate_conditional_count:nnNnn { new } { } } -\cs_set_protected_nopar:Npn \prg_set_protected_conditional:Nnn +\cs_set_protected:Npn \prg_set_protected_conditional:Nnn { \__prg_generate_conditional_count:nnNnn { set } { _protected } } -\cs_set_protected_nopar:Npn \prg_new_protected_conditional:Nnn +\cs_set_protected:Npn \prg_new_protected_conditional:Nnn { \__prg_generate_conditional_count:nnNnn { new } { _protected } } \cs_set_protected:Npn \__prg_generate_conditional_count:nnNnn #1#2#3 { @@ -1705,9 +1713,9 @@ \exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 TF } #6 { #7 \exp_end: } } -\cs_set_protected_nopar:Npn \prg_set_eq_conditional:NNn +\cs_set_protected:Npn \prg_set_eq_conditional:NNn { \__prg_set_eq_conditional:NNNn \cs_set_eq:cc } -\cs_set_protected_nopar:Npn \prg_new_eq_conditional:NNn +\cs_set_protected:Npn \prg_new_eq_conditional:NNn { \__prg_set_eq_conditional:NNNn \cs_new_eq:cc } \cs_set_protected:Npn \__prg_set_eq_conditional:NNNn #1#2#3#4 { @@ -1774,7 +1782,7 @@ } \tex_chardef:D \c_true_bool = 1 ~ \tex_chardef:D \c_false_bool = 0 ~ -\cs_set_nopar:Npn \cs_to_str:N +\cs_set:Npn \cs_to_str:N { \tex_romannumeral:D \if:w \token_to_str:N \ \__cs_to_str:w \fi: @@ -1875,28 +1883,28 @@ { \cs_if_exist:cTF {#1} { \use:c {#1} #2 } { } } \cs_set:Npn \cs_if_exist_use:c #1 { \cs_if_exist:cTF {#1} { \use:c {#1} } { } } -\cs_set_protected_nopar:Npn \iow_log:x +\cs_set_protected:Npn \iow_log:x { \tex_immediate:D \tex_write:D \c_minus_one } -\cs_set_protected_nopar:Npn \iow_term:x +\cs_set_protected:Npn \iow_term:x { \tex_immediate:D \tex_write:D \c_sixteen } \tex_ifodd:D \l@expl@log@functions@bool - \cs_set_protected_nopar:Npn \__chk_log:x { \iow_log:x } - \cs_set_protected_nopar:Npn \__chk_suspend_log: + \cs_set_protected:Npn \__chk_log:x { \iow_log:x } + \cs_set_protected:Npn \__chk_suspend_log: { - \cs_set_protected_nopar:Npx \__chk_resume_log: + \cs_set_protected:Npx \__chk_resume_log: { - \cs_set_protected_nopar:Npn \__chk_resume_log: + \cs_set_protected:Npn \__chk_resume_log: { \exp_not:o { \__chk_resume_log: } } - \cs_set_protected_nopar:Npn \__chk_log:x + \cs_set_protected:Npn \__chk_log:x { \exp_not:o { \__chk_log:x } } } - \cs_set_protected_nopar:Npn \__chk_log:x { \use_none:n } + \cs_set_protected:Npn \__chk_log:x { \use_none:n } } - \cs_set_protected_nopar:Npn \__chk_resume_log: { } + \cs_set_protected:Npn \__chk_resume_log: { } \else: - \cs_set_protected_nopar:Npn \__chk_log:x { \use_none:n } - \cs_set_protected_nopar:Npn \__chk_suspend_log: { } - \cs_set_protected_nopar:Npn \__chk_resume_log: { } + \cs_set_protected:Npn \__chk_log:x { \use_none:n } + \cs_set_protected:Npn \__chk_suspend_log: { } + \cs_set_protected:Npn \__chk_resume_log: { } \fi: \cs_set_protected:Npn \__msg_kernel_error:nnxx #1#2#3#4 { @@ -1915,7 +1923,7 @@ { \__msg_kernel_error:nnxx {#1} {#2} {#3} { } } \cs_set_protected:Npn \__msg_kernel_error:nn #1#2 { \__msg_kernel_error:nnxx {#1} {#2} { } { } } -\cs_set_nopar:Npn \msg_line_context: +\cs_set:Npn \msg_line_context: { on~line~ \tex_the:D \tex_inputlineno:D } \cs_set_protected:Npn \__chk_if_free_cs:N #1 { @@ -1936,7 +1944,7 @@ \__chk_log:x { Defining~\token_to_str:N #1~ \msg_line_context: } } \fi: -\cs_set_protected_nopar:Npn \__chk_if_free_cs:c +\cs_set_protected:Npn \__chk_if_free_cs:c { \exp_args:Nc \__chk_if_free_cs:N } \tex_ifodd:D \l@expl@check@declarations@bool \cs_set_protected:Npn \__chk_if_exist_var:N #1 @@ -1956,7 +1964,7 @@ { \token_to_str:N #1 } } } -\cs_set_protected_nopar:Npn \__chk_if_exist_cs:c +\cs_set_protected:Npn \__chk_if_exist_cs:c { \exp_args:Nc \__chk_if_exist_cs:N } \cs_set:Npn \__cs_tmp:w #1#2 { @@ -2001,21 +2009,21 @@ \__cs_tmp:w \cs_new_protected:cpn \cs_new_protected:Npn \__cs_tmp:w \cs_new_protected:cpx \cs_new_protected:Npx \cs_new_protected:Npn \cs_set_eq:NN #1 { \tex_let:D #1 =~ } -\cs_new_protected_nopar:Npn \cs_set_eq:cN { \exp_args:Nc \cs_set_eq:NN } -\cs_new_protected_nopar:Npn \cs_set_eq:Nc { \exp_args:NNc \cs_set_eq:NN } -\cs_new_protected_nopar:Npn \cs_set_eq:cc { \exp_args:Ncc \cs_set_eq:NN } -\cs_new_protected_nopar:Npn \cs_gset_eq:NN { \tex_global:D \cs_set_eq:NN } -\cs_new_protected_nopar:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN } -\cs_new_protected_nopar:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN } -\cs_new_protected_nopar:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN } +\cs_new_protected:Npn \cs_set_eq:cN { \exp_args:Nc \cs_set_eq:NN } +\cs_new_protected:Npn \cs_set_eq:Nc { \exp_args:NNc \cs_set_eq:NN } +\cs_new_protected:Npn \cs_set_eq:cc { \exp_args:Ncc \cs_set_eq:NN } +\cs_new_protected:Npn \cs_gset_eq:NN { \tex_global:D \cs_set_eq:NN } +\cs_new_protected:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN } +\cs_new_protected:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN } +\cs_new_protected:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN } \cs_new_protected:Npn \cs_new_eq:NN #1 { \__chk_if_free_cs:N #1 \tex_global:D \cs_set_eq:NN #1 } -\cs_new_protected_nopar:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN } -\cs_new_protected_nopar:Npn \cs_new_eq:Nc { \exp_args:NNc \cs_new_eq:NN } -\cs_new_protected_nopar:Npn \cs_new_eq:cc { \exp_args:Ncc \cs_new_eq:NN } +\cs_new_protected:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN } +\cs_new_protected:Npn \cs_new_eq:Nc { \exp_args:NNc \cs_new_eq:NN } +\cs_new_protected:Npn \cs_new_eq:cc { \exp_args:Ncc \cs_new_eq:NN } \cs_new_protected:Npn \cs_undefine:N #1 { \cs_gset_eq:NN #1 \tex_undefined:D } \cs_new_protected:Npn \cs_undefine:c #1 @@ -2067,7 +2075,7 @@ \c_minus_one \fi: } -\cs_new_nopar:Npn \__cs_count_signature:c +\cs_new:Npn \__cs_count_signature:c { \exp_args:Nc \__cs_count_signature:N } \cs_new_protected:Npn \cs_generate_from_arg_count:NNnn #1#2#3#4 { @@ -2079,13 +2087,13 @@ } {#4} } -\cs_new_protected_nopar:Npn \cs_generate_from_arg_count:cNnn +\cs_new_protected:Npn \cs_generate_from_arg_count:cNnn { \exp_args:Nc \cs_generate_from_arg_count:NNnn } -\cs_new_protected_nopar:Npn \cs_generate_from_arg_count:Ncnn +\cs_new_protected:Npn \cs_generate_from_arg_count:Ncnn { \exp_args:NNc \cs_generate_from_arg_count:NNnn } \cs_set:Npn \__cs_tmp:w #1#2#3 { - \cs_new_protected_nopar:cpx { cs_ #1 : #2 } + \cs_new_protected:cpx { cs_ #1 : #2 } { \exp_not:N \__cs_generate_from_signature:NNn \exp_after:wN \exp_not:N \cs:w cs_ #1 : #3 \cs_end: @@ -2100,6 +2108,12 @@ { \bool_if:NTF #3 { + \str_if_eq_x:nnF { } + { \tl_map_function:nN {#2} \__cs_generate_from_signature:n } + { + \__msg_kernel_error:nnx { kernel } { non-base-function } + { \token_to_str:N #5 } + } \cs_generate_from_arg_count:NNnn #5 #4 { \tl_count:n {#2} } {#6} } @@ -2108,6 +2122,11 @@ { \token_to_str:N #5 } } } +\cs_new:Npn \__cs_generate_from_signature:n #1 + { + \if:w n #1 \else: \if:w N #1 \else: + \if:w T #1 \else: \if:w F #1 \else: #1 \fi: \fi: \fi: \fi: + } \__cs_tmp:w { set } { Nn } { Npn } \__cs_tmp:w { set } { Nx } { Npx } \__cs_tmp:w { set_nopar } { Nn } { Npn } @@ -2134,7 +2153,7 @@ \__cs_tmp:w { new_protected_nopar } { Nx } { Npx } \cs_set:Npn \__cs_tmp:w #1#2 { - \cs_new_protected_nopar:cpx { cs_ #1 : c #2 } + \cs_new_protected:cpx { cs_ #1 : c #2 } { \exp_not:N \exp_args:Nc \exp_after:wN \exp_not:N \cs:w cs_ #1 : N #2 \cs_end: @@ -2169,28 +2188,28 @@ \if_meaning:w #1#2 \prg_return_true: \else: \prg_return_false: \fi: } -\cs_new_nopar:Npn \cs_if_eq_p:cN { \exp_args:Nc \cs_if_eq_p:NN } -\cs_new_nopar:Npn \cs_if_eq:cNTF { \exp_args:Nc \cs_if_eq:NNTF } -\cs_new_nopar:Npn \cs_if_eq:cNT { \exp_args:Nc \cs_if_eq:NNT } -\cs_new_nopar:Npn \cs_if_eq:cNF { \exp_args:Nc \cs_if_eq:NNF } -\cs_new_nopar:Npn \cs_if_eq_p:Nc { \exp_args:NNc \cs_if_eq_p:NN } -\cs_new_nopar:Npn \cs_if_eq:NcTF { \exp_args:NNc \cs_if_eq:NNTF } -\cs_new_nopar:Npn \cs_if_eq:NcT { \exp_args:NNc \cs_if_eq:NNT } -\cs_new_nopar:Npn \cs_if_eq:NcF { \exp_args:NNc \cs_if_eq:NNF } -\cs_new_nopar:Npn \cs_if_eq_p:cc { \exp_args:Ncc \cs_if_eq_p:NN } -\cs_new_nopar:Npn \cs_if_eq:ccTF { \exp_args:Ncc \cs_if_eq:NNTF } -\cs_new_nopar:Npn \cs_if_eq:ccT { \exp_args:Ncc \cs_if_eq:NNT } -\cs_new_nopar:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF } +\cs_new:Npn \cs_if_eq_p:cN { \exp_args:Nc \cs_if_eq_p:NN } +\cs_new:Npn \cs_if_eq:cNTF { \exp_args:Nc \cs_if_eq:NNTF } +\cs_new:Npn \cs_if_eq:cNT { \exp_args:Nc \cs_if_eq:NNT } +\cs_new:Npn \cs_if_eq:cNF { \exp_args:Nc \cs_if_eq:NNF } +\cs_new:Npn \cs_if_eq_p:Nc { \exp_args:NNc \cs_if_eq_p:NN } +\cs_new:Npn \cs_if_eq:NcTF { \exp_args:NNc \cs_if_eq:NNTF } +\cs_new:Npn \cs_if_eq:NcT { \exp_args:NNc \cs_if_eq:NNT } +\cs_new:Npn \cs_if_eq:NcF { \exp_args:NNc \cs_if_eq:NNF } +\cs_new:Npn \cs_if_eq_p:cc { \exp_args:Ncc \cs_if_eq_p:NN } +\cs_new:Npn \cs_if_eq:ccTF { \exp_args:Ncc \cs_if_eq:NNTF } +\cs_new:Npn \cs_if_eq:ccT { \exp_args:Ncc \cs_if_eq:NNT } +\cs_new:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF } \cs_new_protected:Npn \__kernel_register_show:N #1 { \__msg_show_variable:NNNnn #1 \cs_if_exist:NTF ? { } { > ~ \token_to_str:N #1 = \tex_the:D #1 } } -\cs_new_protected_nopar:Npn \__kernel_register_show:c +\cs_new_protected:Npn \__kernel_register_show:c { \exp_args:Nc \__kernel_register_show:N } \cs_new_protected:Npn \cs_show:N #1 { \__msg_show_wrap:n { > ~ \token_to_str:N #1 = \cs_meaning:N #1 } } -\cs_new_protected_nopar:Npn \cs_show:c +\cs_new_protected:Npn \cs_show:c { \group_begin: \exp_args:NNc \group_end: \cs_show:N } \cs_new_nopar:Npn \prg_do_nothing: { } \cs_new_eq:NN \__prg_break_point:Nn \use_ii:nn @@ -2205,7 +2224,7 @@ \cs_new_eq:NN \__prg_break_point: \prg_do_nothing: \cs_new:Npn \__prg_break: #1 \__prg_break_point: { } \cs_new:Npn \__prg_break:n #1#2 \__prg_break_point: {#1} -%% File: l3expan.dtx Copyright (C) 1990-2015 The LaTeX3 project +%% File: l3expan.dtx Copyright (C) 1990-2016 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 @@ -2237,7 +2256,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3expan.dtx 5983 2015-09-10 18:57:56Z joseph $ +\GetIdInfo$Id: l3expan.dtx 6684 2016-08-19 15:21:49Z bruno $ {L3 Argument expansion} \cs_new:Npn \__exp_arg_next:nnn #1#2#3 { #2 \::: { #3 {#1} } } \cs_new:Npn \__exp_arg_next:Nnn #1#2#3 { #2 \::: { #3 #1 } } @@ -2386,35 +2405,35 @@ \cs:w #3 \exp_after:wN \cs_end: \exp_after:wN {#4} } -\cs_new_protected_nopar:Npn \exp_args:Nx { \::x \::: } -\cs_new_nopar:Npn \exp_args:Nnc { \::n \::c \::: } -\cs_new_nopar:Npn \exp_args:Nfo { \::f \::o \::: } -\cs_new_nopar:Npn \exp_args:Nff { \::f \::f \::: } -\cs_new_nopar:Npn \exp_args:Nnf { \::n \::f \::: } -\cs_new_nopar:Npn \exp_args:Nno { \::n \::o \::: } -\cs_new_nopar:Npn \exp_args:NnV { \::n \::V \::: } -\cs_new_nopar:Npn \exp_args:Noo { \::o \::o \::: } -\cs_new_nopar:Npn \exp_args:Nof { \::o \::f \::: } -\cs_new_nopar:Npn \exp_args:Noc { \::o \::c \::: } -\cs_new_protected_nopar:Npn \exp_args:NNx { \::N \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Ncx { \::c \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Nnx { \::n \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Nox { \::o \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Nxo { \::x \::o \::: } -\cs_new_protected_nopar:Npn \exp_args:Nxx { \::x \::x \::: } -\cs_new_nopar:Npn \exp_args:NNno { \::N \::n \::o \::: } -\cs_new_nopar:Npn \exp_args:NNoo { \::N \::o \::o \::: } -\cs_new_nopar:Npn \exp_args:Nnnc { \::n \::n \::c \::: } -\cs_new_nopar:Npn \exp_args:Nnno { \::n \::n \::o \::: } -\cs_new_nopar:Npn \exp_args:Nooo { \::o \::o \::o \::: } -\cs_new_protected_nopar:Npn \exp_args:NNNx { \::N \::N \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:NNnx { \::N \::n \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:NNox { \::N \::o \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Nnnx { \::n \::n \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Nnox { \::n \::o \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Nccx { \::c \::c \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Ncnx { \::c \::n \::x \::: } -\cs_new_protected_nopar:Npn \exp_args:Noox { \::o \::o \::x \::: } +\cs_new_protected:Npn \exp_args:Nx { \::x \::: } +\cs_new:Npn \exp_args:Nnc { \::n \::c \::: } +\cs_new:Npn \exp_args:Nfo { \::f \::o \::: } +\cs_new:Npn \exp_args:Nff { \::f \::f \::: } +\cs_new:Npn \exp_args:Nnf { \::n \::f \::: } +\cs_new:Npn \exp_args:Nno { \::n \::o \::: } +\cs_new:Npn \exp_args:NnV { \::n \::V \::: } +\cs_new:Npn \exp_args:Noo { \::o \::o \::: } +\cs_new:Npn \exp_args:Nof { \::o \::f \::: } +\cs_new:Npn \exp_args:Noc { \::o \::c \::: } +\cs_new_protected:Npn \exp_args:NNx { \::N \::x \::: } +\cs_new_protected:Npn \exp_args:Ncx { \::c \::x \::: } +\cs_new_protected:Npn \exp_args:Nnx { \::n \::x \::: } +\cs_new_protected:Npn \exp_args:Nox { \::o \::x \::: } +\cs_new_protected:Npn \exp_args:Nxo { \::x \::o \::: } +\cs_new_protected:Npn \exp_args:Nxx { \::x \::x \::: } +\cs_new:Npn \exp_args:NNno { \::N \::n \::o \::: } +\cs_new:Npn \exp_args:NNoo { \::N \::o \::o \::: } +\cs_new:Npn \exp_args:Nnnc { \::n \::n \::c \::: } +\cs_new:Npn \exp_args:Nnno { \::n \::n \::o \::: } +\cs_new:Npn \exp_args:Nooo { \::o \::o \::o \::: } +\cs_new_protected:Npn \exp_args:NNNx { \::N \::N \::x \::: } +\cs_new_protected:Npn \exp_args:NNnx { \::N \::n \::x \::: } +\cs_new_protected:Npn \exp_args:NNox { \::N \::o \::x \::: } +\cs_new_protected:Npn \exp_args:Nnnx { \::n \::n \::x \::: } +\cs_new_protected:Npn \exp_args:Nnox { \::n \::o \::x \::: } +\cs_new_protected:Npn \exp_args:Nccx { \::c \::c \::x \::: } +\cs_new_protected:Npn \exp_args:Ncnx { \::c \::n \::x \::: } +\cs_new_protected:Npn \exp_args:Noox { \::o \::o \::x \::: } \cs_new:Npn \__exp_arg_last_unbraced:nn #1#2 { #2#1 } \cs_new:Npn \::f_unbraced \::: #1#2 { @@ -2470,11 +2489,11 @@ } \cs_new:Npn \exp_last_unbraced:NNNo #1#2#3#4 { \exp_after:wN #1 \exp_after:wN #2 \exp_after:wN #3 #4 } -\cs_new_nopar:Npn \exp_last_unbraced:Nno { \::n \::o_unbraced \::: } -\cs_new_nopar:Npn \exp_last_unbraced:Noo { \::o \::o_unbraced \::: } -\cs_new_nopar:Npn \exp_last_unbraced:Nfo { \::f \::o_unbraced \::: } -\cs_new_nopar:Npn \exp_last_unbraced:NnNo { \::n \::N \::o_unbraced \::: } -\cs_new_protected_nopar:Npn \exp_last_unbraced:Nx { \::x_unbraced \::: } +\cs_new:Npn \exp_last_unbraced:Nno { \::n \::o_unbraced \::: } +\cs_new:Npn \exp_last_unbraced:Noo { \::o \::o_unbraced \::: } +\cs_new:Npn \exp_last_unbraced:Nfo { \::f \::o_unbraced \::: } +\cs_new:Npn \exp_last_unbraced:NnNo { \::n \::N \::o_unbraced \::: } +\cs_new_protected:Npn \exp_last_unbraced:Nx { \::x_unbraced \::: } \cs_new:Npn \exp_last_two_unbraced:Noo #1#2#3 { \exp_after:wN \__exp_last_two_unbraced:noN \exp_after:wN {#3} {#2} #1 } \cs_new:Npn \__exp_last_two_unbraced:noN #1#2#3 @@ -2512,14 +2531,14 @@ { \exp_not:N \exp_after:wN \exp_not:N \if_meaning:w \exp_not:N \exp_not:N #1 #1 - \cs_set_eq:NN \exp_not:N \__cs_tmp:w \cs_new_protected_nopar:Npx + \cs_set_eq:NN \exp_not:N \__cs_tmp:w \cs_new_protected:Npx \exp_not:N \else: \exp_not:N \exp_after:wN \exp_not:N \__cs_generate_variant:ww \exp_not:N \token_to_meaning:N #1 \tl_to_str:n { ma } \exp_not:N \q_mark - \exp_not:N \q_mark \cs_new_protected_nopar:Npx + \exp_not:N \q_mark \cs_new_protected:Npx \tl_to_str:n { pr } - \exp_not:N \q_mark \cs_new_nopar:Npx + \exp_not:N \q_mark \cs_new:Npx \exp_not:N \q_stop \exp_not:N \fi: } @@ -2658,11 +2677,11 @@ { \exp_not:N \__cs_generate_internal_variant:wwnNwnn #1 \exp_not:N \q_mark - { \cs_set_eq:NN \exp_not:N \__cs_tmp:w \cs_new_protected_nopar:Npx } - \cs_new_protected_nopar:cpx + { \cs_set_eq:NN \exp_not:N \__cs_tmp:w \cs_new_protected:Npx } + \cs_new_protected:cpx \token_to_str:N x \exp_not:N \q_mark { } - \cs_new_nopar:cpx + \cs_new:cpx \exp_not:N \q_stop { exp_args:N #1 } { @@ -2717,7 +2736,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3tl.dtx 6465 2016-03-26 16:15:09Z joseph $ +\GetIdInfo$Id: l3tl.dtx 6692 2016-08-19 22:29:47Z bruno $ {L3 Token lists} \cs_new_protected:Npn \tl_new:N #1 { @@ -2889,11 +2908,11 @@ } \tex_fi:D \tl_const:Nx \c__tl_rescan_marker_tl { : \token_to_str:N : } -\cs_new_protected_nopar:Npn \tl_set_rescan:Nnn +\cs_new_protected:Npn \tl_set_rescan:Nnn { \__tl_set_rescan:NNnn \tl_set:Nn } -\cs_new_protected_nopar:Npn \tl_gset_rescan:Nnn +\cs_new_protected:Npn \tl_gset_rescan:Nnn { \__tl_set_rescan:NNnn \tl_gset:Nn } -\cs_new_protected_nopar:Npn \tl_rescan:nn +\cs_new_protected:Npn \tl_rescan:nn { \__tl_set_rescan:NNnn \prg_do_nothing: \use:n } \cs_new_protected:Npn \__tl_set_rescan:NNnn #1#2#3#4 { @@ -2992,13 +3011,13 @@ } } \group_end: -\cs_new_protected_nopar:Npn \tl_replace_once:Nnn +\cs_new_protected:Npn \tl_replace_once:Nnn { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_wrap:w \tl_set:Nx } -\cs_new_protected_nopar:Npn \tl_greplace_once:Nnn +\cs_new_protected:Npn \tl_greplace_once:Nnn { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_wrap:w \tl_gset:Nx } -\cs_new_protected_nopar:Npn \tl_replace_all:Nnn +\cs_new_protected:Npn \tl_replace_all:Nnn { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_next:w \tl_set:Nx } -\cs_new_protected_nopar:Npn \tl_greplace_all:Nnn +\cs_new_protected:Npn \tl_greplace_all:Nnn { \__tl_replace:NnNNNnn \q_mark ? \__tl_replace_next:w \tl_gset:Nx } \cs_generate_variant:Nn \tl_replace_once:Nnn { c } \cs_generate_variant:Nn \tl_greplace_once:Nnn { c } @@ -3146,9 +3165,9 @@ } \tl_new:N \l__tl_internal_a_tl \tl_new:N \l__tl_internal_b_tl -\cs_new_protected_nopar:Npn \tl_if_in:NnT { \exp_args:No \tl_if_in:nnT } -\cs_new_protected_nopar:Npn \tl_if_in:NnF { \exp_args:No \tl_if_in:nnF } -\cs_new_protected_nopar:Npn \tl_if_in:NnTF { \exp_args:No \tl_if_in:nnTF } +\cs_new_protected:Npn \tl_if_in:NnT { \exp_args:No \tl_if_in:nnT } +\cs_new_protected:Npn \tl_if_in:NnF { \exp_args:No \tl_if_in:nnF } +\cs_new_protected:Npn \tl_if_in:NnTF { \exp_args:No \tl_if_in:nnTF } \cs_generate_variant:Nn \tl_if_in:NnT { c } \cs_generate_variant:Nn \tl_if_in:NnF { c } \cs_generate_variant:Nn \tl_if_in:NnTF { c } @@ -3218,7 +3237,7 @@ \q_recursion_tail \__prg_break_point:Nn \tl_map_break: { } } -\cs_new_nopar:Npn \tl_map_function:NN +\cs_new:Npn \tl_map_function:NN { \exp_args:No \tl_map_function:nN } \cs_new:Npn \__tl_map_function:Nn #1#2 { @@ -3244,7 +3263,7 @@ \q_recursion_tail \__prg_break_point:Nn \tl_map_break: { } } -\cs_new_protected_nopar:Npn \tl_map_variable:NNn +\cs_new_protected:Npn \tl_map_variable:NNn { \exp_args:No \tl_map_variable:nNn } \cs_new_protected:Npn \__tl_map_variable:Nnn #1#2#3 { @@ -3254,9 +3273,9 @@ \__tl_map_variable:Nnn #1 {#2} } \cs_generate_variant:Nn \tl_map_variable:NNn { c } -\cs_new_nopar:Npn \tl_map_break: +\cs_new:Npn \tl_map_break: { \__prg_map_break:Nn \tl_map_break: { } } -\cs_new_nopar:Npn \tl_map_break:n +\cs_new:Npn \tl_map_break:n { \__prg_map_break:Nn \tl_map_break: } \cs_new:Npn \tl_to_str:N #1 { \etex_detokenize:D \exp_after:wN {#1} } \cs_generate_variant:Nn \tl_to_str:N { c } @@ -3439,7 +3458,7 @@ } \cs_generate_variant:Nn \tl_head:n { V , v , f } \cs_new:Npn \tl_head:w #1#2 \q_stop {#1} -\cs_new_nopar:Npn \tl_head:N { \exp_args:No \tl_head:n } +\cs_new:Npn \tl_head:N { \exp_args:No \tl_head:n } \cs_new:Npn \tl_tail:n #1 { \etex_unexpanded:D @@ -3448,7 +3467,7 @@ { \exp_after:wN { \use_none:n #1 } } } \cs_generate_variant:Nn \tl_tail:n { V , v , f } -\cs_new_nopar:Npn \tl_tail:N { \exp_args:No \tl_tail:n } +\cs_new:Npn \tl_tail:N { \exp_args:No \tl_tail:n } \prg_new_conditional:Npnn \tl_if_head_eq_charcode:nN #1#2 { p , T , F , TF } { \if_charcode:w @@ -3584,7 +3603,7 @@ { \__prg_break:n { \exp_not:n {#2} } } { \exp_args:Nf \__tl_item:nn { \int_eval:n { #1 - 1 } } } } -\cs_new_nopar:Npn \tl_item:Nn { \exp_args:No \tl_item:nn } +\cs_new:Npn \tl_item:Nn { \exp_args:No \tl_item:nn } \cs_generate_variant:Nn \tl_item:Nn { c } \cs_new_protected:Npn \tl_show:N #1 { @@ -3634,7 +3653,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3str.dtx 6441 2016-03-24 10:11:59Z joseph $ +\GetIdInfo$Id: l3str.dtx 6692 2016-08-19 22:29:47Z bruno $ {L3 Strings} \group_begin: \cs_set_protected:Npn \__str_tmp:n #1 @@ -3827,7 +3846,7 @@ \cs_new:Npn \__str_to_other_end:w \fi: #1 \q_mark #2 * A #3 \q_stop { \fi: #2 } } -\cs_new_nopar:Npn \str_item:Nn { \exp_args:No \str_item:nn } +\cs_new:Npn \str_item:Nn { \exp_args:No \str_item:nn } \cs_generate_variant:Nn \str_item:Nn { c } \cs_new:Npn \str_item:nn #1#2 { @@ -3885,7 +3904,7 @@ \if_case:w #1 \exp_stop_f: \or: \or: \or: \or: \or: \or: \or: \or: } \cs_new:Npn \__str_skip_end:NNNNNNNN #1#2#3#4#5#6#7#8 { \fi: \exp_end: } -\cs_new_nopar:Npn \str_range:Nnn { \exp_args:No \str_range:nnn } +\cs_new:Npn \str_range:Nnn { \exp_args:No \str_range:nnn } \cs_generate_variant:Nn \str_range:Nnn { c } \cs_new:Npn \str_range:nnn #1#2#3 { @@ -3961,7 +3980,7 @@ } \cs_new:Npn \__str_collect_end:nnnnnnnnw #1#2#3#4#5#6#7#8 #9 \q_stop { #1#2#3#4#5#6#7#8 } -\cs_new_nopar:Npn \str_count_spaces:N +\cs_new:Npn \str_count_spaces:N { \exp_args:No \str_count_spaces:n } \cs_generate_variant:Nn \str_count_spaces:N { c } \cs_new:Npn \str_count_spaces:n #1 @@ -3981,7 +4000,7 @@ \fi: \c_nine + \__str_count_spaces_loop:w } -\cs_new_nopar:Npn \str_count:N { \exp_args:No \str_count:n } +\cs_new:Npn \str_count:N { \exp_args:No \str_count:n } \cs_generate_variant:Nn \str_count:N { c } \cs_new:Npn \str_count:n #1 { @@ -4019,7 +4038,7 @@ \fi: \c_nine + \__str_count_loop:NNNNNNNNN } -\cs_new_nopar:Npn \str_head:N { \exp_args:No \str_head:n } +\cs_new:Npn \str_head:N { \exp_args:No \str_head:n } \cs_generate_variant:Nn \str_head:N { c } \cs_set:Npn \str_head:n #1 { @@ -4034,7 +4053,7 @@ \exp_after:wN \use_i_delimit_by_q_stop:nw \tl_to_str:n {#1} { } \q_stop } -\cs_new_nopar:Npn \str_tail:N { \exp_args:No \str_tail:n } +\cs_new:Npn \str_tail:N { \exp_args:No \str_tail:n } \cs_generate_variant:Nn \str_tail:N { c } \cs_set:Npn \str_tail:n #1 { @@ -4171,7 +4190,6 @@ \__unicode_map_loop: } } - \cs_set_nopar:Npn \l__unicode_tmp_tl { } \cs_set_protected:Npn \__unicode_parse:w #1#2 \q_stop { \reverse_if:N \if:w \c_hash_str #1 @@ -4260,7 +4278,7 @@ ? \q_recursion_tail \q_recursion_stop } \group_end: -%% File: l3seq.dtx Copyright (C) 1990-2015 The LaTeX3 Project +%% File: l3seq.dtx Copyright (C) 1990-2016 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 @@ -4292,7 +4310,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3seq.dtx 5777 2015-08-05 02:32:21Z bruno $ +\GetIdInfo$Id: l3seq.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Sequences and stacks} \cs_new:Npn \__seq_item:n { @@ -4355,9 +4373,9 @@ \cs_generate_variant:Nn \seq_gset_from_clist:NN { Nc } \cs_generate_variant:Nn \seq_gset_from_clist:NN { c , cc } \cs_generate_variant:Nn \seq_gset_from_clist:Nn { c } -\cs_new_protected_nopar:Npn \seq_set_split:Nnn +\cs_new_protected:Npn \seq_set_split:Nnn { \__seq_set_split:NNnn \tl_set:Nx } -\cs_new_protected_nopar:Npn \seq_gset_split:Nnn +\cs_new_protected:Npn \seq_gset_split:Nnn { \__seq_set_split:NNnn \tl_gset:Nx } \cs_new_protected:Npn \__seq_set_split:NNnn #1#2#3#4 { @@ -4475,9 +4493,9 @@ } \cs_generate_variant:Nn \seq_remove_all:Nn { c } \cs_generate_variant:Nn \seq_gremove_all:Nn { c } -\cs_new_protected_nopar:Npn \seq_reverse:N +\cs_new_protected:Npn \seq_reverse:N { \__seq_reverse:NN \tl_set:Nx } -\cs_new_protected_nopar:Npn \seq_greverse:N +\cs_new_protected:Npn \seq_greverse:N { \__seq_reverse:NN \tl_gset:Nx } \cs_new_protected:Npn \__seq_reverse:NN #1 #2 { @@ -4522,7 +4540,7 @@ \prg_return_false: \__prg_break_point: } -\cs_new_nopar:Npn \__seq_if_in: +\cs_new:Npn \__seq_if_in: { \__prg_break:n { \group_end: \prg_return_true: } } \cs_generate_variant:Nn \seq_if_in:NnT { NV , Nv , No , Nx } \cs_generate_variant:Nn \seq_if_in:NnT { c , cV , cv , co , cx } @@ -4559,9 +4577,9 @@ \cs_new:Npn \__seq_get_left:wnw #1 \__seq_item:n #2#3 \q_stop { \exp_not:n {#2} } \cs_generate_variant:Nn \seq_get_left:NN { c } -\cs_new_protected_nopar:Npn \seq_pop_left:NN +\cs_new_protected:Npn \seq_pop_left:NN { \__seq_pop:NNNN \__seq_pop_left:NNN \tl_set:Nn } -\cs_new_protected_nopar:Npn \seq_gpop_left:NN +\cs_new_protected:Npn \seq_gpop_left:NN { \__seq_pop:NNNN \__seq_pop_left:NNN \tl_gset:Nn } \cs_new_protected:Npn \__seq_pop_left:NNN #1#2#3 { \exp_after:wN \__seq_pop_left:wnwNNN #2 \q_stop #1#2#3 } @@ -4588,9 +4606,9 @@ \__seq_get_right_loop:nn } \cs_generate_variant:Nn \seq_get_right:NN { c } -\cs_new_protected_nopar:Npn \seq_pop_right:NN +\cs_new_protected:Npn \seq_pop_right:NN { \__seq_pop:NNNN \__seq_pop_right:NNN \tl_set:Nx } -\cs_new_protected_nopar:Npn \seq_gpop_right:NN +\cs_new_protected:Npn \seq_gpop_right:NN { \__seq_pop:NNNN \__seq_pop_right:NNN \tl_gset:Nx } \cs_new_protected:Npn \__seq_pop_right:NNN #1#2#3 { @@ -4670,9 +4688,9 @@ { \exp_args:Nf \__seq_item:nnn { \int_eval:n { #1 - 1 } } } } \cs_generate_variant:Nn \seq_item:Nn { c } -\cs_new_nopar:Npn \seq_map_break: +\cs_new:Npn \seq_map_break: { \__prg_map_break:Nn \seq_map_break: { } } -\cs_new_nopar:Npn \seq_map_break:n +\cs_new:Npn \seq_map_break:n { \__prg_map_break:Nn \seq_map_break: } \cs_new:Npn \seq_map_function:NN #1#2 { @@ -4706,7 +4724,7 @@ \cs_gset_eq:cN { __prg_map_ \int_use:N \g__prg_map_int :w } \__seq_item:n } -\cs_new_protected_nopar:Npn \__seq_pop_item_def: +\cs_new_protected:Npn \__seq_pop_item_def: { \cs_gset_eq:Nc \__seq_item:n { __prg_map_ \int_use:N \g__prg_map_int :w } @@ -4853,7 +4871,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3int.dtx 6441 2016-03-24 10:11:59Z joseph $ +\GetIdInfo$Id: l3int.dtx 6700 2016-09-07 22:16:49Z bruno $ {L3 Integers} \cs_new_eq:NN \__int_value:w \tex_number:D \cs_new_eq:NN \__int_eval:w \etex_numexpr:D @@ -4934,7 +4952,11 @@ \cs_generate_variant:Nn \int_new:N { c } \cs_new_protected:Npn \int_const:Nn #1#2 { - \int_compare:nNnTF {#2} > \c_minus_one + \int_compare:nNnTF {#2} < \c_zero + { + \int_new:N #1 + \int_gset:Nn #1 {#2} + } { \int_compare:nNnTF {#2} > \c__max_constdef_int { @@ -4947,10 +4969,6 @@ \__int_eval:w #2 \__int_eval_end: } } - { - \int_new:N #1 - \int_gset:Nn #1 {#2} - } } \cs_generate_variant:Nn \int_const:Nn { c } \if_int_odd:w 0 @@ -4990,9 +5008,9 @@ { \tex_advance:D #1 by \__int_eval:w #2 \__int_eval_end: } \cs_new_protected:Npn \int_sub:Nn #1#2 { \tex_advance:D #1 by - \__int_eval:w #2 \__int_eval_end: } -\cs_new_protected_nopar:Npn \int_gadd:Nn +\cs_new_protected:Npn \int_gadd:Nn { \tex_global:D \int_add:Nn } -\cs_new_protected_nopar:Npn \int_gsub:Nn +\cs_new_protected:Npn \int_gsub:Nn { \tex_global:D \int_sub:Nn } \cs_generate_variant:Nn \int_add:Nn { c } \cs_generate_variant:Nn \int_gadd:Nn { c } @@ -5002,9 +5020,9 @@ { \tex_advance:D #1 \c_one } \cs_new_protected:Npn \int_decr:N #1 { \tex_advance:D #1 \c_minus_one } -\cs_new_protected_nopar:Npn \int_gincr:N +\cs_new_protected:Npn \int_gincr:N { \tex_global:D \int_incr:N } -\cs_new_protected_nopar:Npn \int_gdecr:N +\cs_new_protected:Npn \int_gdecr:N { \tex_global:D \int_decr:N } \cs_generate_variant:Nn \int_incr:N { c } \cs_generate_variant:Nn \int_decr:N { c } @@ -5012,12 +5030,12 @@ \cs_generate_variant:Nn \int_gdecr:N { c } \cs_new_protected:Npn \int_set:Nn #1#2 { #1 ~ \__int_eval:w #2\__int_eval_end: } -\cs_new_protected_nopar:Npn \int_gset:Nn { \tex_global:D \int_set:Nn } +\cs_new_protected:Npn \int_gset:Nn { \tex_global:D \int_set:Nn } \cs_generate_variant:Nn \int_set:Nn { c } \cs_generate_variant:Nn \int_gset:Nn { c } \cs_new_eq:NN \int_use:N \tex_the:D \cs_new:Npn \int_use:c #1 { \tex_the:D \cs:w #1 \cs_end: } -\cs_new_protected_nopar:Npn \__prg_compare_error: +\cs_new_protected:Npn \__prg_compare_error: { \if_int_compare:w \c_zero \c_zero \fi: = @@ -5224,18 +5242,18 @@ #1 { \int_eval:n { #2 + #3 } } {#3} {#4} #5 } } -\cs_new_protected_nopar:Npn \int_step_inline:nnnn +\cs_new_protected:Npn \int_step_inline:nnnn { \int_gincr:N \g__prg_map_int \exp_args:NNc \__int_step:NNnnnn - \cs_gset_nopar:Npn + \cs_gset:Npn { __prg_map_ \int_use:N \g__prg_map_int :w } } \cs_new_protected:Npn \int_step_variable:nnnNn #1#2#3#4#5 { \int_gincr:N \g__prg_map_int \exp_args:NNc \__int_step:NNnnnn - \cs_gset_nopar:Npx + \cs_gset:Npx { __prg_map_ \int_use:N \g__prg_map_int :w } {#1}{#2}{#3} { @@ -5484,21 +5502,21 @@ \use:c { __int_to_Roman_ #1 :w } \__int_to_Roman_aux:N } -\cs_new_nopar:Npn \__int_to_roman_i:w { i } -\cs_new_nopar:Npn \__int_to_roman_v:w { v } -\cs_new_nopar:Npn \__int_to_roman_x:w { x } -\cs_new_nopar:Npn \__int_to_roman_l:w { l } -\cs_new_nopar:Npn \__int_to_roman_c:w { c } -\cs_new_nopar:Npn \__int_to_roman_d:w { d } -\cs_new_nopar:Npn \__int_to_roman_m:w { m } -\cs_new_nopar:Npn \__int_to_roman_Q:w #1 { } -\cs_new_nopar:Npn \__int_to_Roman_i:w { I } -\cs_new_nopar:Npn \__int_to_Roman_v:w { V } -\cs_new_nopar:Npn \__int_to_Roman_x:w { X } -\cs_new_nopar:Npn \__int_to_Roman_l:w { L } -\cs_new_nopar:Npn \__int_to_Roman_c:w { C } -\cs_new_nopar:Npn \__int_to_Roman_d:w { D } -\cs_new_nopar:Npn \__int_to_Roman_m:w { M } +\cs_new:Npn \__int_to_roman_i:w { i } +\cs_new:Npn \__int_to_roman_v:w { v } +\cs_new:Npn \__int_to_roman_x:w { x } +\cs_new:Npn \__int_to_roman_l:w { l } +\cs_new:Npn \__int_to_roman_c:w { c } +\cs_new:Npn \__int_to_roman_d:w { d } +\cs_new:Npn \__int_to_roman_m:w { m } +\cs_new:Npn \__int_to_roman_Q:w #1 { } +\cs_new:Npn \__int_to_Roman_i:w { I } +\cs_new:Npn \__int_to_Roman_v:w { V } +\cs_new:Npn \__int_to_Roman_x:w { X } +\cs_new:Npn \__int_to_Roman_l:w { L } +\cs_new:Npn \__int_to_Roman_c:w { C } +\cs_new:Npn \__int_to_Roman_d:w { D } +\cs_new:Npn \__int_to_Roman_m:w { M } \cs_new:Npn \__int_to_Roman_Q:w #1 { } \cs_new:Npn \__int_pass_signs:wn #1 { @@ -5615,7 +5633,7 @@ } } \cs_generate_variant:Nn \int_show:N { c } -\cs_new_protected_nopar:Npn \int_show:n +\cs_new_protected:Npn \int_show:n { \__msg_show_wrap:Nn \int_eval:n } \int_const:Nn \c_one { 1 } \int_const:Nn \c_two { 2 } @@ -5639,6 +5657,16 @@ \int_const:Nn \c_one_thousand { 1000 } \int_const:Nn \c_ten_thousand { 10000 } \int_const:Nn \c_max_int { 2 147 483 647 } +\int_const:Nn \c_max_char_int + { + \if_int_odd:w 0 + \cs_if_exist:NT \luatex_luatexversion:D { 1 } + \cs_if_exist:NT \xetex_XeTeXversion:D { 1 } ~ + "10FFFF + \else: + "FF + \fi: + } \int_new:N \l_tmpa_int \int_new:N \l_tmpb_int \int_new:N \g_tmpa_int @@ -5675,7 +5703,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3quark.dtx 5855 2015-08-17 17:22:56Z mittelba $ +\GetIdInfo$Id: l3quark.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Quarks} \cs_new_protected:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } \quark_new:N \q_nil @@ -5783,7 +5811,7 @@ \__scan_new:N \s__stop \cs_new:Npn \__use_none_delimit_by_s__stop:w #1 \s__stop { } \__scan_new:N \s__seq -%% File: l3prg.dtx Copyright (C) 2005-2015 The LaTeX3 Project +%% File: l3prg.dtx Copyright (C) 2005-2016 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 @@ -5815,7 +5843,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3prg.dtx 6216 2015-11-01 23:32:43Z bruno $ +\GetIdInfo$Id: l3prg.dtx 6679 2016-08-18 20:54:06Z bruno $ {L3 Control structures} \cs_new_eq:NN \if_bool:N \tex_ifodd:D \cs_new_eq:NN \if_predicate:w \tex_ifodd:D @@ -5906,7 +5934,7 @@ \__msg_show_variable:NNNnn #1 \bool_if_exist:NTF ? { } { > ~ \token_to_str:N #1 = \__bool_to_str:n {#1} } } -\cs_new_protected_nopar:Npn \bool_show:n +\cs_new_protected:Npn \bool_show:n { \__msg_show_wrap:Nn \__bool_to_str:n } \cs_new:Npn \__bool_to_str:n #1 { \bool_if:nTF {#1} { true } { false } } @@ -5975,15 +6003,15 @@ :w } } -\cs_new_nopar:cpn { __bool_)_0:w } { \c_false_bool } -\cs_new_nopar:cpn { __bool_)_1:w } { \c_true_bool } -\cs_new_nopar:cpn { __bool_S_0:w } { \group_align_safe_end: \c_false_bool } -\cs_new_nopar:cpn { __bool_S_1:w } { \group_align_safe_end: \c_true_bool } -\cs_new_nopar:cpn { __bool_&_1:w } & { \__bool_get_next:NN \use_i:nn } -\cs_new_nopar:cpn { __bool_|_0:w } | { \__bool_get_next:NN \use_i:nn } -\cs_new_nopar:cpn { __bool_&_0:w } & +\cs_new:cpn { __bool_)_0:w } { \c_false_bool } +\cs_new:cpn { __bool_)_1:w } { \c_true_bool } +\cs_new:cpn { __bool_S_0:w } { \group_align_safe_end: \c_false_bool } +\cs_new:cpn { __bool_S_1:w } { \group_align_safe_end: \c_true_bool } +\cs_new:cpn { __bool_&_1:w } & { \__bool_get_next:NN \use_i:nn } +\cs_new:cpn { __bool_|_0:w } | { \__bool_get_next:NN \use_i:nn } +\cs_new:cpn { __bool_&_0:w } & { \__bool_eval_skip_to_end_auxi:Nw \c_false_bool } -\cs_new_nopar:cpn { __bool_|_1:w } | +\cs_new:cpn { __bool_|_1:w } | { \__bool_eval_skip_to_end_auxi:Nw \c_true_bool } %% ( \cs_new:Npn \__bool_eval_skip_to_end_auxi:Nw #1#2 ) @@ -6102,15 +6130,15 @@ { \if_mode_inner: \prg_return_true: \else: \prg_return_false: \fi: } \prg_new_conditional:Npnn \mode_if_math: { p , T , F , TF } { \if_mode_math: \prg_return_true: \else: \prg_return_false: \fi: } -\cs_new_nopar:Npn \group_align_safe_begin: +\cs_new:Npn \group_align_safe_begin: { \if_int_compare:w \if_false: { \fi: `} = \c_zero \fi: } -\cs_new_nopar:Npn \group_align_safe_end: +\cs_new:Npn \group_align_safe_end: { \if_int_compare:w `{ = \c_zero } \fi: } \int_new:N \g__prg_map_int -\cs_new_protected_nopar:Npn \scan_align_safe_stop: { } +\cs_new_protected:Npn \scan_align_safe_stop: { } %% File: l3clist.dtx Copyright (C) 2004-2011 Frank Mittelbach, %% The LaTeX3 project -%% (C) 2012-2015 The LaTeX3 Project +%% (C) 2012-2016 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 @@ -6142,7 +6170,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3clist.dtx 5901 2015-09-02 05:59:23Z joseph $ +\GetIdInfo$Id: l3clist.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Comma separated lists} \cs_new_eq:NN \c_empty_clist \c_empty_tl \tl_new:N \l__clist_internal_clist @@ -6196,9 +6224,9 @@ \cs_generate_variant:Nn \clist_set_from_seq:NN { c , cc } \cs_generate_variant:Nn \clist_gset_from_seq:NN { Nc } \cs_generate_variant:Nn \clist_gset_from_seq:NN { c , cc } -\cs_new_protected_nopar:Npn \clist_concat:NNN +\cs_new_protected:Npn \clist_concat:NNN { \__clist_concat:NNNN \tl_set:Nx } -\cs_new_protected_nopar:Npn \clist_gconcat:NNN +\cs_new_protected:Npn \clist_gconcat:NNN { \__clist_concat:NNNN \tl_gset:Nx } \cs_new_protected:Npn \__clist_concat:NNNN #1#2#3#4 { @@ -6248,9 +6276,9 @@ { \tl_gset:Nx #1 { \__clist_trim_spaces:n {#2} } } \cs_generate_variant:Nn \clist_set:Nn { NV , No , Nx , c , cV , co , cx } \cs_generate_variant:Nn \clist_gset:Nn { NV , No , Nx , c , cV , co , cx } -\cs_new_protected_nopar:Npn \clist_put_left:Nn +\cs_new_protected:Npn \clist_put_left:Nn { \__clist_put_left:NNNn \clist_concat:NNN \clist_set:Nn } -\cs_new_protected_nopar:Npn \clist_gput_left:Nn +\cs_new_protected:Npn \clist_gput_left:Nn { \__clist_put_left:NNNn \clist_gconcat:NNN \clist_set:Nn } \cs_new_protected:Npn \__clist_put_left:NNNn #1#2#3#4 { @@ -6261,9 +6289,9 @@ \cs_generate_variant:Nn \clist_put_left:Nn { c , cV , co , cx } \cs_generate_variant:Nn \clist_gput_left:Nn { NV , No , Nx } \cs_generate_variant:Nn \clist_gput_left:Nn { c , cV , co , cx } -\cs_new_protected_nopar:Npn \clist_put_right:Nn +\cs_new_protected:Npn \clist_put_right:Nn { \__clist_put_right:NNNn \clist_concat:NNN \clist_set:Nn } -\cs_new_protected_nopar:Npn \clist_gput_right:Nn +\cs_new_protected:Npn \clist_gput_right:Nn { \__clist_put_right:NNNn \clist_gconcat:NNN \clist_set:Nn } \cs_new_protected:Npn \__clist_put_right:NNNn #1#2#3#4 { @@ -6285,9 +6313,9 @@ \cs_new_protected:Npn \__clist_get:wN #1 , #2 \q_stop #3 { \tl_set:Nn #3 {#1} } \cs_generate_variant:Nn \clist_get:NN { c } -\cs_new_protected_nopar:Npn \clist_pop:NN +\cs_new_protected:Npn \clist_pop:NN { \__clist_pop:NNN \tl_set:Nx } -\cs_new_protected_nopar:Npn \clist_gpop:NN +\cs_new_protected:Npn \clist_gpop:NN { \__clist_pop:NNN \tl_gset:Nx } \cs_new_protected:Npn \__clist_pop:NNN #1#2#3 { @@ -6540,9 +6568,9 @@ \__clist_map_variable:Nnw #1 {#2} } \cs_generate_variant:Nn \clist_map_variable:NNn { c } -\cs_new_nopar:Npn \clist_map_break: +\cs_new:Npn \clist_map_break: { \__prg_map_break:Nn \clist_map_break: { } } -\cs_new_nopar:Npn \clist_map_break:n +\cs_new:Npn \clist_map_break:n { \__prg_map_break:Nn \clist_map_break: } \cs_new:Npn \clist_count:N #1 { @@ -6712,7 +6740,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3token.dtx 6470 2016-04-03 11:29:18Z joseph $ +\GetIdInfo$Id: l3token.dtx 6695 2016-09-01 15:38:50Z bruno $ {L3 Experimental token manipulation} \cs_new_protected:Npn \char_set_catcode:nn #1#2 { @@ -6887,7 +6915,7 @@ \if_int_compare:w #1 < \c_zero 1 \fi: \if_int_compare:w #1 > \c__char_max_int 1 \fi: \exp_stop_f: \__msg_kernel_expandable_error:nn { kernel } - { char-out-of-range } + { char-out-of-range } \else: \__char_generate_aux:nnw {#1} {#2} \fi: @@ -6899,7 +6927,7 @@ \tl_new:N \l__char_tmp_tl \group_begin: \char_set_catcode_active:N \^^L - \cs_set_nopar:Npn ^^L { } + \cs_set:Npn ^^L { } \char_set_catcode_other:n { 0 } \if_int_odd:w 0 \cs_if_exist:NT \luatex_directlua:D { 1 } @@ -7247,13 +7275,13 @@ \cs_new_eq:NN \g_peek_token ? \cs_new_eq:NN \l__peek_search_token ? \tl_new:N \l__peek_search_tl -\cs_new_nopar:Npn \__peek_true:w { } -\cs_new_nopar:Npn \__peek_true_aux:w { } -\cs_new_nopar:Npn \__peek_false:w { } +\cs_new:Npn \__peek_true:w { } +\cs_new:Npn \__peek_true_aux:w { } +\cs_new:Npn \__peek_false:w { } \cs_new:Npn \__peek_tmp:w { } -\cs_new_protected_nopar:Npn \peek_after:Nw +\cs_new_protected:Npn \peek_after:Nw { \tex_futurelet:D \l_peek_token } -\cs_new_protected_nopar:Npn \peek_gafter:Nw +\cs_new_protected:Npn \peek_gafter:Nw { \tex_global:D \tex_futurelet:D \g_peek_token } \cs_new_protected:Npn \__peek_true_remove:w { @@ -7265,12 +7293,12 @@ { \cs_set_eq:NN \l__peek_search_token #2 \tl_set:Nn \l__peek_search_tl {#2} - \cs_set_nopar:Npx \__peek_true:w + \cs_set:Npx \__peek_true:w { \exp_not:N \group_align_safe_end: \exp_not:n {#3} } - \cs_set_nopar:Npx \__peek_false:w + \cs_set:Npx \__peek_false:w { \exp_not:N \group_align_safe_end: \exp_not:n {#4} @@ -7287,8 +7315,8 @@ \cs_set_eq:NN \l__peek_search_token #2 \tl_set:Nn \l__peek_search_tl {#2} \cs_set_eq:NN \__peek_true:w \__peek_true_remove:w - \cs_set_nopar:Npx \__peek_true_aux:w { \exp_not:n {#3} } - \cs_set_nopar:Npx \__peek_false:w + \cs_set:Npx \__peek_true_aux:w { \exp_not:n {#3} } + \cs_set:Npx \__peek_false:w { \exp_not:N \group_align_safe_end: \exp_not:n {#4} @@ -7300,7 +7328,7 @@ { \__peek_token_remove_generic:NNTF #1 #2 {#3} { } } \cs_new_protected:Npn \__peek_token_remove_generic:NNF #1#2#3 { \__peek_token_remove_generic:NNTF #1 #2 { } {#3} } -\cs_new_nopar:Npn \__peek_execute_branches_meaning: +\cs_new:Npn \__peek_execute_branches_meaning: { \if_meaning:w \l_peek_token \l__peek_search_token \exp_after:wN \__peek_true:w @@ -7308,11 +7336,11 @@ \exp_after:wN \__peek_false:w \fi: } -\cs_new_nopar:Npn \__peek_execute_branches_catcode: +\cs_new:Npn \__peek_execute_branches_catcode: { \if_catcode:w \__peek_execute_branches_catcode_aux: } -\cs_new_nopar:Npn \__peek_execute_branches_charcode: +\cs_new:Npn \__peek_execute_branches_charcode: { \if_charcode:w \__peek_execute_branches_catcode_aux: } -\cs_new_nopar:Npn \__peek_execute_branches_catcode_aux: +\cs_new:Npn \__peek_execute_branches_catcode_aux: { \if_catcode:w \exp_not:N \l_peek_token \scan_stop: \exp_after:wN \exp_after:wN @@ -7332,7 +7360,7 @@ \fi: #1 } -\cs_new_nopar:Npn \__peek_execute_branches_catcode_auxiii: +\cs_new:Npn \__peek_execute_branches_catcode_auxiii: { \exp_not:N \l_peek_token \exp_after:wN \exp_not:N \l__peek_search_tl @@ -7341,7 +7369,7 @@ \exp_after:wN \__peek_false:w \fi: } -\cs_new_protected_nopar:Npn \__peek_ignore_spaces_execute_branches: +\cs_new_protected:Npn \__peek_ignore_spaces_execute_branches: { \if_meaning:w \l_peek_token \c_space_token \exp_after:wN \peek_after:Nw @@ -7360,7 +7388,7 @@ } \cs_set:Npn \__peek_def:nnnnn #1#2#3#4#5 { - \cs_new_protected_nopar:cpx { #1 #5 } + \cs_new_protected:cpx { #1 #5 } { \tl_if_empty:nF {#2} { \exp_not:n { \cs_set_eq:NN \__peek_execute_branches: #2 } } @@ -7480,7 +7508,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3prop.dtx 6366 2016-01-05 22:18:59Z joseph $ +\GetIdInfo$Id: l3prop.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Property lists} \__scan_new:N \s__prop \cs_new:Npn \__prop_pair:wn #1 \s__prop #2 @@ -7613,8 +7641,8 @@ \cs_generate_variant:Nn \prop_gpop:NnNT { c } \cs_generate_variant:Nn \prop_gpop:NnNF { c } \cs_generate_variant:Nn \prop_gpop:NnNTF { c } -\cs_new_protected_nopar:Npn \prop_put:Nnn { \__prop_put:NNnn \tl_set:Nx } -\cs_new_protected_nopar:Npn \prop_gput:Nnn { \__prop_put:NNnn \tl_gset:Nx } +\cs_new_protected:Npn \prop_put:Nnn { \__prop_put:NNnn \tl_set:Nx } +\cs_new_protected:Npn \prop_gput:Nnn { \__prop_put:NNnn \tl_gset:Nx } \cs_new_protected:Npn \__prop_put:NNnn #1#2#3#4 { \tl_set:Nn \l__prop_internal_tl @@ -7634,9 +7662,9 @@ { NnV , Nno , Nnx , NV , NVV , No , Noo } \cs_generate_variant:Nn \prop_gput:Nnn { c , cnV , cno , cnx , cV , cVV , co , coo } -\cs_new_protected_nopar:Npn \prop_put_if_new:Nnn +\cs_new_protected:Npn \prop_put_if_new:Nnn { \__prop_put_if_new:NNnn \tl_set:Nx } -\cs_new_protected_nopar:Npn \prop_gput_if_new:Nnn +\cs_new_protected:Npn \prop_gput_if_new:Nnn { \__prop_put_if_new:NNnn \tl_gset:Nx } \cs_new_protected:Npn \__prop_put_if_new:NNnn #1#2#3#4 { @@ -7740,9 +7768,9 @@ } } \cs_generate_variant:Nn \prop_map_inline:Nn { c } -\cs_new_nopar:Npn \prop_map_break: +\cs_new:Npn \prop_map_break: { \__prg_map_break:Nn \prop_map_break: { } } -\cs_new_nopar:Npn \prop_map_break:n +\cs_new:Npn \prop_map_break:n { \__prg_map_break:Nn \prop_map_break: } \cs_new_protected:Npn \prop_show:N #1 { @@ -7783,7 +7811,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3msg.dtx 6464 2016-03-26 13:03:37Z bruno $ +\GetIdInfo$Id: l3msg.dtx 6691 2016-08-19 22:14:26Z bruno $ {L3 Messages} \tl_new:N \l__msg_internal_tl \tl_const:Nn \c__msg_text_prefix_tl { msg~text~>~ } @@ -7869,8 +7897,8 @@ More~errors~will~almost~certainly~follow: \\ the~LaTeX~run~should~be~aborted. } -\cs_new_nopar:Npn \msg_line_number: { \int_use:N \tex_inputlineno:D } -\cs_gset_nopar:Npn \msg_line_context: +\cs_new:Npn \msg_line_number: { \int_use:N \tex_inputlineno:D } +\cs_gset:Npn \msg_line_context: { \c__msg_on_line_text_tl \c_space_tl @@ -7925,7 +7953,7 @@ \__iow_with:Nnn \tex_errorcontextlines:D \c_minus_one { \group_begin: - \cs_set_protected_nopar:Npn & + \cs_set_protected:Npn & { \tex_errmessage:D { @@ -8087,7 +8115,7 @@ \__msg_class_chk_exist:nT {#1} { \tl_set:Nn \l__msg_current_class_tl {#1} - \cs_set_protected_nopar:Npx \__msg_use_code: + \cs_set_protected:Npx \__msg_use_code: { \exp_not:n { @@ -8100,7 +8128,7 @@ } { \__msg_kernel_error:nnxx { kernel } { message-unknown } {#2} {#3} } } -\cs_new_protected_nopar:Npn \__msg_use_code: { } +\cs_new_protected:Npn \__msg_use_code: { } \cs_new_protected:Npn \__msg_use_redirect_name:n #1 { \prop_get:NnNTF \l__msg_redirect_prop { / #1 } \l__msg_class_tl @@ -8154,7 +8182,7 @@ { \prop_put:Nnn \l__msg_redirect_prop { / #1 / #2 } {#3} } } } -\cs_new_protected_nopar:Npn \msg_redirect_class:nn +\cs_new_protected:Npn \msg_redirect_class:nn { \__msg_redirect:nnn { } } \cs_new_protected:Npn \msg_redirect_module:nnn #1 { \__msg_redirect:nnn { / #1 } } @@ -8338,6 +8366,15 @@ of~each~type.~All~the~#1~registers~have~been~used.~ This~run~will~be~aborted~now. } +\__msg_kernel_new:nnnn { kernel } { non-base-function } + { Function~'#1'~is~not~a~base~function } + { + \c__msg_coding_error_text_tl + Functions~defined~through~\iow_char:N\\cs_new:Nn~must~have~ + a~signature~consisting~of~only~normal~arguments~'N'~and~'n'.~ + To~define~variants~use~\iow_char:N\\cs_generate_variant:Nn~ + and~to~define~other~functions~use~\iow_char:N\\cs_new:Npn. + } \__msg_kernel_new:nnnn { kernel } { missing-colon } { Function~'#1'~contains~no~':'. } { @@ -8495,7 +8532,7 @@ {#1} {#2} { } { } { } { } } \bool_new:N \g__msg_log_next_bool -\cs_new_protected_nopar:Npn \__msg_log_next: +\cs_new_protected:Npn \__msg_log_next: { \bool_gset_true:N \g__msg_log_next_bool } \cs_new_protected:Npn \__msg_show_pre:nnnnnn #1#2#3#4#5#6 { @@ -8515,7 +8552,7 @@ { \exp_not:n { \__msg_show_pre:nnnnnn {#1} {#2} } {#3} {#4} {#5} {#6} } } \cs_generate_variant:Nn \__msg_show_pre:nnnnnn { nnnnnV } -\cs_new_protected_nopar:Npn \__msg_show_pre_aux:n +\cs_new_protected:Npn \__msg_show_pre_aux:n { \bool_if:NTF \g__msg_log_next_bool { \iow_log:n } { \iow_term:n } } \cs_new_protected:Npn \__msg_show_variable:NNNnn #1#2#3#4#5 { @@ -8606,7 +8643,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3file.dtx 6458 2016-03-25 21:19:04Z joseph $ +\GetIdInfo$Id: l3file.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 File and I/O operations} \tl_new:N \g_file_current_name_tl \cs_if_exist:NT \@currname @@ -8748,7 +8785,7 @@ \__file_name_sanitize:nn {#1} { \seq_remove_all:Nn \l__file_search_path_seq } } -\cs_new_protected_nopar:Npn \file_list: +\cs_new_protected:Npn \file_list: { \seq_set_eq:NN \l__file_internal_seq \g__file_record_seq \clist_if_exist:NT \@filelist @@ -8814,7 +8851,7 @@ \prg_return_true: } } -\exp_args:NNf \cs_new_protected_nopar:Npn \__ior_new:N +\exp_args:NNf \cs_new_protected:Npn \__ior_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newread } } \cs_new_protected:Npn \__ior_open:Nn #1#2 { @@ -8846,7 +8883,7 @@ } } \cs_generate_variant:Nn \ior_close:N { c } -\cs_new_protected_nopar:Npn \ior_list_streams: +\cs_new_protected:Npn \ior_list_streams: { \__ior_list_streams:Nn \g__ior_streams_prop { ior } } \cs_new_protected:Npn \__ior_list_streams:Nn #1#2 { @@ -8905,7 +8942,7 @@ } \cs_new_protected:Npn \iow_new:N #1 { \cs_new_eq:NN #1 \c_term_iow } \cs_generate_variant:Nn \iow_new:N { c } -\exp_args:NNf \cs_new_protected_nopar:Npn \__iow_new:N +\exp_args:NNf \cs_new_protected:Npn \__iow_new:N { \exp_args:NNc \exp_after:wN \exp_stop_f: { newwrite } } \cs_new_protected:Npn \iow_open:Nn #1#2 { \__file_name_sanitize:nn {#2} { \__iow_open:Nn #1 } } @@ -8940,7 +8977,7 @@ } } \cs_generate_variant:Nn \iow_close:N { c } -\cs_new_protected_nopar:Npn \iow_list_streams: +\cs_new_protected:Npn \iow_list_streams: { \__iow_list_streams:Nn \g__iow_streams_prop { iow } } \cs_new_eq:NN \__iow_list_streams:Nn \__ior_list_streams:Nn \cs_new_protected:Npn \iow_shipout_x:Nn #1#2 @@ -8967,11 +9004,11 @@ { \tex_immediate:D \tex_write:D #1 { \exp_not:n {#2} } } } \cs_generate_variant:Nn \iow_now:Nn { c, Nx, cx } -\cs_set_protected_nopar:Npn \iow_log:x { \iow_now:Nx \c_log_iow } -\cs_new_protected_nopar:Npn \iow_log:n { \iow_now:Nn \c_log_iow } -\cs_set_protected_nopar:Npn \iow_term:x { \iow_now:Nx \c_term_iow } -\cs_new_protected_nopar:Npn \iow_term:n { \iow_now:Nn \c_term_iow } -\cs_new_nopar:Npn \iow_newline: { ^^J } +\cs_set_protected:Npn \iow_log:x { \iow_now:Nx \c_log_iow } +\cs_new_protected:Npn \iow_log:n { \iow_now:Nn \c_log_iow } +\cs_set_protected:Npn \iow_term:x { \iow_now:Nx \c_term_iow } +\cs_new_protected:Npn \iow_term:n { \iow_now:Nn \c_term_iow } +\cs_new:Npn \iow_newline: { ^^J } \cs_new_eq:NN \iow_char:N \cs_to_str:N \int_new:N \l_iow_line_count_int \int_set:Nn \l_iow_line_count_int { 78 } @@ -9014,16 +9051,16 @@ \__msg_kernel_expandable_error:nn { kernel } { indent-outside-wrapping-code } #1 } -\cs_new_protected_nopar:Npn \iow_indent:n { \__iow_indent_error:n } +\cs_new_protected:Npn \iow_indent:n { \__iow_indent_error:n } \cs_new_protected:Npn \iow_wrap:nnnN #1#2#3#4 { \group_begin: \int_set_eq:NN \tex_escapechar:D \c_minus_one - \cs_set_nopar:Npx \{ { \token_to_str:N \{ } - \cs_set_nopar:Npx \# { \token_to_str:N \# } - \cs_set_nopar:Npx \} { \token_to_str:N \} } - \cs_set_nopar:Npx \% { \token_to_str:N \% } - \cs_set_nopar:Npx \~ { \token_to_str:N \~ } + \cs_set:Npx \{ { \token_to_str:N \{ } + \cs_set:Npx \# { \token_to_str:N \# } + \cs_set:Npx \} { \token_to_str:N \} } + \cs_set:Npx \% { \token_to_str:N \% } + \cs_set:Npx \~ { \token_to_str:N \~ } \int_set:Nn \tex_escapechar:D { 92 } \cs_set_eq:NN \\ \c__iow_wrap_newline_marker_tl \cs_set_eq:NN \ \c_catcode_other_space_tl @@ -9052,11 +9089,11 @@ #4 \l__iow_wrap_tl } \cs_new_eq:NN \__iow_wrap_set:Nx \protected@edef -\cs_new_protected_nopar:Npn \__iow_wrap_set_target: +\cs_new_protected:Npn \__iow_wrap_set_target: { - \cs_set_protected_nopar:Npn \__iow_wrap_set_target: + \cs_set_protected:Npn \__iow_wrap_set_target: { - \cs_set_protected_nopar:Npn \__iow_wrap_set_target: { } + \cs_set_protected:Npn \__iow_wrap_set_target: { } \tl_replace_all:Nnn \l__iow_newline_tl { ~ } { \c_space_tl } \int_set:Nn \l__iow_target_count_int { \l_iow_line_count_int - \tl_count:N \l__iow_newline_tl + \c_one } @@ -9069,7 +9106,7 @@ { \__iow_wrap_special:w } { \__iow_wrap_word: } } -\cs_new_protected_nopar:Npn \__iow_wrap_word: +\cs_new_protected:Npn \__iow_wrap_word: { \int_set:Nn \l__iow_current_word_int { \exp_args:No \str_count_ignore_spaces:n \l__iow_current_word_tl } @@ -9079,7 +9116,7 @@ { \__iow_wrap_word_newline: } \__iow_wrap_loop:w } -\cs_new_protected_nopar:Npn \__iow_wrap_word_fits: +\cs_new_protected:Npn \__iow_wrap_word_fits: { \bool_if:NTF \l__iow_line_start_bool { @@ -9095,7 +9132,7 @@ \int_incr:N \l__iow_current_line_int } } -\cs_new_protected_nopar:Npn \__iow_wrap_word_newline: +\cs_new_protected:Npn \__iow_wrap_word_newline: { \__iow_wrap_set_target: \tl_put_right:Nx \l__iow_wrap_tl @@ -9115,7 +9152,7 @@ { \__iow_wrap_special:w } { \__iow_wrap_loop:w #2 ~ #3 ~ } } -\cs_new_protected_nopar:Npn \__iow_wrap_newline: +\cs_new_protected:Npn \__iow_wrap_newline: { \__iow_wrap_set_target: \tl_put_right:Nx \l__iow_wrap_tl @@ -9124,19 +9161,19 @@ \tl_clear:N \l__iow_current_line_tl \bool_set_true:N \l__iow_line_start_bool } -\cs_new_protected_nopar:Npx \__iow_wrap_indent: +\cs_new_protected:Npx \__iow_wrap_indent: { \int_add:Nn \l__iow_current_indentation_int \c_four \tl_put_right:Nx \exp_not:N \l__iow_current_indentation_tl { \c_space_tl \c_space_tl \c_space_tl \c_space_tl } } -\cs_new_protected_nopar:Npn \__iow_wrap_unindent: +\cs_new_protected:Npn \__iow_wrap_unindent: { \int_sub:Nn \l__iow_current_indentation_int \c_four \tl_set:Nx \l__iow_current_indentation_tl { \prg_replicate:nn \l__iow_current_indentation_int { ~ } } } -\cs_new_protected_nopar:Npn \__iow_wrap_end: +\cs_new_protected:Npn \__iow_wrap_end: { \tl_put_right:Nx \l__iow_wrap_tl { \l__iow_current_line_tl } @@ -9202,7 +9239,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3skip.dtx 6366 2016-01-05 22:18:59Z joseph $ +\GetIdInfo$Id: l3skip.dtx 6692 2016-08-19 22:29:47Z bruno $ {L3 Dimensions and skips} \cs_new_eq:NN \if_dim:w \tex_ifdim:D \cs_new_eq:NN \__dim_eval:w \etex_dimexpr:D @@ -9448,7 +9485,7 @@ } \cs_new_eq:NN \dim_show:N \__kernel_register_show:N \cs_generate_variant:Nn \dim_show:N { c } -\cs_new_protected_nopar:Npn \dim_show:n +\cs_new_protected:Npn \dim_show:n { \__msg_show_wrap:Nn \dim_eval:n } \dim_const:Nn \c_zero_dim { 0 pt } \dim_const:Nn \c_max_dim { 16383.99999 pt } @@ -9538,7 +9575,7 @@ \cs_generate_variant:Nn \skip_vertical:N { c } \cs_new_eq:NN \skip_show:N \__kernel_register_show:N \cs_generate_variant:Nn \skip_show:N { c } -\cs_new_protected_nopar:Npn \skip_show:n +\cs_new_protected:Npn \skip_show:n { \__msg_show_wrap:Nn \skip_eval:n } \skip_const:Nn \c_zero_skip { \c_zero_dim } \skip_const:Nn \c_max_skip { \c_max_dim } @@ -9600,7 +9637,7 @@ \cs_generate_variant:Nn \muskip_use:N { c } \cs_new_eq:NN \muskip_show:N \__kernel_register_show:N \cs_generate_variant:Nn \muskip_show:N { c } -\cs_new_protected_nopar:Npn \muskip_show:n +\cs_new_protected:Npn \muskip_show:n { \__msg_show_wrap:Nn \muskip_eval:n } \muskip_const:Nn \c_zero_muskip { 0 mu } \muskip_const:Nn \c_max_muskip { 16383.99999 mu } @@ -9608,7 +9645,7 @@ \muskip_new:N \l_tmpb_muskip \muskip_new:N \g_tmpa_muskip \muskip_new:N \g_tmpb_muskip -%% File: l3keys.dtx Copyright (C) 2006-2015 The LaTeX3 Project +%% File: l3keys.dtx Copyright (C) 2006-2016 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 @@ -9640,105 +9677,142 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3keys.dtx 6284 2015-11-17 10:10:56Z bruno $ +\GetIdInfo$Id: l3keys.dtx 6711 2016-09-21 07:04:35Z joseph $ {L3 Key-value interfaces} -\int_new:N \g__keyval_level_int \tl_new:N \l__keyval_key_tl \tl_new:N \l__keyval_value_tl \tl_new:N \l__keyval_sanitise_tl -\tl_new:N \l__keyval_parse_tl +\cs_new_protected:Npn \keyval_parse:NNn #1#2#3 + { + \tl_set:Nn \l__keyval_sanitise_tl {#3} + \__keyval_sanitise_equals: + \__keyval_sanitise_comma: + \exp_after:wN \__keyval_loop:NNw \exp_after:wN #1 \exp_after:wN #2 + \exp_after:wN \q_mark \l__keyval_sanitise_tl , \q_recursion_tail , + } \group_begin: \char_set_catcode_active:n { `\= } \char_set_catcode_active:n { `\, } - \cs_new_protected:Npx \__keyval_parse:n #1 + \cs_new_protected:Npn \__keyval_sanitise_equals: { - \group_begin: - \tl_set:Nn \exp_not:N \l__keyval_sanitise_tl {#1} - \tl_replace_all:Nnn \exp_not:N \l__keyval_sanitise_tl - { \exp_not:N = } { \token_to_str:N = } - \tl_replace_all:Nnn \exp_not:N \l__keyval_sanitise_tl - { \exp_not:N , } { \token_to_str:N , } - \tl_clear:N \exp_not:N \l__keyval_parse_tl - \exp_not:N \exp_after:wN - \exp_not:N \__keyval_parse_elt:w \exp_not:N \exp_after:wN - \exp_not:N \q_nil \exp_not:N \l__keyval_sanitise_tl - \token_to_str:N , \exp_not:N \q_recursion_tail - \token_to_str:N , \exp_not:N \q_recursion_stop - \exp_not:N \exp_after:wN \group_end: - \exp_not:N \l__keyval_parse_tl + \exp_after:wN \__keyval_sanitise_equals_auxi:w \l__keyval_sanitise_tl + \q_mark = \q_nil = + \exp_after:wN \__keyval_sanitise_aux:w \l__keyval_sanitise_tl } -\group_end: -\cs_new_protected:Npn \__keyval_parse_elt:w #1 , - { - \tl_if_blank:oF { \use_none:n #1 } + \cs_new_protected:Npn \__keyval_sanitise_equals_auxi:w #1 = { - \quark_if_recursion_tail_stop:o { \use_none:n #1 } - \__keyval_split_key_value:w #1 \q_nil = = \q_stop + \tl_set:Nn \l__keyval_sanitise_tl {#1} + \__keyval_sanitise_equals_auxii:w } - \__keyval_parse_elt:w \q_nil - } -\cs_new_protected:Npn \__keyval_split_key_value:w #1 = #2 = #3 \q_stop - { - \tl_if_blank:nTF {#3} + \cs_new_protected:Npn \__keyval_sanitise_equals_auxii:w #1 = { - \__keyval_split_key:w #1 \q_stop - \tl_put_right:Nx \l__keyval_parse_tl - { - \exp_not:c - { - __keyval_key_no_value_elt_ - \int_use:N \g__keyval_level_int - :n - } - { \exp_not:o \l__keyval_key_tl } - } + \if_meaning:w \q_nil #1 \scan_stop: + \else: + \tl_set:Nx \l__keyval_sanitise_tl + { + \exp_not:o \l__keyval_sanitise_tl + \token_to_str:N = + \exp_not:n {#1} + } + \exp_after:wN \__keyval_sanitise_equals_auxii:w + \fi: } + \cs_new_protected:Npn \__keyval_sanitise_comma: + { + \exp_after:wN \__keyval_sanitise_comma_auxi:w \l__keyval_sanitise_tl + \q_mark , \q_nil , + \exp_after:wN \__keyval_sanitise_aux:w \l__keyval_sanitise_tl + } + \cs_new_protected:Npn \__keyval_sanitise_comma_auxi:w #1 , { - \__keyval_split:Nn \l__keyval_key_tl {#1} - \tl_if_blank:oTF { \use_none:n #3 } - { \__keyval_split_value:w \q_nil #2 \q_stop } - { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } } + \tl_set:Nn \l__keyval_sanitise_tl {#1} + \__keyval_sanitise_comma_auxii:w + } + \cs_new_protected:Npn \__keyval_sanitise_comma_auxii:w #1 , + { + \if_meaning:w \q_nil #1 \scan_stop: + \else: + \tl_set:Nx \l__keyval_sanitise_tl + { + \exp_not:o \l__keyval_sanitise_tl + \token_to_str:N , + \exp_not:n {#1} + } + \exp_after:wN \__keyval_sanitise_comma_auxii:w + \fi: } +\group_end: +\cs_new_protected:Npn \__keyval_sanitise_aux:w #1 \q_mark + { \tl_set:Nn \l__keyval_sanitise_tl {#1} } +\cs_new_protected:Npn \__keyval_loop:NNw #1#2#3 , + { + \exp_after:wN \if_meaning:w \exp_after:wN \q_recursion_tail + \use_none:n #3 \prg_do_nothing: + \else: + \__keyval_split:NNw #1#2#3 == \q_stop + \exp_after:wN \__keyval_loop:NNw \exp_after:wN #1 \exp_after:wN #2 + \exp_after:wN \q_mark + \fi: } -\cs_new_protected:Npn \__keyval_split_key:w #1 \q_nil \q_stop - { \__keyval_split:Nn \l__keyval_key_tl {#1} } -\cs_new_protected:Npn \__keyval_split:Nn #1#2 +\cs_new_protected:Npn \__keyval_split:NNw #1#2#3 = { - \quark_if_nil:oTF { \use_none:nnn #2 \q_nil \q_nil } - { \tl_set:Nx #1 { \exp_not:o { \use_ii:nnn #2 \q_nil } } } - { \__keyval_split:Nw #1 #2 \q_stop } + \__keyval_def:Nn \l__keyval_key_tl {#3} + \if_meaning:w \l__keyval_key_tl \c_empty_tl + \exp_after:wN \__keyval_split_tidy:w + \else: + \exp_after:wN \__keyval_split_value:NNw \exp_after:wN #1 \exp_after:wN #2 + \exp_after:wN \q_mark + \fi: } -\cs_new_protected:Npn \__keyval_split:Nw #1 \q_nil #2 \q_stop - { \tl_set:Nx #1 { \tl_trim_spaces:n {#2} } } -\cs_new_protected:Npn \__keyval_split_value:w #1 \q_nil \q_stop +\cs_new_protected:Npn \__keyval_split_value:NNw #1#2#3 = #4 \q_stop { - \__keyval_split:Nn \l__keyval_value_tl {#1} - \tl_put_right:Nx \l__keyval_parse_tl - { - \exp_not:c - { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn } - { \exp_not:o \l__keyval_key_tl } - { \exp_not:o \l__keyval_value_tl } - } + \if:w \scan_stop: \tl_to_str:n {#4} \scan_stop: + \cs_set:Npx \__keyval_action: + { \exp_not:N #1 { \exp_not:o \l__keyval_key_tl } } + \else: + \if:w \scan_stop: \etex_detokenize:D \exp_after:wN { \use_none:n #4 } + \scan_stop: + \__keyval_def:Nn \l__keyval_value_tl {#3} + \cs_set:Npx \__keyval_action: + { + \exp_not:N #2 + { \exp_not:o \l__keyval_key_tl } + { \exp_not:o \l__keyval_value_tl } + } + \else: + \cs_set:Npn \__keyval_action: + { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } } + \fi: + \fi: + \__keyval_action: } -\cs_new_protected:Npn \keyval_parse:NNn #1#2#3 +\cs_new_protected:Npn \__keyval_split_tidy:w #1 \q_stop { - \int_gincr:N \g__keyval_level_int - \cs_gset_eq:cN - { __keyval_key_no_value_elt_ \int_use:N \g__keyval_level_int :n } #1 - \cs_gset_eq:cN - { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn } #2 - \__keyval_parse:n {#3} - \int_gdecr:N \g__keyval_level_int + \if:w \scan_stop: \etex_detokenize:D \exp_after:wN { \use_none:n #1 } + \scan_stop: + \else: + \exp_after:wN \__keyval_empty_key: + \fi: } +\cs_new:Npn \__keyval_action: { } +\cs_new_protected:Npn \__keyval_empty_key: + { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } } +\cs_new_protected:Npn \__keyval_def:Nn #1#2 + { \tl_set:Nx #1 { \__tl_trim_spaces:nn {#2} \__keyval_def_aux:n } } +\cs_new:Npn \__keyval_def_aux:n #1 + { \exp_after:wN \__keyval_def_aux:w #1 \q_stop } +\cs_new:Npn \__keyval_def_aux:w #1 \q_stop { \exp_not:n {#1} } \__msg_kernel_new:nnnn { kernel } { misplaced-equals-sign } { Misplaced~equals~sign~in~key-value~input~\msg_line_number: } { LaTeX~is~attempting~to~parse~some~key-value~input~but~found~ two~equals~signs~not~separated~by~a~comma. } -\tl_const:Nn \c__keys_code_root_tl { key~code~>~ } -\tl_const:Nn \c__keys_info_root_tl { key~info~>~ } +\tl_const:Nn \c__keys_code_root_tl { key~code~>~ } +\tl_const:Nn \c__keys_default_root_tl { key~default~>~ } +\tl_const:Nn \c__keys_groups_root_tl { key~groups~>~ } +\tl_const:Nn \c__keys_info_root_tl { key~info~>~ } +\tl_const:Nn \c__keys_validate_root_tl { key~validate~>~ } \tl_const:Nn \c__keys_props_root_tl { key~prop~>~ } \int_new:N \l_keys_choice_int \tl_new:N \l_keys_choice_tl @@ -9760,62 +9834,74 @@ \cs_new_protected:Npn \__keys_define:nnn #1#2#3 { \tl_set:Nx \l__keys_module_tl { \__keys_remove_spaces:n {#2} } - \keyval_parse:NNn \__keys_define_elt:n \__keys_define_elt:nn {#3} + \keyval_parse:NNn \__keys_define:n \__keys_define:nn {#3} \tl_set:Nn \l__keys_module_tl {#1} } \cs_generate_variant:Nn \__keys_define:nnn { o } -\cs_new_protected:Npn \__keys_define_elt:n #1 +\cs_new_protected:Npn \__keys_define:n #1 { \bool_set_true:N \l__keys_no_value_bool - \__keys_define_elt_aux:nn {#1} { } + \__keys_define_aux:nn {#1} { } } -\cs_new_protected:Npn \__keys_define_elt:nn #1#2 +\cs_new_protected:Npn \__keys_define:nn #1#2 { \bool_set_false:N \l__keys_no_value_bool - \__keys_define_elt_aux:nn {#1} {#2} + \__keys_define_aux:nn {#1} {#2} } -\cs_new_protected:Npn \__keys_define_elt_aux:nn #1#2 +\cs_new_protected:Npn \__keys_define_aux:nn #1#2 { \__keys_property_find:n {#1} \cs_if_exist:cTF { \c__keys_props_root_tl \l__keys_property_tl } - { \__keys_define_key:n {#2} } + { \__keys_define_code:n {#2} } { - \str_if_eq_x:nnF { \l__keys_property_tl } { .abort: } - { - \__msg_kernel_error:nnxx { kernel } { property-unknown } + \tl_if_empty:NF \l__keys_property_tl + { + \__msg_kernel_error:nnxx { kernel } { property-unknown } { \l__keys_property_tl } { \l_keys_path_tl } } } } \cs_new_protected:Npn \__keys_property_find:n #1 { - \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / } - \tl_if_in:nnTF {#1} { . } - { \__keys_property_find:w #1 \q_stop } + \tl_set:Nx \l__keys_property_tl { \__keys_remove_spaces:n {#1} } + \exp_after:wN \__keys_property_find:w \l__keys_property_tl . . \q_stop {#1} + } +\cs_new_protected:Npn \__keys_property_find:w #1 . #2 . #3 \q_stop #4 + { + \tl_if_blank:nTF {#3} { - \__msg_kernel_error:nnx { kernel } { key-no-property } {#1} - \tl_set:Nn \l__keys_property_tl { .abort: } + \tl_clear:N \l__keys_property_tl + \__msg_kernel_error:nnn { kernel } { key-no-property } {#4} + } + { + \str_if_eq:nnTF {#3} { . } + { + \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / #1 } + \tl_set:Nn \l__keys_property_tl { . #2 } + } + { + \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / #1 . #2 } + \__keys_property_search:w #3 \q_stop + } } } -\cs_new_protected:Npn \__keys_property_find:w #1 . #2 \q_stop +\cs_new_protected:Npn \__keys_property_search:w #1 . #2 \q_stop { - \tl_set:Nx \l_keys_path_tl + \str_if_eq:nnTF {#2} { . } { - \l_keys_path_tl - \__keys_remove_spaces:n {#1} + \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl } + \tl_set:Nn \l__keys_property_tl { . #1 } } - \tl_if_in:nnTF {#2} { . } { - \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl . } - \__keys_property_find:w #2 \q_stop + \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl . #1 } + \__keys_property_search:w #2 \q_stop } - { \tl_set:Nn \l__keys_property_tl { . #2 } } } -\cs_new_protected:Npn \__keys_define_key:n #1 +\cs_new_protected:Npn \__keys_define_code:n #1 { \bool_if:NTF \l__keys_no_value_bool { - \exp_after:wN \__keys_define_key:w + \exp_after:wN \__keys_define_code:w \l__keys_property_tl \q_stop { \use:c { \c__keys_props_root_tl \l__keys_property_tl } } { @@ -9826,7 +9912,11 @@ } { \use:c { \c__keys_props_root_tl \l__keys_property_tl } {#1} } } -\cs_new_protected:Npn \__keys_define_key:w #1 : #2 \q_stop +\use:x + { + \cs_new:Npn \exp_not:N \__keys_define_code:w + ##1 \c_colon_str ##2 \exp_not:N \q_stop + } { \tl_if_empty:nTF {#2} } \cs_new_protected:Npn \__keys_ensure_exist:n #1 { @@ -9834,6 +9924,7 @@ { \prop_set_eq:cN { \c__keys_info_root_tl #1 } \c_empty_prop } + \cs_if_exist:cF { \c__keys_code_root_tl #1 } { \__chk_log:x { Defining~key~#1~ \msg_line_context: } @@ -9873,11 +9964,11 @@ \__keys_default_set:n { true } } \cs_generate_variant:Nn \__keys_bool_set_inverse:Nn { c } -\cs_new_protected_nopar:Npn \__keys_choice_make: +\cs_new_protected:Npn \__keys_choice_make: { \__keys_choice_make:N \__keys_choice_find:n } -\cs_new_protected_nopar:Npn \__keys_multichoice_make: +\cs_new_protected:Npn \__keys_multichoice_make: { \__keys_choice_make:N \__keys_multichoice_find:n } -\cs_new_protected_nopar:Npn \__keys_choice_make:N #1 +\cs_new_protected:Npn \__keys_choice_make:N #1 { \prop_if_exist:cTF { \c__keys_info_root_tl \__keys_parent:o \l_keys_path_tl } @@ -9893,7 +9984,7 @@ } { \__keys_choice_make_aux:N #1 } } -\cs_new_protected_nopar:Npn \__keys_choice_make_aux:N #1 +\cs_new_protected:Npn \__keys_choice_make_aux:N #1 { \__keys_cmd_set:nn { \l_keys_path_tl } { #1 {##1} } \prop_put:cnn { \c__keys_info_root_tl \l_keys_path_tl } { choice } @@ -9915,9 +10006,9 @@ \__keys_parent:wn #2 / #3 \q_stop { #4 / #1 } } } -\cs_new_protected_nopar:Npn \__keys_choices_make:nn +\cs_new_protected:Npn \__keys_choices_make:nn { \__keys_choices_make:Nnn \__keys_choice_make: } -\cs_new_protected_nopar:Npn \__keys_multichoices_make:nn +\cs_new_protected:Npn \__keys_multichoices_make:nn { \__keys_choices_make:Nnn \__keys_multichoice_make: } \cs_new_protected:Npn \__keys_choices_make:Nnn #1#2#3 { @@ -9943,15 +10034,16 @@ \cs_generate_variant:Nn \__keys_cmd_set:nn { nx , Vn , Vo } \cs_new_protected:Npn \__keys_default_set:n #1 { - \__keys_ensure_exist:V \l_keys_path_tl \tl_if_empty:nTF {#1} { - \prop_remove:cn { \c__keys_info_root_tl \l_keys_path_tl } - { default } + \cs_set_eq:cN + { \c__keys_default_root_tl \l_keys_path_tl } + \tex_undefined:D } { - \prop_put:cnn { \c__keys_info_root_tl \l_keys_path_tl } - { default } {#1} + \cs_set:cpx + { \c__keys_default_root_tl \l_keys_path_tl } + { \exp_not:n {#1} } } } \cs_new_protected:Npn \__keys_groups_set:n #1 @@ -9970,11 +10062,8 @@ } \cs_new_protected:Npn \__keys_initialise:n #1 { - \__keys_ensure_exist:V \l_keys_path_tl - \exp_after:wN \__keys_initialise:wn \l_keys_path_tl \q_stop {#1} + \cs_if_exist_use:cT { \c__keys_code_root_tl \l_keys_path_tl } { {#1} } } -\cs_new_protected:Npn \__keys_initialise:wn #1 / #2 \q_stop #3 - { \keys_set:nn {#1} { #2 = {#3} } } \cs_new_protected:Npn \__keys_meta_make:n #1 { \__keys_cmd_set:Vo \l_keys_path_tl @@ -9985,31 +10074,62 @@ } \cs_new_protected:Npn \__keys_meta_make:nn #1#2 { \__keys_cmd_set:Vn \l_keys_path_tl { \keys_set:nn {#1} {#2} } } -\cs_new_protected_nopar:Npn \__keys_undefine: +\cs_new_protected:Npn \__keys_undefine: { - \cs_set_eq:cN { \c__keys_code_root_tl \l_keys_path_tl } \tex_undefined:D - \cs_set_eq:cN { \c__keys_info_root_tl \l_keys_path_tl } \tex_undefined:D + \clist_map_inline:nn + { code , default , groups , info , validate } + { + \cs_set_eq:cN + { \tl_use:c { c__keys_ ##1 _root_tl } \l_keys_path_tl } + \tex_undefined:D + } } \cs_new_protected:Npn \__keys_value_requirement:nn #1#2 { - \__keys_ensure_exist:V \l_keys_path_tl - \prop_remove:cn { \c__keys_info_root_tl \l_keys_path_tl } - { required } - \prop_remove:cn { \c__keys_info_root_tl \l_keys_path_tl } - { forbidden } - \str_if_eq:nnTF {#2} { true } - { - \prop_put:cnn { \c__keys_info_root_tl \l_keys_path_tl } - {#1} { true } - } + \str_case:nnF {#2} { - \str_if_eq:nnF {#2} { false } + { true } + { + \cs_set_eq:cc + { \c__keys_validate_root_tl \l_keys_path_tl } + { __keys_validate_ #1 : } + } + { false } { - \__msg_kernel_error:nnx { kernel } { property-boolean-values-only } - { .value_ #1 :n } + \cs_if_eq:ccT + { \c__keys_validate_root_tl \l_keys_path_tl } + { __keys_validate_ #1 : } + { + \cs_set_eq:cN + { \c__keys_validate_root_tl \l_keys_path_tl } + \tex_undefined:D + } } } + { + \__msg_kernel_error:nnx { kernel } { property-boolean-values-only } + { .value_ #1 :n } + } + } +\cs_new_protected:Npn \__keys_validate_forbidden: + { + \bool_if:NF \l__keys_no_value_bool + { + \__msg_kernel_error:nnxx { kernel } { value-forbidden } + { \l_keys_path_tl } { \l_keys_value_tl } + \__keys_validate_cleanup:w + } } +\cs_new_protected:Npn \__keys_validate_required: + { + \bool_if:NT \l__keys_no_value_bool + { + \__msg_kernel_error:nnx { kernel } { value-required } + { \l_keys_path_tl } + \__keys_validate_cleanup:w + } + } +\cs_new_protected:Npn \__keys_validate_cleanup:w #1 \cs_end: #2#3 { } \cs_new_protected:Npn \__keys_variable_set:NnnN #1#2#3#4 { \use:c { #2_if_exist:NF } #1 { \use:c { #2 _new:N } #1 } @@ -10037,7 +10157,7 @@ { \__keys_bool_set_inverse:Nn #1 { g } } \cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset_inverse:c } #1 { \__keys_bool_set_inverse:cn {#1} { g } } -\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .choice: } +\cs_new_protected:cpn { \c__keys_props_root_tl .choice: } { \__keys_choice_make: } \cs_new_protected:cpn { \c__keys_props_root_tl .choices:nn } #1 { \__keys_choices_make:nn #1 } @@ -10103,7 +10223,7 @@ { \__keys_meta_make:n {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .meta:nn } #1 { \__keys_meta_make:nn #1 } -\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .multichoice: } +\cs_new_protected:cpn { \c__keys_props_root_tl .multichoice: } { \__keys_multichoice_make: } \cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:nn } #1 { \__keys_multichoices_make:nn #1 } @@ -10137,23 +10257,23 @@ { \__keys_variable_set:NnnN #1 { tl } { g } x } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset_x:c } #1 { \__keys_variable_set:cnnN {#1} { tl } { g } x } -\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .undefine: } +\cs_new_protected:cpn { \c__keys_props_root_tl .undefine: } { \__keys_undefine: } \cs_new_protected:cpn { \c__keys_props_root_tl .value_forbidden:n } #1 { \__keys_value_requirement:nn { forbidden } {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .value_required:n } #1 { \__keys_value_requirement:nn { required } {#1} } -\cs_new_protected_nopar:Npn \keys_set:nn +\cs_new_protected:Npn \keys_set:nn { \__keys_set:onn { \l__keys_module_tl } } \cs_new_protected:Npn \__keys_set:nnn #1#2#3 { \tl_set:Nx \l__keys_module_tl { \__keys_remove_spaces:n {#2} } - \keyval_parse:NNn \__keys_set_elt:n \__keys_set_elt:nn {#3} + \keyval_parse:NNn \__keys_set:n \__keys_set:nn {#3} \tl_set:Nn \l__keys_module_tl {#1} } \cs_generate_variant:Nn \keys_set:nn { nV , nv , no } \cs_generate_variant:Nn \__keys_set:nnn { o } -\cs_new_protected_nopar:Npn \keys_set_known:nnN +\cs_new_protected:Npn \keys_set_known:nnN { \__keys_set_known:onnN \l__keys_unused_clist } \cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } \cs_new_protected:Npn \__keys_set_known:nnnN #1#2#3#4 @@ -10171,7 +10291,7 @@ \bool_set_false:N \l__keys_only_known_bool } \cs_generate_variant:Nn \keys_set_known:nn { nV , nv , no } -\cs_new_protected_nopar:Npn \keys_set_filter:nnnN +\cs_new_protected:Npn \keys_set_filter:nnnN { \__keys_set_filter:onnnN \l__keys_unused_clist } \cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno } \cs_new_protected:Npn \__keys_set_filter:nnnnN #1#2#3#4#5 @@ -10200,29 +10320,28 @@ \bool_set_false:N \l__keys_selective_bool } \cs_generate_variant:Nn \keys_set_groups:nnn { nnV , nnv , nno } -\cs_new_protected:Npn \__keys_set_elt:n #1 +\cs_new_protected:Npn \__keys_set:n #1 { \bool_set_true:N \l__keys_no_value_bool - \__keys_set_elt_aux:onn \l__keys_module_tl {#1} { } + \__keys_set_aux:onn \l__keys_module_tl {#1} { } } -\cs_new_protected:Npn \__keys_set_elt:nn #1#2 +\cs_new_protected:Npn \__keys_set:nn #1#2 { \bool_set_false:N \l__keys_no_value_bool - \__keys_set_elt_aux:onn \l__keys_module_tl {#1} {#2} + \__keys_set_aux:onn \l__keys_module_tl {#1} {#2} } -\cs_new_protected:Npn \__keys_set_elt_aux:nnn #1#2#3 +\cs_new_protected:Npn \__keys_set_aux:nnn #1#2#3 { - \tl_set:Nx \l_keys_path_tl - { \l__keys_module_tl / \__keys_remove_spaces:n {#2} } + \tl_set:Nx \l_keys_path_tl { #1 / \__keys_remove_spaces:n {#2} } \tl_clear:N \l__keys_module_tl \exp_after:wN \__keys_find_key_module:w \l_keys_path_tl / \q_stop \__keys_value_or_default:n {#3} \bool_if:NTF \l__keys_selective_bool - { \__keys_set_elt_selective: } - { \__keys_set_elt_aux: } + { \__keys_set_selective: } + { \__keys_execute: } \tl_set:Nn \l__keys_module_tl {#1} } -\cs_generate_variant:Nn \__keys_set_elt_aux:nnn { o } +\cs_generate_variant:Nn \__keys_set_aux:nnn { o } \cs_new_protected:Npn \__keys_find_key_module:w #1 / #2 \q_stop { \tl_if_blank:nTF {#2} @@ -10236,31 +10355,7 @@ \__keys_find_key_module:w #2 \q_stop } } -\cs_new_protected_nopar:Npn \__keys_set_elt_aux: - { - \bool_if:nTF - { - \__keys_if_value_p:n { required } && - \l__keys_no_value_bool - } - { - \__msg_kernel_error:nnx { kernel } { value-required } - { \l_keys_path_tl } - } - { - \bool_if:nTF - { - \__keys_if_value_p:n { forbidden } && - ! \l__keys_no_value_bool - } - { - \__msg_kernel_error:nnxx { kernel } { value-forbidden } - { \l_keys_path_tl } { \l_keys_value_tl } - } - { \__keys_execute: } - } - } -\cs_new_protected_nopar:Npn \__keys_set_elt_selective: +\cs_new_protected:Npn \__keys_set_selective: { \prop_if_exist:cTF { \c__keys_info_root_tl \l_keys_path_tl } { @@ -10269,17 +10364,17 @@ { \__keys_check_groups: } { \bool_if:NTF \l__keys_filtered_bool - { \__keys_set_elt_aux: } + { \__keys_execute: } { \__keys_store_unused: } } } { \bool_if:NTF \l__keys_filtered_bool - { \__keys_set_elt_aux: } + { \__keys_execute: } { \__keys_store_unused: } } } -\cs_new_protected_nopar:Npn \__keys_check_groups: +\cs_new_protected:Npn \__keys_check_groups: { \bool_set_false:N \l__keys_tmp_bool \seq_map_inline:Nn \l__keys_selective_seq @@ -10297,11 +10392,11 @@ { \bool_if:NTF \l__keys_filtered_bool { \__keys_store_unused: } - { \__keys_set_elt_aux: } + { \__keys_execute: } } { \bool_if:NTF \l__keys_filtered_bool - { \__keys_set_elt_aux: } + { \__keys_execute: } { \__keys_store_unused: } } } @@ -10309,30 +10404,36 @@ { \bool_if:NTF \l__keys_no_value_bool { - \prop_get:cnNF { \c__keys_info_root_tl \l_keys_path_tl } - { default } \l_keys_value_tl + \cs_if_exist:cTF { \c__keys_default_root_tl \l_keys_path_tl } + { + \tl_set_eq:Nc + \l_keys_value_tl + { \c__keys_default_root_tl \l_keys_path_tl } + } { \tl_clear:N \l_keys_value_tl } } { \tl_set:Nn \l_keys_value_tl {#1} } } -\prg_new_conditional:Npnn \__keys_if_value:n #1 { p } +\cs_new_protected:Npn \__keys_execute: { - \prop_if_exist:cTF { \c__keys_info_root_tl \l_keys_path_tl } + \cs_if_exist:cTF { \c__keys_code_root_tl \l_keys_path_tl } { - \prop_if_in:cnTF { \c__keys_info_root_tl \l_keys_path_tl } {#1} - { \prg_return_true: } - { \prg_return_false: } + \cs_if_exist_use:c { \c__keys_validate_root_tl \l_keys_path_tl } + \cs:w \c__keys_code_root_tl \l_keys_path_tl \exp_after:wN \cs_end: + \exp_after:wN { \l_keys_value_tl } } - { \prg_return_false: } + { \__keys_execute_unknown: } } -\cs_new_protected_nopar:Npn \__keys_execute: - { \__keys_execute:nn { \l_keys_path_tl } { \__keys_execute_unknown: } } -\cs_new_protected_nopar:Npn \__keys_execute_unknown: +\cs_new_protected:Npn \__keys_execute_unknown: { \bool_if:NTF \l__keys_only_known_bool { \__keys_store_unused: } { - \__keys_execute:nn { \l__keys_module_tl / unknown } + \cs_if_exist:cTF { \c__keys_code_root_tl \l__keys_module_tl / unknown } + { + \cs:w \c__keys_code_root_tl \l__keys_module_tl / unknown \exp_after:wN + \cs_end: \exp_after:wN { \l_keys_value_tl } + } { \__msg_kernel_error:nnxx { kernel } { key-unknown } { \l_keys_path_tl } { \l__keys_module_tl } @@ -10348,7 +10449,7 @@ } {#2} } -\cs_new_protected_nopar:Npn \__keys_store_unused: +\cs_new_protected:Npn \__keys_store_unused: { \clist_put_right:Nx \l__keys_unused_clist { @@ -10418,12 +10519,6 @@ \__msg_kernel_new:nnnn { kernel } { boolean-values-only } { Key~'#1'~accepts~boolean~values~only. } { The~key~'#1'~only~accepts~the~values~'true'~and~'false'. } -\__msg_kernel_new:nnnn { kernel } { choice-unknown } - { Choice~'#2'~unknown~for~key~'#1'. } - { - The~key~'#1'~takes~a~limited~number~of~values.\\ - The~input~given,~'#2',~is~not~on~the~list~accepted. - } \__msg_kernel_new:nnnn { kernel } { key-choice-unknown } { Key~'#1'~accepts~only~a~fixed~set~of~choices. } { @@ -10490,9 +10585,9 @@ { has~the~properties: } { is~undefined. } } -\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .value_forbidden: } +\cs_new_protected:cpn { \c__keys_props_root_tl .value_forbidden: } { \__keys_value_requirement:nn { forbidden } { true } } -\cs_new_protected_nopar:cpn { \c__keys_props_root_tl .value_required: } +\cs_new_protected:cpn { \c__keys_props_root_tl .value_required: } { \__keys_value_requirement:nn { required } { true } } %% File: l3fp.dtx Copyright (C) 2011-2016 The LaTeX3 Project %% @@ -10527,7 +10622,7 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3fp.dtx 6465 2016-03-26 16:15:09Z joseph $ +\GetIdInfo$Id: l3fp.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Floating points} %% File: l3fp-aux.dtx Copyright(C) 2011-2014,2016 The LaTeX3 Project %% @@ -10841,7 +10936,7 @@ conversion~functions. } %% -%% File: l3fp-traps.dtx Copyright (C) 2011-2014 The LaTeX3 Project +%% File: l3fp-traps.dtx Copyright (C) 2011-2014,2016 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 @@ -10907,11 +11002,11 @@ } } } -\cs_new_protected_nopar:Npn \__fp_trap_invalid_operation_set_error: +\cs_new_protected:Npn \__fp_trap_invalid_operation_set_error: { \__fp_trap_invalid_operation_set:N \prg_do_nothing: } -\cs_new_protected_nopar:Npn \__fp_trap_invalid_operation_set_flag: +\cs_new_protected:Npn \__fp_trap_invalid_operation_set_flag: { \__fp_trap_invalid_operation_set:N \use_none:nnnnn } -\cs_new_protected_nopar:Npn \__fp_trap_invalid_operation_set_none: +\cs_new_protected:Npn \__fp_trap_invalid_operation_set_none: { \__fp_trap_invalid_operation_set:N \use_none:nnnnnnn } \cs_new_protected:Npn \__fp_trap_invalid_operation_set:N #1 { @@ -10941,11 +11036,11 @@ \exp_after:wN \c_nan_fp } } -\cs_new_protected_nopar:Npn \__fp_trap_division_by_zero_set_error: +\cs_new_protected:Npn \__fp_trap_division_by_zero_set_error: { \__fp_trap_division_by_zero_set:N \prg_do_nothing: } -\cs_new_protected_nopar:Npn \__fp_trap_division_by_zero_set_flag: +\cs_new_protected:Npn \__fp_trap_division_by_zero_set_flag: { \__fp_trap_division_by_zero_set:N \use_none:nnnnn } -\cs_new_protected_nopar:Npn \__fp_trap_division_by_zero_set_none: +\cs_new_protected:Npn \__fp_trap_division_by_zero_set_none: { \__fp_trap_division_by_zero_set:N \use_none:nnnnnnn } \cs_new_protected:Npn \__fp_trap_division_by_zero_set:N #1 { @@ -10967,19 +11062,19 @@ \exp_after:wN ##1 } } -\cs_new_protected_nopar:Npn \__fp_trap_overflow_set_error: +\cs_new_protected:Npn \__fp_trap_overflow_set_error: { \__fp_trap_overflow_set:N \prg_do_nothing: } -\cs_new_protected_nopar:Npn \__fp_trap_overflow_set_flag: +\cs_new_protected:Npn \__fp_trap_overflow_set_flag: { \__fp_trap_overflow_set:N \use_none:nnnnn } -\cs_new_protected_nopar:Npn \__fp_trap_overflow_set_none: +\cs_new_protected:Npn \__fp_trap_overflow_set_none: { \__fp_trap_overflow_set:N \use_none:nnnnnnn } \cs_new_protected:Npn \__fp_trap_overflow_set:N #1 { \__fp_trap_overflow_set:NnNn #1 { overflow } \__fp_inf_fp:N { inf } } -\cs_new_protected_nopar:Npn \__fp_trap_underflow_set_error: +\cs_new_protected:Npn \__fp_trap_underflow_set_error: { \__fp_trap_underflow_set:N \prg_do_nothing: } -\cs_new_protected_nopar:Npn \__fp_trap_underflow_set_flag: +\cs_new_protected:Npn \__fp_trap_underflow_set_flag: { \__fp_trap_underflow_set:N \use_none:nnnnn } -\cs_new_protected_nopar:Npn \__fp_trap_underflow_set_none: +\cs_new_protected:Npn \__fp_trap_underflow_set_none: { \__fp_trap_underflow_set:N \use_none:nnnnnnn } \cs_new_protected:Npn \__fp_trap_underflow_set:N #1 { \__fp_trap_overflow_set:NnNn #1 { underflow } \__fp_zero_fp:N { 0 } } @@ -11009,7 +11104,7 @@ \fp_trap:nn { division_by_zero } { flag } \fp_trap:nn { overflow } { flag } \fp_trap:nn { underflow } { flag } -\cs_new_nopar:Npn \__fp_invalid_operation_o:nw +\cs_new:Npn \__fp_invalid_operation_o:nw { \__fp_invalid_operation:nnw { \exp_after:wN \c_nan_fp } } \cs_generate_variant:Nn \__fp_invalid_operation_o:nw { f } \cs_new:Npn \__fp_error:nnnn #1 @@ -11396,7 +11491,7 @@ \__fp_tmp:w {iii} \__fp_parse_digits_ii:N { 000 ; 3 } \__fp_tmp:w {ii} \__fp_parse_digits_i:N { 00 ; 2 } \__fp_tmp:w {i} \__fp_parse_digits_:N { 0 ; 1 } -\cs_new_nopar:Npn \__fp_parse_digits_:N { ; ; 0 } +\cs_new:Npn \__fp_parse_digits_:N { ; ; 0 } \cs_new:Npn \__fp_parse_one:Nw #1 #2 { \if_catcode:w \scan_stop: \exp_not:N #2 @@ -12007,7 +12102,7 @@ \group_end: \cs_set_protected:Npn \__fp_tmp:w #1 #2 { - \cs_new_nopar:cpn { __fp_parse_word_#1:N } + \cs_new:cpn { __fp_parse_word_#1:N } { \exp_after:wN #2 \exp:w \exp_end_continue_f:w \__fp_parse_infix:NN } } \__fp_tmp:w { inf } \c_inf_fp @@ -12018,7 +12113,7 @@ \__fp_tmp:w { false } \c_zero_fp \cs_set_protected:Npn \__fp_tmp:w #1 #2 { - \cs_new_nopar:cpn { __fp_parse_word_#1:N } + \cs_new:cpn { __fp_parse_word_#1:N } { \__fp_exp_after_f:nw { \__fp_parse_infix:NN } \s__fp \__fp_chk:w 10 #2 ; @@ -12037,7 +12132,7 @@ \__fp_tmp:w {sp} { {-4} {1525} {8789} {0625} {0000} } \tl_map_inline:nn { {em} {ex} } { - \cs_new_nopar:cpn { __fp_parse_word_#1:N } + \cs_new:cpn { __fp_parse_word_#1:N } { \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , @@ -12063,25 +12158,25 @@ \exp:w \__fp_parse_operand:Nw \c_sixteen \__fp_parse_expand:w } -\cs_new_nopar:Npn \__fp_parse_word_acot:N +\cs_new:Npn \__fp_parse_word_acot:N { \__fp_parse_function:NNN \__fp_acot_o:Nw \use_i:nn } -\cs_new_nopar:Npn \__fp_parse_word_acotd:N +\cs_new:Npn \__fp_parse_word_acotd:N { \__fp_parse_function:NNN \__fp_acot_o:Nw \use_ii:nn } -\cs_new_nopar:Npn \__fp_parse_word_atan:N +\cs_new:Npn \__fp_parse_word_atan:N { \__fp_parse_function:NNN \__fp_atan_o:Nw \use_i:nn } -\cs_new_nopar:Npn \__fp_parse_word_atand:N +\cs_new:Npn \__fp_parse_word_atand:N { \__fp_parse_function:NNN \__fp_atan_o:Nw \use_ii:nn } -\cs_new_nopar:Npn \__fp_parse_word_max:N +\cs_new:Npn \__fp_parse_word_max:N { \__fp_parse_function:NNN \__fp_minmax_o:Nw 2 } -\cs_new_nopar:Npn \__fp_parse_word_min:N +\cs_new:Npn \__fp_parse_word_min:N { \__fp_parse_function:NNN \__fp_minmax_o:Nw 0 } \cs_new:Npn \__fp_parse_word_abs:N { \__fp_parse_unary_function:nNN { set_sign } 0 } -\cs_new_nopar:Npn \__fp_parse_word_exp:N +\cs_new:Npn \__fp_parse_word_exp:N { \__fp_parse_unary_function:nNN {exp} ? } -\cs_new_nopar:Npn \__fp_parse_word_ln:N +\cs_new:Npn \__fp_parse_word_ln:N { \__fp_parse_unary_function:nNN {ln} ? } -\cs_new_nopar:Npn \__fp_parse_word_sqrt:N +\cs_new:Npn \__fp_parse_word_sqrt:N { \__fp_parse_unary_function:nNN {sqrt} ? } \tl_map_inline:nn { @@ -12089,16 +12184,16 @@ {cos} {cot} {csc} {sec} {sin} {tan} } { - \cs_new_nopar:cpn { __fp_parse_word_#1:N } + \cs_new:cpn { __fp_parse_word_#1:N } { \__fp_parse_unary_function:nNN {#1} \use_i:nn } - \cs_new_nopar:cpn { __fp_parse_word_#1d:N } + \cs_new:cpn { __fp_parse_word_#1d:N } { \__fp_parse_unary_function:nNN {#1} \use_ii:nn } } -\cs_new_nopar:Npn \__fp_parse_word_trunc:N +\cs_new:Npn \__fp_parse_word_trunc:N { \__fp_parse_function:NNN \__fp_round_o:Nw \__fp_round_to_zero:NNN } -\cs_new_nopar:Npn \__fp_parse_word_floor:N +\cs_new:Npn \__fp_parse_word_floor:N { \__fp_parse_function:NNN \__fp_round_o:Nw \__fp_round_to_ninf:NNN } -\cs_new_nopar:Npn \__fp_parse_word_ceil:N +\cs_new:Npn \__fp_parse_word_ceil:N { \__fp_parse_function:NNN \__fp_round_o:Nw \__fp_round_to_pinf:NNN } \cs_new:Npn \__fp_parse_word_round:N #1#2 { @@ -12251,7 +12346,7 @@ } \group_end: \group_begin: - \cs_set_nopar:Npn \+ { } + \cs_set:Npn \+ { } \char_set_catcode_other:N \& \char_set_catcode_letter:N \^ \char_set_catcode_letter:N \/ @@ -12520,7 +12615,7 @@ } \cs_new_protected:Npn \__fp_new_function:NNnnn #1#2#3#4#5 { - \cs_new_nopar:Npn #1 + \cs_new:Npn #1 { \exp_after:wN \__fp_function_apply:nw \exp_after:wN { @@ -12584,7 +12679,7 @@ \__msg_kernel_new:nnn { kernel } { fp-robust-cmd } { Robust~command~#1 invalid~in~fp~expression! } } -%% File: l3fp-logic.dtx Copyright (C) 2011-2014 The LaTeX3 Project +%% File: l3fp-logic.dtx Copyright (C) 2011-2014,2016 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 @@ -12811,7 +12906,7 @@ \fi: \__fp_exp_after_o:w } - \cs_new_nopar:Npn \__fp_|_o:ww { \__fp_&_o:ww \else: } + \cs_new:Npn \__fp_|_o:ww { \__fp_&_o:ww \else: } \group_end: \cs_new:Npn \__fp_and_return:wNw #1; \fi: #2#3; { \fi: #2 #1; } \cs_new:Npn \__fp_ternary:NwwN #1 #2@ #3@ #4 @@ -12923,7 +13018,7 @@ } \cs_new:Npn \__fp_basics_pack_weird_high:NNNNNNNNw 1 #1#2#3#4 #5#6#7#8 #9; { ; {#1#2#3#4} {#5#6#7#8} {#9} } -\cs_new_nopar:cpx { __fp_-_o:ww } \s__fp +\cs_new:cpx { __fp_-_o:ww } \s__fp { \exp_not:c { __fp_+_o:ww } \exp_not:n { \s__fp \__fp_neg_sign:N } @@ -13210,7 +13305,7 @@ \__int_value:w \__fp_round_digit:Nw #3 #6 ; \exp_after:wN ; } -\cs_new_nopar:cpn { __fp_*_o:ww } +\cs_new:cpn { __fp_*_o:ww } { \__fp_mul_cases_o:NnNnww * @@ -13320,7 +13415,7 @@ \exp_after:wN #7 \__int_value:w \__fp_round_digit:Nw } -\cs_new_nopar:cpn { __fp_/_o:ww } +\cs_new:cpn { __fp_/_o:ww } { \__fp_mul_cases_o:NnNnww / @@ -13773,8 +13868,8 @@ \cs_new:Npn \__fp_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + \c_two ; } \cs_new:Npn \__fp_fixed_div_int_pack:Nw #1 #2; { + #1; {#2} } \cs_new:Npn \__fp_fixed_div_int_after:Nw #1 #2; { #1 {#2} } -\cs_new_nopar:Npn \__fp_fixed_add:wwn { \__fp_fixed_add:Nnnnnwnn + } -\cs_new_nopar:Npn \__fp_fixed_sub:wwn { \__fp_fixed_add:Nnnnnwnn - } +\cs_new:Npn \__fp_fixed_add:wwn { \__fp_fixed_add:Nnnnnwnn + } +\cs_new:Npn \__fp_fixed_sub:wwn { \__fp_fixed_add:Nnnnnwnn - } \cs_new:Npn \__fp_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6; #7#8 { \exp_after:wN \__fp_fixed_add_after:NNNNNwn @@ -15043,7 +15138,7 @@ {#1}#2{0000}{0000}; { \__fp_trigd_small:ww 2, } } -\cs_new_nopar:Npx \__fp_trig_inverse_two_pi: +\cs_new:Npx \__fp_trig_inverse_two_pi: { \exp_not:n { \exp_after:wN \use_none:n \token_to_str:N } \cs:w , , ! @@ -15267,7 +15362,7 @@ \exp_after:wN + \fi: } -\cs_new_nopar:Npn \__fp_trig_large_auxix:Nw +\cs_new:Npn \__fp_trig_large_auxix:Nw { \exp_after:wN \__fp_use_i_until_s:nw \exp_after:wN \__fp_trig_large_auxxi:w @@ -15389,12 +15484,12 @@ } #1 } -\cs_new_nopar:Npn \__fp_atan_o:Nw +\cs_new:Npn \__fp_atan_o:Nw { \__fp_atan_dispatch_o:NNnNw \__fp_acotii_o:Nww \__fp_atanii_o:Nww { atan } } -\cs_new_nopar:Npn \__fp_acot_o:Nw +\cs_new:Npn \__fp_acot_o:Nw { \__fp_atan_dispatch_o:NNnNw \__fp_atanii_o:Nww \__fp_acotii_o:Nww { acot } @@ -15411,7 +15506,7 @@ { kernel } { fp-num-args } { #3() } { 1 } { 2 } \exp_after:wN \c_nan_fp \exp:w \fi: - \exp_after:wN \c_zero + \exp_after:wN \exp_end: } \cs_new:Npn \__fp_atanii_o:Nww #1 \s__fp \__fp_chk:w #2#3#4; \s__fp \__fp_chk:w #5 @@ -15705,7 +15800,7 @@ \cs_new:Npn \fp_to_scientific:N #1 { \exp_after:wN \__fp_to_scientific_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_scientific:N { c } -\cs_new_nopar:Npn \fp_to_scientific:n +\cs_new:Npn \fp_to_scientific:n { \exp_after:wN \__fp_to_scientific_dispatch:w \exp:w \exp_end_continue_f:w \__fp_parse:n @@ -15754,7 +15849,7 @@ \cs_new:Npn \fp_to_decimal:N #1 { \exp_after:wN \__fp_to_decimal_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_decimal:N { c } -\cs_new_nopar:Npn \fp_to_decimal:n +\cs_new:Npn \fp_to_decimal:n { \exp_after:wN \__fp_to_decimal_dispatch:w \exp:w \exp_end_continue_f:w \__fp_parse:n @@ -15822,7 +15917,7 @@ \cs_new:Npn \__fp_to_decimal_huge:wnnnn #1; #2#3#4#5 { #2#3#4#5 #1 } \cs_new:Npn \fp_to_tl:N #1 { \exp_after:wN \__fp_to_tl_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_tl:N { c } -\cs_new_nopar:Npn \fp_to_tl:n +\cs_new:Npn \fp_to_tl:n { \exp_after:wN \__fp_to_tl_dispatch:w \exp:w \exp_end_continue_f:w \__fp_parse:n @@ -15859,7 +15954,7 @@ { \fp_to_decimal:n {#1} pt } \cs_new:Npn \fp_to_int:N #1 { \exp_after:wN \__fp_to_int_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_int:N { c } -\cs_new_nopar:Npn \fp_to_int:n +\cs_new:Npn \fp_to_int:n { \exp_after:wN \__fp_to_int_dispatch:w \exp:w \exp_end_continue_f:w \__fp_parse:n @@ -15939,7 +16034,7 @@ \exp_not:N \__fp_array_to_clist_loop:Nw } %% -%% File: l3fp-assign.dtx Copyright (C) 2011-2015 The LaTeX3 project +%% File: l3fp-assign.dtx Copyright (C) 2011-2016 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 @@ -15998,10 +16093,10 @@ { \fp_if_exist:NTF #1 { \fp_gzero:N #1 } { \fp_new:N #1 } } \cs_generate_variant:Nn \fp_zero_new:N { c } \cs_generate_variant:Nn \fp_gzero_new:N { c } -\cs_new_protected_nopar:Npn \fp_add:Nn { \__fp_add:NNNn \fp_set:Nn + } -\cs_new_protected_nopar:Npn \fp_gadd:Nn { \__fp_add:NNNn \fp_gset:Nn + } -\cs_new_protected_nopar:Npn \fp_sub:Nn { \__fp_add:NNNn \fp_set:Nn - } -\cs_new_protected_nopar:Npn \fp_gsub:Nn { \__fp_add:NNNn \fp_gset:Nn - } +\cs_new_protected:Npn \fp_add:Nn { \__fp_add:NNNn \fp_set:Nn + } +\cs_new_protected:Npn \fp_gadd:Nn { \__fp_add:NNNn \fp_gset:Nn + } +\cs_new_protected:Npn \fp_sub:Nn { \__fp_add:NNNn \fp_set:Nn - } +\cs_new_protected:Npn \fp_gsub:Nn { \__fp_add:NNNn \fp_gset:Nn - } \cs_new_protected:Npn \__fp_add:NNNn #1#2#3#4 { #1 #3 { #3 #2 \__fp_parse:n {#4} } } \cs_generate_variant:Nn \fp_add:Nn { c } @@ -16013,7 +16108,7 @@ \__msg_show_variable:NNNnn #1 \fp_if_exist:NTF ? { } { > ~ \token_to_str:N #1 = \fp_to_tl:N #1 } } -\cs_new_protected_nopar:Npn \fp_show:n +\cs_new_protected:Npn \fp_show:n { \__msg_show_wrap:Nn \fp_to_tl:n } \cs_generate_variant:Nn \fp_show:N { c } \fp_const:Nn \c_e_fp { 2.718 2818 2845 9045 } @@ -16024,7 +16119,7 @@ \fp_new:N \l_tmpb_fp \fp_new:N \g_tmpa_fp \fp_new:N \g_tmpb_fp -%% File: l3box.dtx Copyright (C) 2005-2015 The LaTeX3 Project +%% File: l3box.dtx Copyright (C) 2005-2016 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 @@ -16056,7 +16151,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3box.dtx 5822 2015-08-09 16:41:04Z joseph $ +\GetIdInfo$Id: l3box.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Experimental boxes} \cs_new_protected:Npn \box_new:N #1 { @@ -16154,7 +16249,7 @@ \cs_new_protected:Npn \box_show:N #1 { \box_show:Nnn #1 \c_max_int \c_max_int } \cs_generate_variant:Nn \box_show:N { c } -\cs_new_protected_nopar:Npn \box_show:Nnn +\cs_new_protected:Npn \box_show:Nnn { \__box_show:NNnn \c_one } \cs_generate_variant:Nn \box_show:Nnn { c } \cs_new_protected:Npn \box_log:N #1 @@ -16295,7 +16390,7 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3coffins.dtx 6508 2016-05-17 17:00:42Z joseph $ +\GetIdInfo$Id: l3coffins.dtx 6685 2016-08-19 16:26:52Z bruno $ {L3 Coffin code layer} \box_new:N \l__coffin_internal_box \dim_new:N \l__coffin_internal_dim @@ -16426,7 +16521,7 @@ \__coffin_if_exist:NT #1 { \hbox_set:Nw #1 \color_group_begin: \color_ensure_current: - \cs_set_protected_nopar:Npn \hcoffin_set_end: + \cs_set_protected:Npn \hcoffin_set_end: { \color_group_end: \hbox_set_end: @@ -16436,7 +16531,7 @@ } } } -\cs_new_protected_nopar:Npn \hcoffin_set_end: { } +\cs_new_protected:Npn \hcoffin_set_end: { } \cs_generate_variant:Nn \hcoffin_set:Nw { c } \cs_new_protected:Npn \vcoffin_set:Nnw #1#2 { @@ -16469,7 +16564,7 @@ } } } -\cs_new_protected_nopar:Npn \vcoffin_set_end: { } +\cs_new_protected:Npn \vcoffin_set_end: { } \cs_generate_variant:Nn \vcoffin_set:Nnw { c } \cs_new_protected:Npn \coffin_set_eq:NN #1#2 { @@ -17099,7 +17194,7 @@ > ~ wd~=~#4 \\ Poles~of~coffin~#1 : } -%% File: l3color.dtx Copyright(C) 2011,2012,2014 The LaTeX3 Project +%% File: l3color.dtx Copyright(C) 2011,2012,2014,2016 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 @@ -17132,26 +17227,26 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3color.dtx 5354 2014-08-23 01:35:39Z bruno $ +\GetIdInfo$Id: l3color.dtx 6596 2016-06-13 21:29:58Z joseph $ {L3 Experimental color support} \cs_new_eq:NN \color_group_begin: \group_begin: -\cs_new_protected_nopar:Npn \color_group_end: +\cs_new_protected:Npn \color_group_end: { \tex_par:D \group_end: } -\cs_new_protected_nopar:Npn \color_ensure_current: { } +\cs_new_protected:Npn \color_ensure_current: { } \AtBeginDocument { \cs_if_exist:NTF \__driver_color_ensure_current: { - \cs_set_protected_nopar:Npn \color_ensure_current: + \cs_set_protected:Npn \color_ensure_current: { \__driver_color_ensure_current: } } { \cs_if_exist:NT \set@color { - \cs_set_protected_nopar:Npn \color_ensure_current: + \cs_set_protected:Npn \color_ensure_current: { \set@color } } } @@ -17333,13 +17428,13 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3candidates.dtx 6484 2016-05-13 19:08:30Z joseph $ +\GetIdInfo$Id: l3candidates.dtx 6688 2016-08-19 19:21:48Z bruno $ {L3 Experimental additions to l3kernel} -\cs_new_protected_nopar:Npn \cs_log:N +\cs_new_protected:Npn \cs_log:N { \__msg_log_next: \cs_show:N } -\cs_new_protected_nopar:Npn \cs_log:c +\cs_new_protected:Npn \cs_log:c { \__msg_log_next: \cs_show:c } -\cs_new_protected_nopar:Npn \__kernel_register_log:N +\cs_new_protected:Npn \__kernel_register_log:N { \__msg_log_next: \__kernel_register_show:N } \cs_generate_variant:Nn \__kernel_register_log:N { c } \fp_new:N \l__box_angle_fp @@ -17729,9 +17824,9 @@ \box_set_eq:NN #1 \l__box_internal_box } \cs_generate_variant:Nn \box_viewport:Nnnnn { c } -\cs_new_protected_nopar:Npn \clist_log:N +\cs_new_protected:Npn \clist_log:N { \__msg_log_next: \clist_show:N } -\cs_new_protected_nopar:Npn \clist_log:n +\cs_new_protected:Npn \clist_log:n { \__msg_log_next: \clist_show:n } \cs_generate_variant:Nn \clist_log:N { c } \fp_new:N \l__coffin_sin_fp @@ -17852,7 +17947,7 @@ \dim_set:Nn \l__coffin_top_corner_dim { \dim_max:nn { \l__coffin_top_corner_dim } {#2} } } -\cs_new_protected_nopar:Npn \__coffin_find_bounding_shift: +\cs_new_protected:Npn \__coffin_find_bounding_shift: { \dim_set:Nn \l__coffin_bounding_shift_dim { \c_max_dim } \prop_map_inline:Nn \l__coffin_bounding_prop @@ -17963,7 +18058,7 @@ {#5} {#6} } } -\cs_new_protected_nopar:Npn \coffin_log_structure:N +\cs_new_protected:Npn \coffin_log_structure:N { \__msg_log_next: \coffin_show_structure:N } \cs_generate_variant:Nn \coffin_log_structure:N { c } \cs_new_protected:Npn \file_if_exist_input:n #1 @@ -17992,15 +18087,15 @@ \__file_input:V \l__file_internal_name_tl } } -\cs_new_nopar:Npn \ior_map_break: +\cs_new:Npn \ior_map_break: { \__prg_map_break:Nn \ior_map_break: { } } -\cs_new_nopar:Npn \ior_map_break:n +\cs_new:Npn \ior_map_break:n { \__prg_map_break:Nn \ior_map_break: } -\cs_new_protected_nopar:Npn \ior_map_inline:Nn +\cs_new_protected:Npn \ior_map_inline:Nn { \__ior_map_inline:NNn \ior_get:NN } -\cs_new_protected_nopar:Npn \ior_str_map_inline:Nn +\cs_new_protected:Npn \ior_str_map_inline:Nn { \__ior_map_inline:NNn \ior_get_str:NN } -\cs_new_protected_nopar:Npn \__ior_map_inline:NNn +\cs_new_protected:Npn \__ior_map_inline:NNn { \int_gincr:N \g__prg_map_int \exp_args:Nc \__ior_map_inline:NNNn @@ -18023,21 +18118,21 @@ } } \tl_new:N \l__ior_internal_tl -\cs_new_protected_nopar:Npn \ior_log_streams: +\cs_new_protected:Npn \ior_log_streams: { \__msg_log_next: \ior_list_streams: } -\cs_new_protected_nopar:Npn \iow_log_streams: +\cs_new_protected:Npn \iow_log_streams: { \__msg_log_next: \iow_list_streams: } -\cs_new_protected_nopar:Npn \fp_log:N +\cs_new_protected:Npn \fp_log:N { \__msg_log_next: \fp_show:N } -\cs_new_protected_nopar:Npn \fp_log:n +\cs_new_protected:Npn \fp_log:n { \__msg_log_next: \fp_show:n } \cs_generate_variant:Nn \fp_log:N { c } -\cs_new_protected_nopar:Npn \int_log:N +\cs_new_protected:Npn \int_log:N { \__msg_log_next: \int_show:N } \cs_generate_variant:Nn \int_log:N { c } -\cs_new_protected_nopar:Npn \int_log:n +\cs_new_protected:Npn \int_log:n { \__msg_log_next: \int_show:n } -\cs_new_protected_nopar:Npn \keys_log:nn +\cs_new_protected:Npn \keys_log:nn { \__msg_log_next: \keys_show:nn } \cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6 { @@ -18096,11 +18191,21 @@ { \prg_return_true: } { \bool_if:nTF {#2} { \prg_return_true: } { \prg_return_false: } } } -\cs_new_protected_nopar:Npn \bool_log:N +\cs_new_protected:Npn \bool_log:N { \__msg_log_next: \bool_show:N } -\cs_new_protected_nopar:Npn \bool_log:n +\cs_new_protected:Npn \bool_log:n { \__msg_log_next: \bool_show:n } \cs_generate_variant:Nn \bool_log:N { c } +\cs_new:Npn \prop_count:N #1 + { + \int_eval:n + { + \c_zero + \prop_map_function:NN #1 \__prop_count:nn + } + } +\cs_new:Npn \__prop_count:nn #1#2 { + \c_one } +\cs_generate_variant:Nn \prop_count:N { c } \cs_new:Npn \prop_map_tokens:Nn #1#2 { \exp_last_unbraced:Nno \__prop_map_tokens:nwwn {#2} #1 @@ -18116,7 +18221,7 @@ \__prop_map_tokens:nwwn {#1} } \cs_generate_variant:Nn \prop_map_tokens:Nn { c } -\cs_new_protected_nopar:Npn \prop_log:N +\cs_new_protected:Npn \prop_log:N { \__msg_log_next: \prop_show:N } \cs_generate_variant:Nn \prop_log:N { c } \cs_new:Npn \seq_mapthread_function:NNN #1#2#3 @@ -18142,9 +18247,9 @@ } \cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc } \cs_generate_variant:Nn \seq_mapthread_function:NNN { c , cc } -\cs_new_protected_nopar:Npn \seq_set_filter:NNn +\cs_new_protected:Npn \seq_set_filter:NNn { \__seq_set_filter:NNNn \tl_set:Nx } -\cs_new_protected_nopar:Npn \seq_gset_filter:NNn +\cs_new_protected:Npn \seq_gset_filter:NNn { \__seq_set_filter:NNNn \tl_gset:Nx } \cs_new_protected:Npn \__seq_set_filter:NNNn #1#2#3#4 { @@ -18152,9 +18257,9 @@ #1 #2 { #3 } \__seq_pop_item_def: } -\cs_new_protected_nopar:Npn \seq_set_map:NNn +\cs_new_protected:Npn \seq_set_map:NNn { \__seq_set_map:NNNn \tl_set:Nx } -\cs_new_protected_nopar:Npn \seq_gset_map:NNn +\cs_new_protected:Npn \seq_gset_map:NNn { \__seq_set_map:NNNn \tl_gset:Nx } \cs_new_protected:Npn \__seq_set_map:NNNn #1#2#3#4 { @@ -18162,7 +18267,7 @@ #1 #2 { #3 } \__seq_pop_item_def: } -\cs_new_protected_nopar:Npn \seq_log:N +\cs_new_protected:Npn \seq_log:N { \__msg_log_next: \seq_show:N } \cs_generate_variant:Nn \seq_log:N { c } \cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4 @@ -18180,15 +18285,15 @@ } \cs_new_eq:NN \dim_log:N \__kernel_register_log:N \cs_new_eq:NN \dim_log:c \__kernel_register_log:c -\cs_new_protected_nopar:Npn \dim_log:n +\cs_new_protected:Npn \dim_log:n { \__msg_log_next: \dim_show:n } \cs_new_eq:NN \skip_log:N \__kernel_register_log:N \cs_new_eq:NN \skip_log:c \__kernel_register_log:c -\cs_new_protected_nopar:Npn \skip_log:n +\cs_new_protected:Npn \skip_log:n { \__msg_log_next: \skip_show:n } \cs_new_eq:NN \muskip_log:N \__kernel_register_log:N \cs_new_eq:NN \muskip_log:c \__kernel_register_log:c -\cs_new_protected_nopar:Npn \muskip_log:n +\cs_new_protected:Npn \muskip_log:n { \__msg_log_next: \muskip_show:n } \prg_new_conditional:Npnn \tl_if_single_token:n #1 { p , T , F , TF } { @@ -18240,9 +18345,9 @@ \cs_new:Npn \__tl_act_count_space:n #1 { 1 + } \cs_new:Npn \__tl_act_count_group:nn #1 #2 { 2 + \tl_count_tokens:n {#2} + } -\cs_new_protected_nopar:Npn \tl_set_from_file:Nnn +\cs_new_protected:Npn \tl_set_from_file:Nnn { \__tl_set_from_file:NNnn \tl_set:Nn } -\cs_new_protected_nopar:Npn \tl_gset_from_file:Nnn +\cs_new_protected:Npn \tl_gset_from_file:Nnn { \__tl_set_from_file:NNnn \tl_gset:Nn } \cs_generate_variant:Nn \tl_set_from_file:Nnn { c } \cs_generate_variant:Nn \tl_gset_from_file:Nnn { c } @@ -18265,9 +18370,9 @@ { \cs_set_protected:Npn \__tl_from_file_do:w #1 } { \c__tl_rescan_marker_tl } { \tl_set:No \l__tl_internal_a_tl {#1} } -\cs_new_protected_nopar:Npn \tl_set_from_file_x:Nnn +\cs_new_protected:Npn \tl_set_from_file_x:Nnn { \__tl_set_from_file_x:NNnn \tl_set:Nn } -\cs_new_protected_nopar:Npn \tl_gset_from_file_x:Nnn +\cs_new_protected:Npn \tl_gset_from_file_x:Nnn { \__tl_set_from_file_x:NNnn \tl_gset:Nn } \cs_generate_variant:Nn \tl_set_from_file_x:Nnn { c } \cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c } @@ -18285,12 +18390,12 @@ } } \cs_generate_variant:Nn \tl_if_head_eq_catcode:nNTF { o } -\cs_new_nopar:Npn \tl_lower_case:n { \__tl_change_case:nnn { lower } { } } -\cs_new_nopar:Npn \tl_upper_case:n { \__tl_change_case:nnn { upper } { } } -\cs_new_nopar:Npn \tl_mixed_case:n { \__tl_mixed_case:nn { } } -\cs_new_nopar:Npn \tl_lower_case:nn { \__tl_change_case:nnn { lower } } -\cs_new_nopar:Npn \tl_upper_case:nn { \__tl_change_case:nnn { upper } } -\cs_new_nopar:Npn \tl_mixed_case:nn { \__tl_mixed_case:nn } +\cs_new:Npn \tl_lower_case:n { \__tl_change_case:nnn { lower } { } } +\cs_new:Npn \tl_upper_case:n { \__tl_change_case:nnn { upper } { } } +\cs_new:Npn \tl_mixed_case:n { \__tl_mixed_case:nn { } } +\cs_new:Npn \tl_lower_case:nn { \__tl_change_case:nnn { lower } } +\cs_new:Npn \tl_upper_case:nn { \__tl_change_case:nnn { upper } } +\cs_new:Npn \tl_mixed_case:nn { \__tl_mixed_case:nn } \cs_new:Npn \__tl_change_case:nnn #1#2#3 { \etex_unexpanded:D \exp_after:wN @@ -18523,6 +18628,7 @@ } \cs_new:Npn \__tl_change_case_cs:N #1 { + \str_if_eq:nnTF {#1} { \protect } { \__tl_change_case_protect:wNN } \exp_after:wN \__tl_change_case_cs:NN \exp_after:wN #1 \l_tl_case_change_exclude_tl \q_recursion_tail \q_recursion_stop @@ -18546,6 +18652,8 @@ \__tl_change_case_output:nwn { #1 {#3} } #2 } +\cs_new:Npn \__tl_change_case_protect:wNN #1 \q_recursion_stop #2 #3 + { \__tl_change_case_output:nwn { \protect #3 } #2 } \cs_new:Npn \__tl_change_case_if_expandable:NTF #1 { \token_if_expandable:NTF #1 @@ -19260,15 +19368,15 @@ ` - } -\cs_new_protected_nopar:Npn \tl_log:N +\cs_new_protected:Npn \tl_log:N { \__msg_log_next: \tl_show:N } \cs_generate_variant:Nn \tl_log:N { c } -\cs_new_protected_nopar:Npn \tl_log:n +\cs_new_protected:Npn \tl_log:n { \__msg_log_next: \tl_show:n } \group_begin: \cs_set_protected:Npn \__peek_tmp:w #1 \q_stop { - \cs_new_protected_nopar:Npn \__peek_execute_branches_N_type: + \cs_new_protected:Npn \__peek_execute_branches_N_type: { \if_int_odd:w \if_catcode:w \exp_not:N \l_peek_token { \c_two \fi: @@ -19297,11 +19405,11 @@ { \__peek_true:w } { \tl_if_empty:nTF {#2} { \__peek_true:w } { \__peek_false:w } } } -\cs_new_protected_nopar:Npn \peek_N_type:TF +\cs_new_protected:Npn \peek_N_type:TF { \__peek_token_generic:NNTF \__peek_execute_branches_N_type: \scan_stop: } -\cs_new_protected_nopar:Npn \peek_N_type:T +\cs_new_protected:Npn \peek_N_type:T { \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: } -\cs_new_protected_nopar:Npn \peek_N_type:F +\cs_new_protected:Npn \peek_N_type:F { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: } %% File: l3luatex.dtx Copyright (C) 2010-2016 The LaTeX3 Project %% @@ -19335,7 +19443,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3luatex.dtx 6465 2016-03-26 16:15:09Z joseph $ +\GetIdInfo$Id: l3luatex.dtx 6679 2016-08-18 20:54:06Z bruno $ {L3 Experimental LuaTeX-specific functions} \cs_new:Npn \lua_now_x:n #1 { \luatex_directlua:D {#1} } \cs_new:Npn \lua_now:n #1 { \lua_now_x:n { \exp_not:n {#1} } } |