From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: [PATCH] make options available for custom source environment in ox-latex Date: Thu, 14 Jan 2016 11:31:07 +0100 Message-ID: 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]:58259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJfBR-0006I2-Gu for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 05:31:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJfBM-0001rS-GQ for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 05:31:13 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:36302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJfBM-0001rO-AE for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 05:31:08 -0500 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: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello, Here is a small addition to the custom source environments for ox-latex. Alan --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ox-latex-Add-option-support-to-custom-environment.patch Content-Transfer-Encoding: quoted-printable From=208abe512966ed9a2afea91fde41081e2e5e8e5eef Mon Sep 17 00:00:00 2001 From: Alan Schmitt Date: Wed, 13 Jan 2016 16:03:40 +0100 Subject: [PATCH] ox-latex: Add option support to custom environment * lisp/ox-latex.el (org-latex-src-block): make the options from attr_latex available to the custom environment using %o. =2D-- lisp/ox-latex.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index a57677b..be9c588 100644 =2D-- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2802,7 +2802,10 @@ contextual information." `((?s . ,formatted-src) (?c . ,caption) (?f . ,float) =2D (?l . ,(org-latex--label src-block info))))))) + (?l . ,(org-latex--label src-block info)) + (?o . + ,(let ((local-options (plist-get attributes :options))) + (if local-options local-options "")))))))) ;; Case 3. Use minted package. ((eq listings 'minted) (let* ((caption-str (org-latex--caption/label-string src-block info)) =2D-=20 2.7.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 (Updated January 13, 2016, Mauna Loa Obs.): 401.97= ppm --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWl3jrAAoJEAQNCjtO0uXHb94H/R8SWACYZQpMBuzLQsVnwAJx jwwxKp6GxBV0mOlxDm2yF0oQ+dywz0rgmWcmhHOn/RyKaxqnm/hWs57bjffudBk0 usXRiL1gEIKpXw5OXzhXl29dyV+EMdvg32vz+1ZjIQLYTHIZaT1/eNI2zrXKHM2q sHOTAgre2y5EfrpSqiqNMO2h8FsDofEr4POIulbiCJxpzswghpY8YHcUmPVnAKeR cyIX6doYpI/qfbx/0YS2Gu1BvZUO1kBjCT3CjiT6jnSUAAcW0KCWAO8XywDaOAJC h/u10EBXr+X8mzueE4NX95yeyD6B90TkxJVGzz2ds/P3glsomELqZ77qzDXLFv4= =h+fw -----END PGP SIGNATURE----- --==-=-=--