diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/bosisio/makedoc')
-rw-r--r-- | Master/texmf-dist/doc/latex/bosisio/makedoc | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/bosisio/makedoc b/Master/texmf-dist/doc/latex/bosisio/makedoc new file mode 100644 index 00000000000..dfebbcaa5a5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bosisio/makedoc @@ -0,0 +1,103 @@ + ######################################################### + # # + # FILE makedoc # + # # + # Copyright(C) by F. Bosisio, 6 September 1997 # + # # + # E-mail: bosisio@mate.polimi.it # + # # + ######################################################### +# +# If there isn't a command-line parameter, ask for a filename +# +if test $1 +then + FILE=$1 +else + echo ' Insert the filename you want to process with makedoc' + read + FILE=$REPLY +fi +# +# Strip the ".dtx" extension (if present) and check that the file exists +# +FILE=`basename $FILE .dtx` +test -f $FILE.dtx || exit +# +# Run LaTeX on the ".dtx" file to generate the ".sty" and ".drv" files +# +echo +echo " Running LaTeX on $FILE.dtx ..." +echo +latex $FILE.dtx || exit +# +# Run LaTeX once to generate the ".aux", ".idx" and ".glo" files +# +echo +echo " Running LaTeX on $FILE.drv ..." +echo +latex $FILE.drv || exit +# +# Run BibTeX to generate the bibliography file (".bbl") +# +if grep bibdata $FILE.aux +then + echo + echo " Running BibTeX on $FILE.aux ..." + echo + bibtex $FILE || exit + rm $FILE.blg +fi +# +# Run MakeIndex on the index file +# +if test $FILE.idx +then + echo + echo " Running MakeIndex on $FILE.idx ..." + echo + makeindex -s gind.ist -o $FILE.ind $FILE.idx || exit + rm $FILE.ilg +fi +# +# Run MakeIndex on the glossary file +# +if test $FILE.glo +then + echo + echo " Running MakeIndex on $FILE.glo ..." + echo + makeindex -s gglo.ist -o $FILE.gls $FILE.glo || exit + rm $FILE.ilg +fi +# +# Rerun LaTeX to read the ".bbl", ".ind" and ".gls" files +# +echo +echo ' Re-running LaTeX on $FILE.drv ...' +echo +latex $FILE.drv +# +# Rerun LaTeX again to get the cross-references right +# +if grep "Rerun to get cross-references right" makedoc.log +then + echo + echo ' Re-running LaTeX again on $FILE.drv ...' + echo + latex $FILE.drv +fi +rm $FILE.drv $FILE.log $FILE.aux $FILE.ind $FILE.glo $FILE.bbl $FILE.idx $FILE.gls +# +# Show the generated output +# +xdvi $FILE.dvi +# +# Run DviPs to produce the postscript file +# +echo +echo ' Running DviPs ...' +echo +dvips $FILE.dvi +rm $FILE.dvi + |