diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3tl.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3tl.dtx | 67 |
1 files changed, 54 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx index 1acb5e14625..d3bffb0668a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3tl.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -%% File: l3tl.dtx Copyright (C) 1990-2016 The LaTeX3 Project +%% File: l3tl.dtx Copyright (C) 1990-2017 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 this @@ -24,7 +24,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3tl.dtx 6842 2017-02-06 21:51:22Z joseph $ +\GetIdInfo$Id: l3tl.dtx 6967 2017-02-20 14:51:30Z bruno $ {L3 Token lists} %</driver|package> %<*driver> @@ -1021,6 +1021,22 @@ % \end{texnote} % \end{function} % +% \begin{function}[added = 2014-08-22, updated = 2015-08-01]{\tl_log:N, \tl_log:c} +% \begin{syntax} +% \cs{tl_log:N} \meta{tl~var} +% \end{syntax} +% Writes the content of the \meta{tl~var} in the log file. See also +% \cs{tl_show:N} which displays the result in the terminal. +% \end{function} +% +% \begin{function}[added = 2014-08-22, updated = 2015-08-07]{\tl_log:n} +% \begin{syntax} +% \cs{tl_log:n} \Arg{token list} +% \end{syntax} +% Writes the \meta{token list} in the log file. See also +% \cs{tl_show:n} which displays the result in the terminal. +% \end{function} +% % \section{Constant token lists} % % \begin{variable}{\c_empty_tl} @@ -1473,7 +1489,7 @@ \group_begin: \exp_args:No \etex_everyeof:D { \c_@@_rescan_marker_tl \exp_not:N } \int_compare:nNnT \tex_endlinechar:D = { 32 } - { \tex_endlinechar:D - \c_one } + { \int_set:Nn \tex_endlinechar:D { -1 } } \tex_newlinechar:D \tex_endlinechar:D #3 \scan_stop: \exp_args:No \@@_set_rescan:n { \tl_to_str:n {#4} } @@ -1570,7 +1586,7 @@ \tex_catcode:D `\^^@ = 12 \scan_stop: \cs_new_protected:Npn \@@_set_rescan:n #1 { - \int_compare:nNnTF \tex_newlinechar:D < \c_zero + \int_compare:nNnTF \tex_newlinechar:D < 0 { \use_ii:nn } { \char_set_lccode:nn { 0 } { \tex_newlinechar:D } @@ -1585,7 +1601,7 @@ \cs_new_protected:Npn \@@_set_rescan_single:nn #1 { \int_compare:nNnTF - { \char_value_catcode:n { `#1 } / \c_three } = \c_four + { \char_value_catcode:n { `#1 } / 3 } = 4 { \@@_set_rescan_single_aux:nn {#1} } { \int_compare:nNnTF { `#1 } < { `\~ } @@ -1598,7 +1614,7 @@ } \cs_new_protected:Npn \@@_set_rescan_single_aux:nn #1#2 { - \tex_endlinechar:D - \c_one + \int_set:Nn \tex_endlinechar:D { -1 } \use:x { \exp_not:N \use:n @@ -1618,7 +1634,7 @@ \char_value_catcode:n { \exp_last_unbraced:Nf ` \str_head:n {#2} ~ } } - = \c_ten { ~ } + = { 10 } { ~ } \exp_after:wN \@@_rescan:w \exp_after:wN \prg_do_nothing: \etex_scantokens:D { #2 #1 } @@ -2309,7 +2325,7 @@ \int_eval:n { 0 \tl_map_function:NN #1 \@@_count:n } } -\cs_new:Npn \@@_count:n #1 { + \c_one } +\cs_new:Npn \@@_count:n #1 { + 1 } \cs_generate_variant:Nn \tl_count:n { V , o } \cs_generate_variant:Nn \tl_count:N { c } % \end{macrocode} @@ -2897,14 +2913,14 @@ } \cs_new:Npn \@@_item_aux:nn #1#2 { - \int_compare:nNnTF {#1} < \c_zero - { \int_eval:n { \tl_count:n {#2} + \c_one + #1 } } + \int_compare:nNnTF {#1} < 0 + { \int_eval:n { \tl_count:n {#2} + 1 + #1 } } {#1} } \cs_new:Npn \@@_item:nn #1#2 { \__quark_if_recursion_tail_break:nN {#2} \__prg_break: - \int_compare:nNnTF {#1} = \c_one + \int_compare:nNnTF {#1} = 1 { \__prg_break:n { \exp_not:n {#2} } } { \exp_args:Nf \@@_item:nn { \int_eval:n { #1 - 1 } } } } @@ -2941,6 +2957,17 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\tl_log:N, \tl_log:c, \tl_log:n} +% Redirect output of \cs{tl_show:N} and \cs{tl_show:n} to the log. +% \begin{macrocode} +\cs_new_protected:Npn \tl_log:N + { \__msg_log_next: \tl_show:N } +\cs_generate_variant:Nn \tl_log:N { c } +\cs_new_protected:Npn \tl_log:n + { \__msg_log_next: \tl_show:n } +% \end{macrocode} +% \end{macro} +% % \subsection{Scratch token lists} % % \begin{variable}{\g_tmpa_tl, \g_tmpb_tl} @@ -2970,9 +2997,23 @@ % For removal after 2017-12-31. % \begin{macrocode} \cs_new_protected:Npn \tl_to_lowercase:n #1 - { \tex_lowercase:D {#1} } + { + \__msg_kernel_warning:nnxxx { kernel } { deprecated-command } + { 2017-12-31 } + { \token_to_str:N \tl_to_lowercase:n } + { } + \cs_gset_eq:NN \tl_to_lowercase:n \tex_lowercase:D + \tex_lowercase:D {#1} + } \cs_new_protected:Npn \tl_to_uppercase:n #1 - { \tex_uppercase:D {#1} } + { + \__msg_kernel_warning:nnxxx { kernel } { deprecated-command } + { 2017-12-31 } + { \token_to_str:N \tl_to_uppercase:n } + { } + \cs_gset_eq:NN \tl_to_uppercase:n \tex_uppercase:D + \tex_uppercase:D {#1} + } % \end{macrocode} % \end{macro} % |