\documentstyle[11pt,refman]{article}
\pagestyle{headings}

\title{\tc\ Version 3.0}
\author{Copyright \copyright\ Georg Horn\\
   July 1993}

\def\tc{\TeX cad}\def\lt{\LaTeX}\def\pic{{\tt picture}}
\def\cs#1{{\tt\char"5C#1}}

\begin{document}\maketitle\makeauthor\tableofcontents

\section{Introduction}

\tc\ is a drawing program for \lt\ which allows the objects available in
the \lt\ \pic\ environment to be drawn and edited, its output is a
sequence of \lt\ \pic\ commands which can be inserted into a \lt\
document to generate the drawing.  These \pic\ commands are best
brought into the document by means of the \cs{input} command so that, if
necessary, the files can be read in to \tc\ and edited again.

\tc\ was originally implemented as a student project at the University of
Coblenz under the supervision of Dr.~W.~Schiffmann. Since then it gone
through several improved versions and was included in Eberhard Mattes'
em\TeX\ package, but is now available as public domain software inclusive
the source code (see appendix~\ref{conditions}).

\begin{verse}
\it So eine Arbeit wird eigentlich nie fertig,\\
man mu\ss\ sie f\"ur fertig erkl\"aren,\\
wenn man nach Zeit und Umst\"anden\\
das m\"oglichste getan hat.

\rm (J. W. Goethe, Italienische Reise, 16.3.1787.)
\end{verse}

Like all programs, \tc\ is sure to contain bugs and could be improved: error
reports and suggestions for improvement are always welcome. However, this
does not mean that all suggestions are going to be implemented. Also, 
it is not guaranteed that the program is free of errors and the author
is not liable for any damages caused by the use of \tc.

\section{Using \tc}
\tc\ is written in Turbo Pascal V5 and runs on all IBM PC/XT/AT machines and
compatibles with a graphics adapter for which there is a Turbo Pascal driver.
The Borland drivers are supplied with the program package. For efficient
working, your computer should have a mouse, the mouse driver must then be
loaded before starting \tc.

\subsection{Contents of the disk}

The disk has the following files:

\begin{description}
\item[texcad.exe] the \tc\ program.
\item[texcad.opt] this file contains the parameters described in
sections~\ref{start-section} and \ref{option-section}.
\item[gh.bat] a batch file incorporating the DOS commands to run the editor,
\lt, Preview and \tc\ (see appendix~\ref{ghbat}).
\item[ask.exe] called from {\tt gh.bat} to get input from the user.
\item[gh.tex] a \TeX\ file for testing picture commands generated by \tc\ or
other \lt\ files.
\item[*.bgi] the Borland Graphics Interface drivers.
\item[emlines.sty] a style file which allows lines to be drawn at any angle
when the em\TeX\ drivers are used for output: these lines will be called {\it
EMLines} in what follows.
\item[emlines2.sty] a new version of {\tt emlines.sty} to be used with the
em\TeX\ drivers  V1.3j and later (See section~\ref{EMLines}).
\item[tcman.dvi] this manual.
\item[texcad.ver] list of preceeding versions and planned modifications.
\end{description}

\subsection{Installation}
Copy the files {\tt texcad.exe}, {\tt texcad.opt}, {\tt gh.bat}, {\tt
ask.exe} and the {\tt *.bgi} files into the same directory as \lt\ and
Preview, for instance, \verb"\emtex". If you already have Turbo Pascal on
your disk then the {\tt *.bgi} files need not be copied, you must just
tell \tc\ the directory containing them (see sections~\ref{start-section}
and \ref{option-section}). Copy {\tt emlines*.sty} and {\tt gh.tex} into
the same directory as the other {\tt .sty} files, for example,
\verb"\emtex\texinput".

When delivered with em\TeX, the files are distributed in a {\tt .zip} file
and must be unpacked with {\tt pkunzip} before they can be used. In this
case, you must already have done this using the instructions provided with
em\TeX\ as otherwise you would not be reading this manual.

\subsection{Starting \tc}\label{start-section}
\tc\ is started with the command {\tt texcad <{\it filename}>}, the
optional argument {\it filename} is a file containing a \lt\ {\tt picture}
environment -- this picture will be loaded immediately (see also
section~\ref{loading-section}). But first, the mouse driver will be
initialized, if no mouse is present, \tc\ issues an apropriate message and
you can then use the cursor keys to handle the program.
\tc\ then looks in the current directory and then in the directory
containing {\tt texcad.exe} for the parameter file {\tt texcad.opt}. This
file contains the following arguments -- if the file is not present,
defaults are taken:

