diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3skip.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3skip.dtx | 393 |
1 files changed, 249 insertions, 144 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx index 1110130bc13..9bb1fa1eadc 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx @@ -36,7 +36,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3skip.dtx 3460 2012-02-26 12:16:41Z will $ +\GetIdInfo$Id: l3skip.dtx 3499 2012-03-05 16:08:55Z bruno $ {L3 Experimental dimensions and skips} %</driver|package> %<*driver> @@ -89,6 +89,15 @@ % will initially be equal to $0$\,pt. % \end{function} % +% \begin{function}[added = 2012-03-05]{\dim_const:Nn, \dim_const:cn} +% \begin{syntax} +% \cs{dim_const:Nn} \meta{dimension} \Arg{dimension expression} +% \end{syntax} +% Creates a new constant \meta{dimension} or raises an error if the +% name is already taken. The value of the \meta{dimension} will be set +% globally to the \meta{dimension expression}. +% \end{function} +% % \begin{function}{\dim_zero:N, \dim_zero:c, \dim_gzero:N, \dim_gzero:c} % \begin{syntax} % \cs{dim_zero:N} \meta{dimension} @@ -106,6 +115,15 @@ % the \meta{dimension} set to zero. % \end{function} % +% \begin{function}[EXP, pTF, added=2012-03-03]{\dim_if_exist:N, \dim_if_exist:c} +% \begin{syntax} +% \cs{dim_if_exist_p:N} \meta{dimension} +% \cs{dim_if_exist:NTF} \meta{dimension} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests whether the \meta{dimension} is currently defined. This does +% not check that the \meta{dimension} really is a dimension variable. +% \end{function} +% % \section{Setting \texttt{dim} variables} % % \begin{function}[updated = 2011-10-22] @@ -426,6 +444,15 @@ % will initially be equal to $0$\,pt. % \end{function} % +% \begin{function}[added = 2012-03-05]{\skip_const:Nn, \skip_const:cn} +% \begin{syntax} +% \cs{skip_const:Nn} \meta{skip} \Arg{skip expression} +% \end{syntax} +% Creates a new constant \meta{skip} or raises an error if the +% name is already taken. The value of the \meta{skip} will be set +% globally to the \meta{skip expression}. +% \end{function} +% % \begin{function}{\skip_zero:N, \skip_zero:c, \skip_gzero:N, \skip_gzero:c} % \begin{syntax} % \cs{skip_zero:N} \meta{skip} @@ -443,6 +470,16 @@ % the \meta{skip} set to zero. % \end{function} % +% \begin{function}[EXP, pTF, added=2012-03-03] +% {\skip_if_exist:N, \skip_if_exist:c} +% \begin{syntax} +% \cs{skip_if_exist_p:N} \meta{skip} +% \cs{skip_if_exist:NTF} \meta{skip} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests whether the \meta{skip} is currently defined. This does not +% check that the \meta{skip} really is a skip variable. +% \end{function} +% % \section{Setting \texttt{skip} variables} % % \begin{function}[updated = 2011-10-22] @@ -486,21 +523,21 @@ % % \section{Skip expression conditionals} % -% \begin{function}[EXP,pTF]{\skip_if_eq:nn} -% \begin{syntax} -% \cs{skip_if_eq_p:nn} \Arg{skipexpr_1} \Arg{skipexpr_2} -% \cs{dim_compare:nTF} -% ~~\Arg{skip expr1} \Arg{skip expr2} -% ~~\Arg{true code} \Arg{false code} -% \end{syntax} -% This function first evaluates each of the -% \meta{skip expressions} as described for \cs{skip_eval:n}. -% The two results are then compared for exact equality, -% \emph{i.e.}~both the fixed and rubber components must be the same -% for the test to be true. -% \end{function} -% -% \begin{function}[EXP,pTF]{\skip_if_infinite_glue:n} +% \begin{function}[EXP,pTF]{\skip_if_eq:nn} +% \begin{syntax} +% \cs{skip_if_eq_p:nn} \Arg{skipexpr_1} \Arg{skipexpr_2} +% \cs{dim_compare:nTF} +% ~~\Arg{skip expr1} \Arg{skip expr2} +% ~~\Arg{true code} \Arg{false code} +% \end{syntax} +% This function first evaluates each of the +% \meta{skip expressions} as described for \cs{skip_eval:n}. +% The two results are then compared for exact equality, +% \emph{i.e.}~both the fixed and rubber components must be the same +% for the test to be true. +% \end{function} +% +% \begin{function}[EXP, pTF, updated = 2012-03-05]{\skip_if_infinite_glue:n} % \begin{syntax} % \cs{skip_if_infinite_glue_p:n} \Arg{skipexpr} % \cs{skip_if_infinite_glue:nTF} \Arg{skipexpr} \Arg{true code} \Arg{false code} @@ -510,6 +547,15 @@ % component (or both). % \end{function} % +% \begin{function}[EXP, pTF, added = 2012-03-05]{\skip_if_finite:n} +% \begin{syntax} +% \cs{skip_if_finite_p:n} \Arg{skipexpr} +% \cs{skip_if_finite:nTF} \Arg{skipexpr} \Arg{true code} \Arg{false code} +% \end{syntax} +% Evaluates the \meta{skip expression} as described for \cs{skip_eval:n}, +% and then tests if all of its components are finite. +% \end{function} +% % \section{Using \texttt{skip} expressions and variables} % % \begin{function}[updated = 2011-10-22, EXP]{\skip_eval:n} @@ -596,6 +642,15 @@ % will initially be equal to $0$\,mu. % \end{function} % +% \begin{function}[added = 2012-03-05]{\muskip_const:Nn, \muskip_const:cn} +% \begin{syntax} +% \cs{muskip_const:Nn} \meta{muskip} \Arg{muskip expression} +% \end{syntax} +% Creates a new constant \meta{muskip} or raises an error if the +% name is already taken. The value of the \meta{muskip} will be set +% globally to the \meta{muskip expression}. +% \end{function} +% % \begin{function} % {\muskip_zero:N, \muskip_zero:c, \muskip_gzero:N, \muskip_gzero:c} % \begin{syntax} @@ -617,6 +672,16 @@ % to leave the \meta{muskip} set to zero. % \end{function} % +% \begin{function}[EXP, pTF, added=2012-03-03] +% {\muskip_if_exist:N, \muskip_if_exist:c} +% \begin{syntax} +% \cs{muskip_if_exist_p:N} \meta{muskip} +% \cs{muskip_if_exist:NTF} \meta{muskip} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests whether the \meta{muskip} is currently defined. This does not +% check that the \meta{muskip} really is a muskip variable. +% \end{function} +% % \section{Setting \texttt{muskip} variables} % % \begin{function}[updated = 2011-10-22] @@ -857,6 +922,19 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\dim_const:Nn, \dim_const:cn} +% Contrarily to integer constants, we cannot avoid using a register, +% even for constants. +% \begin{macrocode} +\cs_new_protected:Npn \dim_const:Nn #1 + { + \dim_new:N #1 + \dim_gset:Nn #1 + } +\cs_generate_variant:Nn \dim_const:Nn { c } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\dim_zero:N, \dim_zero:c} % \begin{macro}{\dim_gzero:N, \dim_gzero:c} % Reset the register to zero. @@ -874,14 +952,28 @@ % Create a register if needed, otherwise clear it. % \begin{macrocode} \cs_new_protected:Npn \dim_zero_new:N #1 - { \cs_if_exist:NTF #1 { \dim_zero:N #1 } { \dim_new:N #1 } } + { \dim_if_exist:NTF #1 { \dim_zero:N #1 } { \dim_new:N #1 } } \cs_new_protected:Npn \dim_gzero_new:N #1 - { \cs_if_exist:NTF #1 { \dim_gzero:N #1 } { \dim_new:N #1 } } + { \dim_if_exist:NTF #1 { \dim_gzero:N #1 } { \dim_new:N #1 } } \cs_generate_variant:Nn \dim_zero_new:N { c } \cs_generate_variant:Nn \dim_gzero_new:N { c } % \end{macrocode} % \end{macro} % +% \begin{macro}[pTF]{\dim_if_exist:N, \dim_if_exist:c} +% Copies of the \texttt{cs} functions defined in \pkg{l3basics}. +% \begin{macrocode} +\cs_new_eq:NN \dim_if_exist:NTF \cs_if_exist:NTF +\cs_new_eq:NN \dim_if_exist:NT \cs_if_exist:NT +\cs_new_eq:NN \dim_if_exist:NF \cs_if_exist:NF +\cs_new_eq:NN \dim_if_exist_p:N \cs_if_exist_p:N +\cs_new_eq:NN \dim_if_exist:cTF \cs_if_exist:cTF +\cs_new_eq:NN \dim_if_exist:cT \cs_if_exist:cT +\cs_new_eq:NN \dim_if_exist:cF \cs_if_exist:cF +\cs_new_eq:NN \dim_if_exist_p:c \cs_if_exist_p:c +% \end{macrocode} +% \end{macro} +% % \subsection{Setting \texttt{dim} variables} % % \begin{macro}{\dim_set:Nn, \dim_set:cn} @@ -1002,6 +1094,7 @@ % % \begin{macro}{\dim_compare_p:nNn} % \begin{macro}[TF]{\dim_compare:nNn} +% Simple comparison. % \begin{macrocode} \prg_new_conditional:Npnn \dim_compare:nNn #1#2#3 { p , T , F , TF } { @@ -1012,116 +1105,63 @@ % \end{macro} % \end{macro} % -% \begin{macro}[pTF]{\dim_compare:n} -% \begin{macro}[aux]{\dim_compare_aux:wNN} -% \begin{macro}[aux]{\dim_compare_<:nw} -% \begin{macro}[aux]{\dim_compare_=:nw} -% \begin{macro}[aux]{\dim_compare_>:nw} -% \begin{macro}[aux]{\dim_compare_==:nw} -% \begin{macro}[aux]{\dim_compare_<=:nw} -% \begin{macro}[aux]{\dim_compare_!=:nw} -% \begin{macro}[aux]{\dim_compare_>=:nw} -% [This code plus comments are adapted from the \cs{int_compare:nTF} -% function.] -% Comparison tests using a simple syntax where only one set of braces -% is required and additional operators such as |!=| and |>=| are -% supported. First some notes on the idea behind this. We wish to -% support writing code like -% \begin{verbatim} -% \dim_compare_p:n { 5mm + \l_tmpa_dim >= 4pt - \l_tmpb_dim } -% \end{verbatim} -% In other words, we want to somehow add the missing |\dim_eval:w| -% where required. We can start evaluating from the left using -% |\dim_use:N \dim_eval:w|, and we know that since the relation -% symbols |<|, |>|, |=| and |!| are not allowed in such expressions, -% they will terminate the expression. Therefore, we first let \TeX{} -% evaluate this left hand side of the (in)equality. -% -% Eventually, we will convert the relation symbol to the appropriate -% version of \cs{if_dim:w}, and add \cs{dim_eval:w} after it. We -% optimize by placing the end-code already here: this avoids needless -% grabbing of arguments later. +% \begin{macro}[pTF, EXP]{\dim_compare:n} +% \begin{macro}[aux, EXP]{\dim_compare_aux:w, \dim_compare_aux:NNw} +% \begin{macro}[aux, EXP] +% { +% \dim_compare_=:NNw, +% \dim_compare_<:NNw, +% \dim_compare_>:NNw, +% \dim_compare_==:NNw, +% \dim_compare_!=:NNw, +% \dim_compare_<=:NNw, +% \dim_compare_>=:NNw +% } +% This code is adapted from the \cs{int_compare:nTF} function. First +% evaluate the left-hand side. Then access the relation symbol by +% grabbing until \texttt{pt} (with category other), and pursue +% otherwise just as for \cs{int_compare:nTF}. % \begin{macrocode} \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: + \exp_after:wN \dim_compare_aux:w \dim_use:N \dim_eval:w #1 + \kernel_compare_error: \dim_eval_end: \prg_return_true: \else: \prg_return_false: \fi: } -% \end{macrocode} -% -% Contrarily to the case of integers, where we have to remove the -% result in order to access the relation, \cs{dim_use:N} nicely -% produces a result which ends in |pt|. We can thus use a delimited -% argument to find the relation. \cs{tl_to_str:n} is needed to -% convert |pt| to \enquote{other} characters. -% -% The relation might be one character, |#2|, or two characters |#2#3|. -% We support the following forms: |=|, |<|, |>| and the extended |!=|, -% |==|, |<=| and |>=|. All the extended forms have an extra |=| so we -% check if that is present as well. Then use specific function to -% perform the (unbalanced) test. -% \begin{macrocode} \exp_args:Nno \use:nn - { \cs_new:Npn \dim_compare_aux:wNN #1 } + { \cs_new:Npn \dim_compare_aux:w #1 } { \tl_to_str:n { pt } } - #2 #3 - { - \use:c - { - dim_compare_ #2 - \if_meaning:w = #3 = \fi: - :nw - } - { #1 pt } #3 - } -% \end{macrocode} -% Here, \cs{dim_eval:w} will begin the right hand side of a dimension -% comparison (with \cs{if_dim:w}), closed cleanly by the trailing tokens -% we put in the definition of \cs{dim_compare:n}. -% -% The actual comparisons take as a first argument the left-hand side -% of the comparison (a length). In the case of normal comparisons, -% just place the relevant \cs{if_dim:w}, with a trailing \cs{dim_eval:w} -% to evaluate the right hand side. For extended comparisons, remove -% the trailing |=| that we left, before evaluating with \cs{dim_eval:w}. -% In both cases, the expansion of \cs{dim_eval:w} is stopped properly, -% and the conditional ended correctly by the tokens we put in the -% definition of \cs{dim_compare:n}. -% -% Equal, less than and greater than are straighforward. -% \begin{macrocode} -\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 } -% \end{macrocode} -% For the extended syntax |==|, we remove |#2|, trailing |=| sign, -% and otherwise act as for |=|. -% \begin{macrocode} -\cs_new:cpn {dim_compare_==:nw} #1#2 { \if_dim:w #1 = \dim_eval:w } -% \end{macrocode} -% -% Not equal, greater than or equal, less than or equal follow the -% same scheme as the extended equality syntax, with an additional -% \cs{reverse_if:N} to get the opposite of their \enquote{simple} -% analog. -% \begin{macrocode} -\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} + #2 \kernel_compare_error: + { + \exp_after:wN \dim_compare_aux:NNw #2 ?? \q_mark + #1 pt #2 + } +\cs_new:Npn \dim_compare_aux:NNw #1#2#3 \q_mark + { + \use:c { dim_compare_ #1 \if_meaning:w = #2 = \fi: :NNw } + \kernel_compare_error:Nw #1 + } +\cs_new:cpn { dim_compare_=:NNw } #1#2#3 = + { \if_dim:w #3 = \dim_eval:w } +\cs_new:cpn { dim_compare_<:NNw } #1#2#3 < + { \if_dim:w #3 < \dim_eval:w } +\cs_new:cpn { dim_compare_>:NNw } #1#2#3 > + { \if_dim:w #3 > \dim_eval:w } +\cs_new:cpn { dim_compare_==:NNw } #1#2#3 == + { \if_dim:w #3 = \dim_eval:w } +\cs_new:cpn { dim_compare_!=:NNw } #1#2#3 != + { \reverse_if:N \if_dim:w #3 = \dim_eval:w } +\cs_new:cpn { dim_compare_<=:NNw } #1#2#3 <= + { \reverse_if:N \if_dim:w #3 > \dim_eval:w } +\cs_new:cpn { dim_compare_>=:NNw } #1#2#3 >= + { \reverse_if:N \if_dim:w #3 < \dim_eval:w } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % % \subsection{Dimension expression loops} % @@ -1328,6 +1368,19 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\skip_const:Nn, \skip_const:cn} +% Contrarily to integer constants, we cannot avoid using a register, +% even for constants. +% \begin{macrocode} +\cs_new_protected:Npn \skip_const:Nn #1 + { + \skip_new:N #1 + \skip_gset:Nn #1 + } +\cs_generate_variant:Nn \skip_const:Nn { c } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\skip_zero:N, \skip_zero:c} % \begin{macro}{\skip_gzero:N, \skip_gzero:c} % Reset the register to zero. @@ -1345,14 +1398,28 @@ % Create a register if needed, otherwise clear it. % \begin{macrocode} \cs_new_protected:Npn \skip_zero_new:N #1 - { \cs_if_exist:NTF #1 { \skip_zero:N #1 } { \skip_new:N #1 } } + { \skip_if_exist:NTF #1 { \skip_zero:N #1 } { \skip_new:N #1 } } \cs_new_protected:Npn \skip_gzero_new:N #1 - { \cs_if_exist:NTF #1 { \skip_gzero:N #1 } { \skip_new:N #1 } } + { \skip_if_exist:NTF #1 { \skip_gzero:N #1 } { \skip_new:N #1 } } \cs_generate_variant:Nn \skip_zero_new:N { c } \cs_generate_variant:Nn \skip_gzero_new:N { c } % \end{macrocode} % \end{macro} % +% \begin{macro}[pTF]{\skip_if_exist:N, \skip_if_exist:c} +% Copies of the \texttt{cs} functions defined in \pkg{l3basics}. +% \begin{macrocode} +\cs_new_eq:NN \skip_if_exist:NTF \cs_if_exist:NTF +\cs_new_eq:NN \skip_if_exist:NT \cs_if_exist:NT +\cs_new_eq:NN \skip_if_exist:NF \cs_if_exist:NF +\cs_new_eq:NN \skip_if_exist_p:N \cs_if_exist_p:N +\cs_new_eq:NN \skip_if_exist:cTF \cs_if_exist:cTF +\cs_new_eq:NN \skip_if_exist:cT \cs_if_exist:cT +\cs_new_eq:NN \skip_if_exist:cF \cs_if_exist:cF +\cs_new_eq:NN \skip_if_exist_p:c \cs_if_exist_p:c +% \end{macrocode} +% \end{macro} +% % \subsection{Setting \texttt{skip} variables} % % \begin{macro}{\skip_set:Nn, \skip_set:cn} @@ -1425,27 +1492,38 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[pTF]{\skip_if_infinite_glue:n} -% With \eTeX{} we all of a sudden get access to a lot information we -% should otherwise consider ourselves lucky to get. One is -% the stretch and shrink components of a skip register and the order -% or those components. cs{skip_if_infinite_glue:nTF} tests it directly by -% looking at the stretch and shrink order. If either of the predicate -% functions return \meta{true}, |\bool_if:nTF| will return \meta{true} -% and the logic test will take the true branch. +% \begin{macro}[EXP,pTF]{\skip_if_finite:n} +% \begin{macro}[EXP,aux]{\skip_if_finite_aux:wwNw} +% With \eTeX{}, we have an easy access to the order of infinities of +% the stretch and shrink components of a skip. However, to access +% both, we either need to evaluate the expression twice, or evaluate +% it, then call an auxiliary to extract both pieces of information +% from the result. Since we are going to need an auxiliary anyways, +% it is quicker to make it search for the string \texttt{fil} which +% characterizes infinite glue. % \begin{macrocode} -\prg_new_conditional:Npnn \skip_if_infinite_glue:n #1 { p , T , F , TF } +\cs_set_protected:Npn \cs_tmp:w #1 { - \bool_if:nTF + \prg_new_conditional:Npnn \skip_if_finite:n ##1 { p , T , F , TF } { - \int_compare_p:nNn { \etex_gluestretchorder:D #1 } > \c_zero || - \int_compare_p:nNn { \etex_glueshrinkorder:D #1 } > \c_zero + \exp_after:wN \skip_if_finite_aux:wwNw + \skip_use:N \etex_glueexpr:D ##1 ; \prg_return_false: + #1 ; \prg_return_true: \q_stop } - { \prg_return_true: } - { \prg_return_false: } - } + \cs_new:Npn \skip_if_finite_aux:wwNw ##1 #1 ##2 ; ##3 ##4 \q_stop {##3} + } +\exp_args:No \cs_tmp:w { \tl_to_str:n { fil } } % \end{macrocode} -% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP, pTF]{\skip_if_infinite_glue:n} +% Reverse of \cs{skip_if_finite:nTF}. +% \begin{macrocode} +\prg_new_conditional:Npnn \skip_if_infinite_glue:n #1 { p , T , F , TF } + { \skip_if_finite:nTF {#1} \prg_return_false: \prg_return_true: } +% \end{macrocode} +% \end{macro} % % \subsection{Using \texttt{skip} expressions and variables} % @@ -1545,6 +1623,19 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\muskip_const:Nn, \muskip_const:cn} +% Contrarily to integer constants, we cannot avoid using a register, +% even for constants. +% \begin{macrocode} +\cs_new_protected:Npn \muskip_const:Nn #1 + { + \muskip_new:N #1 + \muskip_gset:Nn #1 + } +\cs_generate_variant:Nn \muskip_const:Nn { c } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\muskip_zero:N, \muskip_zero:c} % \begin{macro}{\muskip_gzero:N, \muskip_gzero:c} % Reset the register to zero. @@ -1566,14 +1657,28 @@ % Create a register if needed, otherwise clear it. % \begin{macrocode} \cs_new_protected:Npn \muskip_zero_new:N #1 - { \cs_if_exist:NTF #1 { \muskip_zero:N #1 } { \muskip_new:N #1 } } + { \muskip_if_exist:NTF #1 { \muskip_zero:N #1 } { \muskip_new:N #1 } } \cs_new_protected:Npn \muskip_gzero_new:N #1 - { \cs_if_exist:NTF #1 { \muskip_gzero:N #1 } { \muskip_new:N #1 } } + { \muskip_if_exist:NTF #1 { \muskip_gzero:N #1 } { \muskip_new:N #1 } } \cs_generate_variant:Nn \muskip_zero_new:N { c } \cs_generate_variant:Nn \muskip_gzero_new:N { c } % \end{macrocode} % \end{macro} % +% \begin{macro}[pTF]{\muskip_if_exist:N, \muskip_if_exist:c} +% Copies of the \texttt{cs} functions defined in \pkg{l3basics}. +% \begin{macrocode} +\cs_new_eq:NN \muskip_if_exist:NTF \cs_if_exist:NTF +\cs_new_eq:NN \muskip_if_exist:NT \cs_if_exist:NT +\cs_new_eq:NN \muskip_if_exist:NF \cs_if_exist:NF +\cs_new_eq:NN \muskip_if_exist_p:N \cs_if_exist_p:N +\cs_new_eq:NN \muskip_if_exist:cTF \cs_if_exist:cTF +\cs_new_eq:NN \muskip_if_exist:cT \cs_if_exist:cT +\cs_new_eq:NN \muskip_if_exist:cF \cs_if_exist:cF +\cs_new_eq:NN \muskip_if_exist_p:c \cs_if_exist_p:c +% \end{macrocode} +% \end{macro} +% % \subsection{Setting \texttt{muskip} variables} % % \begin{macro}{\muskip_set:Nn, \muskip_set:cn} @@ -1681,16 +1786,16 @@ % \begin{macrocode} \cs_new: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: - } + \skip_if_finite:nTF {#1} + { + #3 = \etex_gluestretch:D #1 \scan_stop: + #4 = \etex_glueshrink:D #1 \scan_stop: + } + { + #3 = \c_zero_skip + #4 = \c_zero_skip + #2 + } } % \end{macrocode} % \end{macro} |