A small script in python, intended to be used on markdown source files to preprocess LaTeX formulae.
It depends on HeVeA, a translator from LaTeX to html, and on python (version 2.6 or more).
#!/usr/bin/env python2because I wrote it on archlinux, on other distros it should be
.mkdfiles with the preprocessor (it may require to replace some spaces by tabs): Makefile
The most interesting part is the rule which transforms the
%.html: %.mkd markdownPreprocessor $< | markdown >> $@
The motivation behind this preprocessor is that I have some courses which involve a lot of mathematics, and taking notes in pure markdown yields poor rendering of formulae (in my case, LaTeX source code, which is pretty ugly to read). Since html can display formulae in a quite reasonable fashion, using a LaTeX to html translator seemed quite pertinent. This remains currently quite a hack, but I intend to use it for my studies.back to home