New LaTeX

Tough on bad typesetting. Tough on the causes of bad typesetting.

Since the upgrade to Solaris, LaTeX on the mathssuns has been upgraded to LaTeX 2e (New LaTeX). This is a much improved version, and includes many extra packages. There are two main changes to be aware of: the way of running LaTeX has changed, and the document format has also changed.

Running LaTeX

As mentioned in Barry's web-pages, the way of running latex has changed. The mtex command no longer exists, so running Latex and making a postscript (.ps) file is now a two-stage process. Assuming you have a file document.tex:
  1. Create the "dvi" file document.dvi with the command
    	latex document.tex
    
    At this stage, you can view your document with the command
            xdvi document.dvi &
    
    This gives much better results than ghostview (especially on colour/grayscale screens) and is faster as well. This is a new version of xdvi which shows included postscript figures, so it does everything that ghostview does anyway. It's very easy to use: two handy commands are "20g" to go to page 20, "5s" to go to 5x magnification, and "12S" to make the text darker (change the 12 to a lower number for darker text, useful on mono terminals). See "man xdvi" for more details.

  2. When you are ready to print your document, you can create the postscript ".ps" file from the dvi file with
    	dvips document.dvi
    
    and then print the postscript file as usual with
    	lp document.ps
    

Document Format

The document format has changed slightly in LaTeX 2e. (Documents written in the "old latex" style will still run in "compatibility mode", but to take advantage of the new features I strongly suggest you change to the new style.) The main change is that the file should start with "documentclass" instead of "documentstyle", and the way that external packages (like psfig) are included has changed.

Here is a document skeleton in the "new latex" style:

	\documentclass[11pt,a4paper]{article}
	
	\usepackage{psfig}
	
	\begin{document}
	
	Hello \emph{sailor!}.
	
	\end{document}

The "\usepackage" command instructs LaTeX to use an external package (many such packages are included standard with LaTeX2e: there are packages for graphics, multiple columns, figure handling, bold maths, you name it.) If in an old document you had:

	\documentstyle[psfig]{article}
or (heaven forbid)
	\documentstyle{article}
	\input psfig
this should now be changed to
	\documentclass{article}
	\usepackage{psfig}

The other major change is that the style-changing commands like \bf have been changed to commands like \textbf, but the old versions will continue to work.

There are two books describing the new LaTeX commands: the new edtion of the old Lamport Latex manual (basics) and "The LaTeX companion" (advanced stuff -- an excellent book to consult if you can't get latex to do what you want). There is also a latex manual on-line which you can read with "info latex". When the web-server is up and running I will make a latex page with links to other on-line resources.

More information


Dave M. Smith <D.M.Smith@lancaster.ac.uk>
Last modified: Fri Jun 20 12:16:02 BST 1997