Davide ,
Thanks for your replies. I'll experiment and report back later. (I've
also been experimenting with using mfrac (as that allows a line
thickness directly in mathml, using mpadded/mphantom you can put one
in each of the "spanned" columns such that they overhang and touch
each other, but again the vertical spacing is rather large.
I have a more immediate problem that my mstack processing is wrong. It
gets confused with the nested position & shift possibilities (as can
be seen in the longdiv example in the spec, which shifts some rows by
an extra slot when they should be under the row above) I think I know
how to fix that then I'll come back to mathjax. I'm sure one of the
methods here will make something legible, which would be good. As that
would mean I think that all content and presentation examples in the
spec would have an acceptable rendering except for the malign example.
malignmark is just hard to "fake" so as is traditional that is being
left till last:-)
>
>
> It is not easy to get what you ask, but I present you with two
> possibilities. The first doesn't use a table at all, which will get the
> baseline correct for in-line math:
>
> <math xmlns="
http://www.w3.org/1998/Math/MathML">
> <mn>0.142857</mn>
> <mpadded width="0" height=".925em" voffset=".85em" lspace="-1width">
> <mpadded background="black" height=".075em">
> <mphantom><mn>142857</mn></mphantom>
> </mpadded>
> </mpadded>
> </math>
>
> This presents the number as is, and then "backspaces" the horizontal bar
> over top. The phantom gets an element with the proper width, then the inner
> mpadded make a black line of that width and height .075em.
ooooh that looks fun. As I mentioned above, the only thing I could
think of in pure mathml to get a specified thickness was the fraction
bar, but this looks interesting:-)
> The outer
> mpadded moves that line over top of the preceding decimals, while taking up
> no horizontal space itself, but extending the vertical space to include the
> overbar.
> A terrible hack,
You're speaking to someone with a lifetime of writing TeX macros
behind him, "hack" is a term of endearment:-)
>ntom>
> </mpadded>
> </mpadded>
> </mtd>
> </mtr>
> <mtr>
> <mtd><mn>0</mn></mtd><mtd><mn>.</mn></mtd><mtd><mn>1</mn></mtd><mtd><mn>4</mn></mtd><mtd><mn>2</mn></mtd><mtd><mn>8</mn></mtd><mtd><mn>5</mn></mtd><mtd><mn>7</mn></mtd>
> </mtr>
> </mtable>
> </math>
>
> This will be visually OK, but takes up a lot more vertical space than
> needed, since the upper row still has the height of a row.
Yes that was the problem I had using mfrac as well.
>
> It seems the content of the style doesn't survive mathjax processing.
>
>
> Actually it does, but the problem is that the cell is zero width since it
> has no content, and so the border doesn't show up.
Oh maybe I just missed it, I was looking around the tree in firebug
and/or chrome's inspector and thought it wasn't there, although I
found an element with the original class.
As you say that isn't the width of the column, just the natural width
of the entry. I thought at one point I'd been clever and discovered
that the grandparent of that element was a positioned element
containing the column-so-far and had the right width so I gave that a
bottom border. It worked in one browser but you generated a different
element structure in a different browser, and anyway I don't really
want to be poking that far into mathjax internals, not in the spec,
anyway:-) Then I got sidetracked into generating (or not) the right
code from msgroup shifts before worrying whether mathjax can render
it....
> MathJax doesn't really
> have an element that correctly corresponds to the full-size mtd that you
> have in mind. This is another deficiency in the MathJax table model that
> needs work. (It was a real bear to implement the MathML mtable layout in
> HTML with its various column width options and still be able to allow
> percentage widths to work dynamically as the page size changes. I'm afraid
> there is still some work to be done.)
Not complaining, and yes I can guess:-)
>
> See if the examples I gave you above will work for you. If not I may be
> able to come up with something else.
>
> Davide
>
Thanks for the thoughts,
David