diff options
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3names.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3names.dtx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index e7b7a0e50a..0a4fe07d50 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-09-24} +% \date{Released 2020-10-05} % % \maketitle % @@ -1464,12 +1464,17 @@ % Here \enquote{smaller} refers to codepoint order which does not correspond to % the user expected order for most non-ASCII strings. % \begin{macrocode} +local minus_tok = token.new(string.byte'-', 12) +local zero_tok = token.new(string.byte'0', 12) +local one_tok = token.new(string.byte'1', 12) luacmd('tex_strcmp:D', function() local first = scan_string() local second = scan_string() - write(first == second and '0' - or first < second and '-1' - or '1') + if first < second then + put_next(minus_tok, one_tok) + else + put_next(first == second and zero_tok or one_tok) + end end, 'global') % \end{macrocode} % \end{macro} |