docs/_spec/README.md
This is still a work in progress. There are still Scala 3 features missing, as well as some areas that have not been updated since 2.13 yet.
First of all, the language specification is meant to be correct, precise and clear.
Second, editing, previewing and generating output for the markdown should be simple and easy.
Third, we'd like to support different output formats. An html page per chapter with MathJax seems like a good start, as it satisfies the second requirement, and enables the first one.
We are using Jekyll and Redcarpet to generate the html.
Check Gemfile for the current versions.
We aim to track the configuration GitHub Pages uses but differences may arise as GitHub Pages evolves.
To preview locally, run the following commands in the docs/_spec subfolder:
env UID="$(id -u)" GID="$(id -g)" docker-compose up
and open http://0.0.0.0:4000/files/archive/spec/3.4/ to view the spec. Jekyll will rebuild as you edit the markdown, but make sure to restart it when you change _config.yml.
All files must be saved as UTF-8: ensure your editors are configured appropriately.
Use of the appropriate unicode characters instead of the latex modifiers for accents, etc. is necessary. For example, é instead of \'e.
MathJAX errors will appear within the rendered DOM as span elements with class mtext and style attribute color: red applied. It is possible to search for this combination in the development tools of the browser of your choice. In chrome, CTRL+F / CMD+F within the inspect element panel allows you to do this.
This document follows the "one sentence <=> one line" convention, with the following exceptions below.
Whenever doing an enumeration of the kind "a, ..., z", follow the following conventions:
, ..., or ,\n...,\n for multiline.Try to use "Note" blocks to point out logical conclusions that are not obvious, for examples, look at the Tuple Types section.
\SS (which I could not find defined within the latex source) seems to be closest to \mathscr{S}\TYPE is equivalent to `\boldsymbol{type}', … , (But should not, see above).\textsc{...} (small caps) in pandoc markdown. While unicode contains a number of small capital letters, it is notably missing Q and X as these glyphs are intended for phonetic spelling, therefore these cannot be reliably used. For now, the best option is to use underscore emphasis and capitalise the text manually, _LIKE THIS_.