summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3skip.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3skip.dtx225
1 files changed, 155 insertions, 70 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
index 3ca229a89ca..dec6cbac2d1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3skip.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3skip.dtx 2896 2011-10-09 20:36:50Z joseph $
+\GetIdInfo$Id: l3skip.dtx 2959 2011-11-14 21:47:18Z joseph $
{L3 Experimental dimensions and skips}
%</driver|package>
%<*driver>
@@ -106,7 +106,7 @@
%
% \section{Setting \texttt{dim} variables}
%
-% \begin{function}{\dim_add:Nn, \dim_add:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_add:Nn, \dim_add:cn}
% \begin{syntax}
% \cs{dim_add:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -122,7 +122,7 @@
% current content of the \meta{dimension}. This assignment is global.
% \end{function}
%
-% \begin{function}{\dim_set:Nn, \dim_set:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_set:Nn, \dim_set:cn}
% \begin{syntax}
% \cs{dim_set:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -161,7 +161,7 @@
% \TeX{} group level.
% \end{function}
%
-% \begin{function}{\dim_set_max:Nn, \dim_set_max:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_set_max:Nn, \dim_set_max:cn}
% \begin{syntax}
% \cs{dim_set_max:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -171,7 +171,7 @@
% \TeX{} group.
% \end{function}
%
-% \begin{function}{\dim_gset_max:Nn, \dim_gset_max:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_gset_max:Nn, \dim_gset_max:cn}
% \begin{syntax}
% \cs{dim_gset_max:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -180,7 +180,7 @@
% larger of these two value. This assignment is global.
% \end{function}
%
-% \begin{function}{\dim_set_min:Nn, \dim_set_min:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_set_min:Nn, \dim_set_min:cn}
% \begin{syntax}
% \cs{dim_set_min:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -190,7 +190,7 @@
% \TeX{} group.
% \end{function}
%
-% \begin{function}{\dim_gset_min:Nn, \dim_gset_min:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_gset_min:Nn, \dim_gset_min:cn}
% \begin{syntax}
% \cs{dim_gset_min:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -199,7 +199,7 @@
% smaller of these two value. This assignment is global.
% \end{function}
%
-% \begin{function}{\dim_sub:Nn, \dim_sub:cn}
+% \begin{function}[updated = 2011-10-22]{\dim_sub:Nn, \dim_sub:cn}
% \begin{syntax}
% \cs{dim_sub:Nn} \meta{dimension} \Arg{dimension expression}
% \end{syntax}
@@ -216,8 +216,16 @@
% \end{function}
%
% \section{Utilities for dimension calculations}
+%
+% \begin{function}[updated = 2011-10-22, EXP]{\dim_abs:n}
+% \begin{syntax}
+% \cs{dim_abs:n} \Arg{dimexpr}
+% \end{syntax}
+% Converts the \meta{dimexpr} to its absolute value, leaving the result
+% in the input stream as an \meta{dimension denotation}.
+% \end{function}
%
-% \begin{function}[EXP]{\dim_ratio:nn}
+% \begin{function}[updated = 2011-10-22, EXP]{\dim_ratio:nn}
% \begin{syntax}
% \cs{dim_ratio:nn} \Arg{dimexpr1} \Arg{dimexpr2}
% \end{syntax}
@@ -381,7 +389,7 @@
%
% \section{Using \texttt{dim} expressions and variables}
%
-% \begin{function}[EXP]{\dim_eval:n}
+% \begin{function}[updated = 2011-10-22, EXP]{\dim_eval:n}
% \begin{syntax}
% \cs{dim_eval:n} \Arg{dimension expression}
% \end{syntax}
@@ -476,7 +484,7 @@
%
% \section{Setting \texttt{skip} variables}
%
-% \begin{function}{\skip_add:Nn, \skip_add:cn}
+% \begin{function}[updated = 2011-10-22]{\skip_add:Nn, \skip_add:cn}
% \begin{syntax}
% \cs{skip_add:Nn} \meta{skip} \Arg{skip expression}
% \end{syntax}
@@ -492,7 +500,7 @@
% current content of the \meta{skip}. This assignment is global.
% \end{function}
%
-% \begin{function}{\skip_set:Nn, \skip_set:cn}
+% \begin{function}[updated = 2011-10-22]{\skip_set:Nn, \skip_set:cn}
% \begin{syntax}
% \cs{skip_set:Nn} \meta{skip} \Arg{skip expression}
% \end{syntax}
@@ -532,7 +540,7 @@
% \TeX{} group level.
% \end{function}
%
-% \begin{function}{\skip_sub:Nn, \skip_sub:cn}
+% \begin{function}[updated = 2011-10-22]{\skip_sub:Nn, \skip_sub:cn}
% \begin{syntax}
% \cs{skip_sub:Nn} \meta{skip} \Arg{skip expression}
% \end{syntax}
@@ -576,7 +584,7 @@
%
% \section{Using \texttt{skip} expressions and variables}
%
-% \begin{function}[EXP]{\skip_eval:n}
+% \begin{function}[updated = 2011-10-22, EXP]{\skip_eval:n}
% \begin{syntax}
% \cs{skip_eval:n} \Arg{skip expression}
% \end{syntax}
@@ -670,7 +678,7 @@
%
% \section{Setting \texttt{muskip} variables}
%
-% \begin{function}{\muskip_add:Nn, \muskip_add:cn}
+% \begin{function}[updated = 2011-10-22]{\muskip_add:Nn, \muskip_add:cn}
% \begin{syntax}
% \cs{muskip_add:Nn} \meta{muskip} \Arg{muskip expression}
% \end{syntax}
@@ -686,7 +694,7 @@
% current content of the \meta{muskip}. This assignment is global.
% \end{function}
%
-% \begin{function}{\muskip_set:Nn, \muskip_set:cn}
+% \begin{function}[updated = 2011-10-22]{\muskip_set:Nn, \muskip_set:cn}
% \begin{syntax}
% \cs{muskip_set:Nn} \meta{muskip} \Arg{muskip expression}
% \end{syntax}
@@ -732,7 +740,7 @@
% \TeX{} group level.
% \end{function}
%
-% \begin{function}{\muskip_sub:Nn, \muskip_sub:cn}
+% \begin{function}[updated = 2011-10-22]{\muskip_sub:Nn, \muskip_sub:cn}
% \begin{syntax}
% \cs{muskip_sub:Nn} \meta{muskip} \Arg{muskip expression}
% \end{syntax}
@@ -750,7 +758,7 @@
%
% \section{Using \texttt{muskip} expressions and variables}
%
-% \begin{function}[EXP]{\muskip_eval:n}
+% \begin{function}[updated = 2011-10-22, EXP]{\muskip_eval:n}
% \begin{syntax}
% \cs{muskip_eval:n} \Arg{muskip expression}
% \end{syntax}
@@ -781,7 +789,8 @@
%
% \section{Inserting skips into the output}
%
-% \begin{function}{\skip_horizontal:N, \skip_horizontal:c, \skip_horizontal:n}
+% \begin{function}[updated = 2011-10-22]
+% {\skip_horizontal:N, \skip_horizontal:c, \skip_horizontal:n}
% \begin{syntax}
% \cs{skip_horizontal:N} \meta{skip}
% \cs{skip_horizontal:n} \Arg{skipexpr}
@@ -792,7 +801,8 @@
% \end{texnote}
% \end{function}
%
-% \begin{function}{\skip_vertical:N, \skip_vertical:c, \skip_vertical:n}
+% \begin{function}[updated = 2011-10-22]
+% {\skip_vertical:N, \skip_vertical:c, \skip_vertical:n}
% \begin{syntax}
% \cs{skip_vertical:N} \meta{skip}
% \cs{skip_vertical:n} \Arg{skipexpr}
@@ -846,7 +856,7 @@
%
% \section{Experimental skip functions}
%
-% \begin{function}{\skip_split_finite_else_action:nnNN}
+% \begin{function}[updated = 2011-10-22]{\skip_split_finite_else_action:nnNN}
% \begin{syntax}
% \cs{skip_split_finite_else_action:nnNN} \Arg{skipexpr} \Arg{action}
% ~~\meta{dimen1} \meta{dimen2}
@@ -859,6 +869,31 @@
% and place |#2| into the input stream: this is usually an error or
% warning message of some sort.
% \end{function}
+%
+% \section{Internal functions}
+%
+% \begin{function}[added = 2011-11-11, EXP]
+% {\dim_strip_bp:n, \dim_strip_pt:n}
+% \begin{syntax}
+% \cs{dim_strip_bp:n} \Arg{dimension expression}
+% \cs{dim_strip_pt:n} \Arg{dimension expression}
+% \end{syntax}
+% Evaluates the \meta{dimension expression}, expanding any
+% dimensions and token list variables within the \meta{expression}
+% to their content (without requiring \cs{dim_use:N}/\cs{tl_use:N})
+% and applying the standard mathematical rules. The magnitude of the
+% result, expressed in big points (\texttt{bp}) or points (\texttt{pt}),
+% will be left in the input stream with \emph{no units}. If the decimal
+% part of the magnitude is zero, this will be omitted.
+%
+% If the \Arg{dimension expression} contains additional units, these will
+% be ignored, so for example
+% \begin{verbatim}
+% \dim_strip_pt:n { 1 bp pt }
+% \end{verbatim}
+% will leave |1.00374| in the input stream (\emph{i.e.}~the magnitude of
+% one \enquote{big point} when converted to points).
+% \end{function}
%
% \end{documentation}
%
@@ -899,7 +934,7 @@
% Allocating \meta{dim} registers \ldots
% \begin{macrocode}
%<*package>
-\cs_new_protected_nopar:Npn \dim_new:N #1
+\cs_new_protected:Npn \dim_new:N #1
{
\chk_if_free_cs:N #1
\newdimen #1
@@ -913,8 +948,8 @@
% \begin{macro}{\dim_gzero:N, \dim_gzero:c}
% Reset the register to zero.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_zero:N #1 { #1 \c_zero_dim }
-\cs_new_protected_nopar:Npn \dim_gzero:N { \tex_global:D \dim_zero:N }
+\cs_new_protected:Npn \dim_zero:N #1 { #1 \c_zero_dim }
+\cs_new_protected:Npn \dim_gzero:N { \tex_global:D \dim_zero:N }
\cs_generate_variant:Nn \dim_zero:N { c }
\cs_generate_variant:Nn \dim_gzero:N { c }
% \end{macrocode}
@@ -927,9 +962,9 @@
% \begin{macro}{\dim_gset:Nn, \dim_gset:cn}
% Setting dimensions is easy enough.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_set:Nn #1#2
+\cs_new_protected:Npn \dim_set:Nn #1#2
{ #1 ~ \dim_eval:w #2 \dim_eval_end: }
-\cs_new_protected_nopar:Npn \dim_gset:Nn { \tex_global:D \dim_set:Nn }
+\cs_new_protected:Npn \dim_gset:Nn { \tex_global:D \dim_set:Nn }
\cs_generate_variant:Nn \dim_set:Nn { c }
\cs_generate_variant:Nn \dim_gset:Nn { c }
% \end{macrocode}
@@ -941,10 +976,10 @@
% {\dim_gset_eq:NN,\dim_gset_eq:cN, \dim_gset_eq:Nc,\dim_gset_eq:cc}
% All straightforward.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_set_eq:NN #1#2 { #1 = #2 }
+\cs_new_protected: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 { \tex_global:D #1 = #2 }
+\cs_new_protected:Npn \dim_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \dim_gset_eq:NN { c }
\cs_generate_variant:Nn \dim_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -958,14 +993,14 @@
% Setting maximum and minimum values is simply a case of so build-in
% comparison. This only applies to dimensions as skips are not ordered.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_set_max:Nn #1#2
+\cs_new_protected: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
+\cs_new_protected:Npn \dim_gset_max:Nn
+ { \tex_global:D \dim_set_max:Nn }
+\cs_new_protected: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_new_protected:Npn \dim_gset_min:Nn
+ { \tex_global:D \dim_set_min:Nn }
\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 }
@@ -982,14 +1017,14 @@
% \begin{macro}{\dim_gsub:Nn, \dim_gsub:cn}
% Using |by| here deals with the (incorrect) case |\dimen123|.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \dim_add:Nn #1#2
+\cs_new_protected: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 { \tex_global:D \dim_add:Nn }
+\cs_new_protected:Npn \dim_gadd:Nn { \tex_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
+\cs_new_protected: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 { \tex_global:D \dim_sub:Nn }
+\cs_new_protected:Npn \dim_gsub:Nn { \tex_global:D \dim_sub:Nn }
\cs_generate_variant:Nn \dim_sub:Nn { c }
\cs_generate_variant:Nn \dim_gsub:Nn { c }
% \end{macrocode}
@@ -999,6 +1034,24 @@
% \end{macro}
%
% \subsection{Utilities for dimension calculations}
+%
+% \begin{macro}{\dim_abs:n}
+% Similar to the \cs{int_abs:n} function, but here an additional
+% \meta{dimexpr} is needed as \TeX{} won't simply tidy up an additional
+% |-| for us.
+% \begin{macrocode}
+\cs_new:Npn \dim_abs:n #1
+ {
+ \dim_use:N
+ \dim_eval:w
+ \if_dim:w \dim_eval:w #1 < \c_zero_dim
+ -
+ \fi:
+ \dim_eval:w #1 \dim_eval_end:
+ \dim_eval_end:
+ }
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\dim_ratio:nn}
% \begin{macro}[aux]{\dim_ratio_aux:n}
@@ -1007,9 +1060,9 @@
% expression. Using \cs{int_value:w} forces everything into |sp|, avoiding
% any decimal parts.
% \begin{macrocode}
-\cs_new_nopar:Npn \dim_ratio:nn #1#2
+\cs_new: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
+\cs_new:Npn \dim_ratio_aux:n #1
{ \int_value:w \dim_eval:w #1 \dim_eval_end: }
% \end{macrocode}
% \end{macro}
@@ -1140,8 +1193,6 @@
% \end{macro}
% \end{macro}
%
-%
-%
% \subsection{Dimension expression loops}
%
% \begin{macro}{\dim_while_do:nn}
@@ -1231,10 +1282,44 @@
% \begin{macro}{\dim_eval:n}
% Evaluating a dimension expression expandably.
% \begin{macrocode}
-\cs_new_nopar:Npn \dim_eval:n #1
+\cs_new:Npn \dim_eval:n #1
{ \dim_use:N \dim_eval:w #1 \dim_eval_end: }
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}[EXP]{\dim_strip_bp:n}
+% \begin{macrocode}
+\cs_new:Npn \dim_strip_bp:n #1
+ { \dim_strip_pt:n { 0.996 26 \dim_eval:w #1 \dim_eval_end: } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\dim_strip_pt:n}
+% \begin{macro}[EXP, aux]{\dim_strip_pt:w}
+% A function which comes up often enough to deserve a place in the kernel.
+% The idea here is that the input is assumed to be in \texttt{pt}, but can
+% be given in other units, while the output is the value of the dimension
+% in \texttt{pt} but with no units given. This is used a lot by low-level
+% manipulations.
+% \begin{macrocode}
+\cs_new:Npn \dim_strip_pt:n #1
+ {
+ \exp_after:wN
+ \dim_strip_pt:w \dim_use:N \dim_eval:w #1 \dim_eval_end: \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \dim_strip_pt:w
+ ##1 . ##2 \tl_to_str:n { pt } ##3 \exp_not:N \q_stop
+ {
+ ##1
+ \exp_not:N \int_compare:nNnT {##2} > \c_zero
+ { . ##2 }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\dim_use:N, \dim_use:c}
% Accessing a \meta{dim}.
@@ -1295,7 +1380,7 @@
% Allocation of a new internal registers.
% \begin{macrocode}
%<*package>
-\cs_new_protected_nopar:Npn \skip_new:N #1
+\cs_new_protected:Npn \skip_new:N #1
{
\chk_if_free_cs:N #1
\newskip #1
@@ -1309,8 +1394,8 @@
% \begin{macro}{\skip_gzero:N, \skip_gzero:c}
% Reset the register to zero.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \skip_zero:N #1 { #1 \c_zero_skip }
-\cs_new_protected_nopar:Npn \skip_gzero:N { \tex_global:D \skip_zero:N }
+\cs_new_protected:Npn \skip_zero:N #1 { #1 \c_zero_skip }
+\cs_new_protected:Npn \skip_gzero:N { \tex_global:D \skip_zero:N }
\cs_generate_variant:Nn \skip_zero:N { c }
\cs_generate_variant:Nn \skip_gzero:N { c }
% \end{macrocode}
@@ -1323,9 +1408,9 @@
% \begin{macro}{\skip_gset:Nn, \skip_gset:cn}
% Much the same as for dimensions.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \skip_set:Nn #1#2
+\cs_new_protected:Npn \skip_set:Nn #1#2
{ #1 ~ \etex_glueexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \skip_gset:Nn { \tex_global:D \skip_set:Nn }
+\cs_new_protected:Npn \skip_gset:Nn { \tex_global:D \skip_set:Nn }
\cs_generate_variant:Nn \skip_set:Nn { c }
\cs_generate_variant:Nn \skip_gset:Nn { c }
% \end{macrocode}
@@ -1338,10 +1423,10 @@
% {\skip_gset_eq:NN,\skip_gset_eq:cN, \skip_gset_eq:Nc,\skip_gset_eq:cc}
% All straightforward.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \skip_set_eq:NN #1#2 { #1 = #2 }
+\cs_new_protected: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 { \tex_global:D #1 = #2 }
+\cs_new_protected:Npn \skip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \skip_gset_eq:NN { c }
\cs_generate_variant:Nn \skip_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -1354,14 +1439,14 @@
% \begin{macro}{\skip_gsub:Nn, \skip_gsub:cn}
% Using |by| here deals with the (incorrect) case |\skip123|.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \skip_add:Nn #1#2
+\cs_new_protected: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 { \tex_global:D \skip_add:Nn }
+\cs_new_protected:Npn \skip_gadd:Nn { \tex_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
+\cs_new_protected: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 { \tex_global:D \skip_sub:Nn }
+\cs_new_protected:Npn \skip_gsub:Nn { \tex_global:D \skip_sub:Nn }
\cs_generate_variant:Nn \skip_sub:Nn { c }
\cs_generate_variant:Nn \skip_gsub:Nn { c }
% \end{macrocode}
@@ -1416,7 +1501,7 @@
% \begin{macro}{\skip_eval:n}
% Evaluating a skip expression expandably.
% \begin{macrocode}
-\cs_new_nopar:Npn \skip_eval:n #1
+\cs_new:Npn \skip_eval:n #1
{ \skip_use:N \etex_glueexpr:D #1 \scan_stop: }
% \end{macrocode}
% \end{macro}
@@ -1436,10 +1521,10 @@
% Inserting skips.
% \begin{macrocode}
\cs_new_eq:NN \skip_horizontal:N \tex_hskip:D
-\cs_new_nopar:Npn \skip_horizontal:n #1
+\cs_new: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
+\cs_new: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 }
@@ -1491,7 +1576,7 @@
% And then we add muskips.
% \begin{macrocode}
%<*package>
-\cs_new_protected_nopar:Npn \muskip_new:N #1
+\cs_new_protected:Npn \muskip_new:N #1
{
\chk_if_free_cs:N #1
\newmuskip #1
@@ -1505,9 +1590,9 @@
% \begin{macro}{\muskip_gzero:N, \muskip_gzero:c}
% Reset the register to zero.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \muskip_zero:N #1
+\cs_new_protected:Npn \muskip_zero:N #1
{ #1 \c_zero_muskip }
-\cs_new_protected_nopar:Npn \muskip_gzero:N { \tex_global:D \muskip_zero:N }
+\cs_new_protected:Npn \muskip_gzero:N { \tex_global:D \muskip_zero:N }
\cs_generate_variant:Nn \muskip_zero:N { c }
\cs_generate_variant:Nn \muskip_gzero:N { c }
% \end{macrocode}
@@ -1520,9 +1605,9 @@
% \begin{macro}{\muskip_gset:Nn, \muskip_gset:cn}
% This should be pretty familiar.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \muskip_set:Nn #1#2
+\cs_new_protected:Npn \muskip_set:Nn #1#2
{ #1 ~ \etex_muexpr:D #2 \scan_stop: }
-\cs_new_protected_nopar:Npn \muskip_gset:Nn { \tex_global:D \muskip_set:Nn }
+\cs_new_protected:Npn \muskip_gset:Nn { \tex_global:D \muskip_set:Nn }
\cs_generate_variant:Nn \muskip_set:Nn { c }
\cs_generate_variant:Nn \muskip_gset:Nn { c }
% \end{macrocode}
@@ -1541,10 +1626,10 @@
% }
% All straightforward.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \muskip_set_eq:NN #1#2 { #1 = #2 }
+\cs_new_protected: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 { \tex_global:D #1 = #2 }
+\cs_new_protected:Npn \muskip_gset_eq:NN #1#2 { \tex_global:D #1 = #2 }
\cs_generate_variant:Nn \muskip_gset_eq:NN { c }
\cs_generate_variant:Nn \muskip_gset_eq:NN { Nc , cc }
% \end{macrocode}
@@ -1557,14 +1642,14 @@
% \begin{macro}{\muskip_gsub:Nn, \muskip_gsub:cn}
% Using |by| here deals with the (incorrect) case |\muskip123|.
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \muskip_add:Nn #1#2
+\cs_new_protected: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 { \tex_global:D \muskip_add:Nn }
+\cs_new_protected:Npn \muskip_gadd:Nn { \tex_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
+\cs_new_protected: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 { \tex_global:D \muskip_sub:Nn }
+\cs_new_protected:Npn \muskip_gsub:Nn { \tex_global:D \muskip_sub:Nn }
\cs_generate_variant:Nn \muskip_sub:Nn { c }
\cs_generate_variant:Nn \muskip_gsub:Nn { c }
% \end{macrocode}
@@ -1578,7 +1663,7 @@
% \begin{macro}{\muskip_eval:n}
% Evaluating a muskip expression expandably.
% \begin{macrocode}
-\cs_new_nopar:Npn \muskip_eval:n #1
+\cs_new:Npn \muskip_eval:n #1
{ \muskip_use:N \etex_muexpr:D #1 \scan_stop: }
% \end{macrocode}
% \end{macro}
@@ -1611,7 +1696,7 @@
% |#2| which is probably an error message.
% Assignments are global.
% \begin{macrocode}
-\cs_new_nopar:Npn \skip_split_finite_else_action:nnNN #1#2#3#4
+\cs_new:Npn \skip_split_finite_else_action:nnNN #1#2#3#4
{
\skip_if_infinite_glue:nTF {#1}
{