我创建了一个图形pstricks
,我想将其插入到另一个文档中。但是,当我将标记复制到我的主文档并编译它时,我收到以下错误:
! Undefined control sequence.
\GenericError ...
\#4 \errhelp \@err@ ...
l.21 \end{TeXtoEPS}
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.
\section
如果之前有,则会发生错误\begin{TeXtoEPS}
。
\documentclass[letterpaper,dvips]{article}
\usepackage[pdf]{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-all}
\usepackage{pst-3dplot}
\usepackage{pst-eps}
\begin{document}0
\pagestyle{empty}
% The following line causes the issue
\section{Introduction}
\begin{TeXtoEPS}
\psset{unit=0.7}
\begin{pspicture}(0,0)(20,10)
\psset{linewidth=1.5pt,linecolor=black,linestyle=solid}
\psline{->}(0,8)(10,8)
\psline{->}(0,0)(10,0)
\end{pspicture}
\end{TeXtoEPS}
\end{document}
如何在部分中使用 TeXtoEPS 环境?我原本打算用 包裹主文档中的图形\begin{TeXtoEps}
。我的做法是否错误?
编辑:
感谢 Urike 的评论,它为我指明了正确的方向:
\documentclass[letterpaper]{article}
\usepackage[dvi]{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-all}
\usepackage{pst-3dplot}
\begin{document}
\pagestyle{empty}
\section{Introduction}
\psset{unit=0.7}
\begin{pspicture}(0,0)(20,10)
\psset{linewidth=1.5pt,linecolor=black,linestyle=solid}
\psline{->}(0,8)(10,8)
\psline{->}(0,0)(10,0)
\end{pspicture}
\end{document}
并编译为latex->dvips -> psdpdf
答案1
不要使用包pst-eps
和环境TeXtoEPS
:它与较新的auto-pst-pdf
加载版本冲突pstricks
(这就是选项的作用pdf
)。删除两者。还删除dvips
标题中的选项,然后使用pdflatex --shell-escape