From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Abd=C3=B3?= Roig-Maranges Subject: Re: Question on latex source block Date: Thu, 13 Sep 2012 21:12:16 +0200 Message-ID: <87har1ohyn.fsf@gmail.com> References: <40C7B1BFC291ED4E9D10436D07736A3347089E653C@EXMAIL7.haas.uc.berkeley.edu> <8243.1347174432@alphaville> <87bohfywdt.fsf@gmx.com> <13524.1347212661@alphaville> <87ligj6l57.fsf@gmx.com> <87pq5q4g3x.fsf@gmail.com> <87392mnepg.fsf@gmx.com> <10651.1347552255@alphaville> <87har1hmts.fsf@gmx.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCEpq-00072l-B9 for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 15:12:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCEpo-0006Kc-M9 for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 15:12:22 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:33893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCEpo-0006KT-FD for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 15:12:20 -0400 Received: by weys10 with SMTP id s10so2090517wey.0 for ; Thu, 13 Sep 2012 12:12:19 -0700 (PDT) In-Reply-To: <87har1hmts.fsf@gmx.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte , nicholas.dokos@hp.com Cc: Org-mode , Jambunathan K --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Here is a patch. Sorry for the bug! Abd=C3=B3. Eric Schulte writes: >> Seems to be caused by 149cc04782651e74764eb3188f6a6f178fe25f64, which is >> unfortunate since that fixes (at least I *think* it fixes) some problems >> when no default fore/background is defined (e.g. when emacs is run in >> batch mode). It would be nice if this could be fixed without reverting >> that commit completely. > > I'm CC'ing Abd=C3=B3 (the author of that commit). Hopefully he can take a > shot at solving this. > > --=20 > Eric Schulte > http://cs.unm.edu/~eschulte --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=dvipng-transparent.patch Content-Description: the patch >From a48efe084848aa1de8ad4abc5780d49b424a3980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= Date: Thu, 13 Sep 2012 20:13:37 +0200 Subject: [PATCH] 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. --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 881dbd5..1c18d70 100644 --- a/lisp/org.el +++ b/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 -- 1.7.12 --=-=-=--