3

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}
\usepackage{pstricks-add}
\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}
4
  • How do you compile?
    – Bernard
    Jul 31 at 18:39
  • By xelatex in texworks. Jul 31 at 19:57
  • See tug.org/texlive/bugs.html
    – citsahcots
    Jul 31 at 20:13
  • 1
    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" ...
    – citsahcots
    Jul 31 at 20:14
9

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

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

enter image description here

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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