escapeLaTeX:  behave differently in math and text mode.

With this change all of the latex writer tests successfully compile
with latex.