\newcommand{\itemp}[1]{\item[{\series{bx}\selectfont #1}\hfill\ ]}
%\newcommand{\notin}{\in\hspace*{-3.5mm}/}
\font\mfont=logo10
\hyphenchar\mfont=-1
\def\METAFONT{{\mfont METAFONT}}
\def\README{\verb|readme.eng| or \verb|readme.ger|}
\def\vierdos{{\sc 4DOS}}
\def\amspell{{amSpell}}
\def\qedit{{Qedit}}
\def\wpf{{Wordperfect}}
\def\bs{$\backslash$}
\def\turbop{{Turbo Pascal}}
\def\turboc{{Turbo C}}
\def\babel{{\sf babel}}
\def\nfss{{\sf NFSS}}
\def\bibdb{BiBDB}
\def\makeindx{MakeIndx}
\def\dvidrv{{\sf dvidrv}}
\def\mfjob{{\sf MFJob}}
\def\gs{{Ghostscript}}
\def\bmtofont{{\sf BM2FONT}}
\def\texshell{{\TeX Shell}}
\def\texhelp{{\TeX Help}}
\def\emtex{{em\TeX }}
\def\minitex{{\sc \sf 4all\TeX}}
\def\viertex{{\rm 4\kern-.125em\TeX}}
\def\texcad{\TeX cad}
\def\emtex{{em\TeX }}
\def\minitex{{\sc \sf 4all\TeX}}
\def\bibtex{{BiB\TeX }}
\title{Shells for \TeX }
\author[Phons Bloemen]{Phons Bloemen\\
Information \& Communication Theory\\
         Dept. of Electrical Engineering\\
         Eindhoven University of Technology\\
         The Netherlands\\{\tt Phons@EI.ELE.TUE.NL}}

\begin{article}
{\sl [Editor's note: I am grateful to
Phons Bloemen and Gerard van Nes (editor) for permission to reprint this
article from MAPS 93.2, the journal of the Nederlandstalige \TeX\
Gebruikersgroep.]}

\section{Introduction}
The well-known \emtex\ package of Eberhard Mattes has brought
\TeX\ and its companions into the reach of the PC-compatible computers.
Besides a good implementation of \TeX\ and \METAFONT\ (even for various
processors like 8088, 80168 and 80386, which make use of
additional features like `protected mode', and special `big' versions),
\emtex\ offers an excellent previewer, which works on various
graphic screens from Hercules to (S)VGA. There are also printer
drivers for HP Laserjet and for nearly all dot matrix printers
(by making a little configuration {\tt .dot} file). A dozen 
handy utilities come with the package, like \bibtex, \makeindx,
\texcad, and \mfjob.

Because this is a collection of various programs, some way of
integration must be found, especially for users who want to make
\TeX\ their main document preparation system, and do not want to
be bothered by MSDOS commands. Furthermore, an integrated
environment consisting of an editor with function keys for the
various \TeX\ operations and utilities would greatly improve the
acceptation of \TeX\ by a large group of users, especially in
'\wpf\ country: The Netherlands'.

I reviewed two environments by installing them on my home
\emtex\ installation, and on a `clean 1990 \emtex\ distribution'.
The latter is the distribution of 6 high-density disks of \emtex,
as it was released in 1990. Since, there have been various
updates on several programs, but more about that later.
My own \emtex\ distribution runs on a 386/25Mhz clone, and is
up-to-date, with the beta-test releases of \TeX, \dvidrv\ and
\METAFONT\ installed. I also installed \babel\ and \nfss, and a large
collection of fonts, and the \amspell\ spell checker. The
packages were also tested on a 286/8Mhz clone with Hercules
display. After installation, I used the two environments to make
some documents (including this one).

\section{\texshell}
\texshell\ is an integrated environment for the \emtex\ family,
authored by J\"urgen Schlegelmilch. It is based on Borland's Turbo
Vision, and it looks a lot like the integrated environment of
Borland's programming languages like \turboc\ and \turbop.
Version 2.6 comes in a {\tt .ZIP} archive of 619 kilobytes.
It can be obtained from various FTP-servers,
like {\tt ftp.uni-stuttgart.de}. The archive contains a German and an
English version. Version 2.6 was released in September 1993. Most of the
evaluation is based on version 2.5.2.

\subsection{Installation}
The installation is simple: unzip the archive and the files will be placed
in the correct directory in the \verb|\emtex| hierarchy.
Then the file \verb|\emtex\TEXSHELL.CFG| must be edited to
record the drive on which it is installed. It is possible to
install \texshell\ in a user-defined directory, but this is not recommended.
No files of the already installed \emtex\ need to be changed.
Start the program with
\begin{verbatim}
c:\emtex> texshell
\end{verbatim}
Now the \texshell\ manual advises you to check the {\em Options} menu,
to examine and adjust the other options to your own needs. The
{\em Options} menu has a consistency check built in: if you enter
something impossible (a reference to a program you
do not have, or an incorrect path name), the input window will
not disappear, and the cursor keeps blinking on the error. The
preloaded configuration is sufficient for a base installation of
\emtex\ (i.e. the `1990' distribution, with the german format files).

\subsection{Customization}
If you want to change the external commands, or install new ones,
you have to dig into the manual. \texshell\ is very powerful
in calling external programs, but it takes some study to understand how
to make such a call.

There are a few predefined menu options for the `standard'
\emtex\ utilities such as \dvidrv, \bibtex, \texcad, \makeindx,
these also have their own predefined `hotkeys'. With respect to
the dvi-drivers: it is possible to install a screen
previewer, a draft and a final printer (in most cases: {\tt
dviscr, dvidot, dvihplj}). This flaw has been corrected in version
2.6: here you can install up to 32 printing devices, and a screen
previewer. There is also a {\em User} menu,
where you can install your own programs: I tested this with
\amspell.

For all external programs, the installation procedure
is the same: you can choose from a series of {\em
templates} to construct a command-line to call external programs
like \TeX\ itself, {\tt dviscr}, {\tt dvidot} and so on.
These `templates' depend on the filename being edited, the format file used
(\TeX, \LaTeX) and various directory names you can install in the {\em
Options} menu.
Furthermore, you can assign an {\em environment} to each call. Settings in
this environments are provided as DOS environment variables to the
program when it is called from \texshell. If you call a batch file as
external command, the COMSPEC variable must be set in the environment
(this is not mentioned in the manual)! The process of
installing your own tools is tedious, and there are a few caveats.

For the `bare metal hackers': the configuration file {\tt
TEXSHELL.CFG} is a plain ASCII file. It looks a lot like a
Windows {\tt .INI} file, and you can edit it to your wishes.

\subsection{Editor}
The editor provided by \texshell\ is much like a standard
\turbop/\turboc\ editor. The command structure is like old
Wordstar with its Ctrl-K and Ctrl-Q commands, it works very quickly.
The editor has a limit of 64 kilobytes per file, but it may have several
files opened at the same time. It is possible to transfer text
from one file to another using a clipboard and cut-n-paste.
There are 10 function keys to put macros under. The editor provides
wordwrap, but there is no way to make this the default. It also provides
full mouse support for pointing the cursor, moving, sizing, closing
windows and menu bar selection.

The package looks very colorful. On the slow machine with the
Hercules display, the default `colors' do not look very well.
A little playing with the `color customization' menu improved
things a lot, but the program does not recognize monochrome
displays.

There is a nice edit file selection scheme, which again much
resembles the one used in \turbop. The editor provides a `primary'
\TeX\ file: when \TeX\ is run, it starts with this file.
\texshell\ records its configuration together with the primary
file, by writing a {\tt .DSK} file.

\subsection{Compile and preview}
There is a menu {\em TeX} on the menu bar which gives access to
these functions. Most of them have a `hotkey'. A very nice
feature is an separate menu to view the log file of the command
just executed in a {\em Log Window}, varying from \TeX\ to previewer
and \bibtex. The `e' option of \TeX\ (provided when there is an error)
is fully implemented, and with Ctrl-Q E / Ctrl-Q W you can go to the
next/previous \TeX\ error or warning! You can also use the {\em
Log Window} to find out from which file an error originated, by
point-and-shoot on the errors in the log file. Great if
you are editing a big document, or are playing around with
user-written style files.

The previewer can be operated by a `hotkey' without any problems
(only the installation of \mfjob\ took some time, but everything works fine).

\subsection{Help system}
F1 gives context sensitive help: it provides help for the
function you have selected. There is `help on Help' and with Sft-F1 you
can browse through an index and view the whole help file. The
help files are in English or German. There is also online \TeX\ help:
in an edit window you can put the cursor on a \TeX\ command,
and get help on that command with Ctrl-F1.

\subsection{Manuals}
The \texshell\ manual seems to be `not yet ready'. It is more a
listing of all the features of every window. It contains a little
section on what files you should have, and how to install
\texshell. Then there is a extended explanation of the use of
{\em templates} and {\em environments}, and how to install new
commands. The last section of the manual explains how to use \texshell:
it is a list of command grouped per menu on the menu bar, and a
list of the editor functions. Everything is documented, but there
is no such thing as a `guided tour'. There is an appendix
containing a revision history.

\subsection{Miscellaneous}
This section contains a few remarks on other features of the
system.\begin{itemize}
\item Installation of new format files is simple when you have
generated the appropriate {\tt .FMT} files. However, it is not
possible to assign \emtex\ command line options to each format
file. Version 2.6 has a new option to do this, but you can also
work around it with batch files.
\item \texshell\ provides good printing support. Before printing there
is a menu to enter first and last page, and the number of pages to print.
The `complete' print job is given as a default. You can enter your
own \dvidrv\ options (if you want to print two A5 sheets sideways).
\item \texshell\ provides no spelling support. With some effort, I
managed to install \amspell\ in \texshell, using the {\em User}
menu and a couple of batch files. \amspell\ provides all spelling
checking you want.
\item \texshell\ does not support \METAFONT\ when run `stand-alone'
You then have to install it in a batch file in the {\em User} menu.
\METAFONT\ is supported through \mfjob\ for automatic font generation.
\item I had to change the `default' {\tt TEXSHELL.CFG} to
customize it to my needs (installed \amspell, \METAFONT, \mfjob,
\bibdb). Contact me for copies of the {\tt TEXSHELL.CFG}) file.
\end{itemize}

\section{\viertex}
\viertex\ is authored by Wietse Dol, Erik Frambach and Maarten
van der Vlerk, from the University of Groningen. This integrated
environment is based on JP Softwares \vierdos\ and SemWares \qedit.
The system is a large
collection of \vierdos\ `batch' {\tt .BTM} files, which perform the
various file-handling actions and call the programs from the
\emtex\ collection. To make the system work
nice, the authors have written several little utility programs to
perform selection functions.The system was written to
operate in networked environments, where the \emtex\ files are
placed on a Novell network server, and the users run the programs
from the network disk.
The review is based on version 2.15 of \viertex. 
I will make some references to version 2.20: this is a 
'$\beta$test-version' for the upcoming version 3.0 of \viertex. 

\subsection{Installation}

\viertex\ was founded as a `complete' system, containing
the complete \emtex\ package, \amspell, \gs\ and so on.
The archive {\tt obelix.icce.rug.nl} in Groningen has organized the
package in several parts: take a look at the various {\tt .TXT} files.
The shell itself hides in {\tt 4TEX.ARJ}. This package is
intended for use on an existing `standard' \emtex\ installation.
It is about 3 megabytes, and contains the \vierdos\ {\tt .BTM}
files, updates to various \emtex\ utilities, and the shareware
distributions of {\tt PKZIP}, \qedit\ and \vierdos\ version 4. As a bonus,
over a 100 new style files will flood your \verb|\emtex\texinput| directory.
The \viertex\ shell itself is about 300 `compressed' kilobytes, 
and the `isolated' shell can be installed on an existing em\TeX\ installation.

Installation is done as follows: \begin{itemize}
\item Unpack the archive in the root of your \emtex\ drive with {\tt
c:\bs $>$ arj x -v a:4texupgr.arj}.
The use of {\tt ARJ} is necessary because the archive spans more
than one floppy (and {\tt ARJ} compresses better than {\tt PKZIP
1.1}). The whole package is put into the right directories.
\item Some \emtex\ files must be deleted or moved: the `compilers' {\tt
tex.exe, btex.exe} etc.  must be moved to \verb|c:\emtex\compilers|,
and the utility programs {\tt bibtex.exe, texchk.exe,
makeindx.exe, texcad.exe, texchk.exe} to \verb|c:\emtex\utils|.
\item You must put {\tt `LASTDRIVE=T'} in your {\tt CONFIG.SYS}
\item You must edit \verb|c:\emtex\btm\system.set| and
\verb|c:\emtex\btm\texuser.set|
to configure the system to your needs. If you have a `standard'
\emtex, you don't have to touch {\tt system.set}. In {\tt
texuser.set} you have to set your personal defaults. Both files
provide extended comments on each of the options, but they are
quite long at first sight.
\end{itemize}
The system is started with
\begin{verbatim}
c:\emtex\btm> tex
\end{verbatim}
There are two batch files {\tt tex.bat} and {\tt tex.btm}: if you
are already running \vierdos, it will not load it again (However,
there are some restrictions to your personal {\tt 4DOS.INI} file,
and you must have loaded {\tt KSTACK}). If you are running MSDOS
or DRDOS, a new \vierdos\ command shell will be loaded with the
right settings. After a while, the main menu of \vierdos\ is
presented.

\subsection{Customization}
All customization of \viertex\ is done via the configuration files
{\tt texuser.set} and {\tt system.set}. There is not much need
for the possibility to install `own' utilities, because there are
a lot of utilities predefined, like \gs, various graphics
utilities like \bmtofont, bibliography maintenance with \bibtex\ and
\bibdb, spelling check with \amspell\ and much, much more. Even some
commercial software like {\sc Word Finder} and {\sc Euroglot} is supported.
However, recent versions of \viertex\ do offer the opportunity to install
own utilities, in user-defined menus.

A system that is made out of `human-readable' batch files ({\tt
.BTM}) is a paradise for `hackers': if you study the manual of
\vierdos\ (included in the distribution), you can
add your own enhancements to the system. Not recommended to keep 
compatibility with the official release, but hard to resist.

\subsection{Editor}
The editor of the \viertex\ system is the shareware editor \qedit. The 
authors have defined a set of macros to use with \qedit. These extra macros 
provide `hotkeys' to start the \emtex\ `compiler' and the previewer, to 
start the \amspell\ spell checker, the \bibdb\ bibliography database 
program.

