This script was inspired by a posting from Karsten Roemke (dot at dot) with subject "psfrag pdflatex, lange her" in de.comp.text.tex on 2003-11-11 05:25:44 PST. Karsten Roemke was inspired for his solution by postings from Thomas Wimmer.