docs: use aligned environment in math mode

The align environment doesn't play nicely with Sphinx's LaTeX output.