We use LaTeX for our all of our documentation, which includes multiple product lines with multiple manuals. These manuals are built right along with our installers using our automated build server.
We have developed a pretty sophisticated LaTeX "core", which is a TDS tree of various packages (some home built), classes, fonts, boilerplate text, etc. It is used in all of our documents and is often improved and revised in various ways, some of which are not compatible with "the old way that we did it." (although I try to behave as much as I can. :)
As we go along, new products (or new versions of products) use the newest core, while older builds should use the older one. To do this, we've made our core a submodule of all of the GIT repositories. It is branched and revised, just as the products that we make are revised.
The issue:
I need a way to dynamically add a TDS tree, just before compiling the manual. That is, on any given developer's computer (which might be Mac or PC), they might have multiple branches/versions of projects open, each with (perhaps) a different core. When they hit "compile" in WinEDT or TextMate, I want the system to get the core for that project, automatically.
Ideally, I'd like to be able to say something like:
lualatex --tdstree "../core" mymainfile.tex
Which I understand is completely made up. :) Failing that, is there some sort of relatively cross platform way to do the same? My issue is:
- A relative path to the current project is very tricky because no developer puts their local source files in the same spot and "home" is not the same on PC and Mac. I don't think it's really possible to say "relative to the file that is being processed, the TEXMFHOME directory is one back and called core."
- I can never seem to figure out what each platform needs once the TDS tree is set. I think I can figure this out, but it might just be
sudo texhash
andluatools --generate
. The problem with that is I do not want to have them have to remember this for each time they switch and it would take too long if I ran each command before every compile (not to mention the password issue). I believe that I can skip thetexhash
command by using "//" at the end of the TDS entry, but I don't believe that I can skipluatools --generate
. At leastluatools
doesn't seem to requiresudo
on the Mac.
Has anyone else found a way to easily add a TDS tree as part of a compile command? I'm probably missing something very simple. :P