beta-0.89.2
[luatex.git] / source / texk / texlive / tl_scripts / pslatex.sh
blob4badef0ec12ae63c81e0a0f64d1f012fcef23067
1 #!/bin/sh
3 # Copyright 1994 David Carlisle
4 # This file may be redistributed and/or modified under the terms of the
5 # LaTeX Project Public License distributed from CTAN archives in directory
6 # macros/latex/base/lppl.txt; either version 1 of the License, or (at
7 # your option) any later version.
9 test -f /bin/sh5 && test -z "$RUNNING_SH5" \
10 && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
11 && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
12 unset RUNNING_SH5
14 test -f /bin/bsh && test -z "$RUNNING_BSH" \
15 && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
16 && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
17 unset RUNNING_BSH
19 # hack around a bug in zsh:
20 test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
22 # we want to be able to use options to latex:
23 while :; do
24 case $1 in
25 -*)
26 latexoptions="$latexoptions \"$1\""
27 shift;;
29 break;;
30 esac
31 done
33 echo
34 echo "*************************************"
35 echo "* Using LaTeX, with pslatex package *"
36 echo "*************************************"
37 echo
39 # messing around with \PSLATEXTMP is for AUCTeX which calls
40 # documents via latex \nonstopmode \input{file}
42 latex $latexoptions \
43 "\AtBeginDocument{\RequirePackage{pslatex}}"\
44 "\def\PSLATEXTMP{\futurelet\PSLATEXTMP\PSLATEXTMPB}"\
45 "\def\PSLATEXTMPB{\ifx\PSLATEXTMP\nonstopmode\else\input\fi}"\
46 "\PSLATEXTMP" ${1+"$@"}