diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-24 17:51:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-24 17:51:37 +0000 |
commit | 0bfadba8b4e7062c64d16b4ff197dd8adaa54be5 (patch) | |
tree | 1b646413f7f5827654e1c48ff82bf11c061dfa7d /Master/texmf-dist/tex | |
parent | 640cf00679c57a79632e597d833d3197aeb9e045 (diff) |
l3kernel (23oct23)
git-svn-id: svn://tug.org/texlive/trunk@68632 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 1742 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.ltx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 2 |
4 files changed, 1189 insertions, 559 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 0b57711f157..2f6e2fda248 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -38,6 +38,9 @@ %% l3fp-trig.dtx (with options: `package') %% l3fp-convert.dtx (with options: `package') %% l3fp-random.dtx (with options: `package') +%% l3fp-types.dtx (with options: `package') +%% l3fp-symbolic.dtx (with options: `package') +%% l3fp-functions.dtx (with options: `package') %% l3fparray.dtx (with options: `package') %% l3cctab.dtx (with options: `package') %% l3sort.dtx (with options: `package') @@ -71,7 +74,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-10-10}% +\def\ExplFileDate{2023-10-23}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -8806,6 +8809,54 @@ Type H <return> for immediate help}\def~{\errmessage{% \tl_const:Ne \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } \scan_new:N \s__token_mark \scan_new:N \s__token_stop +\cs_new:Npn \token_to_catcode:N + { \int_value:w \group_align_safe_begin: \__token_to_catcode:N } +\cs_new:Npn \__token_to_catcode:N #1 + { + \if_catcode:w \exp_not:N #1 \c_catcode_letter_token + 11 + \else: + \if_catcode:w \exp_not:N #1 \c_catcode_other_token + 12 + \else: + \if_catcode:w \exp_not:N #1 \c_math_toggle_token + 3 + \else: + \if_catcode:w \exp_not:N #1 \c_alignment_token + 4 + \else: + \if_catcode:w \exp_not:N #1 ## + 6 + \else: + \if_catcode:w \exp_not:N #1 \c_math_superscript_token + 7 + \else: + \if_catcode:w \exp_not:N #1 \c_math_subscript_token + 8 + \else: + \if_catcode:w \exp_not:N #1 \c_group_begin_token + 1 + \else: + \if_catcode:w \exp_not:N #1 \c_group_end_token + 2 + \else: + \if_catcode:w \exp_not:N #1 \c_space_token + 10 + \else: + \token_if_cs:NTF #1 { 16 } { 13 } + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \group_align_safe_end: + \exp_stop_f: + } \group_begin: \__kernel_chk_if_free_cs:N \c_group_begin_token \tex_global:D \tex_let:D \c_group_begin_token { @@ -16843,6 +16894,17 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_compare_back_any:ww \exp:w \exp_end_continue_f:w \__fp_parse:n {#2} #1; } +\cs_new:Npn \__fp_compare_back:ww #1#2; #3#4; + { + \cs:w + __fp + \__fp_type_from_scan:N #1 + _bcmp + \__fp_type_from_scan:N #3 + :ww + \cs_end: + #1#2; #3#4; + } \cs_new:Npn \__fp_compare_back_any:ww #1#2; #3 { \__fp_if_type_fp:NTwFw @@ -16860,7 +16922,7 @@ Type H <return> for immediate help}\def~{\errmessage{% } #1#2 ; #3 } -\cs_new:Npn \__fp_compare_back:ww +\cs_new:Npn \__fp_bcmp:ww \s__fp \__fp_chk:w #1 #2 #3; \s__fp \__fp_chk:w #4 #5 #6; { @@ -20664,6 +20726,529 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: } +%% File l3fp-types.dtx (C) Copyright 2012-2015,2017,2018,2020,2021,2023 The LaTeX Project +\cs_new:Npe \__fp_types_cs_to_op:N #1 + { + \exp_not:N \exp_after:wN \exp_not:N \__fp_types_cs_to_op_auxi:wwwn + \exp_not:N \token_to_str:N #1 \s__fp_mark + \exp_not:N \__fp_use_i_delimit_by_s_stop:nw + \tl_to_str:n { __fp_ _o:w } \s__fp_mark + { \exp_not:N \__fp_use_i_delimit_by_s_stop:nw ? } + \s__fp_stop + } +\use:e + { + \cs_new:Npn \exp_not:N \__fp_types_cs_to_op_auxi:wwwn + #1 \tl_to_str:n { __fp_ } #2 + \tl_to_str:n { _o:w } #3 \s__fp_mark #4 { #4 {#2} } + } +\cs_new:Npn \__fp_types_unary:NNw #1 + { + \exp_args:Nf \__fp_types_unary_auxi:nNw + { \__fp_types_cs_to_op:N #1 } + } +\cs_new:Npn \__fp_types_unary_auxi:nNw #1#2#3 + { + \exp_after:wN \__fp_types_unary_auxii:NnNw + \cs:w __fp_#1 \__fp_type_from_scan:N #3 _o:w \cs_end: + {#1} + #2#3 + } +\cs_new:Npn \__fp_types_unary_auxii:NnNw #1#2#3 + { + \token_if_eq_meaning:NNTF \scan_stop: #1 + { \__fp_invalid_operation_o:nw {#2} } + { #1 #3 } + } +\cs_new:Npn \__fp_types_binary:Nww #1 + { + \exp_last_unbraced:Nf \__fp_types_binary_auxi:Nww + { \__fp_types_cs_to_op:N #1 } + } +\cs_new:Npn \__fp_types_binary_auxi:Nww #1#2#3; #4#5; @ + { + \exp_after:wN \__fp_types_binary_auxii:NNww + \cs:w + __fp + \__fp_type_from_scan:N #2 + _#1 + \__fp_type_from_scan:N #4 + _o:ww + \cs_end: + #1 #2#3; #4#5; + } +\cs_new:Npn \__fp_types_binary_auxii:NNww #1#2 + { + \token_if_eq_meaning:NNTF \scan_stop: #1 + { \__fp_invalid_operation_o:Nww #2 } + {#1} + } +%% File l3fp-symbolic.dtx (C) Copyright 2012-2015,2017,2018,2020,2021,2023 The LaTeX Project +\fp_new:N \l__fp_symbolic_fp +\scan_new:N \s__fp_symbolic +\cs_new_protected:Npn \__fp_symbolic_chk:w #1,#2#3; + { + \msg_error:nne { fp } { misused-fp } + { + \__fp_to_tl_dispatch:w + \s__fp_symbolic \__fp_symbolic_chk:w #1,{#2}; + } + } +\cs_new:Npn \__fp_if_has_symbolic:nTF #1 + { + \__fp_if_has_symbolic_aux:w + #1 \s__fp_mark \use_i:nn + \s__fp_symbolic \s__fp_mark \use_ii:nn + \s__fp_stop + } +\cs_new:Npn \__fp_if_has_symbolic_aux:w + #1 \s__fp_symbolic #2 \s__fp_mark #3#4 \s__fp_stop { #3 } +\cs_new:Npn \__fp_exp_after_symbolic_f:nw + #1 \s__fp_symbolic \__fp_symbolic_chk:w #2, #3#4; + { + \exp_after:wN \__fp_exp_after_symbolic_aux:w + \exp:w + \__fp_exp_after_symbolic_loop:N #2 + { , \exp:w \use_none:nn } + \exp_after:wN \exp_end: \exp_after:wN + { + \exp:w \exp_end_continue_f:w + \__fp_exp_after_array_f:w #3 \s__fp_expr_stop + \exp_after:wN + } + \exp_after:wN ; + \exp:w \exp_end_continue_f:w #1 + } +\cs_new:Npn \__fp_exp_after_symbolic_aux:w #1, #2; + { + \__fp_if_has_symbolic:nTF {#2} + { \s__fp_symbolic \__fp_symbolic_chk:w #1, {#2} ; } + { #1 #2 @ \prg_do_nothing: } + } +\cs_new:Npn \__fp_exp_after_symbolic_loop:N #1 + { + \exp_after:wN \exp_end: + \exp_after:wN #1 + \exp:w + \__fp_exp_after_symbolic_loop:N + } +\cs_new:Npn \__fp_symbolic_binary_o:Nww #1 #2; #3; + { + \__fp_exp_after_symbolic_f:nw { \exp_after:wN \exp_stop_f: } + \s__fp_symbolic \__fp_symbolic_chk:w + \__fp_types_binary:Nww #1 , { #2; #3; } ; + } +\cs_set:Npn \__fp_tmp:w #1#2 + { + \cs_new_nopar:cpn + { __fp_symbolic_#2_symbolic_o:ww } + { \__fp_symbolic_binary_o:Nww #1 } + \cs_new_eq:cc + { __fp_symbolic_#2 _o:ww } + { __fp_symbolic_#2_symbolic_o:ww } + \cs_new_eq:cc + { __fp _#2_symbolic_o:ww } + { __fp_symbolic_#2_symbolic_o:ww } + } +\tl_map_inline:nn { + - * / ^ & | } + { \exp_args:Nc \__fp_tmp:w { __fp_#1_o:ww } {#1} } +\cs_new:Npn \__fp_symbolic_unary_o:NNw #1#2#3; @ + { + \__fp_exp_after_symbolic_f:nw { \exp_after:wN \exp_stop_f: } + \s__fp_symbolic \__fp_symbolic_chk:w + \__fp_types_unary:NNw #1#2 , { #3; } ; + } +\tl_map_inline:nn + { + {acos} {acsc} {asec} {asin} {cos} {cot} {csc} {exp} {ln} + {not} {sec} {set_sign} {sin} {sqrt} {tan} + } + { + \cs_new_nopar:cpe { __fp_symbolic_#1_o:w } + { + \exp_not:N \__fp_symbolic_unary_o:NNw + \exp_not:c { __fp_#1_o:w } + } + } +\cs_set_protected:Npn \__fp_tmp:w #1#2#3 + { + \cs_new_nopar:cpn { __fp_symbolic_to_#1:w } + { + \exp_after:wN \__fp_symbolic_convert:wnnN + \exp:w \exp_end_continue_f:w + \__fp_exp_after_symbolic_f:nw { { #2 } { fp_to_#1 } #3 } + } + } +\__fp_tmp:w { decimal } { 0 } \__fp_to_decimal_dispatch:w +\__fp_tmp:w { int } { 0 } \__fp_to_int_dispatch:w +\__fp_tmp:w { scientific } { nan } \__fp_to_scientific_dispatch:w +\cs_new:Npn \__fp_symbolic_convert:wnnN #1#2; #3#4#5 + { + \str_if_eq:nnTF {#1} { \s__fp_symbolic } + { \__fp_invalid_operation:nnw {#3} {#4} #1#2; } + { #5 #1#2; } + } +\cs_new:Npn \__fp_symbolic_cs_arg_to_fn:NN #1 + { + \exp_args:Nf \__fp_symbolic_op_arg_to_fn:nN + { \__fp_types_cs_to_op:N #1 } + } +\cs_new:Npn \__fp_symbolic_op_arg_to_fn:nN #1#2 + { + \str_case:nnF { #1 #2 } + { + { not ? } { ! } + { set_sign 0 } { abs } + { set_sign 2 } { - } + } + { + \token_if_eq_meaning:NNTF #2 \use_ii:nn + { #1 d } {#1} + } + } +\cs_new:Npn \__fp_symbolic_to_tl:w + \s__fp_symbolic \__fp_symbolic_chk:w #1#2, #3#4; + { + \str_case:nnTF {#1} + { + { \__fp_types_unary:NNw } { \__fp_symbolic_unary_to_tl:NNw } + { \__fp_types_binary:Nww } { \__fp_symbolic_binary_to_tl:Nww } + { \__fp_function_o:w } { \__fp_symbolic_function_to_tl:Nw } + } + { #2, #3 @ } + { \tl_to_str:n {#2} } + } +\cs_new:Npn \__fp_symbolic_unary_to_tl:NNw #1#2 , #3 @ + { + \use:e + { + \__fp_symbolic_cs_arg_to_fn:NN #1#2 + ( \__fp_to_tl_dispatch:w #3 ) + } + } +\cs_new:Npn \__fp_symbolic_binary_to_tl:Nww #1, #2; #3; @ + { + \use:e + { + ( \__fp_to_tl_dispatch:w #2; ) + \__fp_types_cs_to_op:N #1 + ( \__fp_to_tl_dispatch:w #3; ) + } + } +\cs_new:Npn \__fp_symbolic_function_to_tl:Nw #1, #2@ + { + \use:e + { + \__fp_types_cs_to_op:N #1 + ( \__fp_array_to_clist:n {#2} ) + } + } +\prg_new_protected_conditional:Npnn + \__fp_id_if_invalid:n #1 { T , F , TF } + { + \tl_if_empty:nTF {#1} + { \prg_return_true: } + { + \tl_if_in:onTF { \tl_to_str:n {#1} } { ~ } + { \prg_return_true: } + { + \exp_after:wN \__fp_id_if_invalid_aux:N \tl_to_str:n {#1} + { ? \prg_break:n \prg_return_false: } + \prg_break_point: + } + } + } +\cs_new:Npn \__fp_id_if_invalid_aux:N #1 + { + \use_none:n #1 + \int_compare:nF { `a <= `#1 <= `z } + { + \int_compare:nF { `A <= `#1 <= `Z } + { \prg_break:n \prg_return_true: } + } + \__fp_id_if_invalid_aux:N + } +\cs_new:Npn \__fp_variable_o:w #1 @ #2 + { + \fp_if_exist:cTF { l__fp_variable_#1_fp } + { + \exp_last_unbraced:Nf \__fp_exp_after_array_f:w + { \use:c { l__fp_variable_#1_fp } } \s__fp_expr_stop + \exp_after:wN \exp_stop_f: #2 + } + { + \token_if_eq_meaning:NNTF #2 \prg_do_nothing: + { + \s__fp_symbolic \__fp_symbolic_chk:w + \__fp_variable_o:w #1 , { } ; + } + { + \exp_after:wN \s__fp_symbolic + \exp_after:wN \__fp_symbolic_chk:w + \exp_after:wN \__fp_variable_o:w + \exp:w + \__fp_exp_after_symbolic_loop:N #1 + { , \exp:w \use_none:nn } + \exp_after:wN \exp_end: + \exp_after:wN { \exp_after:wN } \exp_after:wN ; + #2 + } + } + } +\cs_new:Npn \__fp_variable_set_parsing:Nn #1#2 + { + \cs_set_nopar:Npn \__fp_tmp:w + { + \__fp_exp_after_symbolic_f:nw { \__fp_parse_infix:NN } + \s__fp_symbolic \__fp_symbolic_chk:w + \__fp_variable_o:w #2 , { } ; + } + \exp_args:NNc \__fp_variable_set_parsing_aux:NNn #1 + { __fp_parse_word_#2:N } {#2} + } +\cs_new:Npn \__fp_variable_set_parsing_aux:NNn #1#2#3 + { + \cs_if_eq:NNF #2 \__fp_tmp:w + { + \cs_if_exist:NTF #2 + { + \msg_warning:nnnn + { fp } { id-used-elsewhere } {#3} { variable } + #1 #2 \__fp_tmp:w + } + { + \cs_new_eq:NN #2 \scan_stop: % to declare the function + #1 #2 \__fp_tmp:w + } + } + } +\cs_new_protected:Npn \fp_clear_variable:n #1 + { + \__fp_id_if_invalid:nTF {#1} + { \msg_error:nnn { fp } { id-invalid } {#1} } + { \exp_args:No \__fp_clear_variable:n { \tl_to_str:n {#1} } } + } +\cs_new_protected:Npn \__fp_clear_variable:n #1 + { + \cs_undefine:c { l__fp_variable_#1_fp } + \__fp_variable_set_parsing:Nn \cs_set_eq:NN {#1} + } +\cs_new_protected:Npn \fp_new_variable:n #1 + { + \__fp_id_if_invalid:nTF {#1} + { \msg_error:nnn { fp } { id-invalid } {#1} } + { \exp_args:No \__fp_new_variable:n { \tl_to_str:n {#1} } } + } +\cs_new_protected:Npn \__fp_new_variable:n #1 + { + \cs_if_exist:cT { __fp_parse_word_#1:N } + { + \msg_error:nnn + { fp } { id-already-defined } {#1} + \cs_undefine:c { __fp_parse_word_#1:N } + \cs_undefine:c { l__fp_variable_#1_fp } + } + \__fp_variable_set_parsing:Nn \cs_gset_eq:NN {#1} + } +\flag_new:n { __fp_symbolic } +\cs_new_protected:Npn \fp_set_variable:nn #1 + { + \__fp_id_if_invalid:nTF {#1} + { \msg_error:nnn { fp } { id-invalid } {#1} } + { \exp_args:No \__fp_set_variable:nn { \tl_to_str:n {#1} } } + } +\cs_new_protected:Npn \__fp_set_variable:nn #1#2 + { + \__fp_variable_set_parsing:Nn \cs_set_eq:NN {#1} + \fp_set:Nn \l__fp_symbolic_fp {#2} + \cs_set_nopar:cpn { l__fp_variable_#1_fp } + { \flag_ensure_raised:n { __fp_symbolic } \c_nan_fp } + \flag_clear:n { __fp_symbolic } + \fp_set:cn { l__fp_variable_#1_fp } { \l__fp_symbolic_fp } + \flag_if_raised:nT { __fp_symbolic } + { + \msg_error:nneee { fp } { id-loop } + { \tl_to_str:n {#1} } + { \tl_to_str:n {#2} } + { \fp_to_tl:N \l__fp_symbolic_fp } + } + } +\msg_new:nnnn { fp } { id-invalid } + { Floating~point~identifier~'#1'~invalid. } + { + LaTeX~has~been~asked~to~create~a~new~floating~point~identifier~'#1'~ + but~this~may~only~contain~ASCII~letters. + } +\msg_new:nnnn { fp } { id-already-defined } + { Floating~point~identifier~'#1'~already~defined. } + { + LaTeX~has~been~asked~to~create~a~new~floating~point~identifier~'#1'~ + but~this~name~has~already~been~used~elsewhere. + } +\msg_new:nnnn { fp } { id-used-elsewhere } + { Floating~point~identifier~'#1'~already~used~for~something~else. } + { + LaTeX~has~been~asked~to~create~a~new~floating~point~identifier~'#1'~ + but~this~name~is~used,~and~is~not~a~user-defined~#2. + } +\msg_new:nnnn { fp } { id-loop } + { Variable~'#1'~used~in~the~definition~of~'#1'. } + { + LaTeX~has~been~asked~to~set~the~floating~point~identifier~'#1'~ + to~the~expression~'#2'.~Evaluating~this~expression~yields~'#3',~ + which~contains~'#1'~itself. + } +%% File l3fp-functions.dtx (C) Copyright 2012-2018,2020,2021,2023 The LaTeX Project +\cs_new_protected:Npn \fp_new_function:n #1 + { \exp_args:No \__fp_new_function:n { \tl_to_str:n {#1} } } +\cs_new_protected:Npn \__fp_new_function:n #1 + { + \__fp_id_if_invalid:nTF {#1} + { \msg_error:nnn { fp } { invalid-identifier } {#1} } + { + \cs_if_exist:cT { __fp_parse_word_#1:N } + { + \msg_error:nnn + { fp } { id-already-defined } {#1} + \cs_undefine:c { __fp_parse_word_#1:N } + \cs_undefine:c { __fp_#1_o:w } + } + \__fp_function_set_parsing:Nn \cs_gset_eq:NN {#1} + } + } +\cs_new:Npn \__fp_function_set_parsing:Nn #1#2 + { + \exp_args:NNc \__fp_function_set_parsing_aux:NNn #1 + { __fp_parse_word_#2:N } {#2} + } +\cs_new:Npn \__fp_function_set_parsing_aux:NNn #1#2#3 + { + \cs_set:Npe \__fp_tmp:w + { + \exp_not:N \__fp_parse_function:NNN + \exp_not:N \__fp_function_o:w + \exp_not:c { __fp_#3_o:w } + } + \cs_if_eq:NNF #2 \__fp_tmp:w + { + \cs_if_exist:NTF #2 + { + \msg_warning:nnnn + { fp } { id-used-elsewhere } {#3} { function } + #1 #2 \__fp_tmp:w + } + { + \cs_new_eq:NN #2 \scan_stop: % to declare the function + #1 #2 \__fp_tmp:w + } + } + } +\cs_new:Npn \__fp_function_o:w #1#2 @ + { + \cs_if_exist:NTF #1 + { #1 #2 @ } + { + \exp_after:wN \s__fp_symbolic + \exp_after:wN \__fp_symbolic_chk:w + \exp_after:wN \__fp_function_o:w + \exp_after:wN #1 + \exp_after:wN , + \exp_after:wN { + \exp:w \exp_end_continue_f:w + \__fp_exp_after_array_f:w #2 \s__fp_expr_stop + \exp_after:wN + } + \exp_after:wN ; + } + } +\int_new:N \l__fp_function_arg_int +\cs_new_protected:Npn \fp_set_function:nnn #1 + { + \exp_args:NNo \__fp_set_function:Nnnn \cs_set_eq:cN + { \tl_to_str:n {#1} } + } +\cs_new_protected:Npn \__fp_set_function:Nnnn #1#2#3#4 + { + \__fp_id_if_invalid:nTF {#2} + { \msg_error:nnn { fp } { invalid-identifier } {#2} } + { + \cs_if_exist:cF { __fp_parse_word_#2:N } + { \__fp_function_set_parsing:Nn \cs_set_eq:NN {#2} } + \group_begin: + \int_zero:N \l__fp_function_arg_int + \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#3} } + { + \int_incr:N \l__fp_function_arg_int + \exp_args:Ne \__fp_clear_variable:n + { _ \tex_romannumeral:D \l__fp_function_arg_int } + \fp_clear_variable:n {##1} + \cs_set_nopar:cpe { l__fp_variable_##1_fp } + { + \exp_not:N \s__fp_symbolic + \exp_not:N \__fp_symbolic_chk:w + \exp_not:N \__fp_function_arg_o:w + \int_use:N \l__fp_function_arg_int + ########1 , { } ; + } + } + \cs_set:Npn \__fp_function_arg_o:w ##1 @ + { + \exp_after:wN \s__fp_symbolic + \exp_after:wN \__fp_symbolic_chk:w + \exp_after:wN \__fp_function_arg_o:w + \tex_romannumeral:D + \__fp_exp_after_symbolic_loop:N ##1 + { , \tex_romannumeral:D \use_none:nn } + \exp_after:wN \c_zero_int + \exp_after:wN { \exp_after:wN } \exp_after:wN ; + } + \fp_set:Nn \l__fp_symbolic_fp {#4} + \use:e + { + \exp_not:n { \cs_gset:Npn \__fp_tmp:w ##1 } + { \exp_not:o { \l__fp_symbolic_fp } } + } + \use:e + { + \exp_not:n { \cs_gset:Npn \__fp_tmp:w ##1 @ } + { + \exp_not:N \__fp_exp_after_symbolic_f:nw + \exp_not:n { { \exp_after:wN \exp_stop_f: } } + \exp_not:o { \__fp_tmp:w { . , {##1} } } + } + } + \group_end: + #1 { __fp_#2_o:w } \__fp_tmp:w + } + } +\cs_new:Npn \__fp_function_arg_o:w #1. #2 + { + \if_meaning:w @ #2 + \exp_after:wN \__fp_function_arg_few:w + \fi: + \if_int_compare:w #1 = \c_one_int + \exp_after:wN \__fp_function_arg_get:w + \fi: + \__fp_use_i_until_s:nw + { + \exp_after:wN \__fp_function_arg_o:w + \int_value:w \int_eval:n { #1 - 1 } . + } + #2 + } +\cs_new:Npn \__fp_function_arg_few:w #1 @ { \exp_after:wN \c_nan_fp } +\cs_new:Npn \__fp_function_arg_get:w #1#2#3; #4 @ + { + \__fp_exp_after_array_f:w #3; \s__fp_expr_stop + \exp_after:wN \exp_stop_f: + } +\cs_new_protected:Npn \fp_clear_function:n #1 + { \exp_args:No \__fp_clear_function:n { \tl_to_str:n {#1} } } +\cs_new_protected:Npn \__fp_clear_function:n #1 + { + \cs_undefine:c { __fp_parse_word_ #1 :N } + \__fp_function_set_parsing:Nn \cs_set_eq:NN {#1} + } %% File: l3fparray.dtx \int_new:N \g__fp_array_int \int_new:N \l__fp_array_loop_int @@ -23058,6 +23643,30 @@ Type H <return> for immediate help}\def~{\errmessage{% } } \group_end: +\group_begin: + \char_set_catcode_active:N \^^@ + \cs_new_protected:Npn \__tl_analysis_disable_char:N #1 + { + \tex_lccode:D `#1 = 32 \exp_stop_f: + \tex_lowercase:D { \if_meaning:w #1 } \tex_undefined:D + \tex_let:D #1 \tex_undefined:D + \fi: + } + \bool_lazy_or:nnT + { \sys_if_engine_ptex_p: } + { \sys_if_engine_uptex_p: } + { + \cs_gset_protected:Npn \__tl_analysis_disable_char:N #1 + { + \if_int_compare:w 256 > `#1 \exp_stop_f: + \tex_lccode:D `#1 = 32 \exp_stop_f: + \tex_lowercase:D { \if_meaning:w #1 } \tex_undefined:D + \tex_let:D #1 \tex_undefined:D + \fi: + \fi: + } + } +\group_end: \cs_new_protected:Npn \__tl_analysis_a:n #1 { \__tl_analysis_disable:n { 32 } @@ -23179,7 +23788,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \use_ii:nn \fi: { - \__tl_analysis_disable:n { `#1 } + \__tl_analysis_disable_char:N #1 \int_incr:N \l__tl_analysis_normal_int } { \__tl_analysis_cs_space_count:NN \__tl_analysis_a_cs:ww #1 } @@ -33038,57 +33647,64 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__text_change_case:nnn { lower } { } {#1} } \cs_new:Npn \text_uppercase:n #1 { \__text_change_case:nnn { upper } { } {#1} } -\cs_new:Npn \text_titlecase:n #1 +\cs_new:Npn \text_titlecase_all:n #1 { \__text_change_case:nnn { title } { } {#1} } \cs_new:Npn \text_titlecase_first:n #1 - { \__text_change_case:nnn { titleonly } { } {#1} } + { \__text_change_case:nnnn { title } { break } { } {#1} } \cs_new:Npn \text_lowercase:nn #1#2 { \__text_change_case:nnn { lower } {#1} {#2} } \cs_new:Npn \text_uppercase:nn #1#2 { \__text_change_case:nnn { upper } {#1} {#2} } -\cs_new:Npn \text_titlecase:nn #1#2 +\cs_new:Npn \text_titlecase_all:nn #1#2 { \__text_change_case:nnn { title } {#1} {#2} } \cs_new:Npn \text_titlecase_first:nn #1#2 - { \__text_change_case:nnn { titleonly } {#1} {#2} } + { \__text_change_case:nnnn { title } { break } {#1} {#2} } \cs_new:Npn \__text_change_case:nnn #1#2#3 + { \__text_change_case:nnnn {#1} {#1} {#2} {#3} } +\cs_new:Npn \__text_change_case:nnnn #1#2#3#4 { \__kernel_exp_not:w \exp_after:wN { \exp:w - \exp_args:Ne \__text_change_case_auxi:nnn - { \text_expand:n {#3} } - {#1} {#2} + \exp_args:Ne \__text_change_case_auxi:nnnn + { \text_expand:n {#4} } + {#1} {#2} {#3} } } -\cs_new:Npn \__text_change_case_auxi:nnn #1#2#3 - { \exp_args:No \__text_change_case_BCP:nnn { \tl_to_str:n {#3} } {#1} {#2} } -\cs_new:Npe \__text_change_case_BCP:nnn #1#2#3 +\cs_new:Npn \__text_change_case_auxi:nnnn #1#2#3#4 { - \exp_not:N \__text_change_case_BCP:nnw - {#2} {#3} #1 \tl_to_str:n { -x- -x- } \exp_not:N \q__text_stop + \exp_args:No \__text_change_case_BCP:nnnn + { \tl_to_str:n {#4} } {#1} {#2} {#3} + } +\cs_new:Npe \__text_change_case_BCP:nnnn #1#2#3#4 + { + \exp_not:N \__text_change_case_BCP:nnnw + {#2} {#3} {#4} #1 \tl_to_str:n { -x- -x- } \exp_not:N \q__text_stop } \use:e { - \cs_new:Npn \exp_not:N \__text_change_case_BCP:nnw - #1#2#3 \tl_to_str:n { -x- } #4 \tl_to_str:n { -x- } #5 + \cs_new:Npn \exp_not:N \__text_change_case_BCP:nnnw + #1#2#3#4 \tl_to_str:n { -x- } #5 \tl_to_str:n { -x- } #6 \exp_not:N \q__text_stop } - { \__text_change_case_BCP:nnnnw {#1} {#2} {#4} {#3} #3 - - \q__text_stop } -\cs_new:Npn \__text_change_case_BCP:nnnnw #1#2#3#4#5 - #6 - #7 \q__text_stop + { \__text_change_case_BCP:nnnnnw {#1} {#2} {#3} {#5} {#4} #4 - \q__text_stop } +\cs_new:Npn \__text_change_case_BCP:nnnnnw #1#2#3#4#5#6 - #7 \q__text_stop { - \cs_if_exist:cTF { __text_change_case_ #2 _ #5 -x- #3 :nnnn } - { \__text_change_case_auxii:nnn {#1} {#2} { #5 -x- #3 } } + \bool_lazy_or:nnTF + { \cs_if_exist_p:c { __text_change_case_ #2 _ #6 -x- #4 :nnnnn } } + { \tl_if_exist_p:c { l__text_ #2 case_special_ #6 -x- #4 _tl } } + { \__text_change_case_auxii:nnnn {#1} {#2} {#3} { #6 -x- #4 } } { - \cs_if_exist:cTF { __text_change_case_ #2 _ #5 :nnnn } - { \__text_change_case_auxii:nnn {#1} {#2} {#5} } - { \__text_change_case_auxii:nnn {#1} {#2} {#4} } + \cs_if_exist:cTF { __text_change_case_ #2 _ #6 :nnnnn } + { \__text_change_case_auxii:nnnn {#1} {#2} {#3} {#6} } + { \__text_change_case_auxii:nnnn {#1} {#2} {#3} {#5} } } } -\cs_new:Npn \__text_change_case_auxii:nnn #1#2#3 +\cs_new:Npn \__text_change_case_auxii:nnnn #1#2#3#4 { \group_align_safe_begin: - \cs_if_exist_use:c { __text_change_case_boundary_ #2 _ #3 :Nnnw } - \__text_change_case_loop:nnw {#2} {#3} #1 + \cs_if_exist_use:c { __text_change_case_boundary_ #2 _ #4 :Nnnnw } + \__text_change_case_loop:nnnw {#2} {#3} {#4} #1 \q__text_recursion_tail \q__text_recursion_stop \__text_change_case_result:n { } } @@ -33103,378 +33719,387 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_end: #2 } -\cs_new:Npn \__text_change_case_loop:nnw #1#2#3 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_loop:nnnw #1#2#3#4 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_N_type:nnN } + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_N_type:nnnN } { - \tl_if_head_is_group:nTF {#3} - { \use:c { __text_change_case_group_ #1 :nnn } } - { \__text_change_case_space:nnw } + \tl_if_head_is_group:nTF {#4} + { \use:c { __text_change_case_group_ #1 :nnnn } } + { \__text_change_case_space:nnnw } } - {#1} {#2} #3 \q__text_recursion_stop + {#1} {#2} {#3} #4 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_break:w #1 \q__text_recursion_tail \q__text_recursion_stop +\cs_new:Npn \__text_change_case_break:w + { \__text_change_case_break_aux:w \prg_do_nothing: } +\cs_new:Npn \__text_change_case_break_aux:w + #1 \q__text_recursion_tail \q__text_recursion_stop { - \__text_change_case_store:n {#1} + \__text_change_case_store:o {#1} \__text_change_case_end:w } -\cs_new:Npn \__text_change_case_group_lower:nnn #1#2#3 - { - \__text_change_case_store:o - { - \exp_after:wN - { - \exp:w - \__text_change_case_auxii:nnn {#3} {#1} {#2} - } - } - \__text_change_case_loop:nnw {#1} {#2} - } -\cs_new_eq:NN \__text_change_case_group_upper:nnn - \__text_change_case_group_lower:nnn -\cs_new:Npn \__text_change_case_group_title:nnn #1#2#3 +\cs_new:Npn \__text_change_case_group_lower:nnnn #1#2#3#4 { \__text_change_case_store:o { \exp_after:wN { \exp:w - \__text_change_case_auxii:nnn {#3} {#1} {#2} + \__text_change_case_auxii:nnnn {#4} {#1} {#2} {#3} } } - \__text_change_case_loop:nnw { lower } {#2} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } -\cs_new:Npn \__text_change_case_group_titleonly:nnn #1#2#3 +\cs_new_eq:NN \__text_change_case_group_upper:nnnn + \__text_change_case_group_lower:nnnn +\cs_new:Npn \__text_change_case_group_title:nnnn #1#2#3#4 { \__text_change_case_store:o { \exp_after:wN { \exp:w - \__text_change_case_auxii:nnn {#3} {#1} {#2} + \__text_change_case_auxii:nnnn {#4} {#1} {#2} {#3} } } - \__text_change_case_break:w + \__text_change_case_skip:nnw {#2} {#3} } \use:e { - \cs_new:Npn \exp_not:N \__text_change_case_space:nnw #1#2 \c_space_tl + \cs_new:Npn \exp_not:N \__text_change_case_space:nnnw #1#2#3 \c_space_tl } { \__text_change_case_store:n { ~ } - \cs_if_exist_use:c { __text_change_case_boundary_ #1 _ #2 :Nnnw } - \__text_change_case_loop:nnw {#1} {#2} + \cs_if_exist_use:cF { __text_change_case_space_ #2 :nnn } + { + \cs_if_exist_use:c { __text_change_case_boundary_ #1 _ #3 :Nnnnw } + \__text_change_case_loop:nnnw + } + {#2} {#2} {#3} } -\cs_new:Npn \__text_change_case_N_type:nnN #1#2#3 +\cs_new:Npn \__text_change_case_space_break:nnn #1#2#3 + { \__text_change_case_break:w } +\cs_new:Npn \__text_change_case_N_type:nnnN #1#2#3#4 { - \__text_if_q_recursion_tail_stop_do:Nn #3 + \__text_if_q_recursion_tail_stop_do:Nn #4 { \__text_change_case_end:w } - \__text_change_case_N_type_aux:nnN {#1} {#2} #3 + \__text_change_case_N_type_aux:nnnN {#1} {#2} {#3} #4 } -\cs_new:Npn \__text_change_case_N_type_aux:nnN #1#2#3 +\cs_new:Npn \__text_change_case_N_type_aux:nnnN #1#2#3#4 { - \exp_args:NV \__text_change_case_N_type:nnnN - \l_text_math_delims_tl {#1} {#2} #3 + \exp_args:NV \__text_change_case_N_type:nnnnN + \l_text_math_delims_tl {#1} {#2} {#3} #4 } -\cs_new:Npn \__text_change_case_N_type:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_N_type:nnnnN #1#2#3#4#5 { - \__text_change_case_math_search:nnNNN {#2} {#3} #4 #1 + \__text_change_case_math_search:nnnNNN {#2} {#3} {#4} #5 #1 \q__text_recursion_tail \q__text_recursion_tail \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_math_search:nnNNN #1#2#3#4#5 +\cs_new:Npn \__text_change_case_math_search:nnnNNN #1#2#3#4#5#6 { - \__text_if_q_recursion_tail_stop_do:Nn #4 - { \__text_change_case_cs_check:nnN {#1} {#2} #3 } - \token_if_eq_meaning:NNTF #3 #4 + \__text_if_q_recursion_tail_stop_do:Nn #5 + { \__text_change_case_cs_check:nnnN {#1} {#2} {#3} #4 } + \token_if_eq_meaning:NNTF #4 #5 { \__text_use_i_delimit_by_q_recursion_stop:nw { - \__text_change_case_store:n {#3} - \__text_change_case_math_loop:nnNw {#1} {#2} #5 + \__text_change_case_store:n {#4} + \__text_change_case_math_loop:nnnNw {#1} {#2} {#3} #6 } } - { \__text_change_case_math_search:nnNNN {#1} {#2} #3 } + { \__text_change_case_math_search:nnnNNN {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_math_loop:nnNw #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_math_loop:nnnNw #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_math_N_type:nnNN } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_math_N_type:nnnNN } { - \tl_if_head_is_group:nTF {#4} - { \__text_change_case_math_group:nnNn } - { \__text_change_case_math_space:nnNw } + \tl_if_head_is_group:nTF {#5} + { \__text_change_case_math_group:nnnNn } + { \__text_change_case_math_space:nnnNw } } - {#1} {#2} #3 #4 \q__text_recursion_stop + {#1} {#2} {#3} #4 #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_math_N_type:nnNN #1#2#3#4 +\cs_new:Npn \__text_change_case_math_N_type:nnnNN #1#2#3#4#5 { - \__text_if_q_recursion_tail_stop_do:Nn #4 + \__text_if_q_recursion_tail_stop_do:Nn #5 { \__text_change_case_end:w } - \__text_change_case_store:n {#4} - \token_if_eq_meaning:NNTF #4 #3 - { \__text_change_case_loop:nnw {#1} {#2} } - { \__text_change_case_math_loop:nnNw {#1} {#2} #3 } + \__text_change_case_store:n {#5} + \token_if_eq_meaning:NNTF #5 #4 + { \__text_change_case_loop:nnnw {#1} {#2} {#3} } + { \__text_change_case_math_loop:nnnNw {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_math_group:nnNn #1#2#3#4 +\cs_new:Npn \__text_change_case_math_group:nnnNn #1#2#3#4#5 { - \__text_change_case_store:n { {#4} } - \__text_change_case_math_loop:nnNw {#1} {#2} #3 + \__text_change_case_store:n { {#5} } + \__text_change_case_math_loop:nnnNw {#1} {#2} {#3} #4 } \use:e { - \cs_new:Npn \exp_not:N \__text_change_case_math_space:nnNw #1#2#3 + \cs_new:Npn \exp_not:N \__text_change_case_math_space:nnnNw #1#2#3#4 \c_space_tl } { \__text_change_case_store:n { ~ } - \__text_change_case_math_loop:nnNw {#1} {#2} #3 + \__text_change_case_math_loop:nnnNw {#1} {#2} {#3} #4 } -\cs_new:Npn \__text_change_case_cs_check:nnN #1#2#3 +\cs_new:Npn \__text_change_case_cs_check:nnnN #1#2#3#4 { - \token_if_cs:NTF #3 - { \__text_change_case_exclude:nnN {#1} {#2} } + \token_if_cs:NTF #4 + { \__text_change_case_exclude:nnnN {#1} {#2} {#3} } { \__text_codepoint_process:nN - { \use:c { __text_change_case_custom_ #1 :nnn } {#1} {#2} } + { \use:c { __text_change_case_custom_ #1 :nnnn } {#1} {#2} {#3} } } - #3 + #4 } -\cs_new:Npn \__text_change_case_exclude:nnN #1#2#3 +\cs_new:Npn \__text_change_case_exclude:nnnN #1#2#3#4 { - \exp_args:Ne \__text_change_case_exclude:nnnN + \exp_args:Ne \__text_change_case_exclude:nnnnN { \exp_not:V \l_text_math_arg_tl \exp_not:V \l_text_case_exclude_arg_tl } - {#1} {#2} #3 + {#1} {#2} {#3} #4 } -\cs_new:Npn \__text_change_case_exclude:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_exclude:nnnnN #1#2#3#4#5 { - \__text_change_case_exclude:nnNN {#2} {#3} #4 #1 + \__text_change_case_exclude:nnnNN {#2} {#3} {#4} #5 #1 \q__text_recursion_tail \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_exclude:nnNN #1#2#3#4 +\cs_new:Npn \__text_change_case_exclude:nnnNN #1#2#3#4#5 { - \__text_if_q_recursion_tail_stop_do:Nn #4 - { \__text_change_case_replace:nnN {#1} {#2} #3 } - \str_if_eq:nnTF {#3} {#4} + \__text_if_q_recursion_tail_stop_do:Nn #5 + { \__text_change_case_replace:nnnN {#1} {#2} {#3} #4 } + \str_if_eq:nnTF {#4} {#5} { \__text_use_i_delimit_by_q_recursion_stop:nw - { \__text_change_case_exclude:nnNw {#1} {#2} #3 } + { \__text_change_case_exclude:nnnNw {#1} {#2} {#3} #4 } } - { \__text_change_case_exclude:nnNN {#1} {#2} #3 } + { \__text_change_case_exclude:nnnNN {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_exclude:nnNw #1#2#3#4# - { \__text_change_case_exclude:nnNnn {#1} {#2} {#3} {#4} } -\cs_new:Npn \__text_change_case_exclude:nnNnn #1#2#3#4#5 +\cs_new:Npn \__text_change_case_exclude:nnnNw #1#2#3#4#5# + { \__text_change_case_exclude:nnnNnn {#1} {#2} {#3} {#4} {#5} } +\cs_new:Npn \__text_change_case_exclude:nnnNnn #1#2#3#4#5#6 { - \tl_if_blank:nTF {#4} - { \__text_change_case_store:n { #3 {#5} } } + \tl_if_blank:nTF {#5} + { \__text_change_case_store:n { #4 {#6} } } { \__text_change_case_store:o { - \exp_after:wN #3 - \exp:w \__text_change_case_auxii:nnn {#4} {#1} {#2} - {#5} + \exp_after:wN #4 + \exp:w \__text_change_case_auxii:nnnn {#5} {#1} {#2} {#3} + {#6} } } - \__text_change_case_loop:nnw {#1} {#2} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } -\cs_new:Npn \__text_change_case_replace:nnN #1#2#3 +\cs_new:Npn \__text_change_case_replace:nnnN #1#2#3#4 { - \cs_if_exist:cTF { l__text_case_ \token_to_str:N #3 _tl } + \cs_if_exist:cTF { l__text_case_ \token_to_str:N #4 _tl } { - \__text_change_case_replace:vnn - { l__text_case_ \token_to_str:N #3 _tl } {#1} {#2} + \__text_change_case_replace:vnnn + { l__text_case_ \token_to_str:N #4 _tl } {#1} {#2} {#3} } - { \__text_change_case_switch:nnN {#1} {#2} #3 } + { \__text_change_case_switch:nnnN {#1} {#2} {#3} #4 } + } +\cs_new:Npn \__text_change_case_replace:nnnn #1#2#3#4 + { \__text_change_case_loop:nnnw {#2} {#3} {#4} #1 } +\cs_generate_variant:Nn \__text_change_case_replace:nnnn { v } +\cs_new:Npn \__text_change_case_switch:nnnN #1#2#3#4 + { + \cs_if_eq:NNTF #4 \text_case_switch:nnnn + { \use:c { __text_change_case_switch_ #1 :nnnNnnnn } } + { \use:c { __text_change_case_letterlike_ #1 :nnnN } } + {#1} {#2} {#3} #4 } -\cs_new:Npn \__text_change_case_replace:nnn #1#2#3 - { \__text_change_case_loop:nnw {#2} {#3} #1 } -\cs_generate_variant:Nn \__text_change_case_replace:nnn { v } -\cs_new:Npn \__text_change_case_switch:nnN #1#2#3 +\cs_new:Npn \__text_change_case_switch_lower:nnnNnnnn #1#2#3#4#5#6#7#8 { - \cs_if_eq:NNTF #3 \text_case_switch:nnnn - { \use:c { __text_change_case_switch_ #1 :nnNnnnn } } - { \use:c { __text_change_case_letterlike_ #1 :nnN } } - {#1} {#2} #3 + \__text_change_case_store:n {#7} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } -\cs_new:Npn \__text_change_case_switch_lower:nnNnnnn #1#2#3#4#5#6#7 +\cs_new:Npn \__text_change_case_switch_upper:nnnNnnnn #1#2#3#4#5#6#7#8 { \__text_change_case_store:n {#6} - \__text_change_case_loop:nnw {#1} {#2} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } -\cs_new:Npn \__text_change_case_switch_upper:nnNnnnn #1#2#3#4#5#6#7 +\cs_new:Npn \__text_change_case_switch_title:nnnNnnnn #1#2#3#4#5#6#7#8 { - \__text_change_case_store:n {#5} - \__text_change_case_loop:nnw {#1} {#2} + \__text_change_case_store:n {#8} + \__text_change_case_skip:nnw {#2} {#3} } -\cs_new:Npn \__text_change_case_switch_title:nnNnnnn #1#2#3#4#5#6#7 +\cs_new:Npn \__text_change_case_skip:nnw #1#2#3 \q__text_recursion_stop { - \__text_change_case_store:n {#7} - \__text_change_case_loop:nnw {#1} {#2} + \tl_if_head_is_N_type:nTF {#3} + { \__text_change_case_skip_N_type:nnN } + { + \tl_if_head_is_group:nTF {#3} + { \__text_change_case_skip_group:nnn } + { \__text_change_case_skip_space:nnw } + } + {#1} {#2} #3 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_switch_titleonly:nnNnnnn #1#2#3#4#5#6#7 +\cs_new:Npn \__text_change_case_skip_N_type:nnN #1#2#3 { - \__text_change_case_store:n {#7} - \__text_change_case_break:w + \__text_if_q_recursion_tail_stop_do:Nn #3 + { \__text_change_case_end:w } + \__text_change_case_store:n {#3} + \__text_change_case_skip:nnw {#1} {#2} + } +\cs_new:Npn \__text_change_case_skip_group:nnn #1#2#3 + { + \__text_change_case_store:n { {#3} } + \__text_change_case_skip:nnw {#1} {#2} } -\cs_new:Npn \__text_change_case_letterlike_lower:nnN #1#2#3 - { \__text_change_case_letterlike:nnnnN {#1} {#1} {#1} {#2} #3 } -\cs_new_eq:NN \__text_change_case_letterlike_upper:nnN - \__text_change_case_letterlike_lower:nnN -\cs_new:Npn \__text_change_case_letterlike_title:nnN #1#2#3 - { \__text_change_case_letterlike:nnnnN { upper } { lower } {#1} {#2} #3 } -\cs_new:Npn \__text_change_case_letterlike_titleonly:nnN #1#2#3 - { \__text_change_case_letterlike:nnnnN { upper } { end } {#1} {#2} #3 } -\cs_new:Npn \__text_change_case_letterlike:nnnnN #1#2#3#4#5 +\cs_new:Npn \__text_change_case_skip_space:nnw #1#2 + { \__text_change_case_space:nnnw {#1} {#1} {#2} } +\cs_new:Npn \__text_change_case_letterlike_lower:nnnN #1#2#3#4 + { \__text_change_case_letterlike:nnnnnN {#1} {#1} {#1} {#2} {#3} #4 } +\cs_new_eq:NN \__text_change_case_letterlike_upper:nnnN + \__text_change_case_letterlike_lower:nnnN +\cs_new:Npn \__text_change_case_letterlike_title:nnnN #1#2#3#4 + { \__text_change_case_letterlike:nnnnnN { upper } { end } {#1} {#2} {#3} #4 } +\cs_new:Npn \__text_change_case_letterlike:nnnnnN #1#2#3#4#5#6 { - \cs_if_exist:cTF { c__text_ #1 case_ \token_to_str:N #5 _tl } + \cs_if_exist:cTF { c__text_ #1 case_ \token_to_str:N #6 _tl } { \__text_change_case_store:v - { c__text_ #1 case_ \token_to_str:N #5 _tl } - \use:c { __text_change_case_next_ #2 :nn } {#2} {#4} + { c__text_ #1 case_ \token_to_str:N #6 _tl } + \use:c { __text_change_case_next_ #2 :nnn } {#2} {#4} {#5} } { - \__text_change_case_store:n {#5} + \__text_change_case_store:n {#6} \cs_if_exist:cTF { c__text_ \str_if_eq:nnTF {#1} { lower } { upper } { lower } - case_ \token_to_str:N #5 _tl + case_ \token_to_str:N #6 _tl } - { \use:c { __text_change_case_next_ #2 :nn } {#2} {#4} } - { \__text_change_case_loop:nnw {#3} {#4} } + { \use:c { __text_change_case_next_ #2 :nnn } {#2} {#4} {#5} } + { \__text_change_case_loop:nnnw {#3} {#4} {#5} } } } -\cs_new:Npn \__text_change_case_custom_lower:nnn #1#2#3 +\cs_new:Npn \__text_change_case_custom_lower:nnnn #1#2#3#4 { - \__text_change_case_custom:nnnnn {#1} {#2} {#3} {#1} - { \use:c { __text_change_case_codepoint_ #1 :nnn } {#1} {#2} {#3} } + \__text_change_case_custom:nnnnnn {#1} {#1} {#2} {#3} {#4} + { \use:c { __text_change_case_codepoint_ #1 :nnnn } {#1} {#2} {#3} {#4} } } -\cs_new_eq:NN \__text_change_case_custom_upper:nnn - \__text_change_case_custom_lower:nnn -\cs_new:Npn \__text_change_case_custom_title:nnn #1#2#3 +\cs_new_eq:NN \__text_change_case_custom_upper:nnnn + \__text_change_case_custom_lower:nnnn +\cs_new:Npn \__text_change_case_custom_title:nnnn #1#2#3#4 { - \__text_change_case_custom:nnnnn { title } {#2} {#3} {#1} + \__text_change_case_custom:nnnnnn { title } {#1} {#2} {#3} {#4} { - \__text_change_case_custom:nnnnn { upper } {#2} {#3} {#1} - { \use:c { __text_change_case_codepoint_ #1 :nnn } {#1} {#2} {#3} } + \__text_change_case_custom:nnnnnn { upper } {#1} {#2} {#3} {#4} + { \use:c { __text_change_case_codepoint_ #1 :nnnn } {#1} {#2} {#3} {#4} } } } -\cs_new_eq:NN \__text_change_case_custom_titleonly:nnn - \__text_change_case_custom_title:nnn -\cs_new:Npn \__text_change_case_custom:nnnnn #1#2#3#4#5 +\cs_new:Npn \__text_change_case_custom:nnnnnn #1#2#3#4#5#6 { - \tl_if_exist:cTF { l__text_ #1 case _ \tl_to_str:n {#3} _ #2 _tl } + \tl_if_exist:cTF { l__text_ #1 case _ \tl_to_str:n {#5} _ #4 _tl } { - \__text_change_case_replace:vnn - { l__text_ #1 case _ \tl_to_str:n {#3} _ #2 _tl } {#4} {#2} + \__text_change_case_replace:vnnn + { l__text_ #1 case _ \tl_to_str:n {#5} _ #4 _tl } {#2} {#3} {#4} } { - \tl_if_exist:cTF { l__text_ #1 case _ \tl_to_str:n {#3} _tl } + \tl_if_exist:cTF { l__text_ #1 case _ \tl_to_str:n {#5} _tl } { - \__text_change_case_replace:vnn - { l__text_ #1 case _ \tl_to_str:n {#3} _tl } {#4} {#2} + \__text_change_case_replace:vnnn + { l__text_ #1 case _ \tl_to_str:n {#5} _tl } {#2} {#3} {#4} } - {#5} + {#6} } } -\cs_new:Npn \__text_change_case_codepoint_lower:nnn #1#2#3 +\cs_new:Npn \__text_change_case_codepoint_lower:nnnn #1#2#3#4 { - \cs_if_exist_use:cF { __text_change_case_lower_ #2 :nnnn } - { \__text_change_case_lower_sigma:nnnn } - {#1} {#1} {#2} {#3} + \cs_if_exist_use:cF { __text_change_case_lower_ #3 :nnnnn } + { \__text_change_case_lower_sigma:nnnnn } + {#1} {#1} {#2} {#3} {#4} } -\cs_new:Npn \__text_change_case_codepoint_upper:nnn #1#2#3 +\cs_new:Npn \__text_change_case_codepoint_upper:nnnn #1#2#3#4 { - \cs_if_exist_use:cF { __text_change_case_upper_ #2 :nnnn } - { \__text_change_case_codepoint:nnnn } - {#1} {#1} {#2} {#3} + \cs_if_exist_use:cF { __text_change_case_upper_ #3 :nnnnn } + { \__text_change_case_codepoint:nnnnn } + {#1} {#1} {#2} {#3} {#4} } -\cs_new:Npn \__text_change_case_lower_sigma:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_sigma:nnnnn #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "03A3 } - { \__text_change_case_lower_sigma:nnnw {#2} } - { \__text_change_case_codepoint:nnnn {#1} {#2} } - {#3} {#4} + \__text_codepoint_compare:nNnTF {#5} = { "03A3 } + { \__text_change_case_lower_sigma:nnnnw {#2} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} } + {#3} {#4} {#5} } -\cs_new:Npn \__text_change_case_lower_sigma:nnnw #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_lower_sigma:nnnnw #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_lower_sigma:nnnN {#3} } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_lower_sigma:nnnnN {#4} } { \__text_change_case_store:e - { \codepoint_generate:nn { "03C2 } { \__text_char_catcode:N #3 } } - \__text_change_case_loop:nnw + { \codepoint_generate:nn { "03C2 } { \__text_char_catcode:N #4 } } + \__text_change_case_loop:nnnw } - {#1} {#2} #4 \q__text_recursion_stop + {#1} {#2} {#3} #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_lower_sigma:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_sigma:nnnnN #1#2#3#4#5 { \__text_change_case_store:e { \bool_lazy_or:nnTF - { \token_if_letter_p:N #4 } + { \token_if_letter_p:N #5 } { \bool_lazy_and_p:nn - { \token_if_active_p:N #4 } - { \int_compare_p:nNn {`#4} > { "80 } } + { \token_if_active_p:N #5 } + { \int_compare_p:nNn {`#5} > { "80 } } } { \codepoint_generate:nn { "03C3 } { \__text_char_catcode:N #1 } } { \codepoint_generate:nn { "03C2 } { \__text_char_catcode:N #1 } } } - \__text_change_case_loop:nnw {#2} {#3} #4 + \__text_change_case_loop:nnnw {#2} {#3} {#4} #5 } -\cs_new:Npn \__text_change_case_codepoint_title:nnn #1#2#3 +\cs_new:Npn \__text_change_case_codepoint_title:nnnn #1#2#3#4 { \bool_if:NTF \l_text_titlecase_check_letter_bool { - \tl_if_single:nTF {#3} + \tl_if_single:nTF {#4} { \bool_lazy_or:nnTF - { \token_if_letter_p:N #3 } + { \token_if_letter_p:N #4 } { \bool_lazy_and_p:nn - { \token_if_active_p:N #3 } - { ! \int_compare_p:nNn {`#3} < { "80 } } + { \token_if_active_p:N #4 } + { ! \int_compare_p:nNn {`#4} < { "80 } } } - { \use:c { __text_change_case_codepoint_ #1 :nn } } - { \__text_change_case_codepoint_title:nnnn { title } {#1} } + { \__text_change_case_codepoint_title:nnn } + { \__text_change_case_codepoint_title:nnnnn { title } {#1} } } - { \use:c { __text_change_case_codepoint_ #1 :nn } } + { \__text_change_case_codepoint_title:nnn } } - { \use:c { __text_change_case_codepoint_ #1 :nn } } - {#2} {#3} + { \__text_change_case_codepoint_title:nnn } + {#2} {#3} {#4} } -\cs_new_eq:NN \__text_change_case_codepoint_titleonly:nnn - \__text_change_case_codepoint_title:nnn -\cs_new:Npn \__text_change_case_codepoint_title:nn #1#2 - { \__text_change_case_codepoint_title:nnnn { title } { lower } {#1} {#2} } -\cs_new:Npn \__text_change_case_codepoint_titleonly:nn #1#2 - { \__text_change_case_codepoint_title:nnnn { title } { end } {#1} {#2} } -\cs_new:Npn \__text_change_case_codepoint_title:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_codepoint_title:nnn #1#2#3 + { \__text_change_case_codepoint_title:nnnnn { title } { end } {#1} {#2} {#3} } +\cs_new:Npn \__text_change_case_codepoint_title:nnnnn #1#2#3#4#5 { - \cs_if_exist_use:cF { __text_change_case_title_ #3 :nnnn } + \cs_if_exist_use:cF { __text_change_case_title_ #4 :nnnnn } { - \cs_if_exist_use:cF { __text_change_case_upper_ #3 :nnnn } - { \__text_change_case_codepoint:nnnn } + \cs_if_exist_use:cF { __text_change_case_upper_ #4 :nnnnn } + { \__text_change_case_codepoint:nnnnn } } - {#1} {#2} {#3} {#4} + {#1} {#2} {#3} {#4} {#5} } -\cs_new:Npn \__text_change_case_codepoint:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_codepoint:nnnnn #1#2#3#4#5 { \bool_lazy_and:nnTF - { \tl_if_single_p:n {#4} } - { \token_if_active_p:N #4 } - { \__text_change_case_store:n {#4} } + { \tl_if_single_p:n {#5} } + { \token_if_active_p:N #5 } + { \__text_change_case_store:n {#5} } { \__text_change_case_store:e - { \__text_change_case_codepoint:nn {#1} {#4} } + { \__text_change_case_codepoint:nn {#1} {#5} } } - \use:c { __text_change_case_next_ #2 :nn } {#2} {#3} + \use:c { __text_change_case_next_ #2 :nnn } {#2} {#3} {#4} } \cs_new:Npn \__text_change_case_codepoint:nn #1#2 { @@ -33540,16 +34165,14 @@ Type H <return> for immediate help}\def~{\errmessage{% } } } -\cs_new:Npn \__text_change_case_next_lower:nn #1#2 - { \__text_change_case_loop:nnw {#1} {#2} } -\cs_new_eq:NN \__text_change_case_next_upper:nn - \__text_change_case_next_lower:nn -\cs_new_eq:NN \__text_change_case_next_title:nn - \__text_change_case_next_lower:nn -\cs_new_eq:NN \__text_change_case_next_titleonly:nn - \__text_change_case_next_lower:nn -\cs_new:Npn \__text_change_case_next_end:nn #1#2 - { \__text_change_case_break:w } +\cs_new:Npn \__text_change_case_next_lower:nnn #1#2#3 + { \__text_change_case_loop:nnnw {#1} {#2} {#3} } +\cs_new_eq:NN \__text_change_case_next_upper:nnn + \__text_change_case_next_lower:nnn +\cs_new_eq:NN \__text_change_case_next_title:nnn + \__text_change_case_next_lower:nnn +\cs_new:Npn \__text_change_case_next_end:nnn #1#2#3 + { \__text_change_case_skip:nnw {#2} {#3} } \cs_new_protected:Npn \text_declare_case_equivalent:Nn #1#2 { \tl_clear_new:c { l__text_case_ \token_to_str:N #1 _tl } @@ -33586,6 +34209,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_clear_new:c { l__text_ #2 case _ #1 _ #3 _tl } \tl_set:cn { l__text_ #2 case _ #1 _ #3 _ tl } {#4} + \tl_clear_new:c { l__text_ #2 case_special_ #3 _tl } } \cs_new:Npn \text_case_switch:nnnn #1#2#3#4 { @@ -33595,185 +34219,185 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__text_case_switch_marker: { } \cs_new:Npn \__text_change_case_generate:n #1 { \codepoint_generate:nn {#1} { \char_value_catcode:n {#1} } } -\cs_new:cpn { __text_change_case_upper_de-x-eszett:nnnn } #1#2#3#4 +\cs_new:cpn { __text_change_case_upper_de-x-eszett:nnnnn } #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "00DF } + \__text_codepoint_compare:nNnTF {#5} = { "00DF } { \__text_change_case_store:e { \codepoint_generate:nn { "1E9E } - { \__text_change_case_catcode:nn {#4} { "1E9E } } + { \__text_change_case_catcode:nn {#5} { "1E9E } } } - \use:c { __text_change_case_next_ #2 :nn } - {#2} {#3} + \use:c { __text_change_case_next_ #2 :nnn } + {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new_eq:cc { __text_change_case_upper_de-alt:nnnn } - { __text_change_case_upper_de-x-eszett:nnnn } -\cs_new:Npn \__text_change_case_upper_el:nnnn #1#2#3#4 +\cs_new_eq:cc { __text_change_case_upper_de-alt:nnnnn } + { __text_change_case_upper_de-x-eszett:nnnnn } +\cs_new:Npn \__text_change_case_upper_el:nnnnn #1#2#3#4#5 { \bool_lazy_and:nnTF - { \__text_change_case_if_greek_p:n {#4} } + { \__text_change_case_if_greek_p:n {#5} } { ! \bool_lazy_or_p:nn - { \__text_codepoint_compare_p:nNn {#4} = { "0374 } } - { \__text_codepoint_compare_p:nNn {#4} = { "037E } } + { \__text_codepoint_compare_p:nNn {#5} = { "0374 } } + { \__text_codepoint_compare_p:nNn {#5} = { "037E } } } { - \__text_change_case_if_greek_spacing_diacritic:nTF {#4} + \__text_change_case_if_greek_spacing_diacritic:nTF {#5} { - \__text_change_case_store:n {#4} - \__text_change_case_loop:nnw + \__text_change_case_store:n {#5} + \__text_change_case_loop:nnnw } { - \exp_args:Ne \__text_change_case_upper_el:nnn + \exp_args:Ne \__text_change_case_upper_el:nnnn { \codepoint_to_nfd:n - { \__text_codepoint_from_chars:Nw #4 } + { \__text_codepoint_from_chars:Nw #5 } } } - {#2} {#3} + {#2} {#3} {#4} } { - \__text_codepoint_compare:nNnTF {#4} = { "0345 } + \__text_codepoint_compare:nNnTF {#5} = { "0345 } { \__text_change_case_store:e { \codepoint_generate:nn { "0399 } { \char_value_catcode:n { "0399 } } } - \__text_change_case_loop:nnw {#2} {#3} + \__text_change_case_loop:nnnw {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } } -\cs_new_eq:cN { __text_change_case_upper_el-x-iota:nnnn } - \__text_change_case_upper_el:nnnn -\cs_new:Npn \__text_change_case_upper_el:nnn #1#2#3 +\cs_new_eq:cN { __text_change_case_upper_el-x-iota:nnnnn } + \__text_change_case_upper_el:nnnnn +\cs_new:Npn \__text_change_case_upper_el:nnnn #1#2#3#4 { \__text_codepoint_process:nN - { \__text_change_case_upper_el:nnnw {#2} {#3} } #1 + { \__text_change_case_upper_el:nnnnw {#2} {#3} {#4} } #1 } -\cs_new:Npn \__text_change_case_upper_el:nnnw #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_upper_el:nnnnw #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_upper_el:nnnN {#3} } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_upper_el:nnnnN {#4} } { \__text_change_case_store:e - { \__text_change_case_codepoint:nn { upper } {#3} } - \__text_change_case_loop:nnw + { \__text_change_case_codepoint:nn { upper } {#4} } + \__text_change_case_loop:nnnw } - {#1} {#2} #4 \q__text_recursion_stop + {#1} {#2} {#3} #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_upper_el:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_el:nnnnN #1#2#3#4#5 { - \token_if_cs:NTF #4 + \token_if_cs:NTF #5 { \__text_change_case_store:e { \__text_change_case_codepoint:nn { upper } {#1} } - \__text_change_case_loop:nnw {#2} {#3} #4 + \__text_change_case_loop:nnnw {#2} {#3} {#4} #5 } { \__text_change_case_if_takes_ypogegrammeni:nTF {#1} { - \__text_change_case_upper_el_ypogegrammeni:nnnnnw - {#1} {#2} {#3} { } { } #4 + \__text_change_case_upper_el_ypogegrammeni:nnnnnnw + {#1} {#2} {#3} {#4} { } { } #5 } - { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4 } + { \__text_change_case_upper_el_aux:nnnnN {#1} {#2} {#3} {#4} #5 } } } -\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnw - #1#2#3#4#5#6 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnnw + #1#2#3#4#5#6#7 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#6} + \tl_if_head_is_N_type:nTF {#7} { - \__text_change_case_upper_el_ypogegrammeni:nnnnnN - {#1} {#2} {#3} {#4} {#5} + \__text_change_case_upper_el_ypogegrammeni:nnnnnnN + {#1} {#2} {#3} {#4} {#5} {#6} } - { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 } - #6 \q__text_recursion_stop + { \__text_change_case_upper_el_aux:nnnnN {#1} {#2} {#3} {#4} #5#6 } + #7 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnN #1#2#3#4#5#6 +\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnnN #1#2#3#4#5#6#7 { - \token_if_cs:NTF #6 - { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 } + \token_if_cs:NTF #7 + { \__text_change_case_upper_el_aux:nnnnN {#1} {#2} {#3} {#4} #5#6 } { \__text_codepoint_process:nN { - \__text_change_case_upper_el_ypogegrammeni:nnnnnn - {#1} {#2} {#3} {#4} {#5} + \__text_change_case_upper_el_ypogegrammeni:nnnnnnn + {#1} {#2} {#3} {#4} {#5} {#6} } } - #6 + #7 } -\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnn #1#2#3#4#5#6 +\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnnn #1#2#3#4#5#6#7 { - \__text_codepoint_compare:nNnTF {#6} = { "0345 } + \__text_codepoint_compare:nNnTF {#7} = { "0345 } { - \__text_change_case_upper_el_ypogegrammeni:nnnnnw - {#1} {#2} {#3} {#4} {#6} + \__text_change_case_upper_el_ypogegrammeni:nnnnnnw + {#1} {#2} {#3} {#4} {#5} {#7} } { \bool_lazy_or:nnTF - { \__text_change_case_if_greek_accent_p:n {#6} } - { \__text_change_case_if_greek_breathing_p:n {#6} } + { \__text_change_case_if_greek_accent_p:n {#7} } + { \__text_change_case_if_greek_breathing_p:n {#7} } { - \__text_change_case_upper_el_ypogegrammeni:nnnnnw - {#1} {#2} {#3} {#4#6} {#5} + \__text_change_case_upper_el_ypogegrammeni:nnnnnnw + {#1} {#2} {#3} {#4} {#5#7} {#6} } - { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 #6 } + { \__text_change_case_upper_el_aux:nnnnN {#1} {#2} {#3} {#4} #5#6 #7 } } } -\cs_new:Npn \__text_change_case_upper_el_aux:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_el_aux:nnnnN #1#2#3#4#5 { \__text_codepoint_process:nN - { \__text_change_case_upper_el_aux:nnnn {#1} {#2} {#3} } #4 + { \__text_change_case_upper_el_aux:nnnnn {#1} {#2} {#3} {#4} } #5 } -\cs_new:Npn \__text_change_case_upper_el_aux:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_el_aux:nnnnn #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0308 } - { \__text_change_case_upper_el_dialytika:nnn {#2} {#3} {#1} } + \__text_codepoint_compare:nNnTF {#5} = { "0308 } + { \__text_change_case_upper_el_dialytika:nnnn {#2} {#3} {#4} {#1} } { - \__text_change_case_if_greek_accent:nTF {#4} - { \__text_change_case_upper_el_hiatus:nnnw {#2} {#3} {#1} } + \__text_change_case_if_greek_accent:nTF {#5} + { \__text_change_case_upper_el_hiatus:nnnnw {#2} {#3} {#4} {#1} } { - \__text_change_case_if_greek_breathing:nTF {#4} - { \__text_change_case_upper_el:nnn {#1} {#2} {#3} } + \__text_change_case_if_greek_breathing:nTF {#5} + { \__text_change_case_upper_el:nnnn {#1} {#2} {#3} {#4} } { - \__text_codepoint_compare:nNnTF {#4} = { "0345 } + \__text_codepoint_compare:nNnTF {#5} = { "0345 } { \__text_change_case_store:e - { \use:c { __text_change_case_upper_ #3 _ypogegrammeni:n } {#1} } - \__text_change_case_loop:nnw {#2} {#3} + { \use:c { __text_change_case_upper_ #4 _ypogegrammeni:n } {#1} } + \__text_change_case_loop:nnnw {#2} {#3} {#4} } { - \__text_change_case_if_greek_stress:nTF {#4} + \__text_change_case_if_greek_stress:nTF {#5} { \__text_change_case_store:e - { \__text_change_case_upper_el_stress:nn {#1} {#4} } - \__text_change_case_loop:nnw {#2} {#3} + { \__text_change_case_upper_el_stress:nn {#1} {#5} } + \__text_change_case_loop:nnnw {#2} {#3} {#4} } { \__text_change_case_store:e { \__text_change_case_codepoint:nn { upper } {#1} } - \__text_change_case_loop:nnw {#2} {#3} #4 + \__text_change_case_loop:nnnw {#2} {#3} {#4} #5 } } } } } } -\cs_new:Npn \__text_change_case_upper_el_dialytika:nnn #1#2#3 +\cs_new:Npn \__text_change_case_upper_el_dialytika:nnnn #1#2#3#4 { - \__text_change_case_if_takes_dialytika:nTF {#3} - { \__text_change_case_upper_el_dialytika:n {#3} } + \__text_change_case_if_takes_dialytika:nTF {#4} + { \__text_change_case_upper_el_dialytika:n {#4} } { \__text_change_case_store:e - { \__text_change_case_codepoint:nn { upper } {#3} } + { \__text_change_case_codepoint:nn { upper } {#4} } } - \__text_change_case_upper_el_gobble:nnw {#1} {#2} + \__text_change_case_upper_el_gobble:nnnw {#1} {#2} {#3} } \cs_new:Npn \__text_change_case_upper_el_dialytika:n #1 { @@ -33792,41 +34416,41 @@ Type H <return> for immediate help}\def~{\errmessage{% } } } -\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnw - #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnnw + #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_upper_el_hiatus:nnnN {#3} } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_upper_el_hiatus:nnnnN {#4} } { \__text_change_case_store:e - { \__text_change_case_codepoint:nn { upper } {#3} } - \__text_change_case_loop:nnw + { \__text_change_case_codepoint:nn { upper } {#4} } + \__text_change_case_loop:nnnw } - {#1} {#2} #4 \q__text_recursion_stop + {#1} {#2} {#3} #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnnN #1#2#3#4#5 { - \token_if_cs:NTF #4 + \token_if_cs:NTF #5 { \__text_change_case_store:e { \__text_change_case_codepoint:nn { upper } {#1} } - \__text_change_case_loop:nnw {#2} {#3} #4 + \__text_change_case_loop:nnnw {#2} {#3} {#4} #5 } { \__text_codepoint_process:nN - { \__text_change_case_upper_el_hiatus:nnnn {#1} {#2} {#3} } #4 + { \__text_change_case_upper_el_hiatus:nnnnn {#1} {#2} {#3} {#4} } #5 } } -\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnnn #1#2#3#4#5 { - \__text_change_case_if_takes_dialytika:nTF {#4} + \__text_change_case_if_takes_dialytika:nTF {#5} { \__text_change_case_store:e { \__text_change_case_codepoint:nn { upper } {#1} } - \__text_change_case_upper_el_dialytika:n {#4} - \__text_change_case_upper_el_gobble:nnw {#2} {#3} + \__text_change_case_upper_el_dialytika:n {#5} + \__text_change_case_upper_el_gobble:nnnw {#2} {#3} {#4} } - { \__text_change_case_upper_el:nnn {#1} {#2} {#3} #4 } + { \__text_change_case_upper_el:nnnn {#1} {#2} {#3} {#4} #5 } } \cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:n #1 { @@ -33884,31 +34508,31 @@ Type H <return> for immediate help}\def~{\errmessage{% } } } -\cs_new:Npn \__text_change_case_upper_el_gobble:nnw - #1#2#3 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_upper_el_gobble:nnnw + #1#2#3#4 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_upper_el_gobble:nnN } - { \__text_change_case_loop:nnw } - {#1} {#2} #3 \q__text_recursion_stop + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_upper_el_gobble:nnnN } + { \__text_change_case_loop:nnnw } + {#1} {#2} {#3} #4 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_upper_el_gobble:nnN #1#2#3 +\cs_new:Npn \__text_change_case_upper_el_gobble:nnnN #1#2#3#4 { - \token_if_cs:NTF #3 - { \__text_change_case_loop:nnw {#1} {#2} } + \token_if_cs:NTF #4 + { \__text_change_case_loop:nnnw {#1} {#2} {#3} } { \__text_codepoint_process:nN - { \__text_change_case_upper_el_gobble:nnn {#1} {#2} } + { \__text_change_case_upper_el_gobble:nnnn {#1} {#2} {#3} } } - #3 + #4 } -\cs_new:Npn \__text_change_case_upper_el_gobble:nnn #1#2#3 +\cs_new:Npn \__text_change_case_upper_el_gobble:nnnn #1#2#3#4 { \bool_lazy_or:nnTF - { \__text_change_case_if_greek_accent_p:n {#3} } - { \__text_change_case_if_greek_breathing_p:n {#3} } - { \__text_change_case_upper_el_gobble:nnw {#1} {#2} } - { \__text_change_case_loop:nnw {#1} {#2} #3 } + { \__text_change_case_if_greek_accent_p:n {#4} } + { \__text_change_case_if_greek_breathing_p:n {#4} } + { \__text_change_case_upper_el_gobble:nnnw {#1} {#2} {#3} } + { \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } } \prg_new_conditional:Npnn \__text_change_case_if_greek:n #1 { p , TF } { @@ -34132,422 +34756,422 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: } -\cs_new:Npn \__text_change_case_boundary_upper_el:Nnnw - #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_boundary_upper_el:Nnnnw + #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_boundary_upper_el:nnN } - { \__text_change_case_loop:nnw } - {#2} {#3} #4 \q__text_recursion_stop + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_boundary_upper_el:nnnN } + { \__text_change_case_loop:nnnw } + {#2} {#3} {#4} #5 \q__text_recursion_stop } -\cs_new_eq:cN { __text_change_case_boundary_upper_el-x-iota:Nnnw } - \__text_change_case_boundary_upper_el:Nnnw -\cs_new:Npn \__text_change_case_boundary_upper_el:nnN #1#2#3 +\cs_new_eq:cN { __text_change_case_boundary_upper_el-x-iota:Nnnnw } + \__text_change_case_boundary_upper_el:Nnnnw +\cs_new:Npn \__text_change_case_boundary_upper_el:nnnN #1#2#3#4 { - \token_if_cs:NTF #3 - { \__text_change_case_loop:nnw {#1} {#2} } + \token_if_cs:NTF #4 + { \__text_change_case_loop:nnnw {#1} {#2} {#3} } { \__text_codepoint_process:nN - { \__text_change_case_boundary_upper_el:nnn {#1} {#2} } + { \__text_change_case_boundary_upper_el:nnnn {#1} {#2} {#3} } } - #3 + #4 } -\cs_new:Npn \__text_change_case_boundary_upper_el:nnn #1#2#3 +\cs_new:Npn \__text_change_case_boundary_upper_el:nnnn #1#2#3#4 { \bool_lazy_any:nTF { - { \__text_codepoint_compare_p:nNn {#3} = { "0389 } } - { \__text_codepoint_compare_p:nNn {#3} = { "03AE } } - { \__text_codepoint_compare_p:nNn {#3} = { "1F22 } } - { \__text_codepoint_compare_p:nNn {#3} = { "1F2A } } + { \__text_codepoint_compare_p:nNn {#4} = { "0389 } } + { \__text_codepoint_compare_p:nNn {#4} = { "03AE } } + { \__text_codepoint_compare_p:nNn {#4} = { "1F22 } } + { \__text_codepoint_compare_p:nNn {#4} = { "1F2A } } } - { \__text_change_case_boundary_upper_el:nnnw {#1} {#2} {#3} } - { \__text_change_case_breathing:nnn {#1} {#2} {#3} } + { \__text_change_case_boundary_upper_el:nnnnw {#1} {#2} {#3} {#4} } + { \__text_change_case_breathing:nnnn {#1} {#2} {#3} {#4} } } -\cs_new:Npn \__text_change_case_boundary_upper_el:nnnw - #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_boundary_upper_el:nnnnw + #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_loop:nnw {#1} {#2} #3 } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } { \__text_change_case_store:e { \codepoint_generate:nn { "0389 } - { \__text_change_case_catcode:nn {#3} { "0389 } } + { \__text_change_case_catcode:nn {#4} { "0389 } } } - \__text_change_case_loop:nnw {#1} {#2} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } - #4 \q__text_recursion_stop + #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_breathing:nnn #1#2#3 +\cs_new:Npn \__text_change_case_breathing:nnnn #1#2#3#4 { - \__text_change_case_if_greek:nTF {#3} + \__text_change_case_if_greek:nTF {#4} { - \exp_args:Ne \__text_change_case_breathing:nnnn + \exp_args:Ne \__text_change_case_breathing:nnnnn { \codepoint_to_nfd:n - { \__text_codepoint_from_chars:Nw #3 } + { \__text_codepoint_from_chars:Nw #4 } } - {#1} {#2} {#3} + {#1} {#2} {#3} {#4} } - { \__text_change_case_loop:nnw {#1} {#2} #3 } + { \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_breathing:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_breathing:nnnnn #1#2#3#4#5 { \__text_codepoint_process:nN - { \__text_change_case_breathing:nnnnw {#2} {#3} {#4} } + { \__text_change_case_breathing:nnnnnw {#2} {#3} {#4} {#5} } #1 \q_mark } -\cs_new:Npn \__text_change_case_breathing:nnnnw #1#2#3#4#5 \q_mark +\cs_new:Npn \__text_change_case_breathing:nnnnnw #1#2#3#4#5#6 \q_mark { - \tl_if_blank:nTF {#5} - { \__text_change_case_loop:nnw {#1} {#2} #3 } + \tl_if_blank:nTF {#6} + { \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } { \__text_codepoint_process:nN - { \__text_change_case_breathing:nnnnnw {#1} {#2} {#3} {#4} } - #5 \q_mark + { \__text_change_case_breathing:nnnnnnw {#1} {#2} {#3} {#4} {#5} } + #6 \q_mark } } -\cs_new:Npn \__text_change_case_breathing:nnnnnw #1#2#3#4#5#6 \q_mark +\cs_new:Npn \__text_change_case_breathing:nnnnnnw #1#2#3#4#5#6#7 \q_mark { - \tl_if_blank:nTF {#6} + \tl_if_blank:nTF {#7} { - \__text_change_case_breathing_aux:nnnnn - {#1} {#2} {#3} {#4} {#5} + \__text_change_case_breathing_aux:nnnnnn + {#1} {#2} {#3} {#4} {#5} {#6} } { \__text_codepoint_process:nN - { \__text_change_case_breathing:nnnnnw {#1} {#2} {#3} {#4} } - #6 \q_mark + { \__text_change_case_breathing:nnnnnnw {#1} {#2} {#3} {#4} {#5} } + #7 \q_mark } } -\cs_new:Npn \__text_change_case_breathing_aux:nnnnn #1#2#3#4#5 +\cs_new:Npn \__text_change_case_breathing_aux:nnnnnn #1#2#3#4#5#6 { \bool_lazy_or:nnTF - { \__text_codepoint_compare_p:nNn {#5} = { "0313 } } - { \__text_codepoint_compare_p:nNn {#5} = { "0314 } } - { \__text_change_case_breathing_aux:nnnw {#1} {#2} {#4} } - { \__text_change_case_loop:nnw {#1} {#2} #3 } + { \__text_codepoint_compare_p:nNn {#6} = { "0313 } } + { \__text_codepoint_compare_p:nNn {#6} = { "0314 } } + { \__text_change_case_breathing_aux:nnnnw {#1} {#2} {#3} {#5} } + { \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_breathing_aux:nnnw #1#2#3#4 +\cs_new:Npn \__text_change_case_breathing_aux:nnnnw #1#2#3#4#5 \q__text_recursion_stop { \__text_change_case_store:e - { \__text_change_case_codepoint:nn { upper } {#3} } - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_breathing_aux:nnN } - { \__text_change_case_loop:nnw } - {#1} {#2} #4 \q__text_recursion_stop + { \__text_change_case_codepoint:nn { upper } {#4} } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_breathing_aux:nnnN } + { \__text_change_case_loop:nnnw } + {#1} {#2} {#3} #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_breathing_aux:nnN #1#2#3 +\cs_new:Npn \__text_change_case_breathing_aux:nnnN #1#2#3#4 { \__text_codepoint_process:nN - { \__text_change_case_breathing_dialytika:nnn {#1} {#2} } #3 + { \__text_change_case_breathing_dialytika:nnnn {#1} {#2} {#3} } #4 } -\cs_new:Npn \__text_change_case_breathing_dialytika:nnn #1#2#3 +\cs_new:Npn \__text_change_case_breathing_dialytika:nnnn #1#2#3#4 { - \__text_change_case_if_takes_dialytika:nTF {#3} + \__text_change_case_if_takes_dialytika:nTF {#4} { - \__text_change_case_upper_el_dialytika:n {#3} - \__text_change_case_loop:nnw {#1} {#2} + \__text_change_case_upper_el_dialytika:n {#4} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } - { \__text_change_case_loop:nnw {#1} {#2} #3 } + { \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_title_el:nnnn #1#2#3#4 - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } -\cs_new:Npn \__text_change_case_upper_hy:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_title_el:nnnnn #1#2#3#4#5 + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } +\cs_new:Npn \__text_change_case_upper_hy:nnnnn #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0587 } + \__text_codepoint_compare:nNnTF {#5} = { "0587 } { \__text_change_case_store:e { \codepoint_generate:nn { "0535 } - { \__text_change_case_catcode:nn {#4} { "0535 } } + { \__text_change_case_catcode:nn {#5} { "0535 } } \codepoint_generate:nn { "054E } - { \__text_change_case_catcode:nn {#4} { "054E } } + { \__text_change_case_catcode:nn {#5} { "054E } } } - \use:c { __text_change_case_next_ #2 :nn } - {#2} {#3} + \use:c { __text_change_case_next_ #2 :nnn } + {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new:Npn \__text_change_case_title_hy:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_title_hy:nnnnn #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0587 } + \__text_codepoint_compare:nNnTF {#5} = { "0587 } { \__text_change_case_store:e { \codepoint_generate:nn { "0535 } - { \__text_change_case_catcode:nn {#4} { "0535 } } + { \__text_change_case_catcode:nn {#5} { "0535 } } \codepoint_generate:nn { "057E } - { \__text_change_case_catcode:nn {#4} { "057E } } + { \__text_change_case_catcode:nn {#5} { "057E } } } - \use:c { __text_change_case_next_ #2 :nn } - {#2} {#3} + \use:c { __text_change_case_next_ #2 :nnn } + {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new:cpn { __text_change_case_upper_hy-x-yiwn:nnnn } #1#2#3#4 - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } -\cs_new_eq:cc { __text_change_case_title_hy-x-yiwn:nnnn } - { __text_change_case_upper_hy-x-yiwn:nnnn } -\cs_new:cpn { __text_change_case_lower_la-x-medieval:nnnn } #1#2#3#4 +\cs_new:cpn { __text_change_case_upper_hy-x-yiwn:nnnnn } #1#2#3#4#5 + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } +\cs_new_eq:cc { __text_change_case_title_hy-x-yiwn:nnnnn } + { __text_change_case_upper_hy-x-yiwn:nnnnn } +\cs_new:cpn { __text_change_case_lower_la-x-medieval:nnnnn } #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0056 } + \__text_codepoint_compare:nNnTF {#5} = { "0056 } { \__text_change_case_store:e - { \char_generate:nn { "0075 } { \__text_char_catcode:N #4 } } - \use:c { __text_change_case_next_ #2 :nn } - {#2} {#3} + { \char_generate:nn { "0075 } { \__text_char_catcode:N #5 } } + \use:c { __text_change_case_next_ #2 :nnn } + {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new:cpn { __text_change_case_upper_la-x-medieval:nnnn } #1#2#3#4 +\cs_new:cpn { __text_change_case_upper_la-x-medieval:nnnnn } #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0075 } + \__text_codepoint_compare:nNnTF {#5} = { "0075 } { \__text_change_case_store:e - { \char_generate:nn { "0056 } { \__text_char_catcode:N #4 } } - \use:c { __text_change_case_next_ #2 :nn } - {#2} {#3} + { \char_generate:nn { "0056 } { \__text_char_catcode:N #5 } } + \use:c { __text_change_case_next_ #2 :nnn } + {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new:Npn \__text_change_case_lower_lt:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_lt:nnnnn #1#2#3#4#5 { - \exp_args:Ne \__text_change_case_lower_lt_auxi:nnnn + \exp_args:Ne \__text_change_case_lower_lt_auxi:nnnnn { - \int_case:nn { \__text_codepoint_from_chars:Nw #4 } + \int_case:nn { \__text_codepoint_from_chars:Nw #5 } { { "00CC } { "0300 } { "00CD } { "0301 } { "0128 } { "0303 } } } - {#2} {#3} {#4} + {#2} {#3} {#4} {#5} } -\cs_new:Npn \__text_change_case_lower_lt_auxi:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_lt_auxi:nnnnn #1#2#3#4#5 { \tl_if_blank:nTF {#1} { - \exp_args:Ne \__text_change_case_lower_lt_auxii:nnnn + \exp_args:Ne \__text_change_case_lower_lt_auxii:nnnnn { - \int_case:nn { \__text_codepoint_from_chars:Nw #4 } + \int_case:nn { \__text_codepoint_from_chars:Nw #5 } { { "0049 } { "0069 } { "004A } { "006A } { "012E } { "012F } } } - {#2} {#3} {#4} + {#2} {#3} {#4} {#5} } { \__text_change_case_store:e { \codepoint_generate:nn { "0069 } - { \__text_change_case_catcode:nn {#4} { "0069 } } + { \__text_change_case_catcode:nn {#5} { "0069 } } \codepoint_generate:nn { "0307 } - { \__text_change_case_catcode:nn {#4} { "0307 } } + { \__text_change_case_catcode:nn {#5} { "0307 } } \codepoint_generate:nn {#1} - { \__text_change_case_catcode:nn {#4} {#1} } + { \__text_change_case_catcode:nn {#5} {#1} } } - \__text_change_case_loop:nnw {#2} {#3} + \__text_change_case_loop:nnnw {#2} {#3} {#4} } } -\cs_new:Npn \__text_change_case_lower_lt_auxii:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_lt_auxii:nnnnn #1#2#3#4#5 { \tl_if_blank:nTF {#1} - { \__text_change_case_codepoint:nnnn {#2} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#2} {#2} {#3} {#4} {#5} } { \__text_change_case_store:e { \codepoint_generate:nn {#1} - { \__text_change_case_catcode:nn {#4} {#1} } + { \__text_change_case_catcode:nn {#5} {#1} } } - \__text_change_case_lower_lt:nnw {#2} {#3} + \__text_change_case_lower_lt:nnnw {#2} {#3} {#4} } } -\cs_new:Npn \__text_change_case_lower_lt:nnw #1#2#3 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_lower_lt:nnnw #1#2#3#4 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_lower_lt:nnN } - { \__text_change_case_loop:nnw } - {#1} {#2} #3 \q__text_recursion_stop + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_lower_lt:nnnN } + { \__text_change_case_loop:nnnw } + {#1} {#2} {#3} #4 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_lower_lt:nnN #1#2#3 +\cs_new:Npn \__text_change_case_lower_lt:nnnN #1#2#3#4 { \__text_codepoint_process:nN - { \__text_change_case_lower_lt:nnn {#1} {#2} } #3 + { \__text_change_case_lower_lt:nnnn {#1} {#2} {#3} } #4 } -\cs_new:Npn \__text_change_case_lower_lt:nnn #1#2#3 +\cs_new:Npn \__text_change_case_lower_lt:nnnn #1#2#3#4 { \bool_lazy_and:nnT { \bool_lazy_or_p:nn - { ! \tl_if_single_p:n {#3} } - { ! \token_if_cs_p:N #3 } + { ! \tl_if_single_p:n {#4} } + { ! \token_if_cs_p:N #4 } } { \bool_lazy_any_p:n { - { \__text_codepoint_compare_p:nNn {#3} = { "0300 } } - { \__text_codepoint_compare_p:nNn {#3} = { "0301 } } - { \__text_codepoint_compare_p:nNn {#3} = { "0303 } } + { \__text_codepoint_compare_p:nNn {#4} = { "0300 } } + { \__text_codepoint_compare_p:nNn {#4} = { "0301 } } + { \__text_codepoint_compare_p:nNn {#4} = { "0303 } } } } { \__text_change_case_store:e { \codepoint_generate:nn { "0307 } - { \__text_change_case_catcode:nn {#3} { "0307 } } + { \__text_change_case_catcode:nn {#4} { "0307 } } } } - \__text_change_case_loop:nnw {#1} {#2} #3 + \__text_change_case_loop:nnnw {#1} {#2} {#3} #4 } -\cs_new:Npn \__text_change_case_upper_lt:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_lt:nnnnn #1#2#3#4#5 { - \exp_args:Ne \__text_change_case_upper_lt_aux:nnnn + \exp_args:Ne \__text_change_case_upper_lt_aux:nnnnn { - \int_case:nn { \__text_codepoint_from_chars:Nw #4 } + \int_case:nn { \__text_codepoint_from_chars:Nw #5 } { { "0069 } { "0049 } { "006A } { "004A } { "012F } { "012E } } } - {#2} {#3} {#4} + {#2} {#3} {#4} {#5} } -\cs_new:Npn \__text_change_case_upper_lt_aux:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_lt_aux:nnnnn #1#2#3#4#5 { \tl_if_blank:nTF {#1} - { \__text_change_case_codepoint:nnnn { upper } {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn { upper } {#2} {#3} {#4} {#5} } { \__text_change_case_store:e { \codepoint_generate:nn {#1} - { \__text_change_case_catcode:nn {#4} {#1} } + { \__text_change_case_catcode:nn {#5} {#1} } } - \__text_change_case_upper_lt:nnw {#2} {#3} + \__text_change_case_upper_lt:nnnw {#2} {#3} {#4} } } -\cs_new:Npn \__text_change_case_upper_lt:nnw #1#2#3 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_upper_lt:nnnw #1#2#3#4 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_upper_lt:nnN } - { \use:c { __text_change_case_next_ #1 :nn } } - {#1} {#2} #3 \q__text_recursion_stop + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_upper_lt:nnnN } + { \use:c { __text_change_case_next_ #1 :nnn } } + {#1} {#2} {#3} #4 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_upper_lt:nnN #1#2#3 +\cs_new:Npn \__text_change_case_upper_lt:nnnN #1#2#3#4 { \__text_codepoint_process:nN - { \__text_change_case_upper_lt:nnn {#1} {#2} } #3 + { \__text_change_case_upper_lt:nnnn {#1} {#2} {#3} } #4 } -\cs_new:Npn \__text_change_case_upper_lt:nnn #1#2#3 +\cs_new:Npn \__text_change_case_upper_lt:nnnn #1#2#3#4 { \bool_lazy_and:nnTF { \bool_lazy_or_p:nn - { ! \tl_if_single_p:n {#3} } - { ! \token_if_cs_p:N #3 } + { ! \tl_if_single_p:n {#4} } + { ! \token_if_cs_p:N #4 } } - { \__text_codepoint_compare_p:nNn {#3} = { "0307 } } - { \use:c { __text_change_case_next_ #1 :nn } {#1} {#2} } - { \use:c { __text_change_case_next_ #1 :nn } {#1} {#2} #3 } + { \__text_codepoint_compare_p:nNn {#4} = { "0307 } } + { \use:c { __text_change_case_next_ #1 :nnn } {#1} {#2} {#3} } + { \use:c { __text_change_case_next_ #1 :nnn } {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_title_nl:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_title_nl:nnnnn #1#2#3#4#5 { - \tl_if_single:nTF {#4} - { \__text_change_case_title_nl_aux:nnnn } - { \__text_change_case_codepoint:nnnn } - {#1} {#2} {#3} {#4} + \tl_if_single:nTF {#5} + { \__text_change_case_title_nl_aux:nnnnn } + { \__text_change_case_codepoint:nnnnn } + {#1} {#2} {#3} {#4} {#5} } -\cs_new:Npn \__text_change_case_title_nl_aux:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_title_nl_aux:nnnnn #1#2#3#4#5 { \bool_lazy_or:nnTF - { \int_compare_p:nNn {`#4} = { "0049 } } - { \int_compare_p:nNn {`#4} = { "0069 } } + { \int_compare_p:nNn {`#5} = { "0049 } } + { \int_compare_p:nNn {`#5} = { "0069 } } { \__text_change_case_store:e - { \char_generate:nn { "0049 } { \__text_char_catcode:N #4 } } - \__text_change_case_title_nl:nnw {#2} {#3} + { \char_generate:nn { "0049 } { \__text_char_catcode:N #5 } } + \__text_change_case_title_nl:nnnw {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new:Npn \__text_change_case_title_nl:nnw #1#2#3 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_title_nl:nnnw #1#2#3#4 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_title_nl:nnN } - { \use:c { __text_change_case_next_ #1 :nn } } - {#1} {#2} #3 \q__text_recursion_stop + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_title_nl:nnnN } + { \use:c { __text_change_case_next_ #1 :nnn } } + {#1} {#2} {#3} #4 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_title_nl:nnN #1#2#3 +\cs_new:Npn \__text_change_case_title_nl:nnnN #1#2#3#4 { \bool_lazy_and:nnTF - { ! \token_if_cs_p:N #3 } + { ! \token_if_cs_p:N #4 } { \bool_lazy_or_p:nn - { \int_compare_p:nNn {`#3} = { "004A } } - { \int_compare_p:nNn {`#3} = { "006A } } + { \int_compare_p:nNn {`#4} = { "004A } } + { \int_compare_p:nNn {`#4} = { "006A } } } { \__text_change_case_store:e - { \char_generate:nn { "004A } { \__text_char_catcode:N #3 } } - \use:c { __text_change_case_next_ #1 :nn } {#1} {#2} + { \char_generate:nn { "004A } { \__text_char_catcode:N #4 } } + \use:c { __text_change_case_next_ #1 :nnn } {#1} {#2} {#3} } - { \use:c { __text_change_case_next_ #1 :nn } {#1} {#2} #3 } + { \use:c { __text_change_case_next_ #1 :nnn } {#1} {#2} {#3} #4 } } -\cs_new:Npn \__text_change_case_lower_tr:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_tr:nnnnn #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0049 } - { \__text_change_case_lower_tr:nnNw {#1} {#3} #4 } + \__text_codepoint_compare:nNnTF {#5} = { "0049 } + { \__text_change_case_lower_tr:nnnNw {#1} {#3} {#4} #5 } { - \__text_codepoint_compare:nNnTF {#4} = { "0130 } + \__text_codepoint_compare:nNnTF {#5} = { "0130 } { \__text_change_case_store:e { \codepoint_generate:nn { "0069 } - { \__text_change_case_catcode:nn {#4} { "0069 } } + { \__text_change_case_catcode:nn {#5} { "0069 } } } - \__text_change_case_loop:nnw {#1} {#3} + \__text_change_case_loop:nnnw {#1} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } } -\cs_new:Npn \__text_change_case_lower_tr:nnNw #1#2#3#4 \q__text_recursion_stop +\cs_new:Npn \__text_change_case_lower_tr:nnnNw #1#2#3#4#5 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_lower_tr:NnnN #3 {#1} {#2} } + \tl_if_head_is_N_type:nTF {#5} + { \__text_change_case_lower_tr:NnnnN #4 {#1} {#2} {#3} } { \__text_change_case_store:e { \codepoint_generate:nn { "0131 } - { \__text_change_case_catcode:nn {#3} { "0131 } } + { \__text_change_case_catcode:nn {#4} { "0131 } } } - \__text_change_case_loop:nnw {#1} {#2} + \__text_change_case_loop:nnnw {#1} {#2} {#3} } - #4 \q__text_recursion_stop + #5 \q__text_recursion_stop } -\cs_new:Npn \__text_change_case_lower_tr:NnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_tr:NnnnN #1#2#3#4#5 { \__text_codepoint_process:nN - { \__text_change_case_lower_tr:Nnnn #1 {#2} {#3} } #4 + { \__text_change_case_lower_tr:Nnnnn #1 {#2} {#3} {#4} } #5 } -\cs_new:Npn \__text_change_case_lower_tr:Nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_lower_tr:Nnnnn #1#2#3#4#5 { \bool_lazy_or:nnTF { \bool_lazy_and_p:nn - { \tl_if_single_p:n {#4} } - { \token_if_cs_p:N #4 } + { \tl_if_single_p:n {#5} } + { \token_if_cs_p:N #5 } } - { ! \__text_codepoint_compare_p:nNn {#4} = { "0307 } } + { ! \__text_codepoint_compare_p:nNn {#5} = { "0307 } } { \__text_change_case_store:e { \codepoint_generate:nn { "0131 } { \__text_change_case_catcode:nn {#1} { "0131 } } } - \__text_change_case_loop:nnw {#2} {#3} #4 + \__text_change_case_loop:nnnw {#2} {#3} {#4} #5 } { \__text_change_case_store:e @@ -34555,26 +35179,26 @@ Type H <return> for immediate help}\def~{\errmessage{% \codepoint_generate:nn { "0069 } { \__text_change_case_catcode:nn {#1} { "0069 } } } - \__text_change_case_loop:nnw {#2} {#3} + \__text_change_case_loop:nnnw {#2} {#3} {#4} } } -\cs_new:Npn \__text_change_case_upper_tr:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_tr:nnnnn #1#2#3#4#5 { - \__text_codepoint_compare:nNnTF {#4} = { "0069 } + \__text_codepoint_compare:nNnTF {#5} = { "0069 } { \__text_change_case_store:e { \codepoint_generate:nn { "0130 } - { \__text_change_case_catcode:nn {#4} { "0130 } } + { \__text_change_case_catcode:nn {#5} { "0130 } } } - \use:c { __text_change_case_next_ #2 :nn } {#2} {#3} + \use:c { __text_change_case_next_ #2 :nnn } {#2} {#3} {#4} } - { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + { \__text_change_case_codepoint:nnnnn {#1} {#2} {#3} {#4} {#5} } } -\cs_new_eq:NN \__text_change_case_lower_az:nnnn - \__text_change_case_lower_tr:nnnn -\cs_new_eq:NN \__text_change_case_upper_az:nnnn - \__text_change_case_upper_tr:nnnn +\cs_new_eq:NN \__text_change_case_lower_az:nnnnn + \__text_change_case_lower_tr:nnnnn +\cs_new_eq:NN \__text_change_case_upper_az:nnnnn + \__text_change_case_upper_tr:nnnnn \group_begin: \cs_set_protected:Npn \__text_change_case_setup:NN #1#2 { @@ -36010,6 +36634,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_gset:Npn \seq_mapthread_function:NNN { \seq_map_pairwise_function:NNN } \__kernel_patch_deprecation:nnNNpn { 2021-01-11 } { (no~longer~required) } \cs_gset_protected:Npn \sys_load_deprecation: { } +\__kernel_patch_deprecation:nnNNpn { 2023-07-08 } { \text_titlecase_first:n } +\cs_gset:Npn \text_titlecase:n #1 + { \text_titlecase_first:n { \text_lowercase:n {#1} } } +\__kernel_patch_deprecation:nnNNpn { 2023-07-08 } { \text_titlecase_first:nn } +\cs_gset:Npn \text_titlecase:nn #1#2 + { \text_titlecase_first:nn {#1} { \text_lowercase:n {#2} } } \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_lowercase:n } \cs_gset:Npn \tl_lower_case:n #1 { \text_lowercase:n {#1} } @@ -36022,12 +36652,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_uppercase:nn } \cs_gset:Npn \tl_upper_case:nn #1#2 { \text_uppercase:nn {#1} {#2} } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:n } \cs_gset:Npn \tl_mixed_case:n #1 - { \text_titlecase:n {#1} } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase:nn } + { \text_titlecase_first:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:nn } \cs_gset:Npn \tl_mixed_case:nn #1#2 - { \text_titlecase:nn {#1} {#2} } + { \text_titlecase_first:nn {#1} {#2} } \__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:Nn } \cs_gset:Npn \tl_case:Nn { \token_case_meaning:Nn } \__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:NnT } @@ -36049,8 +36679,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_gset:Npn \char_lower_case:N { \text_lowercase:n } \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_uppercase:n } \cs_gset:Npn \char_upper_case:N { \text_uppercase:n } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase:n } -\cs_gset:Npn \char_mixed_case:N { \text_titlecase:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:n } +\cs_gset:Npn \char_mixed_case:N { \text_titlecase_first:n } \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_casefold:n } \cs_gset:Npn \char_fold_case:N { \str_casefold:n } \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_lowercase:n } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 84a815a5fe0..0942a8855d7 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-10-10}% +\def\ExplFileDate{2023-10-23}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx index fc9349d64ff..e0c4ee07865 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-10-10}% +\def\ExplFileDate{2023-10-23}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 2e3d4947d8b..5e548a94e2b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2023-10-10}% +\def\ExplFileDate{2023-10-23}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% |