Hello,

Alan Schmitt <alan.schm...@polytechnique.org> 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