Page MenuHomePhabricator

Improve decision when to render a formula as HTML
Closed, DeclinedPublic

Description

Author: mail

Description:
PNG rendering tends to produce quite unreadable text as the fonts (especially font sizes) of text and formulas don't match.

Unfortunately enforcing PNG- or HTML-rendering does not help: The setting "HTML if very simple or else PNG" does render some pretty simple formulas (like $D_f \subseteq \R$) as images while "HTML if possible or else PNG" produces HTML for some formulas which clearly look better when rendered as an image, like $X_1(u,v) = X_u(u,v) = \tfrac{\partial X}{\partial u}(u,v) = DX_{(u,v)}(e_1)$

I suggest implementing one of the following:

  • Implement a better mechanism to decide if a formula can be rendered as HTML. IMO sub-/superscript is quite readable in HTML-View, while multiline formulas (Fractions, Cases, Text above equal signs, ..) look better as PNGs
  • Use HTML for scriptstyle math per default unless it contains fractions
  • Add an attribute to the <math> tag so that authors can decide how to display the formula: "text" math is rendered as HTML while "display" formulas are rendered as PNGs in displaystyle and inserted into a separate line, slightly indented (As if one wrote "\n:<math>..</math>" in WP)

The latter would also improve semantics, which (I guess) would allow for simpler integration of math rendering with the PDF-Extension.

The problem lately led to multiple discussions in German WP regarding whether to use TeX for inline math at all, so I'd appreciate a quick (technical) solution :-)


Version: unspecified
Severity: enhancement

Details

Reference
bz25645

Event Timeline

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

I think the "HTML if very simple or else PNG" option is no longer available, so this bug can be closed.