Solution for latex error:”Unknown graphics extension: .eps“ or "Can not find XXX"

Sample code:

egin{figure*}
  centering
  % Requires usepackage{graphicx}
  includegraphics[width=7in]{a.eps}
  caption{(b)-(e) Human-study interfaces for (a) with increasingly more contextual information.}label{}
end{figure*}

Error:

Answer:

错误原因:很简单, 就是使用includegraphics插入图片为eps格式,是多数参考书籍给出的方法,但此种方法只能用latex默认编译器使用,如果使用Ctex(中国改造版,默认为pdflaTex),则不能。

Solution:

是图片和pdflatex一起用时的错误。

 两种解决方法:

 1、可以将eps文件转换为pdf图片或jpg图片。

 2、用latex而不是pdflatex:tex处理过tex文件后生成dvi文件,然后通过dvipdf转换成pdf文件;

       pdflatex直接处理tex文件,输出pdf文件,pdflatex使用jpg,png能图片格式,不能使用eps文件。

 

 keywords:

latex, and pdflatex in dvi mode, support graphics in encapsulated
postscript (.eps) format. pdflatex in pdf mode supports graphics
in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
 that all non-photo figures use a vector format (.eps, .pdf, .mps) and
 not a bitmapped formats (.jpeg, .png).

 

原文地址:https://www.cnblogs.com/xiaopanlyu/p/5073396.html