An editor help screen is brought up by F1, and it shows the standard 
\qedit\ editor commands, as well as the special extensions. The 
\qedit\ editor is capable of having more files open at the same time. 
Spell-checking is done by \amspell\ on a word basis in the editor, or on 
file basis from the main menu. Before \amspell\ is started, you can 
choose your language.

The mouse is supported in the \qedit\ editor for cursor pointing, block 
definition and window switching. In the main menus, the mouse can be used 
to point to menu choices. \viertex\ also provides the `primary file' system 
as described in \texshell. It also records its configuration together with 
the primary file, using the extension {\tt .OPT}. 

\subsection{Compile and preview}
The \emtex\ `compilers' are started from the main menu in most cases. 
There are also `hotkeys' to start them from the editor.
A nice option is to start the \emtex\ compiler and previewer from the 
editor with a block selected: then 
only that block of text is \TeX ed and shown. \viertex\ is intelligent about 
choosing the right documentstyles for such a text block: it examines the 
primary file and puts its preamble together with a surrounding {\tt \bs 
begin\{document\}} and {\tt \bs end\{document\}} around the text block.
The error processing is not as good as that of \texshell: the {\tt `e'} 
option works, and you can view the log files, but that is all. The error
checking will be improved in version 3, according to the authors.

The complete \viertex\ system comes with \LaTeX\ format files with 
\babel\ and \nfss\ installed. The format file 
contains hyphenation patterns for English, German, French and Dutch. 
In \emtex's memory organization, they set aside 65K words for 
hyphenation patterns where 36K should be enough according to my 
information. This leaves little main memory to do the real \TeX\ jobs 
in (like processing elaborate tables and figures). So the
notorious message {\tt TeX capacity exceeded} appears (too) soon\ldots. 
Version 2.20 has the capability to generate new formats `on the fly' 
where you can choose the languages to include from a menu. It then 
makes a format with just enough space for the hyphenation patterns you 
choose. A \TeX\ with 7 languages loaded is possible!

\subsection{Help system}
\viertex\ provides two different help systems. First, there is help 
available for each of the menus of the system explaining the various 
options in short. Second, there is a good `online' \TeX help system 
called \texhelp. This is a popup command which you can access everywhere 
with Alt-F2, Alt-F3, Alt-F4. It provides help on the \TeX\ command the 
cursor is on, and you can navigate through its index. \texhelp\ is a TSR 
program, taking 9 Kb of main memory, and 250 Kb EMS / disk swap space. The 
help is in English, but it is possible to install a help file in a 
different language. 

