#!/bin/sh

cat <<'WARN'
I'm going to create or overwrite
	gptest.{tex,dvi,ps,log},
	gptest{,A,B}.pdf,
    and gptestfig.tex.
If you want to stop, press CTRL-C now.  Otherwise press RETURN.
WARN

read confirmation

gnuplot <<'GP'
set term pstex
set out 'gptestfig.tex'
set grid
plot [-15:15] sin(x)/x tit '${\sin(x) \over x}$'
GP

cat >gptest.tex <<'TEX'
\magnification\magstep1
\nopagenumbers
\noindent
In fresh {\it debian/sarge\/} \TeX\ installations, by default {\sl
dvips\/} uses Bluesky's Type~1 fonts --- instead of Computer Modern bitmapped
fonts --- when the {\tt tetex-extra} package is installed.
$$
\input gptestfig
$$
\dots and remember: $ \lim_{x\to 0} {sin(x) \over x} = 1 $.

\bigskip
some accented characters: \'a\'a\c c
\bye
TEX

set -x
# make gptest.pdf
pdftex gptest.tex

tex gptest.tex

# make gptestA.pdf
dvips -o gptestA.ps gptest 
ps2pdf gptestA.ps

# make gptestB.pdf
dvipdf gptest.dvi gptestB.pdf


