I should use an approach like React for rendering the MathML, so that I can efficiently update it.
To render an operator without the hacks, I can insert a
<mrow class="nya"><mo stretchy="true" symmetric="true" rspace="0" lspace="0" minsize="0">|</mo></mrow>
with the following CSS
.nya {
width: 0px;
height: 0px;
margin-left:-2px;
margin-right: 2px;
box-shadow: 0 -1px 0 #000;
margin-top:-4px;
margin-bottom:-4px;
}
I have to make sure to only ever draw that where an mrow is (easy) and I have to makes sure to add the form="prefix/infix/postfix" attribute to each mo. Otherwise the automatic rendering would treat these two differently
<mrow><mo>+</mo><mn>∞</mn></mrow>
<mrow> <mrow class="nya><mo>|</mo></mrow> <mo>+</mo><mn>∞</mn></mrow>
I should use an approach like React for rendering the MathML, so that I can efficiently update it.
To render an operator without the hacks, I can insert a
with the following CSS
I have to make sure to only ever draw that where an mrow is (easy) and I have to makes sure to add the
form="prefix/infix/postfix"attribute to eachmo. Otherwise the automatic rendering would treat these two differently