[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Vertically aligning images in tables?

From: Eric S Fraga
Subject: Re: [O] Vertically aligning images in tables?
Date: Fri, 15 Jan 2016 16:44:07 +0000
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (gnu/linux)

On Thursday, 14 Jan 2016 at 17:05, Peter Davis wrote:
> I'm trying to place three images side-by-side to they're top-aligned,
> but I can't see to find a way to get org-mode to do this. My
> current code is:
> +----
> | #+MACRO: p  \includegraphics[scale=.3]{$1}
> | #+ATTR_LATEX: :align {p{5cm} p{5cm} p{5cm}}
> | | {{{p(./A.png)}}} | {{{p(./B.png)}}} | {{{p(./C.png)}}}   |
> +----
> As far as I can tell from LaTeX doc, the p attribute is supposed to
> top-align the contents, but it's not doing that.

Yes and no... :-)

The p directive will top align in the sense that the first line of each
entry will be at the top of the vertical space provided for the row once
all columns in the row have been defined.  However, the images will be
bottom aligned on the baseline of the first line in that row and all the
columns will have the same baseline.  The height of the first line in
each paragraph will all be the same, equal to the maximum of the heights
of the first lines in all the columns.  Therefore, if the images have
different heights, they will not be aligned with respect to the tops of
the images.  

I hope this makes sense.

A solution is to use a parbox of the right (and equal) height for each
image.  Enclose the includegraphics within a parbox but you will have to
preset the height to use...  


: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.3-449-gd85ff3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]