emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] how to handle svg files when exporting orgmode to html and pdf?


From: Nick Dokos
Subject: Re: [O] how to handle svg files when exporting orgmode to html and pdf?
Date: Fri, 09 Aug 2013 00:43:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Malcolm Cook <address@hidden> writes:

>
> #+begin_src R :results  graphics output :exports both :file mtcars.png 
> library(ggplot2)
> qplot(wt, mpg, data = mtcars)
> #+end_src
>
> #+RESULTS:
> [[file:mtcars.png]]
>
> #+LATEX_HEADER: \usepackage{svg}
> #+BEGIN_LaTeX
> \includesvg{mtcars}
> #+END_LaTeX


The following works for me:

--8<---------------cut here---------------start------------->8---
#+LATEX_HEADER: \usepackage{svg}

#+begin_src R :results  graphics output :exports both :file mtcars.svg :results 
none
library(ggplot2)
qplot(wt, mpg, data = mtcars)
#+end_src

#+BEGIN_LaTeX
\includesvg{mtcars}
#+END_LaTeX
--8<---------------cut here---------------end--------------->8---

The only problem is that I use minted to typeset code blocks and it
apparently does not know how to deal with R code blocks, so the code
block is not present in the PDF file. But the image is there. I attach
the resultant tex and pdf files.

Attachment: foo2.tex
Description: TeX file

Attachment: foo2.pdf
Description: PDF file

-- 
Nick

reply via email to

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