diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-15 03:01:17 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-15 03:01:17 +0000 |
commit | 6e362e815ea119b3f6db97b21c10fee3279b5c6b (patch) | |
tree | 536b6a92aa0abbc06d83b0b03850caeebf82d65e /macros/latex/contrib/l3kernel/l3text-case.dtx | |
parent | dc072b1cb0427be056e747cdbfd6b7a4f1e02e56 (diff) |
CTAN sync 202002150301
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3text-case.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3text-case.dtx | 81 |
1 files changed, 61 insertions, 20 deletions
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 4b39343bd4..0bdeab6210 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-02-11} +% \date{Released 2020-02-14} % % \maketitle % @@ -103,7 +103,12 @@ % \end{macro} % % \begin{macro}[EXP]{\@@_change_case:nnn, \@@_change_case_aux:nnn} -% \begin{macro}[EXP]{\@@_change_case_store:n} +% \begin{macro}[EXP] +% { +% \@@_change_case_store:n, \@@_change_case_store:o, +% \@@_change_case_store:V, \@@_change_case_store:v, +% \@@_change_case_store:e +% } % \begin{macro}[EXP]{\@@_change_case_store:nw} % \begin{macro}[EXP]{\@@_change_case_result:n} % \begin{macro}[EXP]{\@@_change_case_end:w} @@ -648,9 +653,10 @@ % \end{macro} % % \begin{macro}[EXP]{\@@_change_case_upper_de-alt:nnnN} +% \begin{macro}[EXP]{\@@_change_case_upper_de-alt:nnnNN} % A simple alternative version for German. % \begin{macrocode} -\bool_lazy_or:nnT +\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } { @@ -659,15 +665,36 @@ \int_compare:nNnTF { `#4 } = { "00DF } { \@@_change_case_store:e - { \char_generate:nn { "1E9E } { \@@_char_catcode:N #4 } } + { \char_generate:nn { "1E9E } { \@@_char_catcode:N #4 } } \use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3} } { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 } } } + { + \cs_new:cpx { @@_change_case_upper_de-alt:nnnN } #1#2#3#4 + { + \exp_not:N \int_compare:nNnTF { `#4 } = { "00C3 } + { + \exp_not:c { @@_change_case_upper_de-alt:nnnNN } + {#1} {#2} {#3} #4 + } + { \exp_not:N \@@_change_case_char:nnnN {#1} {#2} {#3} #4 } + } + \cs_new:cpn { @@_change_case_upper_de-alt:nnnNN } #1#2#3#4#5 + { + \int_compare:nNnTF { `#5 } = { "009F } + { + \@@_change_case_store:V \c_@@_grosses_Eszett_tl + \use:c { @@_change_case_char_next_ #2 :nn } {#2} {#3} + } + { \@@_change_case_char:nnnN {#1} {#2} {#3} #4#5 } + } + } % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{macro}[EXP]{\@@_change_case_upper_el:nnnN} % \begin{macro}[EXP]{\@@_change_case_upper_el:nnnn} @@ -1161,7 +1188,8 @@ % \c_@@_dotless_i_tl , % \c_@@_dotted_I_tl , % \c_@@_i_ogonek_tl , -% \c_@@_I_ogonek_tl +% \c_@@_I_ogonek_tl , +% \c_@@_grosses_Eszett_tl % } % For cases where there is an $8$-bit option in the |T1| font set up, % a variant is provided in both cases. @@ -1182,16 +1210,22 @@ \exp_not:N \char_generate:nn {##1} { 13 } \exp_after:wN \exp_after:wN \exp_after:wN \exp_not:N \char_generate:nn {##2} { 13 } + \tl_if_blank:nF {##3} + { + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_not:N \char_generate:nn {##3} { 13 } + } } } \use:x { \@@_tmp:w \char_to_utfviii_bytes:n { "#2 } } \group_end: } - \@@_tmp:w \c_@@_dotless_i_tl { 0131 } - \@@_tmp:w \c_@@_dotted_I_tl { 0130 } - \@@_tmp:w \c_@@_i_ogonek_tl { 012F } - \@@_tmp:w \c_@@_I_ogonek_tl { 012E } + \@@_tmp:w \c_@@_dotless_i_tl { 0131 } + \@@_tmp:w \c_@@_dotted_I_tl { 0130 } + \@@_tmp:w \c_@@_i_ogonek_tl { 012F } + \@@_tmp:w \c_@@_I_ogonek_tl { 012E } + \@@_tmp:w \c_@@_grosses_Eszett_tl { 1E9E } } \group_end: % \end{macrocode} @@ -1421,22 +1455,29 @@ \AtBeginDocument { \group_begin: - \cs_set_protected:Npn \@@_change_case_setup:NN #1#2 + \cs_set_protected:Npn \@@_change_case_setup:Nn #1#2 { \quark_if_recursion_tail_stop:N #1 - \cs_if_exist:cF { c_@@_uppercase_ \token_to_str:N #1 _tl } - { - \tl_const:cn { c_@@_uppercase_ \token_to_str:N #1 _tl } - { #2 } - } - \cs_if_exist:cF { c_@@_lowercase_ \token_to_str:N #2 _tl } + \tl_if_single_token:nT {#2} { - \tl_const:cn { c_@@_lowercase_ \token_to_str:N #2 _tl } - { #1 } + \cs_if_exist:cF + { c_@@_uppercase_ \token_to_str:N #1 _tl } + { + \tl_const:cn + { c_@@_uppercase_ \token_to_str:N #1 _tl } + { #2 } + } + \cs_if_exist:cF + { c_@@_lowercase_ \token_to_str:N #2 _tl } + { + \tl_const:cn + { c_@@_lowercase_ \token_to_str:N #2 _tl } + { #1 } + } } - \@@_change_case_setup:NN + \@@_change_case_setup:Nn } - \exp_after:wN \@@_change_case_setup:NN \@uclclist + \exp_after:wN \@@_change_case_setup:Nn \@uclclist \q_recursion_tail ? \q_recursion_stop \group_end: |