> 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