LyXVertical alignment of images in float

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
gandi
Posts: 23
Joined: Tue Oct 20, 2009 2:45 pm

Vertical alignment of images in float

Post by gandi »

Hello,

I'm trying to do something that should be trivial, but I don't seem to get there. I would like to place two images of different height next to each other in one float object. The top of both images should be vertically aligned with the top of the float.

The only workaround I have found so far was putting the two images in two separate boxes (=minipages) and adding a fixed vertical space below the smaller figure, within its box.

Is there a way to do this properly?

Many thanks in advance!
Last edited by gandi on Tue May 25, 2010 3:50 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
christoi
Posts: 4
Joined: Mon May 24, 2010 5:57 pm

Vertical alignment of images in float

Post by christoi »

Hi!

Have you tried \minipage? http://dcwww.camd.dtu.dk/~schiotz/comp/ ... xTips.html shows how you can put the figure caption to the right of a figure. You will be able to the same to put two figures. Use the `t' specifier as in the example.
gandi
Posts: 23
Joined: Tue Oct 20, 2009 2:45 pm

Re: Vertical alignment of images in float

Post by gandi »

Christoi,

I've used LyX boxes, which are minipages. Selecting 'top' as placement in LxY results in LaTeX code with the [t] option set. However this does not lead to the desired result, i.e. images with their top edges at the same level.
gandi
Posts: 23
Joined: Tue Oct 20, 2009 2:45 pm

Re: Vertical alignment of images in float

Post by gandi »

After a bit of playing around I find that using "middle" and "top" as placement options for "content" and "box", respectively, does what I need.
Post Reply