OS/2 eZine - http://www.os2ezine.com
August 16, 2003
Isaac Leung (P.Eng.) got a degree in Engineering Physics followed by a Master's in Electrical Engineering after which he promptly got a job as a product engineer at a company which makes high speed datacom chips. Following the dot-com meltdown, he's back at school studying biophysics and optical properties of semiconductors. He is old enough to have cut his computer teeth on Commodore 64's and first played with OS/2 1.3 EE while at a summer job with IBM. The first PC he ever owned came with Windows 95, but he soon slapped on OS/2 Warp 3 and has been Warping ever since. In between looking for a new job, he plots to take over the world.
If you have a comment about the content of this article, please feel free to vent in the OS/2 e-Zine discussion forums.

There is also a Printer Friendly version of this page.

Previous Article
Next Article

SciTech SNAP Graphics for OS/2 and Linux


Some of you may have guessed by previous articles that I'm not exactly the biggest fan of the TeX (pronounced "tek" because it's not an "X", it's a Greek "Chi". I didn't make this up. Computer science guys have such a weird sense of humour sometimes. In fact, the originator of TeX was none other than Donald Knuth, one of the original giants in the field) or LaTeX document processing system. To say that I hate it would be a bit of an understatement.

Most of the arguments made for TeX/LaTeX vs. a standard, GUI word processor basically come down to non-familiarity with modern word processors. In fact, most of the complaints levelled towards word processors by the TeX/LaTeX camp have been addressed as far back as the mid-1990's.

Okay, having said that, it doesn't mean that there are no redeeming qualities to using TeX.

  • It's really cross-platform. Really. It's available on almost any operating system you can think of, and you can share the files back and forth without any problems
  • It's light on resources. Yes, because it's basically completely text-mode (hence lending to its cross-platform portability), it doesn't require a particularly fast machine and you can do most of the work using any text editor.
  • It is relatively bug-free. It just works.
  • Everything is in nice, human-readable (well, sort of), text format. It tends to lend itself easily to scripting and automation, which is likely why the following point exists:
  • Probably most importantly (for me), it's still the preferred format for submitting research papers to a lot of scientific journals. Some of them have slowly been offering Word as an option, but since I don't use Word, that doesn't work for me. So, if I want my work published, I have to submit in TeX format.

Actually, using TeX is a little bit similar to what we do here at OS/2 e-Zine. The content is dumped into a pre-processor (PPWizard) to generate the web site that you read every month.

Since it seemed inevitable that I would have to use some TeX package sooner or later, I set about finding an easy one.

Most "standard" TeX packages follow normal procedure. That is, they take an input TeX file, compile it, and it produces a DVI file which constitutes the finished product. (Think of it as sort of equivalent to a Postscript or Acrobat PDF file). Of course, that means you need a DVI file viewer. That's not usually a big problem, I think even Ghostview will handle that, except that I still have this DVI file which isn't used for anything else. To print it out or distribute it, you need to translate to Postscript or some other more commonly viewed format. Again, probably not too big a deal, even for OS/2, but that was more hassle than I was looking forward to for something I didn't particularly enjoy using.

After looking at the assortment available on hobbes, I stumbled on the VTeX/2 offered by Micropress, Inc.. VTeX/2 is freely available for individual, non-commercial use (similar to most other packages), but where it stands out is that VTeX/2 is designed to spit out Acrobat PDF files (or Postscript) as the final output. Perfect! Even better, it has a simple installation, none of the fussy stuff I was expecting (based on *NIX experiences) for the other packages.

Getting VTeX/2

VTeX/2 is not a small distribution, but it isn't too hard to get. You can go to Micropress to download the VTeX/2 files. You'll need to grab the following files:

  • vtex-doc.zip (1.2MB)
  • vtex-fonts.zip (11.8MB)
  • vtex-fonts2.zip (25.6MB)
  • vtex-gex.zip (6.9MB)
  • vtex-sem.zip (0.4MB)
  • vtex-special.zip (3.4MB)
  • vtex-texmf.zip (9.2MB)
  • vtex2.zip (1.7MB)
  • vtexinst.cmd

Yes, that's right, over 60MB compressed. I think that is pretty standard for any TeX distribution, it's pretty much the same size when I select to have that installed under Linux. That is for a non-graphical "word-processor". (And you thought StarOffice was bloated! At least that came with a spreadsheet, presentation and drawing packages too).


