Latex:IEEE會議模板中出現undefined control sequence \includegraphics問題解決方法
阿新 • • 發佈:2019-02-17
最近要參加一個IEEE主辦的國際會議,使用中官網提供的Latex模板寫論文,當插入EPS格式的圖片時,提示錯誤:undefined control sequence \includegraphics。 說明Latex無法識別\includegraphics, 在前面的程式中加入\usepackage{graphicx}還是不行,偶然在一個國外網站發現解決方案,現總結於此:
找到前面的graphic related packages
% *** GRAPHICS RELATED PACKAGES *** % \ifCLASSINFOpdf <span style="color:#ff0000;">\usepackage[pdftex]{graphicx}</span> % declare the path(s) where your graphic files are <span style="color:#ff0000;">\graphicspath{{../pdf/}{../jpeg/}}</span> % and their extensions so you won't have to specify these with % every instance of \includegraphics <span style="color:#ff0000;">\DeclareGraphicsExtensions{.pdf,.jpeg,.png}</span> \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. <span style="color:#ff0000;"> \usepackage[dvips]{graphicx}</span> % declare the path(s) where your graphic files are <span style="color:#ff0000;">\graphicspath{{../eps/}}</span> % and their extensions so you won't have to specify these with % every instance of \includegraphics % \DeclareGraphicsExtensions{.eps} \fi
由於預設的情況是全部註釋掉的,都無法在程式中使用。
解決方法:把上圖中紅色的部分取消掉註釋,在執行就可以了。