# What are some simplifications I can make in order to parse LaTeX strings in category theory, in a useful way?

Here's a screenshot of a PyQt5 app I'm making. It renders LaTeX by calling latex and dvipng from a MikTeK installation.

I want to make this diagram tool that acts as a notebook and perhaps diagram chasing tool.

There's a problem though. How does the user specify the math symbols? Clearly the set of possible strings from a category theory book is much different from general math.

The app will have to do at least some category theory in order to be a tool you'd want to use. However representing all possible objects that would occur in a book seems daunting and error-prone.

I was thinking, maybe a \cdot could always mean that's where some morphism or functor composes, so in order to take the functor of a diagram, it's simple text replacement processing. That is an example of a simplifying assumption.

Please give me some ideas of what I could do as general mathematical language processing is way too difficult.