W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2006

[whatwg] Mathematics on HTML5

From: White Lynx <whitelynx@operamail.com>
Date: Wed, 07 Jun 2006 16:04:03 +0400
Message-ID: <20060607120403.B52EE43CC3@ws5-1.us4.outblaze.com>
Mihai Sucan wrote:
> I looked into jsMath and I actually like it. I'd wish browsers would  
> implement that.
>
> WHATWG could add just one tag:
> <math type="mime/type" src="file">
> math content
> </math>

Adding this tag will not ensure that LaTeX will be implemented in browsers.
Of course it could be used to embedd LaTeX source in XHTML documents that later can be transformed 
into (X)HTML using EcmaScript+DOM like in jsMath or using XSLT like in XSL-TeX. 
TEI for example has similar tag for math formulae
	http://www.tei-c.org/P5/Guidelines/FT.html
 so theoretically you already can embed LaTeX in XML as follows:

<tei:formula notation="TeX">
$\frac{a}{b}$
</tei:formula>

(add xmlns:tei="http://www.tei-c.org/ns/1.0" to root element). 
If necessary, one can add something similar to "notation" attribute to current proposal but this is formal
part of story that is unlikely to change anything.


> The fact the content in the <object> (the mathematical formulas) can't be  
> styled via CSS, nor modified via JS+DOM, is by far a lesser problem than  
> not having any support at all for any mathematical language.
Take into account that these two problems are related.

> If jsMath can achieve nice results via DOM manipulation for rendering  
> LaTeX code, 
jsMath transforms LaTeX into HTML + CSS output suitable for rendering in browsers.
Current proposal will not harm jsMath, it will just define HTML markup that would allow
applications like jsMath to replace stuff like
	<SPAN CLASS="typeset"><nobr><span class="scale">
	<span class="spacer" style="margin-left:0.12em"></span>
	<span style="position: relative; top:0.344em;"><span class="size2">
	<span class="icmmi10">b</span></span></span>
	<span style="position: relative; margin-left:-0.368em; top:-0.393em;">
	<span class="size2"><span class="icmmi10">a</span></span></span>
	<span style="position: relative; margin-left:-0.368em; top:-0.22em;">
	<span class="blank" style="border-left:0.368em solid;height:1px;"></span></span>
	<span class="spacer" style="margin-left:0.12em"></span>
	<span class="blank" style="height:1.170em;vertical-align:-0.394em"></span></span>
	</nobr></SPAN>
currently outputed by jsMath (input is \frac{a}{b}), with more user (and browser) friendly XHTML
	<fraction>
	<num>a</num>
	<den>b</den>
	</fraction>
or HTML
	<fraction><num>a<den>b</fraction> or <fraction>a<den>b</fraction>

> why wouldn't be a browser capable of doing that? 
Because it is outside the scope of current HTML, CSS, DOM based approach. 

> It should  
> actually be even more powerful, faster and capable of implementing even  
> what the guy wasn't able to.
Yes, it would be faster.

> As you said, as James said, and as far as I know, LaTeX is the most used  
> language for mathematical scientific documents.
Personally I am neither against implementing LaTeX in browsers nor consider it as particularly good idea.
Current proposal and LaTeX implementation are more or less orthogonal issues, that do not exclude each other,
turning thread into another LaTeX vs. SGML discussion may be useful for the sake of discusing issue but
is pointless for the sake of moving forward with math proposal.

> I have to agree with Juan on this. The fact those scientific documents are  
> rendered properly in about 2% of UAs (by number of users) is not a problem  
> at all, since it all relies on the CSS implementation in the other UAs.  
> This problem is bound to be solved in future releases of any UA. As Juan  
> said: Firefox will have a fix. Internet Explorer is an atypicial (might I  
> add a tragical) example, not worth going into details.
There will be XSLT fallback for MSIE 6.0 that will work reasonably well 
(apart of couple of technical issues with underscripts applied to complex base and some radicals,
that are not resolved yet but hopefully can be tackled).

> Why isn't LaTeX good enough for the web?
> If we wouldn't have CSS and someone, today, would come up with a CSS-like  
> proposal we'd trash it since it's not "good enough"? Please define "good  
> enough" for the web.
> I see LaTeX as was CSS 10 years ago:
> - no implementation
> - very different syntax (not SGML/XML based)
> - no "DOM integration"

add no CSS integration and you will answer your own question. Otherwise it is Ok.

> As you can see, I am for reusing existing technologies and formats, not  
> for adding yet another one.
Completely agree. This is basic idea behind current approach. 
Basic functionality already exists regardless HTML5. The reason why we want
this functionality to be included in HTML5 is to avoid usage of multiple namespaces, 
to be able include maths in HTML (not only X(HT)ML), and to expose semantics 
that currently is blurred as current namespace is not widely known/trusted 
and to let non-CSS and non-XSL UAs to participate in the process in case they want to.


> The guys from Opera Software and Mozilla Corporation could just say "no"  
> to everybody and just go ahead and implement support for LaTeX as  
> <object>. That would really make all authors of scientific documents very  
> happy.
Yes, it would. But taking into account that browser developers had more 
then ten years to implement LaTeX, I don't see how exactly markup 
proposed yesterday coud be responsible for current situation.



-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze
Received on Wednesday, 7 June 2006 05:04:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:27 UTC