generate LaTeX documents directly from python