The following feeds are currently available for adding to
your navigation bar.

tag:blogger.com,1999:blog-60822611990730428212018-12-17T05:29:13.741+00:00David CarlisleUnknownnoreply@blogger.comBlogger55125tag:blogger.com,1999:blog-6082261199073042821.post-87877973209864669992012-10-21T23:29:00.000+01:002012-10-23T17:27:07.537+01:00MathML Long Division
<p>So, I received an email asking for information on which editors support generating the MathML3 markup for long division. I gave the (honest) answer that I'd use emacs and James Clark's rather wonderful nxml-mode, but I felt a bit embarrassed by that answer.</p>
<p>The “elementary mathematics” markup was added at MathML3 specifically at the request of the Accessibility community as it is much easier to give accessible renderings of long division if the numbers involved in the layout are given as complete <em>numbers</em> rather than digits being aligned in a table layout.</p>
<p>My correspondent observed that neither using emacs nor direct editing of XML markup were the standard mode of operation for people generating the kind of documents at hand.</p>
<p>So I spent a bit of time this weekend with a long division layout generator implemented in JavaScript. The JavaScript is probably sub-optimal at this stage but it apparently works OK.</p>
<p>The code is available under the MIT licence (if that licence isn't suitable contact me) from google code at
<a href="http://html5mathml.googlecode.com/svn/trunk/longdiv.html">http://html5mathml.googlecode.com/svn/trunk/longdiv.html</a></p>
<p><b>Please Note:</b> While the generator may be run online from that URI, google code servers are not intended to be used for running code, if you intend to make use of the generator, please save the HTML file to your local disk and run it from there. (The code is a single HTML file and doesn't need a server or internet access.)</p>
<p>The generator lets you enter two integers (decimal points are not currently supported) and calculates the long division layout for the integer division of the first by the second. The first number is treated as a string so may be larger than a JavaScript integer, the second number can be at most a tenth of the maximum JavaScript integer.</p>
<p>The generator generates the layout as “ASCII-art” and the MathML markup, both as code shown in a pre element, and inlined in the document to be displayed in the browser.</p>
<p>At the current time the only MathML renderer that natively supports this markup that I know about is MathPlayer3 in Internet Explorer. If using that system the third column shows the typeset display and the Accessibility benefits may be showcased by using its right menu to get MathPlayer to give a voice rendering of the expression.</p>
<p>It is possible to display mlongdiv in MathML2 based systems by using the xslt/javascript to convert it to a tabular layout using mtable. The <a href="https://code.google.com/p/web-xslt/source/browse/trunk/ctop/mml3mml2.xsl">ctop</a> stylesheet (as optionally used in the Editor's draft of MathML) is one possible implementation of such a transformation.</p>
<p>As an example, if you enter 567 ÷ 17 the generated displays are
<pre>
33
----
17 | 567
51
---
57
51
---
6
</pre>
<pre>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mlongdiv>
<mn>17</mn>
<mn>33</mn>
<mn>567</mn>
<msgroup position='1' shift='-1'>
<msgroup>
<mn>51</mn>
<msline length='2'/>
</msgroup>
<msgroup>
<mn>57</mn>
<mn>51</mn>
<msline length='3'/>
</msgroup>
<msgroup position='1'>
<mn>6</mn>
</msgroup>
</msgroup>
</mlongdiv>
</math>
</pre>
<p><i>Updated 2012-10-23</i><br /> A variant suitable for MathML2 and LaTeX and so in particular working with <a href="http://www.mathjax.org/">MathJax</a> is available from the same directory <a href="http://html5mathml.googlecode.com/svn/trunk/longdiv-mj-mml2.html">http://html5mathml.googlecode.com/svn/trunk/longdiv-mj-mml2.html</a> Rather than use a form this uses the MathJax TeX parser to parse input of the form <code>\longdiv{567}{17}</code>.<p>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-6082261199073042821.post-23366390187158002812012-10-12T15:39:00.000+01:002012-10-12T15:39:54.542+01:00Chrome!<div class="separator" style="clear: both; text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-jRF68e5_7UA/UHgrmy_f_vI/AAAAAAAAC8I/JSt8rToKrx8/s1600/chromemml.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="244" width="320" src="http://1.bp.blogspot.com/-jRF68e5_7UA/UHgrmy_f_vI/AAAAAAAAC8I/JSt8rToKrx8/s320/chromemml.png" /></a></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-30289669900430209182012-05-17T00:16:00.001+01:002012-05-17T10:12:27.302+01:00Public MathML Editor's Draft<p>Today we announced that a <a href="http://www.w3.org/Math/draft-spec/">public copy of the editor's draft of
MathML</a> is available. Previously it was only available to W3C members (or as
copies from other locations).</p>
<p>This is a draft “2nd Edition” of MathML 3.0. It incorporates a number of
errata that have been reported over the last year. The Math Working Group will continue to
gather and correct mistakes in the MathML 3.0 spec and update this draft
accordingly.</p>
<p>Please see <a href="http://www.w3.org/Math/draft-spec/appendixf-d.html#changes.mathml3.02e-3.0">the change log in the diff marked version</a> for links to highlighted sections that have changed since the first edition of MathML was published.</p>
<p>The draft is available in several formats:</p>
<dl>
<dt><a href="http://www.w3.org/Math/draft-spec/">HTML(4)</a></dt>
<dd>The Normative version of the spec: HTML 4, one HTML page per <em>chapter</em> with no MathML to be rendered by the browser.</dd>
<dt><a href="http://www.w3.org/Math/draft-spec/Overview-d.html">Diff Marked HTML(4)</a></dt>
<dd>As above, but with highlighted sections showing any changes from the 1st edition of MathML 3.0.</dd>
<dt><a href="http://www.w3.org/Math/draft-spec/Overview.xml">XHTML + MathML Version</a></dt>
<dd>XHTML including MathML examples to be displayed in the browser.</dd>
<dt><a href="http://www.w3.org/Math/draft-spec/mathml.html">Single file HTML(5) + MathML Version</a></dt>
<dd><p><b>NEW!</b> The spec as a single HTML page (rather than a page per chapter)
with inline MathML examples. This version also includes the option of
applying JavaScript to affect the display of MathML, Converting Content
MathML to Presentation and optionally invoking the <a href="http://www.mathjax.org/">MathJax</a> system to
render the MathML.</p>
<p>The transformation to Presentation MathML basically uses my <a href="http://code.google.com/p/web-xslt/source/browse/trunk/ctop">ctop XSLT</a> transformation invoked separately on each MathML fragment via JavaScript.</dd>
<dt><a href="http://www.w3.org/Math/draft-spec/mathml.pdf">PDF version.</a></dt>
<dd>Version of the document typeset with LaTeX.</dd>
</dl>
<p>As always comments on the draft are welcome. here, or preferably, on the <a href="http://lists.w3.org/Archives/Public/www-math/">www-math@w3.org mailing list</a>.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-51280368452866023562011-12-07T22:29:00.001+00:002011-12-07T22:45:07.746+00:00Robert Miner<p>Robert Miner, my friend and colleague on the W3C Math Working Group died yesterday from liver cancer.</p>
<p>Robert has Chaired or Co-Chaired the group since it started, and has been active in developing standards for mathematics on the web at the W3C since at least 1996. He will be sorely missed.</p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6082261199073042821.post-72031034549588704282011-09-23T00:46:00.000+01:002011-09-23T17:43:24.604+01:00html5mathml<br />
<p>As some of you may have <a href="https://plus.google.com/107847268022850354754/posts/bUFnV5Xii7L#107847268022850354754/posts/bUFnV5Xii7L">seen on google+</a> With a bit of help, I have MathML working in Firefox Mobile on Android. The key observation (of Karl Tomlinson) was that I needed a recent version of the font I was using (<a href="http://dejavu-fonts.org/wiki/Main_Page">dejavu serif</a>) as older ones did not have the necessary glyphs to build up “stretchy” characters such as large brackets needed for mathematical display.</p><p>So I have added support for Firefox/Android to my javascript library for enabling mathml-in-html5 (Firefox all versions, IE+MathPlayer 6-10, Chrome, Safari, Opera are all supported to some extent).</p><h3>html5mathml on googlecode</h3><p>This reminded me that I never actually announced its existence, hence this posting. The javascript is maintained in a google code svn repository at <a href="http://html5mathml.googlecode.com/">html5mathml</a>, although you might want to start with the test/example file at <a href="http://html5mathml.googlecode.com/svn/trunk/test1.html">test1.html</a></p><p>The code is all freely available, It is all under the MIT licence, except for the copy of the dejavu serif font which is available under its own custom free licence, included in the distribution.<p><h3>Usage</h3><p>The idea is that you write a conforming html5+mathml document and just add the line:</p><pre><script src="html5mathml.js"></script></pre><p>into the head of the document, adjusting the src attribute to point to a local copy of the files downloaded from the above location. Please do use local copies, googlecode is a source repository not intended for serving production code to be used. Depending on the client browser being used, this JavaScript file may use one of two css files or the above mentioned dejavu font, all of which are available from the source repository.</p><p>Comments fixes and experiences using more browsers all welcome, either here, or in email or on the www-math list.</p><h3>Comparison with MathJax</h3><p>Currently the primary javascript library for enabling MathML support in browsers is <a href="http://www.mathjax.org/">MathJax</a>, so perhaps I should offer some comparison. MathJax does <em>far</em> more than html5mathml, and generally speaking produces better MathML display, however it is somewhat slower and perhaps harder to set up locally (although it now has a public CDN server distribution which simplifies things greatly if access to the server can be assumed).</p><p>MathJax includes parsers for Tex-like syntax as well as MathML; this library assumes the input is MathML and relies on the browser to parse it (although includes some fixup for pre-html5 legacy browser parsing.) MathJax can be configured to do its own MathML rendering using CSS, or uses the native MathMl rendering in the browser if available. html5mathml essentially just assumes that the browser has MathML support although it does include css similar to that used in the the <a href="http://www.w3.org/TR/mathml-for-css/">CSS profile for MathML</a>. As such it loads much more quickly and reveals the MathML capabilities of the browser.</p><h3>Future Plans</h3><p>I try to track browser developments as far as possible (IE10 preview + MathPlayer for example is supported) but this is a spare time activity and I don't have access to all platforms, so any comments or code contributions for other platforms is always welcome. Currently the largest component is the dejavu font, probably I should subset that to just the characters needed for stretchy symbols. IE10 will no doubt require some changes once the full version comes out, and hopefully there will be a version of Chrome using the webkit MathML rendering (as now used in Safari). Similar techniques may be used to enable svg-in-html in legacy browsers that only support svg in xml. An early version of this code, handling MathML and SVG on a smaller range of browsers was discussed in a <a href="http://blog.nag.com/2010/09/html5-possible-implications-for.html">posting I made to the NAG blog</a> last year.</p><br />
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-6082261199073042821.post-53552298522933201692011-07-18T19:15:00.001+01:002011-07-18T22:44:30.187+01:00slinky canvas<p>The <a href="http://blog.nag.com/">NAG Blog</a>, to which I contribute from time to time, has a permanent link to Mike Croucher's blog, <a href="http://www.walkingrandomly.com/">Walking Randomly</a>. I happened to notice his <a href="http://www.walkingrandomly.com/?p=3715">current article on parametric plotting</a>. The parametric plots are demonstrated with an applet providing Mathematica generated plots and slider controls. Mathematica is a nice piece of software but I couldn't help but think that a modern web browser ought to be able to do this without help from an external application.</p>
<p>HTML (5) provides a <a href="http://diveintohtml5.org/canvas.html">canvas drawing API</a> that ought to be able to plot a curve or two, and also <a href="http://diveintohtml5.org/forms.html#type-range">built in slider form controls</a>.</p>
<p>I've not used canvas before, but it turns out to be pretty trivial to use, and my attempt is shown below. If you have a canvas enabled browser the plot should appear looking like the plot shown in Mike Croucher's article. Below that should appear some input forms that allow you to change the parameters. These appear as slider controls if a browser understands the HTML5 markup for this (Chrome does in its dev channel version at least). In other browsers they appear as text boxes, which allow you to change the values. (Firefox (4+) and IE (9+) work this way.)
The plot should be redrawn if you move the mouse off the form controls.<p>
<p>Actually I prefer the text entry control to the slider, as it is easier to exactly control the value. I'd hoped that the arrow keys could be used to step the slider, but as implemented in chrome at least, that isn't the case. No doubt with a bit more scripting such keyboard shortcuts could be added, but this will do as a first attempt.</p>
<hr>
<canvas id="slinky" width="400" height="600"></canvas>
<hr>
<div id="parameters"></div>
<hr>
<p>e: 0 <input onmouseup="javascript:draw();" id="eslide" type="range"
min="0"
max="80"
step="1"
value="1"> 80</p>
<p>f: 0 <input onmouseup="javascript:draw();" id="fslide" type="range"
min="0"
max="80"
step="1"
value="80"> 80</p>
<p>g: 0 <input onmouseup="javascript:draw();" id="gslide" type="range"
min="0"
max="80"
step="1"
value="1"> 80</p>
<p>h: 0 <input onmouseup="javascript:draw();" id="hslide" type="range"
min="0"
max="80"
step="1"
value="1"> 80</p>
<p>i: 0 <input onmouseup="javascript:draw();" id="islide" type="range"
min="0"
max="80"
step="1"
value="80"> 80</p>
<script type="text/javascript">
function xoft (t,e,f,g,h,i) {
return 200+100*(Math.cos(e*t) - Math.cos(f*t)*Math.sin(g*t));
}
function yoft (t,e,f,g,h,i) {
return 300-(100*(2*Math.sin(h*t) - Math.sin(i*t)));
}
function draw(){
var e = document.getElementById('eslide').value;
var f = document.getElementById('fslide').value;
var g = document.getElementById('gslide').value;
var h = document.getElementById('hslide').value;
var i = document.getElementById('islide').value;
document.getElementById('parameters').innerHTML = e + " " + f + " " + g + " " + h + " " + i;
var canvas = document.getElementById('slinky');
if (canvas.getContext){
var ctx = canvas.getContext('2d');
ctx.clearRect(0, 0, canvas.width, canvas.height);
var w = canvas.width;
canvas.width = 1;
canvas.width = w;
ctx.beginPath();
ctx.moveTo(xoft(0.0,e,f,g,h,i),yoft(0.0,e,f,g,h,i));
for (var t=0;t<8;t=t+0.001) {
ctx.lineTo(xoft(t,e,f,g,h,i),yoft(t,e,f,g,h,i));
}
ctx.stroke();
}
}
window.addEventListener('load', draw, false);
</script>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-6082261199073042821.post-65582707565806734102011-07-08T21:36:00.003+01:002011-07-11T22:24:30.920+01:00Converting to Strict Content MathML<h2>Some OpenMath History</h2>
<p>MathML and OpenMath have always had a shared history and more or
less documented ways of converting between them. Conceptually the
conversion is very simple and OpenMath <em>symbol</em>
<code>abc</code> could be expressed as the Content MathML symbol
<code><csymbol>abc</csymbol></code>. Successive versions of
MathML have in fact added features that made this conversion simpler
and better information preserving. MathML2 added <b>csymbol</b> which
is a better fit for OpenMath symbols than <b>ci</b>. In MathML1 and
MathML2 further information about the OpenMath Symbol would have to be
packaged into the definitionURL attribute. In MathML3 we added explicit
support for recording Content Dictionaries by adding a cd attribute to
csymbol.</p>
<p>Although the basic idea of the transformation was simple, the
details of the transformation were complicated by a desire to map to
the pre-defined MathML elements where available. So <code><OMS
name="sin" cd="trans1"/></code> should map to the MathML element
<code><sin/></code> rather than
<code><csymbol>sin</csymbol></code>.
The relationship between the predefined MathML Content MathML forms
and the simpler, more regular, but much more verbose, OpenMath syntax
was not formally specified by MathML so had to be specified as part of
the transformation to OpenMath. An early version of such a
transformation description is this 10 year old document still
available from the OpenMath site.
<a href="http://www.openmath.org/documents/om-mml.pdf">Conversion
between MathML and OpenMath</a>.
Around the same time, the conversions were implemented in XSLT. The
original versions predated XSLT 1, although the versions currently
available from the OpenMath site use XSLT 2. Converting from OpenMath
to MathML:
<a
href="http://svn.openmath.org/OpenMath/OpenMath2++/xsl/om2cmml.xsl">om2cmml</a>
and from MathML to OpenMath:
<a
href="http://svn.openmath.org/OpenMath/OpenMath2++/xsl/cmml2om.xsl">cmml2om</a>.</p>
<h2>MathML3 Strict Content MathML</h2>
<p>The relationship between
<code><sin/></code> and
<code><csymbol>sin</csymbol></code>
may rightfully be seen as a purely MathML issue and not something that
should be a by-product of converting to the OpenMath form
<code><OMS name="sin"/></code> and so MathML3 introduced, for each
of its Content layout forms, an explicit <em>rewrite rule</em>
expressing the construct in <em>Strict Content MathML</em> which is a
restricted form just using csymbol.
Section 4.6 of Chapter 4 of the MathML 3 spec specifies an explicit
multi-pass algorithm applying these rewrite rules to convert any valid
Content MathML expression into an expression just using the restricted
<em>Strict Content MathML</em> vocabulary.
<a href="http://www.w3.org/TR/MathML3/chapter4.html#contm.p2s">4.6 The
Strict Content MathML Transformation</a>.</p>
<p>Conceptually a conversion to Strict Content MathML could be made
which first converted to OpenMath, then converted back to MathML using
a stylesheet that removed all the special case rules originally added
to <a
href="http://svn.openmath.org/OpenMath/www/cdfiles2/xsl/om2cmml.xsl">om2cmml</a>
and documented in the OpenMath report referenced above. This was in
fact implemented and is how the majority of the Strict Content MathML
examples in Chapter 4 of the MathML spec were constructed. However
there were some choices to be made in the mapping specification and in
some cases the old OpenMath stylesheets made different choices. Where
feasible I updated the stylesheets to match, but one essential
structural difference remained. cmml2om implements a typical XSLT
depth first walk over the input document, applying whichever template
matches at that point. However the working group felt that the
exposition of the algorithm was clearer if it was expressed as a
multi-pass algorithm where each rule is applied in order over the whole
tree, with the result being passed on to the next stage, to be
rewritten by the next rewrite rule. These two approaches usually
produce the same result, but in edge cases where the order of
transformations matter they produce results that are (baring bugs)
mathematically equivalent, but are structurally different.</p>
<p>As a requirement for MathML3 to proceed to W3C Recommendation
status, we needed to show that the algorithm in <a
href="http://www.w3.org/TR/MathML3/chapter4.html#contm.p2s">Section
4.6</a>
was implementable and did the right thing. It was clear that while my
conversion via OpenMath was fairly reasonable it wasn't implementing
the algorithm as specified and didn't produce the specified results in
all cases.</p>
<h2>C2S Implementation</h2>
<p>Fortunately Robert Miner (co-chair of the Math WG) stepped up and
offered to implement the algorithm as specified. It was good that he
did, as inevitably, implementation experience showed some gaps or
inconsistencies in the first drafts of the algorithm, and the final
published form is much improved as a result of this
implementation.</p>
<p>The initial home of the new stylesheet was in the W3C member area
of the W3C CVS repository. Recently Robert suggested that we make it
public, and asked if I'd host it at my google code
<a href="http://code.google.com/p/web-xslt/wiki/Overview">web-xslt</a>
project site, since it is there and hosts other MathML related XSLT
stylesheets.</p>
<p>So Robert's implementation is now available (under W3C or MIT
licen[cs]e) from
<a
href="http://web-xslt.googlecode.com/svn/trunk/c2s/c2s.xsl">google code: c2s</a>.</p>
<p>Comments on the stylesheet are probably best addressed to the <a
href="mailto:www-math@w3.org">www-math</a> mailing list, but comments
may also be dropped here on this blog or on the google code wiki pages.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-13017239799429551442011-06-08T01:08:00.000+01:002011-06-08T01:08:33.948+01:00MathML for CSS Profile<p>I'm delighted to announce that the MathML for CSS profile has been published as a W3C Recommendation.</p>
<p><a href="http://www.w3.org/TR/2011/REC-mathml-for-css-20110607/">http://www.w3.org/TR/2011/REC-mathml-for-css-20110607/</a>
</p>
<p>This had a dependency on CSS 2.1 which was also published today.</p>
<p>This completes the three REC-track documents produced by the MathML3-era Working Group, joining:</p>
<p><a href="http://www.w3.org/TR/2010/REC-MathML3-20101021/">http://www.w3.org/TR/2010/REC-MathML3-20101021/</a></p>
<p>and</p>
<p><a href="http://www.w3.org/TR/2010/REC-xml-entity-names-20100401/">http://www.w3.org/TR/2010/REC-xml-entity-names-20100401/</a></p>
<p>The MathML for CSS profile (most of the technical work for which was done by George Chavchanidze of Opera) defines how a subset of MathML may be implemented using CSS. This is useful for two reasons: Firstly, it highlights possible places where CSS could be extended to improve its expressive power (so allowing a larger subset of MathML to be implemented) or secondly, it may be viewed directly as an implementation of a useful subset of MathML (and is similar to the CSS stylesheet for MathML which is used for MathML support in Opera).
As usual, comments are welcome here or on www-math@w3.org list.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-26226922738338147702010-11-07T00:44:00.003+00:002010-11-07T10:59:27.650+00:00Unicode 6:XML Entities draft<p>Unicode 6.0 was published last month, and the proposals for Unicode 6.1 are firming up, both of these releases have significant new characters for mathematical use, so I have updated the <a href="http://www.w3.org/2003/entities/2007doc/">Editors' draft</a> of “XML Entity Definitions for Characters ”.</p><p>The main source file, unicode.xml has been updated to contain information for all characters in Unicode 6.0, and the provisional allocations for the Arabic Math Alphabets in Unicode 6.1. There is no change to the set of entity names or the MathML or HTML dtd derived from these sources.</p>
<p>Although this document is styled as an editors' draft for an update to <a href="http://www.w3.org/TR/2010/REC-xml-entity-names-20100401/">the current recommendation</a>, there are no immediate plans to publish a formal update to the W3C recommendation. However I hope to track changes to Unicode in this editors' draft, and perhaps once the proposals to add Arabic mathematical characters to Unicode are all processed, we may try to submit this for formal review as a <a href="http://www.w3.org/2004/02/Process-20040205/tr#cfr-edited">Proposed Edited Recommendation</a>.
<h3>Unicode 6.0</h3>
<p>Most of the new characters in Unicode 6.0 are not directly related to Mathematics, although the large collection of “emoji” derived from characters used in the Japanese mobile phone industry provides some interesting characters that I'm sure could be used for mathematical operators (U+1F4A9 perhaps?). However there are some specifically mathematical characters including new heavy (ultra bold) plus and minus (U+2795 and U+2796) which may find use either in display contexts or as additional operators distinct from the usual plus and minus.</p>
<h3>Unicode 6.1 (proposals)</h3>
<p>The mathematical alphabets (bold, fraktur, double-struck, etc. ) that are in Unicode, and available as values in MathML 2's mathvariant attribute fit well with the mathematical traditions using the Roman and Greek alphabets but don't really work with other alphabets, notably Arabic.</p>
<p>Azzeddine Lazrek <a href="http://www.w3.org/TR/arabic-math/">proposed</a> that MathML and Unicode be extended with additional math alphabets corresponding to conventions used in Arabic typeset Mathematics. (initial, tailed, looped, stretched) these were added to MathML in the recently finalised MathML 3,0, and the corresponding code points have been allocated to Unicode (all in the block 1EE??) and planned to be standardised in Unicode 6.1. I have provisionally added this data to unicode.xml, and <a href="http://www.w3.org/2003/entities/2007doc/1EE.html">added a table </a>showing the characters to the entities draft.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-68394221708171570512010-10-21T23:21:00.001+01:002010-10-22T09:45:33.905+01:00MathML 3.0 Recommendation<p>I'm pleased to report that MathML 3.0 is today published as a <a href="http://www.w3.org/TR/2010/REC-MathML3-20101021/"> W3C Recommendation</a>. Seven years to the day since the last MathML Recommendation, <a href="http://www.w3.org/TR/2003/REC-MathML2-20031021/">MathML 2.0 2nd edition</a> was published on 21st October 2003.</p>
<p>So, what have we been doing for seven years?</p>
<p>My Working Group colleague, Neil Soiffer has just posted a <a href="http://news.dessci.com/2010/10/mathml-3-now-official-w3c-recommendation.html">blog entry</a> describing some of the main features and linking to a <a href="http://www.dessci.com/en/products/mathplayer/tech/mathml3.htm"> nice summary</a> of the main new features in MathML3, so I won't list them all in detail here, however some of the headline features are listed below.</p>
<h4>Additions to control bi-directional layout, for Arabic styles in particular</h4>
<p>The <a href="http://www.w3.org/TR/arabic-math/">Arabic Note</a> detailed some extensions to MathML 2.0 that would enable a richer variety of right-to-left layouts as used in typesetting Arabic mathematics. In MathML 3.0 this bi-directional control is fully integrated into the language, allowing the effect of each of the presentation layout elements to be specified in RTL and LTR modes.</p>
<h4>Elementary math layouts (long division, etc)</h4>
<p>Previously long division and long multiplication etc could be typeset using table layout and a lot of spacing adjustment but this was difficult to produce and very hard to process in an accessible way, by for example a speech renderer. MathML 3 introduces new elements (mstack and mlongdiv, principally) which enable a much more natural and accessible encoding of these layout schemes.</p>
<h4>Linebreaking of mathematics</h4>
<p>For the first time MathML 3 specifies control over automatic linebreaking and provides improved features for manual forced linebreaking and alignment of expressions.</p>
<h4>Officially registered MIME Types</h4>
<p>The mime type application/mathml+xml has been unofficially used for some time, but it is now officially registered (along with two more mime types specific to Presentation and Content MathML). These Mime types might prove particularly useful in systems that use MIME to label clipboard fragments.</p>
<h4>Closer alignment between Content MathML and OpenMath</h4>
<p>Chapter 4, describing Content MathML has been totally rewritten to provide a direct, explicit alignment with <a href="http://www.openmath.org/">OpenMath</a>. This alignment was always in the background (the two languages being developed at roughly the same time, by overlapping groups of people) but making the alignment explicit, and making small changes on both the MathML and OpenMath side has allowed many rough edges to be removed, and I think gives a much clearer presentation of the “semantics” underlying the Content MathML elements.</p>
<h4>RelaxNG Schema</h4>
<p>The normative DTD used for MathML 1 and 2 is replaced in MathML 3 by a <a href="http://www.w3.org/Math/RelaxNG/">Relax NG schema</a>. this is much more expressive than a DTD, and allows many of the constraints that previously could only be expressed in words to be built in to the grammar. A <a href="http://www.w3.org/Math/DTD/">DTD</a> (and <a href="http://www.w3.org/Math/XMLSchema/">XSD </a>schema) are still provided in the Math Working Group pages, as a convenience.</p>
<h4>Many clarifications and improvements throughout the spec</h4>
<p>If you stare at the MathML2 spec for 7 years you may notice that some parts are clearer than others.</p>
<h4>Integration with HTML5</h4>
<p>This is briefly mentioned in Chapter 6, but mainly specified in the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#mathml">HTML 5 draft specification</a>. One of the main difficulties of using MathML on the web has always been that it was designed as an XML application to fit with XHTML, and using XHTML has proved to be far more difficult than envisaged in 1998 when XML started. Some notable browsers are only now starting to support XHTML in beta releases, and even in browsers with good XML/XHTML support, it is difficult to integrate XHTML with HTML based document systems (such as the blogger system hosting this blog). HTML5, allowing MathML (and SVG) in text/html systems will be a massive boost to getting Mathematics into web based systems.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-10767093655205953122010-10-21T22:00:00.000+01:002010-10-21T22:00:59.922+01:00A MathML for CSS Profile 2nd PR<p><a href="http://www.w3.org/TR/2010/PR-mathml-for-css-20100810/">A MathML for CSS Profile</a> Has today been edited <i>in place</i> to confirm that it has passed all the ballots and implementation requirements to proceed to full W3C Recommendation status.</p><p>The final hurdle is that it has a normative dependency on CSS 2.1 which is currently at <a href="http://www.w3.org/TR/2009/CR-CSS2-20090908/">Candidate Recommendation stage</a>, so MathML for CSS is blocked at Proposed Recommendation stage until CSS 2.1 reaches Recommendation. Hopefully early next year.</p><p>There are apparently several W3C Working drafts similarly blocked by CSS 2.1 (which has been at Candidate Recommendation stage for over a year). Hopefully the CSS Working Group will get the remaining issues resolved and testing reports done this year!</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-85721972762485869562010-08-10T21:44:00.000+01:002010-08-10T21:44:45.483+01:00MathML3 PR<p>The W3C today published <a href="http://www.w3.org/TR/2010/PR-MathML3-20100810/">MathML3</a> and the <a href="http://www.w3.org/TR/2010/PR-mathml-for-css-20100810/">MathML for CSS Profile</a> as proposed recommendations.</p><p>PR is almost the final hurdle, and assuming none of the W3C members object at this stage, then we should be on course to reach Recommendation status in September.</p><p>As always, comments are welcome on www-math@w3.org, or via this blog.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-47828060008962675952010-06-10T22:55:00.000+01:002010-06-10T22:55:14.139+01:00MathML3 2nd Last Call<p>A new draft of MathML3 has been released: <a href="http://www.w3.org/TR/2010/WD-MathML3-20100610/">http://www.w3.org/TR/2010/WD-MathML3-20100610/</a>.</p>
<p>This is (again) a Last Call draft. There were sufficient changes and clarifications resulting from the Candidate Recommendation review draft that we decided to issue a Last Call again, to allow people to comment on the changes before (hopefully) we progress to Proposed Recommendation status.</p>
<p>We have provided a <a href="http://www.w3.org/TR/2010/WD-MathML3-20100610/Overview-d.html">Diff marked version</a> and a <a href="http://www.w3.org/Math/Documents/lc-changes.html">List of changes</a> to make it easier to review the changes since the CR draft.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-84885166026843164942010-05-28T20:52:00.001+01:002010-05-28T20:53:46.588+01:00STIX Fonts 1.015 years in the making, they finally released the fonts!<br />
<a href="http://www.stixfonts.org/">http://www.stixfonts.org/</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-11654834386789320972010-04-01T21:57:00.000+01:002010-04-01T21:57:00.300+01:00XML Entity Definitions for Characters<p>The W3C today published <a href="http://www.w3.org/TR/2010/REC-xml-entity-names-20100401/">XML Entity Definitions for Characters</a> as a Recommendation (i.e., Web standard). It's taken a long time (over a decade) but I hope you find them useful...</p>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6082261199073042821.post-11552960758263239642010-03-11T13:41:00.001+00:002011-07-09T00:54:03.592+01:00F#<p>Mostly these days I suppose I'm known for MathML and XSLT stuff. Before that I used TeX rather a lot (I must check one of these days whether I have yet posted as often to xsl-list as I have to comp.text.tex). Around the time I started to use TeX (1987 or thereabouts) I was mainly programming in the functional programming language Standard ML. I haven't done so much with ML since, but the ML family of languages have been having something of a renaissance recently, especially with Microsoft's
<a href="http://msdn.microsoft.com/en-gb/fsharp/default.aspx">F#</a> language.</p>
<p>So I've been returning to my roots and doing a bit of functional programming over the last few days, writing <a href="http://www.nag.co.uk/numeric/DT/fsharp/index.asp">an article hosted at NAG</a> on calling the NAG library from F#.</p>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-6082261199073042821.post-49504928548881938132010-02-21T13:01:00.000+00:002010-02-21T13:01:06.265+00:00XML Entities: W3C Vote<p>As noted in a <a href="http://dpcarlisle.blogspot.com/2010/02/entities-proposed-recommendation.html">previous post</a>, XML Entity Definitions for Characters is now a Proposed Recommendation.</p><p>To help the W3C make the decision to make the final transition to Recommendation status the Advisory Committee members are asked to submit comments. If you are in a W3C member company, please ask your AC representative to comment via the form<br /><a href="http://www.w3.org/2002/09/wbs/33280/PR-xml-entity-names-20100211/">http://www.w3.org/2002/09/wbs/33280/PR-xml-entity-names-20100211/</a><br /> by the 11th of March!</p>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6082261199073042821.post-10207272053586240212010-02-11T23:15:00.001+00:002010-02-11T23:16:13.251+00:00Entities: Proposed Recommendation<p>I'm pleased to be able to report that today the W3C has published<br />
<i>XML Entity Definitions for Characters</i><br />
as a <a href="http://www.w3.org/TR/2010/PR-xml-entity-names-20100211/">Proposed Recommendation</a>.</p><p>It's only really a list of names and numbers, but it seems to have taken up a large chunk of my life since I <a href="http://lists.w3.org/Archives/Public/www-math/1998Aug/0003.html">accidentally fell into supporting these things</a>.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-80316170326335604352010-01-21T23:31:00.003+00:002010-01-22T15:22:06.742+00:00MathML on the ClipboardI got a new machine at <a href="http://www.nag.co.uk">work</a> with Windows 7 on it.<br />
<br />
One of the more interesting applications coming with Windows 7 is the <a href="http://www.google.co.uk/search?q=math+input+panel">Math Input Panel</a>. This is designed for pen input on a tablet-style device and performs pretty impressively accurate recognition of mathematical expressions.
While designed for a tablet, it also works pretty well if you are just “writing” the expression with a finger on a small laptop trackpad, which is how I have been using it.<br />
<br />
The Math Input Panel is designed with a very simple interface with virtually no customisation options.
It offers no way of saving the expressions generated and just offers a simple insert button that tries to insert the math expression at the insertion point in a currently open application. This works well for Word 2007 which accepts MathML from the clipboard and transparently converts it to its internal form and renders it, but other more generic tools such as XML editors that could use the MathML do not accept MathML from the clipboard in this way. Unlike MathPlayer or Word, The Math Input Panel doesn't offer fallback text representations of the XML markup on the clipboard. Marko Panic, the program manager for the development of this tool confirmed to me that this was a design decision as they didn't want the end user to be faced with raw XML.
This is not unreasonable but not what I wanted personally (I like to see my XML raw:-). Marko confirmed that the MathML is on the clipboard and it should be possible to extract it with a few lines of code, or if I wanted a more extensive customisation there was documentation of the API offered by the underlying DLL
available at<br />
<a href="http://msdn.microsoft.com/en-us/library/dd317324%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/dd317324(VS.85).aspx</a><br />
and<br />
<a href="http://msdn.microsoft.com/en-us/library/dd317311%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/dd317311(VS.85).aspx</a>.<br />
<br />
I decided to brush up my C# forms programming and produced a small form that
shows any MathML on the clipboard. The main code (everything apart from the boilerplate Visual Studio files) is available on <a href="http://code.google.com/p/web-xslt/source/browse/trunk/mmlclipboard">google code</a> While it's particularly useful to see the MathML generated by the Math Input panel, it also works with other applications, notably MathPlayer and Word, that place MathML on the clipboard.<br />
<br />
While looking via Google for some programming tips on my form, I came across a very similar <a href="http://bartdesmet.net/blogs/bart/archive/2009/02/11/mathml-visualizer-in-c-on-windows-7.aspx">blog posting from last year</a>. That form had some differences though (displaying the IE folding tree view of the XML) so I completed my form here. The screenshot shows the Math Input Panel interpreting my appalling handwriting, and the mmlclipboard form displaying the generated MathML.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/_atYtnL7KtBk/S1jfgHxypFI/AAAAAAAABo0/qYAVfgnR-C8/s1600-h/clpbrd1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_atYtnL7KtBk/S1jfgHxypFI/AAAAAAAABo0/qYAVfgnR-C8/s320/clpbrd1.png" /></a><br /></div>
<br />Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-6082261199073042821.post-19446270739594943572009-12-20T23:22:00.005+00:002009-12-20T23:57:15.886+00:00XSLT for Presentation MathML in a Browser<p>Back in 2002 at the MathML Conference I presented a stylesheet, pmathml.xsl, that detected the browser being used and inserted whatever was necessary to enable MathML on that platform. The stylesheet is distributed, along with the slides from the conference presentation, from <a href="http://www.w3.org/Math/XSL/">the W3C Math/XSL</a> area.</p><p>The stylesheet is showing its age, in particular a large part of its complexity is due to the fact that that it encodes two completely separate languages in one file, XSLT, and the ‘wd-xslt’ language used in IE5. IE 5 is not an important platform these days, and for some years MathPlayer has been able to act as a MIME Filter in Internet Explorer, and so automatically insert the needed object references into the document without using an XSL stylesheet. However the XSL stylesheet mechanism still has uses, and may be adapted to other browsers. An updated version of this stylesheet has been in use for the <a href="http://www.nag.co.uk/numeric/FL/nagdoc_fl22/xhtml/FRONTMATTER/manconts.xml">NAG Library</a> documentation.</p><p>I have placed an updated version of pmathml.xsl on <a href="http://code.google.com/p/web-xslt/source/browse/trunk/pmathml">google code</a>. This loses all the wd-xsl code so requires IE6 or later, but it detects Opera and Safari and in that case inserts some extra elements to make it more likely that the documents meets the conditions of the <a href="http://www.w3.org/TR/mathml-for-css/">MathML profile for CSS</a>, and links to some CSS to render the resulting elements. The CSS is a combination of some old CSS of mine and George Chavchanidze's CSS developed as part of the MathML profile for CSS.</p><p>Unfortunately xlink links no longer work in Firefox 3, and so this version uses some javascript to give link behaviour to any element with an xlink:href attribute. Since it is doing this it also enables links for unprefixed href attributes, in anticipation of MathML3's href attribute for linking.</p><p>I hope to extend this to enhance MathML3 support, rendering the new MathML3 features as far as possible in existing browsers. The current check in is mainly to form a baseline in google code before adding any new MathML3 features.</p>Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-6082261199073042821.post-28479235839422279882009-12-18T19:34:00.006+00:002009-12-18T20:16:52.237+00:00MathML as ASCII Art<p>Normally one wants to use a full typesetting system, and access to fonts with a rich variety of symbols to typeset mathematics. But sometimes you don't.</p><p>Plain text, restricted to ASCII, still has its uses. It is possible to lay out the 2-dimensional mathematical notations as a kind of ‘ASCII-art’. Historically in the days before GUI workbook-style interfaces most Computer Algebra systems would use this kind of layout, and they can usually still be persuaded to use this style even in current versions.</p><p>I've just made available a very old stylesheet, it was I think one of the first XSLT 2 stylesheets that I wrote, which renders MathML in this style. It still does not do all of MathML3 (or 2) presentation MathML, but I intend to extend it as time permits.</p><p>The stylesheet is available on <a href="http://code.google.com/p/web-xslt/source/browse/#svn/trunk/pmathmlascii">google code</a> and some examples running against the MathML test suite are shown below.</p><p>The google code project also has the htmlparse styesheet discussed previously in this blog, and a perhaps more serious XSLT stylesheet to render MathML via TeX, again that will be extended to cover most of MathML3, as part of the MathML CR implementation phase – something to do over the Christmas break. Documentation of exactly what's in the project will be added eventually, it's only been running a day.</p><hr /><a href="http://www.w3.org/Math/testsuite/build/main/Topics/LargeOp/sum1-full.xhtml">sum1</a><br /><img src="http://www.w3.org/Math/testsuite/build/main/Topics/LargeOp/sum1.png" alt="test suite image" /><br /><pre>
infinity
----
\
) x
/ i
----
i = 0
</pre><hr /><a href="http://www.w3.org/Math/testsuite/build/main/Presentation/ScriptsAndLimits/msubsup/msubsup1-full.xhtml">msubsup1</a><br /><img src="http://www.w3.org/Math/testsuite/build/main/Presentation/ScriptsAndLimits/msubsup/msubsup1.png" alt="test suite image" /><br /><pre>
1
/ x
| e dx
/
0
</pre><hr /><a href="http://www.w3.org/Math/testsuite/build/main/Presentation/TablesAndMatrices/mtable/mtable2-full.xhtml">mtable2</a><br /><img width="70%" src="http://www.w3.org/Math/testsuite/build/main/Presentation/TablesAndMatrices/mtable/mtable2.png" alt="test suite image" /><br /><pre style="font-size: 75%">
2 2
1 x + y x + 2yx + y
2 2 3 2 2 3
x + y x + 2yx + y x + 3yx + 3y x + y
2 2 3 2 2 3 4 3 2 2 3 4
x + 2yx + y x + 3yx + 3y x + y x + 4yx + 6y x + 4y x + y
3 2 2 3 4 3 2 2 3 4 5 4 2 3 3 2 4 5
x + 3yx + 3y x + y x + 4yx + 6y x + 4y x + y x + 5yx + 10y x + 10y x + 5y x + y
</pre>
<hr />
<a href="http://www.w3.org/Math/testsuite/build/main/Presentation/GeneralLayout/mfrac/mfrac4-full.xhtml">mfrac4</a><br /><img src="http://www.w3.org/Math/testsuite/build/main/Presentation/GeneralLayout/mfrac/mfrac4.png" alt="test suite image" /><br /><pre>
_
1 + \|5
---------
2
</pre><hr />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-10186095350560595712009-12-16T17:38:00.003+00:002009-12-16T17:44:39.519+00:00MathML3 article at IBM developerWorks<p>IBM developerWorks have just published an article that I wrote on on MathML3, <a href="http://www.ibm.com/developerworks/xml/library/x-mathml3">http://www.ibm.com/developerworks/xml/library/x-mathml3</a>. I doubt that it has any information new to readers of this blog, but perhaps it may reach a new audience and spread the word about MathML3.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-24514299683596057792009-12-15T20:41:00.002+00:002009-12-15T20:46:23.099+00:00Candidate Recommendations<p>I'm pleased to be able to announce that the Candidate Recommendation drafts of MathML3 and the MathML for CSS profile are available at <a href="http://www.w3.org/TR/2009/CR-MathML3-20091215/">http://www.w3.org/TR/2009/CR-MathML3-20091215/</a> and <a href="http://www.w3.org/TR/2009/CR-mathml-for-css-20091215/">http://www.w3.org/TR/2009/CR-mathml-for-css-20091215/</a>.</p><p>It is during this Candidate Recommendation phase that implementation work needs to begin in earnest as we need to show via the test suite that all the features are implemented by two implementations.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-5539941349619745832009-12-11T13:27:00.003+00:002009-12-11T13:39:53.317+00:00Thoughts on Revising DSRL<p>A while ago now, I posted an <a href="http://dpcarlisle.blogspot.com/2008/10/dsdl-initial-thoughts.html">article on DSDL</a>. In it I commented that part 8, DSRL, had a lot of problems. The new Project Editor, Francis Cave, has recently posted the first cut at a revised draft of DSRL, and also posted some thoughts from me suggesting some more extensive revisions that could be made.</p><p>The posting can be seen in the public archives of dsdl-discuss at <a href="http://lists.dsdl.org/dsdl-discuss/2009-12/0002.html">http://lists.dsdl.org/dsdl-discuss/2009-12/0002.html</a>. dsdl-discuss is a closed list for members of SC 34/WG 1, however comments are welcome on the public list dsdl-comment 'at' dsdl.org archived at <a href="http://lists.dsdl.org/dsdl-comment/">http://lists.dsdl.org/dsdl-comment/</a>.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6082261199073042821.post-53008171635799158582009-11-17T17:57:00.002+00:002009-11-17T18:01:30.509+00:00XML Entity Definitions for Characters<p>I'm pleased to announce that the last call draft of XML Entity Definitions for Characters has been published:</p><p><a href="http://www.w3.org/TR/2009/WD-xml-entity-names-20091117/">http://www.w3.org/TR/2009/WD-xml-entity-names-20091117/</a></p><p>Comments are welcome on <a href="mailto:www-math@w3.org">www-math@w3.org</a>, please put the text<br>[last-call...<br>in the subject line, preferably like this:<br>[Entities-last-call] - summary of comment</p>Unknownnoreply@blogger.com0