Converting Python code to LaTeX maths was really annoying.  Was.