dvipng
[Top][All Lists]

## Re: -bg Transparent option isn't ignored when background color is set

 From: Sébastien Miquel Subject: Re: -bg Transparent option isn't ignored when background color is set in dvi file Date: Tue, 18 May 2021 06:00:57 +0000

Dvipng is written for preview-latex for exactly this purpose: generating images for inclusion in emacs.
Ah, I did not know that.

If you want to
- adapt to the background color in emacs by using a transparent background,
- except when the user sets the background color explicitly in the latex source,

- use the known emacs background color in the dvipng call.
- Then the explicit \special will override the command-line specification.

Transparent background was intended for the math on the web, where math authors might have little control over the background.
Nowadays I'd recommend Mathjax for that purpose.

Yes, it used to work in a similar fashion.
I think the point of the change was that, despite emacs' poor support for transparent png, you could change your emacs theme and reload the buffer to get the right background color, instead of regenerating all images.

Regards,
--
Sébastien Miquel