Added support for theorems, equationgroups and linking to math