|
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 "Thebackground color given will be ignored if there is a background color\special in the DVI.""Transparent" doesn't change the background color, it enables thealpha channel.The actual background color (visible, say, in a reader without thealpha channel) is controlled by the color spec, and overridden by acolor \special.Thank you for your reply and the explanation.Did you want this to work differently, or was the problem that youwere surprised by the behavior?Some time ago, a change in org-mode (emacs package) introduced a bugbecause this behavior was unexpected.Org-mode uses latex > dvipng to generate images to be included in anemacs buffer. If the user specifies a background color, it is set usingthe 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 AUCTeX I 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
[Prev in Thread] | Current Thread | [Next in Thread] |