Semantic macros for math mode in LaTeX