Some changes to LatexEditor/LatexRenderer from Dimitry