Re: Best way to implement sup/sub???

> I'm writing a JavaScript program to translate MathML(1.01)-Presentation
> into HTML4, 

Aha, interesting. One of the outstanding issues with the xsl
stylesheets is to see if the javascript back end rendering in there can
be made to work on non-mathml enabled netscapes for example, currently
it is written to be microsoft only (just because I was using MS jscript
documentation and testing it on IE).

I understand you are using javascript to interpret everything from the
mathml markup without using an xsl pre-pass, but we should be able to
share ideas...

I have tried various things for super/sub scripts 
html <sub>
css absolute and relative positioning
inline tables


None of them really worked as I want (having used TeX for 15 years, it's
hard to live with dubious superscript positioning:-) <sub> is the most
stable, ie it normally does what you expect in most browsers, even if
it doesn't do what you would wish. css positioning can give nice results
but browser implementation limitations mean that I stopped using it in
the main (I had some examples which worked fine until I put them in a
table, then all the css-positioned supscripts from _anywhere_ in the
document all aligned themselves overprinted along the first line of the
page....... Inline tables give the best relative positioning between the
base and the superscript, especially if the base is big (I had examples
where the base is a 3x3 matrix and the superscript was just "T", <sup>
isn't very good in those cases. The problem with inline tables is
keeping the alignment between the base and the rest of the line...

Despite all these problems I've been relatively pleased with the
javascript/css approach it can't approach the quality of a real mathml
renderer like mozilla/mathplayer/techexplorer but it can produce
pages that are very readable and I think it does help to spread mathml
to "legacy" systems.

I look forward to seeing your system!

I should maybe point out that the licence on the javascript code in the
stylesheet distribution means that essentially you can use any of it
without restriction, apart from saying where you got it from, should you
find it useful. 

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Received on Friday, 12 April 2002 03:38:23 UTC