emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Exporting caption with raw results from inline source blocks


From: Eric Schulte
Subject: Re: [O] Exporting caption with raw results from inline source blocks
Date: Fri, 26 Apr 2013 09:44:07 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

> An alternate approach which may be preferable would be to expose a
> defcustom along the lines of org-babel-inline-result-wrapper, which
> could be used by org-babel-examplize-region instead of "=%s=".
>

I think this is a good idea.  I've just pushed up a patch which exposes
a new defcustom named `org-babel-inline-result-wrap'.  If you set this
to say the following.

    ;; emacs-lisp
    (setq org-babel-inline-result-wrap "$%s$")

Then you original example will work as expected, exporting the following
Org-mode,

#+PROPERTY: exports results
#+PROPERTY: results raw

* Caption lost at export

#+name: theplot
#+begin_src R :results graphics :file someplot.pdf
  plot(1:(10+1), 1:(10+1))
#+end_src

#+caption: There are src_R{10+1} points in this plot
#+results: theplot
[[file:someplot.pdf]]
to the following latex

% Created 2013-04-26 Fri 09:43
\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
\date{\today}
\title{}
\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs 24.3.1 (Org mode 8.0-pre)}}
\begin{document}

\tableofcontents


\section[Caption lost at export]{Caption lost at export}
\label{sec-1}

\begin{figure}[htb]
\centering
\includegraphics[width=.9\linewidth]{someplot.pdf}
\caption{There are $11$ points in this plot}
\end{figure}
% Emacs 24.3.1 (Org mode 8.0-pre)
\end{document}
-- 
Eric Schulte
http://cs.unm.edu/~eschulte

reply via email to

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