\pdfoutput =0\relax \documentclass[12pt]{memoir} \usepackage{color} \usepackage[cleanup={},process=all]{pstool} \input macros.tex \newif\ifNAT \NATfalse \ifNAT \usepackage{natbib} \else \usepackage{biblatex} \bibliography{xampl} \fi \usepackage [active,tightpage]{preview} \pagestyle {empty} \makeatletter \def \thepage {\csname @roman\endcsname \c@page } \setcounter {page}{2} \@input {example.oldaux} \begin {document} \immediate \write \@mainaux {\@percentchar <*PSTOOLLABELS>} \makeatother \centering \null \vfill \begin {preview} \csname @input\endcsname {example-pstool.tex}\csname @input\endcsname {trial2.tex}\psfrag {[Mp]}{$Z_{(\ref {eq3})}$}\psfrag {[ev]}{\thepage } \includegraphics [scale=0.5] {trial2} \end {preview} \vfill \makeatletter \immediate \write \@mainaux {\@percentchar } \makeatother \end {document}