* Issue with org-mode latex export captions
@ 2017-07-27 16:16 Tyler Morgan
0 siblings, 0 replies; 2+ messages in thread
From: Tyler Morgan @ 2017-07-27 16:16 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
I am running org-version 9.0.9 (9.0.9-54-g16dbf0-elpa) and have run into an issue with org-mode’s LaTeX/PDF export function. Everything looks normal when I create figure captions using the standard:
#+CAPTION: This is a caption.
#+NAME: fig:figure1
#+ATTR_LATEX: :width 15.0cm
[[/loc/to/figure1.jpg]]
Meaning that the LaTeX that is produced contains the caption, the name as a LaTeX label, etc. However, when I define the caption directly in LaTeX in order to use some of its added functionality, as in:
#+NAME: fig:figure1
#+ATTR_LATEX: :width 15.0cm :caption \caption[This is a caption.]{This is a much longer version of my caption that I don’t want included in my TOC.}
[[/loc/to/figure1.jpg]]
The resulting LaTeX no longer includes a label attribute, which means that all of the references I have made to this figure in the text are now undefined. I know that defining a LaTeX caption overwrites the org-mode caption field, but I’m not sure why it also removes the #+NAME (or #+LABEL, which I have also tried) from the figure. This isn’t the end of the world, as I can go through the LaTeX at the end in order to manually add the labels back to the figures. However, I have many figures in a document that I’m working on at the moment, and it would be nice to understand why this is happening.
If anyone has any ideas on why this is happening, or a way that I could deal with it, I would greatly appreciate it.
Thank you,
Tyler Morgan
[-- Attachment #2: Type: text/html, Size: 4808 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Issue with org-mode latex export captions
[not found] <d2ba61442562443a818ce701b4668570@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-07-27 17:48 ` Eric S Fraga
0 siblings, 0 replies; 2+ messages in thread
From: Eric S Fraga @ 2017-07-27 17:48 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]
On Thursday, 27 Jul 2017 at 16:16, Tyler Morgan wrote:
[...]
> The resulting LaTeX no longer includes a label attribute, which means
> that all of the references I have made to this figure in the text are
> now undefined. I know that defining a LaTeX caption overwrites the
> org-mode caption field, but I’m not sure why it also removes the
> #+NAME (or #+LABEL, which I have also tried) from the figure.
Because the label is intrinsically associated with the caption (this is
a LaTeX feature and nothing to do with org), not the figure itself. It
is the caption that creates the number for the reference. A figure may
contain more than one image, for instance.
Either simply add \label{fig:figure1} to the caption you are specifying
or, if it is that you want to have the table of contents entry, use this
format for the caption:
#+caption[short title]: long caption
which should work, according to the manual (untested).
HTH,
eric
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-27 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27 16:16 Issue with org-mode latex export captions Tyler Morgan
[not found] <d2ba61442562443a818ce701b4668570@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-07-27 17:48 ` Eric S Fraga
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.