diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3box.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3box.dtx | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index 7497971d2d6..8ec1f62babe 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3box.dtx 3432 2012-02-18 12:16:20Z joseph $ +\GetIdInfo$Id: l3box.dtx 3490 2012-03-04 01:00:53Z bruno $ {L3 Experimental boxes} %</driver|package> %<*driver> @@ -135,6 +135,16 @@ % clears \meta{box2}. These assignments are global. % \end{function} % +% \begin{function}[EXP, pTF, added=2012-03-03] +% {\box_if_exist:N, \box_if_exist:c} +% \begin{syntax} +% \cs{box_if_exist_p:N} \meta{box} +% \cs{box_if_exist:NTF} \meta{box} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests whether the \meta{box} is currently defined. This does not +% check that the \meta{box} really is a box. +% \end{function} +% % \section{Using boxes} % % \begin{function}{\box_use:N, \box_use:c} @@ -832,17 +842,9 @@ % Clear or new. % \begin{macrocode} \cs_new_protected:Npn \box_clear_new:N #1 - { - \cs_if_exist:NTF #1 - { \box_set_eq:NN #1 \c_empty_box } - { \box_new:N #1 } - } + { \box_if_exist:NTF #1 { \box_clear:N #1 } { \box_new:N #1 } } \cs_new_protected:Npn \box_gclear_new:N #1 - { - \cs_if_exist:NTF #1 - { \box_gset_eq:NN #1 \c_empty_box } - { \box_new:N #1 } - } + { \box_if_exist:NTF #1 { \box_gclear:N #1 } { \box_new:N #1 } } \cs_generate_variant:Nn \box_clear_new:N { c } \cs_generate_variant:Nn \box_gclear_new:N { c } % \end{macrocode} @@ -892,6 +894,20 @@ % \end{macro} % \end{macro} % +% \begin{macro}[pTF]{\box_if_exist:N, \box_if_exist:c} +% Copies of the \texttt{cs} functions defined in \pkg{l3basics}. +% \begin{macrocode} +\cs_new_eq:NN \box_if_exist:NTF \cs_if_exist:NTF +\cs_new_eq:NN \box_if_exist:NT \cs_if_exist:NT +\cs_new_eq:NN \box_if_exist:NF \cs_if_exist:NF +\cs_new_eq:NN \box_if_exist_p:N \cs_if_exist_p:N +\cs_new_eq:NN \box_if_exist:cTF \cs_if_exist:cTF +\cs_new_eq:NN \box_if_exist:cT \cs_if_exist:cT +\cs_new_eq:NN \box_if_exist:cF \cs_if_exist:cF +\cs_new_eq:NN \box_if_exist_p:c \cs_if_exist_p:c +% \end{macrocode} +% \end{macro} +% % \subsection{Measuring and setting box dimensions} % % \begin{macro}{\box_ht:N,\box_ht:c} @@ -1069,7 +1085,7 @@ % \begin{macrocode} \cs_new_protected:Npn \box_show:N #1 { - \cs_if_exist:NTF #1 + \box_if_exist:NTF #1 { \tex_showbox:D \use:n {#1} } { \msg_kernel_error:nnx { kernel } { variable-not-defined } |