Fix error that made solutions print badly in TeX mode
Main fix is to apply EV3 to input BEFORE feeding it to solution
The rest is just to bring this code in line with the SOLUTION code in PGbasicmacros.pl
Make displaying top labels work with MathJax
and with printing matrices