emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug and quick bugfix


From: Godefroy
Subject: Re: [O] Bug and quick bugfix
Date: Tue, 15 Oct 2019 11:09:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Thanks for your replies. Your solution works for me, thank you a lot for
your work.

Sincerely,

Godefroy Vannoye

On 10/13/19 1:21 PM, Vladimir Lomov wrote:
> Hello,
> ** Nicolas Goaziou <address@hidden> [2019-10-13 09:26:42 +0200]:
>
>> Hello,
>>
>> Godefroy <address@hidden> 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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]