ambrosiogabe / MathAnimation

A simple C++/OpenGL application to create quick and dirty mathematically accurate animations
982 stars 49 forks source link

LaTeX in C++ #103

Open midirhee12 opened 1 year ago

midirhee12 commented 1 year ago

I saw your video and heard that you wanted a way to easily work with LaTeX in C++.

There's a very mature library called pandoc that is very simple to use and represents many typesetting forms and converts between them. It is also extremely language agnostic. And it has a couple options to extend it if need be. You can also easily add in custom versions of the readers and writers if you wanted to make a "custom" LaTeX in the future. And you can have inline markdown support out-of-the-box.

However, it is written in Haskell, and I'm not sure if you want to add Haskell to your build dependencies. Haskell is big and none of your build dependencies use it. So it would greatly bloat your build size as you're adding an extra compiler to the final build. With that being said, you don't need to know any Haskell to use the tool. In fact, most people just extend it with Python if I recall.

With that being said, I find that pandoc is kind of the de-facto tool for LaTeX these days. So I'm a bit curious if you had a reason against it because you might have already heard about it. Let me know any questions or concerns you have with it.

Also, I haven't used your software yet, but I plan to in the future after watching your video. And I would like to help out. I can send some pull requests for pandoc support if you choose this route as I'm fairly familiar with the ecosystem.