Total Pageviews

Thursday, 4 August 2011

From Tex to PDF

There are several ways to generate a PDF from a TEX file. I am stating the most popular 4 ways here.

Method 1

If you do not have bibliography file

% latex myfile (to generate myfile.dvi from myfile.tex)
% dvips myfile (to generate myfile.ps from myfile.dvi)
% ps2pdf myfile.ps (to generate the file myfile.pdf)

Method 2

If you have bibliography file

% latex myfile (to generate myfile.dvi from myfile.tex)
% bibtex myfile (uses the .aux file to extract cited publications from the database in the .bib file, formats them according to the indicated style, and puts the results into in a .bbl file)
% dvips myfile (to generate myfile.ps from myfile.dvi)
% ps2pdf myfile.ps (to generate the file myfile.pdf)

Method 3

If you want to convert a TEX file directly to PDF and do not have a bibliography file


% pdflatex myfile

N.B. If you have images in EPS format, you need to convert it into PDF format with the following command-

% epstopdf image.eps

Method 4

If you want to convert a TEX file directly to PDF and have a bibliography file


% pdflatex myfile
% bibtex myfile
% pdflatex myfile
% pdflatex myfile


N.B. If you have images in EPS format, you need to convert it into PDF format with the following command-

% epstopdf image.eps

No comments:

Post a Comment