\begin{center}\begin{tabular}{ll}
\bf Parameter & \bf Default\\[1ex]
Directory for loading and storing picture files & \it none\\
Extension for picture files & \tt .pic\\
Directory for loading and storing macro files & \it none\\
Extension for macro files & \tt .mac\\
Directory for loading graphic drivers & \it none\\
Snap function & \it off\\
Magnification & \tt1\\
Line thickness for EMLines & \tt 0.4pt\\
Draw EMLines & \it off\\
\cs{unitlength} setting & \tt 1mm
\end{tabular}\end{center}

The parameters can be changed with the menu {\tt Options} and the new values
saved in {\tt texcad.opt} with the {\tt Save} entry in this menu (see
section~\ref{option-section}).

Finally \tc\ loads the Borland graphics driver: these are sought first in
the directory given in {\tt texcad.opt}, if no directory is given there,
then the current directory is searched. If the driver cannot be found
then you are asked to enter the name of the directory containing them or,
by pressing {\tt ENTER}, to leave the program.

You are recommended to put each \lt\ document you create in a separate
subdirectory, set the parameters as required and save them in this
subdirectory. If the parameters are unlikely to be changed for other
documents, you can copy the option file to the directory containing {\tt
texcad.exe}. It is also possible to create a parameter file for each
picture, \tc\ will search for a parameter file {\it
path\verb|\|name{\tt .opt}}, when loading a picture {\it
path\verb|\|name{\tt .pic}}

After a successful start, the screen will be divided as follows:

\begin{center}
\unitlength=1mm
\begin{picture}(80.00,55)
\put(0.00,0.00){\framebox(80.00,55)[cc]{}}
\thicklines
\put(60.00,55){\line(0,-1){55}}
\put(60.00,35){\line(1,0){20.00}}
\put(70.00,45){\makebox(0,0)[cc]{\shortstack{Message\\window}}}
\put(70.00,17){\makebox(0,0)[cc]{\shortstack{Menu\\window}}}
\put(30.00,27){\makebox(0,0)[cc]{Drawing window}}
\end{picture}
\end{center}

The message window shows the version number and a copyright notice, and
the menu window displays the main menu:

\begin{center}\begin{tabular}{l}
\tt MAIN-MENU\\[1ex]
Draw\\
Edit\\
Redraw\\
Snap\\
Zoom\\
Window\\
Options\\
Save\\
Load\\
Quit
\end{tabular}\end{center}

\subsection{The menus}
The highlight bar in the menu can be moved either with the mouse or the
cursor keys and the selection made by pressing the left mouse button or
the {\tt ENTER} key.  Some of the menu items will then display a submenu
for you to make a further choice.  The title of the menu will always
appear at the top of the window.  You can leave a submenu by pressing the
right mouse button or the {\tt ESC} key -- except that the main menu can
be left (and the program ended) only by selecting {\tt Quit} from it.

\subsection{The message window, mouse and key functions}

This window is used to display messages from \tc\ and for input from the user.
There are four kinds of messages:
\begin{enumerate}
\item A request for text input: a file name, for instance. During
text entry the following keys and mouse buttons may be used:
\begin{description}
\item[\tt Left and right arrow keys] move the cursor one character to the
left or right
\item[\tt Insert] toggles between insert and overwrite mode
\item[\tt Delete] removes the character under the cursor
\item[\tt Backspace] removes the character to the left of the cursor
\item[\tt ESC or right button] ends input and terminates the operation
\item[\tt ENTER or left button] ends input and returns the entered text to
the program
\end{description}

\item A request for a point to be marked in the drawing window. To do this
the cross hairs must be moved with the mouse or the arrow
keys\footnote{Ctrl-arrow keys move the cursor in greater steps} to the
desired position and the left mouse button or {\tt ENTER} pressed. If an
error is made, the operation can be terminated by pressing the right mouse
button.

While marking points, the display window can be moved upwards, downwards,
to the left or to the right by pressing the keys {\tt E}, {\tt X}, {\tt S}
and {\tt D}.  The snap function can be toggled on and off with the {\tt P}
key.

