Consider the following MWE:

\documentclass[pstricks]{standalone}
\begin{document}
\begin{pspicture}(0,0)(5,4)
\psline(0,0)(5,4)
\end{pspicture}
\end{document}

I can use both, TeXLive 2015 and TeXLive 2016, to successfully compile the code. However, the result of the usual latex -> dvips -> ps2pdf chain is an empty picture in the 2016 (up-to-date) case. The 2015 version of latex works just fine:

2015 PDF:

enter image description here

2016 PDF:

enter image description here

I'd like to file a bug report, any recommendation where to further look into and where to actually put the bug report?

My question is different to \multido does not do anything as it is much more centered on the actual problem (includes an MWE) and, as such, is much more likely to be found by users encountering the same problem in the future.

  • that's odd, it works with 2016 xelatex – David Carlisle Oct 29 '16 at 11:57
  • with latex-dvips the line is still in the postscript but is dropped in ps2pdf... – David Carlisle Oct 29 '16 at 11:58
  • That is weird, I use the very same dvips and ps2pdf in both cases. – MrD Oct 29 '16 at 11:59
  • @David If I enlarge the picture and the line to something more or less A4 ((20,28)), then the line appears, so I would say ps2pdf is cutting the wrong piece. Imho the problem is the "setpagesize" code in dvips.def (when I use the new dvips.def with tl15 the line disappears there too). – Ulrike Fischer Oct 29 '16 at 12:25
  • @UlrikeFischer yes the bb and setpagedevice setting seem odd, I got same with tl2015, but perhaps your comment implies it was an update during the tl2015 cycle? – David Carlisle Oct 29 '16 at 12:26
up vote 3 down vote accepted

Use the option preview as follows and you will get the expected result.

\documentclass[pstricks,preview]{standalone}
\begin{document}
\begin{pspicture}(0,0)(5,4)
\psline(0,0)(5,4)
\end{pspicture}
\end{document}

enter image description here

The issue is known and has been reported a the standalone bug tracker: https://bitbucket.org/martin_scharrer/standalone/issues/25/pagesize-special-clipping

Work arounds are:

\RequirePackage[nosetpagesize]{graphics}
\documentclass[pstricks]{standalone}
\begin{document}
\begin{pspicture}(0,0)(5,4)
\psline(0,0)(5,4)
\end{pspicture}


\begin{pspicture}(0,0)(3,5)
\psline(0,0)(3,5)
\end{pspicture}

\end{document}

or

\documentclass[pstricks]{standalone}
\makeatletter
\def\sa@papersize{%
    \global\let\sa@papersize\relax
    \global\sa@yoffset=\paperheight
\global \setbox \@begindvibox
    \vbox{%
    \special{papersize=\the\paperwidth,\the\paperheight}%
    \special{ps::%
        \@percentchar\@percentchar HiResBoundingBox: 0 0 \the\paperwidth\space\the\paperheight^^J%
    }%
\unvbox \@begindvibox }%
}
\makeatother
\begin{document}
\begin{pspicture}(0,0)(5,4)
\psline(0,0)(5,4)
\end{pspicture}


\begin{pspicture}(0,0)(3,5)
\psline(0,0)(3,5)
\end{pspicture}

\end{document}
  • In the new dvips in TL 2017, no workaround will be needed. The last \special{papersize=w,h} is effective in the new dvips, as in the (x)dvipdfmx. A new option -L0 recovers the old behavior in which the first \special{papersize=w,h} wins. – Akira Kakuto Nov 3 '16 at 22:10

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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