emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Exporting Latex fragment both rendered and verbatim


From: Jarmo Hurri
Subject: [O] Exporting Latex fragment both rendered and verbatim
Date: Wed, 07 Mar 2018 16:49:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Greetings all.

I have been using Org for years, but just bumped into a very simple
thing I don't know how to achieve.

Let's say I have a Latex fragment, and to illustrate the use of Latex, I
want to
1. write that fragment in an Org file
2. export the file so that the fragment is exported both verbatim and
   rendered (by pdflatex or similar).

It is easy to export the fragment rendered as follows:

  #+BEGIN_EXPORT latex
    Here is an interesting (and true) equation: 
    \begin{equation} 
    \int uv' = uv - \int u'v \label{int}. 
    \end{equation}
    And that happens to be equation \eqref{int} on page \pageref{int}.
  #+END_EXPORT

It is easy to export it verbatim as follows:

  #+name: fragment
  #+BEGIN_SRC latex
    Here is an interesting (and true) equation: 
    \begin{equation} 
    \int uv' = uv - \int u'v \label{int}. 
    \end{equation}
    And that happens to be equation \eqref{int} on page \pageref{int}.
  #+END_SRC

But what is the correct combination of environments (src, export) and
header arguments (noweb, exports, results, ...) which allows me to only
write the fragment once and produce both effects? I have tried quite a
few.

Jarmo




reply via email to

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