Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

newlfm header

50 views
Skip to first unread message

Sebastian P. Luque

unread,
May 17, 2013, 3:46:41 PM5/17/13
to
Hi,

I'm having a little difficulty getting a header to correctly align with
newlfm. Here's a minimal example:

---<--------------------cut here---------------start------------------->---
\documentclass[12pt, busletter, letterpaper, dateright]{newlfm}
\newlfmP{topmarginskip=0.5em,sigsize=0em}
\newsavebox{\lHDR}
\sbox{\lHDR}{%
\parbox[t]{0.2\linewidth}{%
\Huge \bfseries \textsf{\color{red}{A}.\color{violet}{B}.%
\color{teal}{C}.\color{orange}{D}.}}}
\newsavebox{\rHDR}
\sbox{\rHDR}{%
\parbox[t]{0.8\linewidth}{%
\bfseries \sffamily \centering ABCD \\
\scriptsize ABCD}}
\Lheader{\usebox{\lHDR}}
\Rheader{\usebox{\rHDR}}

\begin{document}
\begin{newlfm}
Testing.
\end{newlfm}
\end{document}
---<--------------------cut here---------------end--------------------->---

The left and the right headers are not aligned vertically, so that the
left header is almost flush against the top, whereas the right one is
vertically centered in the header section. The relevant section in the
newlfm manual is a bit terse for me, so I'd appreciate any tips.

Thanks,

--
Seb

Lee Rudolph

unread,
May 17, 2013, 4:58:09 PM5/17/13
to
Well, without having looked at the manual, or remembering
the syntax of \parbox (which I have rarely used), I first
thought that you'd want to have a [t] in there (by analogy
with the syntax of minipage)--then I noticed that you did.
So I took it out; and somewhat to my surprise, the two
headers are much more closely top-aligned than they were!
In fact, with no [t], the top of the type to the right is
0.4536 points higher than the top of the type to the left;
with [t], it's 4.0176 points *lower*. (Approximate measurements.)

What this means I have no idea.

Lee Rudolph

Sebastian P. Luque

unread,
May 17, 2013, 5:07:22 PM5/17/13
to
On Fri, 17 May 2013 20:58:09 +0000 (UTC),
Lee Rudolph <lrud...@panix.com> wrote:

[...]

> Well, without having looked at the manual, or remembering the syntax
> of \parbox (which I have rarely used), I first thought that you'd want
> to have a [t] in there (by analogy with the syntax of minipage)--then
> I noticed that you did. So I took it out; and somewhat to my
> surprise, the two headers are much more closely top-aligned than they
> were! In fact, with no [t], the top of the type to the right is
> 0.4536 points higher than the top of the type to the left; with [t],
> it's 4.0176 points *lower*. (Approximate measurements.)

Thanks! I played around some more and using [c] seems to be identical
as without any option to \parbox, which is good enough.

Cheers,

--
Seb

Dan Luecking

unread,
May 21, 2013, 6:44:43 PM5/21/13
to
On Fri, 17 May 2013 20:58:09 +0000 (UTC), Lee Rudolph
<lrud...@panix.com> wrote:

Parboxes placed horizontally will have their reference points
aligned. For [c] (the default) the reference point is at the
vertical center. For [t] it is at the baseline of the top line
and for [b] it is at the baseline of the bottom line. (Note that if
there is only one line [t] and [b] produce the same reference point.)

Thus these boxes would normally align the bottom of the first
with the base of the first line of the second.

This is complicated by the fact that any \vspace at the
top causes the reference point for [t] to be at the very top.
Similarly a \vspace at the bottom puts the reference point at
the very bottom fo [b].

Add to that the fact that newlfm adds a vspace at the bottom
and fancyhdr wraps the whole thing in another layer of
\parbox[b] and my brain starts to hurt trying to figure out
what the ultimate alignment should be.

I would probably attack this alignment by using option [b]
(they end up there anyway) and then adding \vspace's
at the bottom of each of these parboxes with values adjusted
to make the alignment come out to what I wanted it to be.
I can get almost exact alignment at the top with
\parbox[b]{0.2\linewidth}{%
\Huge \bfseries \textsf{\color{red}{A}.\color{violet}{B}.%
\color{teal}{C}.\color{orange}{D}.}\par\vspace{0pt}}% <---
for the first and
\parbox[b]{0.8\linewidth}{%
\bfseries \sffamily \centering ABCD \\
\scriptsize ABCD\par\vspace{-0.5pt}}%<---
for the second.


Dan
To reply by email, change LookInSig to luecking
0 new messages