# Why does \psPrintValue not allow 2 \rput to work at the same time?

For each compilation, only one of the 2 \rputs can be used. Attempting to activate both will produce a strange output which is only the first \rput can work.

\documentclass[border=0pt]{standalone}

\usepackage{pstricks-add,pst-tools,times}

\begin{document}
\begin{pspicture}[showgrid=true](6,6)
\psforeach{\i}{1,3}
{
%\rput(\i,\i){\i}
\rput(!\i\space 1 add dup){\psPrintValue{\i\space 1 add}}
}
\end{pspicture}
\end{document}


Why does \psPrintValue not allow 2 \rputs to work at the same time?

Edit: I am still using TeXLive 2011.

The strange behavior above occurs only when I use latex->dvips->ps2pdf sequence. For xelatex, it works without problem.

-
is \rput(!\i\space 1 add dup) even legal? I only see \rput documented as taking coordinates as two tex expressions separated by comma? –  David Carlisle Jul 19 '12 at 22:56
well it seems to be I just didn't see it in the manual (well it's used once in the middle of a large code section on page 182:( Presumably you have a real use case somewhere, because the examples using postscript arithmetic you've been posting could all be done more easily with tex arithmetic? –  David Carlisle Jul 19 '12 at 23:01
Actually it works for me (TL2012) if I uncomment the second one I get oh where can I put an image, I have to make it a answer? –  David Carlisle Jul 19 '12 at 23:07
What Kind of strange output so you get? –  Herbert Jul 20 '12 at 1:57
I'll have a look, but only in 3 weeks –  Herbert Jul 20 '12 at 22:00
show 3 more comments

## 2 Answers

Actually it works for me (TL2012) if I uncomment the second one I get

-
I used latex/dvips/ps2pdf texlive 2012 as downloaded a day or so ago –  David Carlisle Jul 19 '12 at 23:14
add comment

Problem solved!

-dPDFSETTINGS=/prepress or -dPDFSETTINGS#/prepress (for Windows) passed to ps2pdf caused the error.

-
No, that cannot be the problem for \rput –  Herbert Feb 12 '13 at 12:57
@Herbert: I have tested it and the problem disappeared. –  The Last Error Feb 12 '13 at 12:59
add comment