带有 PSTricks 的 XeLaTeX 文档无法在 Overleaf 上编译

带有 PSTricks 的 XeLaTeX 文档无法在 Overleaf 上编译

以下代码在 TexStudio 和 XeLaTeX 中完美执行。但在 Overleaf 中却不行。有人能帮我找出问题吗?

\documentclass[a4paper]{article}
\usepackage{pst-all}
\usepackage{xcolor}
\begin{document}
\begin{figure}
    \psscalebox{1.0 1.0} % Change this value to rescale the drawing.
    {
        \begin{pspicture}(0,-6.869608)(3.4228299,-3.2345715)
            \definecolor{colour0}{rgb}{0.6,0.2,0.0}
            \rput(0.36892363,-6.3424816){\psaxes[linecolor=black, linewidth=0.04, tickstyle=full, axesstyle=axes, labels=all, ticks=all, ticksize=0.1411111cm, dx=1.0cm, dy=1.0cm](0,0)(0,0)(3,3)}
            \psline[linecolor=black, linewidth=0.04, fillstyle=gradient, gradlines=2000, gradbegin=colour0, gradend=red](0.34892365,-5.3424816)(1.3489237,-6.3224816)(3.0289237,-6.062482)(1.2089237,-4.0024815)(0.38892365,-5.3224816)(0.38892365,-5.3224816)
        \end{pspicture}
    }
\end{figure}
\end{document}

答案1

对我有用,我认为你没有指定编译器正确,见截图。

在此处输入图片描述

在此处输入图片描述

pdfLaTeX仅供参考,这是我使用编译器时收到的错误消息:

\c@lor@to@ps ->\PSTricks 
                         _Not_Configured_For_This_Format
l.13     }
          
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

在此处输入图片描述

相关内容