I'd like track my LaTeX projects using git, especially when collaborating with other authors. I'd also like to track my texmf directory in a separate git repository. My desire is to add my texmf repository as a git submodule to each LaTeX project. However, I can't figure out how to tell latexmk (really, pdflatex) to see my project-local texmf.
Ultimately, I want my LaTeX projects to be standalone, i.e. they depend on nothing other a TeX Live install and the files in the project directory so they can seamlessly be compiled on different machines or in a CI pipeline. How can this be done?
Note: I have tried the solutions presented in similar questions, e.g. here (the TEXMFHOME environment variable seems to be ignored) and here (requires updating system texmf.cnf), to no success so far.
tlgmr help. – Keks Dose Jun 22 '23 at 14:08