![错误信息:未定义控制序列\includegraphics](https://linux22.com/image/359300/%E9%94%99%E8%AF%AF%E4%BF%A1%E6%81%AF%EF%BC%9A%E6%9C%AA%E5%AE%9A%E4%B9%89%E6%8E%A7%E5%88%B6%E5%BA%8F%E5%88%97%5Cincludegraphics.png)
我收到以下错误信息:
“未定义控制序列\includegraphics”
当尝试编译文件时:
\documentclass{amsart}[12pt]
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[crop=off]{auto-pst-pdf}
\usepackage{type1cm}
\usepackage{eso-pic}
\usepackage{color}
\begin{document}
\begin{figure}[htbp]
\includegraphics{cp1.pstex_t}
\end{figure}
\end{document}
我使用 WinEdt 并用 PdfTexify 编译。如果我用 XeLaTeX 编译,它运行正常。
我应该怎么做才能正确运行 PdfTexify?
以下是完整代码:
命令行:pdflatex.exe --interaction=errorstopmode --synctex=-1 “FiguraTeste.tex” 启动文件夹:C:\Users\Ronaldo\Documents
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6350 64-bit)
entering extended mode
(FiguraTeste.tex
LaTeX2e <2017-04-15>
Babel <3.10> and hyphenation patterns for 75 language(s) loaded.
(C:\texmf\tex\latex\amscls\amsart.cls
Document Class: amsart 2015/03/04 v2.20.2
(C:\texmf\tex\latex\amsmath\amsmath.sty
For additional information on amsmath, use the `?' option.
(C:\texmf\tex\latex\amsmath\amstext.sty (C:\texmf\tex\latex\amsmath\amsgen.sty)
) (C:\texmf\tex\latex\amsmath\amsbsy.sty)
(C:\texmf\tex\latex\amsmath\amsopn.sty)) (C:\texmf\tex\latex\amsfonts\umsa.fd)
(C:\texmf\tex\latex\amsfonts\amsfonts.sty))
(C:\texmf\tex\latex\caption\subcaption.sty
(C:\texmf\tex\latex\caption\caption.sty
(C:\texmf\tex\latex\caption\caption3.sty
(C:\texmf\tex\latex\graphics\keyval.sty))))
(C:\texmf\tex\latex\graphics\graphicx.sty
(C:\texmf\tex\latex\graphics\graphics.sty (C:\texmf\tex\latex\graphics\trig.sty
) (C:\texmf\tex\latex\graphics-cfg\graphics.cfg)
(C:\texmf\tex\latex\graphics-def\pdftex.def
(C:\texmf\tex\generic\oberdiek\infwarerr.sty)
(C:\texmf\tex\generic\oberdiek\ltxcmds.sty))))
(C:\texmf\tex\latex\oberdiek\epstopdf.sty
(C:\texmf\tex\latex\oberdiek\epstopdf-base.sty
(C:\texmf\tex\latex\oberdiek\grfext.sty
(C:\texmf\tex\generic\oberdiek\kvdefinekeys.sty))
(C:\texmf\tex\latex\oberdiek\kvoptions.sty
(C:\texmf\tex\generic\oberdiek\kvsetkeys.sty
(C:\texmf\tex\generic\oberdiek\etexcmds.sty
(C:\texmf\tex\generic\oberdiek\ifluatex.sty))))
(C:\texmf\tex\generic\oberdiek\pdftexcmds.sty
(C:\texmf\tex\generic\oberdiek\ifpdf.sty))))
(C:\texmf\tex\latex\auto-pst-pdf\auto-pst-pdf.sty
(C:\texmf\tex\latex\xkeyval\xkeyval.sty
(C:\texmf\tex\generic\xkeyval\xkeyval.tex
(C:\texmf\tex\generic\xkeyval\xkvutils.tex)))
(C:\texmf\tex\latex\ifplatform\ifplatform.sty
(C:\texmf\tex\generic\oberdiek\catchfile.sty))" "
"-------------------------------------------------"
"auto-pst-pdf: Auxiliary LaTeX compilation"
"-------------------------------------------------"
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6350 64-bit)
entering extended mode
This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaleye.com)
' TeX output 2017.07.30:1851' -> FiguraTeste-autopp.ps
<C:/texmf/dvips/base/tex.pro><C:/texmf/dvips/config/alt-rule.pro>
<C:/texmf/dvips/pstricks/pstricks.pro>
<C:/texmf/dvips/pstricks/pst-algparser.pro>
<C:/texmf/dvips/pst-tools/pst-tools.pro>
<C:/texmf/dvips/pstricks/pst-dots.pro><C:/texmf/dvips/base/special.pro>. [1
<./cp1.ps>]
"-------------------------------------------------"
"auto-pst-pdf: End auxiliary LaTeX compilation"
"-------------------------------------------------"
(C:\texmf\tex\latex\pst-pdf\pst-pdf.sty
(C:\texmf\tex\generic\ifxetex\ifxetex.sty)
(C:\texmf\tex\generic\oberdiek\ifvtex.sty)
(C:\texmf\tex\generic\luatex85\luatex85.sty)
LaTeX Warning: You have requested, on input line 77, version
`2017/06/01' of package graphicx,
but only version
`2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)'
is available.
(C:\texmf\tex\latex\pstricks\pstricks.sty (C:\texmf\tex\latex\xcolor\xcolor.sty
(C:\texmf\tex\latex\graphics-cfg\color.cfg))
(C:\texmf\tex\generic\pstricks\pstricks.tex
(C:\texmf\tex\generic\xkeyval\pst-xkey.tex)
(C:\texmf\tex\generic\pstricks\pst-fp.tex `pst-fp' v0.05, 2010/01/17 (hv))
(C:\texmf\tex\generic\pgf\utilities\pgfutil-common.tex
(C:\texmf\tex\generic\pgf\utilities\pgfutil-common-lists.tex))
(C:\texmf\tex\generic\pgf\utilities\pgfkeys.code.tex
(C:\texmf\tex\generic\pgf\utilities\pgfkeysfiltered.code.tex))
(C:\texmf\tex\generic\pgf\utilities\pgffor.code.tex
(C:\texmf\tex\generic\pgf\math\pgfmath.code.tex
(C:\texmf\tex\generic\pgf\math\pgfmathcalc.code.tex
(C:\texmf\tex\generic\pgf\math\pgfmathutil.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathparser.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.code.tex
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.basic.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.trigonometric.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.random.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.comparison.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.base.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.round.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.misc.code.tex)
(C:\texmf\tex\generic\pgf\math\pgfmathfunctions.integerarithmetics.code.tex)))
(C:\texmf\tex\generic\pgf\math\pgfmathfloat.code.tex)))
`PSTricks' v2.73a <2017/05/22> (tvz)
(C:\texmf\tex\generic\pstricks\pstricks.con))
(C:\texmf\tex\generic\pstricks\pst-fp.tex))
(C:\texmf\tex\latex\preview\preview.sty)
(C:\texmf\tex\latex\graphics-def\dvips.def)
(C:\texmf\tex\latex\environ\environ.sty
(C:\texmf\tex\latex\trimspaces\trimspaces.sty))))
(C:\texmf\tex\latex\type1cm\type1cm.sty)
(C:\texmf\tex\latex\eso-pic\eso-pic.sty
(C:\texmf\tex\generic\oberdiek\atbegshi.sty)) (FiguraTeste.aux)
(C:\texmf\tex\context\base\supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Preview: Fontsize 10pt
Preview: PDFoutput 1
(cp1.pstex_t <FiguraTeste-pics.pdf, id=2, page=1, 258.9675pt x 121.45375pt>
<use FiguraTeste-pics.pdf, page 1>
! Undefined control sequence.
\Gin@setfile ...Gin@page \@empty \else (\Gin@page
)\fi }
l.2 \includegraphics{cp1.ps}
%
?
答案1
graphicx
使用时我收到了同样的错误auto-pst-pdf
,更重要的是收到了相同/类似的警告,IE
LaTeX Warning: You have requested, on input line 77, version
`2017/06/01' of package graphicx,
but only version
`2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)'
is available.
就我而言,更新graphicx
似乎解决了这个问题 - 它包含在graphics
包中。
令人高兴的是,更新说明已被编纂为社区维基。