Latex Commands

The following directions are basically directions for compiling the latex template files template.tex and template.bib. If you are using these template files, you will also need the postscript graphic arc.ps in the same directory. To compile your own files, you will have to adjust file names accordingly. The following assumes you downloaded these files into a directory without running latex for the first time.
  1. You must first attempt to compile the .tex document:
    prompt>latex template.tex

    This will create the following files: You should get several warnings because latex doesn't know where to find the references for the 3 bibliographic references in the template file. There will also be a warning because latex builds a table of contents in two passes (first one to scan document and format text, the second will build the table of contents based on counts from the first run). We have only run latex once at this point so we will get the "Label(s) may have changed warning". A simple re-running of the latex command usually gets rid of this warning. I have given an example of my error output below:

    LaTeX Warning: Citation `Tenenbaum96' on page 1 undefined on input line 56.
    
    LaTeX Warning: Citation `Huitema00' on page 1 undefined on input line 60.
    
    LaTeX Warning: Citation `Huitema00' on page 1 undefined on input line 60.
    
    [1] <arc.ps> [2]
    Chapter 2.
    No file template.bbl.
    [3] (template.aux)
    
    LaTeX Warning: There were undefined references.
    
    LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
    
     )
    Output written on template.dvi (6 pages, 4928 bytes).
    Transcript written on template.log.
    


  2. At this point you can look at the current product with the xdvi viewer using the following command:
    prompt>xdvi template.dvi &

    You will notice that there are no entries for the table of contents, because we only ran one pass of latex. There is also no Reference or Bibliography section because we haven't run bibtex yet. If you look closely, there are question marks in the reference slots in the text of the first section for the same reason.


  3. Let's run bibtex, to get the bibliography in order.
    prompt>bibtex template


  4. Now we can run latex again, to incorporate some of those changes.
    prompt>latex template.tex

    This pass of latex will allow the table of contents to be built, and even the bibliography section to be written, but the individual reference may still me question marks. If this is the case, latex may ask us to re-run to make everything right. So we will run it one more time (this happens so often, that some people run it twice every time they run it).


  5. Running it again, as promised
    prompt>latex template.tex

    This has most likely fixed the warnings, and created a dvi file you could live with. However, the xdvi viewer isn't the greatest. It many times doesn't handle the imported pictures very well. In the next step we will convert the dvi file into a postscript file.


  6. Converting the .dvi file to a .ps file is done with the dvips command:
    prompt>dvips -o template.ps template.dvi

    We use the -o parameter to specify the filename of the .ps file.


  7. To look at the postscript file, you can use the ghostviewer:
    prompt>gv template.ps &