[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Size and placement of images in table in PDF export
From: |
Michael Hannon |
Subject: |
Re: [O] Size and placement of images in table in PDF export |
Date: |
Wed, 25 Apr 2012 00:30:38 -0700 (PDT) |
On Wednesday, April 25, 2012 at 12:08 AM Eric Fraga wrote:
> Nick Dokos <address@hidden> writes:
>> Michael Hannon <address@hidden> wrote:
>>
>>> Greetings. I've got another export question. If I put two small 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
>>> roughly
>>> the actual size of the concatenated images.
>>>
>>> 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 and
>>> runs off the page to the right.
[...]
>> Is there some way to override the default size/placement of the images in
>>> PDF export?
>>
>>
>> The trouble is that the default option says "width=.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=.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...
Hi, Eric. Thanks for the information. Just for the record, I ended up
"cheating" on this problem: I used the ImageMagick utility "montage" to
create, well, a montage of the images I wanted and then just loaded the
resulting, single image. I've been meaning to close the loop on this but kept
forgetting.
-- Mike