Comments (2)
Suggesting something even simpler, e.g.
g = 9.81.m/s^2
Noting that dot directly following a number has no useful meaning (prints currently simply as a dot). Using some character other than dot could be safer, if it needs to be a strictly nonbreaking change. Either way, quotes at both ends of the unit are still quite ugly.
Units formatting also should add a narrow non-breaking space between the number and its unit where I believe \,
is normally used in LaTeX for this.
Sometimes units need to be printed without a number so that is also a concern. Technically the dot prefix could also work for this:
[a] = .m/s^2
One concern is when to break out of unit mode, and in that regard the surrounding quotes are simpler. Otherwise spaces, parenthesis and division could either be part of the unit expression or a continuation of the equation (after which letters should appear as variables again).
from asciimathml.
There is an old note from 2003 on how to use units in MathML https://www.w3.org/TR/mathml-units/ with a short segment on presentation MathML.
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle>
<mn>42</mn>
<mo rspace="thickmathspace">⁢</mo>
<mi mathvariant="normal" class="MathML-Unit">N</mi>
<mo>=</mo>
<mn>42</mn>
<mo rspace="thickmathspace">⁢</mo>
<mi mathvariant="normal" class="MathML-Unit">kg</mi>
<mo>·</mo>
<mfrac>
<mi mathvariant="normal" class="MathML-Unit">m</mi>
<msup>
<mi mathvariant="normal" class="MathML-Unit">s</mi>
<mn>2</mn>
</msup>
</mfrac>
</mstyle>
</math>
One could maybe write the si units in full
42*newton = 42*kilogram*metre/second^2
a bit similar to https://ctan.org/pkg/siunitx?
from asciimathml.
Related Issues (20)
- Inconsistent whitespace sensitivity with numbers HOT 3
- Test environment 'collapses' multiple kinds of whitespace into one HOT 1
- Support more geometry symbols HOT 1
- Vec() crashes updater HOT 1
- An exception occurs when using parseMath!The attribute "mathvariant" is incorrect! HOT 1
- TextMate grammar
- Add ≢ HOT 2
- Support for \mathscr.
- Formal grammar is incomplete
- Add support for ⊈
- support for mathjax 3 HOT 1
- Make comma `,` escapable without making it a text `","` HOT 2
- Please add `∼` (tilde operator) and `≁` (not tilde) HOT 2
- Thousands separator not documented HOT 2
- AsciiMath render intermittently not triggering in dropdown menu on iOS Safari HOT 1
- MathML-Core support shipped by default in chromium 109 HOT 2
- Convert asciimath JavaScript output to PDF
- Fraction bars aren't rendered as text HOT 2
- hyperlinks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciimathml.