1998-05-07 01:38:16 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Build one of the simple documents.
|
|
|
|
|
|
|
|
WORKDIR=`pwd`
|
|
|
|
cd `dirname $0`/..
|
|
|
|
srcdir=`pwd`
|
|
|
|
cd $WORKDIR
|
|
|
|
|
1998-05-07 17:28:42 +00:00
|
|
|
latex=latex
|
|
|
|
if [ "$1" = "--pdf" ] ; then
|
|
|
|
pdf=true
|
|
|
|
latex=pdflatex
|
|
|
|
shift 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
part=$1; shift 1
|
1998-05-07 01:38:16 +00:00
|
|
|
|
1998-05-07 17:28:42 +00:00
|
|
|
TEXINPUTS=$srcdir/$part:$TEXINPUTS
|
1998-05-07 01:38:16 +00:00
|
|
|
export TEXINPUTS
|
|
|
|
|
1998-05-11 19:06:26 +00:00
|
|
|
echo $srcdir'/tools/newind.py >'$part'.ind'
|
1998-05-07 17:28:42 +00:00
|
|
|
$srcdir/tools/newind.py >$part.ind || exit $?
|
1998-05-11 19:06:26 +00:00
|
|
|
echo "$latex $part"
|
1998-05-07 17:28:42 +00:00
|
|
|
$latex $part || exit $?
|
|
|
|
if [ -f $part.idx ] ; then
|
1998-05-07 01:38:16 +00:00
|
|
|
# using the index
|
1998-05-11 19:06:26 +00:00
|
|
|
echo $srcdir'/tools/fix_hack '$part'.idx'
|
1998-05-07 17:28:42 +00:00
|
|
|
$srcdir/tools/fix_hack $part.idx || exit $?
|
1998-05-11 19:06:26 +00:00
|
|
|
echo 'makeindex -s '$srcdir'/texinputs/myindex.ist '$part'.idx'
|
1998-05-07 17:28:42 +00:00
|
|
|
makeindex -s $srcdir/texinputs/myindex.ist $part.idx || exit $?
|
1998-05-07 01:38:16 +00:00
|
|
|
else
|
|
|
|
# skipping the index; clean up the unused file
|
1998-05-07 17:28:42 +00:00
|
|
|
rm -f $part.ind
|
|
|
|
fi
|
|
|
|
if [ "$pdf" ] ; then
|
1998-05-11 19:06:26 +00:00
|
|
|
echo $srcdir'/tools/toc2bkm.py '$part
|
1998-05-07 17:28:42 +00:00
|
|
|
$srcdir/tools/toc2bkm.py $part
|
1998-05-07 01:38:16 +00:00
|
|
|
fi
|
1998-05-11 19:06:26 +00:00
|
|
|
echo "$latex $part"
|
1998-05-07 17:28:42 +00:00
|
|
|
$latex $part || exit $?
|