Added preview logic using MathJax.
Changed LaTeX output environment from tabular to array.