summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/bashscript
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/bashscript')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh95
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh1
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/fpost1
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed5
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh6
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/laproof13
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/lbproof16
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/lcproof13
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh9
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh8
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh10
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh8
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh32
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh9
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh7
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh15
16 files changed, 248 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh
new file mode 100644
index 00000000000..ff908c37ed9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh
@@ -0,0 +1,95 @@
+#! /bin/bash
+# Execute this script with the command
+# bashscript/dosome.sh < /dev/null > dosome.log
+# (from the featpost root directory)
+# Don't worry about the error messages.
+# L. Nobre G.
+# IYP (2005)
+
+export TEX=latex
+mkdir alleps
+mkdir allpng
+mkdir allps
+mkdir ppm
+mkdir galreyimages
+cd macro
+mpost --ini featpost.mp
+cd ..
+ln -s macro/featpost.mem
+ln -s latex/mflogohack.sty
+echo \\documentclass[twocolumn]{article}\
+ \\usepackage[dvips]{epsfig}\
+ \\usepackage{mflogohack}\
+ \\begin{document}\
+ \\title{\\FP\\ Exemplifier}\
+ \\author{L.\\ Nobre G.}\
+ \\maketitle\
+ \\begin{center}\
+ > FeatPostExemplifier.tex
+for a in example/standard/*.mp
+do
+ b=`basename $a .mp`
+ mpost -mem featpost example/standard/$b
+ for c in $b.?
+ do
+ echo \\vfill\
+ \\begin\{tabular\}\{c\}\
+ \\epsfig\{file=$c\,width=0.9\\columnwidth\} \\\\\
+ \\texttt\{$c\}\
+ \\end\{tabular\} \\\\ >> FeatPostExemplifier.tex
+ echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\begin{document}\\pagestyle{empty}\\epsfig{file=$c,width=0.9\\textwidth}\\end{document} > $c.latex
+ latex $c.latex
+ dvips -E -o $c.PS $c.dvi
+ epstopdf --nogs $c.PS > $c.eps
+ gs -q -sDEVICE=png256 -r120 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dCOLORSCREEN -dNOPAUSE -sOutputFile=$c.gs.png $c.eps
+# composite -filter Lanczos -geometry 300x300 -gravity Center $c.gs.png png/borderframetest.png ppm/t_$c.ppm
+ composite -filter Lanczos -geometry 120x120 -gravity Center $c.gs.png png/border140.png ppm/t_$c.ppm
+ done
+ for ((num=0;num<10;num=num+1))
+ do
+ cp $b.$num.gs.png galreyimages/$b$num.png
+ mv ppm/t_$b.$num.ppm ppm/t_$b$num.ppm
+ done
+done
+echo \\end{center}\\end{document} >> FeatPostExemplifier.tex
+latex FeatPostExemplifier.tex
+dvips -o FeatPostExemplifier.ps FeatPostExemplifier.dvi
+bzip2 FeatPostExemplifier.ps
+mv FeatPostExemplifier.ps.bz2 doc/
+rm FeatPostExemplifier.*
+rm mflogohack.sty
+rm *.?.PS *.?.aux *.?.latex *.?.dvi *.log *.?.mgk *.?.orig
+rm example/standard/*.mpx
+mv *.? allps/
+mv *.?.gs.png allpng/
+mv *.?.png nontextualpng/
+mv *.?.eps alleps/
+#animate -delay 125 ppm/* &
+cd doc
+linuxdoc -B html --split=2 --toc=2 featpost.sgml
+linuxdoc -B latex featpost.sgml
+mv featpost.tex ../latex/
+cd ../latex
+latex featpost.tex
+latex featpost.tex
+dvips -o featpost.ps featpost.dvi
+ps2pdf featpost.ps
+mv featpost.ps featpost.pdf ../doc/
+#sed 's/article/ltugboat/' featpost.tex > tugboatMan.tex
+#latex tugboatMan.tex
+#latex tugboatMan.tex
+#dvips -o ../doc/tugboatMan.ps tugboatMan.dvi
+cd ../galrey
+source galrey.sh
+cd ..
+for a in ppm/t_*.ppm
+do
+ convert $a galreyimages/`basename $a ppm`png
+done
+pwd
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh
new file mode 100755
index 00000000000..4fe6fd4265a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh
@@ -0,0 +1 @@
+gs -q -sDEVICE=jpeggray -dNOPAUSE -sOutputFile=eps.jpeg $1 </dev/null
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/fpost b/Master/texmf-dist/doc/metapost/featpost/bashscript/fpost
new file mode 100644
index 00000000000..63d3588a4c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/fpost
@@ -0,0 +1 @@
+mpost -mem featpost example/standard/$1 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed
new file mode 100644
index 00000000000..6fe8c6ed0c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed
@@ -0,0 +1,5 @@
+4i\
+\
+%input featpost3D;\
+%input par3Dplotmacros; % Contributed by J. Schwaiger \
+%input featpost2D;
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh
new file mode 100755
index 00000000000..d562871aed7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh
@@ -0,0 +1,6 @@
+for a in *.mp; do mv $a `basename $a mp`mpN; done
+for a in *.mpN
+ do sed -f ../bashscript/insertinputcommands.sed $a > `basename $a mpN`mp
+done
+#rm *.mpN
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/laproof b/Master/texmf-dist/doc/metapost/featpost/bashscript/laproof
new file mode 100755
index 00000000000..298e99a382e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/laproof
@@ -0,0 +1,13 @@
+#!/bin/sh
+name=`basename $1 .mp`
+figname=$name.$2
+echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname}\\end{document} > $figname.latex
+latex $figname.latex
+dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi
+# epstopdf -d --nogs $figname.eps > $name.eps
+# Modification of an original by J.M.C.Esteves
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/lbproof b/Master/texmf-dist/doc/metapost/featpost/bashscript/lbproof
new file mode 100755
index 00000000000..491bdb66a83
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/lbproof
@@ -0,0 +1,16 @@
+#!/bin/sh
+name=`basename $1 .mp`
+figname=$name.$2
+#mpost -mem featpost $name
+echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\setlength{\\paperwidth}{8.2in}\\setlength{\\paperheight}{11.2in}\\setlength{\\textwidth}{8in}\\setlength{\\textheight}{11in}\\setlength{\\voffset}{-1in}\\setlength{\\hoffset}{-1in}\\setlength{\\topmargin}{0pt}\\setlength{\\headheight}{0pt}\\setlength{\\headsep}{0pt}\\setlength{\\oddsidemargin}{0pt}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname,width=\\columnwidth,clip=}\\end{document} > $figname.latex
+latex $figname.latex
+dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi
+#epstopdf -d --nogs $figname.eps > tmp.eps
+#gs -sDEVICE=jpeggray -dNOPAUSE -sOutputFile=$name.jpeg tmp.eps </dev/null
+#rm -v tmp.eps
+# Modification of an original by J.M.C.Esteves
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/lcproof b/Master/texmf-dist/doc/metapost/featpost/bashscript/lcproof
new file mode 100755
index 00000000000..27ba07313bf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/lcproof
@@ -0,0 +1,13 @@
+#!/bin/sh
+name=`basename $1 .mp`
+figname=$name.$2
+echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\setlength{\\paperwidth}{8.2in}\\setlength{\\paperheight}{11.2in}\\setlength{\\textwidth}{8in}\\setlength{\\textheight}{11in}\\setlength{\\voffset}{-1in}\\setlength{\\hoffset}{-1in}\\setlength{\\topmargin}{0pt}\\setlength{\\headheight}{0pt}\\setlength{\\headsep}{0pt}\\setlength{\\oddsidemargin}{0pt}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname,height=\\textheight,clip=}\\end{document} > $figname.latex
+latex $figname.latex
+dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi
+# epstopdf -d --nogs $figname.eps > $name.eps
+# Modification of an original by J.M.C.Esteves
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh
new file mode 100644
index 00000000000..7753995c94e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh
@@ -0,0 +1,9 @@
+#! /bin/bash
+cd latex
+latex logofeatpost.tex
+dvips -E -o logofeatpost.ps logofeatpost.dvi
+epstopdf -d -nogs logofeatpost.ps > featpost.eps
+gs -q -sDEVICE=png256 -r300x300 -dNOPAUSE -sOutputFile=featpost.png featpost.eps </dev/null
+cp featpost.png featpost2.png
+mogrify -geometry 25% featpost2.png
+cd ..
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh
new file mode 100755
index 00000000000..cb96f1a651a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd latex/
+sgml2latex ../doc/macroMan.sgml
+sed 's/article/ltugboat/' macroMan.tex > tugboatMan.tex
+latex tugboatMan.tex
+dvips -o ../doc/tugboatMan.ps tugboatMan.dvi
+rm -v tugboatMan.???
+cd ../ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh
new file mode 100644
index 00000000000..aa86f2f943c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh
@@ -0,0 +1,10 @@
+#! /bin/bash
+# L. Nobre G.
+# IYP (2005)
+
+mkdir nontextualpng
+for a in allps/*
+do
+ convert -bordercolor white -border 20x20 -transparent white \
+ -format png $a nontextualpng/`basename $a`.png
+done
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh
new file mode 100755
index 00000000000..82629e1415b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh
@@ -0,0 +1,8 @@
+#! /bin/bash
+sed -n '/ def /p' macro/la3Dmacros.mp > la3Ddef.txt
+sed -n '/ vardef /p' macro/hlr3Dmacros.mp > hlr3Dvardef.txt
+sed -n '/ def /p' macro/hlr3Dmacros.mp > hlr3Ddef.txt
+cat la3Ddef.txt hlr3Dvardef.txt hlr3Ddef.txt > alldef.txt
+rm -v la3Ddef.txt hlr3Dvardef.txt hlr3Ddef.txt
+# there are two "vardefined" procedures:
+# makeline@# and makeface@#
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh
new file mode 100644
index 00000000000..cb37397d06b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh
@@ -0,0 +1,32 @@
+#! /bin/bash
+# remfi.sh
+# L. Nobre G.
+# IYP (2005)
+rm -fR alleps allpng allps ppm galreyimages
+rm macro/*~ example/standard/*.mpx example/standard/*~
+rm doc/*~ bashscript/*~ latex/*~ *~
+rm latex/featpost.*
+rm latex/tugboatMan.*
+rm latex/macroMan.dvi
+rm latex/macroMan.log
+rm latex/macroMan.aux
+rm doc/featpost.ps
+rm doc/featpost.pdf
+rm doc/featpost.html
+rm doc/featpost-*.html
+rm doc/tugboatMan.ps
+rm galrey/galrey.fn
+rm galrey/galrey.ls
+rm galrey/galrey.memo
+rm galrey/galrey.nms
+rm *.tex *.aux *.dvi *.log *.latex *.eps *.?
+rm macro/featpost.mem macro/featpost.log
+rm *.?.PS *.?.aux *.?.latex *.?.dvi *.log *.?.mgk *.?.orig
+rm *.?.gs.png *.?.png
+rm featpost.mem
+rm doc/featpost.sgml.flc
+rm macro/featpost3Dplus2D.mp.flc
+rm doc/FeatPostExemplifier.ps.bz2
+rm mflogohack.sty
+cd ..
+tar cvzf down/featpost.tgz featpost/
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh
new file mode 100644
index 00000000000..a1d41226431
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh
@@ -0,0 +1,9 @@
+for a in *; do cp $a $a.NEW; done
+for a in *.NEW
+do
+ b=`basename $a .NEW`
+ sed -e '/%input featpost2D;/d' $a > $b
+# echo $a ----- $b
+done
+rm *.NEW
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh
new file mode 100644
index 00000000000..2afdf6f28c4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh
@@ -0,0 +1,7 @@
+for a in *; do mv $a `basename $a`.NEW; done
+#for a in *.mp; do mv $a `basename $a mp`mpN; done
+for a in *.NEW
+ do sed -e 's/featpost3D/featpost3Dplus2D/' $a > `basename $a .NEW`
+done
+rm *.NEW
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh
new file mode 100644
index 00000000000..4cef12f11fb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh
@@ -0,0 +1,15 @@
+prefwidth=640
+prefheigh=480
+prefratio=$(( 1000 * $prefwidth / $prefheigh ))
+tmpfilename=`mktemp simpleviewer.XXXXXX`
+epstopdf --nogs $1 > $tmpfilename
+epswidth=`identify $tmpfilename | cut -d " " -f 3 | cut -d x -f 1`
+epsheigh=`identify $tmpfilename | cut -d " " -f 3 | cut -d x -f 2`
+aspectra=$(( 1000 * $epswidth / $epsheigh ))
+if test $aspectra -ge $prefratio
+then resol=$(( 72 * $prefwidth / $epswidth ))
+else resol=$(( 72 * $prefheigh / $epsheigh ))
+fi
+echo " Resolution:" $resol "dpi."
+gs -q -r$resol -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 $tmpfilename
+rm $tmpfilename \ No newline at end of file