On 2016-01-16 15:11, Nicolas Goaziou writes: > Hello, > > Alan Schmitt writes: > >> Thanks a lot for these comments. Here is an updated patch. > > Applied. Thank you. > > I almost forgot: would you mind preparing an entry about it for > ORG-NEWS? Is this too detailed? Alan --8<---------------cut here---------------start------------->8--- *** Attributes support in custom language environments for LaTeX export Custom language environments for LaTeX export (~org-latex-custom-lang-environment~) can now define the string to be inserted during export, using attributes to fill in the formatted source code, the caption, etc… The list of attributes is: - %s for the formatted source - %c for the caption - %f for the float attribute - %l for an appropriate label - %o for the LaTeX attributes For example, this setting #+begin_src emacs-lisp (setq org-latex-custom-lang-environments '((ocaml "\\begin{listing} \\begin{minted}[%o]{ocaml} %s\\end{minted} \\caption{%c} \\label{%l}"))) #+end_src export an OCaml source block as follows. #+begin_src latex \begin{listing} \begin{minted}[]{ocaml} \end{minted} \caption{} \label{