Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to set up my system to write a large document using pdflatex and the package pstool. While there is no problem with basic operation, I have a problem when I try to use it in a more structured way.

I have the document organized in a directory like that:


the file chap1.tex is input-ed by mainfile, and in it the first command reads like \graphicspath{{chap1figures/}}. I load all the psfrag substitutions in the preamble.

To make pstool work I have to add the same \graphicspath{{chap1figures/}} in the preamble file for it, which is not a big problem. The problem is that the figure created by pstool ends in the main directory, and not in the correct sub-folder, creating clutter and possible problems for conflicting names.

Do you know if it's possible to tell pstool to just cd down the appropriate sub-folder and do all the work there?

share|improve this question
It would depend on your graphicspath heirarchy relative to main.tex folder and on which platform os ,one may need a symbolic path done refer 5.3 A note on file paths – texenthusiast Oct 16 '13 at 22:49
Thanks for the link (thanks to that I saw I have a quite old pstool version --- the one that come with Ubuntu 13.04 is 1.3). But the problem is different --- I know how to make the file accessible by pstool, what I am looking after is to find a way to tell to pstool to create the new files in the subdirectory, no in the main ones. – Rmano Oct 18 '13 at 1:13
Ubuntu TeXLive is not always uptodate with latest ctan repository. hence install and refer…. With the latest 1.5a pstool should create the pdf figure(from auxiliary process) in subdir (where psfrag-figure.eps and psfrag-commands.tex exists) since it uses -output-directory with pdflatex – texenthusiast Oct 18 '13 at 1:34

Your Answer


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

Browse other questions tagged or ask your own question.