- Use pdftex or pdflatex instead of tex or
latex on your source TeX/LaTeX file. For instance, the
following command will produce a filename.pdf file instead of
the usual filename.dvi file from a latex source file
filename.tex:
pdflatex filename.tex
If the file is in plain TeX, use:
pdftex filename.tex
If the document has figures inserted as PostScript files, you can
follow the previous procedure, but first the figures must be converted
to PDF, PNG or JPEG format, and the TeX/LaTeX file must contain the
appropriate commands to insert files with the right format.
For the details on how to include graphics, look at
Including graphics in LaTeX/PDF documents
- An alternative is to use TeX/LaTeX in the usual way to produce
a DVI file, then use dvips (with the -Ppdf flag) to
convert the DVI file into PostScript, and finally convert the
PostScript to PDF with pstill:
latex filename.tex
dvips -Ppdf -o filename.ps filename.dvi
pstill -o filename.pdf filename.ps
- If various documents share some references it might be
inconvenient to write them as separate TeX/LaTeX files. In that case,
write them together as a single document, process it to produce a
single DVI file, then convert it into PDF with
dvipdfm. The document can be split into its different parts
at the same time by selecting ranges of pages with the -s
flag of dvipdfm:
dvipdfm -s <n1>-<n2> -o filename.pdf filename.dvi
where <n1>-<n2> represents the range of pages, e.g.,
7-12 means pages 7 through 12.
- Another solution to produce various separate PDF documents
from a single source is to produce a PostScript file as above
latex filename.tex
dvips -Ppdf -o filename.ps filename.dvi
then divide the PostScript file into separate files selecting pages
with psselect
dvipdfm -s <n1>-<n2> filename.ps foo.ps
and finally convert each PostScript file into PDF
pstill -o foo.pdf foo.ps
- Finally, the subject of how to combine various separate
documents into a single PDF file is addressed here:
How do I merge several PostScript/PDF documents into a single PDF
document?
Miguel A. Lerma, 5/6/2005
|