summaryrefslogtreecommitdiff
path: root/usergrps/uktug/baskervi/3_2/rahtz.tex
blob: e948ab10b82de2212e9e78bbb3bb3619e9aee64b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
\title{A brief guide to \TeX\ assistants}
\author[Sebastian Rahtz]{Sebastian Rahtz\\ArchaeoInformatica\\York}
\begin{article}

\def\PicR#1#2#3{%
 \begin{figure*}
 \centerline{\rotatebox{-90}{\epsfig{figure=#1.ps,#3}}}
 \caption{#2}\label{#1}
 \end{figure*}
}
\def\Pic#1#2{%
 \begin{figure*}
 \centerline{\epsfig{figure=#1.ps,height=.4\textheight}}
 \caption{#2}\label{#1}
 \end{figure*}
}

This paper offers a `back to basics' overview of the various types of
software which are of assistance to the \TeX nical writer on a
personal computer (this includes Unix machines, but excludes, for
instance, VMS or VM/CMS systems). It is based on a presentation to the
October \ukt\ meeting, and I am grateful to the other speakers, and
our chairman Allan Reese, for insights and news. I would also like to
refer readers to the Dutch \TeX\ Group's journal {\em MAPS}, whose
issue 93.2 contains a variety of useful papers on \TeX\ interfaces
(two of which are reproduced elsewhere in this issue of \BV.)

Every \TeX\ user knows that the traditional command-line way of
working (the `edit ; compile; \verb|{|preview, print\verb|}|' cycle)
is far from ideal, and many people want some help.
We may define eight different ways in which the environment we
interact with can be improved:
\begin{enumerate}
\item Integrated environments (e.g.\ \TeX tures\ on Mac), where
  everything is tightly-coupled, and designed from the ground up to
  work together;
\item Integrating shells (e.g.\ \TeX shell), where a set of different
  programs are controlled by a single interface, which does its best
  to protect the user from their idiosyncrasies and errors;
\item Loosely-coupled packages (e.g.\ Windows, Desqview setups), where
  a multi-tasking environment is used to combine together various
  programs to provide a useful working environment;
\item \TeX-aware editors (e.g.\ Gnuemacs AUC\TeX\ package), which
  simplify the input of complex markup, and check syntax;
\item \TeX\ super-scripts, including Makefile generators (e.g.\
  `texit'); these take away the need to remember complicated program
  switches, and remembering which files are up to date, by
  understanding the rules about the different types of \TeX-related files;
\item Super-previewers (e.g.\ xtex), which allow us to make greater
  use of the previewer to inspect and interact with our document.
\item Hypertext source convertors (e.g.\ latex2html), which make the
  tedium of writing generic markup with \LaTeX\ more worthwhile by
  giving it a life beyond the printed page;
\item Friendly \TeX\ programming; when we {\em do} interact with
  \TeX's enigmatic `*' prompt, we want macros to help us, not hinder
  us. This is discussed by Jonathan Fine elsewhere in this \BV.
\end{enumerate}

Since most computer users seem to belong in distinct
`camps', based on machines and operating systems, it seems appropriate
to examine what is on offer in each area.

\section{Windows, OS/2, and NT}
For a fully-fledged Windows \TeX, we have to look to the commercial
companies: Turbo\TeX, from Kinch Computer Co, offers a full \TeX,
previewer, and drivers with a moderately-well integrated Windows
interface, although (critically) it lacks a real integrated editor.
The `traditional' PC supplier of \TeX, PC\TeX, has also recently
released a Windows setup, although it (like Turbo\TeX) fails to take
advantage of builtin fonts properly. Y\&Y sell a high-quality Windows
previewer and PostScript driver, linked with a public domain \TeX\ and
commercial programmer's editor, which work together well in a
loosely-coupled way, and offer genuine integration with the Windows
font systems (although the previewer has trouble using PK fonts).
{\em Scientific Word} (described elsewhere in this \BV) takes a
different direction by offering a WYSIWYG writers interface
(particularly for maths) which saves files in \LaTeX\ format and does
final formatting for printing with Turbo\TeX.  None of these products,
however, offer the same degree of integration and instant previewing as
Textures on a Mac, and we still await the `real' Windows \TeX.

The more impoverished writer who wants to build her own Windows \TeX\ 
setup has a not altogether easy time.\footnote{Wietse Dol discusses
  this more fully elsewhere in this \BV.} There is an excellent
previewer, Hippocrates Sendoukas' {\em Dviwin} (now at version 2.81,
but {\em still} lacking support for virtual fonts, and nowhere near
using the Windows system fonts), and the excellent em\TeX\ ports of
the basic \TeX\ programs run in DOS windows (with some shenanigans
necessary to change extended memory managers), but integration is left
to the user. The powerful editor Microemacs has an adequate Windows
port, extensible to allow \TeX\ jobs (compiling, previewing, printing
--- see Figure \ref{mea}) and context-sensitive help to be selected
from menus, but it does not provide much protection for the user from
the essentially unsatisfactory nature of Windows DOS boxes and
multi-tasking. The alternative, running a DOS \TeX\ shell in a DOS box
under Windows, probably gives a better result (see Wietse Dol's article).
But the convenience of access to Windows printer drivers (such as fax
boards --- see Figure \ref{dwina}) is a pointer to why this
possibility should not be ignored.
\PicR{mea}{Microemacs \TeX\ menus}{height=.4\textheight}
\PicR{dwina}{Dviwin accessing Windows printer driver}{height=.4\textheight}

Those converting to NT will, of course, have access to all the
Windows tools, and the Unix `web2c' \TeX\ has been ported, but there
do not yet appear to be any interfaces which make serious use of
NT's abilities.

OS/2 users are well served by the basic em\TeX\ kit, which has a
proper Presentation Manager previewer, and by various shells (e.g.\ 
{\em PM\TeX} which make life easy. Given the good multi-tasking,
Windows compatibility, and the availability of compilers to port most
Unix tools (such as {\em Gnuemacs}, {\em make} etc), the OS/2 \TeX ie
has the best of almost all worlds.

\section{DOS}
The hard-pressed DOS user (or lover --- there are a few) has a
plethora of tools to make up for the inadequacies of the command line.
The most mature of the `shell' programs, which run \TeX, previewer,
printer, editor etc for you sequentially when you select menu items
from a character-based screen, is probably 
J\"urgen Schlegelmilch's \TeX shell (see Phons Bloemen's article below). A
typical screen is shown in Figure \ref{tsb}. Other offerings include 
Thomas Esken's \TeX surface, Johannes Martin's \TeX pert, 
Ulrich Jahnz's Eddi4\TeX, the editors Redit and ET (see Reese's article
above) and Petr Olsak's menu builder `mnu'. All of
these have some or all of  the following characteristics:
\begin{itemize}
\item a model of the original Turbo Pascal --- character screens
  with pull-down menu bars;
\item protection from the horrors of DOS environment variables
  controlling programs from four different authors ({\em after} you
  have got the shell properly configured);
\item \TeX\ and other programs activated by `shelling out' to DOS,
  (an intrinsically `uncool' procedure), with parsing of error messages;
\item heavy use of customizable environments (see Figure \ref{eb}),
  which can confuse the novice to screaming point;
\item limited editors which can be difficult to use with
  `industrial strength' documents;
\item access to online \TeX\ context-sensitive help.
\end{itemize}
This is not to deny the great usefulness of parts of all of the DOS
\TeX\ shells, but their parts are greater than their sum. The
dedicated DOS \TeX\ user will find them extremely useful, but perhaps they
can be summed up by saying that they will not convert many Microsoft
Word users. 

\PicR{tsb}{\TeX shell, after running \TeX\ and finding an error}{width=.3\textheight}
\PicR{eb}{Eddi4\TeX\ customization}{width=.3\textheight}

A recent initiative by Dutch \TeX\ users has resulted in 4\TeX\ (see
the article by Wietse Dol), a \TeX\ shell accompanied by a packaging
of almost all the good public domain \TeX\ goodies. This is
undoubtedly the system which is getting most support and development.
The even more powerful As\TeX\ setup of Michel Lavaud (described in
\TUB\ 14.3, 238--44) unfortunately depends on commercial software for
its implementation, but those interested in a wider perspective on
{\em managing} their \TeX\ document library should examine this closely.

Those who want the approach of Scientific Word (WYSIWYG maths
composition) in plain DOS can try the public domain ET by John
Collins, or the commercial {\em Leo} from ABK Software.

\section{Macintosh systems}
The Macintosh user does not need convincing about GUIs or integration;
for hard cash, she can buy what is probably the fastest (given the
processor), slickest \TeX\ around, Textures. A port of the Unix \TeX\
is available (CMac\TeX), and a half-way house, the shareware Oz\TeX,
which offers integration between a good compiler, previewer and
printer driver, but not quite the smooth transition of Textures, or the use
of system fonts. What is lacking on a Mac is a WYSIWYG interface to
mathematical writing such as that offered by Scientific Word.

\section{Unix, etc}
The Unix \TeX\ user has a rich variety of tools to play with; like
everything else in Unix, they are dangerously powerful, and require
dedication to obtain true mastery. They start with simple things
like the {\em csh} or {\em bash} history  mechanisms, which let you recall
previous commands by name:
\begin{verbatim}
$ history
  171  lutex fine2
  172  dvips fine2
  175  latex interfac
  176  lpq
  180  dvips fine2 -o fine2.ps
  182  cp fine2.ps /user
$ !lat
$ !dv
\end{verbatim}

Another universal Unix tool is `make' which manages the relationship
between different stages of a document's `compilation' from various
sources, and keeps things up to date. A large book, with dozens of
input files, hundreds of graphics inclusions from different programs,
a bibliography managed with \BibTeX, and an index, is likely to need
such a tool to keep the author sane. There are various tools to help
you write `make' files, and to do similar jobs to `make':
\begin{description}
\item[imaketex] Just write an {\em imake} file and you just type
  `make'; as in `just write'\ldots
\item[texit] A Perl script which makes educated guesses about the
  state of your \TeX\ file and helps you decide what to do next;
\item[latexmk] Given a \LaTeX\ file this tries to work out what to do,
  like a `makefile'; but does not understand multiple-level dependencies;
\item[latex\_make] A set of rules for real `make', which understand a
  wide range of common \TeX\ jobs; but tailoring is not for the
  beginner. Sample `make' rules are shown in Figure \ref{make}.
\end{description}
If you are already a Unix programmer, these are well worth
investigating.

\begin{figure*}
\footnotesize
\begin{verbatim}
# ensure that the bbl file gets regenerated if the bib file is changed
%.bbl : $(BIBFILES)
        @# if there is no aux file, skip this, it will get done later
        -@if [ -r $*.aux ] ;\
        then $(BIBTEX) $* ; \
             fi
# create a dvi file from a tex file
% %.dvi: %.tex
        $(LATEX) $*
        -@egrep -c 'Citation .* undefined.' $*.log && ($(BIBTEX) $*;$(LATEX) $*)
        -@grep 'Rerun to get cross-references right' $*.log && $(LATEX) $*
# create postscript file of a dvi file
%.ps: %.dvi
        echo dvips -D $(PRINT_RES) -p $(PAGE_F) -l $(PAGE_T) -o $@ $*
        dvips -D $(PRINT_RES) -p $(PAGE_F) -l $(PAGE_T) -o $@ $*

\end{verbatim}
\caption{An example of `make' rules for a \TeX\ file}\label{make}
\end{figure*}
There do not appear to be any obvious public domain \TeX\ shells for
the X Window system; the `doc' editor does provide help in writing
\LaTeX, with limited immediate formatting, but it still leaves you
to run \TeX. The Berkeley Vor\TeX\ program to produce an interactive
\TeX\ ended some years ago without a real success (although various
results have now been released for general use; they are available in
CTAN). 

The queen of Unix software is Gnuemacs; as well as being an {\em
extremely} sophisticated editor, it provides hooks to run jobs
synchronously or asynchronously from within the editor, and parse the
output.  The latest X Window version allows for user-defined menu
bars, and multiple windows, which allows the Unix user access to as
sophisticated a setup as almost everything except Textures. The actual
editing can be enhanced with powerful Lisp routines to check syntax
provide structure skeletons, edit in outline mode etc; the
best-supported and enhanced package is Kresten Krab Thorup and Per
Abrahamsen's AUC\TeX. If you can learn to be happy with Gnuemacs, this
has almost limitless possibilities. An example screen is given in
Figure \ref{auctex}.

\Pic{auctex}{Gnuemacs and AUC\TeX}

\section{Conclusions}
If you have to choose a \TeX\ environment, how do you start evaluating
the offerings? I would suggest that base your choice on the following
criteria:
\begin{itemize}
\item The editor; this is where you spend most of the time;
\item On-line help; \LaTeX\ is unmemorable;
\item Integration with windowing systems; doing just \TeX\ is dull;
\item {\em Lack} of special features; compatibility with other \TeX\
  setups is important;
\item Integration with the `style' of the environment (ie use of Adobe
  Type Manager).
\end{itemize}
For the five possible environments you might consider choosing:
\begin{itemize}
\item AUC\TeX: if you use the X Window system and {\em gnuemacs},
  there is no other way to live;
\item \TeX shell: if you like plain DOS, this is well-designed and
  easily customized;
\item Dviwindo: it really is a Windows application, and understands
  PostScript fonts;
\item \TeX tures: it works; it has semi-instant previewing; it
   integrates its fonts with the rest of the Mac;
\item OS/2 and emTeX: a very good command-line \TeX, a Presentation
  Manager previewer, and integration with a reliable operating system.
\end{itemize}

{\sl [Note: all the public domain or shareware software referred to in
  this article can be found in the CTAN archives. The commercial
  vendors all advertise in \TUB.]}
\end{article}
\endinput
%-----------------
\slidechapter{X Window}
\item[xlatex]