w3c / mathml

MathML4 editors draft
https://w3c.github.io/mathml/
Other
63 stars 19 forks source link

mixed-fractions in core #484

Closed polx closed 6 months ago

polx commented 10 months ago

We should remember to include mixed-fractions (such as three and a half pounds) as it is a very common way of speaking numbers out.

polx commented 10 months ago

It occured to me that this is a very good example of discrepancy between:

dginev commented 10 months ago

Wikipedia calls these mixed-numeral as well as mixed-fraction or mixed-number (so we have aliases to pick 1 from).

I think a wrapping <mrow> and 2-arguments should do the trick:

<mrow intent="mixed-fraction($int,$frac)">
  <mn arg="int">2</mn>
  <!-- (optional?) invisible plus -->
  <mo>&#x2064;</mo>
  <mfrac arg="frac" intent="fraction(3,16)">
   <mn>3</mn>
   <mn>16</mn>
  </mfrac>
</mrow>

Btw, I may be looking at the wrong core list URL, but I don't think fraction has been added yet either.

davidcarlisle commented 10 months ago

@dginev's mixed-fraction markup looks good to me (I think mixed-fraction is best as the main name, as while for example I'd probably know what "mixed number" meant if used in context, out of context I probably would not guess it refered to this, but "mixed fraction" is I think less ambigous.

NSoiffer commented 10 months ago

I've seen all those aliases used, but mostly I've seen "mixed-fraction". The fractional part can be an mfrac (normal or beveled) or it can be linear fraction using /. All the braille notations I've implemented have special cases for them.

I'll add these and "fraction" (good catch Deyan) to the list.

davidcarlisle commented 6 months ago

mixed-fraction has been added, resolved to close 2024-05-16 meeting