all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Controlling the size of org babel image outputs in latex
@ 2018-10-17 15:17 Ellis Adigvom
  2018-10-18  7:27 ` Sharon Kimble
  0 siblings, 1 reply; 2+ messages in thread
From: Ellis Adigvom @ 2018-10-17 15:17 UTC (permalink / raw)
  To: help-gnu-emacs

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?




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Controlling the size of org babel image outputs in latex
  2018-10-17 15:17 Controlling the size of org babel image outputs in latex Ellis Adigvom
@ 2018-10-18  7:27 ` Sharon Kimble
  0 siblings, 0 replies; 2+ messages in thread
From: Sharon Kimble @ 2018-10-18  7:27 UTC (permalink / raw)
  To: Ellis Adigvom; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-18  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17 15:17 Controlling the size of org babel image outputs in latex Ellis Adigvom
2018-10-18  7:27 ` Sharon Kimble

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.