diff options
author | Karl Berry <karl@freefriends.org> | 2022-12-17 20:55:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-12-17 20:55:34 +0000 |
commit | fa3635a5e8d3d4cc58dc54018698b29cca4b7574 (patch) | |
tree | 19cef36a90c509bedbf75aea308d0e3c0fc86d5b /Master/texmf-dist/tex/latex | |
parent | a6cd99e3fcbf111c9e512a932f418f98186d4dc1 (diff) |
l3kernel (17dec22)
git-svn-id: svn://tug.org/texlive/trunk@65299 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex | 3310 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.ltx | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3doc.cls | 38 |
5 files changed, 1311 insertions, 2055 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index cccdd856c92..3cea4855ffb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -71,7 +71,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2022-11-02}% +\def\ExplFileDate{2022-12-17}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -3646,7 +3646,6 @@ Type H <return> for immediate help}\def~{\errmessage{% ##1 #2 ##2 #1 ##3 \s__quark {##2} } \exp_after:wN \__quark_tmp:w \tl_to_str:n { : _quark_if_ } \s__quark -\cs_gset:Npn \g__scan_marks_tl { } \cs_new_protected:Npn \scan_new:N #1 { \tl_if_in:NnTF \g__scan_marks_tl { #1 } @@ -3660,11 +3659,12 @@ Type H <return> for immediate help}\def~{\errmessage{% } } \cs_new_eq:NN \s_stop \scan_stop: -\cs_gset_nopar:Npx \g__scan_marks_tl +\cs_gset_nopar:Npn \g__scan_marks_tl { - \exp_not:o \g__scan_marks_tl \s_stop \s__quark + \s__cs_mark + \s__cs_stop } \cs_new:Npn \use_none_delimit_by_s_stop:w #1 \s_stop { } %% File: l3tl.dtx @@ -5422,10 +5422,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \tl_to_str:n {#1} \s__str_mark \s__str_mark \s__str_stop } \cs_new:Npn \__str_tail_auxii:w #1 #2 \s__str_mark #3 \s__str_stop { #2 } -\cs_new:Npn \str_foldcase:n #1 { \__str_change_case:nn {#1} { fold } } -\cs_new:Npn \str_lowercase:n #1 { \__str_change_case:nn {#1} { lower } } -\cs_new:Npn \str_uppercase:n #1 { \__str_change_case:nn {#1} { upper } } -\cs_generate_variant:Nn \str_foldcase:n { V } +\cs_new:Npn \str_casefold:n #1 { \__str_change_case:nn {#1} { casefold } } +\cs_new:Npn \str_lowercase:n #1 { \__str_change_case:nn {#1} { lowercase } } +\cs_new:Npn \str_uppercase:n #1 { \__str_change_case:nn {#1} { uppercase } } +\cs_generate_variant:Nn \str_casefold:n { V } \cs_generate_variant:Nn \str_lowercase:n { f } \cs_generate_variant:Nn \str_uppercase:n { f } \cs_new:Npn \__str_change_case:nn #1 @@ -5460,96 +5460,90 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__str_if_recursion_tail_stop_do:Nn #2 { \__str_change_case_end:wn } - \__str_change_case_output:fw - { \use:c { char_str_ #1 case:N } #2 } - \__str_change_case_loop:nw {#1} + \__str_change_case_codepoint:nN {#1} #2 } \if_int_compare:w 0 \cs_if_exist:NT \tex_XeTeXversion:D { 1 } \cs_if_exist:NT \tex_luatexversion:D { 1 } > 0 \exp_stop_f: + \cs_new:Npn \__str_change_case_codepoint:nN #1#2 + { \__str_change_case_char:fnn { \int_eval:n {`#2} } {#1} {#2} } \else: - \cs_gset:Npn \__str_change_case_char:nN #1#2 - { - \__str_if_recursion_tail_stop_do:Nn #2 - { \__str_change_case_end:wn } - \int_compare:nNnTF { `#2 } > { "80 } - { - \int_compare:nNnTF { `#2 } < { "E0 } - { \__str_change_case_char_UTFviii:nNN } - { - \int_compare:nNnTF { `#2 } < { "F0 } - { \__str_change_case_char_UTFviii:nNNN } - { \__str_change_case_char_UTFviii:nNNNN } - } - {#1} #2 - } - { - \__str_change_case_output:fw - { \use:c { char_str_ #1 case:N } #2 } - \__str_change_case_loop:nw {#1} - } - } - \cs_new:Npn \__str_change_case_char_UTFviii:nNN #1#2#3 - { \__str_change_case_char_UTFviii:nn {#1} {#2#3} } - \cs_new:Npn \__str_change_case_char_UTFviii:nNNN #1#2#3#4 - { \__str_change_case_char_UTFviii:nn {#1} {#2#3#4} } - \cs_new:Npn \__str_change_case_char_UTFviii:nNNNN #1#2#3#4#5 - { \__str_change_case_char_UTFviii:nn {#1} {#2#3#4#5} } - \cs_if_exist:NF \tex_pdftexversion:D - { - \cs_gset:Npn \__str_change_case_char_UTFviii:nNNN #1#2#3#4 - { - \__str_change_case_output:nw {#2#3#4} - \__str_change_case_loop:nw {#1} - } - \cs_gset:Npn \__str_change_case_char_UTFviii:nNNNN #1#2#3#4#5 - { - \__str_change_case_output:nw {#2#3#4#5} - \__str_change_case_loop:nw {#1} - } - } - \cs_new:Npn \__str_change_case_char_UTFviii:nn #1#2 - { - \use:c { __str_change_case_char_UTFviii_ #1 :nn } {#1} {#2} - } - \cs_new:Npn \__str_change_case_char_UTFviii_upper:nn #1#2 - { - \__str_change_case_output:fw - { - \cs_if_exist:cTF { c__kernel_ #1 case_ #2 _tl } - { - \__kernel_tl_to_str:w \exp_after:wN \exp_after:wN \exp_after:wN - { \cs:w c__kernel_ #1 case_ #2 _tl \cs_end: } - } - {#2} - } - \__str_change_case_loop:nw {#1} - } - \cs_new_eq:NN \__str_change_case_char_UTFviii_lower:nn - \__str_change_case_char_UTFviii_upper:nn - \cs_new:Npn \__str_change_case_char_UTFviii_fold:nn #1#2 - { - \__str_change_case_output:fw - { - \cs_if_exist:cTF { c__kernel_ #1 case_ #2 _tl } - { - \__kernel_tl_to_str:w \exp_after:wN \exp_after:wN \exp_after:wN - { \cs:w c__kernel_ #1 case_ #2 _tl \cs_end: } - } - { - \cs_if_exist:cTF { c__kernel_lowercase_ #2 _tl } - { - \__kernel_tl_to_str:w - \exp_after:wN \exp_after:wN \exp_after:wN - { \cs:w c__kernel_lowercase_ #2 _tl \cs_end: } - } - {#2} - } - } - \__str_change_case_loop:nw {#1} - } + \cs_new:Npn \__str_change_case_codepoint:nN #1#2 + { + \int_compare:nNnTF {`#2} > { "80 } + { + \int_compare:nNnTF {`#2} < { "E0 } + { \__str_change_case_codepoint:nNN } + { + \int_compare:nNnTF {`#2} < { "F0 } + { \__str_change_case_codepoint:nNNN } + { \__str_change_case_codepoint:nNNNNN } + } + } + { \__str_change_case_char_aux:nN } + {#1} #2 + } + \cs_new:Npn \__str_change_case_char_aux:nN #1#2 + { \__str_change_case_char:fnn { \int_eval:n {`#2} } {#1} {#2} } + \cs_new:Npn \__str_change_case_codepoint:nNN #1#2#3 + { + \__str_change_case_char:fnn + { \int_eval:n { (`#2 - "C0) * "40 + `#3 - "80 } } + {#1} {#2#3} + } + \cs_new:Npn \__str_change_case_codepoint:nNNN #1#2#3#4 + { + \__str_change_case_char:fnn + { + \int_eval:n + { (`#2 - "E0) * "1000 + (`#3 - "80) * "40 + `#4 - "80 } + } + {#1} {#2#3#4} + } + \cs_new:Npn \__str_change_case_codepoint:nNNNN #1#2#3#4#5 + { + \__str_change_case_char:fnn + { + \int_eval:n + { + (`#2 - "F0) * "40000 + + (`#3 - "80) * "1000 + + (`#4 - "80) * "40 + + `#5 - "80 + } + } + {#1} {#2#3#4#5} + } \fi: +\cs_new:Npn \__str_change_case_char:nnn #1#2#3 + { + \__str_change_case_output:fw + { + \exp_args:Ne \__str_change_case_char_aux:nnn + { \__kernel_codepoint_case:nn {#2} {#1} } {#1} {#3} + } + \__str_change_case_loop:nw {#2} + } +\cs_generate_variant:Nn \__str_change_case_char:nnn { f } +\cs_new:Npn \__str_change_case_char_aux:nnn #1#2#3 + { + \use:e { \__str_change_case_char:nnnnn #1 {#2} {#3} } + } +\cs_new:Npn \__str_change_case_char:nnnnn #1#2#3#4#5 + { + \int_compare:nNnTF {#1} = {#4} + { \tl_to_str:n {#5} } + { + \codepoint_str_generate:n {#1} + \tl_if_blank:nF {#2} + { + \codepoint_str_generate:n {#2} + \tl_if_blank:nF {#3} + { \codepoint_str_generate:n {#3} } + } + } + } \str_const:Nx \c_ampersand_str { \cs_to_str:N \& } \str_const:Nx \c_atsign_str { \cs_to_str:N \@ } \str_const:Nx \c_backslash_str { \cs_to_str:N \\ } @@ -8820,229 +8814,58 @@ Type H <return> for immediate help}\def~{\errmessage{% } \fi: \group_end: -\cs_new:Npn \char_to_utfviii_bytes:n #1 - { - \exp_args:Nf \__char_to_utfviii_bytes_auxi:n - { \int_eval:n {#1} } - } -\cs_new:Npn \__char_to_utfviii_bytes_auxi:n #1 - { - \if_int_compare:w #1 > "80 \exp_stop_f: - \if_int_compare:w #1 < "800 \exp_stop_f: - \__char_to_utfviii_bytes_outputi:nw - { \__char_to_utfviii_bytes_auxii:Nnn C {#1} { 64 } } - \__char_to_utfviii_bytes_outputii:nw - { \__char_to_utfviii_bytes_auxiii:n {#1} } - \else: - \if_int_compare:w #1 < "10000 \exp_stop_f: - \__char_to_utfviii_bytes_outputi:nw - { \__char_to_utfviii_bytes_auxii:Nnn E {#1} { 64 * 64 } } - \__char_to_utfviii_bytes_outputii:nw - { - \__char_to_utfviii_bytes_auxiii:n - { \int_div_truncate:nn {#1} { 64 } } - } - \__char_to_utfviii_bytes_outputiii:nw - { \__char_to_utfviii_bytes_auxiii:n {#1} } - \else: - \__char_to_utfviii_bytes_outputi:nw - { - \__char_to_utfviii_bytes_auxii:Nnn F - {#1} { 64 * 64 * 64 } - } - \__char_to_utfviii_bytes_outputii:nw - { - \__char_to_utfviii_bytes_auxiii:n - { \int_div_truncate:nn {#1} { 64 * 64 } } - } - \__char_to_utfviii_bytes_outputiii:nw - { - \__char_to_utfviii_bytes_auxiii:n - { \int_div_truncate:nn {#1} { 64 } } - } - \__char_to_utfviii_bytes_outputiv:nw - { \__char_to_utfviii_bytes_auxiii:n {#1} } - \fi: - \fi: - \else: - \__char_to_utfviii_bytes_outputi:nw {#1} - \fi: - \__char_to_utfviii_bytes_end: { } { } { } { } - } -\cs_new:Npn \__char_to_utfviii_bytes_auxii:Nnn #1#2#3 - { "#10 + \int_div_truncate:nn {#2} {#3} } -\cs_new:Npn \__char_to_utfviii_bytes_auxiii:n #1 - { \int_mod:nn {#1} { 64 } + 128 } -\cs_new:Npn \__char_to_utfviii_bytes_outputi:nw - #1 #2 \__char_to_utfviii_bytes_end: #3 - { \__char_to_utfviii_bytes_output:fnn { \int_eval:n {#1} } { } {#2} } -\cs_new:Npn \__char_to_utfviii_bytes_outputii:nw - #1 #2 \__char_to_utfviii_bytes_end: #3#4 - { \__char_to_utfviii_bytes_output:fnn { \int_eval:n {#1} } { {#3} } {#2} } -\cs_new:Npn \__char_to_utfviii_bytes_outputiii:nw - #1 #2 \__char_to_utfviii_bytes_end: #3#4#5 - { - \__char_to_utfviii_bytes_output:fnn - { \int_eval:n {#1} } { {#3} {#4} } {#2} - } -\cs_new:Npn \__char_to_utfviii_bytes_outputiv:nw - #1 #2 \__char_to_utfviii_bytes_end: #3#4#5#6 - { - \__char_to_utfviii_bytes_output:fnn - { \int_eval:n {#1} } { {#3} {#4} {#5} } {#2} - } -\cs_new:Npn \__char_to_utfviii_bytes_output:nnn #1#2#3 - { - #3 - \__char_to_utfviii_bytes_end: #2 {#1} - } -\cs_generate_variant:Nn \__char_to_utfviii_bytes_output:nnn { f } -\cs_new:Npn \__char_to_utfviii_bytes_end: { } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \char_lowercase:N + { \__char_change_case:nN { lowercase } } +\cs_new:Npn \char_uppercase:N + { \__char_change_case:nN { uppercase } } +\cs_new:Npn \char_titlecase:N + { \__char_change_case:nN { titlecase } } +\cs_new:Npn \char_foldcase:N + { \__char_change_case:nN { casefold } } +\cs_new:Npn \__char_change_case:nN #1#2 { - \cs_new:Npn \char_to_nfd:N #1 - { - \cs_if_exist:cTF { c__char_nfd_ \token_to_str:N #1 _ tl } - { - \exp_after:wN \exp_after:wN \exp_after:wN \__char_to_nfd:Nw - \exp_after:wN \exp_after:wN \exp_after:wN #1 - \cs:w c__char_nfd_ \token_to_str:N #1 _tl \cs_end: - \s__char_stop - } - { \exp_not:n {#1} } - } - \cs_new_eq:NN \__char_to_nfd:n \char_to_nfd:N - \cs_generate_variant:Nn \__char_to_nfd:n { e } - \cs_new:Npn \__char_to_nfd:Nw #1#2#3 \s__char_stop - { - \__char_to_nfd:e - { \char_generate:nn { `#2 } { \__char_change_case_catcode:N #1 } } - \tl_if_blank:nF {#3} - { - \__char_to_nfd:e - { \char_generate:nn { `#3 } { \char_value_catcode:n { `#3 } } } - } - } - \cs_new:Npn \char_to_nfd:n #1 + \int_compare:nNnTF {`#2} = { `\ } + { ~ } { - \__char_to_nfd:e { \char_generate:nn {#1} { \char_value_catcode:n {#1} } } + \exp_args:Ne \__char_change_case_auxi:nN + { \__kernel_codepoint_case:nn {#1} {`#2} } #2 } } +\cs_new:Npn \__char_change_case_auxi:nN #1#2 + { \use:e { \__char_change_case:nnnN #1 #2 } } +\cs_new:Npn \__char_change_case:nnnN #1#2#3#4 { - \cs_new:Npn \char_to_nfd:N #1 { \exp_not:n {#1} } - \cs_new:Npn \char_to_nfd:n #1 + \int_compare:nNnTF {#1} = {`#4} + { \exp_not:n {#4} } { - \int_compare:nNnTF {#1} > { "80 } - { \exp_args:Ne \__char_to_nfd:n { \__char_nfd_generate:n {#1} } } - { \__char_nfd_generate:n {#1} } - } - \cs_new:Npn \__char_to_nfd:n #1 - { - \cs_if_exist:cTF { c__char_nfd_ \tl_to_str:n {#1} _ tl } + \__char_change_case_auxii:nN {#1} {#4} + \tl_if_blank:nF {#2} { - \exp_after:wN \exp_after:wN \exp_after:wN \__char_to_nfd:w - \cs:w c__char_nfd_ \tl_to_str:n {#1} _tl \cs_end: - \s__char_stop + \__char_change_case_auxii:nN {#2} {#4} + \tl_if_blank:nF {#3} + { \__char_change_case_auxii:nN {#3} {#4} } } - { \exp_not:n {#1} } } - \cs_new:Npn \__char_to_nfd:w #1#2 \s__char_stop - { - \__char_to_nfd:n {#1} - \tl_if_blank:nF {#2} - { \__char_to_nfd:n {#2} } - } - \cs_new:Npn \__char_nfd_generate:n #1 - { - \use:e - { - \exp_not:N \__char_nfd_generate:nnnn - \char_to_utfviii_bytes:n {#1} - } - } - \cs_new:Npn \__char_nfd_generate:nnnn #1#2#3#4 - { - \tl_if_blank:nTF {#2} - { \char_generate:nn {#1} { \char_value_catcode:n {#1} } } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#1} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#2} { 13 } - \tl_if_blank:nF {#3} - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#3} { 13 } - \tl_if_blank:nF {#4} - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#4} { 13 } - } - } - } - - } - } -\cs_new:Npn \char_lowercase:N #1 - { \__char_change_case:nNN { lower } \char_value_lccode:n #1 } -\cs_new:Npn \char_uppercase:N #1 - { \__char_change_case:nNN { upper } \char_value_uccode:n #1 } -\cs_new:Npn \char_titlecase:N #1 - { - \tl_if_exist:cTF { c__char_titlecase_ \token_to_str:N #1 _tl } - { - \__char_change_case_multi:vN - { c__char_titlecase_ \token_to_str:N #1 _tl } #1 - } - { \char_uppercase:N #1 } } -\cs_new:Npn \char_foldcase:N #1 - { \__char_change_case:nNN { fold } \char_value_lccode:n #1 } -\cs_new:Npn \__char_change_case:nNN #1#2#3 +\cs_new:Npn \__char_change_case_auxii:nN #1#2 { - \tl_if_exist:cTF { c__char_ #1 case_ \token_to_str:N #3 _tl } - { - \__char_change_case_multi:vN - { c__char_ #1 case_ \token_to_str:N #3 _tl } #3 - } - { \exp_args:Nf \__char_change_case:nN { #2 { `#3 } } #3 } + \char_generate:nn {#1} + { \__char_change_case_catcode:N #2 } } -\cs_new:Npn \__char_change_case:nN #1#2 - { - \int_compare:nNnTF {#1} = 0 - { #2 } - { \char_generate:nn {#1} { \__char_change_case_catcode:N #2 } } - } -\cs_new:Npn \__char_change_case_multi:nN #1#2 - { \__char_change_case_multi:NNNNw #2 #1 \q__char_no_value \q__char_no_value \s__char_stop } -\cs_generate_variant:Nn \__char_change_case_multi:nN { v } -\cs_new:Npn \__char_change_case_multi:NNNNw #1#2#3#4#5 \s__char_stop +\bool_lazy_or:nnF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \__char_quark_if_no_value:NTF #4 + \cs_gset:Npn \__char_change_case_auxii:nN #1#2 { - \__char_quark_if_no_value:NTF #3 - { \__char_change_case:NN #1 #2 } - { \__char_change_case:NNN #1 #2#3 } + \int_compare:nNnTF {#1} < { "80 } + { + \char_generate:nn {#1} + { \__char_change_case_catcode:N #2 } + } + { \exp_not:n {#2} } } - { \__char_change_case:NNNN #1 #2#3#4 } - } -\cs_new:Npn \__char_change_case:NNN #1#2#3 - { - \exp_args:Nnf \use:nn - { \__char_change_case:NN #1 #2 } - { \__char_change_case:NN #1 #3 } } -\cs_new:Npn \__char_change_case:NNNN #1#2#3#4 - { - \exp_args:Nnff \use:nnn - { \__char_change_case:NN #1 #2 } - { \__char_change_case:NN #1 #3 } - { \__char_change_case:NN #1 #4 } - } -\cs_new:Npn \__char_change_case:NN #1#2 - { \char_generate:nn { `#2 } { \__char_change_case_catcode:N #1 } } \cs_new:Npn \__char_change_case_catcode:N #1 { \if_catcode:w \exp_not:N #1 \c_math_toggle_token @@ -9075,45 +8898,41 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: } -\cs_new:Npn \char_str_lowercase:N #1 - { \__char_str_change_case:nNN { lower } \char_value_lccode:n #1 } -\cs_new:Npn \char_str_uppercase:N #1 - { \__char_str_change_case:nNN { upper } \char_value_uccode:n #1 } -\cs_new:Npn \char_str_titlecase:N #1 - { - \tl_if_exist:cTF { c__char_titlecase_ \token_to_str:N #1 _tl } - { \tl_to_str:c { c__char_titlecase_ \token_to_str:N #1 _tl } } - { \char_str_uppercase:N #1 } - } -\cs_new:Npn \char_str_foldcase:N #1 - { \__char_str_change_case:nNN { fold } \char_value_lccode:n #1 } -\cs_new:Npn \__char_str_change_case:nNN #1#2#3 - { - \tl_if_exist:cTF { c__char_ #1 case_ \token_to_str:N #3 _tl } - { \tl_to_str:c { c__char_ #1 case_ \token_to_str:N #3 _tl } } - { \exp_args:Nf \__char_str_change_case:nN { #2 { `#3 } } #3 } - } +\cs_new:Npn \char_str_lowercase:N + { \__char_str_change_case:nN { lowercase } } +\cs_new:Npn \char_str_uppercase:N + { \__char_str_change_case:nN { uppercase } } +\cs_new:Npn \char_str_titlecase:N + { \__char_str_change_case:nN { titlecase } } +\cs_new:Npn \char_str_foldcase:N + { \__char_str_change_case:nN { casefold } } \cs_new:Npn \__char_str_change_case:nN #1#2 { - \int_compare:nNnTF {#1} = 0 - { \tl_to_str:n {#2} } - { \char_generate:nn {#1} { 12 } } + \int_compare:nNnTF {`#2} = { `\ } + { ~ } + { + \exp_args:Ne \__char_str_change_case_aux:nN + { \__kernel_codepoint_case:nn {#1} {`#2} } #2 + } } -\bool_lazy_or:nnF - { \cs_if_exist_p:N \tex_luatexversion:D } - { \cs_if_exist_p:N \tex_XeTeXversion:D } +\cs_new:Npn \__char_str_change_case_aux:nN #1#2 + { \use:e { \__char_str_change_case:nnnN #1 #2 } } +\cs_new:Npn \__char_str_change_case:nnnN #1#2#3#4 { - \cs_set:Npn \__char_str_change_case:nN #1#2 + \int_compare:nNnTF {#1} = {`#4} + { \tl_to_str:n {#4} } { - \int_compare:nNnTF {#1} = 0 - { \tl_to_str:n {#2} } + \__char_str_change_case:n {#1} + \tl_if_blank:nF {#2} { - \int_compare:nTF { `A <= #1 <= `z } - { \char_generate:nn {#1} { 12 } } - { \tl_to_str:n {#2} } + \__char_str_change_case:n {#2} + \tl_if_blank:nF {#3} + { \__char_str_change_case:n {#3} } } } } +\cs_new:Npn \__char_str_change_case:n #1 + { \char_generate:nn {#1} { 12 } } \tl_const:Nx \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } \scan_new:N \s__token_mark \scan_new:N \s__token_stop @@ -15823,7 +15642,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_if_exist_use:cF { __fp_parse_word_#2:N } { \cs_if_exist_use:cF - { __fp_parse_caseless_ \str_foldcase:n {#2} :N } + { __fp_parse_caseless_ \str_casefold:n {#2} :N } { \msg_expandable_error:nnn { fp } { unknown-fp-word } {#2} @@ -23201,7 +23020,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__str_convert_pdfname_bytes:n #1 { \exp_args:Ne \__str_convert_pdfname_bytes_aux:n - { \char_to_utfviii_bytes:n {`#1} } + { \__kernel_codepoint_to_bytes:n {`#1} } } \cs_new:Npn \__str_convert_pdfname_bytes_aux:n #1 { \__str_convert_pdfname_bytes_aux:nnnn #1 } @@ -29550,7 +29369,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_args:Nee \__color_model_new:nnn { \tl_to_str:n {#1} } - { \str_foldcase:n {#2} } {#3} + { \str_casefold:n {#2} } {#3} } \cs_new_protected:Npn \__color_model_new:nnn #1#2#3 { @@ -31831,170 +31650,486 @@ Type H <return> for immediate help}\def~{\errmessage{% \prop_gput:Nnn \g_msg_module_name_prop { luatex } { LaTeX } \prop_gput:Nnn \g_msg_module_type_prop { luatex } { } %% File: l3unicode.dtx -\ior_new:N \g__char_data_ior +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_new:Npn \codepoint_str_generate:n #1 + { + \int_compare:nNnTF {#1} = { `\ } + { ~ } + { \char_generate:nn {#1} { 12 } } + } + \cs_new:Npn \codepoint_generate:nn #1#2 + { + \int_compare:nNnTF {#1} = { `\ } + { ~ } + { + \__kernel_exp_not:w \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#1} {#2} } + } + } + } + { + \cs_new:Npn \codepoint_str_generate:n #1 + { + \int_compare:nNnTF {#1} = { `\ } + { ~ } + { + \use:e + { + \exp_not:N \__codepoint_str_generate:nnnn + \__kernel_codepoint_to_bytes:n {#1} + } + } + } + \cs_new:Npn \__codepoint_str_generate:nnnn #1#2#3#4 + { + \char_generate:nn {#1} { 12 } + \tl_if_blank:nF {#2} + { + \char_generate:nn {#2} { 12 } + \tl_if_blank:nF {#3} + { + \char_generate:nn {#3} { 12 } + \tl_if_blank:nF {#4} + { \char_generate:nn {#4} { 12 } } + } + } + } + \cs_new:Npn \codepoint_generate:nn #1#2 + { + \int_compare:nNnTF {#1} = { `\ } + { ~ } + { + \int_compare:nNnTF {#1} < { "80 } + { + \__kernel_exp_not:w \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#1} {#2} } + } + { + \use:e + { + \exp_not:N \__codepoint_generate:nnnn + \__kernel_codepoint_to_bytes:n {#1} + } + } + } + } + \cs_new:Npn \__codepoint_generate:nnnn #1#2#3#4 + { + \__kernel_exp_not:w \exp_after:wN + { + \tex_expanded:D + { + \__codepoint_generate:n {#1} + \__codepoint_generate:n {#2} + \tl_if_blank:nF {#3} + { + \__codepoint_generate:n {#3} + \tl_if_blank:nF {#4} + { \__codepoint_generate:n {#4} } + } + } + } + } + \cs_new:Npn \__codepoint_generate:n #1 + { + \__kernel_exp_not:w \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#1} { 13 } } + } + } +\cs_new:Npn \__kernel_codepoint_to_bytes:n #1 + { + \exp_args:Nf \__codepoint_to_bytes_auxi:n + { \int_eval:n {#1} } + } +\cs_new:Npn \__codepoint_to_bytes_auxi:n #1 + { + \if_int_compare:w #1 > "80 \exp_stop_f: + \if_int_compare:w #1 < "800 \exp_stop_f: + \__codepoint_to_bytes_outputi:nw + { \__codepoint_to_bytes_auxii:Nnn C {#1} { 64 } } + \__codepoint_to_bytes_outputii:nw + { \__codepoint_to_bytes_auxiii:n {#1} } + \else: + \if_int_compare:w #1 < "10000 \exp_stop_f: + \__codepoint_to_bytes_outputi:nw + { \__codepoint_to_bytes_auxii:Nnn E {#1} { 64 * 64 } } + \__codepoint_to_bytes_outputii:nw + { + \__codepoint_to_bytes_auxiii:n + { \int_div_truncate:nn {#1} { 64 } } + } + \__codepoint_to_bytes_outputiii:nw + { \__codepoint_to_bytes_auxiii:n {#1} } + \else: + \__codepoint_to_bytes_outputi:nw + { + \__codepoint_to_bytes_auxii:Nnn F + {#1} { 64 * 64 * 64 } + } + \__codepoint_to_bytes_outputii:nw + { + \__codepoint_to_bytes_auxiii:n + { \int_div_truncate:nn {#1} { 64 * 64 } } + } + \__codepoint_to_bytes_outputiii:nw + { + \__codepoint_to_bytes_auxiii:n + { \int_div_truncate:nn {#1} { 64 } } + } + \__codepoint_to_bytes_outputiv:nw + { \__codepoint_to_bytes_auxiii:n {#1} } + \fi: + \fi: + \else: + \__codepoint_to_bytes_outputi:nw {#1} + \fi: + \__codepoint_to_bytes_end: { } { } { } { } + } +\cs_new:Npn \__codepoint_to_bytes_auxii:Nnn #1#2#3 + { "#10 + \int_div_truncate:nn {#2} {#3} } +\cs_new:Npn \__codepoint_to_bytes_auxiii:n #1 + { \int_mod:nn {#1} { 64 } + 128 } +\cs_new:Npn \__codepoint_to_bytes_outputi:nw + #1 #2 \__codepoint_to_bytes_end: #3 + { \__codepoint_to_bytes_output:fnn { \int_eval:n {#1} } { } {#2} } +\cs_new:Npn \__codepoint_to_bytes_outputii:nw + #1 #2 \__codepoint_to_bytes_end: #3#4 + { \__codepoint_to_bytes_output:fnn { \int_eval:n {#1} } { {#3} } {#2} } +\cs_new:Npn \__codepoint_to_bytes_outputiii:nw + #1 #2 \__codepoint_to_bytes_end: #3#4#5 + { + \__codepoint_to_bytes_output:fnn + { \int_eval:n {#1} } { {#3} {#4} } {#2} + } +\cs_new:Npn \__codepoint_to_bytes_outputiv:nw + #1 #2 \__codepoint_to_bytes_end: #3#4#5#6 + { + \__codepoint_to_bytes_output:fnn + { \int_eval:n {#1} } { {#3} {#4} {#5} } {#2} + } +\cs_new:Npn \__codepoint_to_bytes_output:nnn #1#2#3 + { + #3 + \__codepoint_to_bytes_end: #2 {#1} + } +\cs_generate_variant:Nn \__codepoint_to_bytes_output:nnn { f } +\cs_new:Npn \__codepoint_to_bytes_end: { } +\cs_new:Npn \codepoint_to_nfd:n #1 + { \__codepoint_to_nfd:nn {#1} { \char_value_catcode:n {#1} } } +\cs_new:Npn \__codepoint_to_nfd:nn #1#2 + { + \exp_args:Ne \__codepoint_to_nfd:nnn + { \__codepoint_nfd:n {#1} } {#1} {#2} + } +\cs_new:Npn \__codepoint_to_nfd:nnn #1#2#3 { \__codepoint_to_nfd:nnnn #1 {#2} {#3} } +\cs_new:Npn \__codepoint_to_nfd:nnnn #1#2#3#4 + { + \int_compare:nNnTF {#1} = {#3} + { \codepoint_generate:nn {#1} {#4} } + { + \__codepoint_to_nfd:nn {#1} {#4} + \tl_if_blank:nF {#2} + { \__codepoint_to_nfd:nn {#2} {#4} } + } + } +\int_const:Nn \c__codepoint_block_size_int { 64 } +\ior_new:N \g__codepoint_data_ior \group_begin: - \bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } + \clist_map_inline:nn + { uppercase , lowercase } + { + \cs_set_nopar:cpn { l__codepoint_ #1 _block_clist } { } + \cs_set_nopar:cpn { l__codepoint_ #1 _block_tl } { 1 } + \cs_set_nopar:cpn { l__codepoint_ #1 _pos_tl } { 0 } + \intarray_new:cn { g__codepoint_ #1 _index_intarray } + { \int_div_truncate:nn { "110000 } \c__codepoint_block_size_int } + } + \cs_set_nopar:Npn \l__codepoint_next_codepoint_fint_tl { 0 } + \cs_set_nopar:Npn \l__codepoint_matched_block_tl { 0 } + \cs_set_protected:Npn \__codepoint_data_auxi:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; + { + \tl_if_blank:nF {#6} + { + \tl_if_head_eq_charcode:nNF {#6} < % > + { \__codepoint_data_auxii:w #1 ; #6 ~ \q_stop } + } + \__codepoint_data_auxiii:w #1 ; #2 ; + } + \cs_set_protected:Npn \__codepoint_data_auxii:w #1 ; #2 ~ #3 \q_stop + { + \tl_const:cx + { c__codepoint_nfd_ \codepoint_str_generate:n {"#1} _tl } + { + {"#2} + { \tl_if_blank:nF {#3} {"#3} } + } + } + \cs_set_protected:Npn \__codepoint_data_auxiii:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ~ \q_stop { - \cs_set:Npn \__char_generate_other:n #1 - { \tex_detokenize:D \tex_expandafter:D { \tex_Uchar:D #1 } } - \cs_set:Npn \__char_generate:n #1 + \use:e { - \tex_unexpanded:D \exp_after:wN - { \tex_Ucharcat:D #1 ~ \tex_catcode:D #1 ~ } + \__codepoint_data_auxiv:w + #1 ; #2 ; + \__codepoint_data_offset:nn {#1} {#6} ; + \__codepoint_data_offset:nn {#1} {#7} ; + #8; } } + \cs_set:Npn \__codepoint_data_offset:nn #1#2 { - \cs_set:Npn \__char_generate_other:n #1 + \tl_if_blank:nTF {#2} + { 0 } + { \int_eval:n { "#2 - "#1 } } + } + \cs_set_protected:Npn \__codepoint_data_auxiv:w #1 ; #2 ; #3 ; #4 ; #5 ; + { + \int_compare:nNnT {"#1} > \l__codepoint_next_codepoint_fint_tl { - \tex_detokenize:D \tex_expandafter:D - { \tex_expanded:D { \__char_generate:n {#1} } } + \__codepoint_data_auxvi:nnnw {#1} {#3} {#4} + #2 Last> \q_stop } - \cs_set:Npn \__char_generate:n #1 + \__codepoint_add:nn { uppercase } {#3} + \__codepoint_add:nn { lowercase } {#4} + \int_compare:nNnF {#3} = { \__codepoint_data_offset:nn {#1} {#5} } { - \use:e - { - \exp_not:N \__char_generate:nnnn - \char_to_utfviii_bytes:n {#1} - } + \tl_const:cx + { c__codepoint_titlecase_ \codepoint_str_generate:n {"#1} _tl } + { {"#5} { } { } } } - \cs_set:Npn \__char_generate:nnnn #1#2#3#4 + \tl_set:Nx \l__codepoint_next_codepoint_fint_tl + { \int_eval:n { "#1 + 1 } } + } + \cs_set_protected:Npn \__codepoint_add:nn #1#2 + { + \clist_put_right:cn { l__codepoint_ #1 _block_clist } {#2} + \int_compare:nNnT { \clist_count:c { l__codepoint_ #1 _block_clist } } + = \c__codepoint_block_size_int + { \__codepoint_save_blocks:nn {#1} { 1 } } + } + \cs_set_protected:Npn \__codepoint_data_auxvi:nnnw #1#2#3#4 Last> #5 \q_stop + { + \tl_if_blank:nTF {#5} + { + \__codepoint_range:nnn {#1} { uppercase } { 0 } + \__codepoint_range:nnn {#1} { lowercase } { 0 } + } + { + \__codepoint_range:nnn {#1} { uppercase } {#2} + \__codepoint_range:nnn {#1} { lowercase } {#3} + } + } + \cs_set_protected:Npn \__codepoint_range:nnn #1 + { + \exp_args:Nf \__codepoint_range_aux:nnn + { \int_eval:n { "#1 - \l__codepoint_next_codepoint_fint_tl } } + } + \cs_set_protected:Npn \__codepoint_range_aux:nnn #1#2 + { + \exp_args:Nf \__codepoint_range:nnnn { - \tex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN - { \char_generate:nn {#1} { 13 } } - \tl_if_blank:nF {#2} + \int_min:nn + {#1} { - \tex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN - { \char_generate:nn {#2} { 13 } } - \tl_if_blank:nF {#3} - { - \tex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN - { \char_generate:nn {#3} { 13 } } - \tl_if_blank:nF {#4} - { - \tex_unexpanded:D - \exp_after:wN \exp_after:wN \exp_after:wN - { \char_generate:nn {#4} { 13 } } - } - } + \c__codepoint_block_size_int + - \clist_count:c { l__codepoint_ #2 _block_clist } } } + {#1} {#2} } - \cs_set_protected:Npn \__char_data_auxi:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; + \cs_set_protected:Npn \__codepoint_range:nnnn #1#2#3#4 { - \tl_if_blank:nF {#6} - { - \tl_if_head_eq_charcode:nNF {#6} < % > - { \__char_data_auxii:w #1 ; #6 ~ \q_stop } + \prg_replicate:nn {#1} + { \clist_put_right:cn { l__codepoint_ #3 _block_clist } {#4} } + \int_compare:nNnT { \clist_count:c { l__codepoint_ #3 _block_clist } } + = \c__codepoint_block_size_int + { \__codepoint_save_blocks:nn {#3} { 1 } } + \int_compare:nNnF + { \int_div_truncate:nn { #2 - #1 } \c__codepoint_block_size_int } = 0 + { + \tl_set:cx { l__codepoint_ #3 _block_clist } + { + \exp_args:NNe \use:nn \use_none:n + { \prg_replicate:nn { \c__codepoint_block_size_int } { , #4 } } + } + \__codepoint_save_blocks:nn {#3} + { \int_div_truncate:nn { (#2 - #1) } \c__codepoint_block_size_int } } - \__char_data_auxiii:w #1 ; + \prg_replicate:nn + { \int_mod:nn { #2 - #1 } \c__codepoint_block_size_int } + { \clist_put_right:cx { l__codepoint_ #3 _block_clist } {#4} } } - \cs_set_protected:Npn \__char_data_auxii:w #1 ; #2 ~ #3 \q_stop + \cs_set_protected:Npn \__codepoint_save_blocks:nn #1#2 { - \tl_const:cx - { c__char_nfd_ \__char_generate_other:n { "#1 } _tl } + \tl_set_eq:Nc \l__codepoint_matched_block_tl { l__codepoint_ #1 _block_tl } + \int_step_inline:nn { \tl_use:c { l__codepoint_ #1 _block_tl } - 1 } { - { \__char_generate:n { "#2 } } + \tl_if_eq:ccT { l__codepoint_ #1 _block_clist } + { l__codepoint_ #1 _block_ ##1 _clist } + { \tl_set:Nn \l__codepoint_matched_block_tl {##1} } + } + \int_compare:nNnT + { \tl_use:c { l__codepoint_ #1 _block_tl } } = \l__codepoint_matched_block_tl { - \tl_if_blank:nF {#3} - { \__char_generate:n { "#3 } } - } + \clist_set_eq:cc + { + l__codepoint_ #1 _block_ + \tl_use:c { l__codepoint_ #1 _block_tl } _clist + } + { l__codepoint_ #1 _block_clist } + \tl_set:cx { l__codepoint_ #1 _block_tl } + { \int_eval:n { \tl_use:c { l__codepoint_ #1 _block_tl } + 1 } } + } + \prg_replicate:nn {#2} + { + \tl_set:cx { l__codepoint_ #1 _pos_tl } + { \int_eval:n { \tl_use:c { l__codepoint_ #1 _pos_tl } + 1 } } + \exp_args:Nc \__kernel_intarray_gset:Nnn + { g__codepoint_ #1 _index_intarray } + { \tl_use:c { l__codepoint_ #1 _pos_tl } } + \l__codepoint_matched_block_tl + } + \clist_clear:c { l__codepoint_ #1 _block_clist } + } + \cs_set_protected:Npn \__codepoint_finalise_blocks: + { + \clist_map_inline:nn { uppercase , lowercase } + { + \__codepoint_range:nnn { 110000 } {##1} { 0 } + \__codepoint_finalise_blocks:n {##1} + } + } + \cs_set_protected:Npn \__codepoint_finalise_blocks:n #1 + { + \cs_gset_eq:cc { c__codepoint_ #1 _index_intarray } { g__codepoint_ #1 _index_intarray } + \cs_undefine:c { g__codepoint_ #1 _index_intarray } + \intarray_new:cn { g__codepoint_ #1 _blocks_intarray } + { ( \tl_use:c { l__codepoint_ #1 _block_tl } - 1 ) * \c__codepoint_block_size_int } + \int_step_inline:nn { \tl_use:c { l__codepoint_ #1 _block_tl } - 1 } + { + \exp_args:Nv \__codepoint_finalise_blocks:nnn + { l__codepoint_ #1 _block_ ##1 _clist } + {##1} {#1} } + \cs_gset_eq:cc { c__codepoint_ #1 _blocks_intarray } + { g__codepoint_ #1 _blocks_intarray } + \cs_undefine:c { g__codepoint_ #1 _blocks_intarray } } - \cs_set_protected:Npn \__char_data_auxiii:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ~ \q_stop + \cs_set_protected:Npn \__codepoint_finalise_blocks:nnn #1#2#3 { - \cs_set_nopar:Npn \l__char_tmpa_tl {#7} - \reverse_if:N \if_meaning:w \l__char_tmpa_tl \c_empty_tl - \cs_set_nopar:Npn \l__char_tmpb_tl {#5} - \reverse_if:N \if_meaning:w \l__char_tmpa_tl \l__char_tmpb_tl - \tl_const:cx - { c__char_titlecase_ \__char_generate_other:n { "#1 } _tl } - { \__char_generate:n { "#7 } } - \fi: - \fi: + \exp_args:Nnf \__codepoint_finalise_blocks:nnnw { 1 } + { \int_eval:n { ( #2 - 1 ) * \c__codepoint_block_size_int } } + {#3} + #1 , \q_recursion_tail , \q_recursion_stop + } + \cs_set_protected:Npn \__codepoint_finalise_blocks:nnnw #1#2#3#4 , + { + \quark_if_recursion_tail_stop:n {#4} + \intarray_gset:cnn { g__codepoint_ #3 _blocks_intarray } + { #1 + #2 } + {#4} + \exp_args:Nf \__codepoint_finalise_blocks:nnnw + { \int_eval:n { #1 + 1 } } {#2} {#3} } - \ior_open:Nn \g__char_data_ior { UnicodeData.txt } + \ior_open:Nn \g__codepoint_data_ior { UnicodeData.txt } \group_begin: \char_set_catcode_space:n { `\ }% - \ior_map_variable:NNn \g__char_data_ior \l__char_tmpa_tl + \ior_map_variable:NNn \g__codepoint_data_ior \l__codepoint_tmpa_tl {% - \if_meaning:w \l__char_tmpa_tl \c_space_tl + \if_meaning:w \l__codepoint_tmpa_tl \c_space_tl \exp_after:wN \ior_map_break: \fi: - \exp_after:wN \__char_data_auxi:w \l__char_tmpa_tl \q_stop + \exp_after:wN \__codepoint_data_auxi:w \l__codepoint_tmpa_tl \q_stop }% + \__codepoint_finalise_blocks: \group_end: - \ior_open:Nn \g__char_data_ior { CaseFolding.txt } - \cs_set_protected:Npn \__char_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop +\group_end: +\cs_new:Npn \__kernel_codepoint_data:nn #1#2 + { + \exp_args:Nf \__codepoint_data:nnn + { + \int_eval:n + { + \c__codepoint_block_size_int * + ( + \intarray_item:cn { c__codepoint_ #1 _index_intarray } + { + \int_div_truncate:nn {#2} + \c__codepoint_block_size_int + + 1 + } + - 1 + ) + } + } + {#2} {#1} + } +\cs_new:Npn \__codepoint_data:nnn #1#2#3 + { + \intarray_item:cn { c__codepoint_ #3 _blocks_intarray } + { #1 + \int_mod:nn {#2} \c__codepoint_block_size_int + 1 } + } +\group_begin: + \ior_open:Nn \g__codepoint_data_ior { CaseFolding.txt } + \cs_set_protected:Npn \__codepoint_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop { \if:w \tl_head:n { #2 ? } C \reverse_if:N \if_int_compare:w - \char_value_lccode:n {"#1} = "#3 ~ + \int_eval:n { \__kernel_codepoint_data:nn { lowercase } {"#1} + "#1 } + = "#3 ~ \tl_const:cx - { c__char_foldcase_ \__char_generate_other:n { "#1 } _tl } - { \__char_generate:n { "#3 } } + { c__codepoint_casefold_ \codepoint_str_generate:n {"#1} _tl } + { {"#3} { } { } } \fi: \else: \if:w \tl_head:n { #2 ? } F - \__char_data_auxii:w #1 ~ #3 ~ \q_stop + \__codepoint_data_auxii:w #1 ~ #3 ~ \q_stop \fi: \fi: } - \bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } + \cs_set_protected:Npn \__codepoint_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop { - \cs_set_protected:Npn \__char_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop + \tl_const:cx { c__codepoint_casefold_ \codepoint_str_generate:n {"#1} _tl } { - \if:w \tl_head:n { #2 ? } F - \__char_data_auxii:w #1 ~ #3 ~ \q_stop - \fi: + {"#2} + {"#3} + { \tl_if_blank:nF {#4} { " \int_to_Hex:n {"#4} } } } } - \cs_set_protected:Npn \__char_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop - { - \tl_const:cx { c__char_foldcase_ \__char_generate_other:n { "#1 } _tl } - { - \__char_generate:n { "#2 } - \__char_generate:n { "#3 } - \tl_if_blank:nF {#4} - { \__char_generate:n { \int_value:w "#4 } } - } - } - \ior_str_map_inline:Nn \g__char_data_ior + \ior_str_map_inline:Nn \g__codepoint_data_ior { \reverse_if:N \if:w \c_hash_str \tl_head:w #1 \c_hash_str \q_stop - \__char_data_auxi:w #1 \q_stop + \__codepoint_data_auxi:w #1 \q_stop \fi: } - \ior_close:N \g__char_data_ior - \ior_open:Nn \g__char_data_ior { SpecialCasing.txt } - \cs_set_protected:Npn \__char_data_auxi:w + \ior_close:N \g__codepoint_data_ior + \ior_open:Nn \g__codepoint_data_ior { SpecialCasing.txt } + \cs_set_protected:Npn \__codepoint_data_auxi:w #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop { - \use:n { \__char_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop - \use:n { \__char_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop + \use:n { \__codepoint_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop + \use:n { \__codepoint_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop \str_if_eq:nnF {#3} {#4} - { \use:n { \__char_data_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop } + { \use:n { \__codepoint_data_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop } } - \cs_set_protected:Npn \__char_data_auxii:w + \cs_set_protected:Npn \__codepoint_data_auxii:w #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop { \tl_if_empty:nF {#4} { - \tl_const:cx { c__char_ #2 case_ \__char_generate_other:n { "#1 } _tl } + \tl_const:cx { c__codepoint_ #2 case_ \codepoint_str_generate:n {"#1} _tl } { - \__char_generate:n { "#3 } - \__char_generate:n { "#4 } - \tl_if_blank:nF {#5} - { \__char_generate:n { "#5 } } + {"#3} + {"#4} + { \tl_if_blank:nF {#5} {"#5} } } } } - \ior_str_map_inline:Nn \g__char_data_ior + \ior_str_map_inline:Nn \g__codepoint_data_ior { \str_if_eq:eeTF { \tl_head:w #1 \c_hash_str \q_stop } { \c_hash_str } { @@ -32003,11 +32138,42 @@ Type H <return> for immediate help}\def~{\errmessage{% { \c_hash_str \c_space_tl Conditional~Mappings } { \ior_map_break: } } - { \__char_data_auxi:w #1 \q_stop } + { \__codepoint_data_auxi:w #1 \q_stop } } - \ior_close:N \g__char_data_ior + \ior_close:N \g__codepoint_data_ior \group_end: - +\cs_new:Npn \__kernel_codepoint_case:nn #1#2 + { + \exp_args:Ne \__codepoint_case:nnn + { \codepoint_str_generate:n {#2} } {#1} {#2} + } +\cs_new:Npn \__codepoint_case:nnn #1#2#3 + { + \cs_if_exist:cTF { c__codepoint_ #2 _ #1 _tl } + { + \tl_use:c + { c__codepoint_ #2 _ #1 _tl } + } + { \use:c { __codepoint_ #2 :n } {#3} } + } +\cs_new:Npn \__codepoint_uppercase:n { \__codepoint_case:nn { uppercase } } +\cs_new:Npn \__codepoint_lowercase:n { \__codepoint_case:nn { lowercase } } +\cs_new:Npn \__codepoint_titlecase:n { \__codepoint_case:nn { uppercase } } +\cs_new:Npn \__codepoint_casefold:n { \__codepoint_case:nn { lowercase } } +\cs_new:Npn \__codepoint_case:nn #1#2 + { + { \int_eval:n { \__kernel_codepoint_data:nn {#1} {#2} + #2 } } + { } + { } + } +\cs_new:Npn \__codepoint_nfd:n #1 + { \exp_args:Ne \__codepoint_nfd:nn { \codepoint_str_generate:n {#1} } {#1} } +\cs_new:Npn \__codepoint_nfd:nn #1#2 + { + \tl_if_exist:cTF { c__codepoint_nfd_ #1 _tl } + { \tl_use:c { c__codepoint_nfd_ #1 _tl } } + { {#2} { } } + } \ior_new:N \g__text_data_ior \group_begin: \ior_open:Nn \g__text_data_ior { GraphemeBreakProperty.txt } @@ -32224,10 +32390,26 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npn \__text_codepoint_process:nNN #1#2#3 { #1 {#2#3} } - \cs_new:Npn \__text_codepoint_process:nNNN #1#2#3#4 - { #1 {#2#3#4} } - \cs_new:Npn \__text_codepoint_process:nNNNN #1#2#3#4#5 - { #1 {#2#3#4#5} } + \sys_if_engine_ptex:TF + { + \cs_gset:Npn \__text_codepoint_process:nN #1#2 + { + \int_compare:nNnTF { `#2 } > { "80 } + { + \int_compare:nNnTF { `#2 } < { "E0 } + { \__text_codepoint_process:nNN } + { \use:n } + } + { \use:n } + {#1} #2 + } + } + { + \cs_new:Npn \__text_codepoint_process:nNNN #1#2#3#4 + { #1 {#2#3#4} } + \cs_new:Npn \__text_codepoint_process:nNNNN #1#2#3#4#5 + { #1 {#2#3#4#5} } + } } \bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } @@ -32236,51 +32418,75 @@ Type H <return> for immediate help}\def~{\errmessage{% \prg_new_conditional:Npnn \__text_codepoint_compare:nNn #1#2#3 { TF , p } { - \int_compare:nNnTF { `#1 } #2 {#3} + \int_compare:nNnTF {`#1} #2 {#3} \prg_return_true: \prg_return_false: } + \cs_new:Npn \__text_codepoint_from_chars:Nw #1 {`#1} } { \prg_new_conditional:Npnn \__text_codepoint_compare:nNn #1#2#3 { TF , p } { - \int_compare:nNnTF { \__text_codepoint_compare:N #1 } + \int_compare:nNnTF { \__text_codepoint_from_chars:Nw #1 } #2 {#3} \prg_return_true: \prg_return_false: } - \cs_new:Npn \__text_codepoint_compare:N #1 + \cs_new:Npn \__text_codepoint_from_chars:Nw #1 { \if_int_compare:w `#1 > "80 \exp_stop_f: \if_int_compare:w `#1 < "E0 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN - \__text_codepoint_compare:NN + \__text_codepoint_from_chars:NN \else: \if_int_compare:w `#1 < "F0 \exp_stop_f: \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN - \exp_after:wN \__text_codepoint_compare:NNN + \exp_after:wN \__text_codepoint_from_chars:NNN \else: \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN - \exp_after:wN \__text_codepoint_compare:NNNN + \exp_after:wN \__text_codepoint_from_chars:NNNN \fi: \fi: \else: - \exp_after:wN \__text_codepoint_compare_aux:N + \exp_after:wN \__text_codepoint_from_chars:N \fi: #1 } - \cs_new:Npn \__text_codepoint_compare_aux:N #1 { `#1 } - \cs_new:Npn \__text_codepoint_compare:NN #1#2 + \cs_new:Npn \__text_codepoint_from_chars:N #1 { `#1 } + \cs_new:Npn \__text_codepoint_from_chars:NN #1#2 { (`#1 - "C0) * "40 + `#2 - "80 } - \cs_new:Npn \__text_codepoint_compare:NNN #1#2#3 - { (`#1 - "E0) * "1000 + (`#2 - "80) * "40 + `#3 - "80 } - \cs_new:Npn \__text_codepoint_compare:NNNN #1#2#3#4 + % \end{macrocode} + % Avoid high chars with p\TeX{}. + % \begin{macrocode} + \sys_if_engine_ptex:TF + { + \cs_gset:Npn \__text_codepoint_from_chars:Nw #1 + { + \if_int_compare:w `#1 > "80 \exp_stop_f: + \if_int_compare:w `#1 < "E0 \exp_stop_f: + \exp_after:wN \exp_after:wN \exp_after:wN + \__text_codepoint_from_chars:NN + \else: + \exp_after:wN \exp_after:wN \exp_after:wN + \__text_codepoint_from_chars:N + \fi: + \else: + \exp_after:wN \__text_codepoint_from_chars:N + \fi: + #1 + } + } { - (`#1 - "F0) * "40000 - + (`#2 - "80) * "1000 - + (`#3 - "80) * "40 - + `#4 - "80 + \cs_new:Npn \__text_codepoint_from_chars:NNN #1#2#3 + { (`#1 - "E0) * "1000 + (`#2 - "80) * "40 + `#3 - "80 } + \cs_new:Npn \__text_codepoint_from_chars:NNNN #1#2#3#4 + { + (`#1 - "F0) * "40000 + + (`#2 - "80) * "1000 + + (`#3 - "80) * "40 + + `#4 - "80 + } } } \tl_new:N \l_text_accents_tl @@ -32306,6 +32512,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_not:n { \begin \cite \end \label \ref } \exp_not:c { cite ~ } + \exp_not:n { \babelshorthand } } \tl_new:N \l_text_math_arg_tl \tl_set:Nn \l_text_math_arg_tl { \ensuremath } @@ -32530,6 +32737,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii@two@octets } { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii@three@octets } { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii@four@octets } + { \tl_if_head_eq_meaning_p:oN {#1} \active@prefix } } } { \exp_after:wN \__text_expand_loop:w #1 } @@ -32792,7 +33000,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__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 { - \cs_if_exist:cTF { __text_change_case_ #2 _ #5 -x- #3 :nnnN } + \cs_if_exist:cTF { __text_change_case_ #2 _ #5 -x- #3 :nnnn } { \__text_change_case_auxii:nnn {#1} {#2} { #5 -x- #3 } } { \__text_change_case_auxii:nnn {#1} {#2} {#4} } } @@ -32946,9 +33154,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__text_change_case_cs_check:nnN #1#2#3 { \token_if_cs:NTF #3 - { \__text_change_case_exclude:nnN } - { \use:c { __text_change_case_char_ #1 :nnN } } - {#1} {#2} #3 + { \__text_change_case_exclude:nnN {#1} {#2} } + { + \__text_codepoint_process:nN + { \use:c { __text_change_case_codepoint_ #1 :nnn } {#1} {#2} } + } + #3 } \cs_new:Npn \__text_change_case_exclude:nnN #1#2#3 { @@ -33043,7 +33254,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__text_change_case_store:v { c__text_ #1 case_ \token_to_str:N #5 _tl } - \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#4} + \use:c { __text_change_case_next_ #2 :nn } {#2} {#4} } { \__text_change_case_store:n {#5} @@ -33053,196 +33264,177 @@ Type H <return> for immediate help}\def~{\errmessage{% \str_if_eq:nnTF {#1} { lower } { upper } { lower } case_ \token_to_str:N #5 _tl } - { \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#4} } + { \use:c { __text_change_case_next_ #2 :nn } {#2} {#4} } { \__text_change_case_loop:nnw {#3} {#4} } } } -\cs_new:Npn \__text_change_case_char_lower:nnN #1#2#3 +\cs_new:Npn \__text_change_case_codepoint_lower:nnn #1#2#3 { - \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_ #2 :nnnn } + { \__text_change_case_lower_sigma:nnnn } + {#1} {#1} {#2} {#3} } -\cs_new:Npn \__text_change_case_char_upper:nnN #1#2#3 +\cs_new:Npn \__text_change_case_codepoint_upper:nnn #1#2#3 { - \cs_if_exist_use:cF { __text_change_case_upper_ #2 :nnnN } - { \__text_change_case_char:nnnN } - {#1} {#1} {#2} #3 + \cs_if_exist_use:cF { __text_change_case_upper_ #2 :nnnn } + { \__text_change_case_codepoint:nnnn } + {#1} {#1} {#2} {#3} } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \__text_change_case_lower_sigma:nnnn #1#2#3#4 { - \cs_new:Npn \__text_change_case_lower_sigma:nnnN #1#2#3#4 - { - \int_compare:nNnTF { `#4 } = { "03A3 } - { \__text_change_case_lower_sigma:nnNw {#2} {#3} #4 } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } - } - \cs_new:Npn \__text_change_case_lower_sigma:nnNw #1#2#3#4 \q__text_recursion_stop - { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_lower_sigma:NnnN #3 } - { - \__text_change_case_store:e - { \char_generate:nn { "03C2 } { \__text_char_catcode:N #3 } } - \__text_change_case_loop:nnw - } - {#1} {#2} #4 \q__text_recursion_stop - } - \cs_new:Npn \__text_change_case_lower_sigma:NnnN #1#2#3#4 + \__text_codepoint_compare:nNnTF {#4} = { "03A3 } + { \__text_change_case_lower_sigma:nnnw {#2} } + { \__text_change_case_codepoint:nnnn {#1} {#2} } + {#3} {#4} + } +\cs_new:Npn \__text_change_case_lower_sigma:nnnw #1#2#3#4 \q__text_recursion_stop + { + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_lower_sigma:nnnN {#3} } { \__text_change_case_store:e - { - \token_if_letter:NTF #4 - { \char_generate:nn { "03C3 } { \__text_char_catcode:N #1 } } - { \char_generate:nn { "03C2 } { \__text_char_catcode:N #1 } } - } - \__text_change_case_loop:nnw {#2} {#3} #4 + { \codepoint_generate:nn { "03C2 } { \__text_char_catcode:N #3 } } + \__text_change_case_loop:nnw } + {#1} {#2} #4 \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:nnnN #1#2#3#4 - { - \int_compare:nNnTF { `#4 } = { "CE } - { \__text_change_case_lower_sigma:nnnNN } - { \__text_change_case_char:nnnN } - {#1} {#2} {#3} #4 - } - \cs_new:Npn \__text_change_case_lower_sigma:nnnNN #1#2#3#4#5 - { - \int_compare:nNnTF { `#5 } = { "A3 } - { \__text_change_case_lower_sigma:nnw {#2} {#3} } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4#5 } - } - \cs_new:Npn \__text_change_case_lower_sigma:nnw #1#2#3 \q__text_recursion_stop - { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_lower_sigma:nnN } - { - \__text_change_case_store:V \c__text_final_sigma_tl - \__text_change_case_loop:nnw - } - {#1} {#2} #3 \q__text_recursion_stop - } - \cs_new:Npn \__text_change_case_lower_sigma:nnN #1#2#3 + \__text_change_case_store:e { \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 } } } - { \__text_change_case_store:V \c__text_sigma_tl } - { \__text_change_case_store:V \c__text_final_sigma_tl } - \__text_change_case_loop:nnw {#1} {#2} #3 + { \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 } -\cs_new:Npx \__text_change_case_char_title:nnN #1#2#3 +\cs_new:Npn \__text_change_case_codepoint_title:nnn #1#2#3 { - \exp_not:N \bool_if:NTF \l_text_titlecase_check_letter_bool + \bool_if:NTF \l_text_titlecase_check_letter_bool { - \bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { \exp_not:N \token_if_letter:NTF #3 } + \tl_if_single:nTF {#3} { - \exp_not:N \bool_lazy_or:nnTF - { \exp_not:N \token_if_letter_p:N #3 } - { \exp_not:N \token_if_active_p:N #3 } + \bool_lazy_or:nnTF + { \token_if_letter_p:N #3 } + { + \bool_lazy_and_p:nn + { \token_if_active_p:N #3 } + { ! \int_compare_p:nNn {`#3} < { "80 } } + } + { \use:c { __text_change_case_codepoint_ #1 :nn } } + { \__text_change_case_codepoint_title:nnnn { title } {#1} } } - { \exp_not:N \use:c { __text_change_case_char_ #1 :nN } } - { \exp_not:N \__text_change_case_char_title:nnnN { title } {#1} } + { \use:c { __text_change_case_codepoint_ #1 :nn } } } - { \exp_not:N \use:c { __text_change_case_char_ #1 :nN } } - {#2} #3 + { \use:c { __text_change_case_codepoint_ #1 :nn } } + {#2} {#3} } -\cs_new_eq:NN \__text_change_case_char_titleonly:nnN - \__text_change_case_char_title:nnN -\cs_new:Npn \__text_change_case_char_title:nN #1#2 - { \__text_change_case_char_title:nnnN { title } { lower } {#1} #2 } -\cs_new:Npn \__text_change_case_char_titleonly:nN #1#2 - { \__text_change_case_char_title:nnnN { title } { end } {#1} #2 } -\cs_new:Npn \__text_change_case_char_title:nnnN #1#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_if_exist_use:cF { __text_change_case_title_ #3 :nnnN } + \cs_if_exist_use:cF { __text_change_case_title_ #3 :nnnn } { - \cs_if_exist_use:cF { __text_change_case_upper_ #3 :nnnN } - { \__text_change_case_char:nnnN } + \cs_if_exist_use:cF { __text_change_case_upper_ #3 :nnnn } + { \__text_change_case_codepoint:nnnn } } - {#1} {#2} {#3} #4 + {#1} {#2} {#3} {#4} } -\cs_new:Npn \__text_change_case_char:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_codepoint:nnnn #1#2#3#4 { - \token_if_active:NTF #4 + \bool_lazy_and:nnTF + { \tl_if_single_p:n {#4} } + { \token_if_active_p:N #4 } { \__text_change_case_store:n {#4} } { \__text_change_case_store:e - { \use:c { char_ #1 case :N } #4 } + { \__text_change_case_codepoint:nn {#1} {#4} } } - \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} + \use:c { __text_change_case_next_ #2 :nn } {#2} {#3} } -\bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \__text_change_case_codepoint:nn #1#2 { - \cs_new_eq:NN \__text_change_case_char_auxi:nnnN - \__text_change_case_char:nnnN - \cs_gset:Npn \__text_change_case_char:nnnN #1#2#3#4 - { - \int_compare:nNnTF { `#4 } > { "80 } - { - \int_compare:nNnTF { `#4 } < { "E0 } - { \__text_change_case_char_UTFviii:nnnNN } - { \__text_change_case_char_auxii:nnnN } - } - { \__text_change_case_char_auxi:nnnN } - {#1} {#2} {#3} #4 - } - \sys_if_engine_pdftex:TF + \__text_change_case_codepoint:fnn + { \int_eval:n { \__text_codepoint_from_chars:Nw #2 } } {#1} {#2} + } +\cs_new:Npn \__text_change_case_codepoint:nnn #1#2#3 + { + \exp_args:Ne \__text_change_case_codepoint_aux:nn + { \__kernel_codepoint_case:nn { #2 case } {#1} } {#3} + } +\cs_generate_variant:Nn \__text_change_case_codepoint:nnn { f } +\sys_if_engine_ptex:T + { + \cs_new_eq:NN \__text_change_case_codepoint_aux:nnn + \__text_change_case_codepoint:nnn + \cs_gset:Npn \__text_change_case_codepoint:nnn #1#2#3 { - \cs_new:Npn \__text_change_case_char_auxii:nnnN #1#2#3#4 - { - \int_compare:nNnTF { `#4 } < { "F0 } - { \__text_change_case_char_UTFviii:nnnNNN } - { \__text_change_case_char_UTFviii:nnnNNNN } - {#1} {#2} {#3} #4 - } + \int_compare:nNnTF {#1} = { -1 } + { \exp_not:n {#3} } + { \__text_change_case_codepoint_aux:nnn {#1} {#2} {#3} } } + } +\cs_new:Npn \__text_change_case_codepoint_aux:nn #1#2 + { + \use:e { \__text_change_case_codepoint_aux:nnnn #1 {#2} } + } +\cs_new:Npn \__text_change_case_codepoint_aux:nnnn #1#2#3#4 + { + \__text_codepoint_compare:nNnTF {#4} = {#1} + { \exp_not:n {#4} } { - \cs_new:Npn \__text_change_case_char_auxii:nnnN #1#2#3#4 + \codepoint_generate:nn {#1} + { \__text_change_case_catcode:nn {#4} {#1} } + \tl_if_blank:nF {#2} { - \__text_change_case_store:n {#4} - \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} + \codepoint_generate:nn {#2} + { \char_value_catcode:n {#2} } + \tl_if_blank:nF {#3} + { + \codepoint_generate:nn {#3} + { \char_value_catcode:n {#3} } + } } } - \cs_new:Npn \__text_change_case_char_UTFviii:nnnNN #1#2#3#4#5 - { \__text_change_case_char_UTFviii:nnnn {#1} {#2} {#3} {#4#5} } - \cs_new:Npn \__text_change_case_char_UTFviii:nnnNNN #1#2#3#4#5#6 - { \__text_change_case_char_UTFviii:nnnn {#1} {#2} {#3} {#4#5#6} } - \cs_new:Npn \__text_change_case_char_UTFviii:nnnNNNN #1#2#3#4#5#6#7 - { \__text_change_case_char_UTFviii:nnnn {#1} {#2} {#3} {#4#5#6#7} } - \cs_new:Npn \__text_change_case_char_UTFviii:nnnn #1#2#3#4 + } +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_new:Npn \__text_change_case_catcode:nn #1#2 + { \__text_char_catcode:N #1 } + } + { + \cs_new:Npn \__text_change_case_catcode:nn #1#2 { - \cs_if_exist:cTF { c__kernel_ #1 case_ \tl_to_str:n {#4} _tl } + \__text_codepoint_compare:nNnTF {#1} < { "80 } + { \__text_char_catcode:N #1 } { - \__text_change_case_store:v - { c__kernel_ #1 case_ \tl_to_str:n {#4} _tl } + \int_compare:nNnTF {#2} < { "80 } + { \char_value_catcode:n {#2} } + { 13 } } - { \__text_change_case_store:n {#4} } - \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} } } -\cs_new:Npn \__text_change_case_char_next_lower:nn #1#2 +\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_char_next_upper:nn - \__text_change_case_char_next_lower:nn -\cs_new_eq:NN \__text_change_case_char_next_title:nn - \__text_change_case_char_next_lower:nn -\cs_new_eq:NN \__text_change_case_char_next_titleonly:nn - \__text_change_case_char_next_lower:nn -\cs_new:Npn \__text_change_case_char_next_end:nn #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_protected:Npn \text_declare_case_equivalent:Nn #1#2 { @@ -33255,253 +33447,247 @@ Type H <return> for immediate help}\def~{\errmessage{% #1 } \cs_new:Npn \__text_case_switch_marker: { } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\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:nnnN } #1#2#3#4 + \__text_codepoint_compare:nNnTF {#4} = { "00DF } { - \int_compare:nNnTF { `#4 } = { "00DF } - { - \__text_change_case_store:e - { \char_generate:nn { "1E9E } { \__text_char_catcode:N #4 } } - \use:c { __text_change_case_char_next_ #2 :nn } - {#2} {#3} - } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + \__text_change_case_store:e + { + \codepoint_generate:nn { "1E9E } + { \__text_change_case_catcode:nn {#4} { "1E9E } } + } + \use:c { __text_change_case_next_ #2 :nn } + {#2} {#3} } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } +\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:cpx { __text_change_case_upper_de-x-eszett:nnnN } #1#2#3#4 + \__text_change_case_if_greek:nTF {#4} { - \exp_not:N \int_compare:nNnTF { `#4 } = { "00C3 } + \exp_args:Ne \__text_change_case_upper_el:nnn { - \exp_not:c { __text_change_case_upper_de-x-eszett:nnnNN } - {#1} {#2} {#3} #4 + \codepoint_to_nfd:n { \__text_codepoint_from_chars:Nw #4 } } - { \exp_not:N \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + {#2} {#3} } - \cs_new:cpn { __text_change_case_upper_de-x-eszett:nnnNN } #1#2#3#4#5 { - \int_compare:nNnTF { `#5 } = { "009F } + \__text_codepoint_compare:nNnTF {#4} = { "0345 } { - \__text_change_case_store:V \c__text_grosses_Eszett_tl - \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} + \__text_change_case_store:e + { + \use:c { __text_change_case_upper_ #3 :n } {#4} + } + \__text_change_case_loop:nnw {#2} {#3} } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4#5 } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } } -\cs_new_eq:cc { __text_change_case_upper_de-alt:nnnN } - { __text_change_case_upper_de-x-eszett:nnnN } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\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:n #1 + { + \codepoint_generate:nn { "0399 } + { \char_value_catcode:n { "0399 } } + } +\cs_new:cpn { __text_change_case_upper_el-x-iota:n } #1 + { \exp_not:n {#1} } +\cs_new:Npn \__text_change_case_upper_el:nnn #1#2#3 + { + \__text_codepoint_process:nN + { \__text_change_case_upper_el:nnnw {#2} {#3} } #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:nnnN #1#2#3#4 + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_upper_el:nnnN {#3} } { - \__text_change_case_if_greek:nTF { `#4 } - { - \exp_args:Ne \__text_change_case_upper_el:nnn - { \char_to_nfd:N #4 } {#2} {#3} - } - { - \int_compare:nNnTF { `#4 } = { "0345 } - { - \__text_change_case_store:e - { - \use:c { __text_change_case_upper_ #3 :N } #4 - } - \__text_change_case_loop:nnw {#2} {#3} - } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } - } + \__text_change_case_store:e + { \__text_change_case_codepoint:nn { upper } {#3} } + \__text_change_case_loop:nnw } - \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:N #1 + {#1} {#2} #4 \q__text_recursion_stop + } +\cs_new:Npn \__text_change_case_upper_el:nnnN #1#2#3#4 + { + \token_if_cs:NTF #4 { - \char_generate:nn { "0399 } - { \char_value_catcode:n { "0399 } } + \__text_change_case_store:e + { \__text_change_case_codepoint:nn { upper } {#1} } + \__text_change_case_loop:nnw {#2} {#3} #4 } - \cs_new:cpn { __text_change_case_upper_el-x-iota:N } #1 - { \exp_not:n {#1} } - \cs_new:Npn \__text_change_case_upper_el:nnn #1#2#3 - { \__text_change_case_upper_el:nnNw {#2} {#3} #1 } - \cs_new:Npn \__text_change_case_upper_el:nnNw #1#2#3#4 \q__text_recursion_stop { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_upper_el:NnnN #3 } + \__text_change_case_if_takes_ypogegrammeni:nTF {#1} { - \__text_change_case_store:e { \char_uppercase:N #3 } - \__text_change_case_loop:nnw + \__text_change_case_upper_el_ypogegrammeni:nnnnnw + {#1} {#2} {#3} { } { } #4 } - {#1} {#2} #4 \q__text_recursion_stop + { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4 } } - \cs_new:Npn \__text_change_case_upper_el:NnnN #1#2#3#4 + } +\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnw + #1#2#3#4#5#6 \q__text_recursion_stop + { + \tl_if_head_is_N_type:nTF {#6} { - \token_if_cs:NTF #4 - { - \__text_change_case_store:e { \char_uppercase:N #1 } - \__text_change_case_loop:nnw {#2} {#3} #4 - } - { - \__text_change_case_if_takes_ypogegrammeni:nTF { `#1 } - { - \__text_change_case_upper_el_ypogegrammeni:Nnnnnw - #1 {#2} {#3} { } { } #4 - } - { \__text_change_case_upper_el_aux:NnnN #1 {#2} {#3} #4 } - } + \__text_change_case_upper_el_ypogegrammeni:nnnnnN + {#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 + { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 } + #6 \q__text_recursion_stop + } +\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnN #1#2#3#4#5#6 + { + \token_if_cs:NTF #6 + { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 #6 } { - \tl_if_head_is_N_type:nTF {#6} + \__text_codepoint_process:nN { - \__text_change_case_upper_el_ypogegrammeni:NnnnnN - #1 {#2} {#3} {#4} {#5} + \__text_change_case_upper_el_ypogegrammeni:nnnnnn + {#1} {#2} {#3} {#4} {#5} } - { \__text_change_case_upper_el_aux:NnnN #1 {#2} {#3} #4#5 } - #6 \q__text_recursion_stop + #6 + } + } +\cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:nnnnnn #1#2#3#4#5#6 + { + \__text_codepoint_compare:nNnTF {#6} = { "0345 } + { + \__text_change_case_upper_el_ypogegrammeni:nnnnnw + {#1} {#2} {#3} {#4} {#6} } - \cs_new:Npn \__text_change_case_upper_el_ypogegrammeni:NnnnnN #1#2#3#4#5#6 { - \token_if_cs:NTF #6 - { \__text_change_case_upper_el_aux:NnnN #1 {#2} {#3} #4#5 #6 } + \bool_lazy_or:nnTF + { \__text_change_case_if_greek_accent_p:n {#6} } + { \__text_change_case_if_greek_diacritic_p:n {#6} } { - \int_compare:nNnTF { `#6 } = { "0345 } - { - \__text_change_case_upper_el_ypogegrammeni:Nnnnnw - #1 {#2} {#3} {#4} {#6} - } - { - \bool_lazy_or:nnTF - { \__text_change_case_if_greek_accent_p:n { `#6 } } - { \__text_change_case_if_greek_diacritic_p:n { `#6 } } - { - \__text_change_case_upper_el_ypogegrammeni:Nnnnnw - #1 {#2} {#3} {#4#6} {#5} - } - { \__text_change_case_upper_el_aux:NnnN #1 {#2} {#3} #4#5 #6 } - } + \__text_change_case_upper_el_ypogegrammeni:nnnnnw + {#1} {#2} {#3} {#4#6} {#5} } + { \__text_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 #6 } } - \cs_new:Npn \__text_change_case_upper_el_aux:NnnN #1#2#3#4 + } +\cs_new:Npn \__text_change_case_upper_el_aux:nnnN #1#2#3#4 + { + \__text_codepoint_process:nN + { \__text_change_case_upper_el_aux:nnnn {#1} {#2} {#3} } #4 + } +\cs_new:Npn \__text_change_case_upper_el_aux:nnnn #1#2#3#4 + { + \__text_codepoint_compare:nNnTF {#4} = { "0308 } + { \__text_change_case_upper_el_dialytika:nnn {#2} {#3} {#1} } { - \int_compare:nNnTF { `#4 } = { "0308 } - { \__text_change_case_upper_el_dialytika:nnN {#2} {#3} #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 { `#4 } - { \__text_change_case_upper_el_hiatus:nnNw {#2} {#3} #1 } + \__text_change_case_if_greek_diacritic:nTF {#4} { - \__text_change_case_if_greek_diacritic:nTF { `#4 } - { - \__text_change_case_store:e { \char_uppercase:N #1 } - \__text_change_case_loop:nnw {#2} {#3} - } + \__text_change_case_store:e + { \__text_change_case_codepoint:nn { upper } {#1} } + \__text_change_case_loop:nnw {#2} {#3} + } + { + \__text_codepoint_compare:nNnTF {#4} = { "0345 } + { \__text_change_case_store:e { [XXX] } } { - \int_compare:nNnTF { `#4 } = { "0345 } - { \__text_change_case_store:e { [XXX] } } - { \__text_change_case_store:e { \char_uppercase:N #1 } } - \__text_change_case_loop:nnw {#2} {#3} #4 + \__text_change_case_store:e + { \__text_change_case_codepoint:nn { upper } {#1} } } + \__text_change_case_loop:nnw {#2} {#3} #4 } } } - \cs_new:Npn \__text_change_case_upper_el_dialytika:nnN #1#2#3 + } +\cs_new:Npn \__text_change_case_upper_el_dialytika:nnn #1#2#3 + { + \__text_change_case_if_takes_dialytika:nTF {#3} + { \__text_change_case_upper_el_dialytika:n {#3} } { - \__text_change_case_if_takes_dialytika:nTF { `#3 } - { \__text_change_case_upper_el_dialytika:N #3 } - { \__text_change_case_store:e { \char_uppercase:N #3 } } - \__text_change_case_upper_el_gobble:nnw {#1} {#2} + \__text_change_case_store:e + { \__text_change_case_codepoint:nn { upper } {#3} } } - \cs_new:Npn \__text_change_case_upper_el_dialytika:N #1 + \__text_change_case_upper_el_gobble:nnw {#1} {#2} + } +\cs_new:Npn \__text_change_case_upper_el_dialytika:n #1 + { + \__text_change_case_store:e { - \__text_change_case_store:e + \bool_lazy_or:nnTF + { \__text_codepoint_compare_p:nNn {#1} = { "0399 } } + { \__text_codepoint_compare_p:nNn {#1} = { "03B9 } } { - \bool_lazy_or:nnTF - { \int_compare_p:nNn { `#1 } = { "0399 } } - { \int_compare_p:nNn { `#1 } = { "03B9 } } - { \char_generate:nn { "03AA } { \__text_char_catcode:N #1 } } - { \char_generate:nn { "03AB } { \__text_char_catcode:N #1 } } + \codepoint_generate:nn { "03AA } + { \__text_change_case_catcode:nn {#1} { "03AA } } } - } - \cs_new:Npn \__text_change_case_upper_el_hiatus:nnNw - #1#2#3#4 \q__text_recursion_stop - { - \__text_change_case_store:e { \char_uppercase:N #3 } - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_upper_el_hiatus:nnN } - { \__text_change_case_loop:nnw } - {#1} {#2} #4 \q__text_recursion_stop - } - \cs_new:Npn \__text_change_case_upper_el_hiatus:nnN #1#2#3 - { - \token_if_cs:NTF #3 - { \__text_change_case_loop:nnw {#1} {#2} #3 } { - \__text_change_case_if_takes_dialytika:nTF { `#3 } - { - \__text_change_case_upper_el_dialytika:N #3 - \__text_change_case_upper_el_gobble:nnw {#1} {#2} - } - { \__text_change_case_loop:nnw {#1} {#2} #3 } + \codepoint_generate:nn { "03AB } + { \__text_change_case_catcode:nn {#1} { "03AB } } } } - \cs_new:Npn \__text_change_case_upper_el_gobble:nnw - #1#2#3 \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 - } - \cs_new:Npn \__text_change_case_upper_el_gobble:nnN #1#2#3 + } +\cs_new:Npn \__text_change_case_upper_el_hiatus:nnnw + #1#2#3#4 \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_upper_el_hiatus:nnN } + { \__text_change_case_loop:nnw } + {#1} {#2} #4 \q__text_recursion_stop + } +\cs_new:Npn \__text_change_case_upper_el_hiatus:nnN #1#2#3 + { + \token_if_cs:NTF #3 + { \__text_change_case_loop:nnw {#1} {#2} #3 } { - \bool_lazy_or:nnTF - { \token_if_cs_p:N #3 } - { - ! \bool_lazy_or_p:nn - { \__text_change_case_if_greek_accent_p:n { `#3 } } - { \__text_change_case_if_greek_diacritic_p:n { `#3 } } - } - { \__text_change_case_loop:nnw {#1} {#2} #3 } - { \__text_change_case_upper_el_gobble:nnw {#1} {#2} } + \__text_codepoint_process:nN + { \__text_change_case_upper_el_hiatus:nnn {#1} {#2} } #3 } } +\cs_new:Npn \__text_change_case_upper_el_hiatus:nnn #1#2#3 { - \cs_new:Npn \__text_change_case_upper_el:nnnN #1#2#3#4 + \__text_change_case_if_takes_dialytika:nTF {#3} { - \int_compare:nNnTF { `#4 } > { "80 } - { - \int_compare:nNnTF { `#4 } < { "E0 } - { \__text_change_case_upper_el:nnnNN } - { - \int_compare:nNnTF { `#4 } < { "F0 } - { \__text_change_case_upper_el:nnnNNN } - { \__text_change_case_char:nnnN } - } - } - { \__text_change_case_char:nnnN } - {#1} {#2} {#3} #4 + \__text_change_case_upper_el_dialytika:n {#3} + \__text_change_case_upper_el_gobble:nnw {#1} {#2} } - \cs_new:Npn \__text_change_case_upper_el:nnnNN #1#2#3#4#5 - { \__text_change_case_upper_el:nnnn {#1} {#2} {#3} {#4#5} } - \cs_new:Npn \__text_change_case_upper_el:nnnNNN #1#2#3#4#5#6 - { \__text_change_case_upper_el:nnnn {#1} {#2} {#3} {#4#5#6} } - \cs_new:Npn \__text_change_case_upper_el:nnnn #1#2#3#4 + { \__text_change_case_loop:nnw {#1} {#2} #3 } + } +\cs_new:Npn \__text_change_case_upper_el_gobble:nnw + #1#2#3 \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 + } +\cs_new:Npn \__text_change_case_upper_el_gobble:nnN #1#2#3 + { + \token_if_cs:NTF #3 + { \__text_change_case_loop:nnw {#1} {#2} } { - \cs_if_exist:cTF { c__text_uppercase_el_ \tl_to_str:n {#4} _tl } - { - \__text_change_case_store:v - { c__text_uppercase_el_ \tl_to_str:n {#4} _tl } - \__text_change_case_loop:nnw {#1} {#3} - } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + \__text_codepoint_process:nN + { \__text_change_case_upper_el_gobble:nnn {#1} {#2} } } + #3 + } +\cs_new:Npn \__text_change_case_upper_el_gobble:nnn #1#2#3 + { + \bool_lazy_or:nnTF + { \__text_change_case_if_greek_accent_p:n {#3} } + { \__text_change_case_if_greek_diacritic_p:n {#3} } + { \__text_change_case_upper_el_gobble:nnw {#1} {#2} } + { \__text_change_case_loop:nnw {#1} {#2} #3 } } \prg_new_conditional:Npnn \__text_change_case_if_greek:n #1 { TF } { + \exp_args:Nf \__text_change_case_if_greek:n + { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } + } +\cs_new:Npn \__text_change_case_if_greek:n #1 + { \if_int_compare:w #1 < "0370 \exp_stop_f: \prg_return_false: \else: @@ -33526,6 +33712,11 @@ Type H <return> for immediate help}\def~{\errmessage{% } \prg_new_conditional:Npnn \__text_change_case_if_greek_accent:n #1 { TF , p } { + \exp_args:Nf \__text_change_case_if_greek_accent:n + { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } + } +\cs_new:Npn \__text_change_case_if_greek_accent:n #1 + { \if_int_compare:w #1 = "0300 \exp_stop_f: \prg_return_true: \else: @@ -33555,6 +33746,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \prg_new_conditional:Npnn \__text_change_case_if_greek_diacritic:n #1 { TF , p } { + \exp_args:Nf \__text_change_case_if_greek_diacritic:n + { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } + } +\cs_new:Npn \__text_change_case_if_greek_diacritic:n #1 + { \if_int_compare:w #1 = "0304 \exp_stop_f: \prg_return_true: \else: @@ -33579,6 +33775,11 @@ Type H <return> for immediate help}\def~{\errmessage{% } \prg_new_conditional:Npnn \__text_change_case_if_takes_dialytika:n #1 { TF } { + \exp_args:Nf \__text_change_case_if_takes_dialytika:n + { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } + } +\cs_new:Npn \__text_change_case_if_takes_dialytika:n #1 + { \if_int_compare:w #1 = "0399 \exp_stop_f: \prg_return_true: \else: @@ -33599,6 +33800,11 @@ Type H <return> for immediate help}\def~{\errmessage{% } \prg_new_conditional:Npnn \__text_change_case_if_takes_ypogegrammeni:n #1 { TF } { + \exp_args:Nf \__text_change_case_if_takes_ypogegrammeni:n + { \int_eval:n { \__text_codepoint_from_chars:Nw #1 } } + } +\cs_new:Npn \__text_change_case_if_takes_ypogegrammeni:n #1 + { \if_int_compare:w #1 = "03B1 \exp_stop_f: \prg_return_true: \else: @@ -33613,262 +33819,292 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: } -\bool_lazy_or:nnT - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\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:Nnnw - #1#2#3#4 \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 + } +\cs_new:Npn \__text_change_case_boundary_upper_el:nnN #1#2#3 + { + \token_if_cs:NTF #3 + { \__text_change_case_loop:nnw {#1} {#2} } { - \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 + \__text_codepoint_process:nN + { \__text_change_case_boundary_upper_el:nnn {#1} {#2} } } - \cs_new:Npn \__text_change_case_boundary_upper_el:nnN #1#2#3 + #3 + } +\cs_new:Npn \__text_change_case_boundary_upper_el:nnn #1#2#3 + { + \bool_lazy_or:nnTF + { \__text_codepoint_compare_p:nNn {#3} = { "03AE } } + { \__text_codepoint_compare_p:nNn {#3} = { "1F22 } } + { \__text_change_case_boundary_upper_el:nnnw {#1} {#2} {#3} } + { \__text_change_case_loop:nnw {#1} {#2} #3 } + } +\cs_new:Npn \__text_change_case_boundary_upper_el:nnnw + #1#2#3#4 \q__text_recursion_stop + { + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_boundary_upper_el:nnnN {#3} } { - \bool_lazy_or:nnTF - { \token_if_cs_p:N #3 } + \__text_change_case_store:e { - ! \bool_lazy_or_p:nn - { \int_compare_p:nNn { `#3 } = { "03AE } } - { \int_compare_p:nNn { `#3 } = { "1F22 } } + \codepoint_generate:nn { "0389 } + { \__text_change_case_catcode:nn {#3} { "0389 } } } - { \__text_change_case_loop:nnw } - { \__text_change_case_boundary_upper_el:nnNw } - {#1} {#2} #3 + \__text_change_case_loop:nnw } - \cs_new:Npn \__text_change_case_boundary_upper_el:nnNw - #1#2#3#4 \q__text_recursion_stop - { - \tl_if_head_is_N_type:nTF {#4} - { \__text_change_case_boundary_upper_el:NnnN #3 } - { - \__text_change_case_store:e - { \char_generate:nn { "0389 } { \__text_char_catcode:N #3 } } - \__text_change_case_loop:nnw - } - {#1} {#2} #4 \q__text_recursion_stop + {#1} {#2} #4 \q__text_recursion_stop + } +\cs_new:Npn \__text_change_case_boundary_upper_el:nnnN #1#2#3#4 + { + \MARJ + \bool_lazy_or:nnTF + { \token_if_letter_p:N #4 } + { + \bool_lazy_and_p:nn + { \token_if_active_p:N #4 } + { ! \int_compare_p:nNn {`#4} < { "80 } } } - \cs_new:Npn \__text_change_case_boundary_upper_el:NnnN #1#2#3#4 + { \__text_change_case_loop:nnw {#2} {#3} #1#4 } { - \token_if_letter:NTF #4 - { \__text_change_case_loop:nnw {#2} {#3} #1#4 } + \__text_change_case_store:e { - \__text_change_case_store:e - { \char_generate:nn { "0389 } { \__text_char_catcode:N #1 } } - \__text_change_case_loop:nnw {#2} {#3} #4 + \codepoint_generate:nn { "0389 } + { \__text_change_case_catcode:nn {#1} { "0389 } } } + \__text_change_case_loop:nnw {#2} {#3} #4 } } -\bool_lazy_or:nnT - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { - \cs_new:Npn \__text_change_case_title_el:nnnN #1#2#3#4 - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } - } -\bool_lazy_or:nnT - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\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:cpn { __text_change_case_upper_hy:nnnN } #1#2#3#4 + \__text_codepoint_compare:nNnTF {#4} = { "0587 } { - \int_compare:nNnTF { `#4 } = { "0587 } + \__text_change_case_store:e { - \__text_change_case_store:e - { - \char_generate:nn { "0535 } { \__text_char_catcode:N #4 } - \char_generate:nn { "054E } { \__text_char_catcode:N #4 } - } - \use:c { __text_change_case_char_next_ #2 :nn } - {#2} {#3} + \codepoint_generate:nn { "0535 } + { \__text_change_case_catcode:nn {#4} { "0535 } } + \codepoint_generate:nn { "054E } + { \__text_change_case_catcode:nn {#4} { "054E } } } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + \use:c { __text_change_case_next_ #2 :nn } + {#2} {#3} } - \cs_new:cpn { __text_change_case_title_hy:nnnN } #1#2#3#4 + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } + } +\cs_new:Npn \__text_change_case_title_hy:nnnn #1#2#3#4 + { + \__text_codepoint_compare:nNnTF {#4} = { "0587 } { - \int_compare:nNnTF { `#4 } = { "0587 } + \__text_change_case_store:e { - \__text_change_case_store:e - { - \char_generate:nn { "0535 } { \__text_char_catcode:N #4 } - \char_generate:nn { "057E } { \__text_char_catcode:N #4 } - } - \use:c { __text_change_case_char_next_ #2 :nn } - {#2} {#3} + \codepoint_generate:nn { "0535 } + { \__text_change_case_catcode:nn {#4} { "0535 } } + \codepoint_generate:nn { "057E } + { \__text_change_case_catcode:nn {#4} { "057E } } } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + \use:c { __text_change_case_next_ #2 :nn } + {#2} {#3} } - \cs_new:cpn { __text_change_case_upper_hy-x-yiwn:nnnN } #1#2#3#4 - { \__text_change_case_char: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 } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } -\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: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 { - \int_compare:nNnTF { `#4 } = { `V } + \__text_codepoint_compare:nNnTF {#4} = { "0056 } { \__text_change_case_store:e - { - \char_generate:nn { `u } { \__text_char_catcode:N #4 } - } - \use:c { __text_change_case_char_next_ #2 :nn } + { \char_generate:nn { "0075 } { \__text_char_catcode:N #4 } } + \use:c { __text_change_case_next_ #2 :nn } {#2} {#3} } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } -\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:nnnn } #1#2#3#4 { - \int_compare:nNnTF { `#4 } = { `u } + \__text_codepoint_compare:nNnTF {#4} = { "0075 } { \__text_change_case_store:e - { - \char_generate:nn { `V } { \__text_char_catcode:N #4 } - } - \use:c { __text_change_case_char_next_ #2 :nn } + { \char_generate:nn { "0056 } { \__text_char_catcode:N #4 } } + \use:c { __text_change_case_next_ #2 :nn } {#2} {#3} } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } -\bool_lazy_or:nnT - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \__text_change_case_lower_lt:nnnn #1#2#3#4 { - \cs_new:Npn \__text_change_case_lower_lt:nnnN #1#2#3#4 - { - \exp_args:Ne \__text_change_case_lower_lt_auxi:nnnN + \exp_args:Ne \__text_change_case_lower_lt_auxi:nnnn + { + \int_case:nn { \__text_codepoint_from_chars:Nw #4 } { - \int_case:nn { `#4 } - { - { "00CC } { "0300 } - { "00CD } { "0301 } - { "0128 } { "0303 } - } + { "00CC } { "0300 } + { "00CD } { "0301 } + { "0128 } { "0303 } } - {#2} {#3} #4 } - \cs_new:Npn \__text_change_case_lower_lt_auxi:nnnN #1#2#3#4 + {#2} {#3} {#4} + } +\cs_new:Npn \__text_change_case_lower_lt_auxi:nnnn #1#2#3#4 + { + \tl_if_blank:nTF {#1} { - \tl_if_blank:nTF {#1} + \exp_args:Ne \__text_change_case_lower_lt_auxii:nnnn { - \exp_args:Ne \__text_change_case_lower_lt_auxii:nnnN + \int_case:nn { \__text_codepoint_from_chars:Nw #4 } { - \int_case:nn { `#4 } - { - { "0049 } { "0069 } - { "004A } { "006A } - { "012E } { "012F } - } + { "0049 } { "0069 } + { "004A } { "006A } + { "012E } { "012F } } - {#2} {#3} #4 } + {#2} {#3} {#4} + } + { + \__text_change_case_store:e { - \__text_change_case_store:e - { - \char_generate:nn { "0069 } { \__text_char_catcode:N #4 } - \char_generate:nn { "0307 } { \__text_char_catcode:N #4 } - \char_generate:nn {#1} { \__text_char_catcode:N #4 } - } - \__text_change_case_loop:nnw {#2} {#3} + \codepoint_generate:nn { "0069 } + { \__text_change_case_catcode:nn {#4} { "0069 } } + \codepoint_generate:nn { "0307 } + { \__text_change_case_catcode:nn {#4} { "0307 } } + \codepoint_generate:nn {#1} + { \__text_change_case_catcode:nn {#4} {#1} } } + \__text_change_case_loop:nnw {#2} {#3} } - \cs_new:Npn \__text_change_case_lower_lt_auxii:nnnN #1#2#3#4 + } +\cs_new:Npn \__text_change_case_lower_lt_auxii:nnnn #1#2#3#4 + { + \tl_if_blank:nTF {#1} + { \__text_change_case_codepoint:nnnn {#2} {#2} {#3} {#4} } { - \tl_if_blank:nTF {#1} - { \__text_change_case_lower_sigma:nnnN {#2} {#2} {#3} #4 } + \__text_change_case_store:e { - \__text_change_case_store:e - { \char_generate:nn {#1} { \__text_char_catcode:N #4 } } - \__text_change_case_lower_lt:nnw {#2} {#3} + \codepoint_generate:nn {#1} + { \__text_change_case_catcode:nn {#4} {#1} } } + \__text_change_case_lower_lt:nnw {#2} {#3} } - \cs_new:Npn \__text_change_case_lower_lt:nnw #1#2#3 \q__text_recursion_stop + } +\cs_new:Npn \__text_change_case_lower_lt:nnw #1#2#3 \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 + } +\cs_new:Npn \__text_change_case_lower_lt:nnN #1#2#3 + { + \__text_codepoint_process:nN + { \__text_change_case_lower_lt:nnn {#1} {#2} } #3 + } +\cs_new:Npn \__text_change_case_lower_lt:nnn #1#2#3 + { + \bool_lazy_and:nnT { - \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 + \bool_lazy_or_p:nn + { ! \tl_if_single_p:n {#3} } + { ! \token_if_cs_p:N #3 } } - \cs_new:Npn \__text_change_case_lower_lt:nnN #1#2#3 { - \bool_lazy_and:nnT - { ! \token_if_cs_p:N #3 } + \bool_lazy_any_p:n { - \bool_lazy_any_p:n - { - { \int_compare_p:nNn { `#3 } = { "0300 } } - { \int_compare_p:nNn { `#3 } = { "0301 } } - { \int_compare_p:nNn { `#3 } = { "0303 } } - } + { \__text_codepoint_compare_p:nNn {#3} = { "0300 } } + { \__text_codepoint_compare_p:nNn {#3} = { "0301 } } + { \__text_codepoint_compare_p:nNn {#3} = { "0303 } } } + } + { + \__text_change_case_store:e { - \__text_change_case_store:e - { \char_generate:nn { "0307 } { \__text_char_catcode:N #3 } } + \codepoint_generate:nn { "0307 } + { \__text_change_case_catcode:nn {#3} { "0307 } } } - \__text_change_case_loop:nnw {#1} {#2} #3 } + \__text_change_case_loop:nnw {#1} {#2} #3 } -\bool_lazy_or:nnT - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { - \cs_new:Npn \__text_change_case_upper_lt:nnnN #1#2#3#4 - { - \exp_args:Ne \__text_change_case_upper_lt_aux:nnnN +\cs_new:Npn \__text_change_case_upper_lt:nnnn #1#2#3#4 + { + \exp_args:Ne \__text_change_case_upper_lt_aux:nnnn + { + \int_case:nn { \__text_codepoint_from_chars:Nw #4 } { - \int_case:nn { `#4 } - { - { "0069 } { "0049 } - { "006A } { "004A } - { "012F } { "012E } - } + { "0069 } { "0049 } + { "006A } { "004A } + { "012F } { "012E } } - {#2} {#3} #4 } - \cs_new:Npn \__text_change_case_upper_lt_aux:nnnN #1#2#3#4 - { - \tl_if_blank:nTF {#1} - { \__text_change_case_char:nnnN { upper } {#2} {#3} #4 } - { - \__text_change_case_store:e - { \char_generate:nn {#1} { \__text_char_catcode:N #4 } } - \__text_change_case_upper_lt:nnw {#2} {#3} - } - } - \cs_new:Npn \__text_change_case_upper_lt:nnw #1#2#3 \q__text_recursion_stop + {#2} {#3} {#4} + } +\cs_new:Npn \__text_change_case_upper_lt_aux:nnnn #1#2#3#4 + { + \tl_if_blank:nTF {#1} + { \__text_change_case_codepoint:nnnn { upper } {#2} {#3} {#4} } { - \tl_if_head_is_N_type:nTF {#3} - { \__text_change_case_upper_lt:nnN } - { \use:c { __text_change_case_char_next_ #1 :nn } } - {#1} {#2} #3 \q__text_recursion_stop + \__text_change_case_store:e + { + \codepoint_generate:nn {#1} + { \__text_change_case_catcode:nn {#4} {#1} } + } + \__text_change_case_upper_lt:nnw {#2} {#3} } - \cs_new:Npn \__text_change_case_upper_lt:nnN #1#2#3 + } +\cs_new:Npn \__text_change_case_upper_lt:nnw #1#2#3 \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 + } +\cs_new:Npn \__text_change_case_upper_lt:nnN #1#2#3 + { + \__text_codepoint_process:nN + { \__text_change_case_upper_lt:nnn {#1} {#2} } #3 + } +\cs_new:Npn \__text_change_case_upper_lt:nnn #1#2#3 + { + \bool_lazy_and:nnTF { - \bool_lazy_and:nnTF + \bool_lazy_or_p:nn + { ! \tl_if_single_p:n {#3} } { ! \token_if_cs_p:N #3 } - { \int_compare_p:nNn { `#3 } = { "0307 } } - { \use:c { __text_change_case_char_next_ #1 :nn } {#1} {#2} } - { \use:c { __text_change_case_char_next_ #1 :nn } {#1} {#2} #3 } } + { \__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 } } -\cs_new:Npn \__text_change_case_title_nl:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_title_nl:nnnn #1#2#3#4 + { + \tl_if_single:nTF {#4} + { \__text_change_case_title_nl_aux:nnnn } + { \__text_change_case_codepoint:nnnn } + {#1} {#2} {#3} {#4} + } +\cs_new:Npn \__text_change_case_title_nl_aux:nnnn #1#2#3#4 { \bool_lazy_or:nnTF - { \int_compare_p:nNn { `#4 } = { "0049 } } - { \int_compare_p:nNn { `#4 } = { "0069 } } + { \int_compare_p:nNn {`#4} = { "0049 } } + { \int_compare_p:nNn {`#4} = { "0069 } } { \__text_change_case_store:e { \char_generate:nn { "0049 } { \__text_char_catcode:N #4 } } \__text_change_case_title_nl:nnw {#2} {#3} } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } \cs_new:Npn \__text_change_case_title_nl:nnw #1#2#3 \q__text_recursion_stop { \tl_if_head_is_N_type:nTF {#3} { \__text_change_case_title_nl:nnN } - { \use:c { __text_change_case_char_next_ #1 :nn } } + { \use:c { __text_change_case_next_ #1 :nn } } {#1} {#2} #3 \q__text_recursion_stop } \cs_new:Npn \__text_change_case_title_nl:nnN #1#2#3 @@ -33877,1067 +34113,95 @@ Type H <return> for immediate help}\def~{\errmessage{% { ! \token_if_cs_p:N #3 } { \bool_lazy_or_p:nn - { \int_compare_p:nNn { `#3 } = { "004A } } - { \int_compare_p:nNn { `#3 } = { "006A } } + { \int_compare_p:nNn {`#3} = { "004A } } + { \int_compare_p:nNn {`#3} = { "006A } } } { \__text_change_case_store:e { \char_generate:nn { "004A } { \__text_char_catcode:N #3 } } - \use:c { __text_change_case_char_next_ #1 :nn } {#1} {#2} + \use:c { __text_change_case_next_ #1 :nn } {#1} {#2} } - { \use:c { __text_change_case_char_next_ #1 :nn } {#1} {#2} #3 } + { \use:c { __text_change_case_next_ #1 :nn } {#1} {#2} #3 } } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \__text_change_case_lower_tr:nnnn #1#2#3#4 { - \cs_new:Npn \__text_change_case_lower_tr:nnnN #1#2#3#4 + \__text_codepoint_compare:nNnTF {#4} = { "0049 } + { \__text_change_case_lower_tr:nnNw {#1} {#3} #4 } { - \int_compare:nNnTF { `#4 } = { "0049 } - { \__text_change_case_lower_tr:nnNw {#1} {#3} #4 } + \__text_codepoint_compare:nNnTF {#4} = { "0130 } { - \int_compare:nNnTF { `#4 } = { "0130 } + \__text_change_case_store:e { - \__text_change_case_store:e - { \char_generate:nn { "0069 } { \__text_char_catcode:N #4 } } - \__text_change_case_loop:nnw {#1} {#3} + \codepoint_generate:nn { "0069 } + { \__text_change_case_catcode:nn {#4} { "0069 } } } - { \__text_change_case_lower_sigma:nnnN {#1} {#2} {#3} #4 } + \__text_change_case_loop:nnw {#1} {#3} } + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } - \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:nnNw #1#2#3#4 \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 {#4} - { \__text_change_case_lower_tr:NnnN #3 } + \__text_change_case_store:e { - \__text_change_case_store:e - { \char_generate:nn { "0131 } { \__text_char_catcode:N #3 } } - \__text_change_case_loop:nnw + \codepoint_generate:nn { "0131 } + { \__text_change_case_catcode:nn {#3} { "0131 } } } - {#1} {#2} #4 \q__text_recursion_stop + \__text_change_case_loop:nnw {#1} {#2} } - \cs_new:Npn \__text_change_case_lower_tr:NnnN #1#2#3#4 + #4 \q__text_recursion_stop + } +\cs_new:Npn \__text_change_case_lower_tr:NnnN #1#2#3#4 + { + \__text_codepoint_process:nN + { \__text_change_case_lower_tr:Nnnn #1 {#2} {#3} } #4 + } +\cs_new:Npn \__text_change_case_lower_tr:Nnnn #1#2#3#4 + { + \bool_lazy_or:nnTF { - \bool_lazy_or:nnTF + \bool_lazy_and_p:nn + { \tl_if_single_p:n {#4} } { \token_if_cs_p:N #4 } - { ! \int_compare_p:nNn { `#4 } = { "0307 } } - { - \__text_change_case_store:e - { \char_generate:nn { "0131 } { \__text_char_catcode:N #1 } } - \__text_change_case_loop:nnw {#2} {#3} #4 - } - { - \__text_change_case_store:e - { \char_generate:nn { "0069 } { \__text_char_catcode:N #1 } } - \__text_change_case_loop:nnw {#2} {#3} - } } - } - { - \cs_new:Npn \__text_change_case_lower_tr:nnnN #1#2#3#4 + { ! \__text_codepoint_compare_p:nNn {#4} = { "0307 } } { - \int_compare:nNnTF { `#4 } = { "0049 } - { - \__text_change_case_store:V \c__text_dotless_i_tl - \__text_change_case_loop:nnw {#1} {#3} - } + \__text_change_case_store:e { - \int_compare:nNnTF { `#4 } = { "00C4 } - { \__text_change_case_lower_tr:nnnNN {#1} {#2} {#3} #4 } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + \codepoint_generate:nn { "0131 } + { \__text_change_case_catcode:nn {#1} { "0131 } } } + \__text_change_case_loop:nnw {#2} {#3} #4 } - \cs_new:Npn \__text_change_case_lower_tr:nnnNN #1#2#3#4#5 { - \int_compare:nNnTF { `#5 } = { "00B0 } + \__text_change_case_store:e { - \__text_change_case_store:e - { - \char_generate:nn { "0069 } - { \char_value_catcode:n { "0069 } } - } - \__text_change_case_loop:nnw {#1} {#3} + \codepoint_generate:nn { "0069 } + { \__text_change_case_catcode:nn {#1} { "0069 } } } - { \__text_change_case_char:nnnN {#1} {#2} {#3} #4#5 } + \__text_change_case_loop:nnw {#2} {#3} } } -\cs_new:Npx \__text_change_case_upper_tr:nnnN #1#2#3#4 +\cs_new:Npn \__text_change_case_upper_tr:nnnn #1#2#3#4 { - \exp_not:N \int_compare:nNnTF { `#4 } = { "0069 } + \__text_codepoint_compare:nNnTF {#4} = { "0069 } { - \bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { - \exp_not:N \__text_change_case_store:e - { - \exp_not:N \char_generate:nn { "0130 } - { \exp_not:N \__text_char_catcode:N #4 } - } - } + \__text_change_case_store:e { - \exp_not:N \__text_change_case_store:V - \exp_not:N \c__text_dotted_I_tl + \codepoint_generate:nn { "0130 } + { \__text_change_case_catcode:nn {#4} { "0130 } } } - \exp_not:N \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} + \use:c { __text_change_case_next_ #2 :nn } {#2} {#3} } - { \exp_not:N \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } - } -\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 -\group_begin: - \bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { - \cs_set_protected:Npn \__text_tmp:w #1#2 - { - \group_begin: - \cs_set_protected:Npn \__text_tmp:w ##1##2##3##4 - { - \tl_const:Nx #1 - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##1} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##2} { 13 } - \tl_if_blank:nF {##3} - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##3} { 13 } - } - } - } - \use:x - { \__text_tmp:w \char_to_utfviii_bytes:n { "#2 } } - \group_end: - } - \__text_tmp:w \c__text_dotless_i_tl { 0131 } - \__text_tmp:w \c__text_dotted_I_tl { 0130 } - \__text_tmp:w \c__text_i_ogonek_tl { 012F } - \__text_tmp:w \c__text_I_ogonek_tl { 012E } - \__text_tmp:w \c__text_final_sigma_tl { 03C2 } - \__text_tmp:w \c__text_sigma_tl { 03C3 } - \__text_tmp:w \c__text_grosses_Eszett_tl { 1E9E } - } -\group_end: -\group_begin: - \bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { - \cs_set_protected:Npn \__text_loop:nn #1#2 - { - \quark_if_recursion_tail_stop:n {#1} - \use:x - { - \__text_tmp:w - \char_to_utfviii_bytes:n { "#1 } - \char_to_utfviii_bytes:n { "#2 } - } - \__text_loop:nn - } - \cs_set_protected:Npn \__text_tmp:nnnn #1#2#3#4#5 - { - \tl_const:cx - { - c__kernel_ #1 case_ - \char_generate:nn {#2} { 12 } - \char_generate:nn {#3} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#4} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#5} { 13 } - } - } - \cs_set_protected:Npn \__text_tmp:w #1#2#3#4#5#6#7#8 - { - \tl_const:cx - { - c__kernel_lowercase_ - \char_generate:nn {#1} { 12 } - \char_generate:nn {#2} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#6} { 13 } - } - \__text_tmp:nnnn { upper } {#5} {#6} {#1} {#2} - \__text_tmp:nnnn { title } {#5} {#6} {#1} {#2} - } - \__text_loop:nn - { 00C0 } { 00E0 } - { 00C1 } { 00E1 } - { 00C2 } { 00E2 } - { 00C3 } { 00E3 } - { 00C4 } { 00E4 } - { 00C5 } { 00E5 } - { 00C6 } { 00E6 } - { 00C7 } { 00E7 } - { 00C8 } { 00E8 } - { 00C9 } { 00E9 } - { 00CA } { 00EA } - { 00CB } { 00EB } - { 00CC } { 00EC } - { 00CD } { 00ED } - { 00CE } { 00EE } - { 00CF } { 00EF } - { 00D0 } { 00F0 } - { 00D1 } { 00F1 } - { 00D2 } { 00F2 } - { 00D3 } { 00F3 } - { 00D4 } { 00F4 } - { 00D5 } { 00F5 } - { 00D6 } { 00F6 } - { 00D8 } { 00F8 } - { 00D9 } { 00F9 } - { 00DA } { 00FA } - { 00DB } { 00FB } - { 00DC } { 00FC } - { 00DD } { 00FD } - { 00DE } { 00FE } - { 0100 } { 0101 } - { 0102 } { 0103 } - { 0104 } { 0105 } - { 0106 } { 0107 } - { 0108 } { 0109 } - { 010A } { 010B } - { 010C } { 010D } - { 010E } { 010F } - { 0110 } { 0111 } - { 0112 } { 0113 } - { 0114 } { 0115 } - { 0116 } { 0117 } - { 0118 } { 0119 } - { 011A } { 011B } - { 011C } { 011D } - { 011E } { 011F } - { 0120 } { 0121 } - { 0122 } { 0123 } - { 0124 } { 0125 } - { 0128 } { 0129 } - { 012A } { 012B } - { 012C } { 012D } - { 012E } { 012F } - { 0132 } { 0133 } - { 0134 } { 0135 } - { 0136 } { 0137 } - { 0139 } { 013A } - { 013B } { 013C } - { 013E } { 013F } - { 0141 } { 0142 } - { 0143 } { 0144 } - { 0145 } { 0146 } - { 0147 } { 0148 } - { 014A } { 014B } - { 014C } { 014D } - { 014E } { 014F } - { 0150 } { 0151 } - { 0152 } { 0153 } - { 0154 } { 0155 } - { 0156 } { 0157 } - { 0158 } { 0159 } - { 015A } { 015B } - { 015C } { 015D } - { 015E } { 015F } - { 0160 } { 0161 } - { 0162 } { 0163 } - { 0164 } { 0165 } - { 0168 } { 0169 } - { 016A } { 016B } - { 016C } { 016D } - { 016E } { 016F } - { 0170 } { 0171 } - { 0172 } { 0173 } - { 0174 } { 0175 } - { 0176 } { 0177 } - { 0178 } { 00FF } - { 0179 } { 017A } - { 017B } { 017C } - { 017D } { 017E } - { 01A0 } { 01A1 } - { 01AF } { 01B0 } - { 01CD } { 01CE } - { 01CF } { 01D0 } - { 01D1 } { 01D2 } - { 01D3 } { 01D4 } - { 01E2 } { 01E3 } - { 01E6 } { 01E7 } - { 01E8 } { 01E9 } - { 01EA } { 01EB } - { 01F4 } { 01F5 } - { 0218 } { 0219 } - { 021A } { 021B } - { 0400 } { 0450 } - { 0401 } { 0451 } - { 0402 } { 0452 } - { 0403 } { 0453 } - { 0404 } { 0454 } - { 0405 } { 0455 } - { 0406 } { 0456 } - { 0407 } { 0457 } - { 0408 } { 0458 } - { 0409 } { 0459 } - { 040A } { 045A } - { 040B } { 045B } - { 040C } { 045C } - { 040D } { 045D } - { 040E } { 045E } - { 040F } { 045F } - { 0410 } { 0430 } - { 0411 } { 0431 } - { 0412 } { 0432 } - { 0413 } { 0433 } - { 0414 } { 0434 } - { 0415 } { 0435 } - { 0416 } { 0436 } - { 0417 } { 0437 } - { 0418 } { 0438 } - { 0419 } { 0439 } - { 041A } { 043A } - { 041B } { 043B } - { 041C } { 043C } - { 041D } { 043D } - { 041E } { 043E } - { 041F } { 043F } - { 0420 } { 0440 } - { 0421 } { 0441 } - { 0422 } { 0442 } - { 0423 } { 0443 } - { 0424 } { 0444 } - { 0425 } { 0445 } - { 0426 } { 0446 } - { 0427 } { 0447 } - { 0428 } { 0448 } - { 0429 } { 0449 } - { 042A } { 044A } - { 042B } { 044B } - { 042C } { 044C } - { 042D } { 044D } - { 042E } { 044E } - { 042F } { 044F } - { 0370 } { 0371 } - { 0372 } { 0373 } - { 0376 } { 0377 } - { 03FD } { 037B } - { 03FE } { 037C } - { 03FF } { 037D } - { 0386 } { 03AC } - { 0388 } { 03AD } - { 0389 } { 03AE } - { 038A } { 03AF } - { 0391 } { 03B1 } - { 0392 } { 03B2 } - { 0393 } { 03B3 } - { 0394 } { 03B4 } - { 0395 } { 03B5 } - { 0396 } { 03B6 } - { 0397 } { 03B7 } - { 0398 } { 03B8 } - { 0399 } { 03B9 } - { 039A } { 03BA } - { 039B } { 03BB } - { 039C } { 03BC } - { 039D } { 03BD } - { 039E } { 03BE } - { 039F } { 03BF } - { 03A0 } { 03C0 } - { 03A1 } { 03C1 } - { 03A3 } { 03C3 } - { 03A4 } { 03C4 } - { 03A5 } { 03C5 } - { 03A6 } { 03C6 } - { 03A7 } { 03C7 } - { 03A8 } { 03C8 } - { 03A9 } { 03C9 } - { 03AA } { 03CA } - { 03AB } { 03CB } - { 038C } { 03CC } - { 038E } { 03CD } - { 038F } { 03CE } - { 03CF } { 03D7 } - { 03D8 } { 03D9 } - { 03DA } { 03DB } - { 03DC } { 03DD } - { 03DE } { 03DF } - { 03E0 } { 03E1 } - { 03E2 } { 03E3 } - { 03E4 } { 03E5 } - { 03E6 } { 03E7 } - { 03E8 } { 03E9 } - { 03EA } { 03EB } - { 03EC } { 03ED } - { 03EE } { 03EF } - { 03F9 } { 03F2 } - { 037F } { 03F3 } - { 03F7 } { 03F8 } - { 03FA } { 03FB } - \q_recursion_tail ? - \q_recursion_stop - \cs_set_protected:Npn \__text_tmp:w #1#2#3 - { - \group_begin: - \cs_set_protected:Npn \__text_tmp:w ##1##2##3##4##5##6##7##8 - { - \tl_const:cx - { - c__kernel_ #3 case_ - \char_generate:nn {##1} { 12 } - \char_generate:nn {##2} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##6} { 13 } - } - } - \use:x - { - \__text_tmp:w - \char_to_utfviii_bytes:n { "#1 } - \char_to_utfviii_bytes:n { "#2 } - } - \group_end: - } - \__text_tmp:w { 0345 } { 0399 } { upper } - \__text_tmp:w { 03C2 } { 03A3 } { upper } - \__text_tmp:w { 03D0 } { 0392 } { upper } - \__text_tmp:w { 03D1 } { 0398 } { upper } - \__text_tmp:w { 03D5 } { 03A6 } { upper } - \__text_tmp:w { 03D6 } { 03A0 } { upper } - \__text_tmp:w { 03F0 } { 039A } { upper } - \__text_tmp:w { 03F1 } { 03A1 } { upper } - \__text_tmp:w { 03F4 } { 03B8 } { lower } - \__text_tmp:w { 03F5 } { 0395 } { upper } - \__text_tmp:w { 01C4 } { 01C5 } { title } - \__text_tmp:w { 01C4 } { 01C6 } { lower } - \__text_tmp:w { 01C5 } { 01C4 } { upper } - \__text_tmp:w { 01C5 } { 01C6 } { lower } - \__text_tmp:w { 01C6 } { 01C4 } { upper } - \__text_tmp:w { 01C6 } { 01C5 } { title } - \__text_tmp:w { 01C7 } { 01C8 } { title } - \__text_tmp:w { 01C7 } { 01C9 } { lower } - \__text_tmp:w { 01C8 } { 01C7 } { upper } - \__text_tmp:w { 01C8 } { 01C9 } { lower } - \__text_tmp:w { 01C9 } { 01C7 } { upper } - \__text_tmp:w { 01C9 } { 01C8 } { title } - \__text_tmp:w { 01CA } { 01CB } { title } - \__text_tmp:w { 01CA } { 01CC } { lower } - \__text_tmp:w { 01CB } { 01CA } { upper } - \__text_tmp:w { 01CB } { 01CC } { lower } - \__text_tmp:w { 01CC } { 01CA } { upper } - \__text_tmp:w { 01CC } { 01CB } { title } - \cs_set_protected:Npn \__text_tmp:w #1#2#3 - { - \group_begin: - \cs_set_protected:Npn \__text_tmp:w ##1##2##3##4 - { - \tl_const:cn - { - c__kernel_ #3 case_ - \char_generate:nn {##1} { 12 } - \char_generate:nn {##2} { 12 } - _tl - } - {#2} - } - \use:x - { \__text_tmp:w \char_to_utfviii_bytes:n { "#1 } } - \group_end: - } - \__text_tmp:w { 00DF } { SS } { upper } - \__text_tmp:w { 00DF } { Ss } { title } - \__text_tmp:w { 0131 } { I } { upper } - \cs_set_protected:Npn \__text_tmp:nnnnnn #1#2#3#4#5#6#7 - { - \tl_const:cx - { - c__kernel_ #1 case_ - \char_generate:nn {#2} { 12 } - \char_generate:nn {#3} { 12 } - \char_generate:nn {#4} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#6} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#7} { 13 } - } - } - \cs_set_protected:Npn \__text_tmp:w #1#2#3#4#5#6#7#8 - { - \tl_const:cx - { - c__kernel_lowercase_ - \char_generate:nn {#1} { 12 } - \char_generate:nn {#2} { 12 } - \char_generate:nn {#3} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#6} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#7} { 13 } - } - \__text_tmp:nnnnnn { upper } {#5} {#6} {#7} {#1} {#2} {#3} - \__text_tmp:nnnnnn { title } {#5} {#6} {#7} {#1} {#2} {#3} - } - \__text_loop:nn - { 1EA0 } { 1EA1 } - { 1EA2 } { 1EA3 } - { 1EA4 } { 1EA5 } - { 1EA6 } { 1EA7 } - { 1EA8 } { 1EA9 } - { 1EAA } { 1EAB } - { 1EAC } { 1EAD } - { 1EAE } { 1EAF } - { 1EB0 } { 1EB1 } - { 1EB2 } { 1EB3 } - { 1EB4 } { 1EB5 } - { 1EB6 } { 1EB7 } - { 1EB8 } { 1EB9 } - { 1EBA } { 1EBB } - { 1EBC } { 1EBD } - { 1EBE } { 1EBF } - { 1EC0 } { 1EC1 } - { 1EC2 } { 1EC3 } - { 1EC4 } { 1EC5 } - { 1EC6 } { 1EC7 } - { 1EC8 } { 1EC9 } - { 1ECA } { 1ECB } - { 1ECC } { 1ECD } - { 1ECE } { 1ECF } - { 1ED0 } { 1ED1 } - { 1ED2 } { 1ED3 } - { 1ED4 } { 1ED5 } - { 1ED6 } { 1ED7 } - { 1ED8 } { 1ED9 } - { 1EDA } { 1EDB } - { 1EDC } { 1EDD } - { 1EDE } { 1EDF } - { 1EE0 } { 1EE1 } - { 1EE2 } { 1EE3 } - { 1EE4 } { 1EE5 } - { 1EE6 } { 1EE7 } - { 1EE8 } { 1EE9 } - { 1EEA } { 1EEB } - { 1EEC } { 1EED } - { 1EEE } { 1EEF } - { 1EF0 } { 1EF1 } - { 1EF2 } { 1EF3 } - { 1EF4 } { 1EF5 } - { 1EF6 } { 1EF7 } - { 1EF8 } { 1EF9 } - \q_recursion_tail ? - \q_recursion_stop - \__text_loop:nn - { 1F08 } { 1F00 } - { 1F09 } { 1F01 } - { 1F0A } { 1F02 } - { 1F0B } { 1F03 } - { 1F0C } { 1F04 } - { 1F0D } { 1F05 } - { 1F0E } { 1F06 } - { 1F0F } { 1F07 } - { 1F18 } { 1F10 } - { 1F19 } { 1F11 } - { 1F1A } { 1F12 } - { 1F1B } { 1F13 } - { 1F1C } { 1F14 } - { 1F1D } { 1F15 } - { 1F28 } { 1F20 } - { 1F29 } { 1F21 } - { 1F2A } { 1F22 } - { 1F2B } { 1F23 } - { 1F2C } { 1F24 } - { 1F2D } { 1F25 } - { 1F2E } { 1F26 } - { 1F2F } { 1F27 } - { 1F38 } { 1F30 } - { 1F39 } { 1F31 } - { 1F3A } { 1F32 } - { 1F3B } { 1F33 } - { 1F3C } { 1F34 } - { 1F3D } { 1F35 } - { 1F3E } { 1F36 } - { 1F3F } { 1F37 } - { 1F48 } { 1F40 } - { 1F49 } { 1F41 } - { 1F4A } { 1F42 } - { 1F4B } { 1F43 } - { 1F4C } { 1F44 } - { 1F4D } { 1F45 } - { 1F59 } { 1F51 } - { 1F5B } { 1F53 } - { 1F5D } { 1F55 } - { 1F5F } { 1F57 } - { 1F68 } { 1F60 } - { 1F69 } { 1F61 } - { 1F6A } { 1F62 } - { 1F6B } { 1F63 } - { 1F6C } { 1F64 } - { 1F6D } { 1F65 } - { 1F6E } { 1F66 } - { 1F6F } { 1F67 } - { 1FBA } { 1F70 } - { 1FBB } { 1F71 } - { 1FC8 } { 1F72 } - { 1FC9 } { 1F73 } - { 1FCA } { 1F74 } - { 1FCB } { 1F75 } - { 1FDA } { 1F76 } - { 1FDB } { 1F77 } - { 1FF8 } { 1F78 } - { 1FF9 } { 1F79 } - { 1FEA } { 1F7A } - { 1FEB } { 1F7B } - { 1FFA } { 1F7C } - { 1FFB } { 1F7D } - { 1F88 } { 1F80 } - { 1F89 } { 1F81 } - { 1F8A } { 1F82 } - { 1F8B } { 1F83 } - { 1F8C } { 1F84 } - { 1F8D } { 1F85 } - { 1F8E } { 1F86 } - { 1F8F } { 1F87 } - { 1F98 } { 1F90 } - { 1F99 } { 1F91 } - { 1F9A } { 1F92 } - { 1F9B } { 1F93 } - { 1F9C } { 1F94 } - { 1F9D } { 1F95 } - { 1F9E } { 1F96 } - { 1F9F } { 1F97 } - { 1FA8 } { 1FA0 } - { 1FA9 } { 1FA1 } - { 1FAA } { 1FA2 } - { 1FAB } { 1FA3 } - { 1FAC } { 1FA4 } - { 1FAD } { 1FA5 } - { 1FAE } { 1FA6 } - { 1FAF } { 1FA7 } - { 1FB8 } { 1FB0 } - { 1FB9 } { 1FB1 } - { 1FBC } { 1FB3 } - { 1FCC } { 1FC3 } - { 1FD8 } { 1FD0 } - { 1FD9 } { 1FD1 } - { 1FE8 } { 1FE0 } - { 1FE9 } { 1FE1 } - { 1FEC } { 1FE5 } - { 1FFC } { 1FF3 } - \q_recursion_tail ? - \q_recursion_stop - \cs_set_protected:Npn \__text_tmp:w #1#2#3 - { - \group_begin: - \cs_set_protected:Npn \__text_tmp:w ##1##2##3##4##5##6##7##8 - { - \tl_const:cx - { - c__kernel_ #3 case_ - \char_generate:nn {##1} { 12 } - \char_generate:nn {##2} { 12 } - \char_generate:nn {##3} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {##6} { 13 } - } - } - \use:x - { - \__text_tmp:w - \char_to_utfviii_bytes:n { "#1 } - \char_to_utfviii_bytes:n { "#2 } - } - \group_end: - } - \__text_tmp:w { 1FBE } { 0399 } { upper } - \cs_set_protected:Npn \__text_tmp:w #1#2#3#4#5#6#7#8 - { - \tl_const:cx - { - c__text_uppercase_el_ - \char_generate:nn {#1} { 12 } - \char_generate:nn {#2} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#6} { 13 } - } - } - \__text_loop:nn - { 0370 } { 0370 } - { 0371 } { 0370 } - { 0372 } { 0372 } - { 0373 } { 0372 } - { 0376 } { 0376 } - { 0377 } { 0376 } - { 03FD } { 03FD } - { 037B } { 03FD } - { 03FE } { 03FE } - { 037C } { 03FE } - { 03FF } { 03FF } - { 037D } { 03FF } - { 0386 } { 0391 } - { 0388 } { 0395 } - { 0389 } { 0397 } - { 038A } { 0399 } - { 038C } { 039F } - { 038E } { 03A5 } - { 038F } { 03A9 } - { 0390 } { 03AA } - { 0391 } { 0391 } - { 0392 } { 0392 } - { 0393 } { 0393 } - { 0394 } { 0394 } - { 0395 } { 0395 } - { 0396 } { 0396 } - { 0397 } { 0397 } - { 0398 } { 0398 } - { 0399 } { 0399 } - { 039A } { 039A } - { 039B } { 039B } - { 039C } { 039C } - { 039D } { 039D } - { 039E } { 039E } - { 039F } { 039F } - { 03A0 } { 03A0 } - { 03A1 } { 03A1 } - { 03A3 } { 03A3 } - { 03A4 } { 03A4 } - { 03A5 } { 03A5 } - { 03A6 } { 03A6 } - { 03A7 } { 03A7 } - { 03A8 } { 03A8 } - { 03A9 } { 03A9 } - { 03AA } { 03AA } - { 03AB } { 03AB } - { 03AC } { 0391 } - { 03AD } { 0395 } - { 03AE } { 0397 } - { 03AF } { 0399 } - { 03B0 } { 03AB } - { 03B1 } { 0391 } - { 03B2 } { 0392 } - { 03B3 } { 0393 } - { 03B4 } { 0394 } - { 03B5 } { 0395 } - { 03B6 } { 0396 } - { 03B7 } { 0397 } - { 03B8 } { 0398 } - { 03B9 } { 0399 } - { 03BA } { 039A } - { 03BB } { 039B } - { 03BC } { 039C } - { 03BD } { 039D } - { 03BE } { 039E } - { 03BF } { 039F } - { 03C0 } { 03A0 } - { 03C1 } { 03A1 } - { 03C2 } { 03A3 } - { 03C3 } { 03A3 } - { 03C4 } { 03A4 } - { 03C5 } { 03A5 } - { 03C6 } { 03A6 } - { 03C7 } { 03A7 } - { 03C8 } { 03A8 } - { 03C9 } { 03A9 } - { 03CA } { 03AA } - { 03CB } { 03AB } - { 03CC } { 039F } - { 03CD } { 03A5 } - { 03CE } { 03A9 } - { 03D0 } { 0392 } - { 03D1 } { 0398 } - { 03D2 } { 03A5 } - { 03D3 } { 03A5 } - { 03D4 } { 03AB } - { 03D5 } { 03A6 } - { 03D6 } { 03A0 } - { 03DA } { 03DA } - { 03DB } { 03DA } - { 03DC } { 03DC } - { 03DD } { 03DC } - { 03DE } { 03DE } - { 03DF } { 03DE } - { 03E0 } { 03E0 } - { 03E1 } { 03E0 } - { 03F0 } { 039A } - { 03F1 } { 03A1 } - { 03F2 } { 03F9 } - { 03F9 } { 03F9 } - \q_recursion_tail ? - \q_recursion_stop - \cs_set_protected:Npn \__text_tmp:w #1#2#3#4#5#6#7#8 - { - \tl_const:cx - { - c__text_uppercase_el_ - \char_generate:nn {#1} { 12 } - \char_generate:nn {#2} { 12 } - \char_generate:nn {#3} { 12 } - _tl - } - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#5} { 13 } - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#6} { 13 } - \tl_if_blank:nF {#7} - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn {#7} { 13 } - } - } - } - \__text_loop:nn - { 1F00 } { 0391 } - { 1F01 } { 0391 } - { 1F02 } { 0391 } - { 1F03 } { 0391 } - { 1F04 } { 0391 } - { 1F05 } { 0391 } - { 1F06 } { 0391 } - { 1F07 } { 0391 } - { 1F08 } { 0391 } - { 1F09 } { 0391 } - { 1F0A } { 0391 } - { 1F0B } { 0391 } - { 1F0C } { 0391 } - { 1F0D } { 0391 } - { 1F0E } { 0391 } - { 1F0F } { 0391 } - { 1F10 } { 0395 } - { 1F11 } { 0395 } - { 1F12 } { 0395 } - { 1F13 } { 0395 } - { 1F14 } { 0395 } - { 1F15 } { 0395 } - { 1F18 } { 0395 } - { 1F19 } { 0395 } - { 1F1A } { 0395 } - { 1F1B } { 0395 } - { 1F1C } { 0395 } - { 1F1D } { 0395 } - { 1F20 } { 0397 } - { 1F21 } { 0397 } - { 1F22 } { 0397 } - { 1F23 } { 0397 } - { 1F24 } { 0397 } - { 1F25 } { 0397 } - { 1F26 } { 0397 } - { 1F27 } { 0397 } - { 1F28 } { 0397 } - { 1F29 } { 0397 } - { 1F2A } { 0397 } - { 1F2B } { 0397 } - { 1F2C } { 0397 } - { 1F2D } { 0397 } - { 1F2E } { 0397 } - { 1F2F } { 0397 } - { 1F30 } { 0399 } - { 1F31 } { 0399 } - { 1F32 } { 0399 } - { 1F33 } { 0399 } - { 1F34 } { 0399 } - { 1F35 } { 0399 } - { 1F36 } { 0399 } - { 1F37 } { 0399 } - { 1F38 } { 0399 } - { 1F39 } { 0399 } - { 1F3A } { 0399 } - { 1F3B } { 0399 } - { 1F3C } { 0399 } - { 1F3D } { 0399 } - { 1F3E } { 0399 } - { 1F3F } { 0399 } - { 1F40 } { 039F } - { 1F41 } { 039F } - { 1F42 } { 039F } - { 1F43 } { 039F } - { 1F44 } { 039F } - { 1F45 } { 039F } - { 1F48 } { 039F } - { 1F49 } { 039F } - { 1F4A } { 039F } - { 1F4B } { 039F } - { 1F4C } { 039F } - { 1F4D } { 039F } - { 1F50 } { 03A5 } - { 1F51 } { 03A5 } - { 1F52 } { 03A5 } - { 1F53 } { 03A5 } - { 1F54 } { 03A5 } - { 1F55 } { 03A5 } - { 1F56 } { 03A5 } - { 1F57 } { 03A5 } - { 1F59 } { 03A5 } - { 1F5B } { 03A5 } - { 1F5D } { 03A5 } - { 1F5F } { 03A5 } - { 1F60 } { 03A9 } - { 1F61 } { 03A9 } - { 1F62 } { 03A9 } - { 1F63 } { 03A9 } - { 1F64 } { 03A9 } - { 1F65 } { 03A9 } - { 1F66 } { 03A9 } - { 1F67 } { 03A9 } - { 1F68 } { 03A9 } - { 1F69 } { 03A9 } - { 1F6A } { 03A9 } - { 1F6B } { 03A9 } - { 1F6C } { 03A9 } - { 1F6D } { 03A9 } - { 1F6E } { 03A9 } - { 1F6F } { 03A9 } - { 1F70 } { 0391 } - { 1F71 } { 0391 } - { 1F72 } { 0395 } - { 1F73 } { 0395 } - { 1F74 } { 0397 } - { 1F75 } { 0397 } - { 1F76 } { 0399 } - { 1F77 } { 0399 } - { 1F78 } { 039F } - { 1F79 } { 039F } - { 1F7A } { 03A5 } - { 1F7B } { 03A5 } - { 1F7C } { 03A9 } - { 1F7D } { 03A9 } - { 1F80 } { 1FBC } - { 1F81 } { 1FBC } - { 1F82 } { 1FBC } - { 1F83 } { 1FBC } - { 1F84 } { 1FBC } - { 1F85 } { 1FBC } - { 1F86 } { 1FBC } - { 1F87 } { 1FBC } - { 1F88 } { 1FBC } - { 1F89 } { 1FBC } - { 1F8A } { 1FBC } - { 1F8B } { 1FBC } - { 1F8C } { 1FBC } - { 1F8D } { 1FBC } - { 1F8E } { 1FBC } - { 1F8F } { 1FBC } - { 1F90 } { 1FCC } - { 1F91 } { 1FCC } - { 1F92 } { 1FCC } - { 1F93 } { 1FCC } - { 1F94 } { 1FCC } - { 1F95 } { 1FCC } - { 1F96 } { 1FCC } - { 1F97 } { 1FCC } - { 1F98 } { 1FCC } - { 1F99 } { 1FCC } - { 1F9A } { 1FCC } - { 1F9B } { 1FCC } - { 1F9C } { 1FCC } - { 1F9D } { 1FCC } - { 1F9E } { 1FCC } - { 1F9F } { 1FCC } - { 1FA0 } { 1FFC } - { 1FA1 } { 1FFC } - { 1FA2 } { 1FFC } - { 1FA3 } { 1FFC } - { 1FA4 } { 1FFC } - { 1FA5 } { 1FFC } - { 1FA6 } { 1FFC } - { 1FA7 } { 1FFC } - { 1FA8 } { 1FFC } - { 1FA9 } { 1FFC } - { 1FAA } { 1FFC } - { 1FAB } { 1FFC } - { 1FAC } { 1FFC } - { 1FAD } { 1FFC } - { 1FAE } { 1FFC } - { 1FAF } { 1FFC } - { 1FB0 } { 1FB8 } - { 1FB1 } { 1FB9 } - { 1FB2 } { 1FBC } - { 1FB3 } { 1FBC } - { 1FB4 } { 1FBC } - { 1FB6 } { 0391 } - { 1FB7 } { 1FBC } - { 1FB8 } { 1FB8 } - { 1FB9 } { 1FB9 } - { 1FBA } { 0391 } - { 1FBB } { 0391 } - { 1FBC } { 1FBC } - { 1FBD } { 1FBD } - { 1FC2 } { 1FCC } - { 1FC3 } { 1FCC } - { 1FC4 } { 1FCC } - { 1FC6 } { 0397 } - { 1FC7 } { 1FCC } - { 1FC8 } { 0395 } - { 1FC9 } { 0395 } - { 1FCA } { 0397 } - { 1FCB } { 0397 } - { 1FCC } { 1FCC } - { 1FD0 } { 1FD8 } - { 1FD1 } { 1FD9 } - { 1FD2 } { 03AA } - { 1FD3 } { 03AA } - { 1FD6 } { 0399 } - { 1FD7 } { 03AA } - { 1FD8 } { 1FD8 } - { 1FD9 } { 1FD9 } - { 1FDA } { 0399 } - { 1FDB } { 0399 } - { 1FE0 } { 1FE8 } - { 1FE1 } { 1FE9 } - { 1FE2 } { 03AB } - { 1FE3 } { 03AB } - { 1FE4 } { 03A1 } - { 1FE5 } { 03A1 } - { 1FE6 } { 03A5 } - { 1FE7 } { 03AB } - { 1FE8 } { 1FE8 } - { 1FE9 } { 1FE9 } - { 1FEA } { 03A5 } - { 1FEB } { 03A5 } - { 1FEC } { 1FEC } - { 1FF2 } { 1FFC } - { 1FF3 } { 1FFC } - { 1FF4 } { 1FFC } - { 1FF6 } { 03A9 } - { 1FF7 } { 1FFC } - { 1FF8 } { 039F } - { 1FF9 } { 039F } - { 1FFA } { 03A9 } - { 1FFB } { 03A9 } - { 1FFC } { 1FFC } - \q_recursion_tail ? - \q_recursion_stop + { \__text_change_case_codepoint:nnnn {#1} {#2} {#3} {#4} } } -\group_end: +\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 \group_begin: \cs_set_protected:Npn \__text_change_case_setup:NN #1#2 { @@ -35642,7 +34906,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \text_declare_purify_equivalent:Nx #1 { \exp_args:Ne \__text_tmp:n - { \char_to_utfviii_bytes:n { "#2 } } + { \__kernel_codepoint_to_bytes:n { "#2 } } } \__text_loop:Nn } @@ -35719,7 +34983,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_set:Npn \__text_tmp:n #1 { \exp_args:Ne \__text_tmp_aux:n - { \char_to_utfviii_bytes:n { "#1 } } + { \__kernel_codepoint_to_bytes:n { "#1 } } } \cs_set:Npn \__text_tmp_aux:n #1 { \__text_tmp:nnnn #1 } \cs_set:Npn \__text_tmp:nnnn #1#2#3#4 @@ -36891,10 +36155,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_gset:Npn \str_upper_case:n { \str_uppercase:n } \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_uppercase:f } \cs_gset:Npn \str_upper_case:f { \str_uppercase:f } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_foldcase:n } -\cs_gset:Npn \str_fold_case:n { \str_foldcase:n } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_foldcase:V } -\cs_gset:Npn \str_fold_case:V { \str_foldcase:V } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_casefold:n } +\cs_gset:Npn \str_fold_case:n { \str_casefold:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_casefold:V } +\cs_gset:Npn \str_fold_case:V { \str_casefold:V } +\__kernel_patch_deprecation:nnNNpn { 2020-10-17 } { \str_casefold:n } +\cs_gset:Npn \str_foldcase:n { \str_casefold:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_casefold:V } +\cs_gset:Npn \str_foldcase:V { \str_casefold:V } \__kernel_patch_deprecation:nnNNpn { 2020-08-20 } { } \cs_gset_protected:Npn \str_declare_eight_bit_encoding:nnn #1 { \__str_declare_eight_bit_encoding:nnnn {#1} { 1114112 } } @@ -36922,22 +36190,40 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase:nn } \cs_gset:Npn \tl_mixed_case:nn #1#2 { \text_titlecase:nn {#1} {#2} } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_lowercase:N } -\cs_gset:Npn \char_lower_case:N { \char_lowercase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_uppercase:N } -\cs_gset:Npn \char_upper_case:N { \char_uppercase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_titlecase:N } -\cs_gset:Npn \char_mixed_case:N { \char_titlecase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_foldcase:N } -\cs_gset:Npn \char_fold_case:N { \char_foldcase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_str_lowercase:N } -\cs_gset:Npn \char_str_lower_case:N { \char_str_lowercase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_str_uppercase:N } -\cs_gset:Npn \char_str_upper_case:N { \char_str_uppercase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_str_titlecase:N } -\cs_gset:Npn \char_str_mixed_case:N { \char_str_titlecase:N } -\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \char_str_foldcase:N } -\cs_gset:Npn \char_str_fold_case:N { \char_str_foldcase:N } +\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { [ \codepoint_generate:n ] } +\cs_gset:Npn \char_to_utfviii_bytes:n { \__kernel_codepoint_to_bytes:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { \codepoint_to_nfd:n } +\cs_gset:Npn \char_to_nfd:N #1 { \codepoint_to_nfd:n {`#1} } +\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { \codepoint_to_nfd:n } +\cs_gset:Npn \char_to_nfd:n { \codepoint_to_nfd:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_lowercase:n } +\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 } { \str_casefold:n } +\cs_gset:Npn \char_fold_case:N { \str_casefold:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_lowercase:n } +\cs_gset:Npn \char_str_lower_case:N { \str_lowercase:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_uppercase:n } +\cs_gset:Npn \char_str_upper_case:N { \str_uppercase:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_titlecase:n } +\cs_gset:Npn \char_str_mixed_case:N { \str_titlecase:n } +\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \str_casefold:n } +\cs_gset:Npn \char_str_fold_case:N { \str_casefold:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \text_lowercase:n } +\cs_gset:Npn \char_lowercase:N { \text_lowercase:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \text_uppercase:n } +\cs_gset:Npn \char_uppercase:N { \text_uppercase:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_casefold:n } +\cs_gset:Npn \char_foldcase:N { \str_casefold:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_lowercase:n } +\cs_gset:Npn \char_str_lowercase:N { \str_lowercase:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_uppercase:n } +\cs_gset:Npn \char_str_uppercase:N { \str_uppercase:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_casefold:n } +\cs_gset:Npn \char_str_foldcase:N { \str_casefold:n } \tl_map_inline:nn { { catcode } { catcode_remove } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 65cec1b9a54..a64d4fe0897 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{2022-11-02}% +\def\ExplFileDate{2022-12-17}% \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 185aad89df8..0e63ffcda5d 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{2022-11-02}% +\def\ExplFileDate{2022-12-17}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 @@ -28,9 +28,15 @@ \global\let\c__kernel_expl_date_tl\ExplFileDate \fi \endgroup -\everyjob\expandafter{\the\everyjob - \message{L3 programming layer <\ExplFileDate>}% -} +\ifdefined\LaTeXReleaseInfo + \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo + \show@release@info{L3 programming layer <\ExplFileDate>}% + }% +\else + \everyjob\expandafter{\the\everyjob + \message{L3 programming layer <\ExplFileDate>}% + }% +\fi \protected\def\ProvidesExplPackage {\@expl@provides@file@@Nnnnnn\ProvidesPackage{Package}} \protected\def\ProvidesExplClass diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index d44f4f90598..64661e4a3cf 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{2022-11-02}% +\def\ExplFileDate{2022-12-17}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 5a2c652ec30..d40ac939a74 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -1637,43 +1637,7 @@ } \seq_gclear:N \g__codedoc_nested_names_seq } -\newcommand*{\DescribeOption} - { - \leavevmode - \@bsphack - \begingroup - \MakePrivateLetters - \Describe@Option - } -\newcommand*{\Describe@Option}[1] - { - \endgroup - \marginpar{ - \raggedleft - \PrintDescribeEnv{#1} - } - \SpecialOptionIndex{#1} - \@esphack - \ignorespaces - } -\newcommand*{\SpecialOptionIndex}[1] - { - \@bsphack - \begingroup - \__codedoc_target: - \index - { - #1\actualchar{\protect\ttfamily#1}~(option) - \encapchar hdclindex{\the\c@HD@hypercount}{usage} - } - \index - { - options:\levelchar#1\actualchar{\protect\ttfamily#1} - \encapchar hdclindex{\the\c@HD@hypercount}{usage} - } - \endgroup - \@esphack - } +\NewDocElement[idxtype = option, idxgroup = options]{Option}{optionenv} \font \manual = manfnt \scan_stop: \cs_gset:Npn \dbend { {\manual\char127} } \newenvironment {danger} |