diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-03 22:05:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-03 22:05:21 +0000 |
commit | eeb0596588d5082d22a2106d7afbf0c4e9c5556f (patch) | |
tree | 5ea0db4012f79a8a54b30aaf8da76a67c74cb20c /Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx | |
parent | 36a637c1f73cde96634049dfb5d0f13d16c30d89 (diff) |
l3kernel (3feb23)
git-svn-id: svn://tug.org/texlive/trunk@65721 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx | 110 |
1 files changed, 72 insertions, 38 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx b/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx index 27e8395224a..6eded32a305 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-02-01} +% \date{Released 2023-02-02} % % \maketitle % @@ -861,8 +861,6 @@ % \@@_change_case_upper_el_aux:nnnn , % \@@_change_case_upper_el-x-iota:nnnn % } -% \begin{macro}[EXP] -% {\@@_change_case_upper_el:n, \@@_change_case_upper_el-x-iota:n} % \begin{macro}[EXP]{\@@_change_case_upper_el:nnn} % \begin{macro}[EXP]{\@@_change_case_upper_el:nnnw} % \begin{macro}[EXP] @@ -873,8 +871,14 @@ % \begin{macro}[EXP]{\@@_change_case_upper_el_dialytika:nnn} % \begin{macro}[EXP]{\@@_change_case_upper_el_dialytika:n} % \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnnw} -% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnN} -% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnn} +% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnnN} +% \begin{macro}[EXP]{\@@_change_case_upper_el_hiatus:nnnn} +% \begin{macro}[EXP] +% { +% \@@_change_case_upper_el_ypogegrammeni:n , +% \@@_change_case_upper_el-x-iota_ypogegrammeni:n , +% \@@_change_case_upper_el_ypogegrammeni_aux:n +% } % \begin{macro}[EXP]{\@@_change_case_upper_el_gobble:nnw} % \begin{macro}[EXP]{\@@_change_case_upper_el_gobble:nnN} % \begin{macro}[EXP]{\@@_change_case_upper_el_gobble:nnn} @@ -915,7 +919,8 @@ { \@@_change_case_store:e { - \use:c { @@_change_case_upper_ #3 :n } {#4} + \codepoint_generate:nn { "0399 } + { \char_value_catcode:n { "0399 } } } \@@_change_case_loop:nnw {#2} {#3} } @@ -924,13 +929,6 @@ } \cs_new_eq:cN { @@_change_case_upper_el-x-iota:nnnn } \@@_change_case_upper_el:nnnn -\cs_new:Npn \@@_change_case_upper_el:n #1 - { - \codepoint_generate:nn { "0399 } - { \char_value_catcode:n { "0399 } } - } -\cs_new:cpn { @@_change_case_upper_el-x-iota:n } #1 - { \exp_not:n {#1} } \cs_new:Npn \@@_change_case_upper_el:nnn #1#2#3 { \@@_codepoint_process:nN @@ -991,15 +989,15 @@ \cs_new:Npn \@@_change_case_upper_el_ypogegrammeni:nnnnnN #1#2#3#4#5#6 { \token_if_cs:NTF #6 - { \@@_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 #6 } + { \@@_change_case_upper_el_aux:nnnN {#1} {#2} {#3} #4#5 } { \@@_codepoint_process:nN { \@@_change_case_upper_el_ypogegrammeni:nnnnnn {#1} {#2} {#3} {#4} {#5} } - #6 } + #6 } \cs_new:Npn \@@_change_case_upper_el_ypogegrammeni:nnnnnn #1#2#3#4#5#6 { @@ -1029,23 +1027,23 @@ \@@_codepoint_compare:nNnTF {#4} = { "0308 } { \@@_change_case_upper_el_dialytika:nnn {#2} {#3} {#1} } { - \@@_change_case_if_greek_accent:nTF {#4} + \@@_change_case_if_greek_accent:nTF {#4} { \@@_change_case_upper_el_hiatus:nnnw {#2} {#3} {#1} } { \@@_change_case_if_greek_diacritic:nTF {#4} - { - \@@_change_case_store:e - { \@@_change_case_codepoint:nn { upper } {#1} } - \@@_change_case_loop:nnw {#2} {#3} - } + { \@@_change_case_upper_el:nnn {#1} {#2} {#3} } { \@@_codepoint_compare:nNnTF {#4} = { "0345 } - { \@@_change_case_store:e { [XXX] } } + { + \@@_change_case_store:e + { \use:c { @@_change_case_upper_ #3 _ypogegrammeni:n } {#1} } + \@@_change_case_loop:nnw {#2} {#3} + } { \@@_change_case_store:e { \@@_change_case_codepoint:nn { upper } {#1} } + \@@_change_case_loop:nnw {#2} {#3} #4 } - \@@_change_case_loop:nnw {#2} {#3} #4 } } } @@ -1088,33 +1086,66 @@ % \begin{macrocode} \cs_new:Npn \@@_change_case_upper_el_hiatus:nnnw #1#2#3#4 \q_@@_recursion_stop - { - \@@_change_case_store:e - { \@@_change_case_codepoint:nn { upper } {#3} } + { \tl_if_head_is_N_type:nTF {#4} - { \@@_change_case_upper_el_hiatus:nnN } - { \@@_change_case_loop:nnw } + { \@@_change_case_upper_el_hiatus:nnnN {#3} } + { + \@@_change_case_store:e + { \@@_change_case_codepoint:nn { upper } {#3} } + \@@_change_case_loop:nnw + } {#1} {#2} #4 \q_@@_recursion_stop } -\cs_new:Npn \@@_change_case_upper_el_hiatus:nnN #1#2#3 +\cs_new:Npn \@@_change_case_upper_el_hiatus:nnnN #1#2#3#4 { - \token_if_cs:NTF #3 - { \@@_change_case_loop:nnw {#1} {#2} #3 } + \token_if_cs:NTF #4 + { + \@@_change_case_store:e + { \@@_change_case_codepoint:nn { upper } {#1} } + \@@_change_case_loop:nnw {#2} {#3} #4 + } { \@@_codepoint_process:nN - { \@@_change_case_upper_el_hiatus:nnn {#1} {#2} } #3 + { \@@_change_case_upper_el_hiatus:nnnn {#1} {#2} {#3} } #4 } } -\cs_new:Npn \@@_change_case_upper_el_hiatus:nnn #1#2#3 +\cs_new:Npn \@@_change_case_upper_el_hiatus:nnnn #1#2#3#4 { - \@@_change_case_if_takes_dialytika:nTF {#3} + \@@_change_case_if_takes_dialytika:nTF {#4} { - \@@_change_case_upper_el_dialytika:n {#3} - \@@_change_case_upper_el_gobble:nnw {#1} {#2} + \@@_change_case_store:e + { \@@_change_case_codepoint:nn { upper } {#1} } + \@@_change_case_upper_el_dialytika:n {#4} + \@@_change_case_upper_el_gobble:nnw {#2} {#3} } - { \@@_change_case_loop:nnw {#1} {#2} #3 } + { \@@_change_case_upper_el:nnn {#1} {#2} {#3} #4 } } % \end{macrocode} +% Handling the \emph{ypogegrammeni} output depends on the selected approach +% \begin{macrocode} +\cs_new:Npn \@@_change_case_upper_el_ypogegrammeni:n #1 + { + \@@_change_case_codepoint:nn { upper } {#1} + \codepoint_generate:nn { "0399 } + { \char_value_catcode:n { "0399 } } + } +\cs_new:cpn { @@_change_case_upper_el-x-iota_ypogegrammeni:n } #1 + { + \int_case:nnF + { \@@_codepoint_from_chars:Nw #1 } + { + { "0391 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FBC } } + { "03B1 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FBC } } + { "0397 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FCC } } + { "03B7 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FCC } } + { "03A9 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FFC } } + { "03C9 } { \@@_change_case_upper_el_ypogegrammeni_aux:n { "1FFC } } + } + { \@@_change_case_upper_el_ypogegrammeni:n {#1} } + } +\cs_new:Npn \@@_change_case_upper_el_ypogegrammeni_aux:n #1 + { \codepoint_generate:nn {#1} { \char_value_catcode:n {#1} } } +% \end{macrocode} % For clearing out trailing combining marks after we have dealt with % the first one. % \begin{macrocode} @@ -1316,7 +1347,8 @@ % \end{macro} % \end{macro} % \end{macro} -% \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:Nnnw} +% \begin{macro}[EXP] +% {\@@_change_case_boundary_upper_el:Nnnw, \@@_change_case_boundary_upper_el-x-iota:Nnnw} % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnN} % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnn} % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnnw} @@ -1333,6 +1365,8 @@ { \@@_change_case_loop:nnw } {#2} {#3} #4 \q_@@_recursion_stop } +\cs_new_eq:cN { @@_change_case_boundary_upper_el-x-iota:Nnnw } + \@@_change_case_boundary_upper_el:Nnnw \cs_new:Npn \@@_change_case_boundary_upper_el:nnN #1#2#3 { \token_if_cs:NTF #3 |