Debian Codegraph @

texk/texlive/linked_scripts/texlive-extra/pslatex.sh

raw symbols SCIP
1 #!/bin/sh
2
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.
8
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
13
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
18
19 # hack around a bug in zsh:
20 test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
21
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;;
28 *)
29 break;;
30 esac
31 done
32
33 echo
34 echo "*************************************"
35 echo "* Using LaTeX, with pslatex package *"
36 echo "*************************************"
37 echo
38
39 # messing around with \PSLATEXTMP is for AUCTeX which calls
40 # documents via latex \nonstopmode \input{file}
41
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+"$@"}