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 | 329 |
1 files changed, 132 insertions, 197 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 6a392563581..4eb591e374d 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{2015/09/27} -\def\ExplFileVersion{6111} +\def\ExplFileDate{2015/10/14} +\def\ExplFileVersion{6210} \begingroup \def\next{\endgroup} \expandafter\ifx\csname PackageError\endcsname\relax @@ -242,7 +242,7 @@ } } \endgroup -\GetIdInfo$Id: l3bootstrap.dtx 5983 2015-09-10 18:57:56Z joseph $ +\GetIdInfo$Id: l3bootstrap.dtx 6139 2015-09-30 14:02:38Z bruno $ {L3 Bootstrap code} \begingroup \expandafter\ifx\csname directlua\endcsname\relax @@ -417,6 +417,7 @@ \catcode 9 = 9\relax \catcode 32 = 9\relax \catcode 34 = 12\relax +\catcode 38 = 4\relax \catcode 58 = 11\relax \catcode 94 = 7\relax \catcode 95 = 11\relax @@ -489,7 +490,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3names.dtx 6108 2015-09-27 08:58:42Z joseph $ +\GetIdInfo$Id: l3names.dtx 6209 2015-10-10 19:51:42Z joseph $ {L3 Namespace for primitives} \let \tex_global:D \global \let \tex_let:D \let @@ -932,11 +933,9 @@ \__kernel_primitive:NN \pdfoutput \pdftex_pdfoutput:D \__kernel_primitive:NN \pdfpageattr \pdftex_pdfpageattr:D \__kernel_primitive:NN \pdfpagebox \pdftex_pdfpagebox:D - \__kernel_primitive:NN \pdfpageheight \pdftex_pdfpageheight:D \__kernel_primitive:NN \pdfpageref \pdftex_pdfpageref:D \__kernel_primitive:NN \pdfpageresources \pdftex_pdfpageresources:D \__kernel_primitive:NN \pdfpagesattr \pdftex_pdfpagesattr:D - \__kernel_primitive:NN \pdfpagewidth \pdftex_pdfpagewidth:D \__kernel_primitive:NN \pdfrefobj \pdftex_pdfrefobj:D \__kernel_primitive:NN \pdfrefxform \pdftex_pdfrefxform:D \__kernel_primitive:NN \pdfrefximage \pdftex_pdfrefximage:D @@ -957,6 +956,8 @@ \__kernel_primitive:NN \pdfxformresources \pdftex_pdfxformresources:D \__kernel_primitive:NN \pdfximage \pdftex_pdfximage:D \__kernel_primitive:NN \pdfximagebbox \pdftex_pdfximagebbox:D + \__kernel_primitive:NN \ifpdfabsdim \pdftex_ifabsdim:D + \__kernel_primitive:NN \ifpdfabsnum \pdftex_ifabsnum:D \__kernel_primitive:NN \ifpdfprimitive \pdftex_ifprimitive:D \__kernel_primitive:NN \pdfadjustspacing \pdftex_adjustspacing:D \__kernel_primitive:NN \pdfcopyfont \pdftex_copyfont:D @@ -975,6 +976,8 @@ \__kernel_primitive:NN \pdfmapline \pdftex_mapline:D \__kernel_primitive:NN \pdfnoligatures \pdftex_noligatures:D \__kernel_primitive:NN \pdfnormaldeviate \pdftex_normaldeviate:D + \__kernel_primitive:NN \pdfpageheight \pdftex_pageheight:D + \__kernel_primitive:NN \pdfpagewidth \pdftex_pagewidth:D \__kernel_primitive:NN \pdfpkmode \pdftex_pkmode:D \__kernel_primitive:NN \pdfpkresolution \pdftex_pkresolution:D \__kernel_primitive:NN \pdfprimitive \pdftex_primitive:D @@ -1064,6 +1067,7 @@ \__kernel_primitive:NN \expanded \luatex_expanded:D \__kernel_primitive:NN \fontid \luatex_fontid:D \__kernel_primitive:NN \formatname \luatex_formatname:D + \__kernel_primitive:NN \hyphenationmin \luatex_hypenationmin:D \__kernel_primitive:NN \gleaders \luatex_gleaders:D \__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D \__kernel_primitive:NN \latelua \luatex_latelua:D @@ -1289,7 +1293,7 @@ \tex_let:D \tex_italiccorrection:D \@@italiccorr \tex_let:D \tex_underline:D \@@underline \tex_fi:D -\etex_ifdefined:D \luatexcatcodetable +\etex_ifdefined:D \luatexsuppressfontnotfounderror \tex_let:D \luatex_alignmark:D \luatexalignmark \tex_let:D \luatex_aligntab:D \luatexaligntab \tex_let:D \luatex_attribute:D \luatexattribute @@ -1328,10 +1332,6 @@ \tex_let:D \xetex_suppressfontnotfounderror:D \luatexsuppressfontnotfounderror \tex_let:D \luatex_bodydir:D \luatexbodydir \tex_let:D \luatex_boxdir:D \luatexboxdir - \tex_let:D \luatex_chardp:D \luatexchardp - \tex_let:D \luatex_charht:D \luatexcharht - \tex_let:D \luatex_charit:D \luatexcharit - \tex_let:D \luatex_charwd:D \luatexcharwd \tex_let:D \luatex_leftghost:D \luatexleftghost \tex_let:D \luatex_localbrokenpenalty:D \luatexlocalbrokenpenalty \tex_let:D \luatex_localinterlinepenalty:D \luatexlocalinterlinepenalty @@ -1374,9 +1374,20 @@ \tex_let:D \utex_mathcodenum:D \XeTeXmathcodenum \tex_fi:D \etex_ifdefined:D \luatex_luatexversion:D - \tex_let:D \pdftex_pdftexbanner:D \tex_undefined:D - \tex_let:D \pdftex_pdftexbanner:D \tex_undefined:D - \tex_let:D \pdftex_pdftexversion:D \tex_undefined:D + \tex_let:D \pdftex_pdftexbanner:D \tex_undefined:D + \tex_let:D \pdftex_pdftexrevision:D \tex_undefined:D + \tex_let:D \pdftex_pdftexversion:D \tex_undefined:D +\tex_fi:D +\etex_ifdefined:D \lastxpos + \tex_let:D \pdftex_lastxpos:D \lastxpos + \tex_let:D \pdftex_lastypos:D \lastypos + \tex_let:D \pdftex_normaldeviate:D \normaldeviate + \tex_let:D \pdftex_pageheight:D \pageheight + \tex_let:D \pdftex_pagewith:D \pagewidth + \tex_let:D \pdftex_randomseed:D \randomseed + \tex_let:D \pdftex_setrandomseed:D \setrandomseed + \tex_let:D \pdftex_savepos:D \savepos + \tex_let:D \pdftex_uniformdeviate:D \uniformdeviate \tex_fi:D \etex_ifdefined:D \normalend \tex_let:D \tex_end:D \normalend @@ -2679,7 +2690,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3tl.dtx 6037 2015-09-23 12:41:15Z joseph $ +\GetIdInfo$Id: l3tl.dtx 6121 2015-09-29 20:31:06Z bruno $ {L3 Token lists} \cs_new_protected:Npn \tl_new:N #1 { @@ -3001,25 +3012,27 @@ \cs_new_protected:Npn \__tl_replace_auxii:nNNNnn #1#2#3#4#5#6 { \group_align_safe_begin: - \cs_set:Npn \__tl_replace_wrap:w ##1 #1 ##2 { \exp_not:o {##1} ##2 } + \cs_set:Npn \__tl_replace_wrap:w ##1 #1 ##2 + { \exp_not:o { \use_none:nn ##1 } ##2 } \cs_set:Npx \__tl_replace_next:w ##1 #5 { \exp_not:N \__tl_replace_wrap:w ##1 \exp_not:n { #1 } \exp_not:n { \exp_not:n {#6} } - \exp_not:n { #2 \prg_do_nothing: } + \exp_not:n { #2 { } { } } } #3 #4 { \exp_after:wN \__tl_replace_next:w - \exp_after:wN \prg_do_nothing: #4 + \exp_after:wN { \exp_after:wN } + \exp_after:wN { \exp_after:wN } + #4 #1 { \if_false: { \fi: } \exp_after:wN \use_none:n \exp_after:wN { \if_false: } \fi: } #5 - \q_recursion_stop } \group_align_safe_end: } @@ -5633,9 +5646,8 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3prg.dtx 5983 2015-09-10 18:57:56Z joseph $ +\GetIdInfo$Id: l3prg.dtx 6208 2015-10-09 20:01:54Z joseph $ {L3 Control structures} -%% \cs_new_eq:NN \if_bool:N \tex_ifodd:D \cs_new_eq:NN \if_predicate:w \tex_ifodd:D \cs_new_protected:Npn \bool_new:N #1 { \cs_new_eq:NN #1 \c_false_bool } @@ -5821,13 +5833,6 @@ { % ( \__bool_eval_skip_to_end_auxi:Nw #1#3 ) } -\cs_new:Npn \bool_not_p:n #1 { \bool_if_p:n { ! ( #1 ) } } -\cs_new:Npn \bool_xor_p:nn #1#2 - { - \int_compare:nNnTF { \bool_if_p:n {#1} } = { \bool_if_p:n {#2} } - \c_false_bool - \c_true_bool - } \cs_new:Npn \bool_while_do:Nn #1#2 { \bool_if:NT #1 { #2 \bool_while_do:Nn #1 {#2} } } \cs_new:Npn \bool_until_do:Nn #1#2 @@ -6531,7 +6536,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3token.dtx 6040 2015-09-23 12:41:32Z joseph $ +\GetIdInfo$Id: l3token.dtx 6114 2015-09-28 21:32:37Z bruno $ {L3 Experimental token manipulation} \group_begin: \tex_catcode:D `@ = \c_eleven @@ -6859,167 +6864,69 @@ \fi: } \group_begin: - \char_set_lccode:nn { `T } { `T } - \char_set_lccode:nn { `F } { `F } - \char_set_lccode:nn { `X } { `n } - \char_set_lccode:nn { `Y } { `t } - \char_set_lccode:nn { `Z } { `d } - \tl_map_inline:nn { A C E G H I K L M O P R S U X Y Z R " } - { \char_set_catcode:nn { `#1 } \c_twelve } -\tex_lowercase:D +\cs_set_protected:Npn \__token_tmp:w #1 { - \group_end: - \prg_new_conditional:Npnn \token_if_chardef:N #1 { p , T , F , TF } + \use:x { - \__str_if_eq_x_return:nn - { - \exp_after:wN \__token_if_chardef:w - \token_to_meaning:N #1 CHAR" \q_stop - } - { \token_to_str:N \char } + \cs_new:Npn \exp_not:c { __token_delimit_by_ #1 :w } + ####1 \tl_to_str:n {#1} ####2 \exp_not:N \q_stop + { ####1 \tl_to_str:n {#1} } } - \prg_new_conditional:Npnn \token_if_mathchardef:N #1 { p , T , F , TF } + } +\__token_tmp:w { char" } +\__token_tmp:w { count } +\__token_tmp:w { dimen } +\__token_tmp:w { macro } +\__token_tmp:w { muskip } +\__token_tmp:w { skip } +\__token_tmp:w { toks } +\group_end: +\group_begin: +\cs_set_protected:Npn \__token_tmp:w #1#2#3 + { + \use:x { - \__str_if_eq_x_return:nn + \prg_new_conditional:Npnn \exp_not:c { token_if_ #1 :N } ####1 + { p , T , F , TF } { - \exp_after:wN \__token_if_chardef:w - \token_to_meaning:N #1 CHAR" \q_stop - } - { \token_to_str:N \mathchar } - } - \cs_new:Npn \__token_if_chardef:w #1 CHAR" #2 \q_stop { #1 CHAR } - \prg_new_conditional:Npnn \token_if_dim_register:N #1 { p , T , F , TF } - { - \if_meaning:w \tex_dimen:D #1 - \prg_return_false: - \else: - \if_meaning:w \tex_dimendef:D #1 - \prg_return_false: - \else: - \__str_if_eq_x_return:nn - { - \exp_after:wN \__token_if_dim_register:w - \token_to_meaning:N #1 ZIMEX \q_stop - } - { \token_to_str:N \ } - \fi: - \fi: - } - \cs_new:Npn \__token_if_dim_register:w #1 ZIMEX #2 \q_stop { #1 ~ } - \prg_new_conditional:Npnn \token_if_int_register:N #1 { p , T , F , TF } - { - % \token_if_chardef:NTF #1 { \prg_return_true: } - % { - % \token_if_mathchardef:NTF #1 { \prg_return_true: } - % { - \if_meaning:w \tex_count:D #1 - \prg_return_false: - \else: - \if_meaning:w \tex_countdef:D #1 - \prg_return_false: - \else: - \__str_if_eq_x_return:nn + \cs_if_exist:cT { tex_ #2 :D } { - \exp_after:wN \__token_if_int_register:w - \token_to_meaning:N #1 COUXY \q_stop + \exp_not:N \if_meaning:w ####1 \exp_not:c { tex_ #2 :D } + \exp_not:N \prg_return_false: + \exp_not:N \else: + \exp_not:N \if_meaning:w ####1 \exp_not:c { tex_ #2 def:D } + \exp_not:N \prg_return_false: + \exp_not:N \else: } - { \token_to_str:N \ } - \fi: - \fi: - % } - % } - } - \cs_new:Npn \__token_if_int_register:w #1 COUXY #2 \q_stop { #1 ~ } - \prg_new_conditional:Npnn \token_if_muskip_register:N #1 - { p , T , F , TF } - { - \if_meaning:w \tex_muskip:D #1 - \prg_return_false: - \else: - \if_meaning:w \tex_muskipdef:D #1 - \prg_return_false: - \else: - \__str_if_eq_x_return:nn + \exp_not:N \__str_if_eq_x_return:nn { - \exp_after:wN \__token_if_muskip_register:w - \token_to_meaning:N #1 MUSKIP \q_stop + \exp_not:N \exp_after:wN + \exp_not:c { __token_delimit_by_ #2 :w } + \exp_not:N \token_to_meaning:N ####1 + ? \tl_to_str:n {#2} \exp_not:N \q_stop } - { \token_to_str:N \ } - \fi: - \fi: - } - \cs_new:Npn \__token_if_muskip_register:w #1 MUSKIP #2 \q_stop { #1 ~ } - \prg_new_conditional:Npnn \token_if_skip_register:N #1 - { p , T , F , TF } - { - \if_meaning:w \tex_skip:D #1 - \prg_return_false: - \else: - \if_meaning:w \tex_skipdef:D #1 - \prg_return_false: - \else: - \__str_if_eq_x_return:nn + { \exp_not:n {#3} } + \cs_if_exist:cT { tex_ #2 :D } { - \exp_after:wN \__token_if_skip_register:w - \token_to_meaning:N #1 SKIP \q_stop + \exp_not:N \fi: + \exp_not:N \fi: } - { \token_to_str:N \ } - \fi: - \fi: - } - \cs_new:Npn \__token_if_skip_register:w #1 SKIP #2 \q_stop { #1 ~ } - \prg_new_conditional:Npnn \token_if_toks_register:N #1 - { p , T , F , TF } - { - \if_meaning:w \tex_toks:D #1 - \prg_return_false: - \else: - \if_meaning:w \tex_toksdef:D #1 - \prg_return_false: - \else: - \__str_if_eq_x_return:nn - { - \exp_after:wN \__token_if_toks_register:w - \token_to_meaning:N #1 YOKS \q_stop - } - { \token_to_str:N \ } - \fi: - \fi: - } - \cs_new:Npn \__token_if_toks_register:w #1 YOKS #2 \q_stop { #1 ~ } - \prg_new_conditional:Npnn \token_if_protected_macro:N #1 - { p , T , F , TF } - { - \__str_if_eq_x_return:nn - { - \exp_after:wN \__token_if_protected_macro:w - \token_to_meaning:N #1 PROYECYEZ~MACRO \q_stop } - { \token_to_str:N \ } } - \cs_new:Npn \__token_if_protected_macro:w - #1 PROYECYEZ~MACRO #2 \q_stop { #1 ~ } - \prg_new_conditional:Npnn \token_if_long_macro:N #1 { p , T , F , TF } - { - \__str_if_eq_x_return:nn - { - \exp_after:wN \__token_if_long_macro:w - \token_to_meaning:N #1 LOXG~MACRO \q_stop - } - { \token_to_str:N \ } - } - \prg_new_conditional:Npnn \token_if_protected_long_macro:N #1 - { p , T , F , TF } - { - \__str_if_eq_x_return:nn - { - \exp_after:wN \__token_if_long_macro:w - \token_to_meaning:N #1 LOXG~MACRO \q_stop - } - { \token_to_str:N \protected \token_to_str:N \ } - } - \cs_new:Npn \__token_if_long_macro:w #1 LOXG~MACRO #2 \q_stop { #1 ~ } } +\__token_tmp:w { chardef } { char" } { \token_to_str:N \char" } +\__token_tmp:w { mathchardef } { char" } { \token_to_str:N \mathchar" } +\__token_tmp:w { long_macro } { macro } { \tl_to_str:n { \long } macro } +\__token_tmp:w { protected_macro } { macro } + { \tl_to_str:n { \protected } macro } +\__token_tmp:w { protected_long_macro } { macro } + { \token_to_str:N \protected \tl_to_str:n { \long } macro } +\__token_tmp:w { dim_register } { dimen } { \token_to_str:N \dimen } +\__token_tmp:w { int_register } { count } { \token_to_str:N \count } +\__token_tmp:w { muskip_register } { muskip } { \token_to_str:N \muskip } +\__token_tmp:w { skip_register } { skip } { \token_to_str:N \skip } +\__token_tmp:w { toks_register } { toks } { \token_to_str:N \toks } +\group_end: \tex_chardef:D \c__token_A_int = `A ~ % \use:x { @@ -7623,7 +7530,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3msg.dtx 6037 2015-09-23 12:41:15Z joseph $ +\GetIdInfo$Id: l3msg.dtx 6113 2015-09-28 21:30:11Z bruno $ {L3 Messages} \tl_new:N \l__msg_internal_tl \tl_const:Nn \c__msg_text_prefix_tl { msg~text~>~ } @@ -8279,28 +8186,25 @@ \tl_if_empty:nTF {#2} { open } { in~use: } } \group_begin: -\char_set_catcode_math_superscript:N \^ -\char_set_lccode:nn { `^ } { `\ } -\char_set_lccode:nn { `L } { `L } -\char_set_lccode:nn { `T } { `T } -\char_set_lccode:nn { `X } { `X } -\tex_lowercase:D +\cs_set_protected:Npn \__msg_tmp:w #1#2 { - \cs_new:Npx \__msg_expandable_error:n #1 + \group_end: + \cs_new:Npn \__msg_expandable_error:n ##1 { - \exp_not:n - { - \exp:w - \exp_after:wN \exp_after:wN - \exp_after:wN \__msg_expandable_error:w - \exp_after:wN \exp_after:wN - \exp_after:wN \exp_end: - } - \exp_not:N \use:n { \exp_not:c { LaTeX3~error: } ^ #1 } ^ + \exp:w + \exp_after:wN \exp_after:wN + \exp_after:wN \__msg_expandable_error:w + \exp_after:wN \exp_after:wN + \exp_after:wN \exp_end: + \use:n { #2 #1 ##1 } #1 } - \cs_new:Npn \__msg_expandable_error:w #1 ^ #2 ^ { #1 } + \cs_new:Npn \__msg_expandable_error:w ##1 #1 ##2 #1 {##1} } -\group_end: +\group_begin: +\char_set_catcode_math_superscript:N \^ +\char_set_lccode:nn { `^ } { `\ } +\tex_lowercase:D + { \group_end: \exp_args:NNc \__msg_tmp:w ^ } { LaTeX3~error: } \cs_new:Npn \__msg_kernel_expandable_error:nnnnnn #1#2#3#4#5#6 { \exp_args:Nf \__msg_expandable_error:n @@ -17023,8 +16927,9 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3candidates.dtx 6039 2015-09-23 12:41:26Z joseph $ +\GetIdInfo$Id: l3candidates.dtx 6208 2015-10-09 20:01:54Z joseph $ {L3 Experimental additions to l3kernel} + \cs_new_protected_nopar:Npn \cs_log:N { \__msg_log_next: \cs_show:N } \cs_new_protected_nopar:Npn \cs_log:c @@ -17755,6 +17660,35 @@ \exp_after:wN \use_none_delimit_by_q_stop:w \use:n { \::error ! ~ #2 : ~ #1 } \q_stop } +\cs_new:Npn \bool_all_p:n #1 + { \__bool_all_aux:n #1 \q_recursion_tail \q_recursion_stop } +\cs_new:Npn \__bool_all_aux:n #1 + { + \quark_if_recursion_tail_stop_do:nn {#1} { \c_true_bool } + \bool_if:nF {#1} + { \use_i_delimit_by_q_recursion_stop:nw { \c_false_bool } } + \__bool_all_aux:n + } +\cs_new:Npn \bool_and_p:nn #1#2 + { \bool_if:nTF {#1} { \bool_if_p:n {#2} } { \c_false_bool } } +\cs_new:Npn \bool_any_p:n #1 + { \__bool_any_aux:n #1 \q_recursion_tail \q_recursion_stop } +\cs_new:Npn \__bool_any_aux:n #1 + { + \quark_if_recursion_tail_stop_do:nn {#1} { \c_false_bool } + \bool_if:nT {#1} + { \use_i_delimit_by_q_recursion_stop:nw { \c_true_bool } } + \__bool_any_aux:n + } +\cs_new:Npn \bool_not_p:n #1 { \bool_if_p:n { ! ( #1 ) } } +\cs_new:Npn \bool_or_p:nn #1#2 + { \bool_if:nTF {#1} { \c_true_bool } { \bool_if_p:n {#2} } } +\cs_new:Npn \bool_xor_p:nn #1#2 + { + \int_compare:nNnTF { \bool_if_p:n {#1} } = { \bool_if_p:n {#2} } + \c_false_bool + \c_true_bool + } \cs_new_protected_nopar:Npn \bool_log:N { \__msg_log_next: \bool_show:N } \cs_new_protected_nopar:Npn \bool_log:n @@ -18960,7 +18894,8 @@ \char_set_lccode:nn { 32 } {#1} \exp_args:Nx \tex_lowercase:D { - \tl_const:cn { c__char_ \__int_to_roman:w #1 _tl } + \tl_const:Nn + \exp_not:c { c__char_ \__int_to_roman:w #1 _tl } { \exp_not:o \l__char_tmp_tl } } } |