TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work with some scripts that automatically convert the fonts in a plot using psfrag and pstool to another font.

However these fail if I use texlive. They work with Miktex. Since I get requests from Linux users to make the scripts work on Linux I would like to know better why I get these problems.

The script is based on Matlab. If you are interested in all details see svn source and explanation/documentation.

The code that is created is like this one

\documentclass[11pt, oneside]{article}


with the Figure file TEMP9134, which contains all psfrag calls

\psfrag{011}[cl][cl]{\matlabtextA Validation Data}%
\psfrag{012}[cl][cl]{\matlabtextA Fit}%
\psfrag{013}[cl][cl]{\matlabtextA Model}%
\psfrag{014}[cl][cl]{\matlabtextA Data}%

for this eps file

  • If I call the main tex file with pdflatex from miktex with enabled shell escape everything works.
  • If I call the main tex with pdflatex from texlive without enabling shell escape no error occurs, because the pstool package disables itself without shell escape.
  • If I I call the main tex with pdflatex from texlive with enabling shell escape TeX stops with the error

    (c:/texlive/2011/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))" (./pstool-statusfile.txt)Das System kann den angegebenen Pfad nicht finden. ! Missing number, treated as zero.

The corresponding log file is more informative

runsystem(cd "./"& del "pstool-statusfile.txt" )...executed.
! Missing number, treated as zero.
<to be read again> 

pstool-statusfile.txt contains this

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (Web2C 2011)
 \write18 enabled.
entering extended mode

Here I have no clue what is going wrong actually. Any ideas are welcome.

share|improve this question
With TeX Live 2011 on a Mac I get the expected result. – egreg Jun 10 '12 at 17:01
up vote 2 down vote accepted

del is not a Unix command ; you should use rm on Unix-like operating systems. You may want to use the ifplatform package to detect the platform.

share|improve this answer
I have not looked at the code of the package, but the error message is from windows. – Matthias Pospiech Jun 11 '12 at 18:06
This Question and [tex.stackexchange.com/questions/60084/… are related to each other. – texenthusiast Sep 29 '12 at 16:27
With the latest Texlive 2012, the pstool with psfrag is working well both Windows 7 and Ubuntu 12.04. No issues of any sort. Although i have not checked with Miktex 2.9. – texenthusiast Sep 29 '12 at 16:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.