From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manfred Lotz Subject: Re: minted question Date: Fri, 25 Jul 2014 08:33:50 +0200 Message-ID: <20140725083350.64315411@hogwart.bsdlocal.net> References: <20140721213020.73f1c01d@arcor.com> <20140721221453.123bb534@hogwart.bsdlocal.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAZ4p-0007n0-QD for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 02:34:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAZ4j-0008Ml-3w for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 02:33:59 -0400 Received: from mail-in-06.arcor-online.net ([151.189.21.46]:50887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAZ4i-0008MJ-Sv for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 02:33:53 -0400 Received: from mail-in-15-z2.arcor-online.net (mail-in-15-z2.arcor-online.net [151.189.8.32]) by mx.arcor.de (Postfix) with ESMTP id E6BF510CEAF for ; Fri, 25 Jul 2014 08:33:50 +0200 (CEST) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-15-z2.arcor-online.net (Postfix) with ESMTP id E6C9733EBA8 for ; Fri, 25 Jul 2014 08:33:50 +0200 (CEST) Received: from mail-in-14.arcor-online.net (localhost [127.0.0.1]) by mail-in-14.arcor-online.net (Postfix) with ESMTP id 9F3009BE1F for ; Fri, 25 Jul 2014 08:33:50 +0200 (CEST) Received: from hogwart (p4FFF2E75.dip0.t-ipconnect.de [79.255.46.117]) (Authenticated sender: manfred.lotz@arcor.de) by mail-in-14.arcor-online.net (Postfix) with ESMTPSA for ; Fri, 25 Jul 2014 08:33:50 +0200 (CEST) Received: from hogwart.bsdlocal.net (localhost.localdomain [127.0.0.1]) by hogwart (Postfix) with ESMTP id 44BDC44994 for ; Fri, 25 Jul 2014 08:33:50 +0200 (CEST) In-Reply-To: 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@gnu.org Hi Tom, On Mon, 21 Jul 2014 10:48:14 -1000 tsd@tsdye.com (Thomas S. Dye) wrote: > 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 > In the end I did put the code into the .emacs file which isn't too bad as I usually like to have those minted settings globally. -- Best, Manfred