Option: Change the background color (texvc)
Closed, ResolvedPublic

Description

Author: xmlizer

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"


Version: unspecified
Severity: enhancement

bzimport added a project: Math.Via ConduitNov 21 2014, 6:42 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz8.
bzimport created this task.Via LegacyAug 10 2004, 4:43 PM
brion added a comment.Via ConduitAug 20 2004, 12:55 AM

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).

bzimport added a comment.Via ConduitAug 20 2004, 7:36 AM

xmlizer wrote:

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 !!!

brion added a comment.Via ConduitAug 20 2004, 7:38 AM

That would not solve the printing problem, nor browser settings that override all stylesheets.

hashar added a comment.Via ConduitJan 20 2005, 8:11 AM

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

bzimport added a comment.Via ConduitMay 22 2005, 4:15 PM

river wrote:

CLOSED

brion added a comment.Via ConduitAug 17 2005, 12:33 AM
  • Bug 3160 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitMar 20 2007, 10:33 PM

ayg wrote:

*** Bug 9341 has been marked as a duplicate of this bug. ***

bzimport added a comment.Via ConduitMar 20 2007, 10:33 PM

ayg wrote:

*** Bug 6954 has been marked as a duplicate of this bug. ***

bzimport added a comment.Via ConduitMar 21 2007, 8:14 AM

cmertes wrote:

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

bzimport added a comment.Via ConduitMar 21 2007, 4:20 PM

ayg wrote:

Coding it was never the problem. It's a one-line change.

bzimport added a comment.Via ConduitMar 21 2007, 5:06 PM

cmertes wrote:

Well, how many lines is making it optional then? :)

Raymond added a comment.Via ConduitOct 17 2008, 9:36 PM
  • Bug 15462 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitOct 17 2008, 9:43 PM

ayg wrote:

Refiling as LATER. This might happen at some distant point if we use MathML, SVG, or who knows what.

bzimport added a comment.Via ConduitNov 18 2008, 4:50 PM

ayg wrote:

*** Bug 16382 has been marked as a duplicate of this bug. ***

bzimport added a comment.Via ConduitNov 18 2008, 6:30 PM

cmertes wrote:

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.

bzimport added a comment.Via ConduitNov 19 2008, 12:20 AM

ayg wrote:

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 . . .

bzimport added a comment.Via ConduitJun 13 2009, 10:25 PM

herd wrote:

*** Bug 19181 has been marked as a duplicate of this bug. ***

bzimport added a comment.Via ConduitJul 26 2009, 5:03 PM

rene.kijewski wrote:

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.

bzimport added a comment.Via ConduitNov 29 2009, 4:58 PM

ayg wrote:

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).

bzimport added a comment.Via ConduitNov 30 2009, 6:57 PM

ayg wrote:

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.

bzimport added a comment.Via ConduitNov 30 2009, 7:11 PM

freak wrote:

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

bzimport added a comment.Via ConduitNov 30 2009, 7:18 PM

ayg wrote:

Hmm, so should we make that the default?

bzimport added a comment.Via ConduitSep 16 2010, 7:13 PM

a.d.bergi wrote:

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