From: William Denton <wtd@pobox.com>
To: emacs-orgmode@gnu.org
Subject: Putting LaTeX inside a figure environment on export
Date: Sat, 9 Apr 2022 15:36:42 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2204091450550.66944@shell3.miskatonic.org> (raw)
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
next reply other threads:[~2022-04-09 19:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-09 19:36 William Denton [this message]
2022-04-09 19:46 ` Putting LaTeX inside a figure environment on export Jason Ross
2022-04-09 20:04 ` William Denton
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=alpine.DEB.2.22.394.2204091450550.66944@shell3.miskatonic.org \
--to=wtd@pobox.com \
--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).