Hi, The spec reads > The default rendering of a semantics element is the default rendering of its first child. (http://www.w3.org/Math/draft-spec/chapter5.html#mixing.semantic.elements) I'd take this to mean that (by default) the first child is rendered as if it stood alone. But that seems problematic in an HTML5 context. On the one hand, Firefox won't render the following mtable construction at full width <math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <semantics> <mtable width="100%" mathbackground="red"> <mtr> <mtd><mi>x</mi></mtd> </mtr> </mtable> <annotation encoding="application/x-tex">x</annotation> </semantics> </math> On the other hand, I would expect (in HTML5) that styling the semantics element (while poor practice) would affect the first child (and in fact it does in Firefox). So I'm wondering how to reconcile these two points of view (and what else I might be missing here). Best wishes, Peter.

On 14/01/2015 09:19, Peter Krautzberger wrote: > Hi, > > The spec reads > > > The default rendering of a semantics element is the default rendering > of its first child. > > (http://www.w3.org/Math/draft-spec/chapter5.html#mixing.semantic.elements) > > I'd take this to mean that (by default) the first child is rendered as > if it stood alone. That was the intention. I don't think that means that it should not be affected by a css rule matching children of semantics. As far as the mathml spec is concerned the "default" rendering is the intrinsic rendering not considering css. The fact that wrapping an element in semantics can change the css matching is no different from the fact that wrapping in an mrow can change the css matching even though there again the spec says that the MathML behaviour of <mrow><mi>x</mi></mrow> is the same as that of <mi>x</mi> they admit different css, or xpath, or JavaScript selections so in there are observable differences that are out of scope of the MathML spec. As noted elsewhere (somewhere:-) it would be a good idea to have a Note that detailed all such interpretations and clarifications of mathNML for a browser environment. > But that seems problematic in an HTML5 context. > > On the one hand, Firefox won't render the following mtable construction > at full width > > <math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> > <semantics> > <mtable width="100%" mathbackground="red"> > <mtr> <mtd><mi>x</mi></mtd> </mtr> > </mtable> > <annotation encoding="application/x-tex">x</annotation> > </semantics> > </math> That seems to be wrong. > > On the other hand, I would expect (in HTML5) that styling the semantics > element (while poor practice) would affect the first child (and in fact > it does in Firefox). As Noted above I think that's OK. > > So I'm wondering how to reconcile these two points of view (and what > else I might be missing here). > > Best wishes, > Peter. > David (speaking personally)

Hi David, > The fact that wrapping an element in semantics can change the > css matching is no different from the fact that wrapping in an > mrow can change the css matching even though there again the > spec says that the MathML behaviour of <mrow><mi>x</mi></mrow> > is the same as that of <mi>x</mi> they admit different css, or > xpath, or JavaScript selections so in there are observable differences > that are out of scope of the MathML spec. Thanks, that's much clearer than my rambling email. > As noted elsewhere (somewhere:-) it would be a good idea to > have a Note that detailed all such interpretations and clarifications > of mathNML for a browser environment. Yes. Can we add this to the WG tracker? > That seems to be wrong. I would agree but wanted to be sure. Best, Peter. On Wed, Jan 14, 2015 at 10:41 AM, David Carlisle <davidc@nag.co.uk> wrote: > On 14/01/2015 09:19, Peter Krautzberger wrote: > >> Hi, >> >> The spec reads >> >> > The default rendering of a semantics element is the default rendering >> of its first child. >> >> (http://www.w3.org/Math/draft-spec/chapter5.html#mixing.semantic.elements >> ) >> >> I'd take this to mean that (by default) the first child is rendered as >> if it stood alone. >> > > That was the intention. I don't think that means that it should not be > affected by a css rule matching children of semantics. As far as the mathml > spec is concerned the "default" rendering is the intrinsic rendering not > considering css. The fact that wrapping an element > in semantics can change the css matching is no different from the fact > that wrapping in an mrow can change the css matching even though there > again the spec says that the MathML behaviour of <mrow><mi>x</mi></mrow> > is the same as that of <mi>x</mi> they admit different css, or xpath, or > JavaScript selections so in there are observable differences that are > out of scope of the MathML spec. > > As noted elsewhere (somewhere:-) it would be a good idea to have a Note > that detailed all such interpretations and clarifications of mathNML for a > browser environment. > > But that seems problematic in an HTML5 context. >> >> On the one hand, Firefox won't render the following mtable construction >> at full width >> >> <math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> >> <semantics> >> <mtable width="100%" mathbackground="red"> >> <mtr> <mtd><mi>x</mi></mtd> </mtr> >> </mtable> >> <annotation encoding="application/x-tex">x</annotation> >> </semantics> >> </math> >> > > That seems to be wrong. > > >> On the other hand, I would expect (in HTML5) that styling the semantics >> element (while poor practice) would affect the first child (and in fact >> it does in Firefox). >> > > As Noted above I think that's OK. > >> >> So I'm wondering how to reconcile these two points of view (and what >> else I might be missing here). >> >> Best wishes, >> Peter. >> >> > David > (speaking personally) > > > >

> We could add it to the tracker, even better we could actually do it:-) I was hoping the former would help ensure the latter but yes, let's get started. Where/how should we set it up? (I'd like to finish my other items before getting into a new one though.) Peter. On Wed, Jan 14, 2015 at 12:50 PM, David Carlisle <davidc@nag.co.uk> wrote: > On 14/01/2015 11:41, Peter Krautzberger wrote: > >> Yes. Can we add this to the WG tracker? >> > > We could add it to the tracker, even better we could actually do it:-) > > David > >

