emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* MarginFigure environment in LaTeX export
@ 2020-03-06 10:00 Louis Gostiaux
  0 siblings, 0 replies; only message in thread
From: Louis Gostiaux @ 2020-03-06 10:00 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

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.


[-- Attachment #2: 0001-Included-margin-float-value-for-figure-environment-t.patch --]
[-- Type: text/x-patch, Size: 1277 bytes --]

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-06 10:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 10:00 MarginFigure environment in LaTeX export Louis Gostiaux

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).