ITADN

Operator Rendering Rework

#84Openstefnotch 创建于 2025-04-19
S
stefnotchcommented
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 ```html <mrow class="nya"><mo stretchy="true" symmetric="true" rspace="0" lspace="0" minsize="0">|</mo></mrow> ``` with the following CSS ```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> ```
0 条评论