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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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