From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: inline code and minted Date: Fri, 05 Feb 2016 16:01:20 +0100 Message-ID: References: <87egcrqo22.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]:46816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRht1-0005zO-5c for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 10:01:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRhsw-0003rq-VM for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 10:01:27 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:49350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRhsw-0003rd-Ni for emacs-orgmode@gnu.org; Fri, 05 Feb 2016 10:01:22 -0500 In-Reply-To: <87egcrqo22.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Fri, 05 Feb 2016 14:33:41 +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: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On 2016-02-05 14:33, Nicolas Goaziou writes: >> I have two questions: >> - should we support this and generate this code? > > Sure. Could you provide and apply a patch for that? Yes. Here it is for review, please let me know if I can apply it. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ox-latex.el-Fix-minted-inline.patch Content-Transfer-Encoding: quoted-printable From=20aa8c0fa91af7a9307491bad78d7f82ce1705a7bd Mon Sep 17 00:00:00 2001 From: Alan Schmitt Date: Fri, 5 Feb 2016 15:55:54 +0100 Subject: [PATCH] ox-latex.el: Fix minted inline * lisp/ox-latex.el (org-latex-inline-src-block): Output minted code that correctly formats code inline. =2D-- lisp/ox-latex.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index ec06b17..5879e40 100644 =2D-- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2012,10 +2012,10 @@ contextual information." (downcase org-lang))) (options (org-latex--make-option-string (plist-get info :latex-minted-options)))) =2D (concat (format "\\mint%s{%s}" + (format "\\mintinline%s{%s}{%s}" (if (string=3D options "") "" (format "[%s]" options)) =2D mint-lang) =2D separator code separator))) + mint-lang + code))) ;; Use listings package. (otherwise ;; Maybe translate language's name. =2D-=20 2.7.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> - in the meantime, I created a macro that does this for latex, but it >> does not work for html (it exports the =E2=80=9Csrc_coq=E2=80=9D string = verbatim): >> #+macro: coq @@latex:\mintinline{coq}{$1}@@@@html:src_coq[:exports code]= {$1}@@ >> Why is this macro wrong? > > Contents of an export snippet, e.g. @@html:...@@ are not evaluated by > the back-end. IOW this is back-end code. I see. I think I=E2=80=99ll just use then and skip the syntax colori= ng for the moment. Thanks, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 (Updated February 4, 2016, Mauna Loa Obs.): 403.08= ppm --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWtLlAAAoJEAQNCjtO0uXHDmQIALI7EBhYYTZvumoeGc/qmsYN pvtjM8g0SWqZmv6mFXSJK0K2KJwvuSNO+KrTN6fIbg22b2nD0f8YYAUrQ/wHO1zU 6eiggCii2MdKpkC3T4ltEs0awG2yvwLcmB/oNzT7ecxqzhRHv3CxhnSBGLiSMoSD oSCZYTAtkZXBLgKrxAAuEYvKWZ/OpdduLtHykXwjjoM3MP1mPoLYJeW8MppG8OGx d9Cz/iZ+Qwfb73WcrKwO++ApTenwI1oFezyZWFrUB+lCC2VKtix9ApMzW6/3x0bN LVl+yT9qehUHk3seJbqULF5sfoV++z+neSL4CLOV1XDG4x9m1DfL8sbqRq8Egq8= =OOdq -----END PGP SIGNATURE----- --==-=-=--