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