* Latex export of figure with multiline caption and label results in additional space
@ 2018-08-22 11:31 Max Beutelspacher
2018-09-06 14:39 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Max Beutelspacher @ 2018-08-22 11:31 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I have a problem when I'm exporting a figure with a multiline
caption and a label to pdf via latex.
Here is an example
#+BEGIN_SRC org +LATEX_HEADER: \usepackage{caption} +LATEX_HEADER:
#\captionsetup{format=hang} +NAME: test +CAPTION:Cras placerat
#accumsan nulla. Aliquam posuere. Etiam laoreet quam sed arcu.
#Phasellus purus. [[file:test.png]] +END_SRC
The headers are to ensure that the caption is indented.
Unfortunately now the latex export is
#+BEGIN_SRC latex \begin{figure}[htbp] \centering
\includegraphics[width=.9\linewidth]{test.png}
\caption{\label{test} Cras placerat accumsan nulla. Aliquam
posuere. Etiam laoreet quam sed arcu. Phasellus purus.}
\end{figure} #+END_SRC
so the label is inserted before the caption separated by a space.
In the resulting pdf the first line of the caption is then
indented by one additional space compared to the other lines of
the caption.
This does not happen if I omit the label/name.
Is this a bug? Is there any way around this behavior?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Latex export of figure with multiline caption and label results in additional space
2018-08-22 11:31 Latex export of figure with multiline caption and label results in additional space Max Beutelspacher
@ 2018-09-06 14:39 ` Nicolas Goaziou
2018-09-06 16:08 ` Max Beutelspacher
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-09-06 14:39 UTC (permalink / raw)
To: Max Beutelspacher; +Cc: emacs-orgmode
Hello,
Max Beutelspacher <max.beutelspacher@mailbox.org> writes:
> I have a problem when I'm exporting a figure with a multiline caption
> and a label to pdf via latex.
>
> Here is an example
> #+BEGIN_SRC org +LATEX_HEADER: \usepackage{caption} +LATEX_HEADER:
> #\captionsetup{format=hang} +NAME: test +CAPTION:Cras placerat
> #accumsan nulla. Aliquam posuere. Etiam laoreet quam sed arcu.
> #Phasellus purus. [[file:test.png]] +END_SRC
I cannot parse your example. Could you send it again?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Latex export of figure with multiline caption and label results in additional space
2018-09-06 14:39 ` Nicolas Goaziou
@ 2018-09-06 16:08 ` Max Beutelspacher
0 siblings, 0 replies; 3+ messages in thread
From: Max Beutelspacher @ 2018-09-06 16:08 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode, Max Beutelspacher
Hello,
I'm very sorry I hope this version is parsed correctly:
When I use a multiline caption without a label everythings is
correct, the two lines are both indented by the same amount
#+BEGIN_SRC org #+LATEX_HEADER: \usepackage{caption}
#+LATEX_HEADER: \captionsetup{format=hang} #+CAPTION:Cras placerat
accumsan nulla. Aliquam posuere. Etiam laoreet quam sed arcu.
Phasellus purus. [[file:test.png]] #+END_SRC
results in this latex code #+BEGIN_SRC latex \begin{figure}[htbp]
\centering \includegraphics[width=.9\linewidth]{test.jpg}
\caption{Cras placerat accumsan nulla. Aliquam posuere. Etiam
laoreet quam sed arcu. Phasellus purus.} \end{figure} #+END_SRC
Unfortunately when I add the label then the first line of the
caption is indented by one space due to the label within the
caption in the latex output: #+BEGIN_SRC org #+LATEX_HEADER:
\usepackage{caption} #+LATEX_HEADER: \captionsetup{format=hang}
#+NAME: test #+CAPTION:Cras placerat accumsan nulla. Aliquam
posuere. Etiam laoreet quam sed arcu. Phasellus purus.
[[file:test.png]] #+END_SRC
results in
#+BEGIN_SRC latex \begin{figure}[htbp] \centering
\includegraphics[width=.9\linewidth]{test.png}
\caption{\label{test} Cras placerat accumsan nulla. Aliquam
posuere. Etiam laoreet quam sed arcu. Phasellus purus.}
\end{figure} #+END_SRC
Best regards,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Max Beutelspacher <max.beutelspacher@mailbox.org> writes:
>
>> I have a problem when I'm exporting a figure with a multiline
>> caption and a label to pdf via latex.
>>
>> Here is an example #+BEGIN_SRC org +LATEX_HEADER:
>> \usepackage{caption} +LATEX_HEADER: #\captionsetup{format=hang}
>> +NAME: test +CAPTION:Cras placerat #accumsan nulla. Aliquam
>> posuere. Etiam laoreet quam sed arcu. #Phasellus purus.
>> [[file:test.png]] +END_SRC
>
> I cannot parse your example. Could you send it again?
>
> Regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-06 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22 11:31 Latex export of figure with multiline caption and label results in additional space Max Beutelspacher
2018-09-06 14:39 ` Nicolas Goaziou
2018-09-06 16:08 ` Max Beutelspacher
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).