Reading through the TeX Live manual, the best way to achieve what you want seems to be to alter where TEXMFHOME
points to. This is where TeX looks for your personal files, and has standard setting ~/Library/texmf
, as you probably know!
At the Terminal, typing
sudo tlmgr conf texmf TEXMFHOME "~/texmf"
will alter the location to ~/texmf
, which would be the normal setting on Unix systems other than a Mac. Note that this alters the setting system-wide, but I'm guessing that for most people this will be acceptable.
If you want to have more than one possible location (say retaining the standard setting and adding another one), then a colon is used to separate the list:
sudo tlmgr conf texmf TEXMFHOME "~/Library/texmf:~/texmf"
By the way, for recent releases of TeX Live you don't need to run texhash
for your local tree. The database is only required for the 'big' installation tree, while the local tree will be scanned when TeX runs. The assumption is that the local tree will always be relatively small, so this is an acceptable performance hit.
The number of lines in zref-abspage.sty
is 66 in recent versions. In the history I could not find a hint that could explain more than 28 additional lines. What contains line 94 with two lines before and after?
You can recreate the file, if the sources are installed. Make a scratch directory, copy the file zref.dtx there and unpack it, e.g.:
mkdir /tmp/zref-scratch
cd /tmp/zref-scratch
cp /usr/share/texmf-texlive/source/latex/oberdiek/zref.dtx .
tex zref.dtx
This should generate lots of style files with zref-abspage.sty
among them. Note that you need plain TeX, not LaTeX. Otherwise the documentation would be generated.
The two files can be compared:
diff -u /usr/share/texmf-texlive/tex/latex/oberdiek/zref-abspage.sty zref-abspage.sty
Are there differences?
If yes, what are the differences? The wrong file can then be renamed (for safety and further analysis) and replaced:
sudo mv -i /usr/share/texmf-texlive/tex/latex/oberdiek/zref-abspage.sty /usr/share/texmf-texlive/tex/latex/oberdiek/zref-abspage-saved.sty
sudo cp /tmp/zref-scratch/zref-abspage.sty /usr/share/texmf-texlive/tex/latex/oberdiek/zref-abspage.sty
If no, Which version you are using? Look into the file zref-abspage.sty
.
My recommendation would be to install the original TeX Live, "howto"s can be found in the net, e.g.:
The alternative is installing manually updated packages in a local TDS tree (for all users) or in the home texmf tree (~/texmf
) for the current user only. The Ubuntu documentation contains a section about LaTeX.
To identify the local tree you can try:
kpsewhich --expand-var '$TEXMFLOCAL'
The home tree usually is ~/texmf
.
If the package provides a .tds.zip
file, then the installation is easy. As example
I am using my bundle to install in the home texmf tree:
wget http://mirror.ctan.org/install/macros/latex/oberdiek.tds.zip
unzip oberdiek.tds.zip -d ~/texmf
In case of the local texmf tree, texhash
needs to be called:
sudo texhash
Best Answer
Tex-live supports a number of environment variables that are used to specify where to look for files. The most important ones are
TEXINPUTS
(for packages, classes and support files),BSTINPUTS
(for bibtex/biblatex styles) andBIBINPUTS
(for bibtex/biblatex databases).To add your own folder
~/mystuff
, just add it toTEXINPUTS
and maybe alsoBSTINPUTS
(bash syntax):If a directory is postfixed by a trailing double slash, it is searched recursively by
pdftex
for files, so you may store arbitrary folder structures inside it.The path can also be relative, which comes handy in collaborative settings (with using a source control system, such as git or subversion). For such projects, I usually maintain a per-project
texmf
folder with all "unusal" packages, package versions and so on that is committed together with the project's source file into the repository. In the accompanying makefile I then setTEXINPUTS
to./texmf//:${TEXINPUTS}
, so that the project is "self-contained" and can be checked out and compiled by any colleague with a standard tex-live distribution. Details about this approach can be found in this answer.