From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: SOLVED: source code block language 'makefile' and listings package Date: Tue, 08 Jul 2014 11:51:18 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4S3g-0005mr-F0 for emacs-orgmode@gnu.org; Tue, 08 Jul 2014 05:51:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4S3b-0006Lv-BY for emacs-orgmode@gnu.org; Tue, 08 Jul 2014 05:51:32 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:33316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4S3b-0006Ll-58 for emacs-orgmode@gnu.org; Tue, 08 Jul 2014 05:51:27 -0400 Received: by mail-we0-f173.google.com with SMTP id t60so5677312wes.4 for ; Tue, 08 Jul 2014 02:51:26 -0700 (PDT) In-Reply-To: (Thomas S. Dye's message of "Fri, 04 Jul 2014 06:31:02 -1000") 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable tsd@tsdye.com (Thomas S. Dye) writes: > Aloha Rainer, > > Rainer M Krug writes: > >> Hi >> >> I used the source block language 'makefile' >> >> #+begin_src R makefile >> ... >> #+end_src >> >> and now I would like top export this block to html. I am using the >> listings package for this, and it supports the syntax, but the >> language is called 'make', while org uses 'makefile' >> >> Is there a way of telling the tex exporter to export 'makefile' blocks >> as language 'make', or can I easily tell listings that the language >> 'makefile' is equal to 'make'? > > You can configure the listings package with the commands > \lstnewenvironment and \lstset. There is a worked example here: > > http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-4 Much simpler then that: I simply changed the variable org-latex-listings-langs to include makefile: ,---- | (setq org-latex-listings-langs=20 | '((emacs-lisp "Lisp")=20 | (lisp "Lisp")=20 | (clojure "Lisp")=20 | (c "C")=20 | (cc "C++")=20 | (fortran "fortran")=20 | (perl "Perl")=20 | (cperl "Perl") | (python "Python") | (ruby "Ruby") | (html "HTML") | (xml "XML") | (tex "TeX") | (latex "[LaTeX]TeX") | (shell-script "bash") | (gnuplot "Gnuplot") | (ocaml "Caml") | (caml "Caml") | (sql "SQL") | (sqlite "sql") | (makefile "make"))) `---- Works perfectly. Now if I just could figure out on how I can simply *add* the makefile to the list without defining it completely new.. Cheers, Rainer > > hth, > Tom =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTu78bAAoJENvXNx4PUvmC5FoH/0RyOijZ8bn4MHBkWB25/elv cnfXI9vAPV8Pefb/zV05UQYMS0PMSObKGaqJWC++2Om3+ynO+v7vgVd45CTjvk85 oSe3Udnu/1tZvjP1NkO/5glOtqREERXjIYMXqL6WeJMDg+9TtYt5ZQ9ZAdxLk26y NbbwXbBczB79ydnEivg/wLsgxt+7efaxCKgXvQJIlEAFihKcBnZ4R0Dj5AHZ0ZhB f00NiKG0LJOhR8Iouk+1xkbBoqH3HoITg1XFNF/rk9SdYTHiK1Zg9kNrcrlju+ba aDMWq1vy01Y99pmWpqxH/5NNiDB0WvK6lDV56HuD5SIaCXH1h9TVHBatnsvsOWk= =U6lr -----END PGP SIGNATURE----- --=-=-=--