emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-babel-R: export R graphics to LaTeX
@ 2012-02-07 17:15 Gary Oberbrunner
  2012-02-07 17:39 ` Nick Dokos
  0 siblings, 1 reply; 2+ messages in thread
From: Gary Oberbrunner @ 2012-02-07 17:15 UTC (permalink / raw)
  To: Orgmode Mailing List

I have the following org-mode test file:

===========
#+TITLE:    tester.org
#+PROPERTY: session *R*
#+PROPERTY: results output
#+LaTeX_HEADER: \usepackage{hyperref}

* Headline here

Here is some text.

#+begin_src R :exports both :results graphics :file img.jpg
hist(rnorm(100))
#+end_src
=============

and exporting it to LaTeX with C-C C-e d gives a PDF with only a link
to the graphics file, not inlined as a figure.  How do I include the
actual R graph?

-- 
Gary

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

* Re: org-babel-R: export R graphics to LaTeX
  2012-02-07 17:15 org-babel-R: export R graphics to LaTeX Gary Oberbrunner
@ 2012-02-07 17:39 ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2012-02-07 17:39 UTC (permalink / raw)
  To: Gary Oberbrunner; +Cc: nicholas.dokos, Orgmode Mailing List

Gary Oberbrunner <garyo@oberbrunner.com> wrote:

> I have the following org-mode test file:
> 
> ===========
> #+TITLE:    tester.org
> #+PROPERTY: session *R*
> #+PROPERTY: results output
> #+LaTeX_HEADER: \usepackage{hyperref}
> 
> * Headline here
> 
> Here is some text.
> 
> #+begin_src R :exports both :results graphics :file img.jpg
> hist(rnorm(100))
> #+end_src
> =============
> 
> and exporting it to LaTeX with C-C C-e d gives a PDF with only a link
> to the graphics file, not inlined as a figure.  How do I include the
> actual R graph?
> 

I cannot reproduce this: the image is produced properly and the
.tex file contains the proper \includegraphics invocation. What version
of org are you using?  What does the .tex file look like? There might be
some option setting that causes this but I'm not sure. I append the
.tex file I get for comparison. 

Nick

Org-mode version 7.8.03 (release_7.8.03.292.gec677)


--8<---------------cut here---------------start------------->8---
% Created 2012-02-07 Tue 12:33
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage{minted}
\usepackage{hyperref}
\providecommand{\alert}[1]{\textbf{#1}}

\title{tester.org}
\author{Nick Dokos}
\date{\today}
\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs Org-mode version 7.8.03}}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

\section{Headline here}
\label{sec-1}


Here is some text.


\begin{minted}[]{R}
hist(rnorm(100))
\end{minted}

\includegraphics[width=.9\linewidth]{img.jpg}

\end{document}
--8<---------------cut here---------------end--------------->8---

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

end of thread, other threads:[~2012-02-07 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 17:15 org-babel-R: export R graphics to LaTeX Gary Oberbrunner
2012-02-07 17:39 ` Nick Dokos

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).