You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LaTeX and JME renderings should be handled differently - it would be very difficult to manage producing and evaluating different JME code based on locale.
The text was updated successfully, but these errors were encountered:
The symbol used to separate items in a list, such as the arguments of a
function or elements of a set, is now localised in LaTeX. For locales
where the decimal separator is a comma, a semicolon is used as the list
separator.
Fixes#889
It became apparent that when you render a number in LaTeX, a comma needs
not to have space around it.
This commit splits the number notation style format method into two
versions, for plain text and LaTeX.
Numbas.math.niceNumber takes a `syntax` option to specify which version
to use, and `scientificStyle` to specify the notation style used for the
significand when `style = "scientific"`.
The JME functions `formatnumber`, `dpformat` and `sigformat` need to
work differently when the output is going to be used as LaTeX.
There is already a `scientificnumberlatex` function for scientific
notation, but I don't think this is the right approach now it's clear
every notation style works differently in LaTeX.
Could the `latex()` function set a `syntax` attribute on the scope while
it evaluates its argument, so that it gets passed through to
`niceNumber` whenever it's used?
In locales where a comma is the decimal separator, it's not appropriate to use a comma to separate items in a list.
There doesn't seem to be a single widely-used convention for what to use instead (see https://whystartat.xyz/wiki/Separating_arguments_of_a_function), but I think a semicolon would be acceptable.
LaTeX and JME renderings should be handled differently - it would be very difficult to manage producing and evaluating different JME code based on locale.
The text was updated successfully, but these errors were encountered: