5

Possible Duplicate:
\includegraphics: Dots in filename

Many of my graphics files have periods in their names. This causes a problem with pdflatex. For example, if I want to include the graphics file this.or.that.pdf I get this error:

! LaTeX Error: Unknown graphics extension: .or.that.pdf.

Is there a way around this other than renaming all my files?

vy32
  • 4,780

3 Answers3

6

Use \includegraphics[width=\textwidth]{{{this.or.that}.pdf}} i.e., the file name should be {this.or.that}.pdf.

5

Alternatively, using grffile:

\documentclass{article}
\usepackage{graphicx}
\usepackage{grffile}
\begin{document}
\includegraphics[width=\textwidth]{clipboard.01}
% \includegraphics[width=\textwidth]{clipboard.01.png}
\end{document}
Mike Renfro
  • 20,550
1

If you use graphicx the filetype is defaulted from the extension but for cases like this there is a type key so you can go type=eps or type=bmp or whatever is needed.

David Carlisle
  • 757,742