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: Eric S Fraga
Subject: Re: [O] [bug] latex fragment preview with dvipng ignores :foreground specification
Date: Mon, 28 Jan 2013 20:41:18 +1030
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Myles English <address@hidden> writes:

> Hi Eric,
>
> Eric S Fraga writes:
>
>> Nick Dokos <address@hidden> writes:
>>
>>> I tried the imagemagick setting, set the options variable to black 
>>> background
>>> and red foreground - lo and behold, that's what I get in the preview.
>>
>> I was correct in my conclusion last night that I needed to go to
>> bed...  I was making a silly mistake (and I won't go into details ;-).
>>
>> This does indeed work!  Thanks again.
>
> 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,
>
> Myles
>

Hi Myles,

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.

eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-891-gf52600




reply via email to

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