all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: Exporting Latex fragment both rendered and verbatim
Date: Wed, 07 Mar 2018 16:49:13 +0200	[thread overview]
Message-ID: <87vae8j5zq.fsf@iki.fi> (raw)


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	other threads:[~2018-03-07 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 14:49 Jarmo Hurri [this message]
2018-03-07 15:24 ` Exporting Latex fragment both rendered and verbatim Eric S Fraga
2018-03-07 16:53   ` Jarmo Hurri
2018-03-07 17:40     ` Eric S Fraga
2018-03-07 18:21       ` Jarmo Hurri
2018-03-07 22:17         ` Eric S Fraga
2018-03-07 18:32       ` Jarmo Hurri

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

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

  git send-email \
    --in-reply-to=87vae8j5zq.fsf@iki.fi \
    --to=jarmo.hurri@iki.fi \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.