#!/bin/bash
# To generate style examples, do
# (after extracting powerdot-styleexample.tex):
# Do this for all available styles (replace `default' by any
# other style name) to generate .001 and .002 files which
# will be included by the documentation.

latex powerdot.tex 

   latex "\def\style{default}\input{powerdot-styleexample}"
   latex "\def\style{default}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-default.ps
#
   latex "\def\style{ciment}\input{powerdot-styleexample}"
   latex "\def\style{ciment}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-ciment.ps
#
   latex "\def\style{aggie}\input{powerdot-styleexample}"
   latex "\def\style{aggie}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-aggie.ps
#
   latex "\def\style{bframe}\input{powerdot-styleexample}"
   latex "\def\style{bframe}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-bframe.ps
#
   latex "\def\style{elcolors}\input{powerdot-styleexample}"
   latex "\def\style{elcolors}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-elcolors.ps
#
   latex "\def\style{fyma}\input{powerdot-styleexample}"
   latex "\def\style{fyma}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-fyma.ps
#
   latex "\def\style{horatio}\input{powerdot-styleexample}"
   latex "\def\style{horatio}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-horatio.ps
#
   latex "\def\style{husky}\input{powerdot-styleexample}"
   latex "\def\style{husky}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-husky.ps
#
   latex "\def\style{ikeda}\input{powerdot-styleexample}"
   latex "\def\style{ikeda}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-ikeda.ps
#
   latex "\def\style{jefka}\input{powerdot-styleexample}"
   latex "\def\style{jefka}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-jefka.ps
#
   latex "\def\style{klope}\input{powerdot-styleexample}"
   latex "\def\style{klope}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-klope.ps
#
   latex "\def\style{paintings}\input{powerdot-styleexample}"
   latex "\def\style{paintings}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-paintings.ps
#
   latex "\def\style{pazik}\input{powerdot-styleexample}"
   latex "\def\style{pazik}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-pazik.ps
#
   latex "\def\style{sailor}\input{powerdot-styleexample}"
   latex "\def\style{sailor}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-sailor.ps
#
   latex "\def\style{simple}\input{powerdot-styleexample}"
   latex "\def\style{simple}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-simple.ps
#
   latex "\def\style{tycja}\input{powerdot-styleexample}"
   latex "\def\style{tycja}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-tycja.ps
#
   latex "\def\style{upen}\input{powerdot-styleexample}"
   latex "\def\style{upen}\input{powerdot-styleexample}"
   dvips -i powerdot-styleexample -o powerdot-styleexample-upen.ps

latex powerdot.tex
latex powerdot.tex
bibtex powerdot
makeindex -s gglo.ist -o powerdot.gls powerdot.glo
makeindex -s gind.ist -o powerdot.ind powerdot.idx
latex powerdot.tex
latex powerdot.tex
dvips powerdot.dvi
ps2pdf powerdot.ps
latex powerdotDE.tex
latex powerdotDE.tex

rm *.aux *.log *.i?? *.g?? *.toc *.dvi *.blg *.ps  *.bm *.bbl
rm powerdot-styleexample-*


# If you also want to generate the source code documentation,
# remove \OnlyDescription from the preamble of powerdot.dtx
# prior to compiling the source.
#
