[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-babel-R: export R graphics to LaTeX
From: |
Nick Dokos |
Subject: |
Re: [O] org-babel-R: export R graphics to LaTeX |
Date: |
Tue, 07 Feb 2012 12:39:04 -0500 |
Gary Oberbrunner <address@hidden> 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---