In the past, I have exported org-mode source code blocks into LaTeX floating environments, without any problems.
At some point (I have no idea when), this behavior has changed for me.
The org manual says
:float t
is the default if the source block has a caption, but I get no\begin{figure}
in the exported output.#+name: a #+caption: abc #+BEGIN_SRC SuperCollider -i abc.play; #+END_SRC
-->
\lstset{language=SuperCollider,label=a,caption={abc},captionpos=b,numbers=none} \begin{lstlisting} abc.play; \end{lstlisting}
Source code blocks aren't processing
#+ATTR_LATEX
, whether it comes before the name and caption or immediately before#+BEGIN_SRC
.If I try to force a float using
#+BEGIN_FIGURE
, I can't find a way to attach a placement string.#+ATTR_LATEX
appears to be ignored.
Tried with org-mode v8.3.5.
[1] http://orgmode.org/manual/LaTeX-specific-attributes.html#LaTeX-specific-attributes
#+ATTR_LATEX: :options [th]
. #1 and #2, still no idea.#+ATTR_LATEX: :placement [th]
works for #3, although I put this just above the#RESULT
header created when running the source block (usingC-c C-c
) and I didn't add any manual#+BEGIN_FIGURE
.