john wrote:

On Tue, 2006-01-17 at 12:18 -0800, Rich Shepard wrote:
On Wed, 18 Jan 2006, John O'Gorman wrote:

I have 6 books on Tex/LaTeX but not that one! Can you give us a brief
pointer to how to fix it (or is it not fixable)?
John,

  Yes, it's fixable. Let me paraphrase from the book.
Thanks Rich. You have gone well beyond the call of duty!

I will study this and see where we get.

Just a comment though. Helge was talking about using 2 minipages side-by-side (Which Kevin and
I have found to not top-align properly).Your excerpt features 2 parbox
structures side-by-side. Is the principle the same?
Sorry about my faulty example.  I tried with text in the minipages,
now I have a solution that also works with graphichs (and still no
latex code.)  I used lyx-1.4, but I only used minipages so it should
work with lyx 1.3 as well.

The problem is that latex seems to offer alignment of boxes
byt top/bottom/middle, but only the middle is true.  Top and
bottom alignment does not refer to top and bottom of the
minipage/parbox, but the topmost and lowermost line contained within!

If there is only one line within, that line is both top and bottom.
This is the case when the minipage contains a logo only, the picture
is effectively "one big letter" with the baseline underneath it.
So "top" alignment effectively becomes bottom alignment in this case.

Latex does not seem to offer a proper way of aligning boxes by the
box top, but there is a simple workaround.

In the first minipage, the one with the logo, add a blank line first.
I.e. place cursor before your graphic, press ctrl space to add a
protected space, then ctrl+enter to force a line break. The
protected space is there so latex won't discard the "empty" line.

In the second box, the one with your name, do the same thing.
But take care. The font height for the two blank lines (i.e. the
protected space and the linebreak itself) must be the same
for the two minipages or they won't line up.  Incidentally,
you can use this font height as a simple way to fine-tune the
alignment if necessary.  (Could be useful as text does not have
a well defined "top" to line up by, text only have a baseline.
Individual letters have varying height, so good-looking alignment
depends on the spelling of your name.)

The blank line will of course push your logo and your name
a little down.  If this is a problem, but the two
minipages one line further up.  Or use the smallest font
possible for the blank line.

I tried this with a real picture this time, and also a large font
for the name.  It works well, two minipages, two blank lines
with only a protected space, and the contents.
No latex code, no outer boxes or anything else needed. :-)

If the "blank line" solution isn't satisfactory, consider using
latex commands to force the minipages to line up. You can
probably do it by tweaking the \raisebox command. My
simple way is nice in that one minipage does not need to
know the height of the other, so there is no need for
measurements.  Therefore, future changes in font height
or logo size won't be a problem.

Helge Hafting

Reply via email to