summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx53
1 files changed, 49 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 197f62c3960..34bbe53d2fd 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3coffins.dtx 2814 2011-09-12 12:56:08Z joseph $
+\GetIdInfo$Id: l3coffins.dtx 2963 2011-11-15 22:06:41Z joseph $
{L3 Experimental coffin code layer}
%</driver|package>
%<*driver>
@@ -118,7 +118,7 @@
% \begin{function}[added = 2011-09-10]
% {\hcoffin_set:Nw, \hcoffin_set:cw, \hcoffin_set_end:}
% \begin{syntax}
-% \cs{hcoffin_set:Nw} \meta{coffin} \Arg{material} \cs{hcoffin_set_end:}
+% \cs{hcoffin_set:Nw} \meta{coffin} \meta{material} \cs{hcoffin_set_end:}
% \end{syntax}
% Typesets the \meta{material} in horizontal mode, storing the result
% in the \meta{coffin}. The standard poles for the \meta{coffin} are
@@ -141,7 +141,7 @@
% \begin{function}[added = 2011-09-10]
% {\vcoffin_set:Nnw, \vcoffin_set:cnw, \vcoffin_set_end:}
% \begin{syntax}
-% \cs{vcoffin_set:Nnw} \meta{coffin} \Arg{width} \Arg{material} \cs{vcoffin_set_end:}
+% \cs{vcoffin_set:Nnw} \meta{coffin} \Arg{width} \meta{material} \cs{vcoffin_set_end:}
% \end{syntax}
% Typesets the \meta{material} in vertical mode constrained to the
% given \meta{width} and stores the result in the \meta{coffin}. The
@@ -280,6 +280,32 @@
% therefore analogous to carrying out an alignment where the
% \enquote{parent} coffin is the current insertion point.
% \end{function}
+%
+% \section{Measuring coffins}
+%
+% \begin{function}{\coffin_dp:N, \coffin_dp:c}
+% \begin{syntax}
+% \cs{coffin_dp:N} \meta{coffin}
+% \end{syntax}
+% Calculates the depth (below the baseline) of the \meta{coffin}
+% in a form suitable for use in a \meta{dimension expression}.
+% \end{function}
+%
+% \begin{function}{\coffin_ht:N, \coffin_ht:c}
+% \begin{syntax}
+% \cs{coffin_ht:N} \meta{coffin}
+% \end{syntax}
+% Calculates the height (above the baseline) of the \meta{coffin}
+% in a form suitable for use in a \meta{dimension expression}.
+% \end{function}
+%
+% \begin{function}{\coffin_wd:N, \coffin_wd:c}
+% \begin{syntax}
+% \cs{coffin_wd:N} \meta{coffin}
+% \end{syntax}
+% Calculates the width of the \meta{coffin} in a form
+% suitable for use in a \meta{dimension expression}.
+% \end{function}
%
% \section{Coffin diagnostics}
%
@@ -745,6 +771,25 @@
% \end{variable}
% \end{variable}
% \end{variable}
+%
+% \subsection{Measuring coffins}
+%
+% \begin{macro}
+% {
+% \coffin_dp:N, \coffin_dp:c, \coffin_ht:N, \coffin_ht:c,
+% \coffin_wd:N, \coffin_wd:c
+% }
+% Coffins are just boxes when it comes to measurement. However, semantically
+% a separate set of functions are required.
+% \begin{macrocode}
+\cs_new_eq:NN \coffin_dp:N \box_dp:N
+\cs_new_eq:NN \coffin_dp:c \box_dp:c
+\cs_new_eq:NN \coffin_ht:N \box_ht:N
+\cs_new_eq:NN \coffin_ht:c \box_ht:c
+\cs_new_eq:NN \coffin_wd:N \box_wd:N
+\cs_new_eq:NN \coffin_wd:c \box_wd:c
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Coffins: handle and pole management}
%
@@ -820,7 +865,7 @@
\cs_set_eq:NN \Width \l_coffin_Width_dim
\dim_set:Nn \Height { \box_ht:N #1 }
\dim_set:Nn \Depth { \box_dp:N #1 }
- \dim_set:Nn \TotalHeight { \box_ht:N #1 - \box_dp:N #1 }
+ \dim_set:Nn \TotalHeight { \box_ht:N #1 + \box_dp:N #1 }
\dim_set:Nn \Width { \box_wd:N #1 }
}
\cs_new_protected_nopar:Npn \coffin_end_user_dimensions: