WIP: LaTeX documentation

I started working on some proper documentation for the math. It's quite babbly, and in no way complete, but I hope it's pleasant enough to read anyway.

Any comments are much appreciated.