Skip to content

Version 2.0

Compare
Choose a tag to compare
@bterlson bterlson released this 21 Aug 20:29

The 2.0 release brings a number of enhancements and breaking changes.

Summary of Breaking Changes

  • Imports now use emu-import elements instead of link rel="import".
  • emu-alg no longer supports an aoid attribute. Aoid may only be placed on clauses. Adjust your editorial conventions appropriately.
  • The biblio file format has changed significantly. If you are using an external biblio file, it must be recreated. Note that emu's own biblio for es6 has been updated for you.

New Features

Floating Table of Contents

The new table of contents floats and is responsive to different screen sizes. Example can be seen on the Async Functions Specification.

New Elements

  • emu-example: an informative example.
  • emu-figure: a figure (default normative, but can be informative with the informative attribute).
  • emu-table: a table (default normative, but can be informative with the informative attribute).
  • emu-eqn: an equation (used heavily in the Date sections of the ES6 spec).

Metadata block

Specs may contain a metadata block inside a pre class=metadata element. The metadata block is parsed as YAML. Right now there are only a few options supported:

  • toc: Whether to include a toc. Default true.
  • location: The location of the document. Used for biblio files so dependent specs know where to link to.
  • biblio: where to save the biblio file
  • js: where to save the javascript file (not necessary if using the old toc).
  • css: where to save the css file

Example

<pre class=metadata>
toc: false
location: https://tc39.github.io/ecmascript-asyncawait
</pre>

Future releases will add additional boilerplate generation based on new keys such as title, stage, etc.

Non-terminal Linking

All non-terminals are now linked to their definitions (whether in the local spec or in a dependent spec).

Auto-linking of Terms

Terms are now auto-linked whenever they are referenced. Links to abstract operations are also auto-linked.

More xref power

You can now cross-reference clauses, productions, tables, figures, notes, and examples by their ID. You can also cross-reference an abstract operation using the form <emu-xref aoid=Call></emu-xref>.

More options

All the metadata keys can be passed on the command line. Example: ecmarkup --location https://... --verbose --css ecmarkup.css --js ecmarkup.js spec.emu out.html.