New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing the content of math environments? #106
Comments
@jonathan-laurent Thanks for creating this issue! I've just made a change that will allow this. The linked PR will have a passing test for this math env replacement, reproduced below:
|
Wow, that's exactly the issue I was searching for. Thank you very much @alvinwan for this really handy library! Would you consider pushing a release to PyPI for this new math parsing feature? |
I just tried it and it works great. Thanks! |
* fixes #106 version bump request * finished basic guides (added modification) * added crazy opt arg test from plastex/plastex#129
@qwenger yup, just pushed! https://pypi.org/project/TexSoup/0.3.1/ |
Currently, it seems to me that TexSoup treats the content of a math environment ($...$ , (...) or [...]) like a single token.$...$ and then calling TexSoup on it recursively but I am not sure this would work.
Is there any way to get a structured representation of this content too? I was thinking of getting a string representation of the inside of
To be even more concrete, here is an example of a task I am interested in performing:
\infer{A}{B}
within a math environment and replace it by\infer{B}{A}
where A and B could be arbitrary Latex code.Could one use TexSoup to do this?
The text was updated successfully, but these errors were encountered: