- Number the sections
- Create Table of Contents
- Create small TOC
- Cross-reference back (
- Strip out unused references
- Check for missing references
- Spec splitting
- Add output for
- Add MDN annotations
- Add syntax-highlighting markup to
For documentation on the "Wattsi language", e.g. things like
w-nodev, see Syntax.md.
Building and running Wattsi with Docker
docker run whatwg/wattsi
The HTML build tools will automatically attempt to use this form if they cannot find a locally-installed copy of Wattsi.
If you're developing Wattsi, you can build and test it in Docker with the command
make docker and
docker run whatwg/wattsi. The latter accepts any Wattsi arguments, e.g.
docker run whatwg/wattsi --version.
Building and running Wattsi manually
With the Free Pascal Compiler (fpc) installed, you should be able to run
make manual to create the
wattsi executable and supporting shared libraries.
wattsi executable is at
./bin/wattsi. Tools such as
$PATH to look for a local
wattsi executable. In your terminal, run
export PATH=$PATH:$(pwd)/bin. In the same terminal tab, you can now run tools that use the built
For guidance on installing fpc, see the next section.
Installing the Free Pascal Compiler (fpc)
Wattsi is written in Free Pascal, so to build Wattsi, you'll need version 3.0.4 or later of the Free Pascal Compiler (fpc). You can get fpc by downloading a freepascal.org upstream release — but it’s recommended that you instead install fpc using a package manager.
Installing fpc on Debian and Ubuntu
On Debian and Ubuntu and any other Debian-derived systems, run
apt install to install the necessary packages:
apt install fp-compiler fp-units-fcl fp-units-net libc6-dev
Installing fpc on macOS using Homebrew
On macOS, install Homebrew and the homebrew fpc 3.0.4 revision 1 (3.0.4_1) or later package. The revision 1 there is important — the initial 3.0.4 package will not work as expected on macOS Mojave (10.14) or later.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install fpc
Installing fpc on macOS from a freepascal.org upstream release
If you don’t want to use homebrew but instead prefer to install a freepascal.org upstream release, you must get fpc 3.0.4a or later. The “a” there is important — the initial 3.0.4 package will not work as expected on macOS Mojave (10.14) or later.
Installing XCode and the XCode command-line tools
If you already have XCode installed, you can ensure you have the latest XCode command-line tools by running the following command: