help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Controlling the size of org babel image outputs in latex


From: Sharon Kimble
Subject: Re: Controlling the size of org babel image outputs in latex
Date: Thu, 18 Oct 2018 08:27:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Ellis Adigvom <ellisadigvom@gmail.com> writes:

> Hi,
>
> I have an org mode document with some embedded PlantUML code blocks. I export 
> this file to PDF
> through latex (C-c C-e l p). I have some diagrams which are rather small, but 
> they are expanded to
> fill the page, and this looks awkward in the result.
>
> How can I control the size of the image in the exported file? I've tried 
> using:
>
>     #+ATTR_LATEX: :width: 4cm
>     #+BEGIN_SRC plantuml :file diagram.png
>
>     ...
>
>     #+END_SRC
>
> But this doesn't have any impact on the output. Can anyone help me with this?
>

Hi Ellis.

This is what I'm using for any images in things that I'm writing in org-mode -

--8<---------------cut here---------------start------------->8---
#+CAPTION: Bunions
#+ATTR_LATEX: :float wrap :width 0.38\textwidth :placement {R}{0.4\textwidth}
#+LABEL: fig:bunions
[[./images/bunions.jpg]

#+CAPTION: Main bunion sites on females and male bodies
#+ATTR_LATEX: :width 0.6\textwidth :float t :placement [H]
#+LABEL: fig:bunions
[[./images/bunion-sites.png]
--8<---------------cut here---------------end--------------->8---

The first places the image on the right of the page and allows text to
wrap around it, and the second places the image centred in its space.
Note that the images are all held in a sub-directory of the main
directory called 'images'. You can play with the 'width' dimensions to
achieve the look that you want, I frequently do :)

I don't have any '#+BEGIN_SRC' its just that straight latex code block
inserted where I need it, and org-mode is adult enough to behave I've
found.

Hope this helps?

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk
Debian 9.4, fluxbox 1.3.7, emacs 25.3.4, org 9.1.14

Attachment: signature.asc
Description: PGP signature


reply via email to

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