[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Putting LaTeX inside a figure environment on export
From: |
William Denton |
Subject: |
Putting LaTeX inside a figure environment on export |
Date: |
Sat, 9 Apr 2022 15:36:42 -0400 (EDT) |
User-agent: |
Alpine 2.22 (DEB 394 2020-01-19) |
Is there a way to get a line of LaTeX inside a figure environment when
exporting from Org?
I've got a problem making an index of photographs where some of the photos are
large and get floated to a different page, and the page number in the index is
incorrect.
For example, let's say I have:
#+caption: This is a large tree
[[file:large_tree.jpg]]
When exported to LaTeX, this turns into:
\begin{figure}[htbp]
\centering
\includegraphics[width=.9\linewidth]{large_tree.jpg}
\caption{This is a large tree}
\end{figure}
I want to use this to generate an entry in an index:
\index[photos]{Tree}
Is there a way to get that *inside* the figure environment? If it is, then the
page number is correct.
If it's outside, then the index will point to the page where that line sits in
the text, if you get what I mean. If the figure would be in the middle of page
15 but is so big it gets floated to page 16, then the index will say 15 (where
the index command is), not 16 (where the image is).
Now that I've written this out I see I could make my own macro to do all this
(I'd pass in filename, caption, and indexing information, and generate that
LaTeX figure above with the index line inside), but is there a way built in to
Org to insert LaTeX like this when exporting? From what I see in the manual
there isn't, one can only set attributes, not add a custom line, but I thought
I'd ask.
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
- Putting LaTeX inside a figure environment on export,
William Denton <=