\item Error messages -- to continue, press {\tt ENTER} or the left mouse
button.

\item Yes/No queries which must be answered by pressing {\tt Y}, {\tt
ENTER} or the left button for ``Yes", or {\tt N}, {\tt ESC} or the right
button for ``No".
\end{enumerate}

\subsection{The drawing window}

The top and righthand edges of the window carry a ruler against which the
horizontal and vertical position of the cross hairs can be read. The distance
between two divisions is the value set in menu {\tt Options/Unitlength}.

\section{Drawing pictures}

Selecting {\tt Draw} from the main menu presents you with a menu of the
objects which can be drawn:

\begin{center}\begin{tabular}{l}
\tt DRAW\\[1ex]
Text\\
Framebox\\
Dashbox\\
Filled Box\\
Line\\
Vector\\
Circle\\
Filled Circle\\
Oval\\
Half/Quarter Oval\\
Bezier
\end{tabular}\end{center}

\subsection{Text}\label{text-section}
The first item on the {\tt Draw} menu allows you to enter text into the
picture. After you have selected the reference point for the text, the upper
part of the window will be cleared and you can enter any \lt\ text you wish.
When you have done this, you will have to select the text's horizontal and
vertical positioning with respect to the reference point.  The choices for horizontal
positioning are:
\begin{description}
\item[Left] the lefthand end of the text will be at the reference point, that
is, the text lies to the {\it right} of the reference point.
\item[Right] the righthand end of the text will be at the reference point,
that is, the text lies to the {\it left} of the reference point.
\item[Center] the text will be centred horizontally.
\end{description}

The choices for vertical positioning are:
\begin{description}
\item[Top] the top of the text box will be at the reference point, that
is, the text lies {\it below} the reference point.
\item[Bottom] the bottom of the text box will be at the reference point,
that is, the text lies {\it above} the reference point.
\item[Center] the text will be centred vertically.
\end{description}

When these choices have been made, the normal picture will reappear with the
position of the text shown by a {\tt T} and you will return to the {\tt Draw}
menu.

\subsection{Boxes, dashed and filled boxes}
Selecting {\tt Framebox} from the menu draws a box with solid lines, {\tt
Dashbox} gives a box with broken lines and {\tt Filled Box} gives a filled in
box.

To draw a box you must first select the bottom lefthand corner of the box and
the righthand top corner.  If you have selected {\tt Dashbox} then you
must also give the length of the dashes by marking two points at the beginning
and end of the desired length.  Having done this you can now enter some text
to go in the box -- if you do not want text in the box then you must enter an
empty string.  Text is entered as described in section~\ref{text-section}
except that the positioning of the text in the box is as follows:
\begin{description}

\item[Left] the lefthand end of the text will start at the left edge of the
box, that is, the text is left justified in the box.

\item[Right] the righthand end of the text will be against the right edge of
the box, that is, the text is right justified in the box.

\item[Center] the text will be centred horizontally in the box.

\end{description}

For vertical positioning
\begin{description}

\item[Top] the top of the text box will be against the top edge of the box,
that is, the text is at the top of the box.

\item[Bottom] the bottom of the text box will be against the bottom of the
box, that is, the text is at the bottom of the box.

\item[Center] the text will be centred vertically in the box.

\end{description}

A box with text in it will have the letters {\tt BT} in it.

\subsection{Lines and arrows}
The menu item {\tt Line} draws lines and the item {\tt Vector} draws lines
with arrow heads. The line is drawn by marking the starting point first and
then the end point. You can then draw further lines by marking further
endpoints, the previous endpoint is always taken as the starting point.
The drawing of lines is aborted with {\tt ESC} or right button.

\subsubsection{Ordinary lines and arrows}
As \lt\ can only draw lines with certain slopes, \tc\ always takes the
line with a proper slope next to the current slope.

\subsubsection{EMLines}\label{EMLines}
If you are using one of the em\TeX\ drivers then it is possible to draw lines
in any direction, not just these allowed by \lt.  To do this you must first
select the {\tt EMLines} option in the {\tt Options} submenu (see
section~\ref{emlines-subsection}). You must also add the style file {\tt
emlines.sty} to your document as, for instance,
\verb"\documentstyle[emlines,11pt]{article}".  {\tt emlines.sty} contains user
macros for drawing lines:

