[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] make options available for custom source environment in
From: |
Alan Schmitt |
Subject: |
Re: [O] [PATCH] make options available for custom source environment in ox-latex |
Date: |
Mon, 18 Jan 2016 09:59:09 +0100 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) |
On 2016-01-16 15:11, Nicolas Goaziou <address@hidden> writes:
> Hello,
>
> Alan Schmitt <address@hidden> 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
- [O] [PATCH] make options available for custom source environment in ox-latex, Alan Schmitt, 2016/01/14
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Nicolas Goaziou, 2016/01/14
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Alan Schmitt, 2016/01/14
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Nicolas Goaziou, 2016/01/16
- Re: [O] [PATCH] make options available for custom source environment in ox-latex,
Alan Schmitt <=
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Rasmus, 2016/01/18
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Alan Schmitt, 2016/01/18
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Rasmus, 2016/01/18
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Alan Schmitt, 2016/01/18
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Rasmus, 2016/01/18
- Re: [O] [PATCH] make options available for custom source environment in ox-latex, Alan Schmitt, 2016/01/18