Can I Produce LaTeX Files On My PC?
WeTeX is a collection of programs needed to produce tex files. These programs include Emacs, MikTex, Yap, ispell and AUCtex. WeTeX is installed on all the new XP operating system pcs including the two public windows computers (found in Pav B and G). Wetex makes good use of the function keys, a 'quick view' guide is provided (can also be found in c:\wetex\local\info\)
Another method of producing tex work is to use the Unix operating system via Exceed, currently this is the only method when working on department Windows 2000 pcs.
Below is the introduction page from WeTeX listing some of it's features.
Welcome to WeTeX
================
You have just started WeTeX for the first time and you are looking at
two windows displayed by the emacs editor. This window is showing
information for first-time users. The other window is showing the
contents of a LaTeX file called "intro.tex". I'll refer to this as the
LaTeX "input file".
Press function key F2 to switch between the two windows (try it).
What is LaTeX?
==============
LaTeX (rhymes with trek) is a computer "language" used for producing
very high quality printed output. It is widely used by the research
community and is particularly good for producing scientific reports
and books containing mathematical formulae.
LaTeX is a "markup" language in which formatting is specified using
special commands inserted in the text. A LaTeX file can be prepared
using any text editor such as emacs or notepad, or even with Word if
the file is saved in Text Only format. intro.tex contains LaTeX
commands to format the text as a (rather short) article with a title.
WeTeX
=====
WeTeX (Windows emacs TeX processing) is a customisation of the emacs
editor written in DAMTP. It uses the AUCTeX and MiKTeX software to
facilitate the various steps involved in writing and processing LaTeX
files.
In this 10-minute exercise you will learn how to use keyboard function
keys to edit, process and view LaTeX code.
Run the LaTeX processor
=======================
Before you can view a document written in LaTeX it must first be
formatted using the latex program. This generates a so-called DVI file
containing DeVice Independent data which can then be viewed on screen
or printed. A DVI file has a name similar to the LaTeX file, with the
.tex replaced by .dvi. More information about running latex is
available in the main WeTeX Info documentation which you will access
when you next start emacs. To generate the DVI file press function
key F8 to invoke the latex processor, then F2 to return to this window
(do it now). You will see a message
LaTeX: successfully formatted {1} page.
displayed in the status line at the bottom of the other window.
View the DVI output
===================
Now start the DVI viewer (called yap on this computer) by pressing the
F9 function key. Note that yap is a separate program with its own set
of menus and keyboard commands.
Observe that yap has placed a grey "bullseye" on the title line,
corresponding to the position of the insertion point in the .tex input
file (shown by the rectangular cursor). This is very useful when
processing a large multi-page document as pressing F9 also tells yap
to display the DVI document at the page containing the bullseye.
To return to the emacs window, double click on a line of text in the
yap window. This tells emacs to display the input file positioned at
or near the LaTeX code which produced the selected line.
Now move the cursor to the "Hello again" line in the input file and
press F9 (you do not have to run LaTeX again as the input file has not
been changed). yap now displays the second page of the document.
Double click to return to emacs.
Edit the LaTeX example
======================
Click the left-hand mouse button on the 'i' in \title in the left-hand
window to position the insertion point on the 'i' and then press the
Delete key. You can also move the insertion point using the arrow
keys. Press F8 to run latex again. You will see an error message:
LaTeX errors in `*~/intro output*'. Use C-c ` to display.
displayed in the bottom line of the window. Press C-F8 to display the
first error (C-F8 means "hold down the Control key and press function
key F8"). You will see an error message saying
ERROR: Undefined control sequence.
together with an indication of where in the file latex discovered the
error and some advice on how to correct the error.
Note that C-F8 is a WeTeX customisation - the standard AUCTeX key
sequence to display errors is "C-c `", i.e. Control-C followed by
backtick (`), which is slightly less convenient to type. You can use
either.
It is quite common in LaTeX processing for a file to contain several
errors. Press C-F8 repeatedly to see them. In this exercise the other
errors are a consequence of the first one. Because the "\title" was
not read correctly, latex complains about a missing "\begin{document}"
and (not surprisingly) a message that no \title was found.
Correct LaTeX errors
====================
To correct the error re-type the i in "\title". Note that AUCTeX
positions the insertion point on the line containing the error (more
precisely, the line where the error was detected).
Press F8 to check that the file is now error-free again, and press F9
to view the DVI.
Spell checking
==============
Press F7 to spell check the input file. This will check all words
except ones preceded by \ (so that TeX commands like \documentclass
are not reported as misspelt English words). When a misspelt or
unknown word is found a list of possible replacements is displayed at
the top of the window, each preceded by a digit or character. To
replace the misspelt word press the digit or character preceding the
word of your choice, or press the SPACE bar to leave the word
unchanged.
Try changing "Hello" to "Helo" and press F7. To correct the error
press the indicated key (probably) 5. To exit from the spell checker
without making any corrections press "x".
Printing
========
To print the LaTeX document switch to the Yap viewer (press F9) and
select menu item File->Print.
To print the contents of the current emacs window press C-F9 (this
prints the unformatted text itself, not the .dvi file). A fixed-width
10-point font (Courier New) is used.
Other function keys
===================
Press F1 to display the info window. Press C-F1 to open another
window showing WeTeX function key assignments.
If emacs types an obscure message in the bottom line of a window and
invites you to type something, you will most likely have inadvertently
typed one of emacs' many keyboard command sequences (you will learn
some of these in due course). Press F3 to cancel this operation and
return to normal working.
Revision
========
Function key Action
F1 Display the emacs info window
C-F1 Display a list of WeTeX function key assignments
F2 Switch between the two emacs windows
F7 Spell check the input file
F8 Run the latex processor
C-F8 Display the next processing error
F9 Run the DVI viewer to display or print the output
C-F9 Print the text in the current window (does not need
to be LaTeX code).
Note that these actions, and several more advanced functions, can also
be carried out by selecting from the WeTeX menu at the top of this
window.
Quitting
========
The next time you start WeTeX you will see the main WeTeX info page
with links to further information about using info, emacs and latex.
To quit from emacs select Exit Emacs from the WeTeX menu.