\verb"\emline#1#2#3#4#5#6" places point \verb"#3" at the coordinates
(\verb"#1,#2") and point \verb"#6" at coordinates (\verb"#4,#5") and draws a
line between these points.  \tc\ generates a call to this macro for each
EMLine it draws.

{\bf Note:} if there is more than one picture to a page then the
\verb"\emline" macro must be preceded by a call to \verb|\newpic{|{\it
digit}\verb|}|.  This call causes {\it digit} to be placed before the
number designating all the \verb"#3" and \verb"#6" points so that they
remain unambiguous.

With V1.3j or later of the em\TeX\ drivers, this redefining of
\verb|\emline| is unnecessary, you must then use {\tt emlines2.sty}
instead. The \verb|\emline| macro defined there ignores the pointnumbers,
so that old pictures can still be used.

\subsection{Circles and filled circles}
Circles are drawn by selecting {\tt Circle} and filled circles by selecting
{\tt Filled Circle}.  In both cases the centre of the circle is marked first
followed by any point on its periphery.  As circles in \lt\ can only take
certain sizes the ``rubber circle" will only follow the cursor when it
falls on a permitted radius.

\subsection{Ellipses}
The items {\tt Oval} and {\tt Half/Quarter Oval} allow you to draw
ellipses or parts of ellipses.  To draw an ellipse you must first mark the
bottom lefthand corner of the rectangle enclosing it and then the top
righthand corner.  For {\tt Half/Quarter Oval} you will first have to
select the part you want from a further submenu.

\subsection{Bezier-Curves}
The last item, {\tt Bezier}, allows you to draw bezier-curves by
specifying three points. When processing the document with \lt, you have
to add the style option file {\tt bezier.sty} as, for instance,
\verb"\documentstyle[bezier,emlines,11pt]{article}". {\tt bezier.sty}
contains the appropriate macro for drawing the curves, the file should be
available on every \lt\ installation.

\section{Editing pictures}
The second item on the main menu is {\tt Edit}, selecting this gives a submenu
to choose from:

\begin{center}\begin{tabular}{l}
\tt EDIT\\[1ex]
Text-Edit\\
Copy\\
Move\\
Mirror\\
Rotate\\
Delete\\
Delete all\\
Save Macro\\
Load Macro
\end{tabular}\end{center}

Editing allows objects to be copied, moved, mirrored, rotated or deleted.
It also allows the whole picture to be deleted, or parts of the picture to
be saved or loaded.  All these operations, except {\tt Delete all} and
{\tt Load Macro}, require you to pick the objects to be edited.

\subsection{Picking objects}
When an operation other than {\tt Delete all} or {\tt Load Macro} is selected
the following submenu is displayed:

\begin{center}\begin{tabular}{l}
\tt COPY/MOVE/MIRROR/ROTATE/DELETE/SAVE MACRO\\[1ex]
Pick objects\\
Pick area\\
Unpick
\end{tabular}\end{center}

By selecting {\tt Pick objects} you can select single objects in the picture.
This is done by selecting a point depending on the object as given in the
following table:

\begin{center}\begin{tabular}{ll}
\bf Object & \bf Point\\[1ex]
Text & a point near {\tt T}\\
Boxes, ellipses & a point inside the box or ellipse\\
Lines, arrows & a point approximately on the line\\
Circles & a point inside the circle\\
Bezier & a point approximately on the start- or endpoint of the curve
\end{tabular}\end{center}

The selected object is marked and you are asked to confirm your choice: if you
answer ``Yes", the object is picked and you can then go on to pick other
objects or return to the Pick menu by pressing the righthand mouse button. If
you answer ``No" \tc\ will look to see if there is another object nearby, if
so then you will be asked to confirm this choice and so on.

If no object can be found, \tc\ will issue an appropriate message.

If you select {\tt Pick area} then you will be asked to mark the lower left
and upper right corners of a window:  all objects which fall {\it completely}
within this window will be picked and will be so marked.

Selecting {\tt Unpick} undoes all pick operations.

{\bf Important note:} if you leave the pick menu with the righthand mouse
button then the pending operation will {\it not} be terminated, but it
still can be terminated thereafter.

\subsection{Editing text}
By selecting the menu item {\tt Text-Edit} you can either alter text which
already exists in the picture or you can put text into boxes now empty.

