linx86 下使用 texlive 还是挺不错的,下面是挂载和设置 PATH 的脚本。将脚本放在 /home/xx/bin/ 下,
在需要时执行 tex_up 即可。
#!/bin/bash

# tex_up

#
TEX_DIR=/opt/tex/texlive
ISOFILE=/opt/tex/texlive2007.iso

#
add_path()
{
if [ "xx$(which latex)" == "xx" ]
then
echo "texlive isnot in PATH!"
echo "Adding $TEX_DIR/bin/i386-linux to PATH."
echo 'export PATH=$PATH:$TEX_DIR/bin/i386-linux' >>~/.bashrc
else
echo "texlive is alive now!"
fi
}
# mount iso
mount_iso()
{
if [ "`id -u`" != "0" ]
then
sudo mount -o loop $ISOFILE $TEX_DIR
else
mount -o loop $ISOFILE $TEX_DIR
fi
}

#
TEX_CHECK=`which $TEX_DIR/bin/i386-linux/latex`
if [ "xx$TEX_CHECK" == "xx" ]
then
echo "ISO is absent now!"
echo "Mount $ISOFILE"
mount_iso
fi

add_path

在需要时执行 tex_up 即可。










































