summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-pdftexgraphics.html
blob: 69569e372a582fc89e36ca1320500055406c1849 (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
51
52
53
54
55
56
57
58
59
<head>
<title>UK TeX FAQ -- question label pdftexgraphics</title>
</head><body>
<h3>Imported graphics in PDFLaTeX</h3>
<p/>PDFTeX itself has a rather wide range of formats that it can
&ldquo;natively&rdquo; incorporate into its output PDF stream:
JPEG (<code>.jpg</code> files) for photographs and similar images,
PNG files for artificial bitmap images, and PDF for
vector drawings.  Old versions of PDFTeX (prior to version 1.10a)
supported TIFF (<code>.tif</code> files) format as an alternative
to PNG files; don&rsquo;t rely on this facility, even if you
<em>are</em> running an old enough version of PDFTeX...
<p/>In addition to the &lsquo;native&rsquo; formats, the standard PDFLaTeX
<i>graphics</i> package setup causes Hans Hagen&rsquo;s <i>supp-pdf</i>
macros to be loaded: these macros are capable of translating the
output of MetaPost to PDF &ldquo;on the fly&rdquo;; thus MetaPost output
(<code>.mps</code> files) may also be included in PDFLaTeX documents.
<p/>The commonest problem users encounter, when switching from TeX, is
that there is no straightforward way to include EPS files:
since PDFTeX is its own &ldquo;driver&rdquo;, and since it contains no means
of converting PostScript to PDF, there&rsquo;s no direct way the job can
be done.
<p/>The simple solution is to convert the EPS to an appropriate
PDF file.  The <i>epstopdf</i> program will do this: it&rsquo;s
available either as a Windows executable or as a <i>Perl</i>
script to run on Unix and other similar systems.  A LaTeX package,
<i>epstopdf</i>, can be used to generate the requisite PDF
files &ldquo;on the fly&rdquo;; this is convenient, but requires that you
suppress one of TeX&rsquo;s security checks: don&rsquo;t allow its use in files
from sources you don&rsquo;t entirely trust.
<p/>A similar package, <i>pst-pdf</i>, permits other things than &lsquo;mere&rsquo;
graphics files in its argument.  <i>Pst-pdf</i> operates (the
authors suggest) &ldquo;like BibTeX&rdquo; &mdash; you process your file using
PDFLaTeX, then use LaTeX, <i>dvips</i> and <i>ps2pdf</i>
in succession, to produce a secondary file to input to your next
PDFLaTeX run.  (Scripts are provided to ease the production of the
secondary file.)
<p/>An alternative solution is to use <i>purifyeps</i>, a
<i>Perl</i> script which uses the good offices of
<i>pstoedit</i> and of MetaPost to convert your Encapsulated PostScript to
&ldquo;Encapsulated PostScript that comes out of MetaPost&rdquo;, and can therefore be
included directly.  Sadly, <i>purifyeps</i> doesn&rsquo;t work for all
<code>.eps</code> files.
<p/>Good coverage of the problem is to be found in Herbert Voss&rsquo;
<a href="http://pstricks.tug.org/main.cgi?file=pdf/pdfoutput">PDF support page</a>,
which is targeted at the use of <i>pstricks</i> in
PDFLaTeX, and also covers the <i>pstricks</i>-specific package
<i>pdftricks</i>.
<dl>
<dt><tt><i>epstopdf</i></tt><dd>Browse <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archivesupport/epstopdf/">support/epstopdf/</a>
<dt><tt><i>epstopdf.sty</i></tt><dd>Distributed with Heiko Oberdiek&rsquo;s packages
  <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>)
<dt><tt><i>pdftricks.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/pdftricks.zip">macros/latex/contrib/pdftricks</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/pdftricks/">browse the directory</a>)
<dt><tt><i>pst-pdf.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/pst-pdf.zip">macros/latex/contrib/pst-pdf</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/pst-pdf/">browse the directory</a>)
<dt><tt><i>pstoedit</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/support/pstoedit.zip">support/pstoedit</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/support/pstoedit/">browse the directory</a>)
<dt><tt><i>purifyeps</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/support/purifyeps.zip">support/purifyeps</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/support/purifyeps/">browse the directory</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdftexgraphics">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdftexgraphics</a>
</body>