summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/xcoffins
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/xcoffins')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx59
1 files changed, 58 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
index 103934d5fe8..30a58c18817 100644
--- a/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/xcoffins/xcoffins.dtx
@@ -36,7 +36,7 @@
%
%<*driver|package>
\RequirePackage{xparse}
-\GetIdInfo$Id: xcoffins.dtx 2895 2011-10-09 15:58:19Z joseph $
+\GetIdInfo$Id: xcoffins.dtx 2963 2011-11-15 22:06:41Z joseph $
{L3 Experimental design-level coffins}
%</driver|package>
%<*driver>
@@ -583,6 +583,47 @@
% coffin is therefore analogous to carrying out an alignment where the
% \enquote{parent} coffin is the current insertion point.
% \end{function}
+%
+% \section{Measuring coffins}
+%
+% There are places in the design process where it is useful to be able to
+% measure coffins outside of pole-setting procedures.
+%
+% \begin{function}{\CoffinDepth}
+% \begin{syntax}
+% \cs{CoffinDepth} \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}, for example
+% |\setlength{\mylength}{\CoffinDepth\ExampleCoffin}|.
+% \end{function}
+%
+% \begin{function}{\CoffinHeight}
+% \begin{syntax}
+% \cs{CoffinHeight} \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}, for example
+% |\setlength{\mylength}{\CoffinHeight\ExampleCoffin}|.
+% \end{function}
+%
+% \begin{function}{\CoffinTotalHeight}
+% \begin{syntax}
+% \cs{CoffinTotalHeight} \meta{coffin}
+% \end{syntax}
+% Calculates the total height of the \meta{coffin}
+% in a form suitable for use in a \meta{dimension expression}, for example
+% |\setlength{\mylength}{\CoffinTotalHeight\ExampleCoffin}|.
+% \end{function}
+%
+% \begin{function}{\CoffinWidth}
+% \begin{syntax}
+% \cs{CoffinHeight} \meta{coffin}
+% \end{syntax}
+% Calculates the width of the \meta{coffin} in a form
+% suitable for use in a \meta{dimension expression}, for example
+% |\setlength{\mylength}{\CoffinWidth\ExampleCoffin}|.
+% \end{function}
%
% \section{Diagnostic functions}
%
@@ -839,6 +880,22 @@
% \end{macro}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\CoffinDepth, \CoffinHeight, \CoffinTotalHeigth, \CoffinWidth}
+% Nothing too complex, except that the total height is set up as an
+% expression so that it will act correctly if prefixed with a negative
+% sign, \emph{etc.}
+% \begin{macrocode}
+\NewDocumentCommand \CoffinDepth { m }
+ { \coffin_dp:N #1 }
+\NewDocumentCommand \CoffinHeight { m }
+ { \coffin_ht:N #1 }
+\NewDocumentCommand \CoffinTotalHeight { m }
+ { \dim_eval:w \coffin_ht:N #1 + \coffin_dp:N #1 \dim_eval_end: }
+\NewDocumentCommand \CoffinWidth { m }
+ { \coffin_wd:N #1 }
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\DisplayCoffinHandles}
% Displaying all of the handles is a bit easier, as there is no need