First you will be asked to pick either a text marker {\tt T} or a box. Text
input or editing is done in the same way as in section~\ref{text-section}.

\subsection{Mirror}
The menu item {\tt Mirror} allows you to mirror Objects. Because of the
limitation of line slopes in \lt, it is only possible to mirror Objects on
a horizontal, vertical or diagonal line.

After selecting the Objects to be mirrored, you have to enter a point on
the mirror-line and select the position of that line (horizontal,
45~degrees, vertical, 135~degrees). \tc\ then mirrors copies of the
objects on the specified line.

\subsection{Rotate}
With the item {\tt Rotate}, you can turn Objects around a point. Again,
the limitations of \lt\ allow only turning by 90~degrees to the left or
right and by 180~degrees.

After selecting the objects to be turned, you have to enter the Center of
rotation and select the rotation angle. \tc\ then rotates copies of
the objects around the specified point.

\subsection{Copying and moving objects}\label{copy-move}
By selecting {\tt Copy} or {\tt Move} from the {\tt Edit} menu you can copy or
move a part of the picture.

After you have picked the objects taking part in the operation, you will be
asked to mark the start and end of a vector in the desired movement
direction, and, when copying, the desired number of copies.
With {\tt Move} the picked objects will be placed in the given position and
the originals deleted. {\tt Copy} does the same but does not delete the
originals.

\subsection{Deletion}
{\tt Delete} is used to remove single objects from the picture, after picking
them, \tc\ will ask for confirmation.

{\tt Delete all} clears all the objects from the picture, you are asked to
confirm this too.

\subsection{Macros}
\tc\ allows you to save parts of the picture and load them into other
pictures. These macros are saved as a \lt\ {\tt picture} environment in the
same way as complete pictures -- they can therefore be included in documents
without further processing. Also can whole picture be read in as macros.

To save a macro, select {\tt Save Macro} from the {\tt EDIT} menu. After you
have picked the objects to be saved, \tc\ asks for the name of a file in which
to write them. When this has been given the macro will be saved. If the name
is not a path name then the file will be put in the default directory as shown
in {\tt Options/Directories}.  If the filename is given without an extension
then the default extension will be used (see section~\ref{option-section}).

To load a macro, select {\tt Load Macro} from the {\tt EDIT} menu. \tc\
will ask for the name of the file and will then load the picture in it.
If no path or extension is given then the file name will be extended with
the defaults as for {\tt Save Macro}. Section 7 contains more information
on inputting the file name and the format of the file's contents.  If the
file does not exist an appropriate message will be issued.  The objects
loaded are marked and can be moved to the desired place in the same way as
described in section~\ref{copy-move}.

\section{Utilities}
As well as drawing and editing pictures, \tc\ has a number of utilities to
help in the task.

\subsection{Redraw}
{\tt Redraw} in the main menu redraws the picture which may be necessary after
drawing circles during which some part of the picture may be overwritten.

\subsection{The snap function}
When snap is enabled, the cursor no longer moves smoothly but jumps from point
to point on a grid.  Setting snap is done by selecting {\tt Snap} from the
main menu:

\begin{center}\begin{tabular}{l}
\tt SNAP (On, $<asp>$)/SNAP (Off)\\[1ex]
On\\
Off\\
Aspect\\
\end{tabular}\end{center}

The function is turned on or off by selecting {\tt On} or {\tt Off}. Selecting
{\tt Aspect} allows you to alter the grid spacing. The status of the snap
function is displayed in the snap menu heading.

While entering points in the drawing window, the snap function can be toggled
on and off with {\tt P}.

\subsection{Zoom}
Zoom increases the displayed size of the picture. On selecting the {\tt Zoom}
item from the menu the following submenu appears:

\begin{center}\begin{tabular}{l}
\tt ZOOM ($<fac>$)\\[1ex]
Factor\\
Area\\
All\\
Last
\end{tabular}\end{center}

Selecting {\tt Factor} from this submenu allows you to choose the factor by
which the picture will be magnified. On selecting {\tt Area} you will be asked
to mark a window and the magnification will be chosen so that the picture
fills this window.  The current zoom factor is shown in the zoom menu heading.
{\tt All} sets zoom to one and puts point (0,0) in the bottom lefthand corner
of the drawing window, all the picture is displayed.  When the magnification
is changed, \tc\ saves the last zoom factor and the position of the part of
the picture displayed, by selecting {\tt Last} you can return to the previous
zoom\slash position, switching between two different views.

