summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-grffilenames.html
blob: b7f2c80ced25c0a91d15a556dacad1a1873a68ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<head>
<title>UK TeX FAQ -- question label grffilenames</title>
</head><body>
<h3>&ldquo;Modern&rdquo; graphics file names</h3>
<p/>TeX was designed in a world where file names were very simple
indeed, typically strictly limited both in character set and length.
In modern systems, such restrictions have largely disappeared, which
leaves TeX rather at odds with its environment.  Particular
problems arise with spaces in file names, but things like multiple
period characters can seriously confuse the <i>graphics</i>
package.
<p/>The specification of TeX leaves some leeway for distributions to
adopt file access appropriate to their operating system, but this
hasn&rsquo;t got us very far.  Many modern distributions allow you to
specify a file name as <code>"file name.tex"</code> (for example), which
helps somewhat, but while this allows us to say
<blockquote>
<pre>
\input "foo bar.tex"
</pre>
</blockquote><p>
the analogous usage
<blockquote>
<pre>
\includegraphics{"gappy graphics.eps"}
</pre>
</blockquote><p>
using &ldquo;ordinary&rdquo; LaTeX causes confusion in <i>xdvi</i> and
<i>dvips</i>, even though it works at compilation time.  Sadly,
even within such quotes, multiple dots give <code>\</code><code>includegraphics</code>
difficulties.  Note that
<blockquote>
<pre>
\includegraphics{"gappy graphics.pdf"}
</pre>
</blockquote><p>
works in a similar version of PDFTeX.
<p/>If you&rsquo;re using the <i>graphics</i> package, the <i>grffile</i>
package will help.  The package offers several options, the simplest
of which are <code>multidot</code> (allowing more than one dot in a
file name) and <code>space</code> (allowing space in a file name).  The
<code>space</code> option requires that you&rsquo;re running on a
sufficiently recent version of PDFTeX, in PDF mode &mdash; and
even then it won&rsquo;t work for MetaPost files, which are read as TeX
input, and therefore use the standard input mechanism).
<dl>
<dt><tt><i>grffile.sty</i></tt><dd>Distributed as part of <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/oberdiek.zip">macros/latex/contrib/oberdiek</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/oberdiek/">browse the directory</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=grffilenames">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=grffilenames</a>
</body>