added latex printing to visualizer