Getting Started in UNIX

This web page is intended for those who want to access LaTeX on a UNIX machine, but who have not yet become reasonably proficient with UNIX and its editors. The Emacs editor is especially useful for preparing LaTeX documents, so it would be worth spending some time to get acquainted with the Emacs editor.

Eventually, I hope to add a page for those who wish to prepare LaTeX files on their home computers.

  • Goals to accomplish
  • First Steps
  • Further Steps
  • Goals to accomplish during this session

    1. Get an account set up on a UNIX server if you don't have one..
    2. Get used to manipulating windows (moving, resizing, raising, lowering, iconizing, etc.)
    3. Be able to send and to read electronic mail (email).
    4. Be able to do simple editing of text files.
    5. Be able to process a simple LaTeX file, preview it on the screen, and print hard copy.

    First Steps

    Computer accounts

    If you do not have an account, find out how to set up an account, and then set up an account for yourself. It might be useful to browse the Rutgers University Computing Services web pages. After that web page is loaded into your browser, you can find information on accounts by choosing from the "Edit" menu the selection "Find in Page", which will open up a box where you can put a search term such as account.

    Editing

    Here is a little game from Harold Boas to make sure that you can perform basic editing tasks. First start up an editor: you do this by using the left mouse button, namely, "mouse down" with the left mouse button on the "root", that is, on the background of the window on your screen. Although the "pico" editor is somewhat easier to use, the "emacs" editor offers much utility beyond "pico", so I suggest that you use "emacs". Then use the mouse to cut out the following: Izalp3aalp3ak Walp3alotwoedelotwoeatwo wrdelotwoeaotwoebeotwoea, "Atwoglgammatwog malp3ay bbeotwoea 2alp3agammad otwoedelotwoea bbeotwoea 2delotwoea lgammakbeotwoea otwoe3beotwoea malp3aotwoe3beotwoeamalp3aotwoegammac2, otwoe3alp3aotwoe gammaotwoe calp3atwo twobeotwoeavbeotwoear bbeotwoea fep2ilotwolly lbeotwoeaalp3artwootwoe." and paste it into your text editor. To unscramble this mishmash, use the editor to make the following global substitutions in this order: 3->h, 2->s, two->n, one->t, epsilon->u, delta->o, gamma->i, beta->e, alpha->a. What does it say?

    LaTeX

    The first section of Leslie Lamport's book LaTeX is titled "How to avoid reading this book." There he suggests looking at two sample LaTeX input files and comparing them with the corresponding output. There are copies of these input files on paper for you. Your first LaTeX exercise is to examine these files, process them, and preview the output on the screen.

    First open a second window from your Web browser, so that you do not lose track of the instructions you are now reading. In the second window, look at the file small2e.tex. Now save the file to disk, naming it small2e.tex. You can destroy the second browser window now.

    Open a terminal window and issue the command latex small2e. You will get some messages from TeX (the program underlying LaTeX). When the UNIX prompt returns, issue the command xdvi small2e. A preview window should open which shows the processed file as it will appear when printed. (The printed file will look better than the screen image because the screen does not have very high resolution.)

    Now compare the screen output with the input file on paper. You should get a basic idea of how LaTeX works as a "mark-up language."

    Now try the same procedure with the longer file sample2e.tex.

    How do you get hard copy of the LaTeX output? First, you should know what your current default printer is. At a SUN terminal, you can type (at the command line) lpq to get the name of your default printer. Suppose that you want the default printer to typeset your output. Issue the command dvips small2e or dvips sample2e. This will produce a PostScript file that is sent directly to the default printer to produce your typeset copy. In case you would rather not have output sent to the default printer, you can create a Postscript file by using a command dvips small2e -o small2e.ps . Here we have chosen to name the Postscript output file "small2e.ps" but we could have chosen a different name. The file can be printed to any printer by using the SUN print command lpr -Pxxxxx small2e.ps, where xxxxx is to be replaced by the name of the printer to be used. If you just use lpr without the -P argument, then the document will print to your default printer. It is easy enough to change your default printer for convenience, but I'll let you figure that one out.

    Further Steps

    1. Send email to somebody letting them know what you are doing today.
    2. Write a short article in LaTeX2e to present the following information Title the document "LaTeX text exercise" and make yourself the author.

    / Home / Contents /


    Last modified: January 19, 1999

    Martin Karel