texgit – Download, access, and potentially execute files from git
This package allows you to do the following things:
- download files from a git repository and access them from LaTeX,
- apply some post-processor to the downloaded files (e.g., strip comments and type hints from Python code) and access the post-processed files instead,
- execute scripts or programs — either locally or downloaded from git repositories — and fetch their output into local files accessible from LaTeX,
- create local paths accessible from LaTeX which can be passed as arguments to the scripts or programs that are executed, e.g., as argument to a Python script that creates and stores a “matplotlib” plot under the path that it received as argument, allowing you to programmatically create figures and include them in LaTeX documents.
The package works a bit like BibTeX:
Let’s say your document is named document.tex.
During the first pdflatex run, executed as
pdflatex document
, all the requests mentioned
above, say, to download files from git repositories,
are stored in the aux file.
The paths corresponding to the requests point to an
empty file at this stage.
Then you would apply the texgit post-processor
by calling python3 -m texgit.run document
.
This Python program
executes all the requests and caches their results locally.
During the second run of pdflatex document
,
the paths corresponding to the requests then point to the actual
downloaded or generated files.
All downloaded or generated files will be locally cached
in a folder named __git__ in your document’s directory.
You can delete this folder to refresh the files.
Sources | /macros/latex/contrib/texgit |
Documentation | |
Bug tracker | https://github.com/thomasWeise/texgit_tex/issues |
Repository | https://github.com/thomasWeise/texgit_tex |
Version | 0.9.6 2025-06-20 |
Licenses | The LaTeX Project Public License 1.3 |
Copyright | 2023–2025 Thomas Weise |
Maintainer | Thomas Weise |
Topics | Data import |
Download the contents of this package in one zip archive (810.0k).
Suggestions
Maybe you are interested in the following packages as well.
Community Comments