The XSL file from Dr. Carlisle seems to be doing some advanced LaTeX. Using this XSL, how can I get, for example, the output in the following form (quadratic formula) \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} of the input shown below: Input:<math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mfrac> <mrow> <mo>−</mo> <mi>b</mi> <mo>±</mo> <msqrt> <mrow> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>−</mo> <mn>4</mn> <mi>a</mi> <mi>c</mi> </mrow> </msqrt> </mrow> <mrow> <mn>2</mn> <mi>a</mi> </mrow> </mfrac> </mrow> </math> What I am getting now is the following output: \[\let\par\empty { {\frac{{ \unicode{8722} b \unicode{177} \sqrt{ { {\msup{b}{{2}}} \unicode{8722} {4} a c } } }}{{ {2} a }}} } \] Thank..Saf On Tuesday, December 30, 2014 7:59 PM, saf sied <saf_itpro@yahoo.com> wrote: I am using a stylesheet from Dr. Carlisle mentioned here: http://tex.stackexchange.com/questions/85639/i-want-to-convert-mathml-to-latex When I use the Saxon-HE 9.6, both the Java and .NET version of the Saxon give me the following output for the xml file shown below. The output does not look right - is it because of the version of Saxon I am using? Has anyone used Saxon-HE on the stylesheet mentioned above and got the correct LaTeX? Is there anything else I may be missing? I've latest versions of Java and .NET installed on my windows 8.1 machine. Output:\[\let\par\empty {\msup{a}{{2}}} \] Source:<?xml version="1.0"?> <math xmlns="http://www.w3.org/1998/Math/MathML"> <msup> <mi>a</mi> <mn>2</mn> </msup> </math>

On 01/01/2015 19:59, saf sied wrote: > Using this XSL, how can I get, for example, That XSL is designed to produce the form using the macros in the provided latex package. It would require substantial rewrites to do otherwise, but why do you need that?, so long as the macros in the output are defined by loading the .sty file, latex will typeset the result. David

