From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Vertically aligning images in tables? Date: Fri, 15 Jan 2016 16:44:07 +0000 Message-ID: <87ziw6vlm0.fsf@delle7240.chemeng.ucl.ac.uk> References: <6sw6c7fuxzvmu6.fsf@BO-C02PWE1MG8WN.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK7iz-0004lb-4k for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 11:59:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aK7iv-0001b4-UT for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 11:59:45 -0500 Received: from mail-db3on0137.outbound.protection.outlook.com ([157.55.234.137]:59648 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aK7iv-0001aS-MF for emacs-orgmode@gnu.org; Fri, 15 Jan 2016 11:59:41 -0500 In-Reply-To: <6sw6c7fuxzvmu6.fsf@BO-C02PWE1MG8WN.home> (Peter Davis's message of "Thu, 14 Jan 2016 17:05:21 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Peter Davis Cc: emacs-orgmode@gnu.org 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... HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.3-449-gd85ff3