fontsize in mathml fractions

2 messages
Open this post in threaded view
|

fontsize in mathml fractions

 Good Afternoon; I am new to MathML and this is my first encounter with this list. When I create rational expressions with MathML I do not want the fontsize to decrease.  It does not in any textbook so should not on my webpages. I have stumbled across a means (using ) of creating simple fractions with the fontsize of both numerator and denominator the same as any other character in the document. However, when I create complex rational expressions I have not found a means of maintaining the proper fontsize. The easiest example I can give is this page -- filled with complex rational expressions. http://www.drdelmath.com/examples/mathjax_examples_rational_expression_complex_simplifying.htmCan anyone tell me how to fix the problem or point me to a good resource. Del _______________________________________________ dev-tech-mathml mailing list [hidden email] https://lists.mozilla.org/listinfo/dev-tech-mathml
Open this post in threaded view
|

Re: fontsize in mathml fractions

 Hi Del, Per the spec, http://www.w3.org/Math/draft-spec/chapter3.html#presm.mfrac"The mfrac element sets displaystyle to "false", or if it was already false increments scriptlevel by 1" So you can indeed force the displaystyle to "true" to prevent the scriptlevel incrementation, but you must do that for each mfrac. (if you do that only for the outermost mfrac, then the displaystyle will still be reset to false in the mfrac descendants and so the scriptlevel will be incremented in them):

$3 4 6 7$

Note that forcing displaystyle="true" has other implications. If you only want to reset the scriptlevel, you can instead use the scriptlevel attribute:

$3 4 6 7$

It's a been painful to have to use all these elements. Gecko has CSS properties for scriptlevel and displaystyle but unfortunately they are only used internally and not exposed to Web authors... Hence you can not use a CSS selector to set everything in one go. However, you can at least use the font-size property if you know the font size of your paragraph, for example:

$1 2 3 4 6 7$

Of course, this will only work with CSS-compatible MathML renderers such as the native implementations in Gecko or WebKit... Hope that helps, Le 21/02/2015 20:29, Del Wegener a écrit : > Good Afternoon; > > I am new to MathML and this is my first encounter with this list. > > When I create rational expressions with MathML I do not want the > fontsize to decrease.  It does not in any textbook so should not on my > webpages. > I have stumbled across a means (using ) of > creating simple fractions with the fontsize of both numerator and > denominator the same as any other character in the document. > > However, when I create complex rational expressions I have not found a > means of maintaining the proper fontsize. > > The easiest example I can give is this page -- filled with complex > rational expressions. > http://www.drdelmath.com/examples/mathjax_examples_rational_expression_complex_simplifying.htm> > > Can anyone tell me how to fix the problem or point me to a good resource. > > Del > -- Frédéric Wang maths-informatique-jeux.com/blog/frederic _______________________________________________ dev-tech-mathml mailing list [hidden email] https://lists.mozilla.org/listinfo/dev-tech-mathml