From: Vladimir Lomov <lomov.vl@yandex.ru>
To: Godefroy <godefroy.vannoye@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Bug and quick bugfix
Date: Sun, 13 Oct 2019 19:21:36 +0800 [thread overview]
Message-ID: <20191013112136.GB1540@smoon.bkoty.ru> (raw)
In-Reply-To: <87h84dcdhp.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
Hello,
** Nicolas Goaziou <mail@nicolasgoaziou.fr> [2019-10-13 09:26:42 +0200]:
> Hello,
>
> Godefroy <godefroy.vannoye@gmail.com> writes:
>
>> I recently encountered a bug when exporting an org file to LaTeX: when
>> generating a figure with a caption, the LaTeX result has the following
>> shape:
>>
>> \begin{figure}
>> …
>> \caption{\label{…}
>> Content of the caption}
>> \end{figure}
>>
>> When compiling to LaTeX, the carriage return causes a indesirable white
>> space in some cases. What I would expect is:
>>
>> \begin{figure}
>> …
>> \caption{Content of the caption}
>> \label{…}
>> \end{figure}
>>
>> To fix this, I have changed the org-latex--caption/label-string function
>> in ox-latex.el on lines 1314 and 1315:
>>
>> (format (if nonfloat "\\captionof{%s}%s{%s%s}\n"
>> "\\caption%s%s{%s%s}\n")
>>
>> becomes
>>
>> (format (if nonfloat "\\captionof{%s}%s{%s}\n%s"
>> "\\caption%s%s{%s}\n%s")
>
> IIRC, the label has to be included in the caption command. I applied
> a different solution. Let me know if that works for you.
There is no strict rule but a general good practice: for caption
material put label command inside the caption macro. Otherwise there
might be some side effects.
> Regards,
>
> --
> Nicolas Goaziou
---
WBR, Vladimir Lomov
--
QOTD:
"I thought I saw a unicorn on the way over, but it was just a
horse with one of the horns broken off."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2019-10-13 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 22:19 Bug and quick bugfix Godefroy
2019-10-13 7:26 ` Nicolas Goaziou
2019-10-13 7:31 ` Ken Mankoff
2019-10-13 11:21 ` Vladimir Lomov [this message]
2019-10-15 9:09 ` Godefroy
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191013112136.GB1540@smoon.bkoty.ru \
--to=lomov.vl@yandex.ru \
--cc=emacs-orgmode@gnu.org \
--cc=godefroy.vannoye@gmail.com \
/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 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.