Improve LaTeX figures

Nick Dokos writes:

> I've been running with the following patch for a little while and have
> seen no problems (it does \centering rather than \centerline but I don't
> think it makes a difference for an image - it would make a difference for a
> floating centered paragraph with multiple lines however.)
>
> There is another problem as well: there is a \n added after the
> \end{figure} which leads to spurious paragraphs. The patch fixes
> that too.
This commit is contained in:
Carsten Dominik 2009-09-30 09:29:15 +02:00
parent fec6e55af3
commit 3d5f9ef689

View file

@ -1554,8 +1554,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(cond ((and imgp (plist-get org-export-latex-options-plist :inline-images))
(insert
(concat
(if floatp "\\begin{figure}[htb]\n")
(format "\\centerline{\\includegraphics[%s]{%s}}\n"
(if floatp "\\begin{figure}[htb]\n\\centering\n")
(format "\\includegraphics[%s]{%s}\n"
attr
(if (file-name-absolute-p raw-path)
(expand-file-name raw-path)
@ -1564,7 +1564,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(format "\\caption{%s%s}\n"
(if label (concat "\\label{" label "}") "")
(or caption "")))
(if floatp "\\end{figure}\n"))))
(if floatp "\\end{figure}"))))
(coderefp
(insert (format
(org-export-get-coderef-format path desc)