Closed nschloe closed 2 years ago
This is an inherent limitation of how pylatexenc works. Pylatexenc is not a replacement for a full (La)TeX engine. Instead, it parses content in a markup-like fashion to build a node tree of a document.
In the upcoming version of pylatexenc, there will be support for better handling of commands with complicated argument structures, and there will be opportunities to better support commands such as \newcommand
.
Closing as the core of the issue is already filed as #50.
Thanks for going through all the issues.
I had at first thought I might be able to use pylatexenc, but because of things like this one here, I started implementing my own TeX engine. (A parser won't cut it, as you correctly point out.)
If not important for you, feel free to close the issues I opened.
@nschloe did you complete your latex engine ? I am in the same boat but reinventing a latex engine seems too much to me.
With
pylatexenc doesn't recognize the
\begin{equation}
as a command, but expects a closing statement which doesn't come.