\subsection{Manuals}
The \viertex\ manuals are very elaborate. In fact, they provide 
information 
on every aspect of the whole \emtex\ system, and all its utilities. Chapter 
2 is fully devoted to using \viertex\ itself, and to install it. It contains 
a section of format-file generation, and installing \babel\ and \nfss.

Then the manual covers the following topics in brief, concise sections:
the \emtex\ `compilers' themselves, the \dvidrv\ programs, Postscript, 
bibliography and index support, the \amspell\ spell-checker, a section on 
importing graphics in various ways (\texcad, \bmtofont), some miscellaneous 
utilities like {\tt detex}, the TSR programs like \texhelp\ and
commercially available translation programs, and finally something about 
fonts and \METAFONT /\mfjob\ font generation. This is more than a manual, it 
is an example of how a `local guide' should look like.

The manual concludes with a list of sources for more information, like 
\TeX\ users groups (TUG, NTG), and distribution lists ({\tt TEX-NL}). An 
extended bibliography for further reading is added.

\subsection{Miscellaneous}
\begin{itemize}
\item \viertex\ provides support for different types of printers.  The 
printer type can be chosen from a menu in the {\em Output} menu. There it 
is also possible to enter the printer port, first and last page, and 
the number of pages to print. You can enter your own \dvidrv\ options
Postscript printers are supported via {\tt dvips}, and even the use of
\gs\ to get the postscript files on a simpler printer is possible (not 
tested).

