Hello, Godefroy <godefroy.vann...@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. Regards, -- Nicolas Goaziou