-
Notifications
You must be signed in to change notification settings - Fork 102
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
Increase compatibility between latexmk and pythontex by providing warnings #13
Increase compatibility between latexmk and pythontex by providing warnings #13
Conversation
…files The code comes from John Collins <collins@phys.psu.edu>, the author of latexmk. The warnings apparently make latexmk aware of the missing files and then runs pythontex. Since 0.11 is released already, I took the liberty to created a new changelog entry under a newer version. I changed the .dtx file and ran pdflatex on .ins and the .dtx.
Can you give me a little more information about how you are configuring latexmk to run PythonTeX? That might help me figure out the best way to proceed. Have you looked into latexmk's Apparently latexmk needs a message of the form So every time a file should be brought it, but doesn't exist, a message should be written to the log, using a macro like But detecting in general when PythonTeX needs to be run is tricky, and just knowing if files are missing isn't necessarily enough.
My guess is that you will need to run both latex and pythontex at each compile to guarantee that everything is updated, and then compile again based on whether the PythonTeX output has changed. Currently, PythonTeX isn't very efficient if nothing has changed, but I can look into adding a more efficient mode in the next release or two. |
With the patched pythontex I can run latexmk with the following as latexmkrc: add_cus_dep('pytxcode', 'tex', 0, 'pythontex'); Apparently, that teaches latexmk to run pythontex in some cases it is needed. Not in all cases, but I'm happy about that for now. If you can make it run reliably, that's awesome, but I even appreciate latexmk being able to compile my document at all. |
Am I correct in understanding that your Have you tried latexmk's |
|
I have found a solution that doesn't require warning messages for missing files. With your The problem is that whenever This feature will be in the next release, which should be out in the next day or two. I will probably close this issue at that point; please reopen the issue if you have further suggestions. |
I actually ended up implementing this a little differently, for efficiency. The Edit: Originally, I accidentally referred to |
...es
The code comes from John Collins collins@phys.psu.edu, the author of latexmk.
The warnings apparently make latexmk aware of the missing files and then runs
pythontex.
Since 0.11 is released already, I took the liberty to created a new changelog
entry under a newer version.
I changed the .dtx file and ran pdflatex on .ins and the .dtx.