In earlier versions, the printer support was poor, especially for matrix 
printers: only a 9-pin was supported, and there was no opportunity to 
install user-defined printers. This was reported to the author,
together with a proposal for a better way to do it (\viertex\ hacking 
is easy). Version 2.20 contains much better printer support. 
\item \viertex\ provides an extra {\em Graphics} menu 
where you can do all
types of conversions of pictures to get them into your \TeX\ documents, 
provided the necessary programs are installed. It also provides 
extra {\em \bibtex} and {\em \makeindx} menus to 
manage bibliography databases and automatic indexing.
\item Because \viertex\ was initially developed to run on a network, there 
is an extra menu called {\em \TeX batch}. Here you can send print jobs to 
network printers and batch \TeX\ jobs to fast computers on the network.
\end{itemize}

\section{Conclusions}
To conclude this review I give a short `pro-and-con' list for both systems. 
First I want to remark that the authors of both systems did a good job, and 
that the systems are still in a development phase. The use of a `shell' 
around the \emtex\ system is very useful, and it can speed up things even 
for experienced \TeX\ users. It is also a step on the way to make 
\TeX\ more attractable to the `average \wpf\ user', and to a \TeX\ `
beginners package'. Some attention must be given to the fact that \TeX\ 
'beginners' should not be bothered by lengthy installation procedures: it 
should be `plug-and-play'.

\texshell\ in brief:
\begin{itemize}
\item[+] The use of Turbo Vision gives \texshell\ a professional look.
\item[+] There is an excellent system of tracing \TeX\ errors in your file.
\item[+] The package is rather small (about 300K).
\item[+] Powerful mechanism to call external programs.
\item[+] The package is reasonably fast, even on slow machines.
\item[--] Hard to configure. A major drawback, if there is a `universal'
{\tt TEXSHELL.CFG} file which covers the complete \emtex\ distribution and
some related things, this would ease the installation in a great way.
\item[--] Lacks `integration' of some utilities like \amspell.
\item[--] The manual needs some rewriting (especially if it is
going to be used as a beginners guide).
\end{itemize}
\viertex\ in brief:
\begin{itemize}
\item[+] The package covers almost everything in the \emtex\ package, and
even more.
\item[+] Excellent manual, discusses also the \emtex\ utilities.
\item[+] The \TeX\ help is given by a stand-alone TSR program.
\item[+] Spell-checking with \amspell\ is an integrated part.
\item[--] The package is slow (annoying on the 286 clone).
\item[--] The package is rather bulky, because it is packed with a lot of 
other stuff. The shell itself is 300K.
\item[--] Installation procedure is elaborate.
\item[--] The use of `human-readable' programs makes the system
vulnerable to users who `customize' it by changing the program
itself. But this also may be an advantage\ldots
\end{itemize}

\end{article}

