[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Babel: Shell source block outputting latex for export
From: |
Berry, Charles |
Subject: |
Re: [O] Babel: Shell source block outputting latex for export |
Date: |
Tue, 1 May 2018 20:43:16 +0000 |
> On May 1, 2018, at 9:29 AM, Russell Adams <address@hidden> wrote:
>
> Seems like this recently broke.
>
> Here's an example:
>
> #+begin_src sh :results latex :exports results
> echo '\begin{lstlisting}'
> echo 'latex test should not be table'
> echo '\end{lstlisting}'
> #+end_src
>
> #+RESULTS:
> #+BEGIN_EXPORT latex
> | \begin{lstlisting} | | | | | |
> | latex | test | should | not | be | table |
> | \end{lstlisting} | | | | | |
> #+END_EXPORT
>
> The expected result is:
>
> #+RESULTS:
> #+BEGIN_LATEX
> \begin{lstlisting}
> latex test should not be table
> \end{lstlisting}
> #+END_LATEX
>
> I use shell commands to output listings of source files with custom
> formatting,
> and highlight source code segments instead of entire files for review.
>
> Any suggestions how I can prevent the automatic tabling of output?
>
On my system, this works (note the double backslash in the first line)
#+begin_src sh :exports results :results raw :wrap export latex
echo '\\begin{lstlisting}'
echo 'latex test should not be table'
echo '\end{lstlisting}'
#+end_src
Note that in Version 9.0 the syntax for export blocks changed (see ORG-NEWS) as
the first #+RESULTS has it.
HTH,
Chuck