w3c / mathml

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

List of units #475

Open NSoiffer opened 10 months ago

NSoiffer commented 10 months ago

MathPlayer has a long list of units it accepts. I want to record them, so here they are (mostly in the order they occur). First come the abbreviations followed by the word used for the singular case.

Note: in some cases, there are multiple abbreviations listed for a unit. For example "′/'/min" for "minutes". In some cases, such as this one, some characters are listed that look the same. In those cases, they are actually Unicode lookalikes that MathPlayer accepts.

SI Units:

Prefixes

Y, Z, E, P, T, G, M, k, h, da, d, c, m, µ, n, p, f, a, z, y yotta, zetta, exa, peta, tera, giga, mega, kilo, hecto, decka deci, centi, milli, micro, nano, pico, femto, atto, zepto, yocto

Bases

A, cd, K/K, g, m, mol, (s, ″, ", sec) amp, kelvin, gram (actually kilogram), meter, mole, second

Derived

Bq, C, °C/℃, F, Gy, H, Hz, J, kat, lm, lx, N Ω/Ω, Pa, rad, S, Sv, sr, T, V, W, Wb, rad, sr becquerel, coulomb, degree celsius, farad, gray, henry, hertz, joule, kattel, lumen, lux ohm, pascal, radian, siemens, sievert, sterradion, tesla, volt, watt, weber, radian (°?), steradian

Accepted

′/'/min, Hr/h, d, amu/u, au/AU, Da, d/dy, B, dB, °/deg, eV, ha, l/L/ℓ, ′/', arcmin/amin/am/MOA, ", Np, arcsec/asec/as, t minute, hour, day atomic mass unit, astronomical unit, dalton, day, bel, decibel, degree ($\pi/180$), electronvolt, hectare, liter, minute, arcminute, arcsecond, neper, arcsecond, tonne (1 Mg)

English Units

distance

in/″, ft/′, yd, mi, rd, li, ch, inch, foot, yard, mile, rod, link, chain,

area:

sq in, sq ft sq yd, ac, sq mi, FBM,
square inch, square foot, square yard, acre, square mile, board foot

volume:

cu in, cu ft, cu yd, bbl, pk, bu, tsp, tbl cubic inch, cubic foot, cubic yard, barrel, peck, bushel, teaspoon, tablespoon

liquid

fl dr, fl oz, gi, cp/cup, pt, qt, gal,
fluid drams, fluid ounces, gill, cup, pint, quart, gallon

weight

gr, dr, oz/℥, lb, cwt, dwt, oz t, lb t grain, dram, ounce, pound, hundredweight, pennyweight, troy ounce, troy pound

energy

hp, BTU, °F/℉ horsepower, british thermal unit, degree fahrenheit

other

mph, mpg mile per hour, mile per gallon

Other Units

time

a, wk/w, yr/y annum, week, year

distance

ltyr/ly, pc, Å/Å, fm light-year, parsec, angstrom, fermi (= 1 femtometer)

other

atm, bar, b/B, cal, Ci, grad, M, R, rpm, ℧, dyn, erg, ppm, ppb, ppt, ppq atmosphere, bar, byte, calorie, curie, gradian, roentgen, revolution per minute, mho, dyne, erg parts per million, parts per billion, parts per trillion, parts per quadrillion

Note: bytes (and probably some others) can take any of the SI prefixes


Note: units often are combined with positive and negative exponents. For example: $1 \mathrm{N} = 1 \mathrm{kg} \cdot \mathrm{m} \cdot \mathrm{s} ^{-2}$ or written using a fraction: $1 \mathrm{N} = 1\frac{ \mathrm{kg} \cdot \mathrm{m}}{ \mathrm{s} ^{2}}$.

The form using division often is spoken using "per" instead of "over".


Compass directions (N, E, W, S) are not units. They can be combined though (NW, and maybe even NNW).


pdfion commented 10 months ago

Dear Neil,

I've been prominent if at all by my absence, for which I can apologize and offer my regrets. I have been doing some reading along of the conversations and minutes though. I wish I could do more.

I hope the contact with Ilka Agricola helps too.

Today, as an ex editor, I just offer a typo and a few questions for the Units draft.

Questions

All the best,

Patrick

On Wed, Oct 11, 2023 at 7:43 PM NSoiffer @.***> wrote:

MathPlayer has a long list of units it accepts. I want to record them, so here they are (mostly in the order they occur). First come the abbreviations followed by the word used for the singular case. SI Units: Prefixes

Y, Z, E, P, T, G, M, k, h, da, d, c, m, µ, n, p, f, a, z, y yotta, zetta, exa, peta, tera, gigga, mega, kilo, hecto, decka dessa, centi, milli, mirco, nano, pico, femto, atto, zepto, yocto Bases

A, cd, K/K, g, m, mol, (s, ″, ", sec) amp, kelvin, gram, meter, mole, second Derived

Bq, C, F, Gy, H, Hz, J, kat, lm, lx, N Ω/Ω, Pa, rad, S, Sv, sr, T, V, W, Wb becquerel, coulomb, farad, gray, henry, hertz, joule, kattel, lumen, lux ohm, pascal, radian, siemens, sievert, sterradion, tesla, tvolt, watt, weber Accepted

amu/u, au/AU, Da, d/dy, dB, °C/℃, °/deg, eV, ha, Hr/h, l/L/ℓ, ′/'/min, arcmin/amin/am/MOA, Np, arcsec/asec/as, t atomic mass unit, astronomical unit, dalton, day, decibel, degree celsius, degree, electronvolt, hectare, hour, liter, minute, acrminute, neper, arcsecond, ton English Units distance

in/″, ft/′, yd, mi, rd, li, ch, inch, foot, yard, mile, rod, link, chain, area:

sq in, sq ft sq yd, ac, sq mi, FBM, square inch, square foot, square yard, acre, square mile, board foot volume:

cu in, cu ft cu yd, bbl, pk, bu, tsp, tbl cubic inch, cubic foot, cubic yard, barrel, peck, bushel, teaspoon, tablespoon liquid

fl dr, fl oz, gi, cp/cup, pt, qt, gal, fluid drams, fluid ounces, gill, cup, pint, quart, gallon weight

gr, dr, oz/℥, lb, cwt, dwt, oz t, lb t grain, dram, ounce, pound, hundredweight, pennyweight, troy ounce, troy pound energy

hp, BTU, °F/℉ horsepower, british thermal unit, degree fahrenheit other

mph, mpg mile per hour, mile per gallon Other Units time

a, wk/w, yr/y annum, week, year distance

ltyr/ly, pc, Å/Å light-year, parsec, angstrom other

bar, b/B, cal, Ci, grad, M, R, rpm, ℧ bar, byte, calorie, curie, gradian, roentgen, revolution per minute, mho

Note: bytes (and probably some others) can take any of the SI prefixes

— Reply to this email directly, view it on GitHub https://github.com/w3c/mathml/issues/475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQE32JVHA6IKM7TPNGGMADX64VL5ANCNFSM6AAAAAA54YEBTY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

NSoiffer commented 10 months ago

@pdfion: thanks for the corrections.

I think some of the "wrong" spellings were actually MathPlayer's attempt to get a speech engine to speak the word as we expect. I have corrected them above.

As for the seeming duplicates, they actually are unicode lookalikes that MathPlayer checks for and I thought might be helpful to keep. E.g., Å/Å is

U+00C5 : LATIN CAPITAL LETTER A WITH RING ABOVE
U+212B : ANGSTROM SIGN
pdfion commented 10 months ago

@nsoiffer:  thanks for the duplicates explanation I was too obtuse to note.  I suggest adding a sentence remarking on look-alike’s. Nice work getting them all assembled.  I learned a couple of new forms from that as well.PatrickSent from my iPhoneOn Oct 11, 2023, at 8:46 PM, NSoiffer @.***> wrote: @pdfion: thanks for the corrections. I think some of the "wrong" spellings were actually MathPlayer's attempt to get a speech engine to speak the word as we expect. I have corrected them above. As for the seeming duplicates, they actually are unicode lookalikes that MathPlayer checks for and I thought might be helpful to keep. E.g., Å/Å is U+00C5 : LATIN CAPITAL LETTER A WITH RING ABOVE U+212B : ANGSTROM SIGN

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Transcripteur commented 5 months ago

Hello @NSoiffer , I'm working with MathPlayer add-on in a Word document with MathType équations (and NVDA screereader). Is there a specific way to write SI unit in the MT editor (and in LaTex before convertion like \units{mm} ?) so that MathPlayer correctly handles SIUnit ? At th moment no unit is supported: k is "k" not kilo, m is m not meter. Do I enter data in the default.dic of NVDA ? I've found the file units.tdl in french where all units are listed in this way UIWord ? (ruleRef=="RR_unitsBase" && matches(this, "unicode", "rad", true)) => string{ text= match.singular ? "radian" : "radians"; }; Thank you for you help. Filippo

NSoiffer commented 5 months ago

MathPlayer is looking for a class attribute "MathML-Unit". That's a suggestion to use in a MathML Note. You obviously don't want things such as "m" or "g" always to be spoken as "meter" or "gram", so there needs to be something that says "this is a unit". Unfortunately, there isn't a good way to do this with MathType. My only suggestion (and I don't necessarily recommend it), it to:

  1. Edit MathPlayer's units-base.tdl file (it is in the parent directory of unit.tdl file you found) and change the lines (there are 3 of them) with mi ? ( exists(class) && class=="MathML-Unit &&" to be mtext ?
  2. In MathType, when you enter a unit, select it, then choose from the "Style" menu "Text". This will cause MathType to make the 'm' (etc) be an mtext rather than an mi. Hence the change above from match 'mi' to being 'mtext'. It will also be in an upright font, which is what you want.

Unless you distribute the MathPlayer change you make, it will only be useful for you.

Another option is define speech for the 'm' (etc) via "Edit: Custom Speech Text". That should work for all MathPlayer users.

I am currently working (in fits and starts) on speaking units for MathCAT. It will have more heuristics including the mtext one. It will also take advantage of the :units intent property proposal for MathML 4. That should supersede the note mentioned above.

If you are a MathType user, I recommend you contact WIRIS and suggest they add "Unit" to their Style list. Besides making the font be roman, that style should set intent=':unit' on the <mi> (not <mtext>) it generates.

Transcripteur commented 5 months ago

Very helpful. Thank you @NSoiffer ! I'll try to contact Wiris. Have a nice monday !