Description:
Now that the wiki try to colorize itself, it is the time for most of the
software to synchronize with this fact.
So it will be good to have an option (may be global) to set that the background
color is some special color and in particular "TRANSPARENT"

This would be problematic for a number of reasons, chiefly that when the style sheet is overridden by the user, the
text color in the images will not change. This can lead to black-on-black text for some users using high-contrast
settings, which will not be very helpful.

Also some browsers print transparent images with black backgrounds. (IE on Macintosh is one, IIRC).

IE on Macintosh? That browser is dead, Microsoft quit its development since version 5! Probably printing math is
the least of your problems when you're still using IE5 today ;) Wouldn't it be possible to disable the
transparency feature optionally? Or better yet just render white text on transparent background so even visually
impaired would have pretty TeX output :) I don't think "no" is a good final word on this issue as even the ugly
white borders aren't consistent since simple formulae are rendered without using TeX and so are lacking the
white background.

Additionally Jan-Åke Larsson already did all the transparency work for us (see Bug 9341 for story and patch) so
an option to switch it off doesn't seem too much to me (but then I don't know the code and I probably won't be
the one to do it so...).

Okay, reopening. I think you can make a good case that administrators should be able to configure this. At a minimum, if they have a non-white background, they may want to configure the background to some non-transparent color other than white.

Now, who wants to write a patch? I don't think I have math working on my machine . . .

Could it not be possible to have per skin settings like [[MediaWiki:Math-foreground/Monobook]] and [[MediaWiki:Math-background/Monobook]]? That should solve the black-on-black problem stated in comment #1.

As of r59550, it's possible to change the background color on a per-<math> basis using \pagecolor and \definecolor.

(In reply to comment #18)

Could it not be possible to have per skin settings like
[[MediaWiki:Math-foreground/Monobook]] and
[[MediaWiki:Math-background/Monobook]]? That should solve the black-on-black
problem stated in comment #1.

The problem with transparent math backgrounds is IE6 at this point. Black-on-black styles isn't a problem, since the style can just do .tex { background: white } to get the same display as now (in non-IE6 browsers). But alpha transparency doesn't work on IE6, and it's not acceptable to degrade display of all math articles for 15% of our users, for the sake of a tiny number of users viewing equations outside of mainspace, or otherwise on non-white backgrounds.

If someone can come up with a PNG transparency fix for IE6 that doesn't degrade performance or otherwise cause problems, even on pages with hundreds of equations, then we can use that. Otherwise, we won't (IMO) output transparent backgrounds by default until IE6 falls to, say, <1% market share.

But if someone wants to submit a patch that allows configuration of default math background color in LocalSettings.php, possibly including an off-by-default option to make it transparent, that would be fine, which is why this bug is still open. I'm willing to review it if it's reasonably short (I shouldn't think it would be more than 20 lines).

Fixed in r59593 by freakolowsky -- this is now an admin-configurable option, $wgTexvcBackgroundColor, defaulting to white. As far as I can determine, neither the software defaults nor the Wikimedia configuration will be changed to a transparent value in the foreseeable future, as long as IE6 is an issue. Although of course, ultimately that's not my decision alone.

It would be worth considering a further change that would use binary transparency by default on the parts that are completely transparent. This would reduce the solid white background to a white halo, which would probably look better, and it would work in all browsers. I don't know how to do that, but I'm sure it's possible.

As there are already settings in [[Special:Preferences]] for TeX, it should be easy to add an option for white background. The default has to be transparent! As referring to comment 9, when IE5 was dead in 2007, what is it today?

Add Comment

Text is available under the Creative Commons Attribution-ShareAlike 3.0 License; code is available under the GNU General Public License or other appropriate open source licenses. By using this site, you agree to the Terms of Use and Privacy Policy. · Wikimedia Foundation · Privacy Policy · Terms of Use · Disclaimer

Column Prototype

This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.