From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id LChyJbVjrWBoKAAAgWs5BA (envelope-from ) for ; Tue, 25 May 2021 22:53:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eHyfILVjrWDXKAAAB5/wlQ (envelope-from ) for ; Tue, 25 May 2021 20:53:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D716A1C2D8 for ; Tue, 25 May 2021 22:53:08 +0200 (CEST) Received: from localhost ([::1]:54544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lle31-0007si-Sk for larch@yhetil.org; Tue, 25 May 2021 16:53:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lle0a-0006wT-EC for emacs-orgmode@gnu.org; Tue, 25 May 2021 16:50:38 -0400 Received: from mout01.posteo.de ([185.67.36.65]:55539) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lle0O-00039p-Ji for emacs-orgmode@gnu.org; Tue, 25 May 2021 16:50:35 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 39527240027 for ; Tue, 25 May 2021 22:50:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1621975822; bh=VoV+VB9LmxGoA/OvDgYv0k1p57pRkf5inKmq/ho0aaA=; h=From:To:Cc:Subject:Date:From; b=floKfKK4rvd2PFsSWsS19QCo9QDEBS4C2yhFrRQsOXxzTJxYU6MMmfydqUvcefAhD uqHyIB9oFDGaOObL00oWUJZeKN2gUzZUC3N0SXEOmLXDUoe2MhoduEhV4Nrgucbnau VT+mjdaP076diLBLS+19gnhzdn2dF1SoVznPh+P1e4I+IJbJBjL5ZqDWO+cqLqMwrY gCL1g41RKG3odlUafZp3xsjOiJ3tKMqmc6TdBYE44XbrnxVbpBsgJVnbCLfoENk4hR LERclRrJiKlStJr5N9Hz64jbosLHEKCn2pMx4l42P5tzx92W033S2vFzw4SNmE3F2k AcoreBCOK7uoQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FqR6j3Xvxz9rxF; Tue, 25 May 2021 22:50:21 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Nicolas Goaziou Subject: Re: [PATCH] ox-latex.el: add LaTeX attributes to quote block References: <87h7is49cm.fsf@posteo.net> <875yz76uem.fsf@nicolasgoaziou.fr> <874kerf0hu.fsf@posteo.net> <87y2c2ajzw.fsf@nicolasgoaziou.fr> Date: Tue, 25 May 2021 20:50:19 +0000 In-Reply-To: <87y2c2ajzw.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 25 May 2021 17:52:35 +0200") Message-ID: <87v976ler8.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621975989; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=o8YgOFyZnvBBsmqTCISJgs9UE5347WGeLiIs8D68gwo=; b=YnfrdO66nymwv1ixtzf1vLpIT5IcV2gdUg8yucGOkRIeF054Y6HkNnEu3jex9xvZ9rA+xh IpMSfqPJAdfNdNPZIyiQ5s5/sD49SqJ2D179v2pD2u8bzS7UxSAzvunpBeq8EThwQJayT9 WqmdrP+AFX1v+L13C/45IzYMnqr8OQC/TM/gAIaK/oWWlC7j7ZOfmiN+H95WiJENg/D8xr fNK/qa1/McaBHQENJXfa04QRO3D0rRUaW2Qh8WeosXSDegfC62b0IOe/yi4hddOL7bTVy3 Atbz16GYDBwYn3j61CX/p+pMsEUykVUDhmiMnXJxgyLIrUUkLyMcivr5Fj6V+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621975989; a=rsa-sha256; cv=none; b=Vbf0mNm/oQZEoTlthycAperrZAvNIb8+cubS7zud/g9+e4LTj+noTVncf78OomzKL1FbsV WZzqQcHowz8SUJLDRNk+pCp7Laopq03qQN6nW58Z3KHstdZxmTd8ePBm7MdtPYaUPfQh19 xFKGCwSdWTkWDuPmeTnhpAuysad8Fx3M4nqkIB0atEpqUcGYL9HhEhCuAAPHlYugwZ9YQF daPsek2C12W1cHtk01TkURVw8WbLmRUa4lwe43KP+wUXKpSUR8/fWv/I1zhti/9xsn2c06 9MQRxuSd9X4x1bLh26ht0yQJGEaSlYPp/eB1dKh+EA9bSmYE23MCzgH62xeOpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=floKfKK4; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=floKfKK4; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: D716A1C2D8 X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: kg56rm96CM0f --=-=-= Content-Type: text/plain Hi Nicolas, Nicolas Goaziou writes: > You can do it in the same patch. Here is the updated patch, with the corresponding additions in the manual and ORG-NEWS. Best regards, Juan Manuel --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-ox-latex.el-add-LaTeX-attributes-to-quote-block.patch Content-Transfer-Encoding: quoted-printable >From 987566d52cd36c990d3db3f83d2c6433254ac2e3 Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Tue, 25 May 2021 22:18:06 +0200 Subject: [PATCH] ox-latex.el: add LaTeX attributes to quote block * doc/org-manual.org (Quote blocks in LaTeX export): manual updated * etc/ORG-NEWS (Support quote blocks in LaTeX export): news updated * lisp/ox-latex.el (latex): add `org-latex-default-quote-environment' to `:= options-alist' (org-latex-default-quote-environment): the default quote environment is `quote' (org-latex-quote-block): add two attributes: `environment' and `options' --- doc/org-manual.org | 42 ++++++++++++++++++++++++++++++++++++++++++ etc/ORG-NEWS | 7 +++++++ lisp/ox-latex.el | 22 ++++++++++++++++++++-- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 118d97e0e..dd51df27e 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -13919,6 +13919,48 @@ To eat the world=E2=80=99s due, by the grave and t= hee. ,#+END_VERSE #+end_src =20 +*** Quote blocks in LaTeX export +:PROPERTIES: +:DESCRIPTION: Attributes specific to quote blocks. +:END: + +#+cindex: quote blocks, in @LaTeX{} export +#+cindex: @samp{ATTR_LATEX}, keyword +#+cindex: org-latex-default-quote-environment + +The LaTeX export back-end accepts two attributes for quote blocks: +=3D:environment=3D, for an arbitrary quoting environment (the default +value is that of =3Dorg-latex-default-quote-environment=3D: =3D"quote"=3D)= and +=3D:options=3D. For example, to choose the environment =3Dquotation=3D, +included as an alternative to =3Dquote=3D in standard LaTeX classes: + +#+begin_example +,#+ATTR_LATEX: :environment quotation +,#+BEGIN_QUOTE +some text... +,#+END_QUOTE +#+end_example + +To choose the =3Dforeigndisplayquote=3D environment, included in the LaTeX +package =3Dcsquotes=3D, with the =3Dgerman=3D option, use this syntax: + +#+begin_example +,#+LATEX_HEADER:\usepackage[autostyle=3Dtrue]{csquotes} +,#+ATTR_LATEX: :environment foreigndisplayquote :options {german} +,#+BEGIN_QUOTE +some text in German... +,#+END_QUOTE +#+end_example + +#+texinfo: @noindent +which is exported to LaTeX as + +#+begin_example +\begin{foreigndisplayquote}{german} +some text in German... +\end{foreigndisplayquote} +#+end_example + ** Markdown Export :PROPERTIES: :DESCRIPTION: Exporting to Markdown. diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 8707222e0..c8a93c933 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -244,6 +244,13 @@ require the external LaTeX package =3Dverse.sty=3D, wi= ch is an extension of the standard LaTeX environment. The purpose of these attributes is explained below. =20 +*** Support quote blocks in LaTeX export + +The LaTeX export back-end accepts two attributes for quote blocks: +=3D:environment=3D, for an arbitrary quoting environment (the default +value is that of =3Dorg-latex-default-quote-environment=3D: =3D"quote"=3D)= and +=3D:options=3D. + *** =3Dorg-set-tags-command=3D selects tags from ~org-global-tags-completi= on-table~ =20 Let ~org-set-tags-command~ TAB fast tag completion interface complete diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index b9ecf070a..9e2e7be47 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -121,6 +121,7 @@ (:latex-classes nil nil org-latex-classes) (:latex-default-figure-position nil nil org-latex-default-figure-posit= ion) (:latex-default-table-environment nil nil org-latex-default-table-envi= ronment) + (:latex-default-quote-environment nil nil org-latex-default-quote-envi= ronment) (:latex-default-table-mode nil nil org-latex-default-table-mode) (:latex-diary-timestamp-format nil nil org-latex-diary-timestamp-forma= t) (:latex-footnote-defined-format nil nil org-latex-footnote-defined-for= mat) @@ -772,6 +773,13 @@ default we use here encompasses both." :package-version '(Org . "8.0") :type 'string) =20 +(defcustom org-latex-default-quote-environment "quote" + "Default environment used to `quote' blocks." + :group 'org-export-latex + :package-version '(Org . "9.5") + :type 'string + :safe t) + (defcustom org-latex-default-table-mode 'table "Default mode for tables. =20 @@ -2895,10 +2903,19 @@ channel." "Transcode a QUOTE-BLOCK element from Org to LaTeX. CONTENTS holds the contents of the block. INFO is a plist holding contextual information." + (let ((environment + (or (org-export-read-attribute :attr_latex quote-block :environment) + (plist-get info :latex-default-quote-environment))) + (options + (or (org-export-read-attribute :attr_latex quote-block :options) + ""))) (org-latex--wrap-label - quote-block (format "\\begin{quote}\n%s\\end{quote}" contents) info)) - + quote-block (format "\\begin{%s}%s\n%s\\end{%s}" + environment + options + contents + environment) + info))) =20 ;;;; Radio Target =20 -- 2.31.1 --=-=-=--