The first steps with TeX

Although there is no need to learn how to write TeX documents in order to turn our SGML or XML documents into printable output, we should take the time to perform a small test with our TeX installation at this point. Without TeX being set up properly, the TeX backend will be useless anyway. Even if you don't know anything about TeX, simply follow the instructions below.

Start a new TeX file in your Emacs by typing C-x C-f textest.tex. Enter or paste the following lines:

\documentclass[letter]{article}

\begin{document}

\section{X, 34}
For one bitten by true doctrines even the briefest and most familiar saying
is reminder enough to dispel sorrow and fear, for instance:

\begin{verse}
Like as the generation of leaves, even such are the children of men.\\
The wind scatters them on the face of the ground, but others the woodland\\
Brings forth again in its strength and they shoot in the season of spring;\\
Like to them are the children of men, one waxes, another is waning.
\end{verse}


\end{document}
   

Now save the file by typing C-x C-s. Open a command-line window and change to the directory where you saved your textest.tex file. Now enter the command:

C:\user\myself>latex textest.tex

This should create the files textest.aux, textest.log, and textest.dvi, which are an auxiliary file, a log file, and the formatted document, respectively. View the output by typing:

      C:\user\myself>dvips -o textest.ps textest.dvi
      C:\user\myself>gsview32 textest.ps &

This should open Ghostview and load the output file. You should see a nicely formatted poem now.