From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: [PATCH] make options available for custom source environment in ox-latex Date: Mon, 18 Jan 2016 09:59:09 +0100 Message-ID: References: <87h9igphe9.fsf@nicolasgoaziou.fr> <871t9hsjfp.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL5eb-0006EQ-5E for emacs-orgmode@gnu.org; Mon, 18 Jan 2016 03:59:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aL5eV-0006Rk-UO for emacs-orgmode@gnu.org; Mon, 18 Jan 2016 03:59:13 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:43906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL5eV-0006RX-OH for emacs-orgmode@gnu.org; Mon, 18 Jan 2016 03:59:07 -0500 In-Reply-To: <871t9hsjfp.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 16 Jan 2016 15:11:38 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 =2D-8<---------------cut here---------------start------------->8--- *** Attributes support in custom language environments for LaTeX export=20 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=E2=80=A6 The list of attributes is: =2D %s for the formatted source =2D %c for the caption =2D %f for the float attribute =2D %l for an appropriate label=20 =2D %o for the LaTeX attributes =20=20 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{