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.
>From 45f1484c390276fd714ae91ca5dcc489e9b3ef16 Mon Sep 17 00:00:00 2001
From: lgostiau <louis.gosti...@free.fr>
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