List of units
NSoiffer opened this issue · 9 comments
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 (
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:
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).
- Updated with @pdfion's corrections and suggestions
- Updated with 3/28/24 meeting comments
- Updated with dyne and erg from CGS based on 18/4/24 meeting
@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
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
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:
- 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 bemtext ?
- 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 anmi
. 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.
Very helpful. Thank you @NSoiffer ! I'll try to contact Wiris. Have a nice monday !
This can be closed as unit property https://w3c.github.io/mathml-docs/intent-core-properties/#Units-and-currency