fix dvipng latex export with Transparent background

* org.el (org-create-formula-image-with-dvipng): Fixes a bug
introduced in 149cc04782 that made it
fail with no :foreground and :background attributes set, due to bad
handling of "Transparent" color.
This commit is contained in:
Abdó Roig-Maranges 2012-09-13 20:13:37 +02:00 committed by Jambunathan K
parent cedf5190e5
commit 5029a8bcf9

View file

@ -17612,9 +17612,9 @@ share a good deal of logic."
(bg (or (plist-get options (if buffer :background :html-background))
"Transparent")))
(if (eq fg 'default) (setq fg (org-dvipng-color :foreground))
(setq fg (org-dvipng-color-format fg)))
(unless (string= fg "Transparent") (setq fg (org-dvipng-color-format fg))))
(if (eq bg 'default) (setq bg (org-dvipng-color :background))
(setq bg (org-dvipng-color-format bg)))
(unless (string= bg "Transparent") (setq bg (org-dvipng-color-format bg))))
(with-temp-file texfile
(insert (org-splice-latex-header
org-format-latex-header