From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: how to handle svg files when exporting orgmode to html and pdf?
Date: Fri, 09 Aug 2013 00:43:35 -0400 [thread overview]
Message-ID: <87vc3fiidk.fsf@gmail.com> (raw)
In-Reply-To: CAAAQmVZLTh5+xk3gOHjFtP73a7ehUor5aqOfqhu0i-oAqvdk3w@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
Malcolm Cook <malcolm.cook@gmail.com> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: TeX file --]
[-- Type: text/x-tex, Size: 794 bytes --]
% Created 2013-08-09 Fri 00:36
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage[normalem]{ulem}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{hyperref}
\tolerance=1000
\usepackage{minted}
\usepackage{svg}
\author{Nick Dokos}
\date{\today}
\title{foo2}
\hypersetup{
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 24.3.50.2 (Org mode 8.0.7)}}
\begin{document}
\maketitle
\tableofcontents
\begin{minted}[]{R}
library(ggplot2)
qplot(wt, mpg, data = mtcars)
\end{minted}
\includesvg{mtcars}
% Emacs 24.3.50.2 (Org mode 8.0.7)
\end{document}
[-- Attachment #3: PDF file --]
[-- Type: application/pdf, Size: 49502 bytes --]
[-- Attachment #4: Type: text/plain, Size: 10 bytes --]
--
Nick
next prev parent reply other threads:[~2013-08-09 4:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 0:32 how to handle svg files when exporting orgmode to html and pdf? malcolm cook
2013-07-27 6:36 ` Aaron Ecay
2013-08-08 17:46 ` Malcolm Cook
2013-08-08 19:19 ` Nick Dokos
2013-08-08 21:15 ` Cook, Malcolm
2013-08-08 19:36 ` Aaron Ecay
2013-08-08 19:46 ` Malcolm Cook
2013-08-08 21:00 ` Aaron Ecay
2013-08-08 21:11 ` Malcolm Cook
2013-08-08 21:34 ` Aaron Ecay
2013-08-09 2:04 ` Malcolm Cook
2013-08-09 20:52 ` Aaron Ecay
2013-08-09 21:01 ` Cook, Malcolm
2013-10-28 19:18 ` Cook, Malcolm
2013-10-28 20:02 ` Aaron Ecay
2013-10-28 22:02 ` Cook, Malcolm
2013-10-30 6:08 ` Aaron Ecay
2013-08-09 4:43 ` Nick Dokos [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-18 0:25 Malcolm Cook
2013-07-18 0:47 ` Suvayu Ali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vc3fiidk.fsf@gmail.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.