On 15. mars 2012 05:11, John O'Gorman wrote:
Hi

I'm trying to put a jpeg image on the left with a paragraph of text to
its right.

I've tried putting these items into a table.
I've tried putting them into 2 lyx boxes (aka minipages) with an hfill
between them.

In both instances the left element (the graphics is top aligned) and
right one is bottom aligned.
They look OK  (both top aligned) within LyX but not when I view or print
the DVI or PDF.
Can anyone help?


To see what happens, temporarily turn on borders for those minipages. The sizes might be surprising.

In this case, you get one box just tall enough for the graphic, and another just tall enough for the text. So alignment inside the voz won't matter, as there aren't room for positioning inside anyway.

The boxes themselves lines up by their "first baselines". So the reference for your text box is the baseline of the first line of text.

In the box with graphics, the image can be seen as a single huge letter. So its baseline is the bottom of the graphic, and this line up with the first line of text in the other box.

A simple fix:
Add a blank line first in both boxes. ctrl+space for a protected
space, then ctrl+enter for a forced linebreak. Now both boxes line
up by the top. (really, by the baseline of the blank line at the top. But since both boxes now starts with a blank line, the top is also aligned.

This may be "good enough". There is some extra whitespace at the
top of the boxes, it might not matter if you aren't going to
have borders anyway.

You can also experiment with setting the box height, then the
internal alignment gets useful. Keep the borders "on" until you like what you see.

Helge Hafting

Reply via email to