#! /bin/csh if ( -f minitoc.dtx ) then echo 'Creating the english documentation...' if ( -f minitoc.maf ) then \rm minitoc.maf endif # create the english documentation (PDF): 4 pdflatex runs, with index and biblio pdflatex minitoc.dtx touch minitoc.ind minitoc.idx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx # grep -v 'indexentry{! =' minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx bibtex minitoc # sed -e's/\hfill{}/&\\ATOC{/' < minitoc.ind | sed -e 's/\\hfill}/}&/' > minitoc.ind2; mv minitoc.ind2 minitoc.ind makeindex -s minitoc.ist -o minitoc.ind minitoc.idx # sed -e's/\hfill{}/&\\ATOC{/' < minitoc.ind | sed -e 's/\\hfill}/}&/' > minitoc.ind2; mv minitoc.ind2 minitoc.ind mv minitoc.ilg minitoc.ilg1 # pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx # grep -v 'indexentry{! =' minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx makeindex -s minitoc.ist -o minitoc.ind minitoc.idx # sed -e's/\hfill{}/&\\ATOC{/' < minitoc.ind | sed -e 's/\\hfill}/}&/' > minitoc.ind2; mv minitoc.ind2 minitoc.ind mv minitoc.ilg minitoc.ilg1 # pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx # grep -v 'indexentry{! =' minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx makeindex -s minitoc.ist -o minitoc.ind minitoc.idx # sed -e's/\hfill{}/&\\ATOC{/' < minitoc.ind | sed -e 's/\\hfill}/}&/' > minitoc.ind2; mv minitoc.ind2 minitoc.ind mv minitoc.ilg minitoc.ilg1 # pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx # grep -v 'indexentry{! =' minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx # cleaning echo 'Cleaning' if ( -f minitoc.maf ) then cat minitoc.maf | xargs -i -t \rm {} endif endif