Penguin
Diff: PdfLatexNotes
EditPageHistoryDiffInfoLikePages

Differences between version 9 and predecessor to the previous major change of PdfLatexNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 9 Last edited on Wednesday, October 18, 2006 9:50:54 pm by MaartenSneep Revert
Older page: version 8 Last edited on Tuesday, November 23, 2004 4:43:28 pm by JohnMcPherson Revert
@@ -3,60 +3,59 @@
  
 !!! 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. 
+''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 <em>must</em> 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: 
  
 <verbatim> 
-\ifx \pdfoutput\undefined  
+\usepackage{ifpdf}  
+ \ifpdf  
 \usepackage[dvips]{graphicx} 
 \else 
 \usepackage[pdftex]{graphicx} 
 \pdfcompresslevel=9 
 \fi 
+</verbatim>  
+  
+but you're probably better off using:  
+  
+<verbatim>  
+\usepackage{graphicx}  
 </verbatim> 
  
 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. 
-  
-2. Include the following little snippet after your \begin{document}:  
-<verbatim>  
-% if using pdflatex, we must use our .pdf images instead of .(e?)ps  
-\ifx\pdfoutput\undefined  
-\else  
-\DeclareGraphicsExtensions{.pdf,.gif,.jpg} % the formats we have images in  
-\fi  
-</verbatim>  
-(there's probably a better way to do that, but this works :p)  
  
 Now, if you do 
 <verbatim> 
 \includegraphics[width=\textwidth]{figure} 
 </verbatim> 
 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: 
 <verbatim> 
 \documentclass[a4, landscape]{seminar} 
 </verbatim> 
-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):  
+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.  
  
 <verbatim> 
-\ifx\pdfoutput\undefined  
- \usepackage[dvips] {graphicx }  
-\else  
-\usepackage[pdftex] {graphicx}  
-\pdfcompresslevel=9  
+\usepackage{ifpdf }  
+\usepackage{graphicx}  
+\ifpdf\else  
 %%%%%%%% 
 % to fix problems making landscape seminar pdfs 
 % Letter... 
 %\pdfpagewidth=11truein