emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Russell Adams <RLAdams@AdamsInfoServ.Com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Babel: Shell source block outputting latex for export
Date: Tue, 1 May 2018 20:43:16 +0000	[thread overview]
Message-ID: <51921E0C-F62E-4F45-B323-0607EDB8D6CA@ucsd.edu> (raw)
In-Reply-To: <20180501162959.GF1695@volibear>



> On May 1, 2018, at 9:29 AM, Russell Adams <RLAdams@AdamsInfoServ.Com> 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

      reply	other threads:[~2018-05-01 20:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 16:29 Babel: Shell source block outputting latex for export Russell Adams
2018-05-01 20:43 ` Berry, Charles [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51921E0C-F62E-4F45-B323-0607EDB8D6CA@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=RLAdams@AdamsInfoServ.Com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).