View Full Version : pdflatex - problems with dots in filenames (Unknown graphics extension)

July 15th, 2007, 10:50 AM

I just started learning to use pdflatex (I have used LaTeX for years with .eps files), and want to include figures with name such as "output.2002.pdf". pdflatex complains about unknown graphics extensions for ".2002.".

I could of course rename all such files to output_2002.pdf, but I would rather not for several reasons.

Is there a solution to this? Thanks.

July 17th, 2007, 09:57 AM
hmmm not sure how to fix this - i still use epsfig.

rather than rename all the files you could just create symbolic links

ln -s output.2002.pdf output_2002.pdf

July 17th, 2007, 03:03 PM
Thanks, but that doesn't help. Often I am working with hundreds of files for different model runs, year, scenarios, etc,. and I like to use files with names set in a csh, bash or perl script, e.g.

set ofile=Output.$run.$year.$scenario.eps

If using "_" as the seperator, I would need "" or {}, e.g.

set ofile=Output_"$run"_"$year"_$scenario.eps

Not a disaster, but a but messier. (Having to link as you suggest would just add even more files).

Just seemed a shame to me that pdflatex seems to work assuming DOS-like conventions, that the dot is just for indicating file type and cannot be used in the filename.

July 17th, 2007, 06:21 PM
yeah it seemed disappointing to me so i read the manual

firstly use the graphicx package and try something like:


if that doesn't work check out


July 18th, 2007, 08:25 AM
Many thanks - that works great!

I had also tried reading that graphicx manual but didn't spot the combination of factors you suggested.
Anyway, problem solved :)

July 18th, 2007, 07:40 PM
yeah it seems unnecessarily complicated

February 17th, 2010, 06:38 PM
even more convenient to me is:
then you don't need any extra syntax, just type for example:

only be aware that it parses quotation marks as well!