Latex Error: unknown graphics extension .png
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. Packagegrffile
changes the algorithm to check for known extensions (optionmultidot
, 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. :-)