I'm experimenting with xcoffins for a cover page (and enjoying myself immensely, BTW, what an ace package).
What I'm trying to to at this moment is fit a logo, some horizontal white space, and a coloured horizontal bar nicely into \textwidth
In my code, below, although the calculation of the length of the horizontal bar works nicely, it seems a bit clunky and 20th-century. I'm especially worried there might be significant overhead in \settowidth{\worki}{\TypesetCoffin{\logo}}. Can anyone suggest a cleaner, more ``modern'' way of doing it?
As a supplementary question: are there any plans to add coffin-specific measuring tools to xcoffins? Perhaps something along the lines of \CoffinWidth{<coffin>}, for example?
PS: I appreciate that xcoffins is work-in-progress and that the interface may still be a bit malleable...
Here's my M(ish)WE:
\documentclass[12pt,a4paper]{memoir}
\semiisopage
\checkandfixthelayout
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{xcoffins}
\begin{document}
\thispagestyle{empty}
\NewCoffin \result
\SetHorizontalCoffin \result {}
\NewCoffin \logo
\SetHorizontalCoffin \logo {\includegraphics[height=2in]{mylogo}}
\NewCoffin \ruleh
\newlength{\worki}
\newlength{\workii}
\settowidth{\worki}{\TypesetCoffin{\logo}}
\setlength{\workii}{\textwidth}
\addtolength{\workii}{-5pt}
\addtolength{\workii}{-\worki}
\SetHorizontalCoffin \ruleh {\color{blue}\rule{\workii}{1pc}}
\JoinCoffins \result \logo
\JoinCoffins \result[\logo-vc,\logo-r] \ruleh[vc,l](5pt,0pt)
\noindent
\TypesetCoffin \result
\end{document}
xcoffins. Good times. – Seamus Nov 10 '11 at 13:11\CoffinSize[<pair of points denoted by poles>]or something along those lines. Brent, it would be great if you would collect thoughts and feature requests when you play along with nails and planks :-) – Frank Mittelbach Jun 30 '12 at 19:30