LaTeX writer:  better handling of display math in simple tables.

We convert display math to inline math in simple tables,
since LaTeX can't deal with display math in simple tables.

Closes #1754.