summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3token.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3token.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3token.dtx182
1 files changed, 3 insertions, 179 deletions
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index 4e7e1c4745..bf882c57e4 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2023-11-09}
+% \date{Released 2023-12-08}
%
% \maketitle
%
@@ -1132,9 +1132,9 @@
% \item Some frozen tokens can only be accessed in interactive
% sessions: |\cr|, |\right|, |\endgroup|, |\fi|, |\inaccessible|.
% \item In \LuaTeX{}, there is also the strange case of \enquote{bytes}
-% |^^^^^^1100|$x$$y$ where $x,y$ are any two lowercase hexadecimal
+% |^^^^^^1100|$xy$ where $x,y$ are any two lowercase hexadecimal
% digits, so that the hexadecimal number ranges from
-% $"\text{110000}=1114112$ to~$"\text{1100ff}=1114367$. These are
+% |"|$11\,0000=1\,114\,112$ to~|"|$110\,0\mathrm{ff}=1\,114\,367$. These are
% used to output individual bytes to files, rather than UTF-8. For
% the purposes of token comparisons they behave like non-expandable
% primitive control sequences (\emph{not characters}) whose
@@ -1219,28 +1219,6 @@
% characters at the start of the argument are \emph{not} ignored in this
% case (and they prevent brace-stripping).
%
-% \section{Deprecated functions}
-%
-% \begin{function}[added = 2020-01-09, EXP]
-% {
-% \char_lowercase:N, \char_uppercase:N,
-% \char_titlecase:N, \char_foldcase:N,
-% \char_str_lowercase:N, \char_str_uppercase:N,
-% \char_str_titlecase:N, \char_str_foldcase:N
-% }
-% \begin{syntax}
-% \cs{char_lowercase:N} \meta{char}
-% \end{syntax}
-% Converts the \meta{char} to the equivalent case-changed character
-% as detailed by the function name (see \cs{str_foldcase:n}
-% and \cs{text_titlecase_all:n} for details of these terms). The case mapping
-% is carried out with no context-dependence (\emph{cf.}~\cs{text_uppercase:n},
-% \emph{etc.}) The \texttt{str} versions always generate \enquote{other}
-% (category code $12$) characters, whilst the standard versions generate
-% characters with the category code of the \meta{char} (i.e.~only
-% the character code changes).
-% \end{function}
-%
% \end{documentation}
%
% \begin{implementation}
@@ -1688,160 +1666,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]
-% {
-% \char_lowercase:N, \char_uppercase:N,
-% \char_titlecase:N, \char_foldcase:N
-% }
-% \begin{macro}[EXP]{\@@_change_case:nN}
-% \begin{macro}[EXP]{\@@_change_case:nnnN}
-% \begin{macro}[EXP]{\@@_change_case_auxi:nN, \@@_change_case_auxii:nN}
-% \begin{macro}[EXP]{\@@_change_case_catcode:N}
-% \begin{macro}[EXP]
-% {
-% \char_str_lowercase:N, \char_str_uppercase:N,
-% \char_str_titlecase:N, \char_str_foldcase:N
-% }
-% \begin{macro}[EXP]{\@@_str_change_case:nN, \@@_str_change_case_aux:nN}
-% \begin{macro}[EXP]{\@@_str_change_case:nnnN}
-% \begin{macro}[EXP]{\@@_str_change_case:n}
-% To ensure that the category codes produced are predictable, every character
-% is re-generated even if it is otherwise unchanged.
-% \begin{macrocode}
-\cs_new:Npn \char_lowercase:N
- { \@@_change_case:nN { lowercase } }
-\cs_new:Npn \char_uppercase:N
- { \@@_change_case:nN { uppercase } }
-\cs_new:Npn \char_titlecase:N
- { \@@_change_case:nN { titlecase } }
-\cs_new:Npn \char_foldcase:N
- { \@@_change_case:nN { casefold } }
-\cs_new:Npn \@@_change_case:nN #1#2
- {
- \int_compare:nNnTF {`#2} = { `\ }
- { ~ }
- {
- \exp_args:Ne \@@_change_case_auxi:nN
- { \__kernel_codepoint_case:nn {#1} {`#2} } #2
- }
- }
-\cs_new:Npn \@@_change_case_auxi:nN #1#2
- { \use:e { \@@_change_case:nnnN #1 #2 } }
-\cs_new:Npn \@@_change_case:nnnN #1#2#3#4
- {
- \int_compare:nNnTF {#1} = {`#4}
- { \exp_not:n {#4} }
- {
- \@@_change_case_auxii:nN {#1} {#4}
- \tl_if_blank:nF {#2}
- {
- \@@_change_case_auxii:nN {#2} {#4}
- \tl_if_blank:nF {#3}
- { \@@_change_case_auxii:nN {#3} {#4} }
- }
- }
- }
-\cs_new:Npn \@@_change_case_auxii:nN #1#2
- {
- \char_generate:nn {#1}
- { \@@_change_case_catcode:N #2 }
- }
-\bool_lazy_or:nnF
- { \sys_if_engine_luatex_p: }
- { \sys_if_engine_xetex_p: }
- {
- \cs_gset:Npn \@@_change_case_auxii:nN #1#2
- {
- \int_compare:nNnTF {#1} < { "80 }
- {
- \char_generate:nn {#1}
- { \@@_change_case_catcode:N #2 }
- }
- { \exp_not:n {#2} }
- }
- }
-\cs_new:Npn \@@_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:
- }
-% \end{macrocode}
-% Same story for the string version, except category code is easier
-% to follow. This of course makes this version faster.
-% \begin{macrocode}
-\cs_new:Npn \char_str_lowercase:N
- { \@@_str_change_case:nN { lowercase } }
-\cs_new:Npn \char_str_uppercase:N
- { \@@_str_change_case:nN { uppercase } }
-\cs_new:Npn \char_str_titlecase:N
- { \@@_str_change_case:nN { titlecase } }
-\cs_new:Npn \char_str_foldcase:N
- { \@@_str_change_case:nN { casefold } }
-\cs_new:Npn \@@_str_change_case:nN #1#2
- {
- \int_compare:nNnTF {`#2} = { `\ }
- { ~ }
- {
- \exp_args:Ne \@@_str_change_case_aux:nN
- { \__kernel_codepoint_case:nn {#1} {`#2} } #2
- }
- }
-\cs_new:Npn \@@_str_change_case_aux:nN #1#2
- { \use:e { \@@_str_change_case:nnnN #1 #2 } }
-\cs_new:Npn \@@_str_change_case:nnnN #1#2#3#4
- {
- \int_compare:nNnTF {#1} = {`#4}
- { \tl_to_str:n {#4} }
- {
- \@@_str_change_case:n {#1}
- \tl_if_blank:nF {#2}
- {
- \@@_str_change_case:n {#2}
- \tl_if_blank:nF {#3}
- { \@@_str_change_case:n {#3} }
- }
- }
- }
-\cs_new:Npn \@@_str_change_case:n #1
- { \char_generate:nn {#1} { 12 } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{variable}{\c_catcode_active_space_tl}
% While \cs{char_generate:nn} can produce active characters in some
% engines it cannot in general. It would be possible to simply change