Page MenuHomePhabricator

Rendering <math> PNG image improvements
Closed, DeclinedPublic

Description

Author: mets501wiki

Description:
I think it would be a great idea if we could implement some of Maynard Handley's
suggestions listed here:
http://meta.wikimedia.org/wiki/Help_talk:Displaying_a_formula#Maynard_Handley.27s_suggestions
. That would solve most of the problems of using <math> PNG images. He includes
ways to make transparant PNG images, make font-sized PNG images, and fix the
vertical alignment.


Version: unspecified
Severity: enhancement
URL: http://meta.wikimedia.org/wiki/Help_talk:Displaying_a_formula#Maynard_Handley.27s_suggestions

Details

Reference
bz6413

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:16 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz6413.
bzimport added a subscriber: Unknown Object (MLST).

As discussed over the previous several years:

  • Transparency is unsafe, as the foreground color won't match with

overridden background colors. This leads to illegible black-on-black
text, etc.

  • Sizing with fonts is similarly infeasible as font size may vary

significantly, and it's far too slow to rerender the images even
if you could detect the font size properly in the browser.

Better math output will be achieved only with improved MathML support.

ayg wrote:

(In reply to comment #1)

  • Sizing with fonts is similarly infeasible as font size may vary

significantly, and it's far too slow to rerender the images even
if you could detect the font size properly in the browser.

The suggestion was to define image height/width inline with <img style="..."> in
CSS exes rather than leaving out the size or specifying it in pixels. That
might work reasonably well, but would require testing on various platforms.

mets501wiki wrote:

What about adding another command to TeX, such as "\small" that would render the images smaller. Right now,
it's not a huge problem, but my main concern is square roots. Right now they display way too large for
inline PNG and look too ugly in HTML. Even a \smallrt (small root) command would help.

ayg wrote:

&sqrt;<span style="text-decoration: overline;">2</span> looks fine to me. It
looks ugly, granted, so make a template.

mets501wiki wrote:

Did you check that out on IE? It works perfectly in Firefox, but looks completely horrible in IE.

ayg wrote:

(In reply to comment #6)

Did you check that out on IE? It works perfectly in Firefox, but looks

completely horrible in IE.

There's a gap of a couple of pixels, but provided you {{unicode}} it, it's more
"a bit annoying" than "completely horrible". Example:
http://en.wikipedia.org/w/index.php?title=User:Simetrical/Sandbox&oldid=60093706

mets501wiki wrote:

Oh yes, you're right. If you {{unicode}} it is works fine.
I'm going to create a template right now called {{sqrt}}.