From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: [bug] latex fragment preview with dvipng ignores :foreground specification Date: Mon, 28 Jan 2013 17:28:19 +0000 Message-ID: <87libdgqto.fsf@gmail.com> References: <878v7g27f7.fsf@ucl.ac.uk> <12554.1359160368@alphaville> <87sj5ncxt2.fsf@ucl.ac.uk> <87622ijg6s.fsf@gmail.com> <87fw1laa7t.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzsUa-00049O-EK for emacs-orgmode@gnu.org; Mon, 28 Jan 2013 12:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TzsUS-0006Hy-Hy for emacs-orgmode@gnu.org; Mon, 28 Jan 2013 12:27:36 -0500 Received: from mail-wi0-f177.google.com ([209.85.212.177]:60307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzsUS-0006Hp-Af for emacs-orgmode@gnu.org; Mon, 28 Jan 2013 12:27:28 -0500 Received: by mail-wi0-f177.google.com with SMTP id hm14so597632wib.4 for ; Mon, 28 Jan 2013 09:27:27 -0800 (PST) In-reply-to: <87fw1laa7t.fsf@ucl.ac.uk> 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 S Fraga Cc: Nick Dokos , emacs-orgmode@gnu.org Eric S Fraga writes: > Myles English writes: >> Please could you clarify a couple of things for me? >> >> From your investigations can you say if there is a bug in the orgmode >> use of dvipng, or has dvipng changed so that the expected behaviour is >> no longer supported? I too use a dark display (emacs theme >> zenburn-emacs), get the black fragments in normal latex blocks in org >> files (i.e. not beamer), and org-format-latex-options has no visible >> effect, how can I have white formulae again? > Thanks for prompting me on this. I've explored the code a bit > further. The two approaches, i.e. dvipng vs imagemagick, differ not > only in the tool used to create the image and the source of the image > (dvi versus pdf) but also in the latex code actually created to generate > the image in the first place. > > The dvipng route does not specify any colours in the latex and relies on > dvipng to change explicitly the background and foreground colours. The > imagemagick route, however, creates a latex file that has the colour > specifications directly and the conversion does change any colours. > > So, it could be that dvipng has changed and no longer changes the > colours correctly or it may be that latex has changed in how the dvi > file specifies colours? > > However, I have verified that dvipng will work just fine, without asking > for colour changes, if the dvi is created using the latex code used for > the imagemagick case. This leads me to suggest that both cases (dvipng > and imagemagick) use the same latex code and, in fact, it may be > possible to fold both functions org-create-formula-image-with-dvipng and > org-create-formula-image-with-imagemagick into one... but maybe this > has other repercussions. One such repercussion could be the use of > transparent colour specifications: dvipng would appear to support this > but imagemagick might not (as org appears to use white when transparent > is specified for a background colour, if I understood the code. Thanks for looking into it. Until a conclusion is reached with dvipng this gets things back to normal for me: (setq org-latex-create-formula-image-program 'imagemagick) Myles