Thanks eric, I've done the changes and I attach all the patches.

On Fri, May 15, 2020 at 2:21 PM Eric S Fraga <e.fr...@ucl.ac.uk> wrote:

> Just a minor point: in the patch for the documentation, change "imagen"
> to "image".
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-631-g48b223
>
From 46a7fcecf5d2735f3f6f18481b302d4b4f887120 Mon Sep 17 00:00:00 2001
From: Pablo Palazon <pablo.pala...@gmail.com>
Date: Fri, 15 May 2020 18:25:21 +0200
Subject: [PATCH 3/3] org-manual.org: Fix type error

* doc/org-manual.org (Images in LaTeX export): Fix typo error on image
---
 doc/org-manual.org | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index e0c41f13e..b792f588a 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13572,8 +13572,8 @@ attribute to one of the following:
 
 - =margin= ::
 
-  For use the =marginfigure= environment. This environment shows the imagen in
-  the margin
+  For use the =marginfigure= environment. This environment shows the
+  image in the margin
 
 - =nil= ::
 
-- 
2.26.2

From 5c3eee89e501140460ea974195249a432b213bb2 Mon Sep 17 00:00:00 2001
From: Pablo Palazon <pablo.pala...@gmail.com>
Date: Thu, 14 May 2020 16:55:19 +0200
Subject: [PATCH 2/3] ox-latex.el: Add documentation to margin option in float

* doc/org-manual.org: Add documentation
---
 doc/org-manual.org | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 673bb11c5..e0c41f13e 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13570,6 +13570,11 @@ attribute to one of the following:
   For a new page with the image sideways, rotated ninety degrees, in
   a =sidewaysfigure= environment; overrides =:placement= setting.
 
+- =margin= ::
+
+  For use the =marginfigure= environment. This environment shows the imagen in
+  the margin
+
 - =nil= ::
 
   To avoid a =:float= even if using a caption.
-- 
2.26.2

From a4ff98eb82397721a152b3c3e51f6a993947140d Mon Sep 17 00:00:00 2001
From: Pablo Palazon <pablo.pala...@gmail.com>
Date: Thu, 14 May 2020 16:33:53 +0200
Subject: [PATCH 1/3] ox-latex.el: Add margin to float option for attr_latex in
 images

* lisp/ox-latex.el (org-latex--inline-image): Include margin option
to create marginfigure environment for figures. It's useful for tufte
latex class, where with this environment shows the figure in the margin.

TINYCHANGE
---
 lisp/ox-latex.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 6535d59f8..4b9281e1a 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") 'marginfigure)
 			((and (plist-member attr :float) (not float)) 'nonfloat)
 			((or float
 			     (org-element-property :caption parent)
@@ -2494,6 +2495,15 @@ used as a communication channel."
 			    (if center "\\centering" "")
 			    comment-include image-code
 			    (if caption-above-p "" caption)))
+      (`marginfigure (format "\\begin{marginfigure}%s
+%s%s
+%s%s
+%s\\end{marginfigure}"
+			    placement
+			    (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.26.2

Reply via email to