Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf33269

Browse files
committed
Add support for a --pdf option to cause a PDF file to be created instead;
most of the processing is the same and has to be done anyway.
1 parent f8e4415 commit bf33269

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

Doc/tools/mkdvi.sh

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,30 @@ cd `dirname $0`/..
77
srcdir=`pwd`
88
cd $WORKDIR
99

10-
PART=$1
10+
latex=latex
11+
if [ "$1" = "--pdf" ] ; then
12+
pdf=true
13+
latex=pdflatex
14+
shift 1
15+
fi
16+
17+
part=$1; shift 1
1118

12-
TEXINPUTS=$srcdir/$PART:$TEXINPUTS
19+
TEXINPUTS=$srcdir/$part:$TEXINPUTS
1320
export TEXINPUTS
1421

1522
set -x
16-
$srcdir/tools/newind.py >$PART.ind || exit $?
17-
latex $PART || exit $?
18-
if [ -f $PART.idx ] ; then
23+
$srcdir/tools/newind.py >$part.ind || exit $?
24+
$latex $part || exit $?
25+
if [ -f $part.idx ] ; then
1926
# using the index
20-
$srcdir/tools/fix_hack $*.idx || exit $?
21-
makeindex -s $srcdir/texinputs/myindex.ist $*.idx || exit $?
27+
$srcdir/tools/fix_hack $part.idx || exit $?
28+
makeindex -s $srcdir/texinputs/myindex.ist $part.idx || exit $?
2229
else
2330
# skipping the index; clean up the unused file
24-
rm -f $PART.ind
31+
rm -f $part.ind
32+
fi
33+
if [ "$pdf" ] ; then
34+
$srcdir/tools/toc2bkm.py $part
2535
fi
26-
latex $PART || exit $?
36+
$latex $part || exit $?

0 commit comments

Comments
 (0)