#! /bin/bash
# pst2pdf_for_latexmk
# PSTricks 2 PDF converter :
# Usage:
# pst2pdf_for_latexmk
# produces PDF files for all files of the form *-fig*.tex
# pst2pdf_for_latexmk <FILE>
# only considers FILE-fig*.tex
# Modified from pst2pdf distributed with pdftricks.sty to use latexmk
# IT REQUIRES VERSION 3.21 OR HIGHER OF latexmk
# For each pdf file will only be made if the tex source is out-of-date
# This version of pst2pdf does not clean up generated files: they are
# needed by latexmk to determine whether or not the pdf file is
# out-of-date.
#
# To use this automatically with latexmk (linux/UNIX system assumed)
# 1. Install this script (pst2pdf_for_latexmk) somewhere in your PATH
# 2. Put a line like the following in an initialization file for latexmk:
# $pdflatex = 'pdflatex %O %S; pst2pdf_for_latexmk %B';
# 13 Oct 2016 John Collins: Remove outdated URL and version information
# 1 Oct 2007 John Collins: Remove path from latexmk
# 28 Sep 2007 Herb Schulz processing steprs of figure files changed for no rotation and better BoundingBox
# 27 Sep 2007 John Collins
# 26 Sep 2007 John Collins