Add amsmath support

This fixes #223.