For testing purposes, I want to set up another version of pdftex. The standard version, residing under /usr/lib/texmf/bin/x86_64-linux/pdftex should be left untouched. I managed to compile pdftex, and I guess the right place for it is /usr/local/share/texmf/bin/x86_64-linux/, with a symlink in /usr/local/bin. How do I tell kpathsea to use this new version?
Asked
Active
Viewed 302 times
2
mafp
- 19,096
1 Answers
2
This receipe worked for me, installing a new pdftex in TEXMFHOME.
#!/bin/bash
## run this script in the top directory of the freshly unpacked pdftex sources
## it is assumed that TEXMF contains TEXMFHOME before the other TEXMF trees, see texmf.cnf
## build pdftex
./build-pdftex.sh
## directory for pdftex in TEXMFHOME
mkdir -p ${HOME}/texmf/bin/`arch`-linux
## directory for pdftex.pool and formats in TEXMFHOME
mkdir -p ${HOME}/texmf/web2c
## bring pdftex and pool file to TEXMFHOME
cp build-pdftex/texk/web2c/pdftex ${HOME}/texmf/bin/`arch`-linux
## bring pdftex.pool to TEXMFHOME
cp build-pdftex/texk/web2c/pdftex.pool ${HOME}/texmf/web2c
## make a link to texmf.cnf in TEXMFHOME so the new pdftex will find it
ln -s /etc/texmf/web2c/texmf.cnf ${HOME}/texmf/bin/`arch`-linux/texmf.cnf
## put a link to the new pdftex that is in the PATH
ln -s ${HOME}/texmf/bin/`arch`-linux/pdftex ${HOME}/bin/pdftex
## let kpsetool see the new texmf.cnf and pdftex.pool
texhash
## create formats, using the new pdftex, and the ini files from the existing TeX installation
pdftex -ini -etex pdftex.ini
pdftex -ini -etex pdflatex.ini
## bring formats to TEXMFHOME
cp pdftex.fmt pdflatex.fmt ${HOME}/texmf/web2c
## make pdflatex a symlink to pdftex
ln -s ${HOME}/texmf/bin/`arch`-linux/pdftex ${HOME}/texmf/bin/`arch`-linux/pdflatex
## make pdflatex findable
ln -s ${HOME}/texmf/bin/`arch`-linux/pdflatex ${HOME}/bin/pdflatex
## tell kpsetool about the formats
texhash
mafp
- 19,096
/usr/local,kpathseaand all, and switch yourPATH(or run by complete path). I don't know if both versions will get messed up, for absolute certainty I'd do the building without TeX installed. Or can you use a virtual machine for the doctored TeX installation? – vonbrand Feb 11 '13 at 21:34