1

I want to use pspicture in a landscape document, but I can't draw a line to the right hand side of the document with \psframe, while \rput works as expected. I've tried to create an MWE to demonstrate the behavior.

\documentclass[landscape,a4paper]{scrartcl}

\usepackage{polyglossia}
\setmainlanguage{english}

\usepackage{scrlayer}
\usepackage[landscape]{pstricks}
\usepackage{geometry}

\begin{document}

\begin{pspicture}(0,0)(15,10)
    \psset{unit=1mm}
    \psgrid

    \rput[lt](200,20){Text}

    \psframe[fillstyle=solid,linecolor=black,fillcolor=black,linestyle=solid](0,60)(190,60)
    \psframe[fillstyle=solid,linecolor=black,fillcolor=black,linestyle=solid](0,50)(180,50)
    \psframe[fillstyle=solid,linecolor=black,fillcolor=black,linestyle=solid](0,40)(170,40)
    \psframe[fillstyle=solid,linecolor=black,fillcolor=black,linestyle=solid](0,30)(160,30)
    \psframe[fillstyle=solid,linecolor=black,fillcolor=black,linestyle=solid](0,20)(150,20)
    \psframe[fillstyle=solid,linecolor=black,fillcolor=black,linestyle=solid](0,10)(140,10)
\end{pspicture}

paperwidth: \the\paperwidth

paperheight: \the\paperheight

\end{document}

enter image description here

The same behavior happens for \psframe and \psline.

I'm usind xelatex, as provided by texlive 2014.20141024-2 in debian GNU/Linux, to compile the whole thing. This seams to be xelatex specific, since everything seams to be fine with latex -> dvips -> ps2pdf.

4
  • What happens if you increase the size of pspicture to (20,10)?
    – Christoph
    Feb 5, 2015 at 13:09
  • @Christoph no difference in the output, I could even put 0 or 500 as width an there is no difference. Feb 5, 2015 at 13:11
  • Hm. With miktex everything is fine, but in texlive2014 the picture is gone. Feb 5, 2015 at 13:46
  • Does it mean this is a bug of texlive? Where should I report it? Feb 5, 2015 at 14:10

2 Answers 2

1

I have no problem with xelatex and latex->dvips->ps2pdf

\documentclass[landscape,a4paper]{scrartcl}
\usepackage{geometry}
\usepackage{pstricks}

\begin{document}

\noindent
\begin{pspicture}[showgrid](0,0)(\textwidth,10)
\psframe*[linecolor=blue!30](0,0)(\textwidth,10)
\psline(\textwidth,10)
\end{pspicture}

paperwidth: \the\paperwidth

paperheight: \the\paperheight

\end{document}

Up-to-date TeXLive 2014

enter image description here

0

This issue is due to a too small postscript/ghostscript DEFAULTPAPERSIZE, which as well is applied in portrait mode, rather an rotated to landscape. This is also documented in “XeTeX pstricks larger page size is cropped to A4

A workaround is to build the document e.g. with (resp. a large enough paper size)

 GS_OPTIONS=-sDEFAULTPAPERSIZE=a0 xelatex <your tex file>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .