summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx26
1 files changed, 21 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
index 44b024c95c0..5dd95a5e208 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3str/l3tl-analysis.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Released 2017/04/01}
+% \date{Released 2017/05/13}
%
% \maketitle
%
@@ -171,7 +171,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3tl-analysis}{2017/04/01}{}
+\ProvidesExplPackage{l3tl-analysis}{2017/05/13}{}
{L3 Experimental token list analysis}
% \end{macrocode}
%
@@ -390,15 +390,17 @@
% must appear in its string representation. The string is shortened
% a little by making the escape character unprintable. The active
% space must be disabled separately (the loop skips over it otherwise),
-% and we end the loop by feeding an odd non-\texttt{N}-type
-% argument to the looping macro.
+% and we end the loop by feeding an odd non-\texttt{N}-type argument
+% to the looping macro. For \pTeX{} and \upTeX{} we skip characters
+% beyond $[0,255]$ because \tn{lccode} only allows those values.
% \begin{macrocode}
\cs_new_protected:Npn \@@_setup:n #1
{
\int_set:Nn \tex_escapechar:D { -1 }
\exp_after:wN \@@_disable_loop:N
- \tl_to_str:n {#1} { ~ } { ? ~ \__prg_break: }
+ \tl_to_str:n {#1} { ~ } { ? \__prg_break: }
\__prg_break_point:
+ \scan_stop:
}
\group_begin:
\char_set_catcode_active:N \^^@
@@ -408,6 +410,20 @@
\tex_lowercase:D { \tex_let:D ^^@ } \tex_undefined:D
\@@_disable_loop:N
}
+ \bool_lazy_or:nnT
+ { \sys_if_engine_ptex_p: }
+ { \sys_if_engine_uptex_p: }
+ {
+ \cs_gset_protected:Npn \@@_disable_loop:N #1
+ {
+ \use_none:n #1 \scan_stop:
+ \if_int_compare:w 256 > `#1 \exp_stop_f:
+ \tex_lccode:D 0 = `#1 ~
+ \tex_lowercase:D { \tex_let:D ^^@ } \tex_undefined:D
+ \fi:
+ \@@_disable_loop:N
+ }
+ }
\group_end:
% \end{macrocode}
% \end{macro}