Skip to content
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

depythontex cannot work with AMS math environments #86

Closed
burrbull opened this issue Mar 13, 2016 · 1 comment
Closed

depythontex cannot work with AMS math environments #86

burrbull opened this issue Mar 13, 2016 · 1 comment

Comments

@burrbull
Copy link

If \py{expression} in 'align' , 'split' or other AMS environment,
pythontex creates 2 lines for each expression with wrong line number and depythontex stops with error:

  • DePythonTeX error:
    Could not find command "py" on line 360
@gpoore
Copy link
Owner

gpoore commented Mar 13, 2016

This is due to the way that the AMS environments work. They capture the entire environment contents, and then typeset it afterward. This messes up the line numbering and breaks depythontex.

The best workaround at the moment would be to create the entire AMS environment on the Python side, and then insert it on the LaTeX side. Maybe create the text of the environment within a pycode environment, perhaps as a template, and then insert the desired calculated values. Then print it to the LaTeX side.

I am currently working on the next major PythonTeX release, which I expect to fix this, but I don't have an estimate for a release date.

I am going to close this issue, since it is equivalent to the previous issue #52. But feel free to ask any related questions within the closed issue.

@gpoore gpoore closed this as completed Mar 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants