Tech and Academic things for Chianshin

Friday, January 04, 2008

How to use the commands

How to use the commands

Next: Creating, Editing and Processing Up: Commands for Preparing and Previous: Commands for Preparing and Contents

How to use the commands

Prepare the LaTeX file in an editor and save it with a name ending .tex. Run the commands in a terminal windows.

Process the LaTeX file, mypaper.tex, say, with:

        latex mypaper.tex
or into PDF (Adobe's Page Description File format) using pdflatex:
        pdflatex mypaper.tex
The latex command will produce a DVI file, whereas the pdflatex command will produce a PDF file.

The DVI file can be viewed on the workstation with xdvi:

        xdvi mypaper.dvi
or it can be converted to PostScript (and printed on a laser printer) with the dvips and lpr commands...
        dvips -o mypaper.ps mypaper.dvi
lpr -Ptl3_lw mypaper.ps
(This prints the file in Teaching Lab 3. Use another printer name after -P to send the file to a different printer.)

The dvips command can send the PostScript file directly to some printers. E.g.

         dvips -Pnlw mypaper
sends the output to the North Office laser printer.

         dvips -Ppdf -ta4 mypaper
creates an A4 sized PostScript file called mypaper.ps which is suitable for later conversion to PDF.

PostScript files can be viewed on the workstation with command ggv ...

         ggv mypaper.ps

The command ps2pdf13 will convert an appropriate PostScript file to PDF 1.3. E.g.

        ps2pdf13 mypaper.ps
will create file mypaper.pdf. (This PDF file may be subtly different from one produced directly with pdflatex.)

The PDF file produced by pdflatex or by latex, dvips -Ppdf and ps2pdf13 is viewed with the acroread command, e.g.

        acroread mypaper.pdf
Acroread is a graphical tool; it has an option to print the file being displayed on a printer.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home