emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting Latex fragment both rendered and verbatim
@ 2018-03-07 14:49 Jarmo Hurri
  2018-03-07 15:24 ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Jarmo Hurri @ 2018-03-07 14:49 UTC (permalink / raw)
  To: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-07 22:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 14:49 Exporting Latex fragment both rendered and verbatim Jarmo Hurri
2018-03-07 15:24 ` 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

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).