LaTeX export: Allow centered images in plain lists

This commit is contained in:
Carsten Dominik 2009-11-24 20:41:53 +01:00
parent 50645b5699
commit 4bfb32bb75
2 changed files with 20 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2009-11-24 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-format-image): Preserve the
original-indentation property.
2009-11-23 Carsten Dominik <carsten.dominik@gmail.com>
* org-clock.el (org-clock-insert-selection-line): Catch error when

View File

@ -1601,8 +1601,9 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(defun org-export-latex-format-image (path caption label attr)
"Format the image element, depending on user settings."
(let (floatp wrapp placement figenv)
(let (ind floatp wrapp placement figenv)
(setq floatp (or caption label))
(setq ind (org-get-text-property-any 0 'original-indentation path))
(when (and attr (stringp attr))
(if (string-match "[ \t]*\\<wrap\\>" attr)
(setq wrapp t floatp nil attr (replace-match "" t t attr)))
@ -1647,17 +1648,19 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(if (and (not label) (not caption)
(string-match "^\\\\caption{.*\n" figenv))
(setq figenv (replace-match "" t t figenv)))
(org-fill-template
figenv
(list (cons "path"
(if (file-name-absolute-p path)
(expand-file-name path)
path))
(cons "attr" attr)
(cons "labelcmd" (if label (format "\\label{%s}"
label)""))
(cons "caption" (or caption ""))
(cons "placement" (or placement ""))))))
(org-add-props
(org-fill-template
figenv
(list (cons "path"
(if (file-name-absolute-p path)
(expand-file-name path)
path))
(cons "attr" attr)
(cons "labelcmd" (if label (format "\\label{%s}"
label)""))
(cons "caption" (or caption ""))
(cons "placement" (or placement ""))))
nil 'original-indentation ind)))
(defun org-export-latex-protect-amp (s)
(while (string-match "\\([^\\\\]\\)\\(&\\)" s)