emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] adding options to the minted environment of exported source bloc


From: Nicolas Goaziou
Subject: Re: [O] adding options to the minted environment of exported source blocks in latex
Date: Fri, 07 Feb 2014 21:45:15 +0100

Hello,

Alan Schmitt <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]