Saturday, May 15, 2010

Weird Problem of Hyperref and Includegraphics

Lately, I came across a weird problem when writing my master thesis, which is the use of hyperref and \includegraphics.

The problem is described as followings:
When I use the package of hyperref and include .eps figures in my sub-files under the master.tex file, Latex gives me the error: File "filename" not found. Apparently, the .eps files I included are under the same directory as master.tex. So that won't be the reason why Latex could not find .eps.

The reason is that pdftex won't recognize .eps. The solution is the usage of package "epstopdf". Download the package (.zip file) from http://www.ctan.org/tex-archive/support/epstopdf/

Unzip it and run in terminal "epstopdf filename.eps" under the directory of .eps files and the corresponding .pdf files will be generated. In your sub-file, instead of include .eps files, include .pdf files. The latex will then run perfectly.

Hope this helps!

No comments:

Post a Comment