I have the following image that I wish to include in my document:
wget http://www.biomedcentral.com/content/figures/1471-2164-10-37-1-l.jpg -O exampleImg.jpg
I need to compile via dvi. I covert the jpg to eps format with GraphicsMagick:
gm convert exampleImg.jpg exampleImg.eps
I used the following latex code and it works compiling via dvi and ps.
\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{grffile}
%\usepackage[pdftex]{graphicx}
%opening
\title{}
\author{}
\begin{document}
\includegraphics[]{./test/exampleImg}
\end{document}
When I use a directory with a space, test test, and it doesn't work anymore, even though I use \usepackage{grffile} :
\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{grffile}
%\usepackage[pdftex]{graphicx}
%opening
\title{}
\author{}
\begin{document}
\includegraphics[]{./test test/exampleImg}
\end{document}
It gives the following error:
! LaTeX Error: Cannot determine size of graphic in ./test test/exampleImg (
no BoundingBox).
Best Answer
With Will's code (added to the preamble after loading graphicx) and with this syntax to include the graphic:
\includegraphics[width=5cm]{"Neuer Ordner/tiger"}
I could process the document with latex + dvips on a miktex 2.9./win XP system . tiger.eps was used without problem. It didn't matter if I used grffile or not.But I advise you strongly to avoid spaces in file names or folders: If you switch to another driver (pdflatex, xelatex, ...) or to another system (TexLive, Linux) it can break completly or work only after a syntax change. The time you spend to get arround the problems can be used for better things.
Btw: I also would like to remember that dvips won't include graphicx with absolute pathes or pathes that refer to parent directories (../).