diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3int.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3int.sty | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty index af6b2abb1a8..8196f23e1eb 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3int.dtx 2812 2011-09-12 09:19:26Z bruno $ +\GetIdInfo$Id: l3int.dtx 2896 2011-10-09 20:36:50Z joseph $ {L3 Experimental integers} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -339,17 +339,25 @@ { \int_do_until:nNnn {#1} #2 {#3} {#4} } } \cs_new_nopar:Npn \int_to_arabic:n #1 { \int_eval:n {#1} } -\cs_new_nopar:Npn \int_to_symbols:nnn #1#2#3 +\cs_new:Npn \int_to_symbols:nnn #1#2#3 { \int_compare:nNnTF {#1} > {#2} { - \exp_args:Nf \int_to_symbols:nnn - { \int_div_truncate:nn { #1 - 1 } {#2} } {#2} {#3} - \exp_args:Nf \prg_case_int:nnn - { \int_eval:n { 1 + \int_mod:nn { #1 - 1 } {#2} } } - {#3} { } + \exp_args:NNo \exp_args:No \int_to_symbols_aux:nnnn + { + \prg_case_int:nnn + { 1 + \int_mod:nn { #1 - 1 } {#2} } + {#3} { } + } + {#1} {#2} {#3} } - { \exp_args:Nf \prg_case_int:nnn { \int_eval:n {#1} } {#3} { } } + { \prg_case_int:nnn {#1} {#3} { } } + } +\cs_new:Npn \int_to_symbols_aux:nnnn #1#2#3#4 + { + \exp_args:Nf \int_to_symbols:nnn + { \int_div_truncate:nn { #2 - 1 } {#3} } {#3} {#4} + #1 } \cs_new:Npn \int_to_alph:n #1 { @@ -473,7 +481,7 @@ \or: X \or: Y \or: Z - \else: #1 + \else: \int_value:w \int_eval:w #1 \exp_after:wN \int_eval_end: \fi: } \cs_new:Npn \int_to_binary:n #1 |