From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Exporting Latex fragment both rendered and verbatim Date: Wed, 07 Mar 2018 16:49:13 +0200 Message-ID: <87vae8j5zq.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etaO1-00012Q-51 for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 09:49:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etaNw-0008Rx-6F for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 09:49:45 -0500 Received: from [195.159.176.226] (port=53383 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etaNv-0008Qy-V9 for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 09:49:40 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1etaLo-0003n4-QD for emacs-orgmode@gnu.org; Wed, 07 Mar 2018 15:47:28 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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