12.04.2015 Views

Using Imported Graphics in LaTeX and pdfLaTeX - Mirror

Using Imported Graphics in LaTeX and pdfLaTeX - Mirror

Using Imported Graphics in LaTeX and pdfLaTeX - Mirror

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The jpeg format is a compression st<strong>and</strong>ard for bitmap graphics which uses a lossy 7<br />

compression scheme. In particular, its compression does not preserve l<strong>in</strong>es <strong>and</strong> sharp<br />

edges, mak<strong>in</strong>g it poorly suited for l<strong>in</strong>e draw<strong>in</strong>gs <strong>and</strong> or graphics with sharp features.<br />

5.2 PNG<br />

For many years the gif format was the st<strong>and</strong>ard for compressed bitmaps for icons<br />

<strong>and</strong> other l<strong>in</strong>e draw<strong>in</strong>gs, s<strong>in</strong>ce its lossless lzw compression does not distort sharp<br />

edges. Unisys’s enforcement of its lzw patent coupled with some gif technical<br />

limitations (such a limit of 256 colors) spurred the development of the Portable<br />

Network <strong>Graphics</strong> (PNG) format by a group eventually called the png Development<br />

Group<br />

http://www.libpng.org/pub/png/<br />

Like GIF, PNG uses lossless compression which is suitable for l<strong>in</strong>e draw<strong>in</strong>gs. While<br />

png can be used on any bitmap, jpeg’s lossy compression is often better than<br />

png for photographs <strong>and</strong> other bitmaps without sharp edges (where “better” means<br />

produc<strong>in</strong>g smaller files without distortion noticeable by the naked eye).<br />

5.3 PDF<br />

Adobe’s Portable Document Format (pdf) shares many similarities to its Adobe<br />

sibl<strong>in</strong>g PostScript. Like PostScript, pdf can conta<strong>in</strong> text, vector draw<strong>in</strong>gs, <strong>and</strong><br />

bitmap draw<strong>in</strong>gs. A pdf file can conta<strong>in</strong> an entire document or just a s<strong>in</strong>gle draw<strong>in</strong>g<br />

(similar to eps).<br />

pdf is not only the primary output format of pdfTEX, but pdf also is the most<br />

common method for import<strong>in</strong>g vector graphics <strong>in</strong>to pdfTEX. Many graphics programs<br />

allow their graphics output to be directly saved <strong>in</strong> pdf format. Programs<br />

without direct pdf output can <strong>in</strong>stead output eps vector graphics which can be easily<br />

converted to pdf vector graphics by the epstopdf conversion program available<br />

from ctan as a W<strong>in</strong>dows executable or as a perl script for use on other platforms<br />

such as Unix/L<strong>in</strong>ux or MacOS X<br />

5.4 MetaPost<br />

CTAN/support/epstopdf/<br />

MetaPost is a graphics language written by John Hobby that is based on Donald<br />

Knuth’s metafont, but with the added capability of outputt<strong>in</strong>g PostScript. Information<br />

about MetaPost is available from<br />

http://www.tug.org/metapost.html<br />

http://cm.bell-labs.com/who/hobby/MetaPost.html<br />

<strong>and</strong> is documented <strong>in</strong> [25].<br />

MetaPost can be used <strong>in</strong>n dvips-style L A TEX documents <strong>and</strong> also can be used<br />

directly 8 by pdfL A TEX documents.<br />

7 Lossy compression means that the compression process loses data. That is, decompresss<strong>in</strong>g a<br />

lossy-compressed bitmap does not produce the orig<strong>in</strong>al bitmap. Conversely, no data is lost dur<strong>in</strong>g a<br />

lossless compression, so decompress<strong>in</strong>g a lossless-compressed bitmap produces the orig<strong>in</strong>al bitmap.<br />

8 pdfL A TEX actually uses ConTeXt code by Hans Hagen to convert MetaPost graphics <strong>in</strong>to pdf<br />

on-the-fly, however this is transparent to users.<br />

16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!