Graphics, Figures & TablesFigures with filenames including space, dot, underscore, etc

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
jiapei100
Posts: 28
Joined: Sat Jan 12, 2008 7:23 pm

Figures with filenames including space, dot, underscore, etc

Post by jiapei100 »

Hello:

I'm wondering how to include graphics with special names, say, the file name includes a space? a dot? or underscore? For example,
test first.jpg
test.second.jpg
test_third.jpg

Code: Select all

\begin{figure}[h]
  \centering
  \includegraphics[width=0.8\textwidth]{./figures/filename}
  \caption{Testing Figure}
  \label{fig:test}
\end{figure}

Is it prohibited at all? Or, there is some way to deal with those special file names when drawing?


Best Regards
Pei

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Figures with filenames including space, dot, underscore, etc

Post by Stefan Kottwitz »

Hello Pei,

the grffile package has been written for that purpose.

Stefan
LaTeX.org admin
Post Reply