1 --- groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh.sectmp 2006-10-23 14:12:41.000000000 +0200
2 +++ groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh 2006-10-23 14:20:20.000000000 +0200
4 # 2. Process through eqn(1) to emit troff markup.
5 # 3. Process through groff(1) to emit Postscript.
6 # 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
8 -trap "rm ${tmp}.*" 0 2 15
10 +tmpps=`mktemp /tmp/eqn2graph-XXXXXXXX.ps`
11 +tmpfmt=`mktemp /tmp/eqn2graph-XXXXXXXX.$format`
12 +trap "rm $tmpps $tmpfmt" 0 2 15
14 (echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \
15 - groff -e $groff_opts -Tps >${tmp}.ps \
16 - && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
17 - && cat ${tmp}.${format}
18 + groff -e $groff_opts -Tps >$tmpps \
19 + && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
23 --- groff-1.18.1.4/contrib/pic2graph/pic2graph.sh.sectmp 2006-10-23 14:12:41.000000000 +0200
24 +++ groff-1.18.1.4/contrib/pic2graph/pic2graph.sh 2006-10-23 14:18:57.000000000 +0200
26 # 2. Process through eqn and pic to emit troff markup.
27 # 3. Process through groff to emit Postscript.
28 # 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
29 -tmp=/tmp/pic2graph-$$
30 -trap "rm ${tmp}.*" 0 2 15
32 +tmpps=`mktemp /tmp/pic2graph-XXXXXXXX.ps`
33 +tmpfmt=`mktemp /tmp/pic2graph-XXXXXXXX.$format`
34 +trap "rm $tmpps $tmpfmt" 0 2 15
35 (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
36 - groff -e -p $groffpic_opts -Tps >${tmp}.ps \
37 - && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
38 - && cat ${tmp}.${format}
39 + groff -e -p $groffpic_opts -Tps >$tmpps \
40 + && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \