summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-pdftexgraphics.html
blob: 3d819f62a76f933c41b4ee9275f989bb3bd6497b (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
&#8220;natively&#8221; 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&#8217;t rely on this facility, even if you
<em>are</em> running an old enough version of PDFTeX&#8230;
<p/>In addition to the &#8216;native&#8217; formats, the standard PDFLaTeX
<i>graphics</i> package setup causes Hans Hagen&#8217;s <i>supp-pdf</i>
macros to be loaded: these macros are capable of translating the
output of MetaPost to PDF &#8220;on the fly&#8221;; 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 &#8220;driver&#8221;, and since it contains no means
of converting PostScript to PDF, there&#8217;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&#8217;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 &#8220;on the fly&#8221;; this is convenient, but requires that you
suppress one of TeX&#8217;s security checks: don&#8217;t allow its use in files
from sources you don&#8217;t entirely trust.
<p/>A similar package, <i>pst-pdf</i>, permits other things than &#8216;mere&#8217;
graphics files in its argument.  <i>Pst-pdf</i> operates (the
authors suggest) &#8220;like BibTeX&#8221; &#8212; 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
&#8220;Encapsulated PostScript that comes out of MetaPost&#8221;, and can therefore be
included directly.  Sadly, <i>purifyeps</i> doesn&#8217;t work for all
<code>.eps</code> files.
<p/>Good coverage of the problem is to be found in Herbert Vo&#223;&#8217;s
<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://mirror.ctan.org/support/epstopdf">support/epstopdf</a>; <a href="http://mirror.ctan.org//help/Catalogue/entries/epstopdf.html">catalogue entry</a>
<dt><tt><i>epstopdf.sty</i></tt><dd>Distributed with Heiko Oberdiek&#8217;s packages
  <a href="http://mirror.ctan.org/macros/latex/contrib/oberdiek.zip">macros/latex/contrib/oberdiek</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/oberdiek/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/oberdiek.html">catalogue entry</a>
<dt><tt><i>pdftricks.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/pdftricks.zip">macros/latex/contrib/pdftricks</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/pdftricks/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pdftricks.html">catalogue entry</a>
<dt><tt><i>pst-pdf.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/pst-pdf.zip">macros/latex/contrib/pst-pdf</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/pst-pdf/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pst-pdf.html">catalogue entry</a>
<dt><tt><i>pstoedit</i></tt><dd><a href="http://mirror.ctan.org/support/pstoedit.zip">support/pstoedit</a> (or <a href="http://mirror.ctan.org/support/pstoedit/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pstoedit.html">catalogue entry</a>
<dt><tt><i>purifyeps</i></tt><dd><a href="http://mirror.ctan.org/support/purifyeps.zip">support/purifyeps</a> (or <a href="http://mirror.ctan.org/support/purifyeps/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/purifyeps.html">catalogue entry</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>