Inkscape LaTeX 输出抛出“未定义的控制序列”错误

Inkscape LaTeX 输出抛出“未定义的控制序列”错误

我正在尝试将我在 Inkscape 中制作的图形包含到我的 LaTeX 文件中。以下是 Inkscape 生成的代码:

%LaTeX with PSTricks extensions
%%Creator: inkscape 0.48.4
%%Please note this file requires PSTricks extensions
\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
\begin{pspicture}(71.27256012,96.8321228)
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
\newpath
\moveto(0.22171,76.7656728)
\curveto(5.48555,84.6614428)(10.53007,87.7320228)(14.91661,82.9068228)
\curveto(17.7159,79.8276028)(31.36614,47.8145128)(31.36614,47.8145128)
\lineto(9.053,12.2870328)
\lineto(4.62195,12.1429428)
\lineto(4.60825,6.8003728)
\lineto(23.47036,6.8003728)
\lineto(23.33983,12.2691528)
\lineto(16.65588,12.1990528)
\lineto(34.43672,42.1119628)
\curveto(41.17762,27.0873528)(46.28745,17.7893428)(51.62547,6.4862128)
\curveto(52.99873,3.5783628)(55.02481,0.3150828)(59.87864,0.2205028)
\curveto(73.53571,-0.0455872)(70.84499,23.4691628)(70.84499,23.4691628)
\curveto(70.84499,23.4691628)(65.52912,7.3404728)(59.00134,12.5028228)
\curveto(54.95398,15.7035728)(31.87711,62.6847328)(21.4551,87.9955428)
\curveto(19.32776,93.1619728)(17.97765,97.3574528)(11.62671,96.5050528)
\curveto(2.88823,95.3321928)(0.22171,76.7656228)(0.22171,76.7656228)
\closepath
}
}
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linewidth=0.43424526,linecolor=curcolor]
{
\newpath
\moveto(0.22171,76.7656728)
\curveto(5.48555,84.6614428)(10.53007,87.7320228)(14.91661,82.9068228)
\curveto(17.7159,79.8276028)(31.36614,47.8145128)(31.36614,47.8145128)
\lineto(9.053,12.2870328)
\lineto(4.62195,12.1429428)
\lineto(4.60825,6.8003728)
\lineto(23.47036,6.8003728)
\lineto(23.33983,12.2691528)
\lineto(16.65588,12.1990528)
\lineto(34.43672,42.1119628)
\curveto(41.17762,27.0873528)(46.28745,17.7893428)(51.62547,6.4862128)
\curveto(52.99873,3.5783628)(55.02481,0.3150828)(59.87864,0.2205028)
\curveto(73.53571,-0.0455872)(70.84499,23.4691628)(70.84499,23.4691628)
\curveto(70.84499,23.4691628)(65.52912,7.3404728)(59.00134,12.5028228)
\curveto(54.95398,15.7035728)(31.87711,62.6847328)(21.4551,87.9955428)
\curveto(19.32776,93.1619728)(17.97765,97.3574528)(11.62671,96.5050528)
\curveto(2.88823,95.3321928)(0.22171,76.7656228)(0.22171,76.7656228)
\closepath
}
}
\end{pspicture}

我已将其包含\usepackage{pstricks}在文档的开头,但仍然出现错误。具体错误如下:

Underfull \hbox (badness 10000) in paragraph at lines 60--60

! Undefined control sequence.
<recently read> \c@lor@to@ps 

l.102       }

? q
OK, entering \batchmode⏎

它指向的行是第一个\pscustom命令的右花括号。任何帮助都将非常有帮助,提前谢谢您!

答案1

! Undefined control sequence.
<recently read> \c@lor@to@ps 

应该读作“pstricks 需要 latex 但是您已经使用了 pslatex”。

使用 latex 和 dvips 而不是 pdflatex 来处理文档。

相关内容