diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3skip.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3skip.sty | 77 |
1 files changed, 50 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3skip.sty b/Master/texmf-dist/tex/latex/expl3/l3skip.sty index 53462fcaea7..210d9e0c86b 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3skip.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3skip.sty @@ -48,42 +48,50 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3skip.dtx 1362 2009-05-28 20:19:21Z joseph $ +\GetIdInfo$Id: l3skip.dtx 1867 2010-03-23 13:03:12Z will $ {L3 Experimental skip registers} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} \package_check_loaded_expl: -\cs_new_nopar:Npn \skip_new:N #1 { +\cs_new_protected_nopar:Npn \skip_new:N #1 { \chk_if_free_cs:N #1 \newskip #1 } +\cs_new_protected_nopar:Npn \skip_new_local:N #1 { + \chk_if_free_cs:N #1 + \int_compare:nNnTF + \tex_currentgrouplevel:D = 0 + \newskip \locskip + #1 +} \cs_generate_variant:Nn \skip_new:N {c} -\cs_new_nopar:Npn \skip_set:Nn #1#2 { +\cs_generate_variant:Nn \skip_new_local:N {c} +\cs_new_protected_nopar:Npn \skip_set:Nn #1#2 { #1\skip_eval:n{#2} } -\cs_new_nopar:Npn \skip_gset:Nn { +\cs_new_protected_nopar:Npn \skip_gset:Nn { \pref_global:D \skip_set:Nn } \cs_generate_variant:Nn \skip_set:Nn {cn} \cs_generate_variant:Nn \skip_gset:Nn {cn} -\cs_new_nopar:Npn \skip_zero:N #1{ +\cs_new_protected_nopar:Npn \skip_zero:N #1{ #1\c_zero_skip \scan_stop: } -\cs_new_nopar:Npn \skip_gzero:N { +\cs_new_protected_nopar:Npn \skip_gzero:N { \pref_global:D \skip_zero:N } \cs_generate_variant:Nn \skip_zero:N {c} \cs_generate_variant:Nn \skip_gzero:N {c} -\cs_new_nopar:Npn \skip_add:Nn #1#2 { +\cs_new_protected_nopar:Npn \skip_add:Nn #1#2 { \tex_advance:D#1 by \skip_eval:n{#2} } \cs_generate_variant:Nn \skip_add:Nn {cn} -\cs_new_nopar:Npn \skip_sub:Nn #1#2{ +\cs_new_protected_nopar:Npn \skip_sub:Nn #1#2{ \tex_advance:D#1-\skip_eval:n{#2} } -\cs_new_nopar:Npn \skip_gadd:Nn { +\cs_new_protected_nopar:Npn \skip_gadd:Nn { \pref_global:D \skip_add:Nn } @@ -102,7 +110,7 @@ \cs_generate_variant:Nn \skip_use:N {c} \cs_new_eq:NN \skip_show:N \tex_showthe:D \cs_new_nopar:Npn \skip_show:c #1 { \skip_show:N \cs:w #1 \cs_end: } -\cs_new_nopar:Npn \skip_eval:n #1 { \etex_glueexpr:D #1 \scan_stop: } +\cs_new_protected_nopar:Npn \skip_eval:n #1 { \etex_glueexpr:D #1 \scan_stop: } %%\chk_if_free_cs:N \l_tmpa_skip %%\tex_skipdef:D\l_tmpa_skip 255 %currently taken up by \skip@ \skip_new:N \l_tmpa_skip @@ -130,28 +138,36 @@ #4 = \etex_glueshrink:D #1 \scan_stop: } } -\cs_new_nopar:Npn \dim_new:N #1 { +\cs_new_protected_nopar:Npn \dim_new:N #1 { \chk_if_free_cs:N #1 \newdimen #1 } +\cs_new_protected_nopar:Npn \dim_new_local:N #1 { + \chk_if_free_cs:N #1 + \int_compare:nNnTF + \tex_currentgrouplevel:D = 0 + \newdimen \locdimen + #1 +} \cs_generate_variant:Nn \dim_new:N {c} -\cs_new_nopar:Npn \dim_set:Nn #1#2 { #1~ \dim_eval:n{#2} } +\cs_generate_variant:Nn \dim_new_local:N {c} +\cs_new_protected_nopar:Npn \dim_set:Nn #1#2 { #1~ \dim_eval:n{#2} } \cs_generate_variant:Nn \dim_set:Nn {cn,Nc} -\cs_new_nopar:Npn \dim_gset:Nn { \pref_global:D \dim_set:Nn } +\cs_new_protected_nopar:Npn \dim_gset:Nn { \pref_global:D \dim_set:Nn } \cs_generate_variant:Nn \dim_gset:Nn {cn,Nc,cc} -\cs_new_nopar:Npn \dim_zero:N #1 { #1\c_zero_skip } +\cs_new_protected_nopar:Npn \dim_zero:N #1 { #1\c_zero_skip } \cs_generate_variant:Nn \dim_zero:N {c} -\cs_new_nopar:Npn \dim_gzero:N { \pref_global:D \dim_zero:N } +\cs_new_protected_nopar:Npn \dim_gzero:N { \pref_global:D \dim_zero:N } \cs_generate_variant:Nn \dim_gzero:N {c} -\cs_new_nopar:Npn \dim_add:Nn #1#2{ +\cs_new_protected_nopar:Npn \dim_add:Nn #1#2{ \tex_advance:D#1 by \dim_eval:n{#2}\scan_stop: } \cs_generate_variant:Nn \dim_add:Nn {cn,Nc} -\cs_new_nopar:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn } +\cs_new_protected_nopar:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn } \cs_generate_variant:Nn \dim_gadd:Nn {cn} -\cs_new_nopar:Npn \dim_sub:Nn #1#2 { \tex_advance:D#1-#2\scan_stop: } +\cs_new_protected_nopar:Npn \dim_sub:Nn #1#2 { \tex_advance:D#1-#2\scan_stop: } \cs_generate_variant:Nn \dim_sub:Nn {cn,Nc} -\cs_new_nopar:Npn \dim_gsub:Nn { \pref_global:D \dim_sub:Nn } +\cs_new_protected_nopar:Npn \dim_gsub:Nn { \pref_global:D \dim_sub:Nn } \cs_generate_variant:Nn \dim_gsub:Nn {cn} \cs_new_eq:NN \dim_use:N \tex_the:D \cs_generate_variant:Nn \dim_use:N {c} @@ -165,7 +181,7 @@ \dim_new:N \g_tmpb_dim \cs_new_eq:NN \c_zero_dim \c_zero_skip \cs_new_eq:NN \c_max_dim \c_max_skip -\cs_new_nopar:Npn \dim_eval:n #1 { \etex_dimexpr:D #1 \scan_stop: } +\cs_new_protected_nopar:Npn \dim_eval:n #1 { \etex_dimexpr:D #1 \scan_stop: } \cs_new_eq:NN \if_dim:w \tex_ifdim:D \prg_new_conditional:Nnn \dim_compare:nNn {p,TF,T,F} { \if_dim:w \dim_eval:n {#1} #2 \dim_eval:n {#3} @@ -183,16 +199,23 @@ \cs_new_nopar:Npn \dim_do_until:nNnn #1#2#3#4{ #4 \dim_compare:nNnF {#1}#2{#3}{\dim_do_until:nNnn {#1}#2{#3}{#4}} } -\cs_new_nopar:Npn \muskip_new:N #1 { +\cs_new_protected_nopar:Npn \muskip_new:N #1 { \chk_if_free_cs:N #1 \newmuskip #1 } -\cs_new_nopar:Npn \muskip_set:Nn#1#2{#1\etex_muexpr:D#2\scan_stop:} -\cs_new_nopar:Npn \muskip_gset:Nn{\pref_global:D\muskip_set:Nn} -\cs_new_nopar:Npn \muskip_add:Nn#1#2{\tex_advance:D#1\etex_muexpr:D#2\scan_stop:} -\cs_new_nopar:Npn \muskip_gadd:Nn{\pref_global:D\muskip_add:Nn} -\cs_new_nopar:Npn \muskip_sub:Nn#1#2{\tex_advance:D#1-\etex_muexpr:D#2\scan_stop:} -\cs_new_nopar:Npn \muskip_gsub:Nn{\pref_global:D\muskip_sub:Nn} +\cs_new_protected_nopar:Npn \muskip_new_local:N #1 { + \chk_if_free_cs:N #1 + \int_compare:nNnTF + \tex_currentgrouplevel:D = 0 + \newmuskip \locmuskip + #1 +} +\cs_new_protected_nopar:Npn \muskip_set:Nn#1#2{#1\etex_muexpr:D#2\scan_stop:} +\cs_new_protected_nopar:Npn \muskip_gset:Nn{\pref_global:D\muskip_set:Nn} +\cs_new_protected_nopar:Npn \muskip_add:Nn#1#2{\tex_advance:D#1\etex_muexpr:D#2\scan_stop:} +\cs_new_protected_nopar:Npn \muskip_gadd:Nn{\pref_global:D\muskip_add:Nn} +\cs_new_protected_nopar:Npn \muskip_sub:Nn#1#2{\tex_advance:D#1-\etex_muexpr:D#2\scan_stop:} +\cs_new_protected_nopar:Npn \muskip_gsub:Nn{\pref_global:D\muskip_sub:Nn} \cs_new_eq:NN \muskip_use:N \tex_the:D %% %% |