- From: Neil Soiffer <soiffer@alum.mit.edu>
- Date: Tue, 12 Nov 2024 00:30:59 -0800
- To: Deyan Ginev <deyan.ginev@gmail.com>
- Cc: "www-math@w3.org" <www-math@w3.org>
- Message-ID: <CAESRWkDW9w-64rjrbSneE1B434XSNFxVcmCz9OqdrDCtZvFajg@mail.gmail.com>
Deyan, Thanks for the wikitonary.org link. That makes me feel a little more confident about making not just the base SI units accept prefixes, but also the derived units except for "sr" (sterradion). It also gives me some confidence to rule out the accepted units with the exception of liter, which can be "l", "L", or "ℓ" (the later is not listed on that page). Unfortunately, it doesn't give me a lot of confidence to rule out all the accepted units. For example "kiloton" and "megaton" seem to be used, and they aren't listed (although many sites that mention them don't use "kt"/"mt", but a few do). If I allow prefixes on tonnes (abbrev "t"), then femtotonnes is a problem because its abbreviation is "ft". So maybe I only allow a few prefixes on some units? The code gets uglier and longer... I'm very skeptical of "khrs": it is the only version of 'hour" with a prefix and it is the only example that I saw that adds an "s". Also it seems extremely rarely used: the next reference to it in a google search is in a 1989 science fiction book and it isn't clear they use "khrs". Your link to wikitonary made me wonder if there are other pieces of software that have to deal with abbreviations. There is the TeX units package (siunitx). It allows a surprisingly small number of abbreviations (3 pages): 8 versions of metre, 7 versions of seconds, 3 versions of ohms, etc. I'm sure they were chosen because the other uses are relatively rare and you can always fall back to the full name (e.g., \femto\metre). Another package I found is "unitwise": a conversion library with a YAML page <https://github.com/joshwlewis/unitwise/blob/master/data/derived_unit.yaml> defining the accepted units. It seems quite extensive. For example, it has the CGS unit "Oe" (magnetic flux density) and "tropical year" (a_t). I can't tell whether prefixes are allowed on anything besides base units. However, they reference The Unified Code for Units of Measure <https://unitsofmeasure.org/ucum>. It is a big document, so I haven't read it all. However, I saw it mention that prefixes only apply to "metric" units and that a unit "must be a quantity on a ratio scale in order to be metric". Their list of accepted units (they call "other units" and it is longer than the list we have (it includes the tropical year and other "year" related quantities). However, so far I haven't seen whether they accept prefixes or not. They point out some name conflicts. The reason why I suggest this discussion go into the issue is that, despite the abbreviations no longer being under discussion by the WG, the list serves as a good reference for implementers and will serve as a good source if someone ever writes up a document that gives more details of what *should* be understood by AT when dealing with :unit. I will copy this discussion there when it seems like it has petered out. Neil On Mon, Nov 11, 2024 at 2:47 AM Deyan Ginev <deyan.ginev@gmail.com> wrote: > Hi Neil, all, > > kilo-hours is indeed a sensible unit and has the symbol "khrs". > > I see 32 examples of SI Unit symbols with leading "k" in wiktionary, here: > > https://en.m.wiktionary.org/w/index.php?title=Category:Symbols_for_SI_units&pagefrom=HG%0Ahg#mw-pages > > I suspect there is no "kh" in SI, but "kH" is a "kilohenry" and "kHz" is a > "kilohertz". > > As one idea: > If one anticipates parsing collisions, a system could support the most > common unit symbols activating via the ":unit" Intent property, > but require an explicit :si add-on property to 'intent=":si:unit"', to > activate the full range of SI possibilities (and safely ignore non-SI > conflicts). > > Another idea would be to require rare/unsupported SI units to carry an > explicit intent concept, as with intent="kilohour:unit". > > Lastly, I suspect this kind of discussion would be better redirected into > an open MathCAT issue, rather than a closed w3c/mathml issue. > > Greetings, > Deyan > > > On Mon, Nov 11, 2024 at 3:31 AM Neil Soiffer <soiffer@alum.mit.edu> wrote: > >> I've started work on making MathCAT handle ":units" and wonder how many >> of the "accepted" units (and others?) should or should not take SI prefixes >> (kilo, penta, ...). The units that we came up with are listed in issue >> #475 <https://github.com/w3c/mathml/issues/475>. >> >> For example, does "kh" for "kilo-hour" make any sense? "kt" for >> "kilo-tonne"? "kl" for "kilo-liter" does make sense though ("liter", or for >> the British "litre", is not a base unit, it is an accepted unit). >> >> Make sure to look at the "other" category at the bottom. Some of them >> such as bytes and calories take a prefix. >> >> Thanks for any guidance you can provide. For posterity, adding your >> thoughts to the issue would be best, but feel free to reply to this email >> if that is much easier for you. >> >> Neil >> >>
Received on Tuesday, 12 November 2024 08:31:16 UTC