These are some hints to make your use of pdflatex(1) more productive...

## Version

As you may be aware, the version numbers for Τεχ are converging towards Pi, and pdflatex does the same. Although it may not look like much, there is quite a bit of difference between pdflatex version "3.14159-13d (Web2C 7.3.1)" (the "old stable" version) and version "Version 3.14159-1.10b (Web2C 7.4.5)" (the more recent version). This fixes a number of bugs. I copied a binary of the newer version from Debian Woody onto a Slackware 8 box, and the binary worked, but I needed to use the newer pdflatex.fmt file as well (you can merely copy this into your document directory).

At this moment (Fall 2006), 1.10b is considered "antique", pdfeTeX 3.141592-1.30.4-2.2 (Web2C 7.5.5) is recent, but the pdfΤεχ extensions are up to 1.40 already (though I don't think there is a distribution that includes it at this moment. The version numbers break down to: Τεχ version (3.141592) - pdfΤεχ extension (1.30.4) - ε-Τεχ extensions (2.2) and Web2C translator release (7.5.5). If you use the Τεχ system installed with your linux distribution, you should probably update it, for example with http://www.tug.org/texlive

## Using the graphicx Package

graphicx can take an option specifying pdftex or dvips, depending on which you are planning on using. You can use a conditional macro to include the right option depending on which processor is being used. Current (La)TeX installations are capable of detecting whether pdftex or dvips is used, and you are better off loading the graphicx package without options. If you must detect the flavour of the engine, use the ifpdf package, the old way doesn't work correctly, because pdflatex is used to produce dvi, causing the conditional to be false even for dvips-latex.

Put this in the header of the main .tex file:

```\usepackage{ifpdf}
\ifpdf
\usepackage[dvips]{graphicx}
\else
\usepackage[pdftex]{graphicx}
\pdfcompresslevel=9
\fi```

but you're probably better off using:

`\usepackage{graphicx}`

pdflatex can import images in PNG, TIF, PDF, GIF, or JPG image formats, but not PS. Now, by default, normal latex uses .ps or .eps for including images. However, you can get your images to work with both latex and pdflatex with little modification to your .tex source files.

1. (This assumes you already have .ps or .eps figures for use with latex). Use the ps2pdf(1) command (which is part of the gs-common package in Debian) to convert each .ps or .eps image into a .pdf image
\$ for f in .{ps,eps} ; do ps2pdf \$f \${f%.}.pdf ; done

There is also an epstopdf(1) command that is part of latex (debian tetex-bin package) that might be better to use on .eps figures.

Now, if you do

`\includegraphics[width=\textwidth]{figure}`

then latex will look for "figure.ps" or "figure.eps", and pdflatex will look for "figure.pdf", "figure.gif", or "figure.jpg". If you have one of each list then both latex and pdflatex will work with the same input file.

There is an epstopdf package, which will use shell callouts to translate eps to pdf on the fly, see below.

## Using pdflatex to make slides

You can make slides by using the seminar package:

`\documentclass[a4, landscape]{seminar}`

However, pdftex and seminar don't play nicely together (your text appears in only a quarter of the page), so there is a little trick you can do to force the correct page dimensions. In the header of your file, try the following (this example is in combination with the above hints). Apparently loading the color package is sufficient, as is using the geometry package.

```\usepackage{ifpdf}
\usepackage{graphicx}
\ifpdf\else
%%%%%%%%
% to fix problems making landscape seminar pdfs
% Letter...
%\pdfpagewidth=11truein
%\pdfpageheight=8.5truein
% A4
\pdfpagewidth=297truemm % your milage may vary....
\pdfpageheight=210truemm
\pdfhorigin=1truein     % default value(?), but doesn't work without
\pdfvorigin=1truein     % default value(?), but doesn't work without
\fi```

## The 'hyperref' package

If you use the hyperref package, then your pdf file will have have active links for all labels and citations, which you can use for quickly navigating. This is incredibly useful - eg for browsing your bibliography and seeing where a reference was cited. In addition, bookmarks will be generated. See the section below on using hyperref with pdflatex.

Inside a block that is only read for pdflatex (and not normal latex), you can put a block to set the metadata inside the PDF file:

```\pdfinfo
{ /Title (My Masterpiece)
/Author (YourName)
/CreationDate (D:YYYYMMDDhhmmss) % this is the format used by pdf for date/time
/Subject (...)
/Keywords (...)
}```

However, if you are using the hyperref package (which uses your Table of Contents to create bookmarks and a contents pane in your PDF - very pretty) you will find your pdfinfo block is ignored. The solution:

```\usepackage[pdftex,
```\usepackage{graphicx}