emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [bug] latex fragment preview with dvipng ignores :foreground spe


From: Myles English
Subject: Re: [O] [bug] latex fragment preview with dvipng ignores :foreground specification
Date: Mon, 28 Jan 2013 17:28:19 +0000
User-agent: mu4e 0.9.9.5-dev6; emacs 24.2.1

Eric S Fraga writes:

> Myles English <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]