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 | 1290 |
1 files changed, 875 insertions, 415 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 43ce6fd8e94..7261f07da3b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -10,6 +10,7 @@ %% l3basics.dtx (with options: `package') %% l3expan.dtx (with options: `package') %% l3tl.dtx (with options: `package') +%% l3str.dtx (with options: `package') %% l3seq.dtx (with options: `package') %% l3int.dtx (with options: `package') %% l3quark.dtx (with options: `package') @@ -79,8 +80,8 @@ %% ----------------------------------------------------------------------- \def\ExplFileName{expl3} \def\ExplFileDescription{L3 programming layer} -\def\ExplFileDate{2014/06/10} -\def\ExplFileVersion{5105} +\def\ExplFileDate{2014/07/20} +\def\ExplFileVersion{5241} \begingroup \def\next{\endgroup} \expandafter\ifx\csname PackageError\endcsname\relax @@ -938,7 +939,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3basics.dtx 5033 2014-06-04 05:32:44Z joseph $ +\GetIdInfo$Id: l3basics.dtx 5187 2014-07-09 12:02:17Z will $ {L3 Basic definitions} \tex_let:D \if_true: \tex_iftrue:D \tex_let:D \if_false: \tex_iffalse:D @@ -1689,106 +1690,6 @@ \cs_gset_eq:NN \pdftex_if_engine_p: \c_false_bool } \cs_new_nopar:Npn \prg_do_nothing: { } -\cs_new:Npn \__str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} } -\luatex_if_engine:T - { - \cs_set:Npn \__str_if_eq_x:nn #1#2 - { - \luatex_directlua:D - { - l3kernel.strcmp - ( - " \__str_escape_x:n {#1} " , - " \__str_escape_x:n {#2} " - ) - } - } - \cs_new:Npn \__str_escape_x:n #1 - { - \luatex_luaescapestring:D - { - \etex_detokenize:D \exp_after:wN { \luatex_expanded:D {#1} } - } - } - } -\prg_new_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF } - { - \if_int_compare:w \__str_if_eq_x:nn { \exp_not:n {#1} } { \exp_not:n {#2} } - = \c_zero - \prg_return_true: \else: \prg_return_false: \fi: - } -\prg_new_conditional:Npnn \str_if_eq_x:nn #1#2 { p , T , F , TF } - { - \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero - \prg_return_true: \else: \prg_return_false: \fi: - } -\cs_new:Npn \__str_if_eq_x_return:nn #1 #2 - { - \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_new:Npn \str_case:nn #1#2 - { - \tex_romannumeral:D - \__str_case:nnTF {#1} {#2} { } { } - } -\cs_new:Npn \str_case:nnT #1#2#3 - { - \tex_romannumeral:D - \__str_case:nnTF {#1} {#2} {#3} { } - } -\cs_new:Npn \str_case:nnF #1#2 - { - \tex_romannumeral:D - \__str_case:nnTF {#1} {#2} { } - } -\cs_new:Npn \str_case:nnTF #1#2 - { - \tex_romannumeral:D - \__str_case:nnTF {#1} {#2} - } -\cs_new:Npn \__str_case:nnTF #1#2#3#4 - { \__str_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } -\cs_new:Npn \__str_case:nw #1#2#3 - { - \str_if_eq:nnTF {#1} {#2} - { \__str_case_end:nw {#3} } - { \__str_case:nw {#1} } - } -\cs_new:Npn \str_case_x:nn #1#2 - { - \tex_romannumeral:D - \__str_case_x:nnTF {#1} {#2} { } { } - } -\cs_new:Npn \str_case_x:nnT #1#2#3 - { - \tex_romannumeral:D - \__str_case_x:nnTF {#1} {#2} {#3} { } - } -\cs_new:Npn \str_case_x:nnF #1#2 - { - \tex_romannumeral:D - \__str_case_x:nnTF {#1} {#2} { } - } -\cs_new:Npn \str_case_x:nnTF #1#2 - { - \tex_romannumeral:D - \__str_case_x:nnTF {#1} {#2} - } -\cs_new:Npn \__str_case_x:nnTF #1#2#3#4 - { \__str_case_x:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } -\cs_new:Npn \__str_case_x:nw #1#2#3 - { - \str_if_eq_x:nnTF {#1} {#2} - { \__str_case_end:nw {#3} } - { \__str_case_x:nw {#1} } - } -\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop - { \c_zero #1 #4 } -\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw \cs_new_eq:NN \__prg_break_point:Nn \use_ii:nn \cs_new:Npn \__prg_map_break:Nn #1#2#3 \__prg_break_point:Nn #4#5 { @@ -1801,8 +1702,6 @@ \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} -\cs_new_eq:NN \str_case:nnn \str_case:nnF -\cs_new_eq:NN \str_case_x:nnn \str_case_x:nnF %% File: l3expan.dtx Copyright (C) 1990-2014 The LaTeX3 project %% %% It may be distributed and/or modified under the conditions of the @@ -1835,7 +1734,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3expan.dtx 4712 2014-04-30 08:17:49Z joseph $ +\GetIdInfo$Id: l3expan.dtx 5146 2014-06-16 13:12:18Z joseph $ {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 } } @@ -2279,19 +2178,6 @@ \exp_after:wN \exp_not:N \cs:w :: #1 \cs_end: \__cs_generate_internal_variant_loop:n } -\cs_generate_variant:Nn \str_if_eq_p:nn { V , o } -\cs_generate_variant:Nn \str_if_eq_p:nn { nV , no , VV } -\cs_generate_variant:Nn \str_if_eq:nnT { V , o } -\cs_generate_variant:Nn \str_if_eq:nnT { nV , no , VV } -\cs_generate_variant:Nn \str_if_eq:nnF { V , o } -\cs_generate_variant:Nn \str_if_eq:nnF { nV , no , VV } -\cs_generate_variant:Nn \str_if_eq:nnTF { V , o } -\cs_generate_variant:Nn \str_if_eq:nnTF { nV , no , VV } -\cs_generate_variant:Nn \str_case:nn { o } -\cs_generate_variant:Nn \str_case:nnT { o } -\cs_generate_variant:Nn \str_case:nnF { o } -\cs_generate_variant:Nn \str_case:nnTF { o } -\cs_new_eq:NN \str_case:onn \str_case:onF %% File: l3tl.dtx Copyright (C) 1990-2014 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the @@ -2324,7 +2210,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3tl.dtx 5070 2014-06-06 18:00:24Z bruno $ +\GetIdInfo$Id: l3tl.dtx 5214 2014-07-17 08:39:43Z joseph $ {L3 Token lists} \cs_new_protected:Npn \tl_new:N #1 { @@ -2510,7 +2396,7 @@ \exp_args:No \etex_everyeof:D { \c__tl_rescan_marker_tl \exp_not:N } \tex_endlinechar:D \c_minus_one \tex_newlinechar:D \c_minus_one - #3 + #3 \scan_stop: \use:x { \group_end: @@ -2731,6 +2617,8 @@ \cs_generate_variant:Nn \tl_case:NnT { c } \cs_generate_variant:Nn \tl_case:NnF { c } \cs_generate_variant:Nn \tl_case:NnTF { c } +\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop + { \c_zero #1 #4 } \cs_new_eq:NN \__tl_case_end:nw \__prg_case_end:nw \cs_new:Npn \tl_map_function:nN #1#2 { @@ -2940,8 +2828,8 @@ \if_false: { \fi: \__tl_head_auxi:nw #1 { } \q_stop } } \cs_new:Npn \__tl_head_auxi:nw #1#2 \q_stop - { \exp_after:wN \__tl_head_auxii:nw \exp_after:wN { \if_false: } \fi: {#1} } -\cs_new:Npn \__tl_head_auxii:nw #1 + { \exp_after:wN \__tl_head_auxii:n \exp_after:wN { \if_false: } \fi: {#1} } +\cs_new:Npn \__tl_head_auxii:n #1 { \exp_after:wN \if_meaning:w \exp_after:wN \q_nil \tl_to_str:n \exp_after:wN { \use_none:n #1 } \q_nil @@ -2964,21 +2852,6 @@ } \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 \str_head:n #1 - { - \exp_after:wN \__str_head:w - \tl_to_str:n {#1} - { { } } ~ \q_stop - } -\cs_new:Npn \__str_head:w #1 ~ % - { \tl_head:w #1 { ~ } } -\cs_new:Npn \str_tail:n #1 - { - \exp_after:wN \__str_tail:w - \reverse_if:N \if_charcode:w - \scan_stop: \tl_to_str:n {#1} X X \q_stop - } -\cs_new:Npn \__str_tail:w #1 X #2 \q_stop { \fi: #1 } \prg_new_conditional:Npnn \tl_if_head_eq_charcode:nN #1#2 { p , T , F , TF } { \if_charcode:w @@ -3085,6 +2958,30 @@ { \exp_after:wN \c_zero \exp_after:wN \prg_return_false: } \exp_after:wN \use_none:n \exp_after:wN { \if_false: } \fi: } +\cs_new:Npn \tl_item:nn #1#2 + { + \exp_args:Nf \__tl_item:nn + { + \int_eval:n + { + \int_compare:nNnT {#2} < \c_zero + { \tl_count:n {#1} + \c_one + } + #2 + } + } + #1 + \q_recursion_tail + \__prg_break_point: + } +\cs_new:Npn \__tl_item:nn #1#2 + { + \__quark_if_recursion_tail_break:nN {#2} \__prg_break: + \int_compare:nNnTF {#1} = \c_one + { \__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_generate_variant:Nn \tl_item:Nn { c } \cs_new_protected:Npn \tl_show:N #1 { \tl_if_exist:NTF #1 @@ -3103,6 +3000,194 @@ \tl_new:N \l_tmpb_tl \cs_new_eq:NN \tl_case:Nnn \tl_case:NnF \cs_new_eq:NN \tl_case:cnn \tl_case:cnF +%% File: l3str.dtx Copyright (C) 2014 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 +%% license or (at your option) any later version. The latest version +%% of this license is in the file +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This file is part of the "l3kernel bundle" (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% The released version of this bundle is available from CTAN. +%% +%% ----------------------------------------------------------------------- +%% +%% The development version of the bundle can be found at +%% +%% http://www.latex-project.org/svnroot/experimental/trunk/ +%% +%% for those people who are interested. +%% +%%%%%%%%%%% +%% NOTE: %% +%%%%%%%%%%% +%% +%% Snapshots taken from the repository represent work in progress and may +%% not work or may contain conflicting material! We therefore ask +%% people _not_ to put them into distributions, archives, etc. without +%% prior consultation with the LaTeX3 Project. +%% +%% ----------------------------------------------------------------------- +\GetIdInfo$Id: l3str.dtx 5158 2014-06-19 08:05:56Z joseph $ + {L3 Strings} +\cs_new:Npn \str_head:n #1 + { + \exp_after:wN \__str_head:w + \tl_to_str:n {#1} + { { } } ~ \q_stop + } +\cs_new:Npn \__str_head:w #1 ~ % + { \tl_head:w #1 { ~ } } +\cs_new:Npn \str_tail:n #1 + { + \exp_after:wN \__str_tail:w + \reverse_if:N \if_charcode:w + \scan_stop: \tl_to_str:n {#1} X X \q_stop + } +\cs_new:Npn \__str_tail:w #1 X #2 \q_stop { \fi: #1 } +\cs_new:Npn \__str_if_eq_x:nn #1#2 { \pdftex_strcmp:D {#1} {#2} } +\luatex_if_engine:T + { + \cs_set:Npn \__str_if_eq_x:nn #1#2 + { + \luatex_directlua:D + { + l3kernel.strcmp + ( + " \__str_escape_x:n {#1} " , + " \__str_escape_x:n {#2} " + ) + } + } + \cs_new:Npn \__str_escape_x:n #1 + { + \luatex_luaescapestring:D + { + \etex_detokenize:D \exp_after:wN { \luatex_expanded:D {#1} } + } + } + } +\cs_new:Npn \__str_if_eq_x_return:nn #1 #2 + { + \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\prg_new_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF } + { + \if_int_compare:w \__str_if_eq_x:nn { \exp_not:n {#1} } { \exp_not:n {#2} } + = \c_zero + \prg_return_true: \else: \prg_return_false: \fi: + } +\cs_generate_variant:Nn \str_if_eq_p:nn { V , o } +\cs_generate_variant:Nn \str_if_eq_p:nn { nV , no , VV } +\cs_generate_variant:Nn \str_if_eq:nnT { V , o } +\cs_generate_variant:Nn \str_if_eq:nnT { nV , no , VV } +\cs_generate_variant:Nn \str_if_eq:nnF { V , o } +\cs_generate_variant:Nn \str_if_eq:nnF { nV , no , VV } +\cs_generate_variant:Nn \str_if_eq:nnTF { V , o } +\cs_generate_variant:Nn \str_if_eq:nnTF { nV , no , VV } +\prg_new_conditional:Npnn \str_if_eq_x:nn #1#2 { p , T , F , TF } + { + \if_int_compare:w \__str_if_eq_x:nn {#1} {#2} = \c_zero + \prg_return_true: \else: \prg_return_false: \fi: + } +\cs_new:Npn \str_case:nn #1#2 + { + \tex_romannumeral:D + \__str_case:nnTF {#1} {#2} { } { } + } +\cs_new:Npn \str_case:nnT #1#2#3 + { + \tex_romannumeral:D + \__str_case:nnTF {#1} {#2} {#3} { } + } +\cs_new:Npn \str_case:nnF #1#2 + { + \tex_romannumeral:D + \__str_case:nnTF {#1} {#2} { } + } +\cs_new:Npn \str_case:nnTF #1#2 + { + \tex_romannumeral:D + \__str_case:nnTF {#1} {#2} + } +\cs_new:Npn \__str_case:nnTF #1#2#3#4 + { \__str_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } +\cs_generate_variant:Nn \str_case:nn { o } +\cs_generate_variant:Nn \str_case:nnT { o } +\cs_generate_variant:Nn \str_case:nnF { o } +\cs_generate_variant:Nn \str_case:nnTF { o } +\cs_new:Npn \__str_case:nw #1#2#3 + { + \str_if_eq:nnTF {#1} {#2} + { \__str_case_end:nw {#3} } + { \__str_case:nw {#1} } + } +\cs_new:Npn \str_case_x:nn #1#2 + { + \tex_romannumeral:D + \__str_case_x:nnTF {#1} {#2} { } { } + } +\cs_new:Npn \str_case_x:nnT #1#2#3 + { + \tex_romannumeral:D + \__str_case_x:nnTF {#1} {#2} {#3} { } + } +\cs_new:Npn \str_case_x:nnF #1#2 + { + \tex_romannumeral:D + \__str_case_x:nnTF {#1} {#2} { } + } +\cs_new:Npn \str_case_x:nnTF #1#2 + { + \tex_romannumeral:D + \__str_case_x:nnTF {#1} {#2} + } +\cs_new:Npn \__str_case_x:nnTF #1#2#3#4 + { \__str_case_x:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } +\cs_new:Npn \__str_case_x:nw #1#2#3 + { + \str_if_eq_x:nnTF {#1} {#2} + { \__str_case_end:nw {#3} } + { \__str_case_x:nw {#1} } + } +\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw +\cs_new:Npn \str_fold_case:n #1 + { + \exp_after:wN \__str_fold_auxi:w \tl_to_str:n {#1} + { ~ \c_empty_tl } \__str_fold_end:w ? ~ + } +\cs_new:Npn \__str_fold_auxi:w #1 ~ + { + \__str_fold_auxii:N #1 { ~ \c_space_tl } + \__str_fold_auxi:w + } +\cs_new:Npn \__str_fold_auxii:N #1 + { + \exp_after:wN \__str_fold_auxiii:NNNNNNNN + \int_use:N \__int_eval:w 1000000 + `#1 \__int_eval_end: #1 + } +\cs_new:Npn \__str_fold_auxiii:NNNNNNNN #1#2#3#4#5#6#7#8 + { + \exp_args:NNv \str_case_x:nnF #8 + { c__str_fold_ #6 _ #7 _tl } + { + #8 + \exp_after:wN \use_none:n #8 + } + \__str_fold_auxii:N + } +\cs_new:Npn \__str_fold_end:w ? #1 \__str_fold_auxi:w { } +\cs_new_eq:NN \str_case:nnn \str_case:nnF +\cs_new_eq:NN \str_case:onn \str_case:onF +\cs_new_eq:NN \str_case_x:nnn \str_case_x:nnF %% File: l3seq.dtx Copyright (C) 1990-2014 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the @@ -3135,7 +3220,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3seq.dtx 4712 2014-04-30 08:17:49Z joseph $ +\GetIdInfo$Id: l3seq.dtx 5232 2014-07-18 19:32:54Z joseph $ {L3 Sequences and stacks} \cs_new:Npn \__seq_item:n { @@ -3172,6 +3257,32 @@ \cs_new_eq:NN \seq_gset_eq:Nc \tl_gset_eq:Nc \cs_new_eq:NN \seq_gset_eq:cN \tl_gset_eq:cN \cs_new_eq:NN \seq_gset_eq:cc \tl_gset_eq:cc +\cs_new_protected:Npn \seq_set_from_clist:NN #1#2 + { + \tl_set:Nx #1 + { \s__seq \clist_map_function:NN #2 \__seq_wrap_item:n } + } +\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2 + { + \tl_set:Nx #1 + { \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n } + } +\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2 + { + \tl_gset:Nx #1 + { \s__seq \clist_map_function:NN #2 \__seq_wrap_item:n } + } +\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2 + { + \tl_gset:Nx #1 + { \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n } + } +\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc } +\cs_generate_variant:Nn \seq_set_from_clist:NN { c , cc } +\cs_generate_variant:Nn \seq_set_from_clist:Nn { c } +\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 { \__seq_set_split:NNnn \tl_set:Nx } \cs_new_protected_nopar:Npn \seq_gset_split:Nnn @@ -3290,6 +3401,24 @@ } \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 + { \__seq_reverse:NN \tl_set:Nx } +\cs_new_protected_nopar:Npn \seq_greverse:N + { \__seq_reverse:NN \tl_gset:Nx } +\cs_new_protected:Npn \__seq_reverse:NN #1 #2 + { + \cs_set_eq:NN \__seq_tmp:w \__seq_item:n + \cs_set_eq:NN \__seq_item:n \__seq_reverse_item:nwn + #1 #2 { #2 \exp_not:n { } } + \cs_set_eq:NN \__seq_item:n \__seq_tmp:w + } +\cs_new:Npn \__seq_reverse_item:nwn #1 #2 \exp_not:n #3 + { + #2 + \exp_not:n { \__seq_item:n {#1} #3 } + } +\cs_generate_variant:Nn \seq_reverse:N { c } +\cs_generate_variant:Nn \seq_greverse:N { c } \prg_new_conditional:Npnn \seq_if_empty:N #1 { p , T , F , TF } { \if_meaning:w #1 \c_empty_seq @@ -3442,6 +3571,31 @@ \cs_generate_variant:Nn \seq_gpop_right:NNT { c } \cs_generate_variant:Nn \seq_gpop_right:NNF { c } \cs_generate_variant:Nn \seq_gpop_right:NNTF { c } +\cs_new:Npn \seq_item:Nn #1 + { \exp_after:wN \__seq_item:wNn #1 \q_stop #1 } +\cs_new:Npn \__seq_item:wNn \s__seq #1 \q_stop #2#3 + { + \exp_args:Nf \__seq_item:nnn + { + \int_eval:n + { + \int_compare:nNnT {#3} < \c_zero + { \seq_count:N #2 + \c_one + } + #3 + } + } + #1 + { ? \__prg_break: } { } + \__prg_break_point: + } +\cs_new:Npn \__seq_item:nnn #1#2#3 + { + \use_none:n #2 + \int_compare:nNnTF {#1} = \c_one + { \__prg_break:n { \exp_not:n {#3} } } + { \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: { \__prg_map_break:Nn \seq_map_break: { } } \cs_new_nopar:Npn \seq_map_break:n @@ -3621,7 +3775,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3int.dtx 4966 2014-05-31 00:44:34Z bruno $ +\GetIdInfo$Id: l3int.dtx 5197 2014-07-11 06:42:47Z joseph $ {L3 Integers} \cs_new_eq:NN \__int_value:w \tex_number:D \cs_new_eq:NN \__int_eval:w \etex_numexpr:D @@ -4988,13 +5142,16 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3clist.dtx 4728 2014-05-04 13:25:37Z joseph $ +\GetIdInfo$Id: l3clist.dtx 5237 2014-07-19 15:09:54Z bruno $ {L3 Comma separated lists} \cs_new_eq:NN \c_empty_clist \c_empty_tl \tl_new:N \l__clist_internal_clist \cs_new_protected:Npn \__clist_tmp:w { } \cs_new_eq:NN \clist_new:N \tl_new:N \cs_new_eq:NN \clist_new:c \tl_new:c +\cs_new_protected:Npn \clist_const:Nn #1#2 + { \tl_const:Nx #1 { \__clist_trim_spaces:n {#2} } } +\cs_generate_variant:Nn \clist_const:Nn { c , Nx , cx } \cs_new_eq:NN \clist_clear:N \tl_clear:N \cs_new_eq:NN \clist_clear:c \tl_clear:c \cs_new_eq:NN \clist_gclear:N \tl_gclear:N @@ -5011,6 +5168,34 @@ \cs_new_eq:NN \clist_gset_eq:Nc \tl_gset_eq:Nc \cs_new_eq:NN \clist_gset_eq:cN \tl_gset_eq:cN \cs_new_eq:NN \clist_gset_eq:cc \tl_gset_eq:cc +\cs_new_protected:Npn \clist_set_from_seq:NN + { \__clist_set_from_seq:NNNN \clist_clear:N \tl_set:Nx } +\cs_new_protected:Npn \clist_gset_from_seq:NN + { \__clist_set_from_seq:NNNN \clist_gclear:N \tl_gset:Nx } +\cs_new_protected:Npn \__clist_set_from_seq:NNNN #1#2#3#4 + { + \seq_if_empty:NTF #4 + { #1 #3 } + { + #2 #3 + { + \exp_last_unbraced:Nf \use_none:n + { \seq_map_function:NN #4 \__clist_wrap_item:n } + } + } + } +\cs_new:Npn \__clist_wrap_item:n #1 + { + , + \tl_if_empty:oTF { \__clist_set_from_seq:w #1 ~ , #1 ~ } + { \exp_not:n {#1} } + { \exp_not:n { {#1} } } + } +\cs_new:Npn \__clist_set_from_seq:w #1 , #2 ~ { } +\cs_generate_variant:Nn \clist_set_from_seq:NN { Nc } +\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 { \__clist_concat:NNNN \tl_set:Nx } \cs_new_protected_nopar:Npn \clist_gconcat:NNN @@ -5219,8 +5404,40 @@ \cs_new:Npn \__clist_remove_all:w #1 , \q_mark , #2 , { \exp_not:n {#1} } \cs_generate_variant:Nn \clist_remove_all:Nn { c } \cs_generate_variant:Nn \clist_gremove_all:Nn { c } +\cs_new_protected:Npn \clist_reverse:N #1 + { \tl_set:Nx #1 { \exp_args:No \clist_reverse:n {#1} } } +\cs_new_protected:Npn \clist_greverse:N #1 + { \tl_gset:Nx #1 { \exp_args:No \clist_reverse:n {#1} } } +\cs_generate_variant:Nn \clist_reverse:N { c } +\cs_generate_variant:Nn \clist_greverse:N { c } +\cs_new:Npn \clist_reverse:n #1 + { + \__clist_reverse:wwNww ? #1 , + \q_mark \__clist_reverse:wwNww ! , + \q_mark \__clist_reverse_end:ww + \q_stop ? \q_mark + } +\cs_new:Npn \__clist_reverse:wwNww + #1 , #2 \q_mark #3 #4 \q_stop ? #5 \q_mark + { #3 ? #2 \q_mark #3 #4 \q_stop #1 , #5 \q_mark } +\cs_new:Npn \__clist_reverse_end:ww #1 ! #2 , \q_mark + { \exp_not:o { \use_none:n #2 } } \prg_new_eq_conditional:NNn \clist_if_empty:N \tl_if_empty:N { p , T , F , TF } \prg_new_eq_conditional:NNn \clist_if_empty:c \tl_if_empty:c { p , T , F , TF } +\prg_new_conditional:Npnn \clist_if_empty:n #1 { p , T , F , TF } + { + \__clist_if_empty_n:w ? #1 + , \q_mark \prg_return_false: + , \q_mark \prg_return_true: + \q_stop + } +\cs_new:Npn \__clist_if_empty_n:w #1 , + { + \tl_if_empty:oTF { \use_none:nn #1 ? } + { \__clist_if_empty_n:w ? } + { \__clist_if_empty_n:wNw } + } +\cs_new:Npn \__clist_if_empty_n:wNw #1 \q_mark #2#3 \q_stop {#2} \prg_new_protected_conditional:Npnn \clist_if_in:Nn #1#2 { T , F , TF } { \exp_args:No \__clist_if_in_return:nn #1 {#2} @@ -5378,6 +5595,66 @@ \cs_new:Npn \clist_use:Nn #1#2 { \clist_use:Nnnn #1 {#2} {#2} {#2} } \cs_generate_variant:Nn \clist_use:Nn { c } +\cs_new:Npn \clist_item:Nn #1#2 + { + \exp_args:Nfo \__clist_item:nnNn + { \clist_count:N #1 } + #1 + \__clist_item_N_loop:nw + {#2} + } +\cs_new:Npn \__clist_item:nnNn #1#2#3#4 + { + \int_compare:nNnTF {#4} < \c_zero + { + \int_compare:nNnTF {#4} < { - #1 } + { \use_none_delimit_by_q_stop:w } + { \exp_args:Nf #3 { \int_eval:n { #4 + \c_one + #1 } } } + } + { + \int_compare:nNnTF {#4} > {#1} + { \use_none_delimit_by_q_stop:w } + { #3 {#4} } + } + { } , #2 , \q_stop + } +\cs_new:Npn \__clist_item_N_loop:nw #1 #2, + { + \int_compare:nNnTF {#1} = \c_zero + { \use_i_delimit_by_q_stop:nw { \exp_not:n {#2} } } + { \exp_args:Nf \__clist_item_N_loop:nw { \int_eval:n { #1 - 1 } } } + } +\cs_generate_variant:Nn \clist_item:Nn { c } +\cs_new:Npn \clist_item:nn #1#2 + { + \exp_args:Nf \__clist_item:nnNn + { \clist_count:n {#1} } + {#1} + \__clist_item_n:nw + {#2} + } +\cs_new:Npn \__clist_item_n:nw #1 + { \__clist_item_n_loop:nw {#1} \prg_do_nothing: } +\cs_new:Npn \__clist_item_n_loop:nw #1 #2, + { + \exp_args:No \tl_if_blank:nTF {#2} + { \__clist_item_n_loop:nw {#1} \prg_do_nothing: } + { + \int_compare:nNnTF {#1} = \c_zero + { \exp_args:No \__clist_item_n_end:n {#2} } + { + \exp_args:Nf \__clist_item_n_loop:nw + { \int_eval:n { #1 - 1 } } + \prg_do_nothing: + } + } + } +\cs_new:Npn \__clist_item_n_end:n #1 #2 \q_stop + { + \__tl_trim_spaces:nn { \q_mark #1 } + { \exp_last_unbraced:No \__clist_item_n_strip:w } , + } +\cs_new:Npn \__clist_item_n_strip:w #1 , { \exp_not:n {#1} } \cs_new_protected:Npn \clist_show:N #1 { \__msg_show_variable:Nnn #1 { clist } @@ -6129,7 +6406,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3prop.dtx 4712 2014-04-30 08:17:49Z joseph $ +\GetIdInfo$Id: l3prop.dtx 5215 2014-07-17 13:23:20Z joseph $ {L3 Property lists} \__scan_new:N \s__prop \cs_new:Npn \__prop_pair:wn #1 \s__prop #2 @@ -6223,6 +6500,19 @@ \cs_generate_variant:Nn \prop_pop:NnN { c , co } \cs_generate_variant:Nn \prop_gpop:NnN { No } \cs_generate_variant:Nn \prop_gpop:NnN { c , co } +\cs_new:Npn \prop_item:Nn #1#2 + { + \exp_last_unbraced:Noo \__prop_item_Nn:nwwn { \tl_to_str:n {#2} } #1 + \__prop_pair:wn \tl_to_str:n {#2} \s__prop { } + \__prg_break_point: + } +\cs_new:Npn \__prop_item_Nn:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 + { + \str_if_eq_x:nnTF {#1} {#3} + { \__prg_break:n { \exp_not:n {#4} } } + { \__prop_item_Nn:nwwn {#1} } + } +\cs_generate_variant:Nn \prop_item:Nn { c } \prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } { \__prop_split:NnTF #1 {#2} @@ -6384,6 +6674,8 @@ { \prop_map_function:NN #1 \__msg_show_item:nn } } \cs_generate_variant:Nn \prop_show:N { c } +\cs_new_eq:NN \prop_get:Nn \prop_item:Nn +\cs_new_eq:NN \prop_get:cn \prop_item:cn %% File: l3msg.dtx Copyright (C) 2009-2014 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the @@ -7190,7 +7482,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3file.dtx 4890 2014-05-26 20:59:31Z joseph $ +\GetIdInfo$Id: l3file.dtx 5188 2014-07-09 12:02:22Z will $ {L3 File and I/O operations} \tl_new:N \g_file_current_name_tl \tl_gset_eq:NN \g_file_current_name_tl \@currname @@ -7288,13 +7580,12 @@ } \cs_new_protected:Npn \__file_if_exist:nT #1#2 { - \file_add_path:nN {#1} \l__file_internal_name_tl - \quark_if_no_value:NTF \l__file_internal_name_tl + \file_if_exist:nTF {#1} + {#2} { \__file_name_sanitize:nn {#1} { \__msg_kernel_error:nnx { kernel } { file-not-found } } } - { #2 } } \cs_new_protected:Npn \__file_input:n #1 { @@ -7497,13 +7788,13 @@ \cs_new_eq:NN \__iow_list_streams:Nn \__ior_list_streams:Nn \cs_new_protected:Npn \iow_shipout_x:Nn #1#2 { \tex_write:D #1 {#2} } -\cs_generate_variant:Nn \iow_shipout_x:Nn { Nx } +\cs_generate_variant:Nn \iow_shipout_x:Nn { c, Nx, cx } \cs_new_protected:Npn \iow_shipout:Nn #1#2 { \tex_write:D #1 { \exp_not:n {#2} } } -\cs_generate_variant:Nn \iow_shipout:Nn { Nx } +\cs_generate_variant:Nn \iow_shipout:Nn { c, Nx, cx } \cs_new_protected:Npn \iow_now:Nn #1#2 { \tex_immediate:D \tex_write:D #1 { \exp_not:n {#2} } } -\cs_generate_variant:Nn \iow_now:Nn { Nx } +\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 } @@ -7743,7 +8034,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3skip.dtx 4972 2014-05-31 16:42:18Z bruno $ +\GetIdInfo$Id: l3skip.dtx 5211 2014-07-17 07:22:35Z joseph $ {L3 Dimensions and skips} \cs_new_eq:NN \if_dim:w \tex_ifdim:D \cs_new_eq:NN \__dim_eval:w \etex_dimexpr:D @@ -7956,16 +8247,16 @@ } \cs_new:Npn \dim_eval:n #1 { \dim_use:N \__dim_eval:w #1 \__dim_eval_end: } -\cs_new:Npn \__dim_strip_bp:n #1 - { \__dim_strip_pt:n { ( #1 ) * 800 / 803 } } -\cs_new:Npn \__dim_strip_pt:n #1 +\cs_new_eq:NN \dim_use:N \tex_the:D +\cs_generate_variant:Nn \dim_use:N { c } +\cs_new:Npn \dim_to_decimal:n #1 { \exp_after:wN - \__dim_strip_pt:w \dim_use:N \__dim_eval:w (#1) \__dim_eval_end: + \__dim_to_decimal:w \dim_use:N \__dim_eval:w (#1) \__dim_eval_end: } \use:x { - \cs_new:Npn \exp_not:N \__dim_strip_pt:w + \cs_new:Npn \exp_not:N \__dim_to_decimal:w ##1 . ##2 \tl_to_str:n { pt } } { @@ -7973,8 +8264,16 @@ { #1 . #2 } { #1 } } -\cs_new_eq:NN \dim_use:N \tex_the:D -\cs_generate_variant:Nn \dim_use:N { c } +\cs_new:Npn \dim_to_decimal_in_bp:n #1 + { \dim_to_decimal:n { ( #1 ) * 800 / 803 } } +\cs_new:Npn \dim_to_decimal_in_unit:nn #1#2 + { + \dim_to_decimal:n + { + 1pt * + \dim_ratio:nn {#1} {#2} + } + } \cs_new_eq:NN \dim_show:N \__kernel_register_show:N \cs_generate_variant:Nn \dim_show:N { c } \cs_new_protected:Npn \dim_show:n #1 @@ -8134,6 +8433,8 @@ \muskip_new:N \g_tmpa_muskip \muskip_new:N \g_tmpb_muskip \cs_new_eq:NN \dim_case:nnn \dim_case:nnF +\cs_new_eq:NN \__dim_strip_bp:n \dim_to_decimal_in_bp:n +\cs_new_eq:NN \__dim_strip_pt:n \dim_to_decimal:n %% File: l3keys.dtx Copyright (C) 2006-2014 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the @@ -8166,7 +8467,7 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\GetIdInfo$Id: l3keys.dtx 5093 2014-06-08 20:33:14Z joseph $ +\GetIdInfo$Id: l3keys.dtx 5121 2014-06-12 17:37:56Z joseph $ {L3 Key-value interfaces} \int_new:N \g__keyval_level_int \tl_new:N \l__keyval_key_tl @@ -8968,7 +9269,7 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3fp.dtx 4712 2014-04-30 08:17:49Z joseph $ +\GetIdInfo$Id: l3fp.dtx 5223 2014-07-18 01:54:05Z bruno $ {L3 Floating points} %% File: l3fp-aux.dtx Copyright(C) 2011-2014 The LaTeX3 Project %% @@ -10651,11 +10952,11 @@ { \__fp_parse_infix_juxtapose:N #1 ( } \cs_new:Npn \__fp_parse_infix_juxtapose:N #1 { - \if_int_compare:w #1 < \c_thirty_two + \if_int_compare:w #1 < \c_ten \exp_after:wN @ \exp_after:wN \__fp_parse_apply_juxtapose:NwwN \tex_romannumeral:D - \__fp_parse_operand:Nw \c_thirty_two + \__fp_parse_operand:Nw \c_ten \exp_after:wN \__fp_parse_expand:w \else: \exp_after:wN @ @@ -12594,12 +12895,13 @@ \exp_after:wN \__fp_ln_x_iv:wnnnnnnnn \int_use:N \__int_eval:w \exp_after:wN \__fp_ln_x_iii_var:NNNNNw - \int_use:N \__int_eval:w 9999 9999 + #1*#2#3 + - \exp_after:wN \__fp_ln_x_iii:NNNNNw - \int_use:N \__int_eval:w 1 0000 0000 + #1*#4#5 ; + \int_use:N \__int_eval:w 9999 9990 + #1*#2#3 + + \exp_after:wN \__fp_ln_x_iii:NNNNNNw + \int_use:N \__int_eval:w 10 0000 0000 + #1*#4#5 ; {20000} {0000} {0000} {0000} } %^^A todo: reoptimize (a generalization attempt failed). -\cs_new:Npn \__fp_ln_x_iii:NNNNNw #1 #2#3#4#5 #6; { #1; {#2#3#4#5} {#6} } +\cs_new:Npn \__fp_ln_x_iii:NNNNNNw #1#2 #3#4#5#6 #7; + { #1#2; {#3#4#5#6} {#7} } \cs_new:Npn \__fp_ln_x_iii_var:NNNNNw #1 #2#3#4#5 #6; { #1#2#3#4#5 + \c_one ; @@ -15543,7 +15845,7 @@ %% %% ----------------------------------------------------------------------- %% -\GetIdInfo$Id: l3candidates.dtx 4972 2014-05-31 16:42:18Z bruno $ +\GetIdInfo$Id: l3candidates.dtx 5232 2014-07-18 19:32:54Z joseph $ {L3 Experimental additions to l3kernel} \fp_new:N \l__box_angle_fp \fp_new:N \l__box_cos_fp @@ -15609,8 +15911,8 @@ { \fp_to_dim:n { - \l__box_cos_fp * \dim_to_fp:n {#1} - - ( \l__box_sin_fp * \dim_to_fp:n {#2} ) + \l__box_cos_fp * \dim_to_fp:n {#1} + - \l__box_sin_fp * \dim_to_fp:n {#2} } } } @@ -15676,23 +15978,27 @@ \hbox_set:Nn #1 { \group_begin: - \dim_set:Nn \l__box_top_dim { \box_ht:N #1 } - \dim_set:Nn \l__box_bottom_dim { -\box_dp:N #1 } - \dim_set:Nn \l__box_right_dim { \box_wd:N #1 } - \dim_zero:N \l__box_left_dim + \__box_resize_set_corners:N #1 \fp_set:Nn \l__box_scale_x_fp - { \dim_to_fp:n {#2} / ( \dim_to_fp:n \l__box_right_dim ) } + { \dim_to_fp:n {#2} / \dim_to_fp:n { \l__box_right_dim } } \fp_set:Nn \l__box_scale_y_fp { - \dim_to_fp:n {#3} / - ( \dim_to_fp:n { \l__box_top_dim - \l__box_bottom_dim } ) + \dim_to_fp:n {#3} + / \dim_to_fp:n { \l__box_top_dim - \l__box_bottom_dim } } - \__box_resize:Nnn #1 {#2} {#3} + \__box_resize:Nn #1 {#2} \group_end: } } \cs_generate_variant:Nn \box_resize:Nnn { c } -\cs_new_protected:Npn \__box_resize:Nnn #1#2#3 +\cs_new_protected:Npn \__box_resize_set_corners:N #1 + { + \dim_set:Nn \l__box_top_dim { \box_ht:N #1 } + \dim_set:Nn \l__box_bottom_dim { -\box_dp:N #1 } + \dim_set:Nn \l__box_right_dim { \box_wd:N #1 } + \dim_zero:N \l__box_left_dim + } +\cs_new_protected:Npn \__box_resize:Nn #1#2 { \dim_set:Nn \l__box_right_new_dim { \dim_abs:n {#2} } \dim_set:Nn \l__box_bottom_new_dim @@ -15701,22 +16007,36 @@ { \fp_abs:n { \l__box_scale_y_fp } \l__box_top_dim } \__box_resize_common:N #1 } +\cs_new_protected:Npn \box_resize_to_ht:Nn #1#2 + { + \hbox_set:Nn #1 + { + \group_begin: + \__box_resize_set_corners:N #1 + \fp_set:Nn \l__box_scale_y_fp + { + \dim_to_fp:n {#2} + / \dim_to_fp:n { \l__box_top_dim } + } + \fp_set_eq:NN \l__box_scale_x_fp \l__box_scale_y_fp + \__box_resize:Nn #1 {#2} + \group_end: + } + } +\cs_generate_variant:Nn \box_resize_to_ht:Nn { c } \cs_new_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2 { \hbox_set:Nn #1 { \group_begin: - \dim_set:Nn \l__box_top_dim { \box_ht:N #1 } - \dim_set:Nn \l__box_bottom_dim { -\box_dp:N #1 } - \dim_set:Nn \l__box_right_dim { \box_wd:N #1 } - \dim_zero:N \l__box_left_dim + \__box_resize_set_corners:N #1 \fp_set:Nn \l__box_scale_y_fp { - \dim_to_fp:n {#2} / - ( \dim_to_fp:n { \l__box_top_dim - \l__box_bottom_dim } ) + \dim_to_fp:n {#2} + / \dim_to_fp:n { \l__box_top_dim - \l__box_bottom_dim } } \fp_set_eq:NN \l__box_scale_x_fp \l__box_scale_y_fp - \__box_resize:Nnn #1 {#2} {#2} + \__box_resize:Nn #1 {#2} \group_end: } } @@ -15726,18 +16046,33 @@ \hbox_set:Nn #1 { \group_begin: - \dim_set:Nn \l__box_top_dim { \box_ht:N #1 } - \dim_set:Nn \l__box_bottom_dim { -\box_dp:N #1 } - \dim_set:Nn \l__box_right_dim { \box_wd:N #1 } - \dim_zero:N \l__box_left_dim + \__box_resize_set_corners:N #1 \fp_set:Nn \l__box_scale_x_fp - { \dim_to_fp:n {#2} / ( \dim_to_fp:n \l__box_right_dim ) } + { \dim_to_fp:n {#2} / \dim_to_fp:n { \l__box_right_dim } } \fp_set_eq:NN \l__box_scale_y_fp \l__box_scale_x_fp - \__box_resize:Nnn #1 {#2} {#2} + \__box_resize:Nn #1 {#2} \group_end: } } \cs_generate_variant:Nn \box_resize_to_wd:Nn { c } +\cs_new_protected:Npn \box_resize_to_wd_and_ht:Nnn #1#2#3 + { + \hbox_set:Nn #1 + { + \group_begin: + \__box_resize_set_corners:N #1 + \fp_set:Nn \l__box_scale_x_fp + { \dim_to_fp:n {#2} / \dim_to_fp:n { \l__box_right_dim } } + \fp_set:Nn \l__box_scale_y_fp + { + \dim_to_fp:n {#3} + / \dim_to_fp:n { \l__box_top_dim } + } + \__box_resize:Nn #1 {#2} + \group_end: + } + } +\cs_generate_variant:Nn \box_resize_to_wd_and_ht:Nnn { c } \cs_new_protected:Npn \box_scale:Nnn #1#2#3 { \hbox_set:Nn #1 @@ -15886,111 +16221,6 @@ \box_set_eq:NN #1 \l__box_internal_box } \cs_generate_variant:Nn \box_viewport:Nnnnn { c } -\cs_new:Npn \clist_item:Nn #1#2 - { - \exp_args:Nfo \__clist_item:nnNn - { \clist_count:N #1 } - #1 - \__clist_item_N_loop:nw - {#2} - } -\cs_new:Npn \__clist_item:nnNn #1#2#3#4 - { - \int_compare:nNnTF {#4} < \c_zero - { - \int_compare:nNnTF {#4} < { - #1 } - { \use_none_delimit_by_q_stop:w } - { \exp_args:Nf #3 { \int_eval:n { #4 + \c_one + #1 } } } - } - { - \int_compare:nNnTF {#4} > {#1} - { \use_none_delimit_by_q_stop:w } - { #3 {#4} } - } - { } , #2 , \q_stop - } -\cs_new:Npn \__clist_item_N_loop:nw #1 #2, - { - \int_compare:nNnTF {#1} = \c_zero - { \use_i_delimit_by_q_stop:nw { \exp_not:n {#2} } } - { \exp_args:Nf \__clist_item_N_loop:nw { \int_eval:n { #1 - 1 } } } - } -\cs_generate_variant:Nn \clist_item:Nn { c } -\cs_new:Npn \clist_item:nn #1#2 - { - \exp_args:Nf \__clist_item:nnNn - { \clist_count:n {#1} } - {#1} - \__clist_item_n:nw - {#2} - } -\cs_new:Npn \__clist_item_n:nw #1 - { \__clist_item_n_loop:nw {#1} \prg_do_nothing: } -\cs_new:Npn \__clist_item_n_loop:nw #1 #2, - { - \exp_args:No \tl_if_blank:nTF {#2} - { \__clist_item_n_loop:nw {#1} \prg_do_nothing: } - { - \int_compare:nNnTF {#1} = \c_zero - { \exp_args:No \__clist_item_n_end:n {#2} } - { - \exp_args:Nf \__clist_item_n_loop:nw - { \int_eval:n { #1 - 1 } } - \prg_do_nothing: - } - } - } -\cs_new:Npn \__clist_item_n_end:n #1 #2 \q_stop - { - \__tl_trim_spaces:nn { \q_mark #1 } - { \exp_last_unbraced:No \__clist_item_n_strip:w } , - } -\cs_new:Npn \__clist_item_n_strip:w #1 , { \exp_not:n {#1} } -\cs_new_protected:Npn \clist_set_from_seq:NN - { \__clist_set_from_seq:NNNN \clist_clear:N \tl_set:Nx } -\cs_new_protected:Npn \clist_gset_from_seq:NN - { \__clist_set_from_seq:NNNN \clist_gclear:N \tl_gset:Nx } -\cs_new_protected:Npn \__clist_set_from_seq:NNNN #1#2#3#4 - { - \seq_if_empty:NTF #4 - { #1 #3 } - { - #2 #3 - { - \exp_last_unbraced:Nf \use_none:n - { \seq_map_function:NN #4 \__clist_wrap_item:n } - } - } - } -\cs_new:Npn \__clist_wrap_item:n #1 - { - , - \tl_if_empty:oTF { \__clist_set_from_seq:w #1 ~ , #1 ~ } - { \exp_not:n {#1} } - { \exp_not:n { {#1} } } - } -\cs_new:Npn \__clist_set_from_seq:w #1 , #2 ~ { } -\cs_generate_variant:Nn \clist_set_from_seq:NN { Nc } -\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:Npn \clist_const:Nn #1#2 - { \tl_const:Nx #1 { \__clist_trim_spaces:n {#2} } } -\cs_generate_variant:Nn \clist_const:Nn { c , Nx , cx } -\prg_new_conditional:Npnn \clist_if_empty:n #1 { p , T , F , TF } - { - \__clist_if_empty_n:w ? #1 - , \q_mark \prg_return_false: - , \q_mark \prg_return_true: - \q_stop - } -\cs_new:Npn \__clist_if_empty_n:w #1 , - { - \tl_if_empty:oTF { \use_none:nn #1 ? } - { \__clist_if_empty_n:w ? } - { \__clist_if_empty_n:wNw } - } -\cs_new:Npn \__clist_if_empty_n:wNw #1 \q_mark #2#3 \q_stop {#2} \fp_new:N \l__coffin_sin_fp \fp_new:N \l__coffin_cos_fp \prop_new:N \l__coffin_bounding_prop @@ -16076,16 +16306,16 @@ { \fp_to_dim:n { - \dim_to_fp:n {#1} * \l__coffin_cos_fp - - ( \dim_to_fp:n {#2} * \l__coffin_sin_fp ) + \dim_to_fp:n {#1} * \l__coffin_cos_fp + - \dim_to_fp:n {#2} * \l__coffin_sin_fp } } \dim_set:Nn #4 { \fp_to_dim:n { - \dim_to_fp:n {#1} * \l__coffin_sin_fp - + ( \dim_to_fp:n {#2} * \l__coffin_cos_fp ) + \dim_to_fp:n {#1} * \l__coffin_sin_fp + + \dim_to_fp:n {#2} * \l__coffin_cos_fp } } } @@ -16147,7 +16377,8 @@ { \dim_to_fp:n {#2} / \dim_to_fp:n { \coffin_wd:N #1 } } \fp_set:Nn \l__coffin_scale_y_fp { - \dim_to_fp:n {#3} / \dim_to_fp:n { \coffin_ht:N #1 + \coffin_dp:N #1 } + \dim_to_fp:n {#3} + / \dim_to_fp:n { \coffin_ht:N #1 + \coffin_dp:N #1 } } \box_resize:Nnn #1 {#2} {#3} \__coffin_resize_common:Nnn #1 {#2} {#3} @@ -16219,6 +16450,32 @@ {#5} {#6} } } +\cs_new_protected:Npn \file_if_exist_input:n #1 + { + \file_if_exist:nT {#1} + { \__file_input:V \l__file_internal_name_tl } + } +\cs_new_protected:Npn \file_if_exist_input:nT #1#2 + { + \file_if_exist:nT {#1} + { + #2 + \__file_input:V \l__file_internal_name_tl + } + } +\cs_new_protected:Npn \file_if_exist_input:nF #1 + { + \file_if_exist:nTF {#1} + { \__file_input:V \l__file_internal_name_tl } + } +\cs_new_protected:Npn \file_if_exist_input:nTF #1#2 + { + \file_if_exist:nTF {#1} + { + #2 + \__file_input:V \l__file_internal_name_tl + } + } \cs_new_nopar:Npn \ior_map_break: { \__prg_map_break:Nn \ior_map_break: { } } \cs_new_nopar:Npn \ior_map_break:n @@ -16250,12 +16507,6 @@ } } \tl_new:N \l__ior_internal_tl -\cs_new_protected:Npn \fp_set_from_dim:Nn #1#2 - { \tl_set:Nx #1 { \dim_to_fp:n {#2} } } -\cs_new_protected:Npn \fp_gset_from_dim:Nn #1#2 - { \tl_gset:Nx #1 { \dim_to_fp:n {#2} } } -\cs_generate_variant:Nn \fp_set_from_dim:Nn { c } -\cs_generate_variant:Nn \fp_gset_from_dim:Nn { c } \cs_new:Npn \prop_map_tokens:Nn #1#2 { \exp_last_unbraced:Nno \__prop_map_tokens:nwwn {#2} #1 @@ -16271,44 +16522,6 @@ \__prop_map_tokens:nwwn {#1} } \cs_generate_variant:Nn \prop_map_tokens:Nn { c } -\cs_new:Npn \prop_get:Nn #1#2 - { - \exp_last_unbraced:Noo \__prop_get_Nn:nwwn { \tl_to_str:n {#2} } #1 - \__prop_pair:wn \tl_to_str:n {#2} \s__prop { } - \__prg_break_point: - } -\cs_new:Npn \__prop_get_Nn:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 - { - \str_if_eq_x:nnTF {#1} {#3} - { \__prg_break:n { \exp_not:n {#4} } } - { \__prop_get_Nn:nwwn {#1} } - } -\cs_generate_variant:Nn \prop_get:Nn { c } -\cs_new:Npn \seq_item:Nn #1 - { \exp_after:wN \__seq_item:wNn #1 \q_stop #1 } -\cs_new:Npn \__seq_item:wNn \s__seq #1 \q_stop #2#3 - { - \exp_args:Nf \__seq_item:nnn - { - \int_eval:n - { - \int_compare:nNnT {#3} < \c_zero - { \seq_count:N #2 + \c_one + } - #3 - } - } - #1 - { ? \__prg_break: } { } - \__prg_break_point: - } -\cs_new:Npn \__seq_item:nnn #1#2#3 - { - \use_none:n #2 - \int_compare:nNnTF {#1} = \c_one - { \__prg_break:n { \exp_not:n {#3} } } - { \exp_args:Nf \__seq_item:nnn { \int_eval:n { #1 - 1 } } } - } -\cs_generate_variant:Nn \seq_item:Nn { c } \cs_new:Npn \seq_mapthread_function:NNN #1#2#3 { \exp_after:wN \__seq_mapthread_function:wNN #2 \q_stop #1 #3 } \cs_new:Npn \__seq_mapthread_function:wNN \s__seq #1 \q_stop #2#3 @@ -16332,50 +16545,6 @@ } \cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc } \cs_generate_variant:Nn \seq_mapthread_function:NNN { c , cc } -\cs_new_protected:Npn \seq_set_from_clist:NN #1#2 - { - \tl_set:Nx #1 - { \s__seq \clist_map_function:NN #2 \__seq_wrap_item:n } - } -\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2 - { - \tl_set:Nx #1 - { \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n } - } -\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2 - { - \tl_gset:Nx #1 - { \s__seq \clist_map_function:NN #2 \__seq_wrap_item:n } - } -\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2 - { - \tl_gset:Nx #1 - { \s__seq \clist_map_function:nN {#2} \__seq_wrap_item:n } - } -\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc } -\cs_generate_variant:Nn \seq_set_from_clist:NN { c , cc } -\cs_generate_variant:Nn \seq_set_from_clist:Nn { c } -\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_reverse:N - { \__seq_reverse:NN \tl_set:Nx } -\cs_new_protected_nopar:Npn \seq_greverse:N - { \__seq_reverse:NN \tl_gset:Nx } -\cs_new_protected:Npn \__seq_reverse:NN #1 #2 - { - \cs_set_eq:NN \__seq_tmp:w \__seq_item:n - \cs_set_eq:NN \__seq_item:n \__seq_reverse_item:nwn - #1 #2 { #2 \exp_not:n { } } - \cs_set_eq:NN \__seq_item:n \__seq_tmp:w - } -\cs_new:Npn \__seq_reverse_item:nwn #1 #2 \exp_not:n #3 - { - #2 - \exp_not:n { \__seq_item:n {#1} #3 } - } -\cs_generate_variant:Nn \seq_reverse:N { c } -\cs_generate_variant:Nn \seq_greverse:N { c } \cs_new_protected_nopar:Npn \seq_set_filter:NNn { \__seq_set_filter:NNNn \tl_set:Nx } \cs_new_protected_nopar:Npn \seq_gset_filter:NNn @@ -16396,17 +16565,6 @@ #1 #2 { #3 } \__seq_pop_item_def: } -\cs_new_eq:NN \dim_to_pt:n \__dim_strip_pt:n -\cs_new:Npn \dim_to_unit:nn #1#2 - { - \dim_to_pt:n - { - 1pt * - \dim_ratio:nn - { \dim_to_pt:n {#1} pt } - { \dim_to_pt:n {#2} pt } - } - } \cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4 { \skip_if_finite:nTF {#1} @@ -16513,30 +16671,326 @@ \exp_after:wN \__tl_act_output:n \exp_after:wN { \exp_after:wN { \tex_romannumeral:D \__tl_act_case_aux:nn {#1} {#2} } } } -\cs_new:Npn \tl_item:nn #1#2 +\cs_new_protected_nopar:Npn \tl_set_from_file:Nnn + { \__tl_set_from_file:NNnn \tl_set:Nn } +\cs_new_protected_nopar: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 } +\cs_new_protected:Npn \__tl_set_from_file:NNnn #1#2#3#4 { - \exp_args:Nf \__tl_item:nn + \__file_if_exist:nT {#4} { - \int_eval:n + \group_begin: + \exp_args:No \etex_everyeof:D + { \c__tl_rescan_marker_tl \exp_not:N } + #3 \scan_stop: + \exp_after:wN \__tl_from_file_do:w + \exp_after:wN \prg_do_nothing: + \tex_input:D \l__file_internal_name_tl \scan_stop: + \exp_args:NNNo \group_end: + #1 #2 \l__tl_internal_a_tl + } + } +\exp_args:Nno \use:nn + { \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 + { \__tl_set_from_file_x:NNnn \tl_set:Nn } +\cs_new_protected_nopar: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 } +\cs_new_protected:Npn \__tl_set_from_file_x:NNnn #1#2#3#4 + { + \__file_if_exist:nT {#4} + { + \group_begin: + \etex_everyeof:D { \exp_not:N } + #3 \scan_stop: + \tl_set:Nx \l__tl_internal_a_tl + { \tex_input:D \l__file_internal_name_tl \c_space_token } + \exp_args:NNNo \group_end: + #1 #2 \l__tl_internal_a_tl + } + } +\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_change_case:nnn #1#2#3 + { + \__tl_change_case_loop:wnn #3 + \q_recursion_tail \q_recursion_stop {#1} {#2} + } +\cs_new:Npn \__tl_change_case_loop:wnn #1 \q_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__tl_change_case_N_type:Nwnn } + { + \tl_if_head_is_group:nTF {#1} + { \__tl_change_case_group:nwnn } + { \__tl_change_case_space:wnn } + } + #1 \q_recursion_stop + } +\cs_new:Npn \__tl_change_case_N_type:Nwnn #1#2 \q_recursion_stop #3#4 + { + \quark_if_recursion_tail_stop_do:Nn #1 { \use_none:nn } + \token_if_cs:NTF #1 + { \exp_not:N #1 } + { + \cs_if_exist_use:cF { __tl_change_case_ #3 _ #4 :Nnn } + { \use_iii:nnn } + #1 {#2} + { + \use:c { __tl_change_case_ #3 _ sigma:Nnn } #1 {#2} + { + \exp_after:wN \__tl_change_case_char:NNNNNNNNn + \int_use:N \__int_eval:w 1000000 + `#1 \__int_eval_end: + #1 {#3} + } + } + } + \__tl_change_case_loop:wnn #2 \q_recursion_stop {#3} {#4} + } +\cs_new:Npn \__tl_change_case_group:nwnn #1#2 \q_recursion_stop + { + { \exp_not:n {#1} } + \__tl_change_case_loop:wnn #2 \q_recursion_stop + } +\exp_last_unbraced:NNo \cs_new:Npn \__tl_change_case_space:wnn \c_space_tl + { + \c_space_tl + \__tl_change_case_loop:wnn + } +\cs_new:Npn \__tl_change_case_char:NNNNNNNNn #1#2#3#4#5#6#7#8#9 + { + \exp_args:NNv \str_case:nnF #8 + { c__tl_ #9 _ #6 _ #7 _tl } + { \exp_not:N #8 } + } +\cs_new:Npn \__tl_change_case_lower_sigma:Nnn #1#2 + { + \int_compare:nNnTF { `#1 } = { "03A3 } + { + \tl_if_head_is_N_type:nTF {#2} + { \__tl_change_case_lower_sigma:Nw #2 \q_recursion_stop } { - \int_compare:nNnT {#2} < \c_zero - { \tl_count:n {#1} + \c_one + } - #2 + \tl_if_head_is_group:nTF {#2} + { \c__tl_std_sigma_tl } + { \c__tl_final_sigma_tl } } } - #1 - \q_recursion_tail - \__prg_break_point: } -\cs_new:Npn \__tl_item:nn #1#2 +\cs_new:Npn \__tl_change_case_lower_sigma:Nw #1#2 \q_recursion_stop { - \__quark_if_recursion_tail_break:nN {#2} \__prg_break: - \int_compare:nNnTF {#1} = \c_one - { \__prg_break:n { \exp_not:n {#2} } } - { \exp_args:Nf \__tl_item:nn { \int_eval:n { #1 - 1 } } } + \token_if_cs:NTF #1 + { \c__tl_std_sigma_tl } + { + \exp_after:wN \__tl_change_case_lower_sigma_loop:Nw + \exp_after:wN #1 \c__tl_after_final_sigma_clist + , \q_recursion_tail , \q_recursion_stop + } + } +\cs_new:Npn \__tl_change_case_lower_sigma_loop:Nw #1#2 , + { + \quark_if_recursion_tail_stop_do:nn {#2} + { \c__tl_std_sigma_tl } + \int_compare:nNnT { `#1 } = { "#2 } + { \use_i_delimit_by_q_recursion_stop:nw { \c__tl_final_sigma_tl } } + \__tl_change_case_lower_sigma_loop:Nw #1 + } +\cs_new_eq:NN \__tl_change_case_upper_sigma:Nnn \use_iii:nnn +\cs_new_eq:NN \__tl_change_case_mixed_sigma:Nnn \use_iii:nnn +\cs_new:Npn \__tl_mixed_case:nn #1#2 + { + \__tl_mixed_case_loop:wn #2 + \q_recursion_tail \q_recursion_stop {#1} + } +\cs_new:Npn \__tl_mixed_case_loop:wn #1 \q_recursion_stop + { + \tl_if_head_is_N_type:nTF {#1} + { \__tl_mixed_case_N_type:Nwn } + { + \tl_if_head_is_group:nTF {#1} + { \__tl_mixed_case_group:nwn } + { \__tl_mixed_case_space:wn } + } + #1 \q_recursion_stop + } +\cs_new:Npn \__tl_mixed_case_N_type:Nwn #1#2 \q_recursion_stop #3 + { + \quark_if_recursion_tail_stop_do:Nn #1 { \use_none:nn } + \token_if_cs:NTF #1 + { \exp_not:N #1 } + { + \cs_if_exist_use:cF { __tl_change_case_mixed_ #3 :Nnn } + { + \cs_if_exist_use:cF { __tl_change_case_upper_ #3 :Nnn } + { \use_iii:nnn } + } + #1 {#2} + { + \exp_after:wN \__tl_mixed_case_skip:Nwn \exp_after:wN #1 + \c__tl_mixed_skip_clist , \q_recursion_tail , \q_recursion_stop + { + \exp_args:NNV \str_case:nnF #1 \c__tl_mixed_exceptions_tl + { + \exp_after:wN \__tl_change_case_char:NNNNNNNNn + \int_use:N \__int_eval:w 1000000 + `#1 \__int_eval_end: + #1 { upper } + } + } + } + } + \__tl_change_case_loop:wnn #2 \q_recursion_stop { lower } {#3} + } +\cs_new:Npn \__tl_mixed_case_skip:Nwn #1#2 , + { + \quark_if_recursion_tail_stop_do:nn {#2} { \use:n } + \int_compare:nNnT { `#1 } = { "#2 } + { + \use_i_delimit_by_q_recursion_stop:nw + { + #1 + \__tl_mixed_case_skip_tidy:nNwn + } + } + \__tl_mixed_case_skip:Nwn #1 + } +\cs_new:Npn \__tl_mixed_case_skip_tidy:nNwn #1#2#3 \q_recursion_stop #4 + { + \__tl_mixed_case_loop:wn #3 \q_recursion_stop + } +\cs_new:Npn \__tl_mixed_case_group:nwn #1#2 \q_recursion_stop + { + { \exp_not:n {#1} } + \__tl_change_case_loop:wnn #2 \q_recursion_stop { lower } + } +\exp_last_unbraced:NNo \cs_new:Npn \__tl_mixed_case_space:wn \c_space_tl + { + \c_space_tl + \__tl_mixed_case_loop:wn + } +\cs_new:Npn \__tl_change_case_lower_tr:Nnn #1#2#3 + { + \int_compare:nNnTF { `#1 } = { "0049 } + { + \tl_if_head_is_N_type:nTF {#2} + { \__tl_change_case_lower_tr:Nw #2 \q_recursion_stop } + { \c__tl_dotless_i_tl } + } + { + \int_compare:nNnTF { `#1 } = { "0130 } + { i } + {#3} + } + } +\cs_new_nopar:Npn \__tl_change_case_lower_az:Nnn + { \__tl_change_case_lower_tr:Nnn } +\cs_new:Npn \__tl_change_case_lower_tr:Nw #1#2 \q_recursion_stop + { + \bool_if:nTF + { + \token_if_cs_p:N #1 + || ! ( \int_compare_p:nNn { `#1 } = { "0307 } ) + } + { \c__tl_dotless_i_tl } + { + i + \use_i:nn + } + } +\cs_new:Npn \__tl_change_case_upper_tr:Nnn #1#2#3 + { + \int_compare:nNnTF { `#1 } = { "0069 } + { \c__tl_dotted_I_tl } + {#3} + } +\cs_new_nopar:Npn \__tl_change_case_upper_az:Nnn + { \__tl_change_case_upper_tr:Nnn } +\cs_new:Npn \__tl_change_case_lower_lt:Nnn #1#2#3 + { + \exp_args:NNV \str_case:nnF #1 \c__tl_accents_lt_tl + { + #3 + \bool_if:nT + { + \int_compare_p:nNn { `#1 } = { "0049 } + || \int_compare_p:nNn { `#1 } = { "004A } + || \int_compare_p:nNn { `#1 } = { "012E } + } + { + \tl_if_head_is_N_type:nT {#2} + { \__tl_change_case_lower_lt:Nw #2 \q_recursion_stop } + } + } + } +\cs_new:Npn \__tl_change_case_lower_lt:Nw #1#2 \q_recursion_stop + { + \bool_if:nT + { + ! ( \token_if_cs_p:N #1 ) + && + ( + \int_compare_p:nNn { `#1 } = { "0300 } + || \int_compare_p:nNn { `#1 } = { "0301 } + || \int_compare_p:nNn { `#1 } = { "0303 } + ) + } + { \c__tl_dot_above_tl } + } +\cs_new:Npn \__tl_change_case_upper_lt:Nnn #1#2#3 + { + #3 + \bool_if:nT + { + \tl_if_head_is_N_type_p:n {#2} + && + ( + \int_compare_p:nNn { `#1 } = { "0069 } + || \int_compare_p:nNn { `#1 } = { "006A } + || \int_compare_p:nNn { `#1 } = { "012F } + ) + } + { \__tl_change_case_upper_lt:Nw #2 \q_recursion_stop } + } +\cs_new:Npn \__tl_change_case_upper_lt:Nw #1#2 \q_recursion_stop + { + \bool_if:nT + { + ! ( \token_if_cs_p:N #1 ) + && + \int_compare_p:nNn { `#1 } = { "0307 } + } + { \use_i:nn } + } +\cs_new:Npn \__tl_change_case_mixed_nl:Nnn #1#2 + { + \int_compare:nNnTF { `#1 } = { `i } + { + I + \tl_if_head_is_N_type:nT {#2} + { \__tl_change_case_mixed_nl:Nw #2 \q_recursion_stop } + } + } +\cs_new:Npn \__tl_change_case_mixed_nl:Nw #1#2 \q_recursion_stop + { + \bool_if:nT + { + ! ( \token_if_cs_p:N #1 ) + && + \int_compare_p:nNn { `#1 } = { `j } + } + { + J + \use_i:nn + } } -\cs_new_nopar:Npn \tl_item:Nn { \exp_args:No \tl_item:nn } -\cs_generate_variant:Nn \tl_item:Nn { c } \group_begin: \char_set_catcode_active:N \^^@ \cs_set:Npn \char_tmp:NN #1#2 @@ -16598,6 +17052,12 @@ { \__peek_token_generic:NNT \__peek_execute_branches_N_type: \scan_stop: } \cs_new_protected_nopar:Npn \peek_N_type:F { \__peek_token_generic:NNF \__peek_execute_branches_N_type: \scan_stop: } +\cs_new_protected:Npn \fp_set_from_dim:Nn #1#2 + { \fp_set:Nn #1 { \dim_to_fp:n {#2} } } +\cs_new_protected:Npn \fp_gset_from_dim:Nn #1#2 + { \fp_gset:Nn #1 { \dim_to_fp:n {#2} } } +\cs_generate_variant:Nn \fp_set_from_dim:Nn { c } +\cs_generate_variant:Nn \fp_gset_from_dim:Nn { c } %% %% %% End of file `expl3-code.tex'. |