mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-21 13:48:46 +00:00
LaTeX export: Allow centered images in plain lists
This commit is contained in:
parent
50645b5699
commit
4bfb32bb75
|
@ -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>
|
2009-11-23 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org-clock.el (org-clock-insert-selection-line): Catch error when
|
* org-clock.el (org-clock-insert-selection-line): Catch error when
|
||||||
|
|
|
@ -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)
|
(defun org-export-latex-format-image (path caption label attr)
|
||||||
"Format the image element, depending on user settings."
|
"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 floatp (or caption label))
|
||||||
|
(setq ind (org-get-text-property-any 0 'original-indentation path))
|
||||||
(when (and attr (stringp attr))
|
(when (and attr (stringp attr))
|
||||||
(if (string-match "[ \t]*\\<wrap\\>" attr)
|
(if (string-match "[ \t]*\\<wrap\\>" attr)
|
||||||
(setq wrapp t floatp nil attr (replace-match "" t t 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)
|
(if (and (not label) (not caption)
|
||||||
(string-match "^\\\\caption{.*\n" figenv))
|
(string-match "^\\\\caption{.*\n" figenv))
|
||||||
(setq figenv (replace-match "" t t figenv)))
|
(setq figenv (replace-match "" t t figenv)))
|
||||||
(org-fill-template
|
(org-add-props
|
||||||
figenv
|
(org-fill-template
|
||||||
(list (cons "path"
|
figenv
|
||||||
(if (file-name-absolute-p path)
|
(list (cons "path"
|
||||||
(expand-file-name path)
|
(if (file-name-absolute-p path)
|
||||||
path))
|
(expand-file-name path)
|
||||||
(cons "attr" attr)
|
path))
|
||||||
(cons "labelcmd" (if label (format "\\label{%s}"
|
(cons "attr" attr)
|
||||||
label)""))
|
(cons "labelcmd" (if label (format "\\label{%s}"
|
||||||
(cons "caption" (or caption ""))
|
label)""))
|
||||||
(cons "placement" (or placement ""))))))
|
(cons "caption" (or caption ""))
|
||||||
|
(cons "placement" (or placement ""))))
|
||||||
|
nil 'original-indentation ind)))
|
||||||
|
|
||||||
(defun org-export-latex-protect-amp (s)
|
(defun org-export-latex-protect-amp (s)
|
||||||
(while (string-match "\\([^\\\\]\\)\\(&\\)" s)
|
(while (string-match "\\([^\\\\]\\)\\(&\\)" s)
|
||||||
|
|
Loading…
Reference in a new issue