almost complete implementation of real-time LaTeX highlighting!