From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: adding options to the minted environment of exported source blocks in latex Date: Fri, 07 Feb 2014 21:45:15 +0100 Message-ID: <87lhxmzm78.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBsIH-0005z8-9D for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 15:45:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBsIA-0002ZW-Pr for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 15:45:01 -0500 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:46439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBsIA-0002ZO-Ix for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 15:44:54 -0500 Received: by mail-wg0-f44.google.com with SMTP id l18so2586383wgh.11 for ; Fri, 07 Feb 2014 12:44:53 -0800 (PST) In-Reply-To: (Alan Schmitt's message of "Fri, 07 Feb 2014 16:19:13 +0100") 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: Alan Schmitt Cc: emacs-orgmode Hello, Alan Schmitt writes: > I use and abuse the `org-latex-minted-options' when exporting source > blocks in latex, but I'm stumped by a usage pattern. I need to change > the list of options for one given source block (adding a "belowskip" > option to it). I tried the following, but it did not do anything: > > #+attr_latex: :belowskip 1cm > #+BEGIN_SRC ocaml > #load "graphics.cma";; > Graphics.open_graph "";; > #+END_SRC > > I guess that I can only put some specific options for "attr_latex". Is > there a way to put arbitrary options in the exported minted > environment? At the moment, there is no Org way to add arbitrary options to listings or minted on a per block basis. There are basically two ways to implement this. Either we add an :options keyword and stuff options there: #+attr_latex: :options a=b,c=d #+begin_src ... Another option is to turn options into keywords: #+attr_latex: :a b :c d #+begin_src ... The latter is more elegant, but it requires to know about every minted/listings options. It is also possible to do something in-between, i.e., tell Org about a few selected keywords and stuff the others into :options. This is what is done for images. Org knows about :height and :width and uses :options for everything else. Regards, -- Nicolas Goaziou