Latex:IEEE会议模板中出现undefined control sequence \includegraphics问题解决方法

  最近要参加一个IEEE主办的国际会议,使用中官网提供的Latex模板写论文,当插入EPS格式的图片时,提示错误:undefined control sequence \includegraphics。 说明Latex无法识别\includegraphics, 在前面的程序中加入\usepackage{graphicx}还是不行,偶然在一个国外网站发现解决方案,现总结于此:

找到前面的graphic related packages

% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
  
   \usepackage[pdftex]{graphicx}
  % declare the path(s) where your graphic files are
   \graphicspath{{../pdf/}{../jpeg/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
   \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
  % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
  % will default to the driver specified in the system graphics.cfg if no
  % driver is specified.
   \usepackage[dvips]{graphicx}
  % declare the path(s) where your graphic files are
   \graphicspath{{../eps/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.eps}
\fi

由于默认的情况是全部注释掉的,都无法在程序中使用。

解决方法:把上图中红色的部分取消掉注释,在运行就可以了。

你可能感兴趣的:(命令)