[Tex/LaTex] TeX Live – change package directory location – Windows

texlivewindows

In a follow up to this question: Where is the TexLive 2010 default package directory located in Windows 7 64-bit?

If my TeX Live installation is in C:\texlive\2016 can I change the package directory to anything else other than C:\texlive\2016\texmf-dist\tex\latex?

E.g. can I (somehow) ask TeX Live installed on C: to look for packages on a D: drive?

Reason for question: my TeX Live is installed on a corporate machine where I don't have administrator rights to C: drive hence I cannot add new packages to my distribution.

Best Answer

TeXLive will ask you, where to install your system. You can of course select any different target directory, you have write permissions to. If you are installing a fresh system from scratch, everything will be fine.

You may also install a complete or incomplete set of packages of an TeX-Directory-Structure (TDS) on D: or any other file system. (I mean: in parallel to any existing TeXLive installation.) In that case, you have to edit your local settings, to include that TDS-tree into your TeX search path. (Obviously, you also need to have administration rights, to do that ...)

You have to edit $TEXMFDIST/web2c/texmf.cnf, where $TEXMFDIST is the root of your TeXLive installation. In that file, you have to include your second TDS-tree.