<<so long as the macros in the output are defined by loading the .sty file, latex will typeset the result>> How can I load the .sty files in the MikTeX that I've installed on my windows 8.1 machine. I tired by just copying the csscolor.sty and pmml-new,sty files on the ...\TeX\LaTeX subdirectory of MikTeX installation folder. But when I tried to typeset the following LaTeX using MikTeX, I get the error shown below. Thanks..Saf: LaTeX: \documentclass[10pt]{article} \setlength{\textwidth}{12.0cm} \usepackage{amssymb} \begin{document}\[\let\par\empty { {\frac{{ \unicode{8722} b \unicode{177} \sqrt{ { {\msup{b}{{2}}} \unicode{8722} {4} a c } } }}{{ {2} a }}} } \] \end{document} Error from MikTeX: ! Undefined control sequence. <argument> { \unicode {8722} b \unicode {177} \sqrt { { {\msup {b}{{2}}} \un... l.24 }} } ? On Thursday, January 1, 2015 2:59 PM, saf sied <saf_itpro@yahoo.com> wrote: The XSL file from Dr. Carlisle seems to be doing some advanced LaTeX. Using this XSL, how can I get, for example, the output in the following form (quadratic formula) \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} of the input shown below: Input:<math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mfrac> <mrow> <mo>−</mo> <mi>b</mi> <mo>±</mo> <msqrt> <mrow> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>−</mo> <mn>4</mn> <mi>a</mi> <mi>c</mi> </mrow> </msqrt> </mrow> <mrow> <mn>2</mn> <mi>a</mi> </mrow> </mfrac> </mrow> </math> What I am getting now is the following output: \[\let\par\empty { {\frac{{ \unicode{8722} b \unicode{177} \sqrt{ { {\msup{b}{{2}}} \unicode{8722} {4} a c } } }}{{ {2} a }}} } \] Thank..Saf On Tuesday, December 30, 2014 7:59 PM, saf sied <saf_itpro@yahoo.com> wrote: I am using a stylesheet from Dr. Carlisle mentioned here: http://tex.stackexchange.com/questions/85639/i-want-to-convert-mathml-to-latex When I use the Saxon-HE 9.6, both the Java and .NET version of the Saxon give me the following output for the xml file shown below. The output does not look right - is it because of the version of Saxon I am using? Has anyone used Saxon-HE on the stylesheet mentioned above and got the correct LaTeX? Is there anything else I may be missing? I've latest versions of Java and .NET installed on my windows 8.1 machine. Output:\[\let\par\empty {\msup{a}{{2}}} \] Source:<?xml version="1.0"?> <math xmlns="http://www.w3.org/1998/Math/MathML"> <msup> <mi>a</mi> <mn>2</mn> </msup> </math>

saf sied <saf_itpro@yahoo.com> writes: > . . . > LaTeX: > > \documentclass[10pt]{article} > \setlength{\textwidth}{12.0cm} > \usepackage{amssymb} > \begin{document} > . . . Place pmml-new.sty in the directory with the LaTeX file, and add the line "\usepackage{pmml-new}" before "\begin{document}" Also in pmml-new.sty add a line: \@namedef{uc177}{\pm} -- Bill

Many thanks to William Hammond and David for their assistance. Following Mr. Hammond's instructions I was able to correctly typeset LaTeX. I also tried the following LaTeX (generated by David's XSL) and it produced nice looking Cauchy's Integral Formula. -Saf: \[\let\par\empty { f {\left. \middle( a \middle) \right.} = {\frac{{1}}{{ {2} \unicode{960} i }}} {{\unicode{8750}}\sb{{ \unicode{947} }}} {\frac{{\left. f \middle( z \middle) \right.}}{{ z \unicode{8722} a }}} d z } \] On Monday, January 5, 2015 11:29 PM, William F Hammond <hammond@csc.albany.edu> wrote: saf sied <saf_itpro@yahoo.com> writes: > . . . > LaTeX: > > \documentclass[10pt]{article} > \setlength{\textwidth}{12.0cm} > \usepackage{amssymb} > \begin{document} > . . . Place pmml-new.sty in the directory with the LaTeX file, and add the line "\usepackage{pmml-new}" before "\begin{document}" Also in pmml-new.sty add a line: \@namedef{uc177}{\pm} -- Bill