From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Re: Size and placement of images in table in PDF export Date: Wed, 25 Apr 2012 00:30:38 -0700 (PDT) Message-ID: <1335339038.35952.YahooMailNeo@web161906.mail.bf1.yahoo.com> References: <1330734025.40991.YahooMailNeo@web161903.mail.bf1.yahoo.com> <4912.1330747331@alphaville> <87lilkmgpx.fsf@ucl.ac.uk> Reply-To: Michael Hannon Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMwga-0001FT-Ib for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 03:30:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMwgT-0007i4-Us for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 03:30:48 -0400 Received: from nm6-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.146]:47506) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SMwgT-0007hm-IQ for emacs-orgmode@gnu.org; Wed, 25 Apr 2012 03:30:41 -0400 In-Reply-To: <87lilkmgpx.fsf@ucl.ac.uk> 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: Eric Fraga , "nicholas.dokos@hp.com" Cc: Org-Mode List On Wednesday, April 25, 2012 at 12:08 AM Eric Fraga wrote:=0A=0A> Nick Doko= s writes:=0A=0A>> Michael Hannon wrote:=0A>>=0A>>> Greetings.=A0 I've got another export question.=A0 If= I put two small images=0A>>> into=0A>>> an Org-mode table and export the c= ontaining document to HTML, I see the two=0A>>> images displayed side-by-si= de in an area of the page that is at least=0A>>> roughly=0A>>> the actual s= ize of the concatenated images.=0A>>>=0A>>> If I export the same document t= o PDF, the two images are again displayed=0A>>> side-by-side, but image on = the left is magnified to take up most of the=0A>>> horizontal space on the = page; the image on the right is also magnified and=0A>>> runs off the page = to the right.=0A=0A[...]=0A=0A>> Is there some way to override the default = size/placement of the images in=0A>>> PDF export?=0A>>=0A>>=0A>> The troubl= e is that the default option says "width=3D.9\\linewidth" so=0A>> if you tr= y to put two of them on the same "line", they end up overflowing=0A>> the p= age. For an image not inside a table, you could reset that with=0A>>=0A>> #= +ATTR_LaTeX: width=3D.4\\linewidth=0A=0A> By the way, there should be only = one \ in this line as org or emacs do=0A> not need the \ escaped in this co= ntext.=0A=0A>>=0A>> but this is a rather blunt instrument: for images insid= e a table, it=0A>> applies not only to the images but also to the table (an= d it ends up=0A>> producing a syntactically incorrect latex program - that'= s probably=0A>> a bug in the latex exporter.)=0A=0A> There is indeed a prob= lem with figures inside tables in that the same=0A> construct is used to pa= ss arguments to \includegraphics=0A> and \begin{tabular}.=A0 Not ideal at a= ll.=A0 We really should have different=0A> constructs for each...=0A=0A> Fo= r the above problem from the OP, the best solution in latex directly=0A> wo= uld have been to specify the widths of the columns using p{2.5cm}=0A> colum= n formats, say.=A0 If that is done, the default width for images,=0A> based= on \linewidth, would work just fine as \linewidth is the width of=0A> the = text within the actual latex structure (as opposed to \textwidth or=0A> \co= lumnwidth, say).=A0 This works because the "p" tabular format changes=0A> \= linewidth within that column.=0A> =0A> However, it is not possible to speci= fy table attributes *if* you have=0A> images inside the table as the same l= atex attributes are passed to both=0A> table and images...=0A=0AHi, Eric.= =A0 Thanks for the information.=A0 Just for the record, I ended up=0A"cheat= ing" on this problem: I used the ImageMagick utility "montage" to=0Acreate,= well, a montage of the images I wanted and then just loaded the=0Aresultin= g, single image.=A0 I've been meaning to close the loop on this but kept=0A= forgetting.=0A=0A-- Mike