\subsection{Moving the window}
Selecting {\tt Window} from the main menu displays this submenu:

\begin{center}\begin{tabular}{l}
\tt WINDOW\\[1ex]
Lower left\\
Upper right\\
Origin
\end{tabular}\end{center}

By selecting {\tt Lower left} and marking a point, you can move the displayed
image so that the point chosen appears in the lower lefthand corner of the
drawing window.  In the same way, selecting {\tt Upper right} puts the
selected point at the upper righthand corner of the window. Selecting {\tt
Origin} puts the origin (0,0) in the lower lefthand corner of the window.

While marking points in the window, the {\tt E}, {\tt X}, {\tt S} and {\tt D}
keys can be used to move the display. {\tt E} and {\tt X} move the window up
and down by a quarter of the window height, {\tt S} and {\tt D} move it to the
left and right by a quarter of the width.  This function is enabled only when a
single point is being input, for instance, the starting point of a line, but
not when a rubber band is displayed as when entering the end point of a line.

\section{Options}\label{option-section}
Selecting {\tt Options} in the main menu displays the following submenu:

\begin{center}\begin{tabular}{l}
\tt OPTIONS\\[1ex]
Directories\\
Snap\\
Zoom\\
Unitlength\\
EMLines\\
Save Options\\
Load Options
\end{tabular}\end{center}

This submenu allows you to set the options described in
section~\ref{start-section}.

\subsection{Directories}
Selecting this item displays another submenu:

\begin{center}\begin{tabular}{l}
\tt DIRECTORIES\\[1ex]
Picture-Directory\\
Picture-suffix\\
Macro-Directory\\
Macro-Suffix\\
BGI-Directory
\end{tabular}\end{center}

{\tt Picture-Directory} is the directory in which pictures or searched for
and stored when the picture file name is not a path name, {\tt Picture-Suffix}
is the default extension for picture file names to be used when none is given.
{\tt Macro-Directory} and {\tt Macro-Suffix} perform the same functions for
macro files.

Selecting {\tt BGI-Directory} allows the directory containing the Borland
graphics driver files to be set.

\subsection{Snap, Zoom}
These two items have the same function here as in the main menu: they are
repeated here to enable the zoom factor and the snap function values to be set
as they are values which can be saved.

\subsection{Dimensional units}
The option {\tt Unitlength} allows the \lt\ picture parameter
\cs{unitlength} to be set. It is the unit in terms of which all measurements
in the picture environment are expressed.

\subsection{EMLines}\label{emlines-subsection}
The option {\tt EMLines} displays the submenu:

\begin{center}\begin{tabular}{l}
\tt EMLINES (Off)/EMLINES (On, $<width>$)\\[1ex]
On\\
Off\\
Linewidth
\end{tabular}\end{center}

To be able to draw lines at any angle, {\tt On} of these option must be
selected. Selecting {\tt Off} will return to the normal \lt\ situation.
DVI files with EMLines can only be printed using the em\TeX\ drivers.  The
option {\tt Linewidth} allows the thickness of EMLines or of vertical and
horizontal lines in the normal \lt\ mode.  The current value is displayed in
the header of the EMLines menu.

\subsection{Loading and saving options}
The menu item {\tt Save Options} saves the current option settings,
{\tt Load Options} sets the options from a parameter file. Defaultname for
the parameter file is {\it homedir\verb|\texcad.opt|}, where {\it homedir}
is the directory {\tt texcad.exe} was loaded from. When loading a picture
{\it path\verb|\|name{\tt .pic}}, \tc\ loads the parameterfile
{\it path\verb|\|name{\tt .opt}}, if it is present.

\section{Loading and saving pictures}\label{loading-section}
The last two items in the main menu allow complete pictures to be loaded and
saved.  On selecting {\tt Save} you will be asked for a file name in which the
picture is to be saved, {\tt Load} asks for a file name from which the picture
is to be loaded.  In both cases, the file name will have the default picture
path and extension added to it if either path or extension is not given.  If
{\tt Load} is selected when the current picture has not been saved, you will
be asked to confirm the operation:  if the answer is ``Yes" then the current
picture will be deleted and replaced with the loaded one.

