Compiling a LaTeX Document.

So having prepared your first tex document I was pretty excited to see the out put. But there was one daunting question !!
Whats the next step ??

Fortunately , I was using KILE so I got my PDF in a click but I wanted to figure out how get the same pdf using command line.
So here is the procedure to do the same:

—————————————————————————————————————————————

STEP-1:

Suppose the file ``my_report.tex” is the file that contains all the author’s work, i.e., her actual typed words and formulae. It was typed using the text editor vi. Similar text editors include emacs, pico, Notepad (in Windows), and TextEdit (on Macs).

First navigate to the place where the tex file is located using terminal.

Then run the command:

latex my_report.tex

This produces a bunch of files. One of them would be my_report.dvi.
The dvi stands for “device independent”.

The file my_report.dvi is the same regardless of

(1) which computer is used to compile the document,

(2) what kind of printer it is headed for.

In fact, it is too universal to be printed in this form; it must still be translated to a form suitable for a specific kind of printer. (Different printers speak different languages…) You can’t even view the DVI file unless you use a special “DVI Viewer”, such as xdvi on ucsub.

 

The files“my_report.aux” and  “my_reoprt.log” are two by-products of the compiling command.
The aux file is used if the document contains more complicated stuff, like bibliography and cross-references.

The log file contains a full record of the compilation, including errors you need to correct, e.g., misspelled macros, missing bracket or parenthesis, missing references, etc.

—————————————————————————————————————————————

STEP-2:

The file “my_reoprt.ps”, a PostScript file, the kind understood by most laser printers.
A printable PostScript file is created from the dvi file by the translating program dvips. On computer run the command

dvips my_report.dvi

—————————————————————————————————————————————

STEP-3:

The file ``my_report.pdf” is the PDF form of the document.
This is as web-friendly a document as possible. Using Acrobat Reader, any computer can be used to view the document and/or print it. On computer run the command the command

dvipdfm my_report.dvi

translated the DVI file to PDF form.

 

Thats it !!

 

Hope it helps. !!

One response to “Compiling a LaTeX Document.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s