Typst: A Programmable Markup Language for Typesetting [pdf]
I really like the paper, though I&#x27;m not sure the world needs another Turing-complete document language however well-motivated ;)<p>As SGML pedant however, I can&#x27;t resist commenting on the following:<p>&gt; <i>The second offspring of SGML is XML, specified by the World Wide Web Consortium (W3C) in 1998. It has a reduced feature set compared to SGML (for example, it forbids unclosed tags and concurrent markup). But it retains the most important aspect of SGML, one that HTML is lacking: The ability to define custom structural elements. This lets XML represent documents with much more semantic detail than HTML.</i><p>As the SGML vocabulary HTML was once envisioned, HTML <i>itself</i> doesn&#x27;t need extensibility. When used as an SGML application, defining your own elements in HTML is as easy as declaring those in the &quot;internal subset&quot; or in a custom DTD right away. Assuming any wellformed element is accepted as of ISO 8879 Annex K&#x27;s FEATURES IMPLYDEF ELEMENT rather than rejecting undeclared elements, that&#x27;s actually only necessary if you want to validate&#x2F;infer custom content models, or use any of the other things markup declarations provide, such as custom SHORTREF syntax a la markdown.<p>Arguably, HTML5&#x27;s &quot;custom elements&quot; <i>do</i> provide a facility to define new elements, if incredibly lousy; ie. custom elements can&#x27;t have content model restrictions (see above) and can&#x27;t be used with tag omission&#x2F;inference (important for customized elements), aren&#x27;t integrated with DOM parsing, and need JavaScript for declaration - the latter point making them completely pointless as a markup feature.