Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to vertically align multiple tables or graphics in Lyx

Tags:

lyx

What I wanted to do is that I had multiple tables and/or images of different heights and wanted them positioned on the page side by side, so that the tops of the objects were aligned.

I couldn't figure this out, it didn't matter whether I put these 'in-line' or in separate Boxes (Minipages) (that seemed to be aligned the way I wanted in the editor), in output Lyx always seemed to align these objects somehow around the center of their height and not the top.

Finally, (after several hours of googling and trying to figure this out) I have the answer, so I'm posting it below, because I hope someone like me will find it useful in the future.

like image 970
Michael Konečný Avatar asked Apr 03 '11 14:04

Michael Konečný


1 Answers

The way I solved this is relatively easy.

For each image/table I created a Box (Minipage). In each Box I put, on the first line, Vertical Space (Insert -> Formatting -> Vertical Space) and set the size to 0 in. After the Vertical Space I inserted the graphic/table. This way, if you put several boxes next to each other (for example by setting their width to 25% page width, or whatever you desire), they will be aligned by the top in the output.

You can also do Ctrl+Space (to insert a 'protected space') and then Enter, which seems to work the exact same way.

Hope this helps.

like image 153
Michael Konečný Avatar answered Oct 15 '22 22:10

Michael Konečný