# Problem with pstricks in texlive 2021

In Texlive 2021 when I use some pstricks commands like \psplot, \psline, ... the curve, line, and .. not generate, but in texlive 2019 the same code works. for example, the following code does not show the axes in 2021 but it works in 2019.

\documentclass[12pt,a4paper]{article}
\usepackage{pst-plot}
\begin{document}
\psset{yunit=4cm,xunit=4}
\begin{pspicture}(-2,0)(2,1)
\psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1)
\end{pspicture}
\end{document}

• How do you compile? Jul 31 at 18:39
• By xelatex in texworks. Jul 31 at 19:57
• Jul 31 at 20:13
• Ghostscript is now invoked safely by default; to override (assuming all input files are trusted), use -i dvipdfmx-unsafe.cfg. To use PSTricks with XeTeX: xetex -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" ... Jul 31 at 20:14

Your example compiles fine with the following command in TeX Live 2021

xelatex -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" example


• Thanks. It worked for me. Aug 1 at 3:09
• @AliMesforush, you are welcome! Aug 1 at 12:51

In the file /...tex-distro.../dvipdfmx/dvipdfmx-unsafe.cfg you'll find only one important line and some documentation how to use this file with xe(La)tex. This important line starts with:

D  "rungs -q -dALLOWPSTRANSPARENCY -dNOSAFER ...


In the main config file dvipdfmx.cfg (in the same directory) you'll find a similar line which you should replace with the above one. Then you do not need the XeLaTex run with the -i ... argument and can use the default xelatex file.tex

Ghostscript changed its behaviour and allows by default no transparency and no running external files. Both are the default for PSTricks files.