less than 1 minute read

pdfLaTeX supports using PNG files when using graphicx package. But today I encountered an error that one of my PNG graph “had an unknown graphics extension” compiling with pdfLaTeX.

After searching the internet I found the reason and the solution. Here I paste it as below.

(from http://tex.stackexchange.com/questions/110513/unknown-graphics-extension-1-png)

The LaTeX graphics/graphicx package uses the first dot to find the extension. Package grffile changes the algorithm to check for known extensions (option multidot, enabled by default):

\usepackage{graphicx} \usepackage{grffile}

That is, one of my PNG files has more than one dots in its file name. After including the package grffile, the compiler ran pretty well. :-)