-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
doc: dash used instead of minus in mathematical expressions #90793
Comments
Now I'm less confused. You are making a good point. I think there are a few options here:
I think what we ultimately need is a documentation guide for mathematical expressions, or even better (or rather in addition) a way to write /// The smallest value that can be represented by this integer type, <`-2.pow(31)`>.
or something like that. But ultimately there is generally tons of inconsistency in documentation and I think it's pretty much normal, especially in such a large project. So maybe it's fine to just merge those occasional fixup PRs like #90777 to keep some consistency. |
Options 1 and 2 are not really something I'd ever go for. When I wrote |
I would argue that using MathML would be ideal in terms of presentation here. If we wanted to utilize math expressions at scale in our documentations, adding support for (la-)tex-like math to our markdown-html converter would also make some sense. Sadly neither are easy fixes – MathML isn't super widely supported out-of-the-box and the latter feature is effectively a pandoc exclusive feature AFAIK. |
The minus sign in mathematical expressions for
i*::MIN
,i*::MAX
andu*::MAX
is rendered using U+002D (see images below). U+002D looks bad in that context; U+2212 is more suitable and looks better in mathematical expressions.Note: I had already opened PR #90777 to fix this, but it was closed. I opened the issue to discuss this here instead of in an already-closed PR. The reason given for closing is:
But I don't agree with that: here the minus sign is in a mathematical expression that is not code. If it were an expression in verbatim code then yes, U+002D would be better, but for example −231 cannot be written in code anyway (the code
-2i32.pow(31)
wouldn't even work).The text was updated successfully, but these errors were encountered: