4

The example below was downloaded from that site with pstricks examples. When I run it I get 18 blank pages. This also happens with other examples using multido. I'm using texmaker with MikTex 2.9. Do you have any idea what could be the problem?

Thank you very much.

\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d}
\colorlet{Green}{green!100!white!40}
\begin{document}

\multido{\iA=0+15}{18}{%
\psset{lightsrc=viewpoint,viewpoint=30 \iA\space 20 rtp2xyz,Decran=25}
\begin{pspicture}(-5,-2)(5,2)
\psSolid[object=grille,grid,
 fcol= /t 0 def 0 1 63 { dup dup 8 mod 0 eq { /t t 1 add def } if 
     t add 2 mod 0 eq { (Green) }{ (red) } ifelse } for, 
base=-4 4 -4 4]
\end{pspicture}%
}

\end{document}
  • 1
    standalone is cropping an incorrect location on the page. If you just use article and add \newpage as the first element inside \multido, you'll see the 18 rotations of a chessboard. – Werner Sep 24 '16 at 20:57
  • 1
    ... that site with pstricks examples. I hope people take as much care to attribute your ideas, work and creations to you as you do to acknowledge theirs. It is also of absolutely no use to anybody who wants to follow up by finding the original or seeing what else is available at the mentioned site. Depending on the licence, it may be illegal to post the content here in this way. But whether it is legal or no, it is extremely rude. – cfr Sep 25 '16 at 1:53
3

I used latex-dvips-ps2pdf sequence with TeXLive 2015 and did not find any problem using either standalone or article or article with preview.

standalone

\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d}
\colorlet{Green}{green!100!white!40}
\begin{document}

\multido{\iA=0+15}{18}{%
\psset{lightsrc=viewpoint,viewpoint=30 \iA\space 20 rtp2xyz,Decran=25}
\begin{pspicture}(-5,-2)(5,2)
\psSolid[object=grille,grid,
 fcol= /t 0 def 0 1 63 { dup dup 8 mod 0 eq { /t t 1 add def } if 
     t add 2 mod 0 eq { (Green) }{ (red) } ifelse } for, 
base=-4 4 -4 4]
\end{pspicture}%
}

\end{document}

article alone

\documentclass{article}
\usepackage{pst-solides3d}


\colorlet{Green}{green!100!white!40}
\begin{document}

\multido{\iA=0+15}{18}{%
\psset{lightsrc=viewpoint,viewpoint=30 \iA\space 20 rtp2xyz,Decran=25}%
\begin{pspicture}(-5,-2)(5,2)
\psSolid[object=grille,grid,
 fcol= /t 0 def 0 1 63 { dup dup 8 mod 0 eq { /t t 1 add def } if 
     t add 2 mod 0 eq { (Green) }{ (red) } ifelse } for, 
base=-4 4 -4 4]
\end{pspicture}%
}

\end{document}

article with preview

\documentclass{article}
\usepackage{pst-solides3d}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{pspicture}

\colorlet{Green}{green!100!white!40}
\begin{document}

\multido{\iA=0+15}{18}{%
\psset{lightsrc=viewpoint,viewpoint=30 \iA\space 20 rtp2xyz,Decran=25}%
\begin{pspicture}(-5,-2)(5,2)
\psSolid[object=grille,grid,
 fcol= /t 0 def 0 1 63 { dup dup 8 mod 0 eq { /t t 1 add def } if 
     t add 2 mod 0 eq { (Green) }{ (red) } ifelse } for, 
base=-4 4 -4 4]
\end{pspicture}%
}

\end{document}

enter image description here

Edit

I just installed TeX Live 2016 and here I confirmed that the standalone version above produces a PDF of 18 blank pages. This problem can be fixed by inserting preview option as Herbert's answer.

2

standalone is cropping an incorrect location on the page when only using pstricks as the class option under latex > dvips > ps2pdf. Rather compile with xelatex or add the preview option to the class:

enter image description here

\documentclass[pstricks,preview]{standalone}
\usepackage{pst-solides3d}
\colorlet{Green}{green!100!white!40}
\pagestyle{empty}% Remove header/footer
\begin{document}

\multido{\iA=0+15}{18}{%
  \newpage% One page per image
  \psset{lightsrc=viewpoint,viewpoint=30 \iA\space 20 rtp2xyz,Decran=25}
  \begin{pspicture}(-5,-2)(5,2)
    \psSolid[object=grille,grid,
            fcol= /t 0 def 0 1 63 { dup dup 8 mod 0 eq { /t t 1 add def } if 
              t add 2 mod 0 eq { (Green) }{ (red) } ifelse } for, 
            base=-4 4 -4 4]
  \end{pspicture}%
}

\end{document}

If you just use article and add \newpage as the first element inside \multido, you'll see the 18 rotations of a chessboard.

  • standalone has no problems to crop the image! – user2478 Sep 26 '16 at 6:57
  • @Herbert: I couldn't get it to show the correct crop under TeX Live 2016 with a LaTeX > dvips > ps2pdf sequence. The output remains to be 18 blank pages. Here is my file list when compiling the OP. article with preview worked. Are you running TeX Live 2015? Could you share your file list? – Werner Sep 26 '16 at 12:47
  • do you have \documentclass[pstricks]{standalone} ? If yes, then there is a problem with TL2015. In TL2016 everything is fine. – user2478 Sep 26 '16 at 14:34
  • @Herbert: Yes, I have \documentclass[pstricks]{standalone} just like in the original post under TeX Live 2016: pdfTeX Version 3.14159265-2.6-1.40.17 (TeX Live 2016/W32TeX) (preloaded format=latex 2016.8.2); dvips(k) 5.996; kpathsea version 6.2.2; tested on Ghostscript versions 9.10, 9.14, 9.19 and 9.20 (all 64 bit). – Werner Sep 26 '16 at 16:18
  • and what happens when running xelatex? – user2478 Sep 26 '16 at 16:49
1

Use

\documentclass[pstricks,preview]{standalone}

and you'll get the single pages with latex->dvips->ps2pdf

enter image description here

  • I don't understand why preview option is now needed in TeX Live 2016 but not in the previous version. – Money Oriented Programmer Sep 29 '16 at 15:17
  • 1
    standalone changes ... – user2478 Sep 29 '16 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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