From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: minted question Date: Mon, 21 Jul 2014 10:48:14 -1000 Message-ID: References: <20140721213020.73f1c01d@arcor.com> <20140721221453.123bb534@hogwart.bsdlocal.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9KVd-0007Nv-0f for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 16:48:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9KVV-00061E-E6 for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 16:48:32 -0400 Received: from gproxy2-pub.mail.unifiedlayer.com ([69.89.18.3]:41136) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1X9KVV-00060u-5x for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 16:48:25 -0400 In-Reply-To: <20140721221453.123bb534@hogwart.bsdlocal.net> (Manfred Lotz's message of "Mon, 21 Jul 2014 22:14:53 +0200") 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: Manfred Lotz Cc: emacs-orgmode@gnu.org Hi Manfred, Manfred Lotz writes: > Hi Tom, > > On Mon, 21 Jul 2014 09:53:41 -1000 > tsd@tsdye.com (Thomas S. Dye) wrote: > >> Aloha Manfred, >> >> You should be able to use attr_latex (untested). >> >> Manfred Lotz writes: >> >> #+ATTR_LATEX: :options linenos=true frame=single >> > #+BEGIN_SRC perl >> > #! /usr/bin/perl >> > >> > use strict; >> > use warnings; >> > use 5.010; >> > >> > say 'hey'; >> > #+END_SRC >> > > Unfortunately, that doesn't work. Yes, when I tried a slightly modified version here I got incorrect LaTeX output: \begin{minted}[,linenos=true, frame=single]{perl} #! /usr/bin/perl use strict; use warnings; use 5.010; say 'hey'; \end{minted} Note the extraneous comma in the optional argument before "linenos". I get what looks to be correct LaTeX export if I set options in the variable org-latex-minted-options, as shown in the emacs-lisp code block below. #+ATTR_LATEX: :options linenos=true, frame=single #+BEGIN_SRC perl #! /usr/bin/perl use strict; use warnings; use 5.010; say 'hey'; #+END_SRC #+begin_src emacs-lisp (require 'ox-latex) (add-to-list 'org-latex-packages-alist '("" "minted")) (setq org-latex-listings 'minted) (setq org-latex-minted-options '(("linenos" "true") ("frame" "single"))) #+end_SEC Are you getting an extraneous comma with the #+attr_latex line? All the best, Tom -- Thomas S. Dye http://www.tsdye.com