## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ PSTricks cuts figures in landscape mode

Information and discussion about graphics, figures & tables in LaTeX documents.
Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am

### PSTricks cuts figures in landscape mode

I have the following code:
\documentclass{article}\usepackage[landscape]{geometry}\usepackage{pstricks}\begin{document}\hspace{6.5in}\begin{pspicture}(1in,1in)\pscircle(0,0){1}\end{pspicture}\end{document}

If I compile it with XeLaTeX under GNU/Linux, or paste that in Overleaf, the circle will not appear complete.

Certain TeX installations on Windows don't seem to have that problem, though.

What's happening and how do I prevent it?

Tags:

Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm
Hi.
Your drawback is caused by the horizontal space settled too high; by changing its figure into, i.e. 5.5 inches, the whole circle appears properly, as shown below. Cheers

01.png (55.67 KiB) Viewed 3510 times
Last edited by cgnieder on Mon Jul 06, 2015 11:59 pm, edited 1 time in total.
Reason: scaled image down so it doesn't destroy forum view

Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am
Sundial wrote:Hi.
Your drawback is caused by the horizontal space settled too high; by changing its figure into, i.e. 5.5 inches, the whole circle appears properly, as shown below. Cheers

No it's not. Compiling the code without modifications with pslatex makes the whole circle appear properly.

Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm
Please, look at what happens (Overleaf compiler) with spacer 6.5in: the cutoff of your circle. Any comparison should be carried out with the same compiler, mine is Overleaf,as said.

02.png (61.43 KiB) Viewed 3510 times
Last edited by cgnieder on Tue Jul 07, 2015 12:00 am, edited 1 time in total.
Reason: scaled image down so it doesn't destroy forum view

Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am
Sundial wrote:Please, look at what happens (Overleaf compiler) with spacer 6.5in: the cutoff of your circle. Any comparison should be carried out with the same compiler, mine is Overleaf,as said.

And that is exactly the problem I am asking how to prevent – the fact that Overleaf and XeLaTeX cut off pictures at an arbitrary spot before the end of the page.

Of course it is (also) caused by using PSTricks, but “stop using PSTricks” would not count as a solution, would it?

Stefan Kottwitz
Posts: 9597
Joined: Mon Mar 10, 2008 9:44 pm
Hi Sundial,

can you please post code as text (marked as code via the "Code" button)?

Then we can copy & paste, and even better: by just one click we can open it directly in OverLeaf: there's automatically a link above the code box then.

In that case you could remove the images above, as it's slowing down loading on my slow internet connection, but even more, they are too huge for the web site layout.

Thanks!

Stefan

Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm
Hi Stefan,
I beg your pardon for my posted screenshots so wide! They come directly from the opening post code by pushing on 'Open in WriteLatex' bar. That allowed me to better specify my thought, based on the use of \hspace command. Please, erase them if you believe they are disturbing so much. Cheers

Stefan Kottwitz
Posts: 9597
Joined: Mon Mar 10, 2008 9:44 pm
I did not notice the code in the opening post, just sah huge screenshots and though it was your code

Screenshots are great, I often post them as addition, makes it easier for all readers. I just cut or resize so it's not too large,

Stefan

Sundial
Posts: 57
Joined: Thu Apr 19, 2012 7:28 pm
My code is simply shown below:
\documentclass{article}\usepackage[landscape]{geometry}\usepackage{pstricks}\begin{document}\hspace{4in} \begin{pspicture}(1in,1in)\pscircle(0,0){1}\end{pspicture}\end{document}

What does this mean? Different compilers sometimes have different behaviours on dealing with spacer (\hspace), so to overcome any mismatch the shortest way is to modify its width, from 6.5in to i.e. 4in. Cheers

Fibonacci
Posts: 37
Joined: Tue Jan 25, 2011 1:16 am
Try this, then:
\documentclass{article}\usepackage[landscape]{geometry}\usepackage{pstricks}\begin{document}Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus blandit in magna id sagittis. Pellentesque\begin{pspicture}(1in,1in)\pscircle(0,0){1}\end{pspicture}\end{document}

If you open it on Overleaf, or compile it with XeLaTeX, you'll see that the picture is still cut short, and the problem is not with \hspace (since there is no \hspace in this code). Surely the “shortest way” to get a full circle is cutting the text short, but hopefully it's obvious now that this is not an acceptable solution.