1

The following code produces the attached image: the x and y labels are put exactly at the centre of the axes. I can reproduce the error using TeXmaker 5.0.3 and running xelatex on my terminal; I run the TeXlive distro. packed with Debian Buster.

\documentclass[pstricks,border=1cm]{standalone}

\usepackage{pst-plot}

\begin{document}

\begin{pspicture}(5,5)
\psaxes{}(0,0)(4,4)[$x$,0][$y$,0]
\end{pspicture}

\end{document}

The error persists no matter what value I write in for the angle. As far as I can see I am not giving any erroneous arguments. Is it my TeXlive distro? PSTricks' version is 2.97 and pst-plot is version 1.92, according to my log file. I'd really like to understand what is happening with this code. Thanks!

enter image description here

EDIT: I just noticed this also happens with \rput and \uput; no matter what coordinate I give those commands, their arguments are always typeset at (0,0). I was going to try downloading CTAN's versions of the packages, but they are the versions I have. Help!

5
  • On my TeXLive 2019 I cannot reproduce the issue. I tried both latex and converted the dvi to pdf, and compilation with xelatex. In both cases x and y are where they are presumably supposed to be, i.e. not at the origin. So you may want to update your TeX installation.
    – user194703
    Apr 6, 2020 at 0:36
  • I tried, but it is at the latest version. I also notice it happens with both the \rput and \uput commands! I need help! :/ Apr 6, 2020 at 0:39
  • I also have versions 2.97 and 1.92, respectively. (But I also do not really use PSTricks any more, so maybe some of the active users know more.)
    – user194703
    Apr 6, 2020 at 0:45
  • Probably you are using an old xdvipdfmx and Ghostscript newer than version 9.27. In the case where Ghostscript version is newer than 9.27, such as gs-9.50, xdvipdfmx version should be 20191114 or newer. Further, there should be -dDELAYSAFER in the D section in texmf-dist/dvipdfmx/dvipdfmx.cfg. If you install TeX Live 2020 pretest, your problem is resolved. Apr 6, 2020 at 4:35
  • @AkiraKakuto My dvipdfmx version is 20190824, so this might be it. The string dDELAYSAFER is where you said it should be: pastebin.com/Y2hhRtkG. Is there a way to use the newest version of the package by putting the file on my directory? What I mean is: once the relevant file is there, how do I use it instead of the packaged version? Apr 6, 2020 at 4:46

1 Answer 1

0

Well, after trying to downgrade ghostscipt as per Akira's comments above, I ran latex > dvips > ps2pdf, both on terminal and on TeXmaker, and the issue is gone. So I guess this should be the way to commpile documents with PSTricks until TeXLive 2020 is packaged on Debian. enter image description here

3
  • Always latex > dvips is the best way to use PSTricks. PSTricks for XeTeX is a limited extension. There are several PSTricks examples which don't work with XeTeX even with the new xdvipdfmx. In these cases, we can use PSTricks in XeTeX by including pdf images obtained by latex > dvips > epstopdf. Apr 6, 2020 at 21:30
  • My only concern is opacity, which I use a lot, especially with TikZ. Since I want to use both, XeTeX is my preferred option because the dvips route doesn't respect transparencies. Apr 6, 2020 at 22:04
  • Of course, PostScript does not support transparency, so you have to change the PS file with the transparency extension into other format, e.g., pdf. In the dvips route: latex > dvips > ps2pdf, you can obtain transparent pdf image which can be included by ps2pdf -dDELAYSAFER test.ps test.pdf in the case of gs-9.50. Your gs-9.52 is known to have a bug in pdfwrite driver, so you cannot obtain transparent pdf both by the above method and by PSTricks for XeTeX. Apr 7, 2020 at 3:51

You must log in to answer this question.

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