Introduction cxxdraft-htmlgen parses the LaTeX sources of the draft, and generates static HTML pages from them. Prerequisites - A filesystem that supports punctuation in filenames (this may rule out Windows filesystems) - Git - The C++ Standard Draft Sources (https://github.com/cplusplus/draft) - The Haskell Platform (https://www.haskell.org/platform/) - Graphviz - Node.js - mathjax-node-cli (https://github.com/mathjax/mathjax-node-cli/) Usage First, follow the draft package instructions to build the pdf. As a side effect, this generates std-gram.ext, which we need. Then, in the cxxdraft-htmlgen dir, do: cabal build dist/build/cxxdraft-htmlgen/cxxdraft-htmlgen path/to/draft [sectionfilestyle] where sectionfilestyle is one of: Bare (to generate e.g. intro.execution) WithExtension (to generate e.g. intro.execution.html) InSubdir (to generate e.g. intro.execution/index.html) The default is WithExtension, since this is suitable for direct browsing on a filesystem without a web server. Bare may be used in conjunction with web server configuration specifying a default text/html mime type for the directory containing the section pages, to get URLs such as: temp.res#temp.dep temp.dep#3 InSubdir only requires defaulting to index.html, to give: temp.res/#temp.dep temp.dep/#3 Output The following will be created in ./14882/ : - index.html A table of contents with links to... - ~2000 interlinked section pages These are named after the section abbreviation, which for the Bare section file style look like: stmt.goto class.member.lookup cpp iterator.requirements.general locale.moneypunct.virtuals Since sections nest, content is duplicated at every level. This allows one to specify more or less context for a given section or paragraph citation. For example, one can link to: temp.dep (section 14.6.2 "Dependent names") temp.res#temp.dep (the same section highlighted on the page for section 14.6 "Name resolution") temp#dep (the same section highlighted on the page for chapter 14 "Templates") - full ~9 mbyte, the entire draft. - 14882.css Used by all of the above. Todo - very long section names screw up layout - table meta.unary.prop#tab:type-traits.properties is horribly wide due to lack of hyphenation - fix alignment of bnf rules in e.g. [cpp]/1 (tricky because HTML/CSS does not support tab stops) - don't generate anchors with duplicate ids for index entries with the same key - in collapsed stylesheet, figure out how to not hide notes/examples when their sentences are selected