Thankfully, Micropress has made VTeX/2 really easy to install. Even though it is relatively simple, I highly recommend you read the instructions and follow the steps. It's very clearly written and includes trouble-shooting and testing information. VTex/2 says it requires Warp 3 or better with 16MB, and HPFS (or some other drive capable of long filenames).

First step? Just run the vtexinst.cmd script that comes with it. It will ask you for the drive you want to install to, at which point it will proceed to unpack everything into the appropriate directories and (optionally) modify the CONFIG.SYS file for you. Easy!

A reboot is required before you use it. However, that's not quite the end of it. Perhaps showing its roots, there are a couple of more steps before you can start using it. You have to issue a couple of commands to create the initial format/configuration for VTeX/2. The scripts are provided, so all you have to do is run makevlatex and makevplain. If you want to install into another directory, read the instructions below first before you run these two scripts!

Once you've run the two scripts, you're finally done. If you want to be absolutely sure everything is working, you can run a test script. "vlatex ltxcheck" will run a script with some prompts and messages that ensures everything is working.

Now maybe I've been "out of the loop" for too long, but I find this is far less painful that most other setups I've tried, and the test file is absolutely wonderful for peace of mind. Not that I needed it, since the install went without a hitch.

Installing to another drive

One complaint I had was that the process doesn't really assume that the user will install to anything other than the root of the selected drive. The installation scripts will probably run if you give it a drive and directory, but I didn't try. But even if it does work, you'll need to make some manual modifications yourself, so I might as well go through all of them.

  1. In your root directory, you should find 2 new directories \vtex and \texmf. Just move or copy them to the new directory of your choice.
  2. Modify the corresponding PATH and LIBPATH statements in your CONFIG.SYS to point to the new locations. There will only be entries for \vtex.
  3. Go to \vtex\bin and modify the vtex.ini file. It is just a text file. At the beginning is a list of directories pointing to \vtex and \texmf. Modify accordingly.
  4. Go to \texmf\vtex\config and modify two files, ps.fm and pdf.fm. Again, these are text files, just modify the one line under the section LOCAL-OS2 which points to the TEXMF directory. Don't forget to do the same for both files.
  5. Final step, find the files makelatex.cmd and makevplain.cmd, they should be in \vtex\bin. This is the one thing I'm sure the installation script won't modify. These files have the paths for \texmf and \vtex hardcoded in on two lines (for each file). It should be obvious by inspecting this file in any text editor which lines you have to modify. Be sure to make the changes to both files before you run these scripts for the first time, else it won't run properly.

Working with TeX

Working with TeX is a little bit like preparing your document entirely in Postscript format. Or perhaps typing your document in raw HTML. Here's a sample:

