From 2413d436ed98866e9a70fbd4070a5da52dd97cd5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 8 Jan 2016 12:15:31 -0800 Subject: New format for spec tests, new lua formatter for specs. The format for the spec examples has changed from . markdown . html . to ```````````````````````````````` example markdown . html ```````````````````````````````` One advantage of this is that `spec.txt` becomes a valid Markdown file. `tests/spec_test.py` has been changed to use the new format. The old `tools/makespec.py` has been replaced by a lua program, `tools/make_spec.lua`, which uses the `lcmark` rock (and indirectly libcmark). It can generate html, latex, and commonmark versions of the spec. Pandoc is no longer needed for the latex/PDF version. And, since the new program uses the cmark API and operates directly on the parse tree, we avoid certain bad results we got with the regex replacements done by the python script. --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 65ef742..f0ea60e 100644 --- a/README.md +++ b/README.md @@ -46,16 +46,17 @@ The spec The source of [the spec] is `spec.txt`. This is basically a Markdown file, with code examples written in a shorthand form: - . + ```````````````````````````````` example Markdown source . expected HTML output - . + ```````````````````````````````` To build an HTML version of the spec, do `make spec.html`. To build a -PDF version, do `make spec.pdf`. (Creating the HTML version requires -that [cmark](https://github.com/jgm/cmark) and `python3` be installed -and in your path. Creating a PDF also requires [pandoc] and LaTeX.) +PDF version, do `make spec.pdf`. For both versions, you must +have the lua rock `lcmark` installed: after installing lua and +lua rocks, `luarocks install lcmark`. For the PDF you must also +have xelatex installed. The spec is written from the point of view of the human writer, not the computer reader. It is not an algorithm---an English translation of -- cgit v1.2.3