emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jacob Gerlach <jacobgerlach@gmail.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Treat custom environment as verbatim on export
Date: Fri, 22 May 2015 23:09:08 -0400	[thread overview]
Message-ID: <CAA6UvuHzdeu=8OFtr0gLYs=1_Ze1Z4Syv6CfkC+8xqJ+QjK+Cw@mail.gmail.com> (raw)

Hello,

I want to use a one of several custom environments for some babel
results using, for example, ":wrap myverbatim" as a header argument.
(Since I have several possible environments, I think I need to use
:wrap rather than, say, replacing "verbatim" using an export filter).

However, since this block isn't recognized as an actual verbatim
environment, markup gets processed in undesirable ways.

For example:

-------------
#+BEGIN_SRC sh :exports results :wrap myverbatim
echo "Hello_world"
#+END_SRC

#+RESULTS:
#+BEGIN_myverbatim
Hello_world
#+END_myverbatim
-------------
exports to
-------------
\begin{myverbatim}
Hello\(_{\text{world}}\)
\end{myverbatim}
-------------
instead of
-------------
\begin{myverbatim}
Hello_world
\end{myverbatim}
-------------

A couple questions:

- Is there any way I've missed to specify verbatim export as an option
for an arbitrary block/environment?

- If not, I think that I need a derived exporter to achieve this, but
the `contents' of a special-block have already had markup transcoded
by the time the derived backend function sees them. What functions
would my derived backend need to replace to allow applying verbatim
formatting to block types of my choosing?

Thanks for any tips,
Jake

             reply	other threads:[~2015-05-23  3:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23  3:09 Jacob Gerlach [this message]
2015-05-23  9:48 ` Treat custom environment as verbatim on export Rasmus
2015-05-24 15:29   ` Nicolas Goaziou
2015-05-24 17:29     ` Rasmus
2015-05-24 19:43     ` Charles C. Berry
2015-05-25 12:17       ` Jacob Gerlach
2015-05-23 16:32 ` Charles C. Berry

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='CAA6UvuHzdeu=8OFtr0gLYs=1_Ze1Z4Syv6CfkC+8xqJ+QjK+Cw@mail.gmail.com' \
    --to=jacobgerlach@gmail.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).