diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3skip.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3skip.sty | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty index 20f3c09ebcd..419536abeab 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty @@ -47,7 +47,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3bootstrap} -\GetIdInfo$Id: l3skip.dtx 4444 2013-01-13 20:27:20Z bruno $ +\GetIdInfo$Id: l3skip.dtx 4581 2013-07-28 08:38:50Z joseph $ {L3 Dimensions and skips} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -176,18 +176,33 @@ #1 \reverse_if:N #2 > #3 = { #1 #2 < #3 } \cs_new:Npn \__dim_compare_end:w #1 \prg_return_false: #2 \q_stop { #1 \prg_return_false: \else: \prg_return_true: \fi: } -\cs_new:Npn \dim_case:nnn #1 +\cs_new:Npn \dim_case:nnTF #1 { \tex_romannumeral:D - \exp_args:Nf \__dim_case_aux:nnn { \dim_eval:n {#1} } + \exp_args:Nf \__dim_case:nnTF { \dim_eval:n {#1} } } -\cs_new:Npn \__dim_case_aux:nnn #1#2#3 - { \__dim_case_aux:nw {#1} #2 {#1} {#3} \q_recursion_stop } -\cs_new:Npn \__dim_case_aux:nw #1#2#3 +\cs_new:Npn \dim_case:nnT #1#2#3 + { + \tex_romannumeral:D + \exp_args:Nf \__dim_case:nnTF { \dim_eval:n {#1} } {#2} {#3} { } + } +\cs_new:Npn \dim_case:nnF #1#2 + { + \tex_romannumeral:D + \exp_args:Nf \__dim_case:nnTF { \dim_eval:n {#1} } {#2} { } + } +\cs_new:Npn \dim_case:nn #1#2 + { + \tex_romannumeral:D + \exp_args:Nf \__dim_case:nnTF { \dim_eval:n {#1} } {#2} { } { } + } +\cs_new:Npn \__dim_case:nnTF #1#2#3#4 + { \__dim_case:nw {#1} #2 {#1} { } \q_mark {#3} \q_mark {#4} \q_stop } +\cs_new:Npn \__dim_case:nw #1#2#3 { \dim_compare:nNnTF {#1} = {#2} { \__dim_case_end:nw {#3} } - { \__dim_case_aux:nw {#1} } + { \__dim_case:nw {#1} } } \cs_new_eq:NN \__dim_case_end:nw \__prg_case_end:nw \cs_set:Npn \dim_while_do:nn #1#2 @@ -425,6 +440,7 @@ \muskip_new:N \l_tmpb_muskip \muskip_new:N \g_tmpa_muskip \muskip_new:N \g_tmpb_muskip +\cs_new_eq:NN \dim_case:nnn \dim_case:nnF %% %% %% End of file `l3skip.sty'. |