On 2016-01-16 15:11, Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> Hello, > > Alan Schmitt <alan.schm...@polytechnique.org> 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}[<attr_latex options>]{ocaml} <src block body> \end{minted} \caption{<caption>} \label{<label>} \end{listing} #+end_src --8<---------------cut here---------------end--------------->8--- -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ (Updated January 16, 2016, Mauna Loa Obs.): 403.77 ppm
signature.asc
Description: PGP signature