Expression-based LaTeX preprocessor