TeX in CEU

This is a short introduction to the scientific typesetting languages TeX and LaTeX, and their usage in CEU.

The TeX language has been designed by Donald E. Knuth in the early 80's. In TeX you produce a source code for your material, which is fed to a program, producing a so-called device idependent code. This latter one then can be printed out on several ways, or shown to the screen.

In CEU you can use TeX both in the Windows and the Linux environment. For Windows the public domain distribution MikTeX is installed. To use the TeX package in the Computer Lab, please perform the following steps.

  1. Open the Application Launcher, if it was iconified.
  2. Locate the MikTex icon, and click on it.
    MikTeX in NAL
  3. Wait until the installation finishes. If done the first time it might take several minutes.
  4. Open the Application Launcher again, and choose WinShell 2.2.1

You can type your LaTeX source in the WinShell window. When saving your work, please put them into your network drive under a separate folder. DO NOT USE funny names for you LaTeX files, keep their length below 8 characters, and use only lower case letters and digits. By no means use spaces in the name.

Process LaTeX files

Simply click on the LaTeX button at the WinShell toolbar.

The log file, with all error messages and warnings is in the bottom part of this window. Browse through it to see if everything went well.

View the result

Click on the DVI button with the magnifying glass at the WinShell toolbar. Sometimes you have to wait until all used fontst are generated.

Linux

Linux is available in Computer Lab #1. The public domain teTeX distribution is installed. Its usage is quite simple: after producing your TeX file with any of the text editors, open a console window, and execute
 tex mytex
or if you have a latex file,
 latex mytex
To view the result, use either xdvi or kdvi, both are available via the menus.

There are lot more options available for Linux TeX than for for Windows; you can use different graphical applications to produce embedded postscript (.eps) graphics, which then can be included into your document. Also, the majority of LaTeX packages are available only within Linux.

TeX Error Handling

It is not a trivial task to produce TeX source files without errors. Whenever there is an error, TeX (and LaTeX as well) stops and waits for your action. My suggestion is that in that case stop program running, correct your source, and try again. (This does not apply when you are using Linux and emacs for processing TeX.)

If there was an error during processing, the program prints out the error message, the line number where the error was discovered, and the offending line broken at the position. The program writes out a question mark. Action: Hit x.

If you mistyped the file name, or some style parameter, it says this or that file not found, please type the name of your input file. You can get out by hitting Ctrl+Z (hold down the Ctrl button, push Z, then release both).

If you gave no input at all, or your document does not end properly, TeX wants to read more. In this case it types a star (*); you can answer by typing

\asdflkjh
(or something meaningless starting with a backslash). Reading this, TeX will complain that it does not know the type command, so you can use the letter x to get out.

TeX and LaTeX errors are quite verbose, and always a line number is submitted with part of the offending source, indicating the point where the error was found (not necessarily where the error was made). To stop TeX processing, simply respond by hitting the x button. Other possibilities are:

  1. x stop execution of processing.
  2. q continue execution but do not complain about anything.
  3. i insert TeX instructions, leaving out the wrong ones.
  4. h get a short help about all possibilities.

In some cases TeX looks for files which do not exist. If the reason is mispelling, simply type the correct form of the file. If you do not know what file it is, please hit Ctrl+Z. Otherwise TeX will insist on receiving an input file.

Other TeX Resources

Here are some TeX related material which might be useful.

Web links

Tex source files, style files