Skip to content
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add haskell stack support Jun 28, 2018
14882.css
Document.hs Handle nondefault note labels. Dec 1, 2018
LICENSE
LaTeXBase.hs Implement new codeblocktu environment. Mar 15, 2019
LaTeXParser.hs Implement new codeblocktu environment. Mar 15, 2019
Load14882.hs Move index entries preceding section into section. Jan 28, 2019
MathJax.hs Remove debug print statement. Nov 24, 2018
README
RawDocument.hs
Render.hs Highlight 'module' and 'import'. Mar 15, 2019
SectionPages.hs Fix some warnings and remove unused 'list of figures/tables' code. Dec 17, 2018
Sentences.hs Improve sentence splitting. Dec 31, 2018
Setup.hs Adds cabal file Jul 20, 2015
Toc.hs
Util.hs
collapsed.css Add alternative stylesheets that collapse or color non-normative cont… Apr 30, 2017
colored.css Make sentences linkable. May 1, 2017
cxxdraft-htmlgen.cabal Also highlight code in math. Nov 15, 2018
expanded.css
genhtml.hs Fix some warnings and remove unused 'list of figures/tables' code. Dec 17, 2018
icon.png
mathjax-batch
stack.yaml Add haskell stack support Jun 28, 2018
toc.css Specify transparency in way Chrome understands. Feb 16, 2017

README

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

  With cabal, do:
    cabal build
    dist/build/cxxdraft-htmlgen/cxxdraft-htmlgen path/to/draft [sectionfilestyle]

  Or with stack, do:
    stack build
    stack exec cxxdraft-htmlgen path/to/draft [sectionfilestyle]

  The sectionfilestyle parameter 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...

  - ~2300 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         The entire document (~24 mbyte, or ~2 mbyte compressed).

  - 14882.css    Used by all of the above.

Hidden links

  On any page:

  - "Note:" and "Example:" tags are links that select the note (resp. example);

  - defined terms are links that select themselves;

  - a full stop at the end of a sentence is a link that selects the sentence;

  - moving the mouse over the right margin of a numbered paragraph reveals a link
    to the LaTeX source for that paragraph;

  - moving the mouse over the left margin of an itemdecl reveals a link
    that selects the itemdecl.

Todo

  - very long section names screw up layout
  - table meta.unary.prop#tab:type-traits.properties is horribly
    wide due to lack of hyphenation
  - 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
  - don't highlight re grammar in [re.grammar] as C++ code
  - don't highlight % in description of format strings (e.g. time#cal.month.nonmembers-11.sentence-3)
  - bad highlighting for escape codes (e.g. [lex.ccon]/7)
You can’t perform that action at this time.