next up previous
Next: E-Mails, Sending and Receiving Up: unix_guide Previous: Compile and Run

LATEX, PostScript, PDF, Printing

Summary of this section

So, you have written a LATEXfile, it might say something like

\documentclass[12pt]{article}
\begin{document}

I won't do that if I were you, Dave, 'cause
\begin{equation}
{\bf F} = m{\bf a}
\end{equation}

\end{document}
Let's call it hal.tex.

To LATEX it, just type

HAL9000> latex hal.tex
You can also omit the .tex extension
HAL9000> latex hal
If you didn't make any mistake, it will produce hal.dvi, hal.aux, hal.log. Use ls to see everything is there. If they are, that's it. You've done it.

As the name indicates, xdvi reads the .dvi file you produced and shows it on the X-terminal screen, so be sure that you have the .dvi file, in our case, hal.dvi, before you do

HAL9000> xdvi hal
If all goes well, now a window will pop up, showing you what your document will looks like when printed:


\fbox{
\begin{minipage}{0.7\tw}
I won't do that if I were you, Dave, 'cause
\be
{\bf F} = m{\bf a}
\ee
\end{minipage}}


To print it, you need to make a PostScript file first. Making the PostScript file is usually done by a program called dvips. Just type

HAL9000> dvips hal.dvi
This will produce hal.ps from the hal.dvi file. To preview this file,
HAL9000> gv hal.ps
If you want to produce a pdf file, then instead do
HAL9000> dvips -Ppdf hal.dvi
This will produce hal.ps that's suitable for pdf conversion. To convert,
HAL9000> ps2pdf hal.ps
That produces hal.pdf. To preview a pdf file,
HAL9000> acroread hal.pdf
If acroread is not installed on your machine use xpdf or gv.

If all went well, now you would want to print the thing and admire what you have done. The usual printing command in Unix is lpr (that's not ``laser printer", that's ``line printer"). So

HAL9000> lpr hal.ps
will usually print the thing out of the default printer.

If you want to print on a printer other than the default one, you have to know the name of the printer you want to use. Ask your system operator. To use a particular printer, say, halprt, type

HAL9000> lpr -Phalprt hal.ps
To check if indeed the printer is functioning and your thing is being printed out, or if there are a lot of loads on that printer, type
HAL9000> lpstat -phalprt
This will give you job-name, user-name, job-number, size and status. Exact names and order of things being reported may vary slightly from system to system. If this does not work, use instead
HAL9000> lpq -Phalprt
Note that here it's the upper case -P where in the case of lpstat it is the lower case -p.

The command lpr can take a lot of options such as turning on and off two-sided printing, multiple copies, manual input, etc. Options for each printer is posted on the cover of each printer. For more details, go to http://www.physics.mcgill.ca/~roderick/printers.html

Now I bring you these important messages from our system operator:


Color Printers

 Words of caution (for Tektronix color printers): 
  . Send ONLY text or POSTSCRIPT (use your favorite converter)
  . NEVER turn the unit off
  . Use ONLY Tektronix SPECIFIC transparency paper (we can help you
        get some)
  . NEVER ;( .. NEVER remove the paper tray UNLESS it is requested from
     the printers display panel.

Another CLARIFICATION for printer ABUSERS..

We have an increasing number of complaints about people abusing 
their printing privileges. Please remember, full color pages and
printing transparencies have a much higher cost then black and white
pages.

The printers and maintenance are paid by RESEARCH funds and these funds are
not for personal expenses. Admittedly, many of us use the printers for
'private' (non-research) from time to time, but some behaviour is
CLEARLY shocking not to say inadmissible. 
Yesterday's printing of a Quebec tax form, including users' guide, probably
about 100 pages, while available in many locations around the city, is 
a case in point. 

Be aware, we have printer accounting running and we know which login
account prints where. Printing privileges can be revoked.

Also the printers are a shared resource, so be considerate.  Think
before submitting print jobs, restrict LONG jobs to less active hours
or less used printers.

Finally, PLEASE .. PICK UP YOUR ** JOBS **. If it's not worth picking
up, it is not worth printing.


next up previous
Next: E-Mails, Sending and Receiving Up: unix_guide Previous: Compile and Run
Sangyong Jeon 2007-09-18