summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-07-31 18:27:06 +0000
committerKarl Berry <karl@freefriends.org>2011-07-31 18:27:06 +0000
commitdac945b204407dae96f70ec228206516093156d7 (patch)
tree02ca182689947e45dec95e17ba08b503c959bd17 /Master/texmf-dist/tex/latex/l3kernel/l3skip.sty
parentc1840548792cfbc7c9f746da1d53d89b94406e72 (diff)
l3kernel (5jun11)
git-svn-id: svn://tug.org/texlive/trunk@23282 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3skip.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3skip.sty332
1 files changed, 332 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty
new file mode 100644
index 00000000000..ae4a46fc805
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3skip.sty
@@ -0,0 +1,332 @@
+%%
+%% This is file `l3skip.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% l3skip.dtx (with options: `package')
+%%
+%% EXPERIMENTAL CODE
+%%
+%% Do not distribute this file without also distributing the
+%% source files specified above.
+%%
+%% Do not distribute a modified version of this file.
+%%
+%% File: l3skip.dtx Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
+%%
+%% It may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in the file
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "expl3 bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% The released version of this bundle is available from CTAN.
+%%
+%% -----------------------------------------------------------------------
+%%
+%% The development version of the bundle can be found at
+%%
+%% http://www.latex-project.org/svnroot/experimental/trunk/
+%%
+%% for those people who are interested.
+%%
+%%%%%%%%%%%
+%% NOTE: %%
+%%%%%%%%%%%
+%%
+%% Snapshots taken from the repository represent work in progress and may
+%% not work or may contain conflicting material! We therefore ask
+%% people _not_ to put them into distributions, archives, etc. without
+%% prior consultation with the LaTeX3 Project.
+%%
+%% -----------------------------------------------------------------------
+\RequirePackage{l3names}
+\GetIdInfo$Id: l3skip.dtx 2478 2011-06-19 21:34:23Z joseph $
+ {L3 Experimental dimensions and skips}
+\ProvidesExplPackage
+ {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
+\package_check_loaded_expl:
+\cs_new_eq:NN \if_dim:w \tex_ifdim:D
+\cs_new_eq:NN \dim_eval:w \etex_dimexpr:D
+\cs_new_eq:NN \dim_eval_end: \tex_relax:D
+\cs_new_protected_nopar:Npn \dim_new:N #1
+ {
+ \chk_if_free_cs:N #1
+ \newdimen #1
+ }
+\cs_generate_variant:Nn \dim_new:N { c }
+\cs_new_protected_nopar:Npn \dim_zero:N #1 { #1 \c_zero_dim }
+\cs_new_protected_nopar:Npn \dim_gzero:N { \pref_global:D \dim_zero:N }
+\cs_generate_variant:Nn \dim_zero:N { c }
+\cs_generate_variant:Nn \dim_gzero:N { c }
+\cs_new_protected_nopar:Npn \dim_set:Nn #1#2
+ { #1 ~ \dim_eval:w #2 \dim_eval_end: }
+\cs_new_protected_nopar:Npn \dim_gset:Nn { \pref_global:D \dim_set:Nn }
+\cs_generate_variant:Nn \dim_set:Nn { c }
+\cs_generate_variant:Nn \dim_gset:Nn { c }
+\cs_new_protected_nopar:Npn \dim_set_eq:NN #1#2 { #1 = #2 }
+\cs_generate_variant:Nn \dim_set_eq:NN { c }
+\cs_generate_variant:Nn \dim_set_eq:NN { Nc , cc }
+\cs_new_protected_nopar:Npn \dim_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_generate_variant:Nn \dim_gset_eq:NN { c }
+\cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc }
+\cs_new_protected_nopar:Npn \dim_set_max:Nn #1#2
+ { \dim_compare:nNnT {#1} < {#2} { \dim_set:Nn #1 {#2} } }
+\cs_new_protected_nopar:Npn \dim_gset_max:Nn #1#2
+ { \dim_compare:nNnT {#1} < {#2} { \dim_gset:Nn #1 {#2} } }
+\cs_new_protected_nopar:Npn \dim_set_min:Nn #1#2
+ { \dim_compare:nNnT {#1} > {#2} { \dim_set:Nn #1 {#2} } }
+\cs_new_protected_nopar:Npn \dim_gset_min:Nn #1#2
+ { \dim_compare:nNnT {#1} > {#2} { \dim_gset:Nn #1 {#2} } }
+\cs_generate_variant:Nn \dim_set_max:Nn { c }
+\cs_generate_variant:Nn \dim_gset_max:Nn { c }
+\cs_generate_variant:Nn \dim_set_min:Nn { c }
+\cs_generate_variant:Nn \dim_gset_min:Nn { c }
+\cs_new_protected_nopar:Npn \dim_add:Nn #1#2
+ { \tex_advance:D #1 by \dim_eval:w #2 \dim_eval_end: }
+\cs_new_protected_nopar:Npn \dim_gadd:Nn { \pref_global:D \dim_add:Nn }
+\cs_generate_variant:Nn \dim_add:Nn { c }
+\cs_generate_variant:Nn \dim_gadd:Nn { c }
+\cs_new_protected_nopar:Npn \dim_sub:Nn #1#2
+ { \tex_advance:D #1 by - \dim_eval:w #2 \dim_eval_end: }
+\cs_new_protected_nopar:Npn \dim_gsub:Nn { \pref_global:D \dim_sub:Nn }
+\cs_generate_variant:Nn \dim_sub:Nn { c }
+\cs_generate_variant:Nn \dim_gsub:Nn { c }
+\cs_new_nopar:Npn \dim_ratio:nn #1#2
+ { \dim_ratio_aux:n {#1} / \dim_ratio_aux:n {#2} }
+\cs_new_nopar:Npn \dim_ratio_aux:n #1
+ { \exp_after:wN \int_value:w \dim_eval:w #1 \dim_eval_end: }
+\prg_new_conditional:Npnn \dim_compare:nNn #1#2#3 { p , T , F , TF }
+ {
+ \if_dim:w \dim_eval:w #1 #2 \dim_eval:w #3 \dim_eval_end:
+ \prg_return_true: \else: \prg_return_false: \fi:
+ }
+\prg_new_conditional:Npnn \dim_compare:n #1 { p , T , F , TF }
+ {
+ \exp_after:wN \dim_compare_aux:wNN \dim_use:N \dim_eval:w #1
+ \dim_eval_end:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\exp_args:Nno \use:nn
+ { \cs_new:Npn \dim_compare_aux:wNN #1 }
+ { \tl_to_str:n { pt } }
+ #2 #3
+ {
+ \use:c
+ {
+ dim_compare_ #2
+ \if_meaning:w = #3 = \fi:
+ :nw
+ }
+ { #1 pt } #3
+ }
+\cs_new:cpn { dim_compare_<:nw } #1 { \if_dim:w #1 < \dim_eval:w }
+\cs_new:cpn { dim_compare_=:nw } #1 { \if_dim:w #1 = \dim_eval:w }
+\cs_new:cpn { dim_compare_>:nw } #1 { \if_dim:w #1 > \dim_eval:w }
+\cs_new:cpn {dim_compare_==:nw} #1#2 { \if_dim:w #1 = \dim_eval:w }
+\cs_new:cpn {dim_compare_<=:nw} #1#2 {\reverse_if:N \if_dim:w #1 > \dim_eval:w}
+\cs_new:cpn {dim_compare_!=:nw} #1#2 {\reverse_if:N \if_dim:w #1 = \dim_eval:w}
+\cs_new:cpn {dim_compare_>=:nw} #1#2 {\reverse_if:N \if_dim:w #1 < \dim_eval:w}
+\cs_set:Npn \dim_while_do:nn #1#2
+ {
+ \dim_compare:nT {#1}
+ {
+ #2
+ \dim_while_do:nn {#1} {#2}
+ }
+ }
+\cs_set:Npn \dim_until_do:nn #1#2
+ {
+ \dim_compare:nF {#1}
+ {
+ #2
+ \dim_until_do:nn {#1} {#2}
+ }
+ }
+\cs_set:Npn \dim_do_while:nn #1#2
+ {
+ #2
+ \dim_compare:nT {#1}
+ { \dim_do_while:nNnn {#1} {#2} }
+ }
+\cs_set:Npn \dim_do_until:nn #1#2
+ {
+ #2
+ \dim_compare:nF {#1}
+ { \dim_do_until:nn {#1} {#2} }
+ }
+\cs_set:Npn \dim_while_do:nNnn #1#2#3#4
+ {
+ \dim_compare:nNnT {#1} #2 {#3}
+ {
+ #4
+ \dim_while_do:nNnn {#1} #2 {#3} {#4}
+ }
+ }
+\cs_set:Npn \dim_until_do:nNnn #1#2#3#4
+ {
+ \dim_compare:nNnF {#1} #2 {#3}
+ {
+ #4
+ \dim_until_do:nNnn {#1} #2 {#3} {#4}
+ }
+ }
+\cs_set:Npn \dim_do_while:nNnn #1#2#3#4
+ {
+ #4
+ \dim_compare:nNnT {#1} #2 {#3}
+ { \dim_do_while:nNnn {#1} #2 {#3} {#4} }
+ }
+\cs_set: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 \dim_eval:n #1
+ { \dim_use:N \dim_eval:w #1 \dim_eval_end: }
+\cs_new_eq:NN \dim_use:N \tex_the:D
+\cs_generate_variant:Nn \dim_use:N { c }
+\cs_new_eq:NN \dim_show:N \kernel_register_show:N
+\cs_generate_variant:Nn \dim_show:N { c }
+\cs_new_eq:NN \c_zero_dim \z@
+\cs_new_eq:NN \c_max_dim \maxdimen
+\dim_new:N \l_tmpa_dim
+\dim_new:N \l_tmpb_dim
+\dim_new:N \l_tmpc_dim
+\dim_new:N \g_tmpa_dim
+\dim_new:N \g_tmpb_dim
+\cs_new_protected_nopar:Npn \skip_new:N #1
+ {
+ \chk_if_free_cs:N #1
+ \newskip #1
+ }
+\cs_generate_variant:Nn \skip_new:N { c }
+\cs_new_protected_nopar:Npn \skip_zero:N #1 { #1 \c_zero_skip }
+\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_protected_nopar:Npn \skip_set:Nn #1#2
+ { #1 ~ \etex_glueexpr:D #2 \scan_stop: }
+\cs_new_protected_nopar:Npn \skip_gset:Nn { \pref_global:D \skip_set:Nn }
+\cs_generate_variant:Nn \skip_set:Nn { c }
+\cs_generate_variant:Nn \skip_gset:Nn { c }
+\cs_new_protected_nopar:Npn \skip_set_eq:NN #1#2 { #1 = #2 }
+\cs_generate_variant:Nn \skip_set_eq:NN { c }
+\cs_generate_variant:Nn \skip_set_eq:NN { Nc , cc }
+\cs_new_protected_nopar:Npn \skip_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_generate_variant:Nn \skip_gset_eq:NN { c }
+\cs_generate_variant:Nn \skip_gset_eq:NN { Nc , cc }
+\cs_new_protected_nopar:Npn \skip_add:Nn #1#2
+ { \tex_advance:D #1 by \etex_glueexpr:D #2 \scan_stop: }
+\cs_new_protected_nopar:Npn \skip_gadd:Nn { \pref_global:D \skip_add:Nn }
+\cs_generate_variant:Nn \skip_add:Nn { c }
+\cs_generate_variant:Nn \skip_gadd:Nn { c }
+\cs_new_protected_nopar:Npn \skip_sub:Nn #1#2
+ { \tex_advance:D #1 by - \etex_glueexpr:D #2 \scan_stop: }
+\cs_new_protected_nopar:Npn \skip_gsub:Nn { \pref_global:D \skip_sub:Nn }
+\cs_generate_variant:Nn \skip_sub:Nn { c }
+\cs_generate_variant:Nn \skip_gsub:Nn { c }
+\prg_new_conditional:Npnn \skip_if_eq:nn #1#2 { p , T , F , TF }
+ {
+ \if_int_compare:w
+ \pdftex_strcmp:D { \skip_eval:n { #1 } } { \skip_eval:n { #2 } }
+ = \c_zero
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\prg_new_conditional:Npnn \skip_if_infinite_glue:n #1 { p , T , F , TF }
+ {
+ \bool_if:nTF
+ {
+ \int_compare_p:nNn { \etex_gluestretchorder:D #1 } > \c_zero ||
+ \int_compare_p:nNn { \etex_glueshrinkorder:D #1 } > \c_zero
+ }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\cs_new_nopar:Npn \skip_eval:n #1
+ { \skip_use:N \etex_glueexpr:D #1 \scan_stop: }
+\cs_new_eq:NN \skip_use:N \tex_the:D
+\cs_generate_variant:Nn \skip_use:N { c }
+\cs_new_eq:NN \skip_horizontal:N \tex_hskip:D
+\cs_new_nopar:Npn \skip_horizontal:n #1
+ { \skip_horizontal:N \etex_glueexpr:D #1 \scan_stop: }
+\cs_new_eq:NN \skip_vertical:N \tex_vskip:D
+\cs_new_nopar:Npn \skip_vertical:n #1
+ { \skip_vertical:N \etex_glueexpr:D #1 \scan_stop: }
+\cs_generate_variant:Nn \skip_horizontal:N { c }
+\cs_generate_variant:Nn \skip_vertical:N { c }
+\cs_new_eq:NN \skip_show:N \kernel_register_show:N
+\cs_generate_variant:Nn \skip_show:N { c }
+\cs_new_eq:NN \c_zero_skip \c_zero_dim
+\cs_new_eq:NN \c_max_skip \c_max_dim
+\skip_new:N \l_tmpa_skip
+\skip_new:N \l_tmpb_skip
+\skip_new:N \l_tmpc_skip
+\skip_new:N \g_tmpa_skip
+\skip_new:N \g_tmpb_skip
+\cs_new_protected_nopar:Npn \muskip_new:N #1
+ {
+ \chk_if_free_cs:N #1
+ \newmuskip #1
+ }
+\cs_generate_variant:Nn \muskip_new:N { c }
+\cs_new_protected_nopar:Npn \muskip_zero:N #1
+ { #1 \c_zero_muskip }
+\cs_new_protected_nopar:Npn \muskip_gzero:N { \pref_global:D \muskip_zero:N }
+\cs_generate_variant:Nn \muskip_zero:N { c }
+\cs_generate_variant:Nn \muskip_gzero:N { c }
+\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_generate_variant:Nn \muskip_set:Nn { c }
+\cs_generate_variant:Nn \muskip_gset:Nn { c }
+\cs_new_protected_nopar:Npn \muskip_set_eq:NN #1#2 { #1 = #2 }
+\cs_generate_variant:Nn \muskip_set_eq:NN { c }
+\cs_generate_variant:Nn \muskip_set_eq:NN { Nc , cc }
+\cs_new_protected_nopar:Npn \muskip_gset_eq:NN #1#2 { \pref_global:D #1 = #2 }
+\cs_generate_variant:Nn \muskip_gset_eq:NN { c }
+\cs_generate_variant:Nn \muskip_gset_eq:NN { Nc , cc }
+\cs_new_protected_nopar:Npn \muskip_add:Nn #1#2
+ { \tex_advance:D #1 by \etex_muexpr:D #2 \scan_stop: }
+\cs_new_protected_nopar:Npn \muskip_gadd:Nn { \pref_global:D \muskip_add:Nn }
+\cs_generate_variant:Nn \muskip_add:Nn { c }
+\cs_generate_variant:Nn \muskip_gadd:Nn { c }
+\cs_new_protected_nopar:Npn \muskip_sub:Nn #1#2
+ { \tex_advance:D #1 by - \etex_muexpr:D #2 \scan_stop: }
+\cs_new_protected_nopar:Npn \muskip_gsub:Nn { \pref_global:D \muskip_sub:Nn }
+\cs_generate_variant:Nn \muskip_sub:Nn { c }
+\cs_generate_variant:Nn \muskip_gsub:Nn { c }
+\cs_new_nopar:Npn \muskip_eval:n #1
+ { \muskip_use:N \etex_muexpr:D #1 \scan_stop: }
+\cs_new_eq:NN \muskip_use:N \tex_the:D
+\cs_generate_variant:Nn \muskip_use:N { c }
+\cs_new_eq:NN \muskip_show:N \kernel_register_show:N
+\cs_generate_variant:Nn \muskip_show:N { c }
+\cs_new_nopar:Npn \skip_split_finite_else_action:nnNN #1#2#3#4
+ {
+ \skip_if_infinite_glue:nTF {#1}
+ {
+ #3 = \c_zero_skip
+ #4 = \c_zero_skip
+ #2
+ }
+ {
+ #3 = \etex_gluestretch:D #1 \scan_stop:
+ #4 = \etex_glueshrink:D #1 \scan_stop:
+ }
+ }
+%%
+%%
+%% End of file `l3skip.sty'.