John Hendy <[email protected]> writes:
> On Fri, Apr 12, 2013 at 5:24 PM, Eric Schulte <[email protected]> wrote:
>> John Hendy <[email protected]> writes:
>>
>>> I thought this was the proper syntax for printing stuff directly to a
>>> LaTeX document:
>>>
>>> #+begin_src R :session :exports results :results output :wrap org
>>>
>>
>> I think you want either ":results latex" or ":wrap latex".
>>
>
> Trying my best to follow the evolution here.... I've tried to discern
> from the manual and Worg the best way to do something, generally try
> it and fail. Then I post to the list and get an answer. A short time
> later, I try doing what I think is approximately the same thing to
> find that it seems to have changed since the last time:
>
> To print multiple file names and =#+attr_stuff= options, the answer
> was =:results output org :exports results=
> - http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg01224.html
>
> Trying to do the same exact thing a bit later was =:results output
> wrap=, shortly followed up with the instruction to use =:wrap org=
> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01599.html
>
> Now, it's =:wrap latex=, but I'm not sure why.
>
I may have miss-understood your question.
>
> Is =:wrap org= appropriate for anything?
Use :wrap latex if your code block produces raw latex. E.g.,
#+begin_src sh :results output :wrap latex
cat <<EOF
\begin{tabular}{rr}
a & b\\
\hline
1 & 2\\
\end{tabular}
EOF
#+end_src
#+RESULTS:
#+BEGIN_latex
\begin{tabular}{rr}
a & b\
\hline
1 & 2\
\end{tabular}
#+END_latex
Use :wrap org if your code block produces raw org. E.g.,
#+begin_src sh :results output :wrap org
cat <<EOF
| a | b |
|---+---|
| 1 | 2 |
EOF
#+end_src
#+RESULTS:
#+BEGIN_org
| a | b |
|---+---|
| 1 | 2 |
#+END_org
Let me know if that leave any mysteries or doesn't address part of your
question. I apologize for any contribution my often terse and hurried
responses have made to this confusion.
--
Eric Schulte
http://cs.unm.edu/~eschulte