emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Abdó Roig-Maranges" <abdo.roig@gmail.com>
To: Eric Schulte <eric.schulte@gmx.com>, nicholas.dokos@hp.com
Cc: Org-mode <emacs-orgmode@gnu.org>, Jambunathan K <kjambunathan@gmail.com>
Subject: Re: Question on latex source block
Date: Thu, 13 Sep 2012 21:12:16 +0200	[thread overview]
Message-ID: <87har1ohyn.fsf@gmail.com> (raw)
In-Reply-To: <87har1hmts.fsf@gmx.com>

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]


Hi,

Here is a patch. Sorry for the bug!

Abdó.

Eric Schulte <eric.schulte@gmx.com> 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ó (the author of that commit).  Hopefully he can take a
> shot at solving this.
>
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: the patch --]
[-- Type: text/x-patch, Size: 1310 bytes --]

From a48efe084848aa1de8ad4abc5780d49b424a3980 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= <abdo.roig@gmail.com>
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


  reply	other threads:[~2012-09-13 19:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-09  5:15 Question on latex source block Richard Stanton
2012-09-09  7:07 ` Nick Dokos
2012-09-09  7:17   ` Nick Dokos
2012-09-09 16:49   ` Eric Schulte
2012-09-09 17:44     ` Nick Dokos
2012-09-09 19:39       ` Eric Schulte
2012-09-09 20:31         ` Nick Dokos
2012-09-13  6:00         ` Jambunathan K
2012-09-13  7:28           ` Nick Dokos
2012-09-13  7:58             ` Nick Dokos
2012-09-13 15:07           ` Eric Schulte
2012-09-13 16:04             ` Nick Dokos
2012-09-13 17:09               ` Eric Schulte
2012-09-13 19:12                 ` Abdó Roig-Maranges [this message]
2012-09-13 19:42                   ` Jambunathan K
2012-09-14  7:27                     ` Bastien
     [not found] <mailman.113.1347292828.2054.emacs-orgmode@gnu.org>
2012-09-10 16:49 ` Richard Stanton
2012-09-10 19:07   ` Nick Dokos
2012-09-10 20:43     ` Richard Stanton
2012-09-10 20:53       ` Nick Dokos
2012-09-11  6:52         ` Giovanni Ridolfi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87har1ohyn.fsf@gmail.com \
    --to=abdo.roig@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    --cc=kjambunathan@gmail.com \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).