\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\title{Manuscript Title:\\with Forced Linebreak}% Force line breaks with \\
\author{Ann Author}
\altaffiliation[Also at ]{Physics Department, XYZ University.}%Lines break automatically or can be forced with \\
\author{Second Author}%
Authors' institution and/or address\\
This line break forced with \textbackslash\textbackslash
\author{Charlie Author}
Second institution and/or address\\
This line break forced% with \\
\date{\today}% It is always \today, today,
% but any date may be explicitly specified
An article usually includes an abstract, a concise summary of the work
covered at length in the main body of the article. It is used for
secondary publications and for information retrieval purposes. Valid
PACS numbers may be entered using the \verb+\pacs{#1}+ command.

That's only a portion of the file, and that's before you even enter any of your "meat" of your document! This file then has to "compiled" and debugged if necessary. Some documents (especially if you have a table of contents or index), may need to be compiled 2, 3 or more times. (Once to get the number of pages, another for I don't know what, and another for building the table of contents). It's a bit odd because in such a circumstance you have to issue the identical command 3 times in succession, with each iteration producing a different result. You can see why TeX never quite caught on with the general public. It only stayed in use because at the time, there were no other alternatives that could do what TeX did and before the advent of GUI word processors, most other text-based processors did pretty much the same thing.

Don't despair, it isn't as hard as you might think to get started with simple documents. Fortunately, many, many templates exist for whatever documents you may want to create. They are all over the Internet, and it doesn't matter who created it, it should be compatible on all TeX systems. Very often, the scientific journals will have a TeX template ready for you to download anyways. Just find the appropriate template and type in your text in the appropriate area. You don't even need to know what all the other stuff in the document is about really. (If you want an easy GUI that will handle TeX, see the previous review on LyX/2). You can also check out the examples included with VTeX/2, they can be found in \texmf\doc\vtex\examples. All you have to do is type:

 vlatex <name of file>

(where <name of file> is any TeX file, usually ending in .TEX) and the file will be "compiled" and a .PDF is generated. It is very, very powerful, I recommend you see what VTeX/2 can do. This is the first time I've seen a .PDF that has an animation embedded in it! (Try compiling tryanim.tex, and load the resulting Acrobat .PDF. Moving your mouse over the box causes a worm to crawl by). If what you want to do is generate Acrobat .PDF documents, I don't know of a more powerful way under OS/2 right now (short of VirtualPC). The Ghostscript method works, but if you want animations, different page transitions and URL's in the PDF that actually work, VTeX/2 will handle all that.

VTeX/2 can also handle non-English languages, including Greek and right-to-left ones like Arabic and Hebrew. I've included a screenshot of a few of the samples I've compiled below. (I hope it doesn't say anything offensive. I can't read it, I just compiled the supplied examples).
Sample PDF output from VTeX/2

VTeX/2 should be able to handle DBCS languages as well, such as Chinese, Japanese or Korean. If you want to give it a try, you should head over to grab some CJK packages for TeX. You may need some extra fonts as well, but that should get you started on DBCS wordprocessing for at least Chinese/Japanese/Korean.

I also noticed that, unlike Ghostscript, it doesn't seem to have the bugs when it comes to producing .PDF's utilizing smooth, vector fonts rather than converting some of the fonts to bitmap ones, except possibly for the Hebrew font. (Ghostscript seems to have a problem converting anything other than Helvetica, Times and Courier nicely. This is a cross-platform bug, but you can usually work around it if you're very knowledgeable about setting up Ghostscript).

EPM TeX Front End

EPMTFE is a free add-on for EPM used to help you working with for TeX in general. A VTeX/2 specific version also available.

EPM TeX Front End

You should read the instructions carefully on how to install it. (Not really that difficult, unzip the updates into your EPM directory, and turn on a couple of options in EPM). You can see that there is an extra "VTeX" menu under EPM now. If you grab the EPMKWDS.TEX package, it will also do nicely coloured syntax highlighting. (The EPMKWDS.TEX comes with the EPM 6.03 package on hobbes, but doesn't seem to come with Warp 4 or MCP 2). It's not just pretty highlighting though, EPMTFE really is a helper. For example, type in \begin{abstract} and hit <ENTER>. It will automatically fill a line below for \end{abstract} and indent the current line for you. I find this very handy. EPMTFE makes the tedious work in TeX a little more bearable. And it's free too!


Looking for a cheap (free!) "wordprocessor" that is exceedingly powerful? Well, TeX-based systems are about the only choice. It is very, very powerful indeed if you're willing to put the time into learning it. (Very much more so than the free StarOffice or OpenOffice). This is professional, industrial quality stuff. TeX is multi-lingual and multi-platform already, more so than any other word processor in existence.

Or maybe you're like me, and you don't have much choice, "forced" to use such a system. Well, on OS/2 VTeX/2 seems like the best bet so far in terms of ease of use and installation. No messing around required for installation, and it spits out in Adobe Acrobat or Postscript format which almost anyone can deal with. As much as I can possibly do to any TeX compatible system, I have to give VTeX/2 a thumbs up here. If you try it and like it (or even not!) drop Micropress an e-mail and let them know what you think (they even encourage this on their website).

Last minute updates...

Some of you may have chanced across a review of VTeX/2 in the OS/2 VOICE newsletter. There's a note that VTeX/2 doesn't include the BibTeX package. BibTeX is a widely used package for keeping track of bibliographical references. Briefly, what you do is keep a simple text "database" (it's not really a database) file of all possible documents you might want to reference, with all the pertinent information (i.e. author, title, date, etc). Using BibTeX, this information is automatically extracted and inserted into your document in an appropriate format (which you define).

Well, you'll be happy to know that the latest release does contain BibTeX! Just run vbibtex. I've been using it for weeks now churning out another paper and it seems to work with everything I throw at it.

Related Links

VTeX/2 Homepage
emtexTDS, another TeX distribution
FTP Archive for all OS/2 TeX related things
EPM add-on helper for TeX and VTeX
Xindy is an indexing system for TeX, sort of like BibTeX. OS/2 version is available
Sourceforge page for Xindy
CJK package for TeX

Previous Article
Next Article

Copyright (C) 2003. All Rights Reserved.