diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
40 files changed, 1836 insertions, 1086 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty index eb568089f31..5d5864c8cdb 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3benchmark/l3benchmark.sty @@ -6,7 +6,7 @@ %% %% l3benchmark.dtx (with options: `package') %% -%% Copyright (C) 2018,2019 The LaTeX3 Project +%% Copyright (C) 2018-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3benchmark.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3benchmark}{2019-10-11}{} +\ProvidesExplPackage{l3benchmark}{2020-01-12}{} {L3 Experimental benchmarking} \sys_if_engine_luatex:TF { diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty b/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty index 62db595f6a9..392ef2ba12a 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3cctab/l3cctab.sty @@ -6,7 +6,7 @@ %% %% l3cctab.dtx (with options: `package') %% -%% Copyright (C) 2018,2019 The LaTeX3 Project +%% Copyright (C) 2018-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3cctab.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3cctab}{2019-10-11}{} +\ProvidesExplPackage{l3cctab}{2020-01-12}{} {L3 Experimental category code tables} \int_new:N \g__cctab_allocate_int \int_gset:Nn \g__cctab_allocate_int { -1 } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty index 519151e0057..2b56c1dfd57 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3color/l3color.sty @@ -6,7 +6,7 @@ %% %% l3color.dtx (with options: `package') %% -%% Copyright (C) 2017-2019 The LaTeX3 Project +%% Copyright (C) 2017-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3color.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3color}{2019-10-11}{} +\ProvidesExplPackage{l3color}{2020-01-12}{} {L3 Experimental color support} \tl_new:N \l__color_internal_tl \prg_new_conditional:Npnn \__color_if_defined:n #1 { T, F, TF } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty index cdd870cc8d2..b29c727f902 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3draw/l3draw.sty @@ -14,7 +14,7 @@ %% l3draw-state.dtx (with options: `package') %% l3draw-transforms.dtx (with options: `package') %% -%% Copyright (C) 2018,2019 The LaTeX3 Project +%% Copyright (C) 2018-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -28,7 +28,7 @@ %% %% File: l3draw.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3draw}{2019-10-11}{} +\ProvidesExplPackage{l3draw}{2020-01-12}{} {L3 Experimental core drawing support} \RequirePackage { l3color } %% File: l3draw-boxes.dtx @@ -697,6 +697,7 @@ \bool_if:NT \l__draw_path_use_clip_bool { \__draw_backend_clip: + \bool_set_false:N \l_draw_bb_update_bool \bool_lazy_or:nnF { \l__draw_path_use_fill_bool } { \l__draw_path_use_stroke_bool } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty index 1aff5007f6d..5853a577cb5 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3graphics/l3graphics.sty @@ -6,7 +6,7 @@ %% %% l3graphics.dtx (with options: `package') %% -%% Copyright (C) 2019 The LaTeX3 Project +%% Copyright (C) 2019,2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3graphics.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3graphics}{2019-10-11}{} +\ProvidesExplPackage{l3graphics}{2020-01-12}{} {L3 Experimental graphics inclusion support} \ior_new:N \l__graphics_tmp_ior \tl_new:N \l__graphics_tmp_tl @@ -196,7 +196,7 @@ \exp_args:Ne \__graphics_include_auxi:n { \exp_args:Ne \str_tail:n - { \str_fold_case:V \l__graphics_ext_str } + { \str_foldcase:V \l__graphics_ext_str } } } \cs_new_protected:Npn \graphics_include:nn #1#2 @@ -206,7 +206,7 @@ \file_get_full_name:nNTF {#1} \l__graphics_name_tl { \exp_args:Ne \__graphics_include_auxi:n - { \str_fold_case:n {#1} } + { \str_foldcase:n {#1} } } { \__kernel_msg_error:nnn { graphics } { graphic-not-found } {#1} } \group_end: diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty b/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty index aa46e4d56a3..5341cb87805 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3pdf/l3pdf.sty @@ -6,7 +6,7 @@ %% %% l3pdf.dtx (with options: `package') %% -%% Copyright (C) 2019 The LaTeX3 Project +%% Copyright (C) 2019,2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3pdf.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3pdf}{2019-10-11}{} +\ProvidesExplPackage{l3pdf}{2020-01-12}{} {L3 Experimental core PDF support} \bool_new:N \g__pdf_init_bool \cs_if_exist:NT \documentclass diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty index 63b8e57edf9..2d974506bf6 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-format.sty @@ -6,7 +6,7 @@ %% %% l3str-format.dtx (with options: `package') %% -%% Copyright (C) 2011-2019 The LaTeX3 Project +%% Copyright (C) 2011-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3str-format.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3str-format}{2019-10-11}{} +\ProvidesExplPackage{l3str-format}{2020-01-12}{} {L3 Experimental string formatting} \cs_generate_variant:Nn \use:nn { nf } \cs_generate_variant:Nn \use:nnn { fnf } diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty index 4e8d868d796..3bbd279c109 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3sys-shell/l3sys-shell.sty @@ -6,7 +6,7 @@ %% %% l3sys-shell.dtx (with options: `package') %% -%% Copyright (C) 2018,2019 The LaTeX3 Project +%% Copyright (C) 2018-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: l3sys-shell.dtx \RequirePackage{expl3} -\ProvidesExplPackage{l3sys-shell}{2019-10-11}{} +\ProvidesExplPackage{l3sys-shell}{2020-01-12}{} {L3 Experimental system shell functions} \cs_new:Npn \__sys_path_to_win:n #1 { diff --git a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty index b5b8d6b633b..92485efab50 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xcoffins/xcoffins.sty @@ -6,7 +6,7 @@ %% %% xcoffins.dtx (with options: `package') %% -%% Copyright (C) 2010-2019 The LaTeX3 Project +%% Copyright (C) 2010-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: xcoffins.dtx \RequirePackage{xparse} -\ProvidesExplPackage{xcoffins}{2019-10-11}{} +\ProvidesExplPackage{xcoffins}{2020-01-12}{} {L3 Experimental design level coffins} \keys_define:nn { coffin } { diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty index 09ad53f47d6..dbedd8ac3d9 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/l3galley.sty @@ -6,7 +6,7 @@ %% %% l3galley.dtx (with options: `package') %% -%% Copyright (C) 2010-2019 The LaTeX3 Project +%% Copyright (C) 2010-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{l3galley}{2019-10-11}{} +\ProvidesExplPackage{l3galley}{2020-01-12}{} {L3 Experimental galley code} \int_new:N \l__galley_tmp_int \seq_new:N \g__galley_tmpa_seq diff --git a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty index eadda7c0ef0..e025cc69497 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/xgalley/xgalley.sty @@ -6,7 +6,7 @@ %% %% xgalley.dtx (with options: `package') %% -%% Copyright (C) 2010-2019 The LaTeX3 Project +%% Copyright (C) 2010-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,7 +20,7 @@ %% %% File: xgalley.dtx \RequirePackage{xparse} -\ProvidesExplPackage{xgalley}{2019-10-11}{} +\ProvidesExplPackage{xgalley}{2020-01-12}{} {L3 Experimental galley} \RequirePackage{xparse,xtemplate,l3galley} \clist_new:N \l__galley_tmpa_clist diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex index 8cb4cc08109..4e722fd3bee 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-code.tex @@ -48,11 +48,13 @@ %% l3coffins.dtx (with options: `package') %% l3luatex.dtx (with options: `package,tex') %% l3unicode.dtx (with options: `package') +%% l3text.dtx (with options: `package') +%% l3text-case.dtx (with options: `package') %% l3candidates.dtx (with options: `package') %% l3legacy.dtx (with options: `package') %% l3deprecation.dtx (with options: `package,kernel') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -65,7 +67,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2019-11-07}% +\def\ExplFileDate{2020-01-12}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -1223,6 +1225,9 @@ \__kernel_primitive:NN \Uvextensible \tex_Uvextensible:D \__kernel_primitive:NN \autospacing \tex_autospacing:D \__kernel_primitive:NN \autoxspacing \tex_autoxspacing:D + \__kernel_primitive:NN \currentcjktoken \tex_currentcjktoken:D + \__kernel_primitive:NN \currentspacingmode \tex_currentspacingmode:D + \__kernel_primitive:NN \currentxspacingmode \tex_currentxspacingmode:D \__kernel_primitive:NN \disinhibitglue \tex_disinhibitglue:D \__kernel_primitive:NN \dtou \tex_dtou:D \__kernel_primitive:NN \epTeXinputencoding \tex_epTeXinputencoding:D @@ -3917,6 +3922,7 @@ \__cs_tmp:w { ooo } \__cs_tmp:w { oof } \__cs_tmp:w { ffo } +\__cs_tmp:w { eee } \__cs_tmp:w { NNx } \__cs_tmp:w { Nnx } \__cs_tmp:w { Nox } @@ -5502,12 +5508,12 @@ \tl_to_str:n {#1} \q_mark \q_mark \q_stop } \cs_new:Npn \__str_tail_auxii:w #1 #2 \q_mark #3 \q_stop { #2 } -\cs_new:Npn \str_fold_case:n #1 { \__str_change_case:nn {#1} { fold } } -\cs_new:Npn \str_lower_case:n #1 { \__str_change_case:nn {#1} { lower } } -\cs_new:Npn \str_upper_case:n #1 { \__str_change_case:nn {#1} { upper } } -\cs_generate_variant:Nn \str_fold_case:n { V } -\cs_generate_variant:Nn \str_lower_case:n { f } -\cs_generate_variant:Nn \str_upper_case:n { f } +\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_generate_variant:Nn \str_lowercase:n { f } +\cs_generate_variant:Nn \str_uppercase:n { f } \cs_new:Npn \__str_change_case:nn #1 { \exp_after:wN \__str_change_case_aux:nn \exp_after:wN @@ -5541,7 +5547,7 @@ \quark_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 } + { \use:c { char_str_ #1 case:N } #2 } \__str_change_case_loop:nw {#1} } \str_const:Nx \c_ampersand_str { \cs_to_str:N \& } @@ -8632,6 +8638,225 @@ } \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: { } +\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: + \q_stop + } + { \exp_not:n {#1} } + } +\cs_set_eq:NN \__char_to_nfd:n \char_to_nfd:N +\cs_new:Npn \__char_to_nfd:Nw #1#2#3 \q_stop + { + \exp_args:Ne \__char_to_nfd:n + { \char_generate:nn { `#2 } { \__char_change_case_catcode:N #1 } } + \tl_if_blank:nF {#3} + { + \exp_args:Ne \__char_to_nfd:n + { \char_generate:nn { `#3 } { \char_value_catcode:n { `#3 } } } + } + } +\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 + { + \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 } + } +\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_no_value \q_no_value \q_stop } +\cs_generate_variant:Nn \__char_change_case_multi:nN { v } +\cs_new:Npn \__char_change_case_multi:NNNNw #1#2#3#4#5 \q_stop + { + \quark_if_no_value:NTF #4 + { + \quark_if_no_value:NTF #3 + { \__char_change_case:NN #1 #2 } + { \__char_change_case:NNN #1 #2#3 } + } + { \__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 + 3 + \else: + \if_catcode:w \exp_not:N #1 \c_alignment_token + 4 + \else: + \if_catcode:w \exp_not:N #1 \c_math_superscript_token + 7 + \else: + \if_catcode:w \exp_not:N #1 \c_math_subscript_token + 8 + \else: + \if_catcode:w \exp_not:N #1 \c_space_token + 10 + \else: + \if_catcode:w \exp_not:N #1 \c_catcode_letter_token + 11 + \else: + \if_catcode:w \exp_not:N #1 \c_catcode_other_token + 12 + \else: + 13 + \fi: + \fi: + \fi: + \fi: + \fi: + \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_change_case:nN #1#2 + { + \int_compare:nNnTF {#1} = 0 + { \tl_to_str:n {#2} } + { \char_generate:nn {#1} { 12 } } + } +\cs_if_exist:NF \tex_Uchar:D + { + \cs_set:Npn \__char_str_change_case:nN #1#2 + { \tl_to_str:n {#2} } + } \tl_const:Nx \c_catcode_other_space_tl { \char_generate:nn { `\ } { 12 } } \group_begin: \__kernel_chk_if_free_cs:N \c_group_begin_token @@ -11335,12 +11560,94 @@ \cs_new:Npn \__file_mdfive_hash:n #1 { \tex_mdfivesum:D file {#1} } } +\cs_new:Npn \file_hex_dump:nnn #1#2#3 + { + \exp_args:Neee \__file_hex_dump_auxi:nnn + { \file_full_name:n {#1} } + { \int_eval:n {#2} } + { \int_eval:n {#3} } + } +\cs_new:Npn \__file_hex_dump_auxi:nnn #1#2#3 + { + \bool_lazy_any:nF + { + { \tl_if_blank_p:n {#1} } + { \int_compare_p:nNn {#2} = 0 } + { \int_compare_p:nNn {#3} = 0 } + } + { + \exp_args:Ne \__file_hex_dump_auxii:nnnn + { \__file_details_aux:nn {#1} { size } } + {#1} {#2} {#3} + } + } +\cs_new:Npn \__file_hex_dump_auxii:nnnn #1#2#3#4 + { + \int_compare:nNnTF {#3} > 0 + { \__file_hex_dump_auxiii:nnnn {#3} } + { + \exp_args:Ne \__file_hex_dump_auxiii:nnnn + { \int_eval:n { #1 + #3 } } + } + {#1} {#2} {#4} + } +\cs_new:Npn \__file_hex_dump_auxiii:nnnn #1#2#3#4 + { + \int_compare:nNnTF {#4} > 0 + { \__file_hex_dump_auxiv:nnn {#4} } + { + \exp_args:Ne \__file_hex_dump_auxiv:nnn + { \int_eval:n { #2 + #4 } } + } + {#1} {#3} + } +\cs_new:Npn \__file_hex_dump_auxiv:nnn #1#2#3 + { + \tex_filedump:D + offset ~ \int_eval:n { #2 - 1 } ~ + length ~ \int_eval:n { #1 - #2 + 1 } + {#3} + } +\sys_if_engine_luatex:T + { + \cs_gset:Npn \__file_hex_dump_auxiv:nnn #1#2#3 + { + \lua_now:e + { + l3kernel.filedump + ( + " \lua_escape:e {#3} " , + \int_eval:n { #2 - 1 } , + \int_eval:n { #1 - #2 + 1 } + ) + } + } + } +\cs_new:Npn \file_hex_dump:n #1 + { \exp_args:Ne \__file_hex_dump:n { \file_full_name:n {#1} } } +\cs_new:Npn \__file_hex_dump:n #1 + { + \tl_if_blank:nF {#1} + { \tex_filedump:D length \tex_filesize:D {#1} {#1} } + } +\sys_if_engine_luatex:T + { + \cs_gset:Npn \__file_hex_dump:n #1 + { + \lua_now:e + { l3kernel.filedump ( " \lua_escape:e { #1 } " ) } + } + } +\cs_new_protected:Npn \file_get_hex_dump:nN #1#2 + { \file_get_hex_dump:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } \cs_new_protected:Npn \file_get_mdfive_hash:nN #1#2 { \file_get_mdfive_hash:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } \cs_new_protected:Npn \file_get_size:nN #1#2 { \file_get_size:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } \cs_new_protected:Npn \file_get_timestamp:nN #1#2 { \file_get_timestamp:nNF {#1} #2 { \tl_set:Nn #2 { \q_no_value } } } +\prg_new_protected_conditional:Npnn \file_get_hex_dump:nN #1#2 { T , F , TF } + { \__file_get_details:nnN {#1} { hex_dump } #2 } \prg_new_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 { T , F , TF } { \__file_get_details:nnN {#1} { mdfive_hash } #2 } \prg_new_protected_conditional:Npnn \file_get_size:nN #1#2 { T , F , TF } @@ -11368,6 +11675,7 @@ \token_to_str:N \(pdf)file \str_case:nn {#2} { + { hex_dump } { dump } { mdfive_hash } { mdfivesum } { timestamp } { moddate } { size } { size } @@ -11376,6 +11684,20 @@ \prg_return_false: } } +\cs_new_protected:Npn \file_get_hex_dump:nnnN #1#2#3#4 + { + \file_get_hex_dump:nnnNF {#1} {#2} {#3} #4 + { \tl_set:Nn #4 { \q_no_value } } + } +\prg_new_protected_conditional:Npnn \file_get_hex_dump:nnnN #1#2#3#4 + { T , F , TF } + { + \tl_set:Nx #4 + { \file_hex_dump:nnn {#1} {#2} {#3} } + \tl_if_empty:NTF #4 + { \prg_return_false: } + { \prg_return_true: } + } \cs_new:Npn \__file_str_cmp:nn #1#2 { \tex_strcmp:D {#1} {#2} } \sys_if_engine_luatex:T { @@ -13104,6 +13426,7 @@ { \c__keys_code_root_tl ##1 / \l_keys_key_tl } { \tl_set:Nn \l__keys_inherit_tl {##1} + \cs_if_exist_use:c { \c__keys_validate_root_tl ##1 / \l_keys_key_tl } \cs:w \c__keys_code_root_tl ##1 / \l_keys_key_tl \exp_after:wN \cs_end: \exp_after:wN { \l_keys_value_tl } @@ -14662,7 +14985,7 @@ \cs_if_exist_use:cF { __fp_parse_word_#2:N } { \cs_if_exist_use:cF - { __fp_parse_caseless_ \str_fold_case:n {#2} :N } + { __fp_parse_caseless_ \str_foldcase:n {#2} :N } { \__kernel_msg_expandable_error:nnn { kernel } { unknown-fp-word } {#2} @@ -27252,27 +27575,47 @@ \ior_open:Nn \g__char_data_ior { UnicodeData.txt } \cs_set_protected:Npn \__char_data_auxi:w #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; - { \__char_data_auxii:w #1 ; } - \cs_set_protected:Npn \__char_data_auxii:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 \q_stop + { + \tl_if_blank:nF {#6} + { + \tl_if_head_eq_charcode:nNF {#6} < % > + { \__char_data_auxii:w #1 ; #6 ~ \q_stop } + } + \__char_data_auxiii:w #1 ; + } + \cs_set_protected:Npn \__char_data_auxii:w #1 ; #2 ~ #3 \q_stop + { + \tl_const:cx + { c__char_nfd_ \__char_generate_char:n {#1} _tl } + { + \__char_generate:n { "#2 } + \tl_if_blank:nF {#3} + { \__char_generate:n { "#3 } } + } + } + \cs_set_protected:Npn \__char_data_auxiii:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ~ \q_stop { \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_mixed_case_ \__char_generate_char:n {#1} _tl } + { c__char_titlecase_ \__char_generate_char:n {#1} _tl } { \__char_generate:n { "#7 } } \fi: \fi: } - \ior_map_variable:NNn \g__char_data_ior \l__char_tmpa_tl - { - \if_meaning:w \l__char_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 - } + \group_begin: + \char_set_catcode_space:n { `\ }% + \ior_map_variable:NNn \g__char_data_ior \l__char_tmpa_tl + {% + \if_meaning:w \l__char_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 + }% + \group_end: \ior_close:N \g__char_data_ior \ior_open:Nn \g__char_data_ior { CaseFolding.txt } \cs_set_protected:Npn \__char_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop @@ -27281,7 +27624,7 @@ \reverse_if:N \if_int_compare:w \char_value_lccode:n {"#1} = "#3 ~ \tl_const:cx - { c__char_fold_case_ \__char_generate_char:n {#1} _tl } + { c__char_foldcase_ \__char_generate_char:n {#1} _tl } { \__char_generate:n { "#3 } } \fi: \else: @@ -27292,7 +27635,7 @@ } \cs_set_protected:Npn \__char_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop { - \tl_const:cx { c__char_fold_case_ \__char_generate_char:n {#1} _tl } + \tl_const:cx { c__char_foldcase_ \__char_generate_char:n {#1} _tl } { \__char_generate:n { "#2 } \__char_generate:n { "#3 } @@ -27314,14 +27657,14 @@ \use:n { \__char_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop \use:n { \__char_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop \str_if_eq:nnF {#3} {#4} - { \use:n { \__char_data_auxii:w #1 ~ mixed ~ #3 ~ } ~ \q_stop } + { \use:n { \__char_data_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop } } \cs_set_protected:Npn \__char_data_auxii:w #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop { \tl_if_empty:nF {#4} { - \tl_const:cx { c__char_ #2 _case_ \__char_generate_char:n {#1} _tl } + \tl_const:cx { c__char_ #2 case_ \__char_generate_char:n {#1} _tl } { \__char_generate:n { "#3 } \__char_generate:n { "#4 } @@ -27351,9 +27694,9 @@ \cs_set_protected:Npn \__char_tmp:NN #1#2 { \quark_if_recursion_tail_stop:N #2 - \tl_const:cn { c__char_upper_case_ #2 _tl } {#1} - \tl_const:cn { c__char_lower_case_ #1 _tl } {#2} - \tl_const:cn { c__char_fold_case_ #1 _tl } {#2} + \tl_const:cn { c__char_uppercase_ #2 _tl } {#1} + \tl_const:cn { c__char_lowercase_ #1 _tl } {#2} + \tl_const:cn { c__char_foldcase_ #1 _tl } {#2} \__char_tmp:NN } \__char_tmp:NN @@ -27363,1182 +27706,1188 @@ \ior_close:N \g__char_data_ior \group_end: } -%% File: l3candidates.dtx -\cs_new_protected:Npn \box_clip:N #1 - { \hbox_set:Nn #1 { \__box_backend_clip:N #1 } } -\cs_generate_variant:Nn \box_clip:N { c } -\cs_new_protected:Npn \box_gclip:N #1 - { \hbox_gset:Nn #1 { \__box_backend_clip:N #1 } } -\cs_generate_variant:Nn \box_gclip:N { c } -\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5 - { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } -\cs_generate_variant:Nn \box_set_trim:Nnnnn { c } -\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5 - { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } -\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c } -\cs_new_protected:Npn \__box_set_trim:NnnnnN #1#2#3#4#5#6 - { - \hbox_set:Nn \l__box_internal_box - { - \tex_kern:D - \__box_dim_eval:n {#2} - \box_use:N #1 - \tex_kern:D - \__box_dim_eval:n {#4} - } - \dim_compare:nNnTF { \box_dp:N #1 } > {#3} - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_down:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_dp:Nn \l__box_internal_box { \box_dp:N #1 - (#3) } - } - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_down:nn { (#3) - \box_dp:N #1 } - { \box_use_drop:N \l__box_internal_box } - } - \box_set_dp:Nn \l__box_internal_box \c_zero_dim - } - \dim_compare:nNnTF { \box_ht:N \l__box_internal_box } > {#5} - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box - { \box_ht:N \l__box_internal_box - (#5) } - } - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn { (#5) - \box_ht:N \l__box_internal_box } - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box \c_zero_dim - } - #6 #1 \l__box_internal_box - } -\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5 - { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } -\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c } -\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5 - { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } -\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c } -\cs_new_protected:Npn \__box_set_viewport:NnnnnN #1#2#3#4#5#6 - { - \hbox_set:Nn \l__box_internal_box - { - \tex_kern:D - \__box_dim_eval:n {#2} - \box_use:N #1 - \tex_kern:D \__box_dim_eval:n { #4 - \box_wd:N #1 } - } - \dim_compare:nNnTF {#3} < \c_zero_dim - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_down:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_dp:Nn \l__box_internal_box { - \__box_dim_eval:n {#3} } - } - { - \hbox_set:Nn \l__box_internal_box - { \box_move_down:nn {#3} { \box_use_drop:N \l__box_internal_box } } - \box_set_dp:Nn \l__box_internal_box \c_zero_dim - } - \dim_compare:nNnTF {#5} > \c_zero_dim - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn \c_zero_dim - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box - { - (#5) - \dim_compare:nNnT {#3} > \c_zero_dim - { - (#3) } - } - } - { - \hbox_set:Nn \l__box_internal_box - { - \box_move_up:nn { - \__box_dim_eval:n {#5} } - { \box_use_drop:N \l__box_internal_box } - } - \box_set_ht:Nn \l__box_internal_box \c_zero_dim - } - #6 #1 \l__box_internal_box - } -\cs_new:Npn \flag_raise_if_clear:n #1 +%% File: l3text.dtx +\group_begin: + \char_set_catcode_active:n { 0 } + \cs_new:Npn \__text_token_to_explicit:N #1 + { + \if_catcode:w \exp_not:N #1 + \if_catcode:w \scan_stop: \exp_not:N #1 + \scan_stop: + \else: + \exp_not:N ^^@ + \fi: + \exp_after:wN \__text_token_to_explicit_cs:N + \else: + \exp_after:wN \__text_token_to_explicit_char:N + \fi: + #1 + } +\group_end: +\cs_new:Npn \__text_token_to_explicit_cs:N #1 { - \if_cs_exist:w flag~#1~0 \cs_end: + \exp_after:wN \if_meaning:w \exp_not:N #1 #1 + \exp_after:wN \use:nn \exp_after:wN + \__text_token_to_explicit_cs_aux:N \else: - \cs:w flag~#1 \cs_end: 0 ; + \exp_after:wN \exp_not:n \fi: + {#1} } -\cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6 +\cs_new:Npn \__text_token_to_explicit_cs_aux:N #1 { - \exp_args:Ne \__msg_expandable_error_module:nn + \bool_lazy_or:nnTF + { \token_if_chardef_p:N #1 } + { \token_if_mathchardef_p:N #1 } { - \exp_args:Nc \exp_args:Noooo - { \c__msg_text_prefix_tl #1 / #2 } - { \tl_to_str:n {#3} } - { \tl_to_str:n {#4} } - { \tl_to_str:n {#5} } - { \tl_to_str:n {#6} } + \char_generate:nn {#1} + { \char_value_catcode:n {#1} } } {#1} } -\cs_new:Npn \msg_expandable_error:nnnnn #1#2#3#4#5 - { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} {#5} { } } -\cs_new:Npn \msg_expandable_error:nnnn #1#2#3#4 - { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} { } { } } -\cs_new:Npn \msg_expandable_error:nnn #1#2#3 - { \msg_expandable_error:nnnnnn {#1} {#2} {#3} { } { } { } } -\cs_new:Npn \msg_expandable_error:nn #1#2 - { \msg_expandable_error:nnnnnn {#1} {#2} { } { } { } { } } -\cs_generate_variant:Nn \msg_expandable_error:nnnnnn { nnffff } -\cs_generate_variant:Nn \msg_expandable_error:nnnnn { nnfff } -\cs_generate_variant:Nn \msg_expandable_error:nnnn { nnff } -\cs_generate_variant:Nn \msg_expandable_error:nnn { nnf } -\cs_new:Npn \__msg_expandable_error_module:nn #1#2 - { - \exp_after:wN \exp_after:wN - \exp_after:wN \use_none_delimit_by_q_stop:w - \use:n { \::error ! ~ #2 : ~ #1 } \q_stop - } -\cs_new_protected:Npn \msg_show_eval:Nn #1#2 - { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_show:n } -\cs_new_protected:Npn \msg_log_eval:Nn #1#2 - { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_log:n } -\cs_new_protected:Npn \__msg_show_eval:nnN #1#2#3 { #3 { #2 = #1 } } -\cs_new:Npx \msg_show_item:n #1 - { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n { {#1} } } -\cs_new:Npx \msg_show_item_unbraced:n #1 - { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n {#1} } -\cs_new:Npx \msg_show_item:nn #1#2 +\cs_new:Npn \__text_token_to_explicit_char:N #1 { - \iow_newline: > \use:nn { ~ } { ~ } - \exp_not:N \tl_to_str:n { {#1} } - \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ } - \exp_not:N \tl_to_str:n { {#2} } + \if:w + \if_catcode:w ^ \exp_args:No \str_tail:n { \token_to_str:N #1 } ^ + \token_to_str:N #1 #1 + \else: + AB + \fi: + \exp_after:wN \exp_not:n + \else: + \exp_after:wN \__text_token_to_explicit:n + \fi: + {#1} } -\cs_new:Npx \msg_show_item_unbraced:nn #1#2 +\cs_new:Npn \__text_token_to_explicit:n #1 { - \iow_newline: > \use:nn { ~ } { ~ } - \exp_not:N \tl_to_str:n {#1} - \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ } - \exp_not:N \tl_to_str:n {#2} + \exp_after:wN \__text_token_to_explicit_auxi:w + \int_value:w + \if_catcode:w \c_group_begin_token #1 1 \else: + \if_catcode:w \c_group_end_token #1 2 \else: + \if_catcode:w \c_math_toggle_token #1 3 \else: + \if_catcode:w ## #1 6 \else: + \if_catcode:w ^ #1 7 \else: + \if_catcode:w \c_math_subscript_token #1 8 \else: + \if_catcode:w \c_space_token #1 10 \else: + \if_catcode:w A #1 11 \else: + \if_catcode:w + #1 12 \else: + 4 \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: + \exp_after:wN ; + \token_to_meaning:N #1 \q_stop } -\cs_new_protected:Npn \bool_set_inverse:N #1 - { \bool_if:NTF #1 { \bool_set_false:N } { \bool_set_true:N } #1 } -\cs_generate_variant:Nn \bool_set_inverse:N { c } -\cs_new_protected:Npn \bool_gset_inverse:N #1 - { \bool_if:NTF #1 { \bool_gset_false:N } { \bool_gset_true:N } #1 } -\cs_generate_variant:Nn \bool_gset_inverse:N { c } -\cs_new:Npn \prop_rand_key_value:N #1 +\cs_new:Npn \__text_token_to_explicit_auxi:w #1 ; #2 \q_stop { - \prop_if_empty:NF #1 + \char_generate:nn { - \exp_after:wN \__prop_rand_item:w - \int_value:w \int_rand:nn { 1 } { \prop_count:N #1 } - #1 \q_stop + \if_int_compare:w #1 < 9 \exp_stop_f: + \exp_after:wN \__text_token_to_explicit_auxii:w + \else: + \exp_after:wN \__text_token_to_explicit_auxiii:w + \fi: + #2 } + {#1} } -\cs_generate_variant:Nn \prop_rand_key_value:N { c } -\cs_new:Npn \__prop_rand_item:w #1 \s__prop \__prop_pair:wn #2 \s__prop #3 - { - \int_compare:nNnF {#1} > 1 - { \use_i_delimit_by_q_stop:nw { \exp_not:n { {#2} {#3} } } } - \exp_after:wN \__prop_rand_item:w - \int_value:w \int_eval:n { #1 - 1 } \s__prop - } -\cs_new:Npn \seq_mapthread_function:NNN #1#2#3 - { \exp_after:wN \__seq_mapthread_function:wNN #2 \q_stop #1 #3 } -\cs_new:Npn \__seq_mapthread_function:wNN \s__seq #1 \q_stop #2#3 - { - \exp_after:wN \__seq_mapthread_function:wNw #2 \q_stop #3 - #1 { ? \prg_break: } { } - \prg_break_point: - } -\cs_new:Npn \__seq_mapthread_function:wNw \s__seq #1 \q_stop #2 +\exp_last_unbraced:NNNNo \cs_new:Npn \__text_token_to_explicit_auxii:w + #1 { \tl_to_str:n { character ~ } } { ` } +\cs_new:Npn \__text_token_to_explicit_auxiii:w #1 ~ #2 ~ { ` } +\cs_new:Npn \__text_char_catcode:N #1 { - \__seq_mapthread_function:Nnnwnn #2 - #1 { ? \prg_break: } { } - \q_stop + \if_catcode:w \exp_not:N #1 \c_math_toggle_token + 3 + \else: + \if_catcode:w \exp_not:N #1 \c_alignment_token + 4 + \else: + \if_catcode:w \exp_not:N #1 \c_math_superscript_token + 7 + \else: + \if_catcode:w \exp_not:N #1 \c_math_subscript_token + 8 + \else: + \if_catcode:w \exp_not:N #1 \c_space_token + 10 + \else: + \if_catcode:w \exp_not:N #1 \c_catcode_letter_token + 11 + \else: + \if_catcode:w \exp_not:N #1 \c_catcode_other_token + 12 + \else: + 13 + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: + \fi: } -\cs_new:Npn \__seq_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6 +\prg_new_conditional:Npnn \__text_if_expandable:N #1 { T , F , TF } { - \use_none:n #2 - \use_none:n #5 - #1 {#3} {#6} - \__seq_mapthread_function:Nnnwnn #1 #4 \q_stop + \token_if_expandable:NTF #1 + { + \bool_lazy_any:nTF + { + { \token_if_protected_macro_p:N #1 } + { \token_if_protected_long_macro_p:N #1 } + { \token_if_eq_meaning_p:NN \q_recursion_tail #1 } + } + { \prg_return_false: } + { \prg_return_true: } + } + { \prg_return_false: } } -\cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc , c , cc } -\cs_new_protected:Npn \seq_set_filter:NNn - { \__seq_set_filter:NNNn \tl_set:Nx } -\cs_new_protected:Npn \seq_gset_filter:NNn - { \__seq_set_filter:NNNn \tl_gset:Nx } -\cs_new_protected:Npn \__seq_set_filter:NNNn #1#2#3#4 +\tl_new:N \l_text_accents_tl +\tl_set:Nn \l_text_accents_tl + { \` \' \^ \~ \= \u \. \" \r \H \v \d \c \k \b \t } +\tl_new:N \l_text_letterlike_tl +\tl_set:Nn \l_text_letterlike_tl + { + \AA \aa + \AE \ae + \DH \dh + \DJ \dj + \IJ \ij + \L \l + \NG \ng + \O \o + \OE \oe + \SS \ss + \TH \th + } +\tl_new:N \l_text_case_exclude_arg_tl +\tl_set:Nn \l_text_case_exclude_arg_tl { \cite \label \ref } +\tl_new:N \l_text_math_arg_tl +\tl_set:Nn \l_text_math_arg_tl { \ensuremath } +\tl_new:N \l_text_math_delims_tl +\tl_set:Nn \l_text_math_delims_tl { $ $ \( \) } +\tl_new:N \l_text_expand_exclude_tl +\tl_set:Nn \l_text_expand_exclude_tl + { \cite \label \ref } +\tl_new:N \l__text_math_mode_tl +\tex_chardef:D \c__text_chardef_space_token = `\ % +\tex_mathchardef:D \c__text_mathchardef_space_token = `\ % +\tex_chardef:D \c__text_chardef_group_begin_token = `\{ % `\} +\tex_mathchardef:D \c__text_mathchardef_group_begin_token = `\{ % `\} `\{ +\tex_chardef:D \c__text_chardef_group_end_token = `\} % `\{ +\tex_mathchardef:D \c__text_mathchardef_group_end_token = `\} % +\cs_new:Npn \text_expand:n #1 { - \__seq_push_item_def:n { \bool_if:nT {#4} { \__seq_wrap_item:n {##1} } } - #1 #2 { #3 } - \__seq_pop_item_def: + \__kernel_exp_not:w \exp_after:wN + { + \exp:w + \__text_expand:n {#1} + } } -\cs_new_protected:Npn \seq_set_map:NNn - { \__seq_set_map:NNNn \tl_set:Nx } -\cs_new_protected:Npn \seq_gset_map:NNn - { \__seq_set_map:NNNn \tl_gset:Nx } -\cs_new_protected:Npn \__seq_set_map:NNNn #1#2#3#4 +\cs_new:Npn \__text_expand:n #1 { - \__seq_push_item_def:n { \exp_not:N \__seq_item:n {#4} } - #1 #2 { #3 } - \__seq_pop_item_def: + \group_align_safe_begin: + \__text_expand_loop:w #1 + \q_recursion_tail \q_recursion_stop + \__text_expand_result:n { } } -\cs_new_protected:Npn \seq_set_from_inline_x:Nnn - { \__seq_set_from_inline_x:NNnn \tl_set:Nx } -\cs_new_protected:Npn \seq_gset_from_inline_x:Nnn - { \__seq_set_from_inline_x:NNnn \tl_gset:Nx } -\cs_new_protected:Npn \__seq_set_from_inline_x:NNnn #1#2#3#4 +\cs_new:Npn \__text_expand_store:n #1 + { \__text_expand_store:nw {#1} } +\cs_generate_variant:Nn \__text_expand_store:n { o } +\cs_new:Npn \__text_expand_store:nw #1#2 \__text_expand_result:n #3 + { #2 \__text_expand_result:n { #3 #1 } } +\cs_new:Npn \__text_expand_end:w #1 \__text_expand_result:n #2 { - \__seq_push_item_def:n { \exp_not:N \__seq_item:n {#4} } - #1 #2 { \s__seq #3 \__seq_item:n } - \__seq_pop_item_def: + \group_align_safe_end: + \exp_end: + #2 } -\cs_new_protected:Npn \seq_set_from_function:NnN #1#2#3 - { \seq_set_from_inline_x:Nnn #1 {#2} { #3 {##1} } } -\cs_new_protected:Npn \seq_gset_from_function:NnN #1#2#3 - { \seq_gset_from_inline_x:Nnn #1 {#2} { #3 {##1} } } -\cs_new:Npn \seq_indexed_map_function:NN #1#2 +\cs_new:Npn \__text_expand_loop:w #1 \q_recursion_stop { - \__seq_indexed_map:NN #1#2 - \prg_break_point:Nn \seq_map_break: { } + \tl_if_head_is_N_type:nTF {#1} + { \__text_expand_N_type:N } + { + \tl_if_head_is_group:nTF {#1} + { \__text_expand_group:n } + { \__text_expand_space:w } + } + #1 \q_recursion_stop } -\cs_new_protected:Npn \seq_indexed_map_inline:Nn #1#2 +\cs_new:Npn \__text_expand_group:n #1 { - \int_gincr:N \g__kernel_prg_map_int - \cs_gset_protected:cpn - { __seq_map_ \int_use:N \g__kernel_prg_map_int :w } ##1##2 {#2} - \exp_args:NNc \__seq_indexed_map:NN #1 - { __seq_map_ \int_use:N \g__kernel_prg_map_int :w } - \prg_break_point:Nn \seq_map_break: - { \int_gdecr:N \g__kernel_prg_map_int } + \__text_expand_store:o + { + \exp_after:wN + { + \exp:w + \__text_expand:n {#1} + } + } + \__text_expand_loop:w } -\cs_new:Npn \__seq_indexed_map:NN #1#2 +\exp_last_unbraced:NNo \cs_new:Npn \__text_expand_space:w \c_space_tl { - \exp_after:wN \__seq_indexed_map:Nw - \exp_after:wN #2 - \int_value:w 1 - \exp_after:wN \use_i:nn - \exp_after:wN ; - #1 - \prg_break: \__seq_item:n { } \prg_break_point: + \__text_expand_store:n { ~ } + \__text_expand_loop:w } -\cs_new:Npn \__seq_indexed_map:Nw #1#2 ; #3 \__seq_item:n #4 +\cs_new:Npx \__text_expand_N_type:N #1 { - #3 - #1 {#2} {#4} - \exp_after:wN \__seq_indexed_map:Nw - \exp_after:wN #1 - \int_value:w \int_eval:w 1 + #2 ; + \exp_not:N \quark_if_recursion_tail_stop_do:Nn #1 + { \exp_not:N \__text_expand_end:w } + \exp_not:N \bool_lazy_any:nTF + { + { \exp_not:N \token_if_eq_meaning_p:NN #1 \c_space_token } + { + \exp_not:N \token_if_eq_meaning_p:NN #1 + \c__text_chardef_space_token + } + { + \exp_not:N \token_if_eq_meaning_p:NN #1 + \c__text_mathchardef_space_token + } + } + { \exp_not:N \__text_expand_space:w \c_space_tl } + { \exp_not:N \__text_expand_N_type_auxi:N #1 } } -\str_const:Nx \c_sys_engine_version_str +\cs_new:Npn \__text_expand_N_type_auxi:N #1 { - \str_case:on \c_sys_engine_str + \bool_lazy_or:nnTF + { \token_if_eq_meaning_p:NN #1 \c__text_chardef_group_begin_token } + { \token_if_eq_meaning_p:NN #1 \c__text_mathchardef_group_begin_token } { - { pdftex } - { - \fp_eval:n { round(\int_use:N \tex_pdftexversion:D / 100 , 2) } - . - \tex_pdftexrevision:D - } - { ptex } - { - \cs_if_exist:NT \tex_ptexversion:D - { - p - \int_use:N \tex_ptexversion:D - . - \int_use:N \tex_ptexminorversion:D - \tex_ptexrevision:D - - - \int_use:N \tex_epTeXversion:D - } - } - { luatex } - { - \fp_eval:n { round(\int_use:N \tex_luatexversion:D / 100, 2) } - . - \tex_luatexrevision:D - } - { uptex } - { - \cs_if_exist:NT \tex_ptexversion:D - { - p - \int_use:N \tex_ptexversion:D - . - \int_use:N \tex_ptexminorversion:D - \tex_ptexrevision:D - - - u - \int_use:N \tex_uptexversion:D - \tex_uptexrevision:D - - - \int_use:N \tex_epTeXversion:D - } - } - { xetex } + \__text_expand_store:o \c_left_brace_str + \__text_expand_loop:w + } + { + \bool_lazy_or:nnTF + { \token_if_eq_meaning_p:NN #1 \c__text_chardef_group_end_token } + { \token_if_eq_meaning_p:NN #1 \c__text_mathchardef_group_end_token } { - \int_use:N \tex_XeTeXversion:D - \tex_XeTeXrevision:D + \__text_expand_store:o \c_right_brace_str + \__text_expand_loop:w } + { \__text_expand_N_type_auxii:N #1 } } } -\cs_new_protected:Npn \ior_shell_open:Nn #1#2 - { - \sys_if_shell:TF - { \exp_args:No \__ior_shell_open:nN { \tl_to_str:n {#2} } #1 } - { \__kernel_msg_error:nn { kernel } { pipe-failed } } - } -\cs_new_protected:Npn \__ior_shell_open:nN #1#2 +\cs_new:Npn \__text_expand_N_type_auxii:N #1 { - \tl_if_in:nnTF {#1} { " } + \token_if_eq_meaning:NNTF #1 \c_group_begin_token { - \__kernel_msg_error:nnx - { kernel } { quote-in-shell } {#1} + { \if_false: } \fi: + \__text_expand_loop:w + } + { + \token_if_eq_meaning:NNTF #1 \c_group_end_token + { + \if_false: { \fi: } + \__text_expand_loop:w + } + { \__text_expand_N_type_auxiii:N #1 } } - { \__kernel_ior_open:Nn #2 { "|#1" } } } -\__kernel_msg_new:nnnn { kernel } { pipe-failed } - { Cannot~run~piped~system~commands. } +\cs_new:Npn \__text_expand_N_type_auxiii:N #1 { - LaTeX~tried~to~call~a~system~process~but~this~was~not~possible.\\ - Try~the~"--shell-escape"~(or~"--enable-pipes")~option. + \exp_after:wN \__text_expand_math_search:NNN + \exp_after:wN #1 \l_text_math_delims_tl + \q_recursion_tail \q_recursion_tail + \q_recursion_stop } -\cs_new:Npn \char_lower_case:N #1 - { \__char_change_case:nNN { lower } \char_value_lccode:n #1 } -\cs_new:Npn \char_upper_case:N #1 - { \__char_change_case:nNN { upper } \char_value_uccode:n #1 } -\cs_new:Npn \char_mixed_case:N #1 +\cs_new:Npn \__text_expand_math_search:NNN #1#2#3 { - \tl_if_exist:cTF { c__char_mixed_case_ \token_to_str:N #1 _tl } + \quark_if_recursion_tail_stop_do:Nn #2 + { \__text_expand_implicit:N #1 } + \token_if_eq_meaning:NNTF #1 #2 { - \__char_change_case_multi:vN - { c__char_mixed_case_ \token_to_str:N #1 _tl } #1 + \use_i_delimit_by_q_recursion_stop:nw + { + \__text_expand_store:n {#1} + \__text_expand_math_loop:Nw #3 + } } - { \char_upper_case:N #1 } + { \__text_expand_math_search:NNN #1 } } -\cs_new:Npn \char_fold_case: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 \__text_expand_math_loop:Nw #1#2 \q_recursion_stop { - \tl_if_exist:cTF { c__char_ #1 _case_ \token_to_str:N #3 _tl } + \tl_if_head_is_N_type:nTF {#2} + { \__text_expand_math_N_type:NN } { - \__char_change_case_multi:vN - { c__char_ #1 _case_ \token_to_str:N #3 _tl } #3 + \tl_if_head_is_group:nTF {#2} + { \__text_expand_math_group:Nn } + { \__text_expand_math_space:Nw } } - { \exp_args:Nf \__char_change_case:nN { #2 { `#3 } } #3 } + #1#2 \q_recursion_stop } -\cs_new:Npn \__char_change_case:nN #1#2 +\cs_new:Npn \__text_expand_math_N_type:NN #1#2 { - \int_compare:nNnTF {#1} = 0 - { #2 } - { \char_generate:nn {#1} { \__char_change_case_catcode:N #2 } } + \quark_if_recursion_tail_stop_do:Nn #2 + { \__text_expand_end:w } + \__text_expand_store:n {#2} + \token_if_eq_meaning:NNTF #2 #1 + { \__text_expand_loop:w } + { \__text_expand_math_loop:Nw #1 } } -\cs_new:Npn \__char_change_case_multi:nN #1#2 - { \__char_change_case_multi:NNNNw #2 #1 \q_no_value \q_no_value \q_stop } -\cs_generate_variant:Nn \__char_change_case_multi:nN { v } -\cs_new:Npn \__char_change_case_multi:NNNNw #1#2#3#4#5 \q_stop +\cs_new:Npn \__text_expand_math_group:Nn #1#2 { - \quark_if_no_value:NTF #4 - { - \quark_if_no_value:NTF #3 - { \__char_change_case:NN #1 #2 } - { \__char_change_case:NNN #1 #2#3 } - } - { \__char_change_case:NNNN #1 #2#3#4 } + \__text_expand_store:n { {#2} } + \__text_expand_math_loop:Nw #1 } -\cs_new:Npn \__char_change_case:NNN #1#2#3 +\exp_after:wN \cs_new:Npn \exp_after:wN \__text_expand_math_space:Nw + \exp_after:wN # \exp_after:wN 1 \c_space_tl { - \exp_args:Nnf \use:nn - { \__char_change_case:NN #1 #2 } - { \__char_change_case:NN #1 #3 } + \__text_expand_store:n { ~ } + \__text_expand_math_loop:Nw #1 } -\cs_new:Npn \__char_change_case:NNNN #1#2#3#4 +\cs_new:Npn \__text_expand_implicit:N #1 { - \exp_args:Nnff \use:nnn - { \__char_change_case:NN #1 #2 } - { \__char_change_case:NN #1 #3 } - { \__char_change_case:NN #1 #4 } + \exp_args:NNe \use:nn \__text_expand_explicit:N + { \__text_token_to_explicit:N #1 } } -\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 +\cs_new:Npn \__text_expand_explicit:N #1 { - \if_catcode:w \exp_not:N #1 \c_math_toggle_token - 3 - \else: - \if_catcode:w \exp_not:N #1 \c_alignment_token - 4 - \else: - \if_catcode:w \exp_not:N #1 \c_math_superscript_token - 7 - \else: - \if_catcode:w \exp_not:N #1 \c_math_subscript_token - 8 - \else: - \if_catcode:w \exp_not:N #1 \c_space_token - 10 - \else: - \if_catcode:w \exp_not:N #1 \c_catcode_letter_token - 11 - \else: - \if_catcode:w \exp_not:N #1 \c_catcode_other_token - 12 - \else: - 13 - \fi: - \fi: - \fi: - \fi: - \fi: - \fi: - \fi: + \token_if_cs:NTF #1 + { \__text_expand_exclude:N #1 } + { + \__text_expand_store:n {#1} + \__text_expand_loop:w + } } -\cs_new:Npn \char_str_lower_case:N #1 - { \__char_str_change_case:nNN { lower } \char_value_lccode:n #1 } -\cs_new:Npn \char_str_upper_case:N #1 - { \__char_str_change_case:nNN { upper } \char_value_uccode:n #1 } -\cs_new:Npn \char_str_mixed_case:N #1 +\cs_new:Npn \__text_expand_exclude:N #1 { - \tl_if_exist:cTF { c__char_mixed_case_ \token_to_str:N #1 _tl } - { \tl_to_str:c { c__char_mixed_case_ \token_to_str:N #1 _tl } } - { \char_str_upper_case:N #1 } + \exp_args:Ne \__text_expand_exclude:nN + { + \exp_not:V \l_text_math_arg_tl + \exp_not:V \l_text_accents_tl + \exp_not:V \l_text_expand_exclude_tl + } + #1 } -\cs_new:Npn \char_str_fold_case:N #1 - { \__char_str_change_case:nNN { fold } \char_value_lccode:n #1 } -\cs_new:Npn \__char_str_change_case:nNN #1#2#3 +\cs_new:Npn \__text_expand_exclude:nN #1#2 { - \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 } + \__text_expand_exclude:NN #2 #1 + \q_recursion_tail \q_recursion_stop } -\cs_new:Npn \__char_str_change_case:nN #1#2 +\cs_new:Npn \__text_expand_exclude:NN #1#2 { - \int_compare:nNnTF {#1} = 0 - { \tl_to_str:n {#2} } - { \char_generate:nn {#1} { 12 } } + \quark_if_recursion_tail_stop_do:Nn #2 + { \__text_expand_letterlike:N #1 } + \cs_if_eq:NNTF #2 #1 + { + \use_i_delimit_by_q_recursion_stop:nw + { \__text_expand_exclude:Nn #1 } + } + { \__text_expand_exclude:NN #1 } } -\cs_if_exist:NF \tex_Uchar:D +\cs_new:Npn \__text_expand_exclude:Nn #1#2 { - \cs_set:Npn \__char_str_change_case:nN #1#2 - { \tl_to_str:n {#2} } + \__text_expand_store:n { #1 {#2} } + \__text_expand_loop:w } -\cs_new:Npn \char_codepoint_to_bytes:n #1 +\cs_new:Npn \__text_expand_letterlike:N #1 { - \exp_args:Nf \__char_codepoint_to_bytes_auxi:n - { \int_eval:n {#1} } + \exp_after:wN \__text_expand_letterlike:NN \exp_after:wN + #1 \l_text_letterlike_tl + \q_recursion_tail \q_recursion_stop } -\cs_new:Npn \__char_codepoint_to_bytes_auxi:n #1 +\cs_new:Npn \__text_expand_letterlike:NN #1#2 { - \if_int_compare:w #1 > "80 \exp_stop_f: - \if_int_compare:w #1 < "800 \exp_stop_f: - \__char_codepoint_to_bytes_outputi:nw - { \__char_codepoint_to_bytes_auxii:Nnn C {#1} { 64 } } - \__char_codepoint_to_bytes_outputii:nw - { \__char_codepoint_to_bytes_auxiii:n {#1} } - \else: - \if_int_compare:w #1 < "10000 \exp_stop_f: - \__char_codepoint_to_bytes_outputi:nw - { \__char_codepoint_to_bytes_auxii:Nnn E {#1} { 64 * 64 } } - \__char_codepoint_to_bytes_outputii:nw - { - \__char_codepoint_to_bytes_auxiii:n - { \int_div_truncate:nn {#1} { 64 } } - } - \__char_codepoint_to_bytes_outputiii:nw - { \__char_codepoint_to_bytes_auxiii:n {#1} } - \else: - \__char_codepoint_to_bytes_outputi:nw - { - \__char_codepoint_to_bytes_auxii:Nnn F - {#1} { 64 * 64 * 64 } - } - \__char_codepoint_to_bytes_outputii:nw - { - \__char_codepoint_to_bytes_auxiii:n - { \int_div_truncate:nn {#1} { 64 * 64 } } - } - \__char_codepoint_to_bytes_outputiii:nw - { - \__char_codepoint_to_bytes_auxiii:n - { \int_div_truncate:nn {#1} { 64 } } - } - \__char_codepoint_to_bytes_outputiv:nw - { \__char_codepoint_to_bytes_auxiii:n {#1} } - \fi: - \fi: - \else: - \__char_codepoint_to_bytes_outputi:nw {#1} - \fi: - \__char_codepoint_to_bytes_end: { } { } { } { } - } -\cs_new:Npn \__char_codepoint_to_bytes_auxii:Nnn #1#2#3 - { "#10 + \int_div_truncate:nn {#2} {#3} } -\cs_new:Npn \__char_codepoint_to_bytes_auxiii:n #1 - { \int_mod:nn {#1} { 64 } + 128 } -\cs_new:Npn \__char_codepoint_to_bytes_outputi:nw - #1 #2 \__char_codepoint_to_bytes_end: #3 - { \__char_codepoint_to_bytes_output:fnn { \int_eval:n {#1} } { } {#2} } -\cs_new:Npn \__char_codepoint_to_bytes_outputii:nw - #1 #2 \__char_codepoint_to_bytes_end: #3#4 - { \__char_codepoint_to_bytes_output:fnn { \int_eval:n {#1} } { {#3} } {#2} } -\cs_new:Npn \__char_codepoint_to_bytes_outputiii:nw - #1 #2 \__char_codepoint_to_bytes_end: #3#4#5 - { - \__char_codepoint_to_bytes_output:fnn - { \int_eval:n {#1} } { {#3} {#4} } {#2} + \quark_if_recursion_tail_stop_do:Nn #2 + { \__text_expand_cs:N #1 } + \cs_if_eq:NNTF #2 #1 + { + \use_i_delimit_by_q_recursion_stop:nw + { + \__text_expand_store:n {#1} + \__text_expand_loop:w + } + } + { \__text_expand_letterlike:NN #1 } } -\cs_new:Npn \__char_codepoint_to_bytes_outputiv:nw - #1 #2 \__char_codepoint_to_bytes_end: #3#4#5#6 +\cs_new:Npn \__text_expand_cs:N #1 { - \__char_codepoint_to_bytes_output:fnn - { \int_eval:n {#1} } { {#3} {#4} {#5} } {#2} + \str_if_eq:nnTF {#1} { \protect } + { \__text_expand_protect:N } + { \__text_expand_cs_expand:N #1 } } -\cs_new:Npn \__char_codepoint_to_bytes_output:nnn #1#2#3 +\cs_new:Npn \__text_expand_protect:N #1 { - #3 - \__char_codepoint_to_bytes_end: #2 {#1} - } -\cs_generate_variant:Nn \__char_codepoint_to_bytes_output:nnn { f } -\cs_new:Npn \__char_codepoint_to_bytes_end: { } -\cs_new:Npn \tl_lower_case:n { \__tl_change_case:nnn { lower } { } } -\cs_new:Npn \tl_upper_case:n { \__tl_change_case:nnn { upper } { } } -\cs_new:Npn \tl_mixed_case:n { \__tl_change_case:nnn { mixed } { } } -\cs_new:Npn \tl_lower_case:nn { \__tl_change_case:nnn { lower } } -\cs_new:Npn \tl_upper_case:nn { \__tl_change_case:nnn { upper } } -\cs_new:Npn \tl_mixed_case:nn { \__tl_change_case:nnn { mixed } } -\cs_new:Npn \__tl_change_case:nnn #1#2#3 + \exp_args:Ne \__text_expand_protect:nN + { \cs_to_str:N #1 } #1 + } +\cs_new:Npn \__text_expand_protect:nN #1#2 + { \__text_expand_protect:Nw #2 #1 \q_nil #1 ~ \q_nil \q_nil \q_stop } +\cs_new:Npn \__text_expand_protect:Nw #1 #2 ~ \q_nil #3 \q_nil #4 \q_stop { - \__kernel_exp_not:w \exp_after:wN + \quark_if_nil:nTF {#4} { - \exp:w - \__tl_change_case_aux:nnn {#1} {#2} {#3} + \cs_if_exist:cTF {#2} + { \exp_args:Ne \__text_expand_store:n { \exp_not:c {#2} } } + { \__text_expand_store:n { \protect #1 } } } + { \__text_expand_store:n { \protect #1 } } + \__text_expand_loop:w } -\cs_new:Npn \__tl_change_case_aux:nnn #1#2#3 +\cs_new:Npn \__text_expand_cs_expand:N #1 { - \group_align_safe_begin: - \__tl_change_case_loop:wnn - #3 \q_recursion_tail \q_recursion_stop {#1} {#2} - \__tl_change_case_result:n { } + \__text_if_expandable:NTF #1 + { \exp_after:wN \__text_expand_loop:w #1 } + { + \__text_expand_store:n {#1} + \__text_expand_loop:w + } } -\cs_new:Npn \__tl_change_case_loop:wnn #1 \q_recursion_stop +%% File: l3text-case.dtx +\cs_new:Npn \text_lowercase:n #1 + { \__text_change_case:nnn { lower } { } {#1} } +\cs_new:Npn \text_uppercase:n #1 + { \__text_change_case:nnn { upper } { } {#1} } +\cs_new:Npn \text_titlecase:n #1 + { \__text_change_case:nnn { title } { } {#1} } +\cs_new:Npn \text_titlecase_first:n #1 + { \__text_change_case:nnn { titleonly } { } {#1} } +\cs_new:Npn \text_lowercase:nn #1#2 + { \__text_change_case:nnn { lower } {#1} {#2} } +\cs_new:Npn \text_uppercase:nn #1#2 + { \__text_change_case:nnn { upper } {#1} {#2} } +\cs_new:Npn \text_titlecase:nn #1#2 + { \__text_change_case:nnn { title } {#1} {#2} } +\cs_new:Npn \text_titlecase_first:nn #1#2 + { \__text_change_case:nnn { titleonly } {#1} {#2} } +\cs_new:Npn \__text_change_case:nnn #1#2#3 { - \tl_if_head_is_N_type:nTF {#1} - { \__tl_change_case_N_type:Nwnn } + \__kernel_exp_not:w \exp_after:wN { - \tl_if_head_is_group:nTF {#1} - { \__tl_change_case_group:nwnn } - { \__tl_change_case_space:wnn } + \exp:w + \exp_args:Ne \__text_change_case_aux:nnn + { \text_expand:n {#3} } + {#1} {#2} } - #1 \q_recursion_stop } -\cs_new:Npn \__tl_change_case_output:nwn #1#2 \__tl_change_case_result:n #3 - { #2 \__tl_change_case_result:n { #3 #1 } } -\cs_generate_variant:Nn \__tl_change_case_output:nwn { V , o , v , f } -\cs_new:Npn \__tl_change_case_end:wn #1 \__tl_change_case_result:n #2 +\cs_new:Npn \__text_change_case_aux:nnn #1#2#3 + { + \group_align_safe_begin: + \__text_change_case_loop:nnw {#2} {#3} #1 + \q_recursion_tail \q_recursion_stop + \__text_change_case_result:n { } + } +\cs_new:Npn \__text_change_case_store:n #1 + { \__text_change_case_store:nw {#1} } +\cs_generate_variant:Nn \__text_change_case_store:n { o , e , V , v } +\cs_new:Npn \__text_change_case_store:nw #1#2 \__text_change_case_result:n #3 + { #2 \__text_change_case_result:n { #3 #1 } } +\cs_new:Npn \__text_change_case_end:w #1 \__text_change_case_result:n #2 { \group_align_safe_end: \exp_end: #2 } -\cs_new:Npn \__tl_change_case_group:nwnn #1#2 \q_recursion_stop #3#4 +\cs_new:Npn \__text_change_case_loop:nnw #1#2#3 \q_recursion_stop + { + \tl_if_head_is_N_type:nTF {#3} + { \__text_change_case_N_type:nnN } + { + \tl_if_head_is_group:nTF {#3} + { \use:c { __text_change_case_group_ #1 :nnn } } + { \__text_change_case_space:nnw } + } + {#1} {#2} #3 \q_recursion_stop + } +\cs_new:Npn \__text_change_case_break:w #1 \q_recursion_tail \q_recursion_stop { - \use:c { __tl_change_case_group_ #3 : nnnn } {#1} {#2} {#3} {#4} + \__text_change_case_store:n {#1} + \__text_change_case_end:w + } +\cs_new:Npn \__text_change_case_group_lower:nnn #1#2#3 + { + \__text_change_case_store:o + { + \exp_after:wN + { + \exp:w + \__text_change_case_aux:nnn {#3} {#1} {#2} + } + } + \__text_change_case_loop:nnw {#1} {#2} } -\cs_new:Npn \__tl_change_case_group_lower:nnnn #1#2#3#4 +\cs_new_eq:NN \__text_change_case_group_upper:nnn + \__text_change_case_group_lower:nnn +\cs_new:Npn \__text_change_case_group_title:nnn #1#2#3 { - \__tl_change_case_output:own + \__text_change_case_store:o { \exp_after:wN { \exp:w - \__tl_change_case_aux:nnn {#3} {#4} {#1} + \__text_change_case_aux:nnn {#3} {#1} {#2} } } - \__tl_change_case_loop:wnn #2 \q_recursion_stop {#3} {#4} + \__text_change_case_loop:nnw { lower } {#2} } -\cs_new_eq:NN \__tl_change_case_group_upper:nnnn - \__tl_change_case_group_lower:nnnn -\cs_new:Npn \__tl_change_case_group_mixed:nnnn #1#2#3#4 +\cs_new:Npn \__text_change_case_group_titleonly:nnn #1#2#3 { - \__tl_change_case_output:own + \__text_change_case_store:o { \exp_after:wN { \exp:w - \__tl_change_case_aux:nnn {#3} {#4} {#1} + \__text_change_case_aux:nnn {#3} {#1} {#2} } } - \__tl_change_case_loop:wnn #2 \q_recursion_stop { lower } {#4} + \__text_change_case_break:w } -\exp_last_unbraced:NNo \cs_new:Npn \__tl_change_case_space:wnn \c_space_tl +\use:x { - \__tl_change_case_output:nwn { ~ } - \__tl_change_case_loop:wnn + \cs_new:Npn \exp_not:N \__text_change_case_space:nnw ##1##2 \c_space_tl } -\cs_new:Npn \__tl_change_case_N_type:Nwnn #1#2 \q_recursion_stop { - \quark_if_recursion_tail_stop_do:Nn #1 - { \__tl_change_case_end:wn } - \exp_after:wN \__tl_change_case_N_type:NNNnnn - \exp_after:wN #1 \l_tl_case_change_math_tl - \q_recursion_tail ? \q_recursion_stop {#2} + \__text_change_case_store:n { ~ } + \__text_change_case_loop:nnw {#1} {#2} } -\cs_new:Npn \__tl_change_case_N_type:NNNnnn #1#2#3 +\cs_new:Npn \__text_change_case_N_type:nnN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #2 - { \__tl_change_case_N_type:Nnnn #1 } - \token_if_eq_meaning:NNTF #1 #2 + \quark_if_recursion_tail_stop_do:Nn #3 + { \__text_change_case_end:w } + \__text_change_case_N_type_aux:nnN {#1} {#2} #3 + } +\cs_new:Npn \__text_change_case_N_type_aux:nnN #1#2#3 + { + \exp_args:NV \__text_change_case_N_type:nnnN + \l_text_math_delims_tl {#1} {#2} #3 + } +\cs_new:Npn \__text_change_case_N_type:nnnN #1#2#3#4 + { + \__text_change_case_math_search:nnNNN {#2} {#3} #4 #1 + \q_recursion_tail \q_recursion_tail + \q_recursion_stop + } +\cs_new:Npn \__text_change_case_math_search:nnNNN #1#2#3#4#5 + { + \quark_if_recursion_tail_stop_do:Nn #4 + { \__text_change_case_cs_check:nnN {#1} {#2} #3 } + \token_if_eq_meaning:NNTF #3 #4 { \use_i_delimit_by_q_recursion_stop:nw { - \__tl_change_case_math:NNNnnn - #1 #3 \__tl_change_case_loop:wnn + \__text_change_case_store:n {#3} + \__text_change_case_math_loop:nnNw {#1} {#2} #5 } } - { \__tl_change_case_N_type:NNNnnn #1 } - } -\cs_new:Npn \__tl_change_case_math:NNNnnn #1#2#3#4 - { - \__tl_change_case_output:nwn {#1} - \__tl_change_case_math_loop:wNNnn #4 \q_recursion_stop #2 #3 + { \__text_change_case_math_search:nnNNN {#1} {#2} #3 } } -\cs_new:Npn \__tl_change_case_math_loop:wNNnn #1 \q_recursion_stop +\cs_new:Npn \__text_change_case_math_loop:nnNw #1#2#3#4 \q_recursion_stop { - \tl_if_head_is_N_type:nTF {#1} - { \__tl_change_case_math:NwNNnn } + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_math_N_type:nnNN } { - \tl_if_head_is_group:nTF {#1} - { \__tl_change_case_math_group:nwNNnn } - { \__tl_change_case_math_space:wNNnn } + \tl_if_head_is_group:nTF {#4} + { \__text_change_case_math_group:nnNn } + { \__text_change_case_math_space:nnNw } } - #1 \q_recursion_stop + {#1} {#2} #3 #4 \q_recursion_stop } -\cs_new:Npn \__tl_change_case_math:NwNNnn #1#2 \q_recursion_stop #3#4 +\cs_new:Npn \__text_change_case_math_N_type:nnNN #1#2#3#4 { - \token_if_eq_meaning:NNTF \q_recursion_tail #1 - { \__tl_change_case_end:wn } - { - \__tl_change_case_output:nwn {#1} - \token_if_eq_meaning:NNTF #1 #3 - { #4 #2 \q_recursion_stop } - { \__tl_change_case_math_loop:wNNnn #2 \q_recursion_stop #3#4 } - } + \quark_if_recursion_tail_stop_do:Nn #4 + { \__text_change_case_end:w } + \__text_change_case_store:n {#4} + \token_if_eq_meaning:NNTF #4 #3 + { \__text_change_case_loop:nnw {#1} {#2} } + { \__text_change_case_math_loop:nnNw {#1} {#2} #3 } } -\cs_new:Npn \__tl_change_case_math_group:nwNNnn #1#2 \q_recursion_stop +\cs_new:Npn \__text_change_case_math_group:nnNn #1#2#3#4 { - \__tl_change_case_output:nwn { {#1} } - \__tl_change_case_math_loop:wNNnn #2 \q_recursion_stop + \__text_change_case_store:n { {#4} } + \__text_change_case_math_loop:nnNw {#1} {#2} #3 } -\exp_last_unbraced:NNo - \cs_new:Npn \__tl_change_case_math_space:wNNnn \c_space_tl +\use:x { - \__tl_change_case_output:nwn { ~ } - \__tl_change_case_math_loop:wNNnn + \cs_new:Npn \exp_not:N \__text_change_case_math_space:nnNw ##1##2##3 + \c_space_tl } -\cs_new:Npn \__tl_change_case_N_type:Nnnn #1#2#3#4 { - \token_if_cs:NTF #1 - { \__tl_change_case_cs_letterlike:Nn #1 {#3} } - { \use:c { __tl_change_case_char_ #3 :Nnn } #1 {#3} {#4} } - \__tl_change_case_loop:wnn #2 \q_recursion_stop {#3} {#4} + \__text_change_case_store:n { ~ } + \__text_change_case_math_loop:nnNw {#1} {#2} #3 } -\cs_new:Npn \__tl_change_case_char_lower:Nnn #1#2#3 +\cs_new:Npn \__text_change_case_cs_check:nnN #1#2#3 { - \cs_if_exist_use:cF { __tl_change_case_ #2 _ #3 :Nnw } - { \use_ii:nn } - #1 - { - \use:c { __tl_change_case_ #2 _ sigma:Nnw } #1 - { \__tl_change_case_char:nN {#2} #1 } - } + \token_if_cs:NTF #3 + { \__text_change_case_exclude:nnN } + { \use:c { __text_change_case_char_ #1 :nnN } } + {#1} {#2} #3 } -\cs_new_eq:NN \__tl_change_case_char_upper:Nnn - \__tl_change_case_char_lower:Nnn -\cs_new:Npn \__tl_change_case_char_mixed:Nnn #1#2#3 +\cs_new:Npn \__text_change_case_exclude:nnN #1#2#3 { - \__tl_change_case_mixed_switch:w - \cs_if_exist_use:cF { __tl_change_case_mixed_ #3 :Nnw } + \exp_args:Ne \__text_change_case_exclude:nnnN { - \cs_if_exist_use:cF { __tl_change_case_upper_ #3 :Nnw } - { \use_ii:nn } + \exp_not:V \l_text_math_arg_tl + \exp_not:V \l_text_case_exclude_arg_tl } - #1 - { \__tl_change_case_mixed_skip:N #1 } + {#1} {#2} #3 } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \__text_change_case_exclude:nnnN #1#2#3#4 + { + \__text_change_case_exclude:nnNN {#2} {#3} #4 #1 + \q_recursion_tail \q_recursion_stop + } +\cs_new:Npn \__text_change_case_exclude:nnNN #1#2#3#4 { - \cs_new:Npn \__tl_change_case_char:nN #1#2 + \quark_if_recursion_tail_stop_do:Nn #4 + { \use:c { __text_change_case_letterlike_ #1 :nnN } {#1} {#2} #3 } + \cs_if_eq:NNTF #3 #4 { - \__tl_change_case_output:fwn - { \use:c { char_ #1 _case:N } #2 } + \use_i_delimit_by_q_recursion_stop:nw + { \__text_change_case_exclude:nnNn {#1} {#2} #3 } } + { \__text_change_case_exclude:nnNN {#1} {#2} #3 } } +\cs_new:Npn \__text_change_case_exclude:nnNn #1#2#3#4 { - \cs_new:Npn \__tl_change_case_char:nN #1#2 - { - \int_compare:nNnTF { `#2 } > { "80 } - { - \int_compare:nNnTF { `#2 } < { "E0 } - { \__tl_change_case_char_UTFviii:nNNN {#1} #2 } - { - \int_compare:nNnTF { `#2 } < { "F0 } - { \__tl_change_case_char_UTFviii:nNNNN {#1} #2 } - { \__tl_change_case_char_UTFviii:nNNNNN {#1} #2 } - } - } - { - \__tl_change_case_output:fwn - { \use:c { char_ #1 _case:N } #2 } - } - } + \__text_change_case_store:n { #3 {#4} } + \__text_change_case_loop:nnw {#1} {#2} } -\bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npn \__text_change_case_letterlike_lower:nnN #1#2#3 + { \__text_change_case_letterlike:nnnnN {#1} {#1} {#1} {#2} #3 } +\cs_new_eq:NN \__text_change_case_letterlike_upper:nnN + \__text_change_case_letterlike_lower:nnN +\cs_new:Npn \__text_change_case_letterlike_title:nnN #1#2#3 + { \__text_change_case_letterlike:nnnnN { upper } { lower } {#1} {#2} #3 } +\cs_new:Npn \__text_change_case_letterlike_titleonly:nnN #1#2#3 + { \__text_change_case_letterlike:nnnnN { upper } { end } {#1} {#2} #3 } +\cs_new:Npn \__text_change_case_letterlike:nnnnN #1#2#3#4#5 { - \cs_new:Npn \__tl_change_case_char_UTFviii:nNNN #1#2#3#4 - { \__tl_change_case_char_UTFviii:nnN {#1} {#2#4} #3 } - \cs_new:Npn \__tl_change_case_char_UTFviii:nNNNN #1#2#3#4#5 - { \__tl_change_case_char_UTFviii:nnN {#1} {#2#4#5} #3 } - \cs_new:Npn \__tl_change_case_char_UTFviii:nNNNNN #1#2#3#4#5#6 - { \__tl_change_case_char_UTFviii:nnN {#1} {#2#4#5#6} #3 } - \cs_new:Npn \__tl_change_case_char_UTFviii:nnN #1#2#3 + \cs_if_exist:cTF { c__text_ #1 case_ \token_to_str:N #5 _tl } { - \cs_if_exist:cTF { c__tl_ #1 _case_ \tl_to_str:n {#2} _tl } + \__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} + } + { + \__text_change_case_store:n {#5} + \cs_if_exist:cTF { - \__tl_change_case_output:vwn - { c__tl_ #1 _case_ \tl_to_str:n {#2} _tl } + c__text_ + \str_if_eq:nnTF {#1} { lower } { upper } { lower } + case_ \token_to_str:N #5 _tl } - { \__tl_change_case_output:nwn {#2} } - #3 + { \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#4} } + { \__text_change_case_loop:nnw {#3} {#4} } } } -\cs_new:Npn \__tl_change_case_cs_letterlike:Nn #1#2 +\cs_new:Npx \__text_change_case_char_lower:nnN #1#2#3 { - \str_if_eq:nnTF {#2} { mixed } + \exp_not:N \cs_if_exist_use:cF { __text_change_case_lower_ #2 :nnnN } { - \__tl_change_case_cs_letterlike:NnN #1 { upper } - \__tl_change_case_mixed_switch:w - } - { \__tl_change_case_cs_letterlike:NnN #1 {#2} \prg_do_nothing: } + \bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { \exp_not:N \__text_change_case_lower_sigma:nnnN } + { \exp_not:N \__text_change_case_char:nnnN } + } + {#1} {#1} {#2} #3 } -\cs_new:Npn \__tl_change_case_cs_letterlike:NnN #1#2#3 +\cs_new:Npn \__text_change_case_char_upper:nnN #1#2#3 { - \cs_if_exist:cTF { c__tl_change_case_ #2 _ \token_to_str:N #1 _tl } + \cs_if_exist_use:cF { __text_change_case_upper_ #2 :nnnN } + { \__text_change_case_char:nnnN } + {#1} {#1} {#2} #3 + } +\bool_lazy_or:nnT + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_new:Npn \__text_change_case_lower_sigma:nnnN #1#2#3#4 { - \__tl_change_case_output:vwn - { c__tl_change_case_ #2 _ \token_to_str:N #1 _tl } - #3 + \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_recursion_stop { - \cs_if_exist:cTF + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_lower_sigma:NnnN #3 } { - c__tl_change_case_ - \str_if_eq:nnTF {#2} { lower } { upper } { lower } - _ \token_to_str:N #1 _tl - } - { - \__tl_change_case_output:nwn {#1} - #3 + \__text_change_case_store:e + { \char_generate:nn { "03C2 } { \__text_char_catcode:N #3 } } + \__text_change_case_loop:nnw } + {#1} {#2} #4 \q_recursion_stop + } + \cs_new:Npn \__text_change_case_lower_sigma:NnnN #1#2#3#4 + { + \__text_change_case_store:e { - \exp_after:wN \__tl_change_case_cs_accents:NN - \exp_after:wN #1 \l_tl_case_change_accents_tl - \q_recursion_tail \q_recursion_stop + \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 } } -\cs_new:Npn \__tl_change_case_cs_accents:NN #1#2 +\cs_new:Npx \__text_change_case_char_title:nnN #1#2#3 { - \quark_if_recursion_tail_stop_do:Nn #2 - { \__tl_change_case_cs:N #1 } - \str_if_eq:nnTF {#1} {#2} + \bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { \exp_not:N \token_if_letter:NTF #3 } { - \use_i_delimit_by_q_recursion_stop:nw - { \__tl_change_case_output:nwn {#1} } + \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 } } - { \__tl_change_case_cs_accents:NN #1 } + { \exp_not:N \use:c { __text_change_case_char_ #1 :nN } } + { \exp_not:N \__text_change_case_char_title:nnnN { title } {#1} } + {#2} #3 } -\cs_new:Npn \__tl_change_case_cs:N #1 +\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 { - \str_if_eq:nnTF {#1} { \protect } { \__tl_change_case_protect:wNN } - \exp_after:wN \__tl_change_case_cs:NN - \exp_after:wN #1 \l_tl_case_change_exclude_tl - \q_recursion_tail \q_recursion_stop - } -\cs_new:Npn \__tl_change_case_cs:NN #1#2 - { - \quark_if_recursion_tail_stop_do:Nn #2 + \cs_if_exist_use:cF { __text_change_case_title_ #3 :nnnN } { - \__tl_change_case_cs_expand:Nnw #1 - { \__tl_change_case_output:nwn {#1} } + \cs_if_exist_use:cF { __text_change_case_upper_ #3 :nnnN } + { \__text_change_case_char:nnnN } } - \str_if_eq:nnTF {#1} {#2} + {#1} {#2} {#3} #4 + } +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_new:Npn \__text_change_case_char:nnnN #1#2#3#4 { - \use_i_delimit_by_q_recursion_stop:nw - { \__tl_change_case_cs:NNn #1 } + \__text_change_case_store:e + { \use:c { char_ #1 case :N } #4 } + \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#3} } - { \__tl_change_case_cs:NN #1 } } -\cs_new:Npn \__tl_change_case_cs:NNn #1#2#3 { - \__tl_change_case_output:nwn { #1 {#3} } - #2 - } -\cs_new:Npn \__tl_change_case_protect:wNN #1 \q_recursion_stop #2 #3 - { \__tl_change_case_output:nwn { \protect #3 } #2 } -\cs_new:Npn \__tl_change_case_if_expandable:NTF #1 + \cs_new: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 } + { + \int_compare:nNnTF { `#4 } < { "F0 } + { \__text_change_case_char_UTFviii:nnnNNN } + { \__text_change_case_char_UTFviii:nnnNNNN } + } + {#1} {#2} {#3} #4 + } + { + \__text_change_case_store:e{ \use:c { char_ #1 case :N } #4 } + \use:c { __text_change_case_char_next_ #2 :nn } {#2} {#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:nnnNNNNN #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 + { + \cs_if_exist:cTF { c__text_ #1 case_ \tl_to_str:n {#4} _tl } + { + \__text_change_case_store:v + { c__text_ #1 case_ \tl_to_str:n {#4} _tl } + } + { \__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 + { \__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 + { \__text_change_case_break:w } +\bool_lazy_or:nnT + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \token_if_expandable:NTF #1 + \cs_new:cpn { __text_change_case_upper_de-alt:nnnN } #1#2#3#4 { - \bool_lazy_any:nTF + \int_compare:nNnTF { `#4 } = { "00DF } { - { \token_if_eq_meaning_p:NN \q_recursion_tail #1 } - { \token_if_protected_macro_p:N #1 } - { \token_if_protected_long_macro_p:N #1 } + \__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} } - { \use_ii:nn } - { \use_i:nn } + { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } } - { \use_ii:nn } } -\cs_new:Npn \__tl_change_case_cs_expand:Nnw #1#2 - { - \__tl_change_case_if_expandable:NTF #1 - { \__tl_change_case_cs_expand:NN #1 } - { #2 } - } -\cs_new:Npn \__tl_change_case_cs_expand:NN #1#2 - { \exp_after:wN #2 #1 } -\cs_new:Npn \__tl_change_case_mixed_skip:N #1 - { - \exp_after:wN \__tl_change_case_mixed_skip:NN - \exp_after:wN #1 \l_tl_mixed_case_ignore_tl - \q_recursion_tail \q_recursion_stop - } -\cs_new:Npn \__tl_change_case_mixed_skip:NN #1#2 +\bool_lazy_or:nnT + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \quark_if_recursion_tail_stop_do:nn {#2} - { \__tl_change_case_char:nN { mixed } #1 } - \int_compare:nNnT { `#1 } = { `#2 } + \cs_new:Npn \__text_change_case_upper_el:nnnN #1#2#3#4 { - \use_i_delimit_by_q_recursion_stop:nw + \__text_change_case_if_greek:nTF { `#4 } { - \__tl_change_case_output:nwn {#1} - \__tl_change_case_mixed_skip_tidy:Nwn + \exp_args:Ne \__text_change_case_upper_el:nnnn + { \char_to_nfd:N #4 } {#1} {#2} {#3} } + { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } } - \__tl_change_case_mixed_skip:NN #1 - } -\cs_new:Npn \__tl_change_case_mixed_skip_tidy:Nwn #1#2 \q_recursion_stop #3 - { - \__tl_change_case_loop:wnn #2 \q_recursion_stop { mixed } - } -\cs_new:Npn \__tl_change_case_mixed_switch:w - #1 \__tl_change_case_loop:wnn #2 \q_recursion_stop #3 - { - #1 - \__tl_change_case_loop:wnn #2 \q_recursion_stop { lower } - } -\cs_new:Npn \__tl_change_case_lower_sigma:Nnw #1#2#3#4 \q_recursion_stop - { - \int_compare:nNnTF { `#1 } = { "03A3 } + \cs_new:Npn \__text_change_case_upper_el:nnnn #1#2#3#4 + { \__text_change_case_upper_el_aux:nnnN {#2} {#3} {#4} #1 } + \cs_new:Npn \__text_change_case_upper_el_aux:nnnN #1#2#3#4 { - \__tl_change_case_output:fwn - { \__tl_change_case_lower_sigma:w #4 \q_recursion_stop } + \__text_change_case_store:e { \use:c { char_ #1 case:N } #4 } + \__text_change_case_upper_el_loop:nnw {#2} {#3} } - {#2} - #3 #4 \q_recursion_stop - } -\cs_new:Npn \__tl_change_case_lower_sigma:w #1 \q_recursion_stop - { - \tl_if_head_is_N_type:nTF {#1} - { \__tl_change_case_lower_sigma:Nw #1 \q_recursion_stop } - { \c__tl_final_sigma_tl } - } -\cs_new:Npn \__tl_change_case_lower_sigma:Nw #1#2 \q_recursion_stop - { - \__tl_change_case_if_expandable:NTF #1 + \cs_new:Npn \__text_change_case_upper_el_loop:nnw + #1#2#3 \q_recursion_stop { - \exp_after:wN \__tl_change_case_lower_sigma:w #1 - #2 \q_recursion_stop + \tl_if_head_is_N_type:nTF {#3} + { \__text_change_case_upper_el:nnN } + { \__text_change_case_loop:nnw } + {#1} {#2} #3 \q_recursion_stop } + \cs_new:Npn \__text_change_case_upper_el:nnN #1#2#3 { - \token_if_letter:NTF #1 - { \c__tl_std_sigma_tl } - { \c__tl_final_sigma_tl } + \token_if_cs:NTF #3 + { \__text_change_case_loop:nnw {#1} {#2} #3 } + { + \int_compare:nNnTF { `#3 } = { "0308 } + { + \__text_change_case_store:n {#3} + \__text_change_case_upper_el_loop:nnw {#1} {#2} + } + { + \bool_lazy_any:nTF + { + { \int_compare_p:nNn { `#3 } = { "0300 } } + { \int_compare_p:nNn { `#3 } = { "0301 } } + { \int_compare_p:nNn { `#3 } = { "0304 } } + { \int_compare_p:nNn { `#3 } = { "0306 } } + { \int_compare_p:nNn { `#3 } = { "0308 } } + { \int_compare_p:nNn { `#3 } = { "0313 } } + { \int_compare_p:nNn { `#3 } = { "0314 } } + { \int_compare_p:nNn { `#3 } = { "0342 } } + { \int_compare_p:nNn { `#3 } = { "0340 } } + { \int_compare_p:nNn { `#3 } = { "0341 } } + { \int_compare_p:nNn { `#3 } = { "0343 } } + } + { \__text_change_case_upper_el_loop:nnw {#1} {#2} } + { + \int_compare:nNnTF { `#3 } = { "0344 } + { + \__text_change_case_store:e + { + \char_generate:nn { "0308 } + { \__text_char_catcode:N #3 } + } + \__text_change_case_upper_el_loop:nnw {#1} {#2} + } + { + \int_compare:nNnTF { `#3 } = { "0345 } + { \__text_change_case_loop:nnw {#1} {#2} } + { \__text_change_case_loop:nnw {#1} {#2} #3 } + } + } + } + } + } + \prg_new_conditional:Npnn \__text_change_case_if_greek:n #1 { TF } + { + \if_int_compare:w #1 < "0370 \exp_stop_f: + \prg_return_false: + \else: + \if_int_compare:w #1 > "03FF \exp_stop_f: + \if_int_compare:w #1 < "1F00 \exp_stop_f: + \prg_return_false: + \else: + \if_int_compare:w #1 > "1FFF \exp_stop_f: + \prg_return_false: + \else: + \prg_return_true: + \fi: + \fi: + \else: + \prg_return_true: + \fi: + \fi: } } -\cs_new_eq:NN \__tl_change_case_upper_sigma:Nnw \use_ii:nn -\bool_lazy_or:nnTF +\bool_lazy_or:nnT { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { - \cs_new:Npn \__tl_change_case_lower_tr:Nnw #1#2 - { - \int_compare:nNnTF { `#1 } = { "0049 } - { \__tl_change_case_lower_tr_auxi:Nw } + \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_lower_lt:nnnN #1#2#3#4 + { + \exp_args:Ne \__text_change_case_lower_lt_auxi:nnnN { - \int_compare:nNnTF { `#1 } = { "0130 } - { \__tl_change_case_output:nwn { i } } - {#2} + \int_case:nn { `#4 } + { + { "00CC } { "0300 } + { "00CD } { "0301 } + { "0128 } { "0303 } + } } + {#2} {#3} #4 } - \cs_new:Npn \__tl_change_case_lower_tr_auxi:Nw #1#2 \q_recursion_stop - { - \tl_if_head_is_N_type:nTF {#2} - { \__tl_change_case_lower_tr_auxii:Nw #2 \q_recursion_stop } - { \__tl_change_case_output:Vwn \c__tl_dotless_i_tl } - #1 #2 \q_recursion_stop - } - \cs_new:Npn \__tl_change_case_lower_tr_auxii:Nw #1#2 \q_recursion_stop + \cs_new:Npn \__text_change_case_lower_lt_auxi:nnnN #1#2#3#4 { - \__tl_change_case_if_expandable:NTF #1 + \tl_if_blank:nTF {#1} { - \exp_after:wN \__tl_change_case_lower_tr_auxi:Nw #1 - #2 \q_recursion_stop + \exp_args:Ne \__text_change_case_lower_lt_auxii:nnnN + { + \int_case:nn { `#4 } + { + { "0049 } { "0069 } + { "004A } { "006A } + { "012E } { "012F } + } + } + {#2} {#3} #4 } { - \bool_lazy_or:nnTF - { \token_if_cs_p:N #1 } - { ! \int_compare_p:nNn { `#1 } = { "0307 } } - { \__tl_change_case_output:Vwn \c__tl_dotless_i_tl } + \__text_change_case_store:e { - \__tl_change_case_output:nwn { i } - \use_i:nn + \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} } } - } - { - \cs_new:Npn \__tl_change_case_lower_tr:Nnw #1#2 + \cs_new:Npn \__text_change_case_lower_lt_auxii:nnnN #1#2#3#4 { - \int_compare:nNnTF { `#1 } = { "0049 } - { \__tl_change_case_output:Vwn \c__tl_dotless_i_tl } + \tl_if_blank:nTF {#1} + { \__text_change_case_lower_sigma:nnnN {#2} {#2} {#3} #4 } { - \int_compare:nNnTF { `#1 } = { 196 } - { \__tl_change_case_lower_tr_auxi:Nw #1 {#2} } - {#2} + \__text_change_case_store:e + { \char_generate:nn {#1} { \__text_char_catcode:N #4 } } + \__text_change_case_lower_lt:nnw {#2} {#3} } } - \cs_new:Npn \__tl_change_case_lower_tr_auxi:Nw #1#2#3#4 + \cs_new:Npn \__text_change_case_lower_lt:nnw #1#2#3 \q_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_recursion_stop + } + \cs_new:Npn \__text_change_case_lower_lt:nnN #1#2#3 { - \int_compare:nNnTF { `#4 } = { 176 } + \bool_lazy_and:nnT + { ! \token_if_cs_p:N #3 } { - \__tl_change_case_output:nwn { i } - #3 + \bool_lazy_any_p:n + { + { \int_compare_p:nNn { `#3 } = { "0300 } } + { \int_compare_p:nNn { `#3 } = { "0301 } } + { \int_compare_p:nNn { `#3 } = { "0303 } } + } } { - #2 - #3 #4 + \__text_change_case_store:e + { \char_generate:nn { "0307 } { \__text_char_catcode:N #3 } } } + \__text_change_case_loop:nnw {#1} {#2} #3 } } -\cs_new:Npn \__tl_change_case_upper_tr:Nnw #1#2 - { - \int_compare:nNnTF { `#1 } = { "0069 } - { \__tl_change_case_output:Vwn \c__tl_dotted_I_tl } - {#2} - } -\cs_new_eq:NN \__tl_change_case_lower_az:Nnw \__tl_change_case_lower_tr:Nnw -\cs_new_eq:NN \__tl_change_case_upper_az:Nnw \__tl_change_case_upper_tr:Nnw -\cs_new:Npn \__tl_change_case_lower_lt:Nnw #1 - { - \exp_args:Nf \__tl_change_case_lower_lt:nNnw - { \str_case:nVF #1 \c__tl_accents_lt_tl \exp_stop_f: } - #1 - } -\cs_new:Npn \__tl_change_case_lower_lt:nNnw #1#2 +\bool_lazy_or:nnT + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \tl_if_blank:nTF {#1} - { - \exp_args:Nf \__tl_change_case_lower_lt:nnw + \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:nnF {`#2} + \int_case:nn { `#4 } { - { "0049 } i - { "004A } j - { "012E } \c__tl_i_ogonek_tl + { "0069 } { "0049 } + { "006A } { "004A } + { "012F } { "012E } } - \exp_stop_f: } + {#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_recursion_stop + { + \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_recursion_stop } + \cs_new:Npn \__text_change_case_upper_lt:nnN #1#2#3 { - \__tl_change_case_output:nwn {#1} - \use_none:n + \bool_lazy_and:nnTF + { ! \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 } } } -\cs_new:Npn \__tl_change_case_lower_lt:nnw #1#2 +\cs_new:Npn \__text_change_case_title_nl:nnnN #1#2#3#4 { - \tl_if_blank:nTF {#1} - {#2} + \bool_lazy_or:nnTF + { \int_compare_p:nNn { `#4 } = { "0049 } } + { \int_compare_p:nNn { `#4 } = { "0069 } } { - \__tl_change_case_output:nwn {#1} - \__tl_change_case_lower_lt:Nw + \__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 } } -\cs_new:Npn \__tl_change_case_lower_lt:Nw #1#2 \q_recursion_stop +\cs_new:Npn \__text_change_case_title_nl:nnw #1#2#3 \q_recursion_stop { - \tl_if_head_is_N_type:nT {#2} - { \__tl_change_case_lower_lt:NNw } - #1 #2 \q_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 } } + {#1} {#2} #3 \q_recursion_stop } -\cs_new:Npn \__tl_change_case_lower_lt:NNw #1#2#3 \q_recursion_stop +\cs_new:Npn \__text_change_case_title_nl:nnN #1#2#3 { - \__tl_change_case_if_expandable:NTF #2 + \bool_lazy_and:nnTF + { ! \token_if_cs_p:N #3 } { - \exp_after:wN \__tl_change_case_lower_lt:Nw \exp_after:wN #1 #2 - #3 \q_recursion_stop + \bool_lazy_or_p:nn + { \int_compare_p:nNn { `#3 } = { "004A } } + { \int_compare_p:nNn { `#3 } = { "006A } } } { - \bool_lazy_and:nnT - { ! \token_if_cs_p:N #2 } + \__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_char_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 + { + \int_compare:nNnTF { `#4 } = { "0049 } + { \__text_change_case_lower_tr:nnNw {#1} {#3} #4 } { - \bool_lazy_any_p:n + \int_compare:nNnTF { `#4 } = { "0130 } { - { \int_compare_p:nNn { `#2 } = { "0300 } } - { \int_compare_p:nNn { `#2 } = { "0301 } } - { \int_compare_p:nNn { `#2 } = { "0303 } } + \__text_change_case_store:e + { \char_generate:nn { "0069 } { \__text_char_catcode:N #4 } } + \__text_change_case_loop:nnw {#1} {#3} } + { \__text_change_case_lower_sigma:nnnN {#1} {#2} {#3} #4 } } - { \__tl_change_case_output:Vwn \c__tl_dot_above_tl } - #1 #2#3 \q_recursion_stop } - } -\cs_new:Npn \__tl_change_case_upper_lt:Nnw #1 - { - \exp_args:Nf \__tl_change_case_upper_lt:nnw + \cs_new:Npn \__text_change_case_lower_tr:nnNw #1#2#3#4 \q_recursion_stop { - \int_case:nnF {`#1} + \tl_if_head_is_N_type:nTF {#4} + { \__text_change_case_lower_tr:nnN } { - { "0069 } I - { "006A } J - { "012F } \c__tl_I_ogonek_tl + \__text_change_case_store:e + { \char_generate:nn { "0131 } { \__text_char_catcode:N #3 } } + \__text_change_case_loop:nnw } - \exp_stop_f: + {#1} {#2} #4 \q_recursion_stop } - } -\cs_new:Npn \__tl_change_case_upper_lt:nnw #1#2 - { - \tl_if_blank:nTF {#1} - {#2} + \cs_new:Npn \__text_change_case_lower_tr:nnN #1#2#3 { - \__tl_change_case_output:nwn {#1} - \__tl_change_case_upper_lt:Nw + \bool_lazy_or:nnTF + { \token_if_cs_p:N #3 } + { ! \int_compare_p:nNn { `#3 } = { "0307 } } + { + \__text_change_case_store:e + { \char_generate:nn { "0131 } { \__text_char_catcode:N #3 } } + \__text_change_case_loop:nnw {#1} {#2} #3 + } + { + \__text_change_case_store:e + { \char_generate:nn { "0069 } { \__text_char_catcode:N #3 } } + \__text_change_case_loop:nnw {#1} {#2} + } } } -\cs_new:Npn \__tl_change_case_upper_lt:Nw #1#2 \q_recursion_stop - { - \tl_if_head_is_N_type:nT {#2} - { \__tl_change_case_upper_lt:NNw } - #1 #2 \q_recursion_stop - } -\cs_new:Npn \__tl_change_case_upper_lt:NNw #1#2#3 \q_recursion_stop { - \__tl_change_case_if_expandable:NTF #2 + \cs_new:Npn \__text_change_case_lower_tr:nnnN #1#2#3#4 { - \exp_after:wN \__tl_change_case_upper_lt:Nw \exp_after:wN #1 #2 - #3 \q_recursion_stop + \int_compare:nNnTF { `#4 } = { "0049 } + { + \__text_change_case_store:V \c__text_dotless_i_tl + \__text_change_case_loop:nnw {#1} {#3} + } + { + \int_compare:nNnTF { `#4 } = { "00C4 } + { \__text_change_case_lower_tr:nnnNN {#1} {#2} {#3} #4 } + { \__text_change_case_char:nnnN {#1} {#2} {#3} #4 } + } } + \cs_new:Npn \__text_change_case_lower_tr:nnnNN #1#2#3#4#5 { - \bool_lazy_and:nnTF - { ! \token_if_cs_p:N #2 } - { \int_compare_p:nNn { `#2 } = { "0307 } } - { #1 } - { #1 #2 } - #3 \q_recursion_stop + \int_compare:nNnTF { `#5 } = { "00B0 } + { + \__text_change_case_store:e + { + \char_generate:nn { "0069 } + { \char_value_catcode:n { "0069 } } + } + \__text_change_case_loop:nnw {#1} {#3} + } + { \__text_change_case_char:nnnN {#1} {#2} {#3} #4#5 } } } -\cs_new:cpn { __tl_change_case_upper_de-alt:Nnw } #1#2 - { - \int_compare:nNnTF { `#1 } = { 223 } - { \__tl_change_case_output:Vwn \c__tl_upper_Eszett_tl } - {#2} - } -\bool_lazy_or:nnTF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } +\cs_new:Npx \__text_change_case_upper_tr:nnnN #1#2#3#4 { - \group_begin: - \cs_set:Npn \__tl_tmp:n #1 - { - \exp_after:wN \exp_after:wN \exp_after:wN \exp_not:N - \char_generate:nn {#1} { \char_value_catcode:n {#1} } - } - \tl_const:Nx \c__tl_std_sigma_tl { \__tl_tmp:n { "03C3 } } - \tl_const:Nx \c__tl_final_sigma_tl { \__tl_tmp:n { "03C2 } } - \tl_const:Nx \c__tl_accents_lt_tl - { - \__tl_tmp:n { "00CC } - { - \__tl_tmp:n { "0069 } - \__tl_tmp:n { "0307 } - \__tl_tmp:n { "0300 } - } - \__tl_tmp:n { "00CD } - { - \__tl_tmp:n { "0069 } - \__tl_tmp:n { "0307 } - \__tl_tmp:n { "0301 } - } - \__tl_tmp:n { "0128 } - { - \__tl_tmp:n { "0069 } - \__tl_tmp:n { "0307 } - \__tl_tmp:n { "0303 } - } - } - \tl_const:Nx \c__tl_dot_above_tl { \__tl_tmp:n { "0307 } } - \tl_const:Nx \c__tl_upper_Eszett_tl { \__tl_tmp:n { "1E9E } } - \group_end: - } - { - \tl_const:Nn \c__tl_std_sigma_tl { } - \tl_const:Nn \c__tl_final_sigma_tl { } - \tl_const:Nn \c__tl_accents_lt_tl { } - \tl_const:Nn \c__tl_dot_above_tl { } - \tl_const:Nn \c__tl_upper_Eszett_tl { } + \exp_not:N \int_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 } + } + } + { + \exp_not:N \__text_change_case_store:V + \exp_not:N \c__text_dotted_I_tl + } + \exp_not:N \use:c { __text_change_case_char_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:nnTF + \bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { - \cs_set_protected:Npn \__tl_tmp:w #1#2 - { - \tl_const:Nx #1 - { - \exp_after:wN \exp_after:wN \exp_after:wN - \exp_not:N \char_generate:nn - {"#2} { \char_value_catcode:n {"#2} } - } - } - } - { - \cs_set_protected:Npn \__tl_tmp:w #1#2 + \cs_set_protected:Npn \__text_tmp:w #1#2 { \group_begin: - \cs_set_protected:Npn \__tl_tmp:w ##1##2##3##4 + \cs_set_protected:Npn \__text_tmp:w ##1##2##3##4 { \tl_const:Nx #1 { @@ -28548,38 +28897,37 @@ \exp_not:N \char_generate:nn {##2} { 13 } } } - \tl_set:Nx \l__tl_internal_a_tl - { \char_codepoint_to_bytes:n {"#2} } - \exp_after:wN \__tl_tmp:w \l__tl_internal_a_tl + \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 } } - \__tl_tmp:w \c__tl_dotless_i_tl { 0131 } - \__tl_tmp:w \c__tl_dotted_I_tl { 0130 } - \__tl_tmp:w \c__tl_i_ogonek_tl { 012F } - \__tl_tmp:w \c__tl_I_ogonek_tl { 012E } \group_end: \group_begin: \bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { - \cs_set_protected:Npn \__tl_loop:nn #1#2 + \cs_set_protected:Npn \__text_loop:nn #1#2 { \quark_if_recursion_tail_stop:n {#1} - \tl_set:Nx \l__tl_internal_a_tl + \use:x { - \char_codepoint_to_bytes:n {"#1} - \char_codepoint_to_bytes:n {"#2} + \__text_tmp:w + \char_to_utfviii_bytes:n { "#1 } + \char_to_utfviii_bytes:n { "#2 } } - \exp_after:wN \__tl_tmp:w \l__tl_internal_a_tl - \__tl_loop:nn + \__text_loop:nn } - \cs_set_protected:Npn \__tl_tmp:nnnn #1#2#3#4#5 + \cs_set_protected:Npn \__text_tmp:nnnn #1#2#3#4#5 { \tl_const:cx { - c__tl_ #1 _case_ + c__text_ #1 case_ \char_generate:nn {#2} { 12 } \char_generate:nn {#3} { 12 } _tl @@ -28591,11 +28939,11 @@ \exp_not:N \char_generate:nn {#5} { 13 } } } - \cs_set_protected:Npn \__tl_tmp:w #1#2#3#4#5#6#7#8 + \cs_set_protected:Npn \__text_tmp:w #1#2#3#4#5#6#7#8 { \tl_const:cx { - c__tl_lower_case_ + c__text_lowercase_ \char_generate:nn {#1} { 12 } \char_generate:nn {#2} { 12 } _tl @@ -28606,11 +28954,12 @@ \exp_after:wN \exp_after:wN \exp_after:wN \exp_not:N \char_generate:nn {#6} { 13 } } - \__tl_tmp:nnnn { upper } {#5} {#6} {#1} {#2} - \__tl_tmp:nnnn { mixed } {#5} {#6} {#1} {#2} + \__text_tmp:nnnn { upper } {#5} {#6} {#1} {#2} + \__text_tmp:nnnn { title } {#5} {#6} {#1} {#2} } - \__tl_loop:nn + \__text_loop:nn { 00C0 } { 00E0 } + { 00C1 } { 00E1 } { 00C2 } { 00E2 } { 00C3 } { 00E3 } { 00C4 } { 00E4 } @@ -28711,41 +29060,40 @@ { 021A } { 021B } \q_recursion_tail ? \q_recursion_stop - \cs_set_protected:Npn \__tl_tmp:w #1#2#3 + \cs_set_protected:Npn \__text_tmp:w #1#2#3 { \group_begin: - \cs_set_protected:Npn \__tl_tmp:w ##1##2##3##4 + \cs_set_protected:Npn \__text_tmp:w ##1##2##3##4 { \tl_const:cx { - c__tl_ #3 _case_ + c__text_ #3 case_ \char_generate:nn {##1} { 12 } \char_generate:nn {##2} { 12 } _tl } {#2} } - \tl_set:Nx \l__tl_internal_a_tl - { \char_codepoint_to_bytes:n { "#1 } } - \exp_after:wN \__tl_tmp:w \l__tl_internal_a_tl + \use:x + { \__text_tmp:w \char_to_utfviii_bytes:n { "#1 } } \group_end: } - \__tl_tmp:w { 00DF } { SS } { upper } - \__tl_tmp:w { 00DF } { Ss } { mixed } - \__tl_tmp:w { 0131 } { I } { upper } + \__text_tmp:w { 00DF } { SS } { upper } + \__text_tmp:w { 00DF } { Ss } { title } + \__text_tmp:w { 0131 } { I } { upper } } \group_end: \group_begin: - \cs_set_protected:Npn \__tl_change_case_setup:NN #1#2 + \cs_set_protected:Npn \__text_change_case_setup:NN #1#2 { \quark_if_recursion_tail_stop:N #1 - \tl_const:cn { c__tl_change_case_lower_ \token_to_str:N #1 _tl } + \tl_const:cn { c__text_lowercase_ \token_to_str:N #1 _tl } { #2 } - \tl_const:cn { c__tl_change_case_upper_ \token_to_str:N #2 _tl } + \tl_const:cn { c__text_uppercase_ \token_to_str:N #2 _tl } { #1 } - \__tl_change_case_setup:NN + \__text_change_case_setup:NN } - \__tl_change_case_setup:NN + \__text_change_case_setup:NN \AA \aa \AE \ae \DH \dh @@ -28759,65 +29107,400 @@ \TH \th \q_recursion_tail ? \q_recursion_stop - \tl_const:cn { c__tl_change_case_upper_ \token_to_str:N \i _tl } { I } - \tl_const:cn { c__tl_change_case_upper_ \token_to_str:N \j _tl } { J } + \tl_const:cn { c__text_uppercase_ \token_to_str:N \i _tl } { I } + \tl_const:cn { c__text_uppercase_ \token_to_str:N \j _tl } { J } \group_end: -\tl_new:N \l_tl_case_change_accents_tl -\tl_set:Nn \l_tl_case_change_accents_tl - { \" \' \. \^ \` \~ \c \H \k \r \t \u \v } -\cs_new:Npn \__tl_change_case_mixed_nl:Nnw #1 +%% File: l3candidates.dtx +\cs_new_protected:Npn \box_clip:N #1 + { \hbox_set:Nn #1 { \__box_backend_clip:N #1 } } +\cs_generate_variant:Nn \box_clip:N { c } +\cs_new_protected:Npn \box_gclip:N #1 + { \hbox_gset:Nn #1 { \__box_backend_clip:N #1 } } +\cs_generate_variant:Nn \box_gclip:N { c } +\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5 + { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } +\cs_generate_variant:Nn \box_set_trim:Nnnnn { c } +\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5 + { \__box_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } +\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c } +\cs_new_protected:Npn \__box_set_trim:NnnnnN #1#2#3#4#5#6 { - \bool_lazy_or:nnTF - { \int_compare_p:nNn { `#1 } = { `i } } - { \int_compare_p:nNn { `#1 } = { `I } } + \hbox_set:Nn \l__box_internal_box + { + \tex_kern:D - \__box_dim_eval:n {#2} + \box_use:N #1 + \tex_kern:D - \__box_dim_eval:n {#4} + } + \dim_compare:nNnTF { \box_dp:N #1 } > {#3} + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_down:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_dp:Nn \l__box_internal_box { \box_dp:N #1 - (#3) } + } + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_down:nn { (#3) - \box_dp:N #1 } + { \box_use_drop:N \l__box_internal_box } + } + \box_set_dp:Nn \l__box_internal_box \c_zero_dim + } + \dim_compare:nNnTF { \box_ht:N \l__box_internal_box } > {#5} { - \__tl_change_case_output:nwn { I } - \__tl_change_case_mixed_nl:Nw + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box + { \box_ht:N \l__box_internal_box - (#5) } + } + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn { (#5) - \box_ht:N \l__box_internal_box } + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box \c_zero_dim } + #6 #1 \l__box_internal_box } -\cs_new:Npn \__tl_change_case_mixed_nl:Nw #1#2 \q_recursion_stop +\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5 + { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } +\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c } +\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5 + { \__box_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } +\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c } +\cs_new_protected:Npn \__box_set_viewport:NnnnnN #1#2#3#4#5#6 { - \tl_if_head_is_N_type:nT {#2} - { \__tl_change_case_mixed_nl:NNw } - #1 #2 \q_recursion_stop + \hbox_set:Nn \l__box_internal_box + { + \tex_kern:D - \__box_dim_eval:n {#2} + \box_use:N #1 + \tex_kern:D \__box_dim_eval:n { #4 - \box_wd:N #1 } + } + \dim_compare:nNnTF {#3} < \c_zero_dim + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_down:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_dp:Nn \l__box_internal_box { - \__box_dim_eval:n {#3} } + } + { + \hbox_set:Nn \l__box_internal_box + { \box_move_down:nn {#3} { \box_use_drop:N \l__box_internal_box } } + \box_set_dp:Nn \l__box_internal_box \c_zero_dim + } + \dim_compare:nNnTF {#5} > \c_zero_dim + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn \c_zero_dim + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box + { + (#5) + \dim_compare:nNnT {#3} > \c_zero_dim + { - (#3) } + } + } + { + \hbox_set:Nn \l__box_internal_box + { + \box_move_up:nn { - \__box_dim_eval:n {#5} } + { \box_use_drop:N \l__box_internal_box } + } + \box_set_ht:Nn \l__box_internal_box \c_zero_dim + } + #6 #1 \l__box_internal_box } -\cs_new:Npn \__tl_change_case_mixed_nl:NNw #1#2#3 \q_recursion_stop +\cs_new:Npn \flag_raise_if_clear:n #1 { - \__tl_change_case_if_expandable:NTF #2 + \if_cs_exist:w flag~#1~0 \cs_end: + \else: + \cs:w flag~#1 \cs_end: 0 ; + \fi: + } +\cs_new:Npn \msg_expandable_error:nnnnnn #1#2#3#4#5#6 + { + \exp_args:Ne \__msg_expandable_error_module:nn { - \exp_after:wN \__tl_change_case_mixed_nl:Nw \exp_after:wN #1 #2 - #3 \q_recursion_stop + \exp_args:Nc \exp_args:Noooo + { \c__msg_text_prefix_tl #1 / #2 } + { \tl_to_str:n {#3} } + { \tl_to_str:n {#4} } + { \tl_to_str:n {#5} } + { \tl_to_str:n {#6} } } + {#1} + } +\cs_new:Npn \msg_expandable_error:nnnnn #1#2#3#4#5 + { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} {#5} { } } +\cs_new:Npn \msg_expandable_error:nnnn #1#2#3#4 + { \msg_expandable_error:nnnnnn {#1} {#2} {#3} {#4} { } { } } +\cs_new:Npn \msg_expandable_error:nnn #1#2#3 + { \msg_expandable_error:nnnnnn {#1} {#2} {#3} { } { } { } } +\cs_new:Npn \msg_expandable_error:nn #1#2 + { \msg_expandable_error:nnnnnn {#1} {#2} { } { } { } { } } +\cs_generate_variant:Nn \msg_expandable_error:nnnnnn { nnffff } +\cs_generate_variant:Nn \msg_expandable_error:nnnnn { nnfff } +\cs_generate_variant:Nn \msg_expandable_error:nnnn { nnff } +\cs_generate_variant:Nn \msg_expandable_error:nnn { nnf } +\cs_new:Npn \__msg_expandable_error_module:nn #1#2 + { + \exp_after:wN \exp_after:wN + \exp_after:wN \use_none_delimit_by_q_stop:w + \use:n { \::error ! ~ #2 : ~ #1 } \q_stop + } +\cs_new_protected:Npn \msg_show_eval:Nn #1#2 + { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_show:n } +\cs_new_protected:Npn \msg_log_eval:Nn #1#2 + { \exp_args:Nf \__msg_show_eval:nnN { #1 {#2} } {#2} \tl_log:n } +\cs_new_protected:Npn \__msg_show_eval:nnN #1#2#3 { #3 { #2 = #1 } } +\cs_new:Npx \msg_show_item:n #1 + { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n { {#1} } } +\cs_new:Npx \msg_show_item_unbraced:n #1 + { \iow_newline: > ~ \c_space_tl \exp_not:N \tl_to_str:n {#1} } +\cs_new:Npx \msg_show_item:nn #1#2 + { + \iow_newline: > \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n { {#1} } + \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n { {#2} } + } +\cs_new:Npx \msg_show_item_unbraced:nn #1#2 + { + \iow_newline: > \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n {#1} + \use:nn { ~ } { ~ } => \use:nn { ~ } { ~ } + \exp_not:N \tl_to_str:n {#2} + } +\cs_new_protected:Npn \bool_set_inverse:N #1 + { \bool_if:NTF #1 { \bool_set_false:N } { \bool_set_true:N } #1 } +\cs_generate_variant:Nn \bool_set_inverse:N { c } +\cs_new_protected:Npn \bool_gset_inverse:N #1 + { \bool_if:NTF #1 { \bool_gset_false:N } { \bool_gset_true:N } #1 } +\cs_generate_variant:Nn \bool_gset_inverse:N { c } +\cs_new:Npn \bool_case_true:nTF + { \exp:w \__msg_case:NnTF \c_true_bool } +\cs_new:Npn \bool_case_true:nT #1#2 + { \exp:w \__msg_case:NnTF \c_true_bool {#1} {#2} { } } +\cs_new:Npn \bool_case_true:nF #1 + { \exp:w \__msg_case:NnTF \c_true_bool {#1} { } } +\cs_new:Npn \bool_case_true:n #1 + { \exp:w \__msg_case:NnTF \c_true_bool {#1} { } { } } +\cs_new:Npn \bool_case_false:nTF + { \exp:w \__msg_case:NnTF \c_false_bool } +\cs_new:Npn \bool_case_false:nT #1#2 + { \exp:w \__msg_case:NnTF \c_false_bool {#1} {#2} { } } +\cs_new:Npn \bool_case_false:nF #1 + { \exp:w \__msg_case:NnTF \c_false_bool {#1} { } } +\cs_new:Npn \bool_case_false:n #1 + { \exp:w \__msg_case:NnTF \c_false_bool {#1} { } { } } +\cs_new:Npn \__msg_case:NnTF #1#2#3#4 + { + \bool_if:NTF #1 \__msg_case_true:w \__msg_case_false:w + #2 #1 { } \q_mark {#3} \q_mark {#4} \q_stop + } +\cs_new:Npn \__msg_case_true:w #1#2 + { + \bool_if:nTF {#1} + { \__msg_case_end:nw {#2} } + { \__msg_case_true:w } + } +\cs_new:Npn \__msg_case_false:w #1#2 + { + \bool_if:nTF {#1} + { \__msg_case_false:w } + { \__msg_case_end:nw {#2} } + } +\cs_new:Npn \__msg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop + { \exp_end: #1 #4 } +\cs_new:Npn \prop_rand_key_value:N #1 + { + \prop_if_empty:NF #1 { - \bool_lazy_and:nnTF - { ! ( \token_if_cs_p:N #2 ) } + \exp_after:wN \__prop_rand_item:w + \int_value:w \int_rand:nn { 1 } { \prop_count:N #1 } + #1 \q_stop + } + } +\cs_generate_variant:Nn \prop_rand_key_value:N { c } +\cs_new:Npn \__prop_rand_item:w #1 \s__prop \__prop_pair:wn #2 \s__prop #3 + { + \int_compare:nNnF {#1} > 1 + { \use_i_delimit_by_q_stop:nw { \exp_not:n { {#2} {#3} } } } + \exp_after:wN \__prop_rand_item:w + \int_value:w \int_eval:n { #1 - 1 } \s__prop + } +\cs_new:Npn \seq_mapthread_function:NNN #1#2#3 + { \exp_after:wN \__seq_mapthread_function:wNN #2 \q_stop #1 #3 } +\cs_new:Npn \__seq_mapthread_function:wNN \s__seq #1 \q_stop #2#3 + { + \exp_after:wN \__seq_mapthread_function:wNw #2 \q_stop #3 + #1 { ? \prg_break: } { } + \prg_break_point: + } +\cs_new:Npn \__seq_mapthread_function:wNw \s__seq #1 \q_stop #2 + { + \__seq_mapthread_function:Nnnwnn #2 + #1 { ? \prg_break: } { } + \q_stop + } +\cs_new:Npn \__seq_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6 + { + \use_none:n #2 + \use_none:n #5 + #1 {#3} {#6} + \__seq_mapthread_function:Nnnwnn #1 #4 \q_stop + } +\cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc , c , cc } +\cs_new_protected:Npn \seq_set_filter:NNn + { \__seq_set_filter:NNNn \tl_set:Nx } +\cs_new_protected:Npn \seq_gset_filter:NNn + { \__seq_set_filter:NNNn \tl_gset:Nx } +\cs_new_protected:Npn \__seq_set_filter:NNNn #1#2#3#4 + { + \__seq_push_item_def:n { \bool_if:nT {#4} { \__seq_wrap_item:n {##1} } } + #1 #2 { #3 } + \__seq_pop_item_def: + } +\cs_new_protected:Npn \seq_set_map:NNn + { \__seq_set_map:NNNn \tl_set:Nx } +\cs_new_protected:Npn \seq_gset_map:NNn + { \__seq_set_map:NNNn \tl_gset:Nx } +\cs_new_protected:Npn \__seq_set_map:NNNn #1#2#3#4 + { + \__seq_push_item_def:n { \exp_not:N \__seq_item:n {#4} } + #1 #2 { #3 } + \__seq_pop_item_def: + } +\cs_new_protected:Npn \seq_set_from_inline_x:Nnn + { \__seq_set_from_inline_x:NNnn \tl_set:Nx } +\cs_new_protected:Npn \seq_gset_from_inline_x:Nnn + { \__seq_set_from_inline_x:NNnn \tl_gset:Nx } +\cs_new_protected:Npn \__seq_set_from_inline_x:NNnn #1#2#3#4 + { + \__seq_push_item_def:n { \exp_not:N \__seq_item:n {#4} } + #1 #2 { \s__seq #3 \__seq_item:n } + \__seq_pop_item_def: + } +\cs_new_protected:Npn \seq_set_from_function:NnN #1#2#3 + { \seq_set_from_inline_x:Nnn #1 {#2} { #3 {##1} } } +\cs_new_protected:Npn \seq_gset_from_function:NnN #1#2#3 + { \seq_gset_from_inline_x:Nnn #1 {#2} { #3 {##1} } } +\cs_new:Npn \seq_indexed_map_function:NN #1#2 + { + \__seq_indexed_map:NN #1#2 + \prg_break_point:Nn \seq_map_break: { } + } +\cs_new_protected:Npn \seq_indexed_map_inline:Nn #1#2 + { + \int_gincr:N \g__kernel_prg_map_int + \cs_gset_protected:cpn + { __seq_map_ \int_use:N \g__kernel_prg_map_int :w } ##1##2 {#2} + \exp_args:NNc \__seq_indexed_map:NN #1 + { __seq_map_ \int_use:N \g__kernel_prg_map_int :w } + \prg_break_point:Nn \seq_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } + } +\cs_new:Npn \__seq_indexed_map:NN #1#2 + { + \exp_after:wN \__seq_indexed_map:Nw + \exp_after:wN #2 + \int_value:w 1 + \exp_after:wN \use_i:nn + \exp_after:wN ; + #1 + \prg_break: \__seq_item:n { } \prg_break_point: + } +\cs_new:Npn \__seq_indexed_map:Nw #1#2 ; #3 \__seq_item:n #4 + { + #3 + #1 {#2} {#4} + \exp_after:wN \__seq_indexed_map:Nw + \exp_after:wN #1 + \int_value:w \int_eval:w 1 + #2 ; + } +\str_const:Nx \c_sys_engine_version_str + { + \str_case:on \c_sys_engine_str + { + { pdftex } { - \bool_lazy_or_p:nn - { \int_compare_p:nNn { `#2 } = { `j } } - { \int_compare_p:nNn { `#2 } = { `J } } + \fp_eval:n { round(\int_use:N \tex_pdftexversion:D / 100 , 2) } + . + \tex_pdftexrevision:D } + { ptex } { - \__tl_change_case_output:nwn { J } - #1 + \cs_if_exist:NT \tex_ptexversion:D + { + p + \int_use:N \tex_ptexversion:D + . + \int_use:N \tex_ptexminorversion:D + \tex_ptexrevision:D + - + \int_use:N \tex_epTeXversion:D + } + } + { luatex } + { + \fp_eval:n { round(\int_use:N \tex_luatexversion:D / 100, 2) } + . + \tex_luatexrevision:D + } + { uptex } + { + \cs_if_exist:NT \tex_ptexversion:D + { + p + \int_use:N \tex_ptexversion:D + . + \int_use:N \tex_ptexminorversion:D + \tex_ptexrevision:D + - + u + \int_use:N \tex_uptexversion:D + \tex_uptexrevision:D + - + \int_use:N \tex_epTeXversion:D + } + } + { xetex } + { + \int_use:N \tex_XeTeXversion:D + \tex_XeTeXrevision:D } - { #1 #2 } - #3 \q_recursion_stop } } -\tl_new:N \l_tl_case_change_math_tl -\tl_set:Nn \l_tl_case_change_math_tl - { $ $ \( \) } -\tl_new:N \l_tl_case_change_exclude_tl -\tl_set:Nn \l_tl_case_change_exclude_tl - { \cite \ensuremath \label \ref } -\tl_new:N \l_tl_mixed_case_ignore_tl -\tl_set:Nx \l_tl_mixed_case_ignore_tl +\cs_new_protected:Npn \ior_shell_open:Nn #1#2 { - ( % ) - [ % ] - \cs_to_str:N \{ % \} - ` - - + \sys_if_shell:TF + { \exp_args:No \__ior_shell_open:nN { \tl_to_str:n {#2} } #1 } + { \__kernel_msg_error:nn { kernel } { pipe-failed } } + } +\cs_new_protected:Npn \__ior_shell_open:nN #1#2 + { + \tl_if_in:nnTF {#1} { " } + { + \__kernel_msg_error:nnx + { kernel } { quote-in-shell } {#1} + } + { \__kernel_ior_open:Nn #2 { "|#1" } } + } +\__kernel_msg_new:nnnn { kernel } { pipe-failed } + { Cannot~run~piped~system~commands. } + { + LaTeX~tried~to~call~a~system~process~but~this~was~not~possible.\\ + Try~the~"--shell-escape"~(or~"--enable-pipes")~option. } \cs_new_protected:Npn \tl_build_begin:N #1 { \__tl_build_begin:NN \cs_set_nopar:Npx #1 } diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex index 6a994e64486..72090ccc347 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3-generic.tex @@ -6,7 +6,7 @@ %% %% expl3.dtx (with options: `generic,loader') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2019-11-07}% +\def\ExplFileDate{2020-01-12}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \def\tempa{LaTeX2e}% diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx index 0f6709a6f31..80baec9c93b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.ltx @@ -6,7 +6,7 @@ %% %% expl3.dtx (with options: `2ekernel,loader') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -19,10 +19,10 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2019-11-07}% +\def\ExplFileDate{2020-01-12}% \let\ExplLoaderFileDate\ExplFileDate \everyjob\expandafter{\the\everyjob - \message{expl3 <\ExplFileDate> L3 programming layer}% + \message{L3 programming layer <\ExplFileDate>}% } \protected\def\ProvidesExplPackage#1#2#3#4% {% @@ -82,10 +82,12 @@ \bool_gset_true:N \g__kernel_deprecation_undo_recent_bool } } -\AtBeginDocument +\tl_put_left:Nn \document { + \endgroup \str_if_exist:NF \c_sys_backend_str { \sys_load_backend:n { } } + \begingroup } \cs_if_free:cTF { ver@expl3.sty } { diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua index eeafb132f55..35c757a6049 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.lua +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.lua @@ -6,7 +6,7 @@ -- -- l3luatex.dtx (with options: `package,lua') -- --- Copyright (C) 1990-2019 The LaTeX3 Project +-- Copyright (C) 1990-2020 The LaTeX3 Project -- -- It may be distributed and/or modified under the conditions of -- the LaTeX Project Public License (LPPL), either version 1.3c of @@ -20,16 +20,17 @@ -- -- File: l3luatex.dtx l3kernel = l3kernel or { } -local io = io -local kpse = kpse -local lfs = lfs -local math = math -local md5 = md5 -local os = os -local string = string -local tex = tex -local texio = texio -local unicode = unicode +local io = io +local kpse = kpse +local lfs = lfs +local math = math +local md5 = md5 +local os = os +local string = string +local tex = tex +local texio = texio +local tonumber = tonumber +local unicode = unicode local abs = math.abs local byte = string.byte local floor = math.floor @@ -70,6 +71,23 @@ local function resettimer() base_time = os_clock() end l3kernel.resettimer = resettimer +local function filedump(name,offset,length) + local file = kpse_find(name,"tex",true) + if file then + local length = tonumber(length) or lfs_attr(file,"size") + local offset = tonumber(offset) or 0 + local f = open(file,"rb") + if f then + if offset > 0 then + f:seek("set",offset) + end + local data = f:read(length) + escapehex(data) + f:close() + end + end +end +l3kernel.filedump = filedump local function filemdfivesum(name) local file = kpse_find(name, "tex", true) if file then diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index 375597d0188..355a6b941f1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -6,7 +6,7 @@ %% %% expl3.dtx (with options: `package,loader') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2019-11-07}% +\def\ExplFileDate{2020-01-12}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def index 329247a56e5..1a009cd48b7 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3debug.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3debug.def @@ -6,7 +6,7 @@ %% %% l3debug.dtx (with options: `package') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3deprecation.def b/Master/texmf-dist/tex/latex/l3kernel/l3deprecation.def index 7a8dd68b2f6..5623aaa6117 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3deprecation.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3deprecation.def @@ -6,7 +6,7 @@ %% %% l3deprecation.dtx (with options: `package,patches') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -179,6 +179,18 @@ \cs_gset:Npn \__prg_break: #1 \__prg_break_point: { } \__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \prg_break:n } \cs_gset:Npn \__prg_break:n #1#2 \__prg_break_point: {#1} +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_lower_case:n } +\cs_gset:Npn \str_lower_case:n { \str_lowercase:n } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_lower_case:f } +\cs_gset:Npn \str_lower_case:f { \str_lowercase:f } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_upper_case:n } +\cs_gset:Npn \str_upper_case:n { \str_uppercase:n } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_upper_case:f } +\cs_gset:Npn \str_upper_case:f { \str_uppercase:f } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_fold_case:n } +\cs_gset:Npn \str_fold_case:n { \str_foldcase:n } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \str_fold_case:V } +\cs_gset:Npn \str_fold_case:V { \str_foldcase:V } \__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_case_e:nn } \cs_gset:Npn \str_case_x:nn { \str_case_e:nn } \__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \str_case_e:nnT } @@ -229,6 +241,24 @@ \group_end: } \cs_generate_variant:Nn \tl_gset_from_file_x:Nnn { c } +\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_lowercase:n } +\cs_gset:Npn \tl_lower_case:n #1 + { \text_lowercase:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_lowercase:nn } +\cs_gset:Npn \tl_lower_case:nn #1#2 + { \text_lowercase:nn {#1} {#2} } +\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_uppercase:n } +\cs_gset:Npn \tl_upper_case:n #1 + { \text_uppercase:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_uppercase:nn } +\cs_gset:Npn \tl_upper_case:nn #1#2 + { \text_uppercase:nn {#1} {#2} } +\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_titlecase:n } +\cs_gset:Npn \tl_mixed_case:n #1 + { \text_titlecase:n {#1} } +\__kernel_patch_deprecation:nnNNpn { 2022-01-01 } { \text_titlecase:nn } +\cs_gset:Npn \tl_mixed_case:nn #1#2 + { \text_titlecase:nn {#1} {#2} } \__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \tl_analysis_show:N } \cs_gset_protected:Npn \tl_show_analysis:N { \tl_analysis_show:N } \__kernel_patch_deprecation:nnNNpn { 2020-01-01 } { \tl_analysis_show:n } @@ -239,6 +269,22 @@ \cs_gset:Npn \token_get_arg_spec:N { \cs_argument_spec:N } \__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \cs_replacement_spec:N } \cs_gset:Npn \token_get_replacement_spec:N { \cs_replacement_spec:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_lower_case:N } +\cs_gset:Npn \char_lower_case:N { \char_lowercase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_upper_case:N } +\cs_gset:Npn \char_upper_case:N { \char_uppercase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_mixed_case:N } +\cs_gset:Npn \char_mixed_case:N { \char_titlecase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_fold_case:N } +\cs_gset:Npn \char_fold_case:N { \char_foldcase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_lower_case:N } +\cs_gset:Npn \char_str_lower_case:N { \char_str_lowercase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_upper_case:N } +\cs_gset:Npn \char_str_upper_case:N { \char_str_uppercase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_mixed_case:N } +\cs_gset:Npn \char_str_mixed_case:N { \char_str_titlecase:N } +\__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { \char_str_fold_case:N } +\cs_gset:Npn \char_str_fold_case:N { \char_str_foldcase:N } \__kernel_patch_deprecation:nnNNpn { 2021-01-01 } { -1 } \cs_new_protected:Npn \c_term_ior { -1 \scan_stop: } %% diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls index 4d1b512227b..5ffd3862e04 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls @@ -6,7 +6,7 @@ %% %% l3doc.dtx (with options: `class') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex b/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex index a7978ddf13e..376e7325765 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex +++ b/Master/texmf-dist/tex/latex/l3kernel/l3docstrip.tex @@ -6,7 +6,7 @@ %% %% l3docstrip.dtx (with options: `program') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88591.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88591.def index a70bc9f6fe8..b8afbc41f0f 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88591.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88591.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88591') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885910.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885910.def index c24d358a553..e05851bea25 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885910.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885910.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso885910') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885911.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885911.def index f6b39e6d096..68edb51da3e 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885911.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885911.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso885911') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885913.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885913.def index 24ed74b1c31..cb5df1eadd0 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885913.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885913.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso885913') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885914.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885914.def index e51b8534a99..3ba5aff3579 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885914.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885914.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso885914') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885915.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885915.def index 5776213ff39..1c021c5be93 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885915.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885915.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso885915') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885916.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885916.def index b7376b0b252..67ba3cb920a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885916.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso885916.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso885916') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88592.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88592.def index ef2cd5ab200..cdd7d72cfba 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88592.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88592.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88592') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88593.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88593.def index dc7cc7a88fd..9f0b8cb57e9 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88593.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88593.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88593') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88594.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88594.def index 2ac8afb3b32..62d0f99a57a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88594.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88594.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88594') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88595.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88595.def index e8361b2b6fd..5b8e4a52a0a 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88595.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88595.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88595') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88596.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88596.def index 912fb1067f7..95461e2fdcf 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88596.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88596.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88596') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88597.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88597.def index e3486353f1f..6fa05a311f1 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88597.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88597.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88597') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88598.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88598.def index 414212db091..a4eb5245b17 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88598.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88598.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88598') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88599.def b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88599.def index 946ab0b41bf..9c005e3e0cb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88599.def +++ b/Master/texmf-dist/tex/latex/l3kernel/l3str-enc-iso88599.def @@ -6,7 +6,7 @@ %% %% l3str-convert.dtx (with options: `iso88599') %% -%% Copyright (C) 1990-2019 The LaTeX3 Project +%% Copyright (C) 1990-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty index caa9f140b04..6936d538565 100644 --- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty @@ -6,7 +6,7 @@ %% %% l3keys2e.dtx (with options: `package') %% -%% Copyright (C) 2009-2019 The LaTeX3 Project +%% Copyright (C) 2009-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{l3keys2e}{2019-10-11}{} +\ProvidesExplPackage{l3keys2e}{2020-01-12}{} {LaTeX2e option processing using LaTeX3 keys} \cs_generate_variant:Nn \clist_put_right:Nn { Nv } \cs_generate_variant:Nn \keys_if_exist:nnT { nx } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty index 1c07dc0e4b5..b08e2b461a9 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfp/xfp.sty @@ -6,7 +6,7 @@ %% %% xfp.dtx (with options: `package') %% -%% Copyright (C) 2017-2019 The LaTeX3 Project +%% Copyright (C) 2017-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -33,7 +33,7 @@ \endinput } \RequirePackage{xparse} -\ProvidesExplPackage{xfp}{2019-10-11}{} +\ProvidesExplPackage{xfp}{2020-01-12}{} {L3 Floating point unit} \NewExpandableDocumentCommand \fpeval { m } { \fp_eval:n {#1} } \NewExpandableDocumentCommand \inteval { m } { \int_eval:n {#1} } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty index 959ceb14c75..167d8e9c995 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty @@ -6,7 +6,7 @@ %% %% xfrac.dtx (with options: `package') %% -%% Copyright (C) 2011-2019 The LaTeX3 Project +%% Copyright (C) 2011-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -33,7 +33,7 @@ \endinput } \RequirePackage{amstext,graphicx,l3keys2e,textcomp,xparse,xtemplate} -\ProvidesExplPackage{xfrac}{2019-10-11}{} +\ProvidesExplPackage{xfrac}{2020-01-12}{} {L3 Experimental split-level fractions} \keys_define:nn { xfrac } { diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index 23b13604691..265cd0c9f38 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty @@ -6,7 +6,7 @@ %% %% xparse.dtx (with options: `package') %% -%% Copyright (C) 2009-2019 The LaTeX3 Project +%% Copyright (C) 2009-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{xparse}{2019-10-11}{} +\ProvidesExplPackage{xparse}{2020-01-12}{} {L3 Experimental document command parser} \tl_new:N \l__xparse_arg_spec_tl \tl_new:N \l__xparse_args_tl @@ -2100,7 +2100,7 @@ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed. } \__kernel_msg_new:nnnn { xparse } { non-xparse } - { \str_upper_case:n #1~not~defined~using~xparse. } + { \str_uppercase:n #1~not~defined~using~xparse. } { You~have~asked~for~the~argument~specification~for~the~#1,~ but~this~was~not~defined~using~xparse. diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty index 80b85276d37..fb6a361b965 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty @@ -6,7 +6,7 @@ %% %% xtemplate.dtx (with options: `package') %% -%% Copyright (C) 2011-2019 The LaTeX3 Project +%% Copyright (C) 2011-2020 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of @@ -32,7 +32,7 @@ }% \endinput } -\ProvidesExplPackage{xtemplate}{2019-10-11}{} +\ProvidesExplPackage{xtemplate}{2020-01-12}{} {L3 Experimental prototype document functions} \tl_const:Nn \c__xtemplate_code_root_tl { template~code~>~ } \tl_const:Nn \c__xtemplate_defaults_root_tl { template~defaults~>~ } |