From mboxrd@z Thu Jan 1 00:00:00 1970 From: Louis Gostiaux Subject: MarginFigure environment in LaTeX export Date: Fri, 6 Mar 2020 11:00:07 +0100 Message-ID: <35aac187-b751-5723-0f15-be6605fb8ea2@free.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------9B545FE03D133D97C89DB8F2" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55381) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jA9m9-0000U5-1l for emacs-orgmode@gnu.org; Fri, 06 Mar 2020 05:00:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jA9m7-0001Lz-Ri for emacs-orgmode@gnu.org; Fri, 06 Mar 2020 05:00:12 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:38237) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jA9m7-0001GD-IW for emacs-orgmode@gnu.org; Fri, 06 Mar 2020 05:00:11 -0500 Received: from [192.168.1.73] (unknown [109.190.20.186]) (Authenticated sender: louis.gostiaux) by smtp1-g21.free.fr (Postfix) with ESMTPSA id 4402BB004EC for ; Fri, 6 Mar 2020 11:00:08 +0100 (CET) Content-Language: en-US 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------9B545FE03D133D97C89DB8F2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Here is a patch to allow the margin value for float option in figure environment. The marginfigure environment is proposed by the LateX sidenotes package and is commonly used in book editions. I needed it to edit with EmacsOrgmode a book with the Tufte-book class. I could use this new export properly and I now want to propose it to the OrgMode users. Please tell me if the submission procedure is correct, Louis Gostiaux. --------------9B545FE03D133D97C89DB8F2 Content-Type: text/x-patch; charset=UTF-8; name="0001-Included-margin-float-value-for-figure-environment-t.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Included-margin-float-value-for-figure-environment-t.pa"; filename*1="tch" >From 45f1484c390276fd714ae91ca5dcc489e9b3ef16 Mon Sep 17 00:00:00 2001 From: lgostiau Date: Fri, 6 Mar 2020 10:50:53 +0100 Subject: [PATCH] Included margin float value for figure environment, to be used with LaTeX sidenotes package --- lisp/ox-latex.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index c0af8157d..4d391c2fa 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2374,6 +2374,7 @@ used as a communication channel." (cond ((string= float "wrap") 'wrap) ((string= float "sideways") 'sideways) ((string= float "multicolumn") 'multicolumn) + ((string= float "margin") 'margin) ((and (plist-member attr :float) (not float)) 'nonfloat) ((or float (org-element-property :caption parent) @@ -2491,6 +2492,14 @@ used as a communication channel." (if center "\\centering" "") comment-include image-code (if caption-above-p "" caption))) + (`margin (format "\\begin{marginfigure} +%s%s +%s%s +%s\\end{marginfigure}" + (if caption-above-p caption "") + (if center "\\centering" "") + comment-include image-code + (if caption-above-p "" caption))) (`figure (format "\\begin{figure}%s %s%s %s%s -- 2.17.1 --------------9B545FE03D133D97C89DB8F2--