Python code to automate coding (particularly Science and Math) in LaTeX