emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Treat custom environment as verbatim on export


From: Charles C. Berry
Subject: Re: [O] Treat custom environment as verbatim on export
Date: Sun, 24 May 2015 12:43:51 -0700
User-agent: Alpine 2.11 (OSX 23 2013-08-11)

On Sun, 24 May 2015, Nicolas Goaziou wrote:

Rasmus <address@hidden> writes:

It's a special block, so e.g. org-latex-special-block.  But contents is
already transcoded by the time in arrives to e.g. org-latex-special-block.
To the extend this should be fixed, one way would be to allow a raw option
to special blocks (also needed for e.g. #+{begin,end}_equation) and have
babel insert it as needed.  I don't know how easy this is.

I don't think a ":raw" option for special blocks is worth implementing.

There are two types or "raw" contents: "protected raw" (i.e., verbatim
contents) and "export-specific raw" (i.e., target language code). For
the former, we already have example blocks (or fixed-width areas) and
for the latter, export blocks.

A third category exists, "multi-language raw", in which, I think, only
the most trivial cases (those you never really need in practice) would
fit.

The OP wants special "protected raw" for LaTeX back-end. We could
provide a special attribute for this, e.g.,

 #+ATTR_LATEX: :environment "my-verbatim"
 #+BEGIN_EXAMPLE
 ... stuff...
 #+END_EXAMPLE

But this is really only a shortcut for

 #+BEGIN_my-verbatim
 #+BEGIN_LATEX
 stuff
 #+END_LATEX
 #+END_my-verbatim

WDYT?

Currently, :wrap allows this:

#+begin_src emacs-lisp :wrap "src latex :wrap my-verbatim"  :exports results
"stuff\nmore stuff"
#+end_src

which exports as

,----
| \begin{my-verbatim}
| stuff
| more stuff
| \end{my-verbatim}
`----

which is what was wanted (courtesy of ob-latex.el).

Is that enough?

HTH,

Chuck



reply via email to

[Prev in Thread] Current Thread [Next in Thread]