Penguin
Diff: PdfLatexNotes
EditPageHistoryDiffInfoLikePages

Differences between version 2 and previous revision of PdfLatexNotes.

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

Newer page: version 2 Last edited on Thursday, October 16, 2003 12:36:46 pm by JohnMcPherson Revert
Older page: version 1 Last edited on Wednesday, October 15, 2003 6:16:27 pm by JohnMcPherson Revert
@@ -17,22 +17,30 @@
 \pdfcompresslevel=9 
 \fi 
 </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. 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: 
+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 
  
 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} 
+\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.  
+  
  
 !!! Using pdflatex to make slides 
 You can make slides by using the ''seminar'' package: 
 <verbatim> 
@@ -56,5 +64,18 @@
 \pdfpageheight=210truemm 
 \pdfhorigin=1truein % default value(?), but doesn't work without 
 \pdfvorigin=1truein % default value(?), but doesn't work without 
 \fi 
+</verbatim>  
+  
+!!! [PDF] metadata  
+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:  
+  
+<verbatim>  
+\pdfinfo  
+{ /Title (My Masterpiece)  
+ /Creator (YourName)  
+ /CreationDate (D:YYYYMMDDhhmmss) % this is the format used by pdf for date/time  
+ /Subject (...)  
+ /Keywords (...)  
+}  
 </verbatim>