pdftex 的多个版本并排显示

pdftex 的多个版本并排显示

为了测试目的,我想设置另一个版本的pdftex。位于 下的标准版本/usr/lib/texmf/bin/x86_64-linux/pdftex应保持不变。我设法编译了pdftex,我猜它的正确位置是/usr/local/share/texmf/bin/x86_64-linux/,并在 中使用符号链接/usr/local/bin。我如何告知kpathsea使用这个新版本?

答案1

这个方法对我有用,可以在 TEXMFHOME 中安装一个新的 pdftex。

#!/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

相关内容