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