Before writing my dissertation, I developed a lightweight code for compiling a pseudo-markdown text into HTML and LaTeX at the same time. I wrote the code for three reasons: to write custom markdown syntax, to generate HTML documents quickly and without large dependencies common to e.g. [pandoc] (which is otherwise excellent), and to track changes to my documents using git.

You can try out the code by running the following commands from a terminal. The code only requires python, but you need a healthy LaTeX environment if you wish to render in that style.

git clone http://github.com/bradleyrp/cassette
cd cassette
make demo
make

This will generate documentation (written in the cassette format) which demonstrates most of the features. Users can add their own syntax as long as they can describe it with a regular expression.

Cassette has some neat features that are useful for writing collaborative documents:

  1. It uses a single syntax to make HTML files and LateX PDFs with highlighting and annotations.
  2. Users can easily create LaTeX templates. Cassette comes with templates for a few popular journals.
  3. The markdown files are tracked by two git repositories. One can be used for sharing the documents with others, while the other stores a sentence-by-sentence copy of the revision history so you can easily see how the document has changed over time.
  4. A dispatch file can be used to retrieve large image files over ssh. This allows collaborators to store large images in a central place while also sharing the much smaller document via git.
  5. A minimal syntax e.g. @Bradley-2016 specifies references which are automatically generated from a companion bibtex file.
  6. The syntax is entirely extensible. As long as you can write a regular expression, then you can modify the markdown interpreter.

Get in touch with me if you have any questions.