Skip to content

Request to write depedency information #135

Description

@jccollins

I am the maintainer of latexmk, and the next version will have the ability to be configured to support pythontex properly, without the previous limitations. (This was provoked by a user request).

It would help latexmk (and other similar tools that automate the compilation of LaTeX files) if there were an easy way to determine the dependencies of a pythontex run. For example, if the user's code executes

pytex.add_dependencies("data.txt")

it would be useful for latexmk itself to know the file data.txt is a source file (i.e., a dependency) for the pythontex run, and thus a change in the file would cause latexmk to rerun pythontex.

The information is evidently written by pythontex to the pythontex_data.pkl file, but that is a binary file, and probably not appropriate for parsing by other software. So I would like to suggest that, for each dependency, python writes a line in a standardized format to the .pytxmcr file, say

%PythonTeX dependency: 'data.txt'

It's a TeX comment, so it doesn't affect what happens when the .pytxmcr file is read in by the document during a LaTeX compilation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions