LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Tue, 15 Nov 2011 08:23:38 +0000
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Joseph Wright <[log in to unmask]>
Parts/Attachments: text/plain (38 lines)
On 14/11/2011 10:08, Brent Longborough wrote:
> Hi, Will,
> Thank you for that.
> 
> Here's what I currently do for measuring (99.5% of the credit to
> @egreg). In this case, I have a logo image, 10 points of space, and a
> rule to fill the rest of the measure horizontally:
> 
> 	\usepackage{xparse}
> 	\ExplSyntaxOn
> 	\NewDocumentCommand{\WidthOfCoffin}{m}{ \box_wd:N #1 }
> 	\NewDocumentCommand{\HeightOfCoffin}{m}{ \box_ht:N #1 }
> 	\NewDocumentCommand{\DepthOfCoffin}{m}{ \box_dp:N #1 }
> 	\ExplSyntaxOff
> 
> 	\NewCoffin \ruleh
> 	\newlength{\worki}
> 	\setlength{\worki}{\textwidth}
> 	\addtolength{\worki}{-10pt}
> 	\addtolength{\worki}{-\WidthOfCoffin{\logo}}
> 	\SetHorizontalCoffin \ruleh {\color{blue}\rule{\worki}{1pc}}
> 
> Of course, I could have done this by simply measuring the image in the
> \logo coffin, or even prescribing its width by other means
> ...[width=1in]..., but doing all my copyfitting and layout with coffins
> makes for nice, uniform code (and therefore, I suspect, easier to
> maintain --- just following the layout of the elementare typographie
> cover page made my brain hurt! [No criticism intended other than of my
> own limitations!]).

Seems like a reasonable request: looked at from a 'design' point of
view, this supports something like 'the logo should be inserted 1 cm
from the left hand edge, with the space on the right of the logo evenly
divided between ...'. I'll add appropriate material to the code today:
I'd suggest \CoffinWidth, etc.
-- 
Joseph Wright

ATOM RSS1 RSS2