From: Louis Gostiaux <louis.gostiaux@free.fr>
To: emacs-orgmode@gnu.org
Subject: MarginFigure environment in LaTeX export
Date: Fri, 6 Mar 2020 11:00:07 +0100 [thread overview]
Message-ID: <35aac187-b751-5723-0f15-be6605fb8ea2@free.fr> (raw)
[-- 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
reply other threads:[~2020-03-06 10:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35aac187-b751-5723-0f15-be6605fb8ea2@free.fr \
--to=louis.gostiaux@free.fr \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).