Fix error with matrices environments

- Fix typos
- Add test for matrices environments

This should close issue #14.

NOTE: the matrices environments came from amsmath package.