DMOJ / docs

Documentation for setting up and using the DMOJ judge.
https://docs.dmoj.ca
26 stars 87 forks source link

Use MathML for math #142

Closed int-y1 closed 1 year ago

int-y1 commented 1 year ago

Docsify uses Marked as its Markdown renderer. Apparently, MathML is rendered properly.

<math><msup><mn>10</mn><mrow><mo>-</mo><mi>precision</mi></mrow></msup></math>
<math><mi>X</mi></math>
<math><mfrac><mi>X</mi><mi>Y</mi></mfrac></math>
<math><mo>[</mo><mi>lo</mi><mo>,</mo><mi>hi</mi><mo>]</mo></math>
<math><mo>&lfloor;</mo><mfrac><mn>23</mn><mn>5</mn></mfrac><mo>&rfloor;</mo><mo>=</mo><mn>4</mn></math>
<math><mn>50</mn><mo>+</mo><mn>4</mn><mo>=</mo><mn>54</mn></math>
<math><mfrac><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mo>+</mo><mn>0</mn></mrow><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mo>+</mo><mn>7</mn></mrow></mfrac><mo>&times;</mo><mn>100</mn><mo>=</mo><mn>30</mn></math>

Browsers that don't have MathML will display everything on one line, so msup and mfrac will look confusing.