Uwe Stöhr wrote:
 >> It's correct that Lyx doesn't allow spaces and other special
 >> characters in the file dialog, because the \includegraphics command
 >> used in the background doesn't allow them in image filenames. It
 >> seems to be a restriction of the LaTeX-package "graphicx".
 >
 > Not so. I've just got this to work with MikTeX:
 >
 > If the file name contains spaces then the name must be enclosed in
 > quotes. If the file name contains LaTeX special chars, then these must
 > be escaped with \string.

I also use MikTeX and can't get it to work. I tried to insert the files "ima ge.png" and "ima%ge.png". But no matter if I use

\includegraphics{"F:/Download/ima ge.png"}
or
\includegraphics{F:/Download/ima\string%ge.png}
or
\includegraphics{F:/Download/ima\string% ge.png}

it doesn't work.
If one uses quotes, one mustn't declare the file extension, so only

\includegraphics{"F:/Download/ima ge"}

will work. We have to consider this behaviour.

If you find a solution for "ima%ge.png", please let me know.

\documentclass[a4paper]{article}

\usepackage{graphicx}

\makeatletter
[EMAIL PROTECTED]
\makeatother

\begin{document}

\includegraphics{/tmp/ima\percent ge}

\end{document}



Herbert



Reply via email to