[next] [prev] [prev-tail] [tail] [up]

2.2 Principles of 4TeX 

The 4TeX system consists of a host of separate programs, e.g. it uses emTeX, the state-of-the-art TeX implementation for ms-dos and os/2. It is named after its author, Eberhard Mattes. You must prepare your TeX input file with an ascii editor (we suggest you use TSE junior, TSE, or PFE); the actual TeX compiler converts this input file into a .dvi file (from DeVice Independent); separate programs generate printed output from the .dvi file and allow you to preview the typeset page on your screen. In addition, there are a great many add-on utilities: a spell-checker; a database program for maintaining bibliographic references; an index generator; a utility to remove TeX codes; a font generation program, extended graphics support etc.

Some of these programs, especially the various versions of the compiler and of the print and preview programs, require lots of parameters and/or environment variables. 4TeX is designed to shield you from the dirty bits.

As mentioned above, the first objective in creating 4TeX was to have some sort of integrating menu to call TeX and the other main programs without the fuss of setting, let alone remembering, parameters.

One obvious way to do this is by using a batch file. However, plain command.com batch files tend to be slow, since only one command is read at a time. A much bigger draw-back is its lack of even the most basic commands for an interactive system. A very attractive alternative is provided by 4dos (shareware by JP Software Inc.), nowadays a well-known replacement for command.com.

What once started as a small and simple batch file grew into a collection of batch files that currently comprises almost 15 000 lines of sometimes fairly sophisticated code. The main reason to program 4TeX in the 4dos batch language and not in some higher level programming language (e.g. Pascal or C) is that by using 4dos we could create an open system, i.e. one in which anyone can modify the workbench to suit personal needs and taste without the need of special tools or extra compilers. Another reason to use the 4dos batch language is the availability of environment variables and variable functions that enabled us to do things that would require very tedious programming in a higher level programming language. Since it is also fast (the complete batch file is read into memory at once), it was an easy decision to implement 4TeX as a 4dos batch file.

One might object that using 4dos batch files deprives the old-fashioned command.com users from the benefits of 4TeX. We happen to think that this would only be a mild punishment for not recognizing how good 4dos really is. However, for those who have a good reason not to use 4dos we also implemented 4TeX to run under command.com. This is, of course, achieved by loading 4dos as a secondary shell.

Though 4dos is very powerful, some routines had to be written in other programming languages, e.g. to support mouse operation and to select files. Some free software and shareware programs are used, e.g. GWS, Paintshop Pro, Cshow, TSE junior and Unzip.

2.2.1 Free software, shareware and commercial software 

4TeX uses free software and shareware programs.1

Using free software and shareware only, we are capable to distribute 4TeX without violating any law or agreement. As a 4TeX user you are supposed to pay for the shareware programs that you use. There is a complete list in the 4TeX documentation (see Chapter 8.). Remember that 4TeX could never have been built without these programs.

2.2.2 Setting up 4TeX 

After installing 4TeX some customization may be required before 4TeX will run.

The most important files are texuser.<os> 2 and system.set. In these files all parameters that 4TeX needs are set. The file system.set contains values for the parameters that are needed for any user (e.g. what options does the compiler need, where are the fonts located), whereas texuser.<os> contains values for the parameters that are user-specific (e.g. where TeX files are stored and what screen colors should be used).

As you might have guessed, 4TeX runs perfectly on a network. Because Novell Netware is the most popular type, 4TeX has an interface to use network printers. However, only a few lines of code in one of the batch files need to be changed to support this function on any other type of network.

Installing 4TeX from CD-rom is quite easy, i.e. just by running an installation script and answering a few questions the directory structure needed for 4TeX is created and the user specific settings are stored in the file texuser.<os>. The CD-rom contains an enormous amount of files that you probably do not need (e.g. the TeX fonts for all the supported printers). It is possible to run the workbench from CD-rom or (partly) install it on your hard disk. This allows the user to choose the settings best suited for his/hers computer system, i.e. available hard disk space, completeness of the TeX system, and performance of the workbench.

[next] [prev] [prev-tail] [front] [up]