Take the 2-minute tour ×
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.

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.

share|improve this question
    
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

2 Answers 2

Actually it works for me (TL2012) if I uncomment the second one I getenter image description here

share|improve this answer
    
I used latex/dvips/ps2pdf texlive 2012 as downloaded a day or so ago –  David Carlisle Jul 19 '12 at 23:14
up vote 0 down vote accepted

Problem solved!

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

share|improve this answer
    
No, that cannot be the problem for \rput –  Herbert Feb 12 '13 at 12:57
    
@Herbert: I have tested it and the problem disappeared. –  stalking is prohibited Feb 12 '13 at 12:59

Your Answer

 
discard

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.