b***@yahoo.com
2005-01-21 15:40:44 UTC
Hi,
I hope that someone can help me with the following MathML problem. When
I markup product terms like "xy", I normally use something like:
<mrow>
<mi>x</mi>
<mo>⁢</mo>
<mi>y</mi>
</mrow>
However, when this is displayed, there is whitespace between the "x"
and the "y" which doesn't look quite right. Quite by accident, I
discovered that if I replace <mrow> with <mfenced>, the extra
whitespace disappears and all is well:
<mfenced open="" close="" separators="">
<mi>x</mi>
<mo>⁢</mo>
<mi>y</mi>
</mfenced>
See the attached files for an example of this. Open qq_4.xul in
Mozilla. The first equation uses <mrow>, the second uses <mfenced>.
Is this a bug in the implementation of MathML? I was under the
impression that the lspace and rspace attributes were automatically set
at the appropriate values using the operator dictionary, etc. Is the
<mrow> specification above the correct was of specifying product terms?
Any help would be appreciated!
Brendan
=======================================================================
qq_4.xul
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="paperviewer.css"?>
<?xml-stylesheet type="text/css" href="math.css"?>
<?xml-stylesheet type="text/css" href="resource://gre/res/mathml.css"?>
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:math="http://www.w3.org/1998/Math/MathML">
<script src="chrome://global/content/dialogOverlay.js"
type="application/x-javascript"/>
<vbox class="vbox-micro">
<description class="d-micro">
<math display="block" class="micro"
xmlns="http://www.w3.org/1998/Math/MathML">
<mtable>
<mtr>
<mtd class="lhs">
<mi>x</mi>
<mo>=</mo>
<mrow>
<mn>4</mn>
<mo></mo>
<mi>a</mi>
<mo></mo>
<mi>c</mi>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd class="lhs">
<mi>x</mi>
<mo>=</mo>
<mfenced open="" close="" separators="">
<mn>4</mn>
<mo></mo>
<mi>a</mi>
<mo></mo>
<mi>c</mi>
</mfenced>
</mtd>
</mtr>
</mtable>
</math>
</description>
</vbox>
</window>
=======================================================================
paperviewer.css
=======================================================================
window {background-color : gainsboro; font-size : 12pt; font-family :
"Times New Roman"; color : black; -moz-box-orient : vertical; }
.vbox-micro {
border-width : 1px;
border-style : outset;
border-color : brown;
padding : 2px;
margin : 2px;
background-color : white;
-moz-border-radius : 8px;
overflow : auto;
-moz-box-flex : 1;
}
=======================================================================
math.css
=======================================================================
math { font-family : "Times New Roman";}
math[display="block"][class="micro"] {
border : 1px ;
border-style : outset ;
border-color : transparent ;
-moz-border-radius : 8px ;
background-color : whitesmoke ;
margin-left : 0px ;
margin-right : 0px ;
margin-top : 5px ;
margin-bottom : 5px ;
color : blue ;
padding : 2px ;
}
math[display="block"][class="micro"]:hover {
border-color : darkblue; background-color : ivory;
}
mtd[class="lhs"] {text-align : right;}
mtd[class="rhs"] {text-align : left;}
I hope that someone can help me with the following MathML problem. When
I markup product terms like "xy", I normally use something like:
<mrow>
<mi>x</mi>
<mo>⁢</mo>
<mi>y</mi>
</mrow>
However, when this is displayed, there is whitespace between the "x"
and the "y" which doesn't look quite right. Quite by accident, I
discovered that if I replace <mrow> with <mfenced>, the extra
whitespace disappears and all is well:
<mfenced open="" close="" separators="">
<mi>x</mi>
<mo>⁢</mo>
<mi>y</mi>
</mfenced>
See the attached files for an example of this. Open qq_4.xul in
Mozilla. The first equation uses <mrow>, the second uses <mfenced>.
Is this a bug in the implementation of MathML? I was under the
impression that the lspace and rspace attributes were automatically set
at the appropriate values using the operator dictionary, etc. Is the
<mrow> specification above the correct was of specifying product terms?
Any help would be appreciated!
Brendan
=======================================================================
qq_4.xul
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="paperviewer.css"?>
<?xml-stylesheet type="text/css" href="math.css"?>
<?xml-stylesheet type="text/css" href="resource://gre/res/mathml.css"?>
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:math="http://www.w3.org/1998/Math/MathML">
<script src="chrome://global/content/dialogOverlay.js"
type="application/x-javascript"/>
<vbox class="vbox-micro">
<description class="d-micro">
<math display="block" class="micro"
xmlns="http://www.w3.org/1998/Math/MathML">
<mtable>
<mtr>
<mtd class="lhs">
<mi>x</mi>
<mo>=</mo>
<mrow>
<mn>4</mn>
<mo></mo>
<mi>a</mi>
<mo></mo>
<mi>c</mi>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd class="lhs">
<mi>x</mi>
<mo>=</mo>
<mfenced open="" close="" separators="">
<mn>4</mn>
<mo></mo>
<mi>a</mi>
<mo></mo>
<mi>c</mi>
</mfenced>
</mtd>
</mtr>
</mtable>
</math>
</description>
</vbox>
</window>
=======================================================================
paperviewer.css
=======================================================================
window {background-color : gainsboro; font-size : 12pt; font-family :
"Times New Roman"; color : black; -moz-box-orient : vertical; }
.vbox-micro {
border-width : 1px;
border-style : outset;
border-color : brown;
padding : 2px;
margin : 2px;
background-color : white;
-moz-border-radius : 8px;
overflow : auto;
-moz-box-flex : 1;
}
=======================================================================
math.css
=======================================================================
math { font-family : "Times New Roman";}
math[display="block"][class="micro"] {
border : 1px ;
border-style : outset ;
border-color : transparent ;
-moz-border-radius : 8px ;
background-color : whitesmoke ;
margin-left : 0px ;
margin-right : 0px ;
margin-top : 5px ;
margin-bottom : 5px ;
color : blue ;
padding : 2px ;
}
math[display="block"][class="micro"]:hover {
border-color : darkblue; background-color : ivory;
}
mtd[class="lhs"] {text-align : right;}
mtd[class="rhs"] {text-align : left;}