Last modified: 2010-09-16 19:13:56 UTC
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).
I know...that's why it has been proposed as optional! May be could we set by default in CSS something like img { background-color : white; } which could easily be commented out !!!
That would not solve the printing problem, nor browser settings that override all stylesheets.
Will not implement it as per brion comment. One can edit the persite stylesheet in Mediawiki:monobook.css or its user stylesheet in User:Name/monobook.css
CLOSED
*** Bug 3160 has been marked as a duplicate of this bug. ***
*** Bug 9341 has been marked as a duplicate of this bug. ***
*** Bug 6954 has been marked as a duplicate of this bug. ***
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...). Kind regards, Christian
Coding it was never the problem. It's a one-line change.
Well, how many lines is making it optional then? :)
*** Bug 15462 has been marked as a duplicate of this bug. ***
Refiling as LATER. This might happen at some distant point if we use MathML, SVG, or who knows what.
*** Bug 16382 has been marked as a duplicate of this bug. ***
Another duplicate... I still think it would great to have an opt-in switch to enable this feature, especially if it'd be a matter of five lines of code or 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 . . .
*** Bug 19181 has been marked as a duplicate of this bug. ***
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.
Just for note: There is a related link/proposal at http://meta.wikimedia.org/wiki/Help_talk:Displaying_a_formula/Archives/2005#Maynard_Handley.27s_suggestions Helder
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.
if you set the value to 'Transparent' it uses aplha transparency with antialiasing, but if you set it to 'transparent' it uses binary transparency as used in GIFs ... so that's solved IMO. http://www.nongnu.org/dvipng/dvipng_4.html#IDX6
Hmm, so should we make that the default?
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?