-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migrate units to UnitsML #83
Conversation
in Ampere definition document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, and I am impressed with how proactive you have been. Seeing this, I am going to have to make two changes to unitsml, before I process this, and you need to make three.
- The gem currently uses a middle dot to indicate multiplication of units. I am going to have to make it configurable, since in the brochure, it is space instead.
- I am going to have to introduce processing of unit division as well as unit multiplication.
From your side:
- All instances of "unitsml(...)" need to be in quotes: they are only recognised when they are text in MathML. (Each instance of unitsml() needs to be in its own pair of quotes, and the quotes need not to contain anything else.) So,
stem:["unitsml(V)"]
, `stem:["unitsml(C)" = "unitsml(F*V)"] - You no longer need to insert a space between the "unitsml(...)" and any preceding number: that will be done automatically by the gem. So,
stem:[ii(R)_{"K-90"} = 25812.807 "unitsml(Ohm)"]
- Please embed division of units within unitsml brackets:
stem:["unitsml(W)" = "unitsml(V^2//Ohm)"]
Is this for simplicity of parsing? It seems unnecessary for the author... |
I also pushed the changes for the other documents (except from the ones from rec-values directory) to this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to do this Nermina, but in fact we do not want or need the " " between a number and "unitsml()": that space is automatically inserted into the MathML by the new gem. So
2e // h = 483597.848416984 " ""unitsml(GHz//V)"
changes to
2e // h = 483597.848416984 "unitsml(GHz//V)"
I'm going to trial the ampere document and then the brochure out now
The text is being processed as literal text rather than Asciimath, so I am expecting |
The multiplier in the UnitsML expressions is mandatory: "unitsml(F V)" instead of "unitsml(F*V)" will raise an error. |
Parentheses are also unexpected by the parser, such as "Ohm^(-1)", but again, I can add them as ignorables to the parser. |
°C needs to be Ditto Ohm as Ω. |
We should update unitsDB for these Unicode symbols. |
Yes, I just wanted to wait, because you haven't updated that yaml file yet |
@opoudjis Having automatic spacing before the unit, how should we treat metric prefixes? Maybe it would be fine to write something like |
@opoudjis any further updates needed here or is it good to be merged? |
I am very likely to require extensive changes to the markup in light of the the new unitsdb, so hold off |
In accordance to #89 (comment).
No description provided.