dvipng
[Top][All Lists]

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

 From: Jan-Åke Larsson Subject: Re: -bg Transparent option isn't ignored when background color is set in dvi file Date: Mon, 17 May 2021 21:55:42 +0000 User-agent: Evolution 3.36.4-0ubuntu1

 On mån, 2021-05-17 at 21:30 +0000, Sébastien Miquel wrote:Jan-Åke Larsson writes:That was intended, yes, the manual should probably have said "The background color given will be ignored if there is a background color \special in the DVI.""Transparent" doesn't change the background color, it enables the alpha channel.The actual background color (visible, say, in a reader without the alpha channel) is controlled by the color spec, and overridden by a color \special.Thank you for your reply and the explanation.Did you want this to work differently, or was the problem that you were surprised by the behavior?Some time ago, a change in org-mode (emacs package) introduced a bug because this behavior was unexpected.Org-mode uses latex > dvipng to generate images to be included in an emacs buffer. If the user specifies a background color, it is set using the latex commands, otherwise the image should be transparent.Dvipng is written for preview-latex for exactly this purpose: generating images for inclusion in emacs.Preview-latex is an add-on in AUCTeXI assume there's no way to get dvipng to behave like this ?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, I suggest you instead- 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.Best Jan-Åke

smime.p7s
Description: S/MIME cryptographic signature

reply via email to