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

enter image description here

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.


Perhaps you could work with the macros in the 'diagrams' package collection? Either have the user enter the relevant macros directly, or create an interface on top of those macros.

  • $\begingroup$ I have no trouble drawing the diagrams though. $\endgroup$ – BananaCats Category Theory App Oct 30 '17 at 10:35
  • $\begingroup$ Okay, so I must have misunderstood what problem you're trying to solve; I was responding to you asking "How does the user specify the math symbols?" If having the user enter existing LaTeX macros (either directly or through another interface layer) does not solve the problem, could you explain why that is? $\endgroup$ – Alexis Oct 30 '17 at 12:39
  • $\begingroup$ you are right that was misleading. The user draws the diagram like in paint, so they only need to specify the node and arrow labels. Parsing is very difficult to me, so was wondering if there are some simplifications. Also, how would we do diagram chasing if we oversimplified it, so there's a trade off. $\endgroup$ – BananaCats Category Theory App Oct 30 '17 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.