From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Fraga Subject: Re: Size and placement of images in table in PDF export Date: Wed, 25 Apr 2012 16:38:10 +0930 Message-ID: <87lilkmgpx.fsf@ucl.ac.uk> References: <1330734025.40991.YahooMailNeo@web161903.mail.bf1.yahoo.com> <4912.1330747331@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMwKw-00060m-J7 for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 03:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMwKu-0006t9-SD for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 03:08:26 -0400 Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208]:11370 helo=am1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMwKu-0006sj-IR for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 03:08:24 -0400 In-Reply-To: <4912.1330747331@alphaville> (Nick Dokos's message of "Fri, 2 Mar 2012 23:02:11 -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: nicholas.dokos@hp.com Cc: Michael Hannon , Org-Mode List Nick Dokos writes: > Michael Hannon wrote: > >> Greetings.=C2=A0 I've got another export question.=C2=A0 If I put two sm= all images into >> an Org-mode table and export the containing document to HTML, I see the = two >> images displayed side-by-side in an area of the page that is at least ro= ughly >> the actual size of the concatenated images. >>=20 >> If I export the same document to PDF, the two images are again displayed >> side-by-side, but image on the left is magnified to take up most of the >> horizontal space on the page; the image on the right is also magnified a= nd >> runs off the page to the right. [...] >> Is there some way to override the default size/placement of the images i= n PDF >> export? >>=20 > > The trouble is that the default option says "width=3D.9\\linewidth" so > if you try to put two of them on the same "line", they end up overflowing > the page. For an image not inside a table, you could reset that with > > #+ATTR_LaTeX: width=3D.4\\linewidth By the way, there should be only one \ in this line as org or emacs do not need the \ escaped in this context. > > but this is a rather blunt instrument: for images inside a table, it > applies not only to the images but also to the table (and it ends up > producing a syntactically incorrect latex program - that's probably > a bug in the latex exporter.) There is indeed a problem with figures inside tables in that the same construct is used to pass arguments to \includegraphics and \begin{tabular}. Not ideal at all. We really should have different constructs for each... For the above problem from the OP, the best solution in latex directly would have been to specify the widths of the columns using p{2.5cm} column formats, say. If that is done, the default width for images, based on \linewidth, would work just fine as \linewidth is the width of the text within the actual latex structure (as opposed to \textwidth or \columnwidth, say). This works because the "p" tabular format changes \linewidth within that column. However, it is not possible to specify table attributes *if* you have images inside the table as the same latex attributes are passed to both table and images... --=20 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 : using Org-mode version 7.8.06 (release_7.8.06.181.g67694.dirty)