summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/runltxb
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/lgc2/runltxb
Initial commit
Diffstat (limited to 'info/examples/lgc2/runltxb')
-rw-r--r--info/examples/lgc2/runltxb54
1 files changed, 54 insertions, 0 deletions
diff --git a/info/examples/lgc2/runltxb b/info/examples/lgc2/runltxb
new file mode 100644
index 0000000000..78b4263349
--- /dev/null
+++ b/info/examples/lgc2/runltxb
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# $Id: runltxb,v 1.5 2007/06/05 21:36:56 frank Exp $
+#
+
+F=`basename $1 .ltxb`
+if test `ls $F-*.eps 2>/dev/null | wc -l` -gt 0
+then
+ echo $F-*.eps already made
+ exit
+fi
+
+## No EPS file yet --> run LaTeX
+
+LATEX=latex
+export HOMETEXMF=../texmf:
+export TEXMFHOME=../texmf:
+#export TEXINPUTS=../figures/beamer:
+ echo "*************************** latex $F.ltxb FIRST RUN "
+
+$LATEX $F.ltxb
+if test $? -gt 0
+ then
+ echo "*************************** latex $F.ltxb has ERRORS"
+ exit 1
+fi
+# we need two runs for some PSTricks examples
+ echo "*************************** latex $F.ltxb SECOND RUN "
+
+$LATEX $F.ltxb
+if test $? -gt 0
+ then
+ echo "*************************** latex $F.ltxb has ERRORS"
+ exit 1
+fi
+PAGES=`grep "% Show page(s)" $F.ltxb | sed 's/% Show page(s)//'| sed 's/,/ /g'`
+
+for p in $PAGES ; do
+ echo run dvips on page $p to make $F-$p.eps
+ dvips -j0 -E $PARAM $F -p $p -n 1 -o $F-$p.eps
+
+grep 'graphic converted to gray in book' $F.ltxb > /dev/null
+if test $? = 0
+then
+ awk -f dogray.awk $F-$p.eps > tmp.eps
+ mv tmp.eps $F-$p.eps
+fi
+
+./cleaneps $F-$p.eps
+done
+echo made pages $PAGES
+rm -f tmp.eps $F.dvi $F.aux $F.log $F.nav $F.out $F.snm $F.toc $F.vrb
+
+