Aloha Kyle,
This patch produces a LaTeX environment, marginfigure, that isn't
part of the standard. AFAIK, marginfigure is defined in the
sidenotes package and separately in the tufte-latex class, neither
of which Org mode loads by default. If the patch is applied, then
one of these packages should be added to the list of default LaTeX
packages so ox-latex doesn't export code it is unable to compile.
My takeaway from the discussion surrounding ox-tufte-latex several
years ago is that support for non-standard LaTeX constructs should
not be part of Org mode core because they complicate maintenance
unduly.
I haven't used ox-tufte-latex since I last used paper handouts at
a presentation several years ago, so I don't know if it still
works. However, it really was cobbled together, a process that
involved copying big chunks of Org mode code. I knew then this
approach is sub-optimal, but never found the time to puzzle out
how to turn it into advice that could sit on top of a possibly
changing code base.
Also, FYI, I found the tufte-latex class a bit difficult to use.
Objects in the margin can easily overwrite one another and the
author has to fix these manually, which can be tricky. The upside
is that when everything is right, the output can be terrific to
look at.
All the best,
Tom
Kyle Meyer writes:
Pablo Palazon writes:
I've created a path to add a new option to float properties for
figures on
latex. This is my first change for org-mode, and I don't really
sure if
this is the correct way to do it.
Thank you!
* 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.
I wondered if something like this had been proposed or discussed
before.
Searching the list, I see a patch [0] very similar to yours from
a
couple of months back that didn't get a response (author added
to cc).
Further back, there is a thread about an exporter Thomas Dye
(+cc) wrote
to handle marginfigure and some other Tufte-y things [1]. It
looks like
the code is available at
<https://github.com/tsdye/tufte-org-mode>,
though I'm not sure if it still works with the current Org.
As for the proposed patch, while I think the specific code
change itself
looks fine, skimming through the above thread makes me think
that adding
marginfigure to ox-latex.el without considering similar cases
may not be
the right approach. What do others think?
[0]:
https://yhetil.org/orgmode/35aac187-b751-5723-0f15-be6605fb8...@free.fr/
[1]: https://yhetil.org/orgmode/m2h9hsgdo2....@tsdye.com/
--
Thomas S. Dye
https://tsdye.online/tsdye