If the file name given in response to the {\tt Load} query contains
wildcard characters ({\tt*, ?}), a list of matching filenames will be
displayed in the menu window.  You can move through this list by
selectiong the first or last item (row of up/down arrows), to select the
highlighted file press either the lefthand mouse button or the {\tt ENTER}
key -- to end the operation without loading a file, press the righthand
mouse button or the {\tt ESC} key.

\subsection{Picture file format}
Picture files generated by \tc\ have the following format (if no objects
have been drawn or loaded before, no file is created):

\begin{quote}
\tt\cs{unitlength}=\it length1\\
\tt\cs{special}\{em:linewidth \it length2\tt\}\\
\cs{linethickness}\{\it length2\tt\}\\
\cs{begin}\{picture\}(\it x,y\tt)\\
\cs{put}(\it x,y\tt)\{\it picture-object\tt\}\\
$\vdots$\\
\cs{end}\{picture\}
\end{quote}

Where EMLines or Bezier-curves are used, the \cs{put} command is replaced
by the following macro calls:

\begin{quote}
 \tt\cs{emline}\{\it x1\tt\}\{\it y1\tt\}\{\it point-no\tt\}\{\it x2\tt\}\{\it y2\tt\}\{\it point-no\tt\}\\
 \verb|\bezier{|num\verb|}(|x1{\tt,}y1{\tt)(}x2{\tt},y2{\tt)(}x3{\tt,}y3{\tt)}
\end{quote}

If you want to modify a picture file or create one from scratch, you should
note the following.  Everything before and after the \pic\ environment
except the \verb"\unitlength" and \verb"\special{em:linewidth ...}"
commands is ignored. Lines within the \pic\ environment which do not
contain a \cs{put}, \cs{emline} or \cs{bezier} command are read in and
stored unchanged; you can therefore insert any (appropriate) declarations
into a completed picture.

The parser which reads pictures when loading is a little fragile: if it
finds an error, \tc\ ends after giving you the chance to save the current
picture. This especially prevents you from loosing a picture when loading
a macro. However, picture files generated by \tc\ will certainly be read
in without error.

\section{Ending the run}
The final option in the main menu ends the run.  If the current picture
has been modified since it was last saved, you will be asked if you really
want to quit.

\appendix\section{The file {\tt gh.bat}}\label{ghbat}
This batch file is intended to save you from typing the same DOS-commands
over and over again, when developing a \lt-document. {\tt gh.bat} is
called via $$\hbox{\tt gh <\it file\tt >}$$ where {\it file} is the root
file of your document and must be entered without {\tt .tex}. The
following menu will be shown: 

\begin{center}\tt
gh.bat 2.0:\ \ \ Rootfile={\em file}.tex\\
\begin{tabular}{ll}
  1 = Edit    & 4 = TeXcad\\
  2 = LaTeX   & 5 = Drucken\\
  3 = Preview & 0 = Quit\\
\end{tabular}\end{center}

You can now call the listed programs by typing the appropriate number.
{\tt gh.bat} calls the batch files provided with em\TeX\ upon
entering one of the displayed numbers. Of course, you may edit the file
to adapt it to your own needs.

\section{The file {\tt gh.tex}}
This file is intended for testing \tc\ picture files. If you run it through
\lt, the following prompt is displayed:
\begin{verse}
\tt Enter name of (picture)file:
\end{verse}
You can now enter the name of a file, which will then be processed by \lt.

\section{Licensing conditions}\label{conditions}
\tc\ is public domain software, and the conditions of use are:

\begin{itemize}
\item \tc\ can be obtained from friends or from mailboxes, if they fail
direct from the author.  To get it from the author, please send a
5$1\over4$ inch double density diskette with return postage to the address
below -- please send the disk in a container which can be used for the
return journey.

\item \tc\ can, and should, be copied and passed on but only under the
condition that it is completely unchanged (all the files and this manual)
and no charge is made. You are encouraged to make improvements to the
program and to pass these on also. (Maybe someone would send me an
improved version.)

\item The author of \tc\ is (new address!):
\begin{verse}
Georg Horn\\
Dorfstra\ss e 34\\
57612 Isert\\
Germany\\
\end{verse}

\end{itemize}

\end{document}
