TeX and LaTeX for OS/2 (GNU - Part 4)- by Murray Todd Williams

For those of you just tuning in...

This is the fourth article in a series about GNU software for OS/2. The original article provided a brief introduction to the world of GNU. GNU software, written under the banner of the Free Software Foundation is a library of software so well written that in many cases it far outperforms commercial products.

In the second article I provided some simple instructions to assist in finding and installing EMX -- the base foundation for GNU on OS/2 -- as well as the GCC compiler, a very powerful compiler for C, C++, and Objective C programs. (I also gave a preview of GNU's latest miracle: XFree86 for OS/2.

The third article demonstrated GNU EMACS. This text editor is able to perform incredible tasks (including a built-in psychotherapist!) that dwarf any commercial competitors.

In this article I will endeavor to give you a brief view of TeX and LaTeX2e, point out some basic hints for installation, and show how to run these programs directly through EMACS.

So what is TeX?

Glad you asked! TeX is sometimes referred to as a text formatter, (as opposed to a text editor) and it's important to explain this distinction. When it comes to working with "text" we can work with three different types of applications: text editors, text formatters, and word processors.

The text editor basically works exclusively with ASCII text files. There are no distinguishing features like different fonts, italics or different type sizes. We use text editors to work on system files (like config.sys) or to program, or to write e-mail.

The word processor is probably the best known application of the 90's. Examples of these are the WordPerfect, Word Pro or Describe. They keep track of text formatting codes and keep the special instructions for those codes invisible. To make a clearer distinction, let's consider all "word processors" to be WYSIWYG. (What You See Is What You Get.)

The text formatter's end purpose is identical to that of the word processor: to generate a nicely formatted page of text, images, tables, etc. In the dawn of the Personal Computer era (early 80's) before the word processor became popular, text formatters were widely used. These programs would take an ASCII file, filled with a document's text and formatting commands and convert it into a finished document. To center a line you would write:

This line is centered.
TeX is a very powerful text formatter. Although it is not a WYSIWYG word processor, it should not be dismissed. Many people (myself included) swear by TeX. Here are a few reasons why...

How about a peek at some TeX output?

This is not easy to do in this article. If you can display (or print) postscript files, you can view an article I wrote a few year ago, or a program manual (warning: 399K) for some (rather esoteric) software I'm developing. Both should demonstrate some of the basic capabilities of TeX.

This is a small example of the equation formatting abilities of TeX. Many more elaborate equations can be flawlessly typeset.

What's the difference between TeX and LaTeX?

Another good question. I'm glad you asked. LaTeX is like a layer on top of TeX. With TeX you have control over everything. It's like a low-level programming language. LaTeX has much more convenient commands and features to make document-generation easier. LaTeX provides advanced features like automatic bibliographies, tables of contents, chapter and section numbering, and indices.

There are two flavors of LaTeX: old LaTeX and LaTeX2e. The latter is a more advanced rewrite of the LaTeX standard. I suggest when you install TeX/LaTeX that you stick to LaTeX2e.

How do I install these programs?

Eberhard Mattes, the man responsible for EMX, the GCC port to OS/2 and the EMACS port, also ported a version of TeX called (appropriately) EMTeX. This is a very slick version of TeX. In fact, it's a bit smoother than the version of TeX that I have running under Linux. Installation is rather painless if you follow the instructions carefully, and configuring everything is an easy task.

Once again, the Hobbes Archive is the best place to start. Check out the /unix/tex/emtex directory first. There you will find the README.ENG and INSTALL.ENG files.

Assuming you have already read my other articles and installed EMX, GCC and EMACS, this installation should not be difficult.

Additional goodies

There are some programs which will make EMTeX ever simpler to use:
  1. PMTeX (ZIP, 50k) is a small OS/2 PM utility which will load a TeX file, load your favorite editor, "compile" the file with TeX and launch the PM TeX viewer or send the finished document to a printer.
  2. AUCTeX (ZIP, 318k) is a large collection of EMACS Lisp files which allow you to do everything from within EMACS. I cannot tell you how wonderful this package is! Needless to say, it easily falls in my top ten list of "most important utilities". For those of you who have already started working with EMACS, "c-hm" gives you a help screen that describes the basic commands in LaTeX (or TeX or BiBTeX) mode. Be warned: install this one carefully and follow all the instructions.
  3. ISPELL (ZIP, 540k) is a good general spell-checker. This isn't really a TeX utility, but after you install it, EMACS will spell-check your documents WITHOUT getting hung up on the TeX commands.
  4. DVIPM. Although this is part of the regular EMTeX distribution, I'd like to remind you that it exists. This is a PM-application which displays your TeX documents very nicely.
In addition, I strongly suggest the following two books for learning LaTeX:

Now go forth and install...

I admit my articles have grown less pedantic each month. It's important to develop the ability to tinker if you want to use UNIX software. Each month the installation process has become increasingly difficult. It's important to understand that GNU software is often tricky to install and use the first time.

If this doesn't scare you off, you'll soon develop the skills needed to bravely port GNU software that hasn't yet been ported to OS/2. The magic of GNU is that any GNU application should be able to compile on any (supported) operating system with a few minor alterations. The entire wealth of UNIX utilities is out there and available for OS/2.

My next article, which will complete this series, will explore a program called Ghostscript. This application will allow you to display postscript files on-screen and print them on a non-postscript printer. With some fiddling, ghostscript can be called directly from Web Explorer to display postscript files. I will also provide some useful comments for installing XFree86 for OS/2.

Until then...

Murray Todd Williams is a student at Colorado State University, working on a M.S. in Statistics. He is also a member of Team OS/2.

[Index]  [ Previous] - [Feedback] - [Next ]
Our Sponsors: [InterStream] [J3 Computer Technologies] [Mount Baker] [Post Road Mailer]

This page is maintained by Falcon Networking. We welcome your suggestions.

Copyright © 1996 - Falcon Networking