Preprocessor for LaTeX written in Python