Rename syntax nonterminals, add type keyword
Change def to newcommand where possible
Standardise *ctx macro to *jdg
Remove substitution, update text and styling

Substitution is no longer special-cased, and instead we just assume that
shadowing variables are rewritten into unique forms. This commit also
standardises several syntax macros and provides some more space around
braces.