Page MenuHomePhabricator

Support transparent background on rendered LaTeX
Closed, ResolvedPublic


Author: cmertes

I just wrote a mail to Jan-Åke Larsson, who seems to be the author of dvipng and asked him to add support for png
alpha channel. Would there be any interest in adding this feature to MediaWiki? The reason I'm asking this
is because I encountered several LaTeX formulas with a white opaque background that found themselves on top of some
coloured table. Didn't look very pretty. I asked Jan-Åke to add the option as a command line switch so it wouldn't be
very difficult to use.

If Jan-Åke thinks adding this feature to be possible and is willing to do it, would someone add support for it to
texvc? That'd be great!

Many thanks in advance,


Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:35 PM
bzimport added a project: Math.
bzimport set Reference to bz9341.
bzimport added a subscriber: Unknown Object (MLST).

cmertes wrote:

Good news from Jan-Åke. He wrote me this email:

Christian Mertes wrote:

Would it be difficult to add support for the
alpha channel for png images?

Yes. But I have already done that. It is there from version 1.6 released
one and a half years ago.

All that is needed is to activate this in phase3/math/ in
mediawiki. Patch included.

I thought there would be problems since IE has not supported PNG alpha
but it seems that IE7 does support it. (IE6 and below needs an
additional, now deprecated, javascript snippet.)

Feel free to try it out.

I'll attach the patch he sent me so it seems there will be no problem adding this feature to MediaWiki :) Will
someone do it?

Many thanks in advance,


cmertes wrote:

Patch for dvipng transparency support

Thanks to Jan-Åke Larsson for this patch and his quick answer.


cmertes wrote:

Oh BTW, as far as I know there won't be too much of a problem with older versions of IE as they just don't
display the alpha channel. So the formulas will be no uglier than they are now :)

ayg wrote:

*** This bug has been marked as a duplicate of 8 ***