From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: minted question Date: Tue, 22 Jul 2014 04:10:48 -0400 Message-ID: <87mwc16cfr.fsf@alphaville.bos.redhat.com> References: <20140721213020.73f1c01d@arcor.com> <20140721221453.123bb534@hogwart.bsdlocal.net> <20140722062324.7b5964a3@hogwart.bsdlocal.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9VAE-0002IN-2m for emacs-orgmode@gnu.org; Tue, 22 Jul 2014 04:11:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9VA8-0002oJ-2V for emacs-orgmode@gnu.org; Tue, 22 Jul 2014 04:11:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:47118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9VA7-0002oC-SA for emacs-orgmode@gnu.org; Tue, 22 Jul 2014 04:11:03 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X9VA4-00048k-7H for emacs-orgmode@gnu.org; Tue, 22 Jul 2014 10:11:00 +0200 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jul 2014 10:11:00 +0200 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jul 2014 10:11:00 +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: emacs-orgmode@gnu.org Manfred Lotz writes: > Hi Thomas, > > 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 >> >> Are you getting an extraneous comma with the #+attr_latex line? >> >> All the best, >> Tom >> > > I do not get any extraneous comma. When using the #+attr_latex line > there is just nothing in the latex output. > Same here. > I'm also confused about the emacs-lisp code snippet. I only get it > working if I either put it into my .emacs or evaluate it in the scratch > buffer. The way you wrote it the lisp code shows up in my document. > I messed around with :results but to no avail. Try putting it into its own :noexport: section (I also fixed the typo below): --8<---------------cut here---------------start------------->8--- * Setup :noexport: #+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_src --8<---------------cut here---------------end--------------->8--- Nick