Browse Source

fix dvipng latex export with Transparent background

* org.el (org-create-formula-image-with-dvipng): Fixes a bug
introduced in 149cc04782651e74764eb3188f6a6f178fe25f64 that made it
fail with no :foreground and :background attributes set, due to bad
handling of "Transparent" color.
Abdó Roig-Maranges 12 years ago
parent
commit
5029a8bcf9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -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