use ptex2pdf for ptex if it is available