From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: how can I create a new literal block for latex export? Date: Tue, 23 Jun 2015 10:47:22 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Jrp-0003aw-EM for emacs-orgmode@gnu.org; Tue, 23 Jun 2015 04:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7Jrl-0000UT-C2 for emacs-orgmode@gnu.org; Tue, 23 Jun 2015 04:47:41 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:19982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Jrl-0000UF-5b for emacs-orgmode@gnu.org; Tue, 23 Jun 2015 04:47:37 -0400 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I would like to create a block used to typeset the results of evaluation of code when exporting to latex. This is what I currently tried: #+latex_header: \usepackage{fancyvrb} #+latex_header: \DefineVerbatimEnvironment{myres}{Verbatim}{fontsize=3D\scr= iptsize,frame=3D\topline} then I have this property set :PROPERTIES: :header-args:js: :wrap "myres" :results output :exports both :END: Now every js source block is correctly evaluated to the correct environment: #+name: with_example #+begin_src js var x =3D 1 var f =3D function(o){ with(o){ return x } } var o2 =3D { x : 2 } var o3 =3D { x : 3 } console.log("f({}) =3D " + f({}) + ", f(o2) =3D " + f(o2) + ", f(o3) =3D " + f(o3)) #+end_src #+results: with_example #+BEGIN_myres f({}) =3D 1, f(o2) =3D 2, f(o3) =3D 3 #+END_myres Unfortunately something happens during the export to latex: the contents of myres are parsed. Here is the generated latex code: \begin{minted}[frame=3Dleftline,fontsize=3D\scriptsize]{js} var x =3D 1 var f =3D function(o){ with(o){ return x } } var o2 =3D { x : 2 } var o3 =3D { x : 3 } console.log("f({}) =3D " + f({}) + ", f(o2) =3D " + f(o2) + ", f(o3) =3D " + f(o3)) \end{minted} \begin{myres} f(\{\}) =3D 1, f(o2) =3D 2, f(o3) =3D 3 \end{myres} Is there a way to tell org to leave the contents of myres blocks as-is? Can I declare myres as a literal block? Thanks, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJViR0aAAoJEAQNCjtO0uXHGKgIAKlaLLm2HIIogXLYQ17YLsON G13x74HFM126rKqA74uYCMBDtH6Ab3PzTdbFDihDHAVUeaOa3nUEOUeGSxFp6a6z JNvg75qHa/GlRXj1AeTA24CPlz0yTU9YO7OTA7fwtH7BSScVV+9A01B299w6AZ6a FeF7LWJLEU3XjjR54yUtWNfblEMzf7YembjzK2d9f6tjjGSgveQlI6in1Q3qUDkm uOlNXdiTERqc1xF5MLbZl766v9nGLdklt8JHHcpZibxYkNPbF/7aBkin+OTbtB3U LfyFBKpctdmzfncTeU8d0eg1pjnbqheHWylbrRzcrIYp3GrPm4jpBkMbz7aq/JU= =QGlu -----END PGP SIGNATURE----- --=-=-=--