Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of units #475

Closed
NSoiffer opened this issue Oct 11, 2023 · 7 comments
Closed

List of units #475

NSoiffer opened this issue Oct 11, 2023 · 7 comments
Labels
intent Issues involving the proposed "intent" attr

Comments

@NSoiffer
Copy link
Contributor

NSoiffer commented Oct 11, 2023

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).
  • 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
@NSoiffer NSoiffer added the intent Issues involving the proposed "intent" attr label Oct 11, 2023
@pdfion
Copy link

pdfion commented Oct 12, 2023 via email

@NSoiffer
Copy link
Contributor Author

@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
Copy link

pdfion commented Oct 12, 2023 via email

@Transcripteur
Copy link

Transcripteur commented Mar 9, 2024

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
Copy link
Contributor Author

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
Copy link

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

@davidcarlisle
Copy link
Collaborator

This can be closed as unit property https://w3c.github.io/mathml-docs/intent-core-properties/#Units-and-currency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intent Issues involving the proposed "intent" attr
Projects
None yet
Development

No branches or pull requests

4 participants