| 1 |
#! /bin/bash |
| 2 |
# pst2pdf |
| 3 |
# PSTricks 2 PDF converter : |
| 4 |
# Usage: "pst2pdf" produces PDF files for all files of the form *-fig*.tex |
| 5 |
# "pst2pdf <FILE>" only considers FILE-fig.tex |
| 6 |
# It removes intermediary files at the end. |
| 7 |
|
| 8 |
FILE=$1 |
| 9 |
if test -z $FILE; then |
| 10 |
FIGURES=`ls *-fig*.tex`; |
| 11 |
else |
| 12 |
FIGURES=`ls -- $FILE-fig*.tex`; |
| 13 |
fi |
| 14 |
|
| 15 |
for f in $FIGURES ; do |
| 16 |
fig=`basename $f .tex` |
| 17 |
latex $fig |
| 18 |
dvips -Ppdf -E -o $fig.eps $fig |
| 19 |
epstopdf $fig.eps |
| 20 |
rm $fig.eps $fig.dvi $fig.log $fig.aux |
| 21 |
done |
| 22 |
|