Closed opoudjis closed 2 months ago
Any explicit notation attribute will still end up overridden by an inherited large_notation attribute: so if I have large_notation = scientific as a formatting default, then an explicit notation=e will be ignored for a large number in favour of scientific -- unless I set large_notation = nil. That's not that big a deal, but will need to be documented.
@opoudjis why not delegate that to Plurimath?
Because this is logic about which notation to use; I do not believe it appropriate to put such decision logic into Plurimath. Plurimath should be dealing with fixed options for simplicity.
0 should not be formatted in large_notation but in general notation: it should not be treated like 1e-23.
In number formatting, we support notation as being one of general, scientific, engineering, or e.
It is commonplace to alternate between general and scientific notation for numbers beyond a certain size; so 30, but 3.0 × 10^23^. We are injecting numbers into Metanorma from external sources, and it would be useful to automate that switch, rather than force it in source data.
I will add three parameters to our realisation of number formatting to support this:
large_notation
gives an alternate notation for very large or very small numbers. Sonotation=general,large_notation=scientific
. (notation=general
remains the default, so it does not need to be given explicitly.)large_notation_min
is the smallest absolute value of the number, below which large_notation should be used. Its default value is 1e-6.large_notation_max
is the largest absolute value of the number, above which large_notation should be used. Its default value is 1e6.These values do not need to be propagated to Plurimath: they will be resolved in isodoc with its preprocessing of number formatting attributes.