Markdown is a really lightweight, almost human readable syntax for formatting documents. It renders nicely in the browser, so it’s pleasant to read, but it’s also easy to read in the terminal or plain text editor.

However, there are two main obstacles to using it as a general notebook, at least for math-heavy science work. The first is that math does still need to be rendered, which is not directly built into Markdown. The second is being able to conveniently view the plain text file in a browser so that the maths can be properly displayed.

Both of these are easily addressed through the excellent sublimetext-markdown-preview package in Sublime Text.

  • In the settings, set "enable_mathjax": true to enable rendering of math expressions within $ environments (e.g. $x+1$`)
  • From the command palette, select ‘Markdown Preview: Preview in Browser’ to render the document and open it in a browser window. I like to set this as a keyboard shortcut
{ "keys": ["command+shift+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },

The ‘Markdown Extended’ package is also a great addition, with significantly improved syntax highlighting.

All up, this offers a great alternative to starting a new LaTeX document just because there are a handful of equations - it’s fast to write, easy to mix math and code, and much easier to work with in the terminal than LaTeX. As an added bonus, this workflow makes it easy to get the formatting right when editing GitHub wiki pages, without having to upload them and view them in GitHub to detect any mistakes.