Improve pretty-printing of equations