Is there a way to distribute a LaTeX package with a document and to use it during compilation?
At our university, we're writing a lot of lecture summaries with LaTeX. Sometimes those summaries need non-standard packages, or sometimes there are version incompatibilities between packages between different LaTeX distributions / operating systems.
As an example, https://github.com/HSR-Stud/CN1 uses the
siunitx package, which changed the name of an option between Texlive 2009 and 2011. Therefore, the document compiles on either Texlive 2009 or 2011 depending on the option name used, but not on both.
There are also cases of packages that are distributed with MikTeX, but not with Texlive (an example would be Picins).
Is it possible to distribute LaTeX packages along with a document and use them during compilation?
As a sidenote, in all our documents Makefiles are used to build the PDF using
latexmk, which is included both in Texlive and MikTeX, so custom compile/build options could be passed to the used tools and environment variables could be set. That could be of help.