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
Don't use mathjax in code examples in the Scala language specification #557
Comments
How do you propose that formulas be typeset? |
On 2016-Nov-27, Seth Tisue wrote with possible deletions:
For source code examples, I would use plaintext only. In the following example, I see no benefit in using a mathjax
I would even resort to plain text if this does not abstract over variable names any more, with a decent description it should be clear what the variable parts are. E.g., in Section 4.2 Variable Declarations, unicode
But the following
I would rewrite as
because it is clear from the context that
To further make a distinction between the emphasis for “type declaration”, and the meta variables, one could use CSS
and
or even
All these approaches would make the document self-contained, load faster, make its structure simpler, avoid the problems of getting the fonts consistent on all platforms (which is not the case now), etc. |
Pull requests that reduce or eliminate the use of Mathjax in source code examples would be very welcome, I think — that seems like the highest priority part of this. |
I agree that for source code examples, plain text would be preferable. However, the specification is something of an academic document, which uses specific notations, and in many cases I think Mathjax is actually the most appropriate way to typeset some things. So I wouldn't support a wholesale replacement of Mathjax... Just where it's unnecessary, like source code examples. |
I've changed the issue description to just cover the part of this we all seem to agree on. |
note to first-time contributors: although the spec is published on scala-lang.org, the actual files containing the spec are in the scala/scala repo, at https://github.com/scala/scala/tree/2.13.x/spec |
Closed in scala/scala#7432 ? (replaced with KaTeX) |
I personally find it unfortunate to use mathjax in documents like [1].
Cut'n'paste from Examples leaves me with
dropping dollars and introducing spaces.
The (potentially intended) distinction between (Scala) variables
and (documentation) meta-variables is not consistent in the
document.
Suggests syntax that does not exist (
x₁
gives illegal character'\u2081')
Using mathjax introduces external dependencies, takes longer to load.
[1] http://scala-lang.org/files/archive/spec/2.11/04-basic-declarations-and-definitions.html
The text was updated successfully, but these errors were encountered: