W3C home > Mailing lists > Public > www-math@w3.org > August 2004

Re: MathML in CSS

From: White Lynx <whitelynx@operamail.com>
Date: Thu, 05 Aug 2004 15:44:57 +0400
To: "Bruce R Miller" <bruce.miller@nist.gov>
Cc: www-math@w3.org
Message-Id: <20040805114457.4070E4160A1@ws5-2.us4.outblaze.com>

Hello Bruce,
Nice to see that work on CSS3 math module is in progress.
Recently I wrote small article about rendering maths with CSS, maybe you'll find something useful there 
http://geocities.com/csssite/index.xml
(click on Overview) there is also Math Gallery 
http://geocities.com/csssite/gal.xml
that contains simple sample page written in different markup languages 
(ISO 12083, HTML+, MathML, TPML etc.) and rendered with CSS2 (2.1)
It requires browser with strong CSS support 
(Opera 7 is almost OK, Safari is more or less OK, 
in Mozillae layout is spoiled due to bug with inline-tables
and, needless to say page, MSIE can't afford it)
> At http://math.nist.gov/~BMiller/mathml-css/
> you'll find a mapping of the MathML TestSuite that uses CSS for
> rendering -- again, this is only using CSS 2.1, and you'll need
> a recent browser with good CSS support, such as Opera or
> Mozilla/Firefox/...
> And, you'll find (in addition to an annotated stylesheet
> http://math.nist.gov/~BMiller/mathml-css/style/mathml.css)
> a discussion of needed features for CSS3.  I thought that I
> would first seek a sanity check from the community before fleshing
> these at as complete, concrete proposals:
I have a few comments on proposed CSS3 extensions
> The proposal would be that single characters used as border components 
> would be stretched horizontally or vertically (according to which border it applied to), 
> and further that the components are stretched in such a way as to `meet at the corners'.
IMHO using stretchy character borders is too sophisticated solution that drastically
depends on fonts. I think that more simple and reliable way is to introduce appropriate
border styles, like 'border-style:curly;' 
> Fraction alignment
> Our stylesheet uses display:inline-table for fractions. 
> According to the Specification (next to last paragraph on page), the baseline of 
> an inline-table should be the baseline of the first row. 
> However, neither of the browsers I've tried respect this. 
> If they did, we could presumably align fractions properly using something like:
>  mfrac > *:first-child { vertical-align:bottom; }
>  mfrac { vertical-align:0.6ex; }
> where the 0.6ex is intended to account for the 1/2 ex, plus the distance 
> from the fraction line to the bottom of the numerator. 
> If that understanding is correct, then fraction alignment should be 
> possible (modulo some ad-hoc fudge factors), without any CSS extensions at all.
I fear it is not sufficient. What you suggest, aligns baseline of numerator
with baseline of text and then shifts it up by half ex.
Unfortunately position of baseline of numerator heavily depends on its content
(it may contain nested fractions, subscripts, indexed sums etc. that  shift baseline
upwards and spoil vertical centering of fraction). What we need is to align BOTTOM
of numerator with middle (or baseline + 0.5ex) of text. So I think issue is open.
Best wishes,
George


-- 
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.

Powered by Outblaze
Received on Thursday, 5 August 2004 07:45:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:40 UTC