Comments (4)
This is what we hoped to have the Ascii-based units formatting language address, but I guess we're not going to wait for that.
Your requirement is backwards: it is the upright, not the italics, which is the exception. I doubt this can be done directly at all, and what will be necessary is some ad hoc postprocessing, where formatting is passed through in the AsciiMath parse, and then processed before moving on to MathML; something like stem:[5 !m^{-2}]
, where we agree that !
makes the following character upright.
Proccessing Asciidoctor markup is a non-starter. Treating units as text in AsciiMath is also a non-starter. That is not how you're going to get the markup you want.
Will need to experiment with this.
from bipm-si-brochure.
Recall: by default in MathML, two-character variables are upright, single-character variables are italic.
Asciimath gem decomposes two-character variables into single-character variables. So everything turns into italics. The real solution to that is going to have to be true units markup. But before we get there:
Asciimath applies font shifts to its arguments: so
stem:[v bb(ms)^{-2}]
renders as:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>v</mi>
<msup><mrow>
<mstyle mathvariant="bold"><mrow><mi>m</mi><mi>s</mi></mrow></mstyle>
</mrow><mrow><mrow><mo>−</mo><mn>2</mn></mrow></mrow></msup>
</math>
That won't be the desired <mi mathvariant="bold">m</mi>
, but if we want proper semantic markup, we should be using a real units markup scheme anyway.
So we could address this for now, at least for rendering, by changing the markup to stem:[v rm(ms)^{-2}]
. The problem with that is, rm
is not supported by most Asciimath implementations. Am requesting it to be implemented in Asciimath gem.
from bipm-si-brochure.
So we could address this for now, at least for rendering, by changing the markup to
stem:[v rm(ms)^{-2}]
. The problem with that is,rm
is not supported by most Asciimath implementations. Am requesting it to be implemented in Asciimath gem.
I applied rm(...)
syntax to all units in stem
expressions of BIPM SI Brochure EN/FR (#56 ).
from bipm-si-brochure.
@Intelligent2013, unassigning you, there is nothing for you to do.
There is a task to do units in UnitsML properly: metanorma/metanorma-bipm#3 . This interim solution is working, so closing ticket.
from bipm-si-brochure.
Related Issues (20)
- PDF: Wrong fonts used when generated on GHA HOT 7
- BIPM final review: content errors to be fixed HOT 4
- BIPM final review: presentational errors to be fixed HOT 2
- BIPM final review: "NOTE :" French typographic rule inserts empty space before colons HOT 23
- BIPM final review: Links to BIPM outcomes should follow document language HOT 5
- BIPM final review: Update reference conventions to CIPM/CGPM/CCTF outcomes HOT 7
- BIPM final review: number spacing in groups of 3, but don't let 1 digit hanging
- Failure in generation on Ubuntu
- Brochure: Update configuration of grouping decimals HOT 1
- Brochure: Clarification about BIPM request HOT 2
- BIPM XSLT: Remove colons insertions HOT 3
- Displaying fetched non-ASCII characters HOT 4
- Indentation of table title HOT 7
- BIPM: Initials vs. list items issue HOT 2
- Unable to install dependencies HOT 1
- Site generate for collection generates component PDFs twice HOT 3
- Fix build HOT 6
- Update SI Brochure references to outcomes HOT 2
- Encoding indented editorial note HOT 3
- (URGENT) UnitsML encoding missing from resulting Semantic XML HOT 2
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 bipm-si-brochure.