 
#!/bin/bash
#
# Script for automating the generation of pdf-pictures from plots in
# gnuplot, via latex to get axis annotations and legends in the 
# correct font.
#
# The conversion to pdf is done via epstopdf, gnuplot uses postscript
# command, so the detour via postscript is necessary.
#
# This script is only a wrapper script for gptex2eps, which is called
# by this script with the '-pdf'-option.
#
# $Id: gptex2pdf,v 1.2 2003/10/28 18:56:57 berland Exp $
# $Source: /home/pvv/d/berland/etc/cvsrepo/gnuplottex2eps/prog/gptex2pdf,v $
#

function die
{
    echo "$1"
    echo "Exiting..."
    exit
}

# Check if gptex2eps exists in $PATH
which gptex2eps >/dev/null 2>&1 \
    || die " (Error) Could not find 'gptex2eps'. It must be installed for gptex2pdf to work."

gptex2eps -pdf "$@"
