From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Vollmar Subject: Re: Syntax highlighting of code blocks in beamer slides Date: Wed, 14 Mar 2012 13:12:16 +0100 Message-ID: References: <03D26DE9-9D6C-484E-B6F4-60D1FD7CEE35@nf.mpg.de> <13145.1331647134@alphaville> Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Apple-Mail-79--914864664; protocol="application/pkcs7-signature"; micalg=sha1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7n45-0004Az-Cu for emacs-orgmode@gnu.org; Wed, 14 Mar 2012 08:12:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7n40-0004SO-2S for emacs-orgmode@gnu.org; Wed, 14 Mar 2012 08:12:24 -0400 Received: from mail.nf.mpg.de ([134.107.209.50]:43144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7n3z-0004S9-PJ for emacs-orgmode@gnu.org; Wed, 14 Mar 2012 08:12:19 -0400 Received: from mac25.fritz.box ([192.168.178.21]) by mail.nf.mpg.de (Sun Java(tm) System Messaging Server 6.3-8.03 (built Apr 24 2009; 32bit)) with ESMTPSA id <0M0V0050MJRBM000@mail.nf.mpg.de> for emacs-orgmode@gnu.org; Wed, 14 Mar 2012 13:23:36 +0100 (MET) In-reply-to: <13145.1331647134@alphaville> 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: Nick Dokos , Alan Schmitt Cc: Org Mode Mailing List --Apple-Mail-79--914864664 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Dear Alan, dear Nick, many thanks for your help. Installing minted and pygments and then = putting the emacs-lisp snippet from http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-3 into my .emacs file did work. Now my code snippets are = syntax-highlighted! Do you have any suggestions on which pygments color = styles work well in presentations? Many thanks in advance, Stefan=20 On 13.03.2012, at 14:58, Nick Dokos wrote: > Alan Schmitt wrote: >=20 >> On 13 mars 2012, at 14:41, Stefan Vollmar wrote: >>=20 >>> Hello, we want to create slides via beamer. This works fine except >>> for source code listings (#begin_src python...#end_src) - if >>> exported as HTML they have syntax-highlighting as expected, however, >>> when exported as LaTeX the syntax-highlighting is lost. Is there a >>> way to create beamer slides with source code snippets that have >>> syntax-highlighting? >>=20 >> I'm following this tutorial for this: >> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-3 >>=20 >=20 > Yup, I followed the tutorial and set up minted some time ago and I = have > not looked back: I just tried the following >=20 > --8<---------------cut here---------------start------------->8--- > #+LaTeX_CLASS: beamer > #+LaTeX_CLASS_OPTIONS: [presentation] > #+BEAMER_FRAME_LEVEL: 1 > #+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default} > #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) = %4BEAMER_col(Col) %8BEAMER_extra(Extra) > #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 = :ETC >=20 >=20 > * foo >=20 > #+BEGIN_SRC python :exports code > for x in range(100): > print "x=3D%d , x^2=3D%d" % (x, x*x) > #+END_SRC > --8<---------------cut here---------------end--------------->8--- >=20 >=20 > and I get a caleidoscope of colors. >=20 > The TeX FAQ has some details about where to get minted and its = dependencies > (it requires an external Python script, called Pygments): >=20 > http://www.tex.ac.uk/cgi-bin/texfaq2html?label=3Dcodelist >=20 > Nick --=20 Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut f=FCr neurologische Forschung Gleuelerstr. 50, 50931 K=F6ln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de --Apple-Mail-79--914864664 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIOHTCCBCEw ggMJoAMCAQICAgDHMA0GCSqGSIb3DQEBBQUAMHExCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNEZXV0 c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZULVRlbGVTZWMgVHJ1c3QgQ2VudGVyMSMwIQYDVQQD ExpEZXV0c2NoZSBUZWxla29tIFJvb3QgQ0EgMjAeFw0wNjEyMTkxMDI5MDBaFw0xOTA2MzAyMzU5 MDBaMFoxCzAJBgNVBAYTAkRFMRMwEQYDVQQKEwpERk4tVmVyZWluMRAwDgYDVQQLEwdERk4tUEtJ MSQwIgYDVQQDExtERk4tVmVyZWluIFBDQSBHbG9iYWwgLSBHMDEwggEiMA0GCSqGSIb3DQEBAQUA A4IBDwAwggEKAoIBAQDpm8NnhfkNrvWNVMOWUDU9YuluTO2U1wBblSJ01CDrNI/W7MAxBAuZgeKm FNJSoCgjhIt0iQReW+DieMF4yxbLKDU5ey2QRdDtoAB6fL9KDhsAw4bpXCsxEXsM84IkQ4wcOItq aACa7txPeKvSxhObdq3u3ibo7wGvdA/BCaL2a869080UME/15eOkyGKbghoDJzANAmVgTe3RCSMq ljVYJ9N2xnG2kB3E7f81hn1vM7PbD8URwoqDoZRdQWvY0hD1TP3KUazZve+Sg7va64sWVlZDz+HV Ez2mHycwzUlU28kTNJpxdcVs6qcLmPkhnSevPqM5OUhqjK3JmfvDEvK9AgMBAAGjgdkwgdYwcAYD VR0fBGkwZzBloGOgYYZfaHR0cDovL3BraS50ZWxlc2VjLmRlL2NnaS1iaW4vc2VydmljZS9hZl9E b3dubG9hZEFSTC5jcmw/LWNybF9mb3JtYXQ9WF81MDkmLWlz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