diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/minitoc/pmk')
-rwxr-xr-x | Master/texmf-dist/doc/latex/minitoc/pmk | 137 |
1 files changed, 94 insertions, 43 deletions
diff --git a/Master/texmf-dist/doc/latex/minitoc/pmk b/Master/texmf-dist/doc/latex/minitoc/pmk index a3e9da15ff3..c7f634a2a13 100755 --- a/Master/texmf-dist/doc/latex/minitoc/pmk +++ b/Master/texmf-dist/doc/latex/minitoc/pmk @@ -3,24 +3,40 @@ # choose a type of printer set HEADER=duplex2v.pro # create a backup directory -if ( -d OLD ) then +set w=`whoami` +set OLD=/tmp/$w/OLD +if ( -d $OLD ) then else - mkdir OLD - echo 'OLD directory created' + mkdir -p $OLD + echo "$OLD directory created" endif # save some files into the backup directory -echo 'Saving old files into OLD directory' -mv minitoc.sty mtcoff.sty mtcmess.sty minitoc.ist fminitoc.dtx fminitoc.ist minitoc.pre OLD -mv minitoc.lan fminitoc.lan OLD -mv boldsc.sty mypatches.sty franc.sty frbib.sty frnew.sty OLD -mv mtcpatchmem.sty OLD -mv *.mld OLD -mv *.mlo OLD +echo "Saving old files into $OLD directory" +mv minitoc.sty mtcoff.sty mtcmess.sty minitoc.ist fminitoc.dtx fminitoc.ist minitoc.pre $OLD +mv minitoc.lan fminitoc.lan $OLD +mv boldsc.sty mypatches.sty franc.sty frbib.sty frnew.sty $OLD +mv mtcpatchmem.sty $OLD +mv *.mld $OLD +mv *.mlo $OLD +mv add.bib $OLD +foreach i ( tex ) + mv gaps.$i $OLD + mv apx.$i app-mem.$i mem.$i mem1.$i fo1.$i fo2.$i scr.$i subf.$i tsfc.$i tbi.$i 2c.$i bo.$i hop.$i $OLD + mv cri.$i livre.$i ch0.$i tlc.$i mu.$i hir.$i hia.$i hide1.$i hide2.$i $OLD + mv add.$i addsec.$i minitoc-ex.$i mini-art.$i second.$i $OLD +end +foreach i ( pdf ) + cp gaps.$i $OLD + cp apx.$i app-mem.$i mem.$i mem1.$i fo1.$i fo2.$i scr.$i subf.$i tsfc.$i tbi.$i 2c.$i bo.$i hop.$i $OLD + cp cri.$i livre.$i ch0.$i tlc.$i mu.$i hir.$i hia.$i hide1.$i hide2.$i $OLD + cp add.$i addsec.$i minitoc-ex.$i mini-art.$i second.$i $OLD +end echo 'Creating the package... you can sip a cappuccino' # create the package from minitoc.ins and minitoc.dtx latex minitoc.ins # save the log file of this phase cp minitoc.log minitoc.log1 +cat add.bib |grep -v endinput|grep -v '^%%' > addbib;mv addbib add.bib # create the documentation (DVI): 4 latex runs, with index and biblio if ( -f minitoc.dtx ) then if ( -f minitoc.maf ) then @@ -31,17 +47,17 @@ latex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx bibtex minitoc makeindex -s minitoc.ist -o minitoc.ind minitoc.idx -mv minitoc.ilg minitoc.ilg1 +mv minitoc.ilg minitoc.ilg1 # latex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx makeindex -s minitoc.ist -o minitoc.ind minitoc.idx -mv minitoc.ilg minitoc.ilg1 +mv minitoc.ilg minitoc.ilg1 # latex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx makeindex -s minitoc.ist -o minitoc.ind minitoc.idx -mv minitoc.ilg minitoc.ilg1 +mv minitoc.ilg minitoc.ilg1 # latex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx @@ -53,17 +69,17 @@ pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx bibtex minitoc makeindex -s minitoc.ist -o minitoc.ind minitoc.idx -mv minitoc.ilg minitoc.ilg1 +mv minitoc.ilg minitoc.ilg1 # pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx makeindex -s minitoc.ist -o minitoc.ind minitoc.idx -mv minitoc.ilg minitoc.ilg1 +mv minitoc.ilg minitoc.ilg1 # pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx makeindex -s minitoc.ist -o minitoc.ind minitoc.idx -mv minitoc.ilg minitoc.ilg1 +mv minitoc.ilg minitoc.ilg1 # pdflatex minitoc.dtx sed -e's/:>/=/' < minitoc.idx > minitoc.idx1; mv minitoc.idx1 minitoc.idx @@ -79,17 +95,17 @@ latex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx bibtex fminitoc makeindex -s fminitoc.ist -o fminitoc.ind fminitoc.idx -mv fminitoc.ilg fminitoc.ilg1 +mv fminitoc.ilg fminitoc.ilg1 # latex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx makeindex -s fminitoc.ist -o fminitoc.ind fminitoc.idx -mv fminitoc.ilg fminitoc.ilg1 +mv fminitoc.ilg fminitoc.ilg1 # latex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx makeindex -s fminitoc.ist -o fminitoc.ind fminitoc.idx -mv fminitoc.ilg fminitoc.ilg1 +mv fminitoc.ilg fminitoc.ilg1 # latex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx @@ -101,70 +117,105 @@ pdflatex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx bibtex fminitoc makeindex -s fminitoc.ist -o fminitoc.ind fminitoc.idx -mv fminitoc.ilg fminitoc.ilg1 +mv fminitoc.ilg fminitoc.ilg1 # pdflatex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx makeindex -s fminitoc.ist -o fminitoc.ind fminitoc.idx -mv fminitoc.ilg fminitoc.ilg1 +mv fminitoc.ilg fminitoc.ilg1 # pdflatex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx makeindex -s fminitoc.ist -o fminitoc.ind fminitoc.idx -mv fminitoc.ilg fminitoc.ilg1 +mv fminitoc.ilg fminitoc.ilg1 # pdflatex fminitoc.dtx sed -e's/:>/=/' < fminitoc.idx > fminitoc.idx1; mv fminitoc.idx1 fminitoc.idx else echo 'French is still missing' endif +# composition +####################### +foreach f ( add addsec ) +foreach i ( 1 2 3 ) +pdflatex $f +bibtex $f +if ( -e $f.idx ) then + makeindex -s gind.ist -o $f.ind $f.idx +endif +if ( -e $f.glo ) then + makeindex -s gglo.ist -o $f.gls $f.glo +endif +end +if ( -e $f.maf ) then + \rm -f `cat $f.maf` $f.aux $f.log $f.toc $f.bbl $f.blg $f.lof $f.lot $f.ind $f.idx %f.ind +endif +end +####################### +foreach f ( hide1 hide2 apx app-mem mem mem1 fo1 fo2 scr subf \ + tsfc tbi 2c bo hop cri livre ch0 tlc mu hir hia gaps \ + minitoc-ex mini-art second ) + foreach i ( 1 2 3 ) + pdflatex $f + end +if ( -e $f.maf ) then + \rm -f `cat $f.maf` $f.aux $f.log $f.toc $f.bbl $f.blg $f.lof $f.lot $f.ind $f.idx %f.ind +endif +end # repartition echo 'Repartition of files into classes' +set WCL=/tmp/$w/CL foreach i ( 0 1 2 3 4 5 6 7 8 9 ) - if ( -e CL$i ) then - \rm -rf CL$i + if ( -e ${WCL}$i ) then + \rm -rf ${WCL}$i endif - if ( -d CL$i ) then - \rm -rf CL$i/* - rmdir CL$i + if ( -d ${WCL}$i ) then + \rm -rf ${WCL}$i/* + rmdir ${WCL}$i else - mkdir CL$i + mkdir -p ${WCL}$i endif end # class 0 echo 'Class 0' -cp minitoc.dtx minitoc.ins fminitoc.dtx CL0 +cp minitoc.dtx minitoc.ins fminitoc.dtx ${WCL}0 # class 1 echo 'Class 1' -cp minitoc.sty mtcoff.sty mtcmess.sty mtcpatchmem.sty CL1 -cp *.mld *.mlo CL1 +cp minitoc.sty mtcoff.sty mtcmess.sty mtcpatchmem.sty ${WCL}1 +cp *.mld *.mlo ${WCL}1 # class 2 echo 'Class 2' -cp INSTALL minitoc.l README catalog TODO CL2 +cp INSTALL minitoc.l README catalog TODO ${WCL}2 # class 3 echo 'Class 3' -cp minitoc-ex.tex mini-art.tex add.tex addsec.tex add.bib CL3 -cp hide1.tex hide2.tex apx.tex gaps.tex CL3 +cp add.bib ${WCL}3 +foreach i ( tex pdf ) + cp minitoc-ex.$i mini-art.$i add.$i addsec.$i ${WCL}3 + cp hide1.$i hide2.$i apx.$i app-mem.$i mem.$i mem1.$i ${WCL}3 + cp fo1.$i fo2.$i scr.$i subf.$i tsfc.$i tbi.$i 2c.$i bo.$i hop.$i cri.$i ${WCL}3 + cp livre.$i ch0.$i tlc.$i mu.$i hir.$i hia.$i ${WCL}3 + cp gaps.$i second.$i ${WCL}3 +end # class 4 echo 'Class 4' -cp minitoc.bug minitoc.sum CL4 +cp minitoc.bug minitoc.sum ${WCL}4 # class 5 echo 'Class 5' -cp minitoc.dtx minitoc.ins minitoc.bib minitoc.ist minitoc.lan plainurl.bst CL5 -cp lamed.eps lamed.pdf lamed.tex CL5 +cp minitoc.dtx minitoc.ins minitoc.bib minitoc.ist minitoc.lan plainurl.bst ${WCL}5 +cp lamed.eps lamed.pdf lamed.tex ${WCL}5 # class 6 echo 'Class 6' -cp minitoc.dtx fminitoc.dtx fminitoc.bib fminitoc.ist fminitoc.lan minitoc.pre CL6 -cp franc.sty frbib.sty frnew.sty frplain1.bst CL6 +cp minitoc.dtx fminitoc.dtx fminitoc.bib fminitoc.ist fminitoc.lan minitoc.pre ${WCL}6 +cp franc.sty frbib.sty frnew.sty frplain1.bst ${WCL}6 # class 7 echo 'Class 7' -cp minitoc.pdf minitoc.ps CL7 +cp minitoc.pdf minitoc.ps ${WCL}7 # class 8 echo 'Class 8' -cp fminitoc.pdf fminitoc.ps CL8 +cp fminitoc.pdf fminitoc.ps ${WCL}8 # class 9 echo 'Class 9' -cp pmk imk emk fmk rmk duplex2v.pro CL9 +cp pmk imk emk fmk rmk xmk duplex2v.pro ${WCL}9 # Cleaning echo "Cleaning" if ( -f minitoc.maf ) then @@ -174,6 +225,6 @@ if ( -f fminitoc.maf ) then cat fminitoc.maf | xargs -i -t \rm {} endif # it's all! -echo "It's all, folks..." +echo "It's all, folks..." exit |