TEXDRAW 1.79    USER'S GUIDE

by Jens Pirnay
April 21, 1991


CONTENTS

1  INTRODUCTION ... 3
1.1  Copyright ... 3
1.2  What TEXDraw is capable of ... 3
1.3  What TEXDraw is not capable of ... 4
1.4  Changes compared to previous versions ... 4
1.5  The author's address ... 7

2  INSTALLATION ... 7
2.1  Necessary files ... 7
2.2  System requirements ... 8

3  THE OPERATION ... 8
3.0.1  The drawing window ... 8
3.0.2  The visible portion of the picture ... 8
3.0.3  The size of the picture ... 9
3.0.4  Moveable dialog and alert boxes ... 9
3.0.5  The Close box ... 9
3.1  The menu bar ... 9
3.1.1  The TEXDRAW menu ... 10
3.1.2  The File menu ... 10
3.1.3  The Selection menu ... 12
3.1.4  The Options menu ... 13
3.1.5  The Miscellaneous menu ... 15
3.2  The coordinate window ... 16
3.3  The icon window ... 16
3.3.1  Options ... 16
3.3.2  Text handling ... 18
3.3.3  Boxes ... 19
3.3.4  Lines and arrows ... 19
3.3.5  Circles ... 19
3.3.6  Curves ... 19
3.3.7  Bzier curves ... 19
3.3.8  Triangles/rectangles, sections and cones ... 20
3.3.9  EPIC lines ... 20
3.3.10  EPIC grids ... 21
3.3.11  Selection of objects ... 21
3.3.12  Various other functions ... 22

4  INCORPORATING PARTICULAR PICTURE CHARACTER SETS ... 23

5  FUTURE UPGRADES ... 23

6  TEXDRAW ON OTHER PLATFORMS? ... 23

7  TIPS ... 24

8  BUGS IN THE PROGRAM ... 24

9  CREDIT WHERE CREDIT IS DUE ... 24

10  THE SOURCE CODE ... 24

APPENDIX A   FORMAT OF THE TEXDRAW.INF FILE ... 25



Note: This user's guide is intended for the upcoming Version 1.8. So you will
find some of the features described are not yet fully implemented.




1  INTRODUCTION


1.1  Copyright

TEXDraw is based on a program of the same name by Gregor Fritz. That version
was full of shortcomings (and errors), so I decided to undertake a complete
upgrading and cleaning up of the program. The source code has now grown to
about 720 kB (not counting MagicLib by P. Hellinger, which would make it about
1.2 MB) and represents roughly one year's work.

Both the previous and this current version may be duplicated and passed along
without restriction. However, the copyright for the source code and the
finished program remains exclusively with me. No general distribution (PD, mail
boxes, etc.) is allowed without my expressed consent.

These files may only be passed along in their entirety (inlcuding  these
instructions) and in an unaltered form.

I am developing and debugging TEXDraw on an ongoing basis. But please do not
dampen my enthusiasm by burdening me with unnecessary expenses for disc
copying, telephone calls, mailing and postage, etc. which can add up to quite a
bit. I do intend to be helpful wherever I can, but I want to prevent my
expenses from becoming astronomical.

In order to recoup some of these and other costs, I am hoping regular users of
this program will find it fair to support me with a contribution of 10 DM. I
have no intention of making a profit on this program, but I do not want to
suffer a loss either...

My address and account number are on page 7.


1.2  What TEXDraw is capable of

TEXDraw is a draw program for LATEX. It makes it possible to draw and edit
objects accessible in the LATEX picture environment, and generates as output a
corresponding set of LATEX commands [1]. Pictures produced in this way can then
be incorporated into LATEX documents.

This upgrade also handles Bzier curves (via LATEXStyleFile bezier.sty) and
EPICStyles by Sunil Podar (lines and grids) [2]. Furthermore, it is possible
to save objects as PICTEX files [3].

In addition, TEXDraw can save the graphic as a METAFONT file [4], making it
possible to print even large and complex graphics with any driver.

Since Version 1.80, TEXDraw can also export files in the FIG (Facility for
Interactive Generation of Graphics) format. This format is widely used on the
Unix platform.

Furthermore, completed raster graphics can be converted into a format readable
by any implementation of TEX, either as a METAFONT file, or as a graphic file
for LATEX.

Clearly, TEXDraw is the best thing there is for combining graphics with TEX.

[1] Leslie Lamport: LATEX Manual, Section 5.5, C.13
[2] Sunil Podar: Enhancements to the picture environment of LATEX
[3] Michael J. Wichura: The PICTEX Manual
[4] Donald E. Knuth: The METAFONT Book
[5] Micah Beck: TransFig: Portable Figures for LATEX


1.3  What TEXDraw is not capable of

TEXDraw cannot handle all PICTEX instructions. Equivalent LATEX commands are
generated only by conversion from PICTEX instructions. A future upgrade will
handle the whole range of instructions, but this is not imminent.

TEXDraw cannot do more than LATEX or EPIC, but no less either.

Text from a METAFONT conversion is ignored. (Much is left to be desired, when
you consider what METAFONT was actually intended for.) One may choose during
conversion to generate a corresponding TEX file with the text (see Section
3.1.2). During HPGL import, (also see Section 3.1.2), segments of circles may
be brought over. These are ignored during conversion to LATEX.


1.4  Changes compared to previous versions

The original program by Gregor Fritz is designated as Version 0.1. The *.LTD
files saved from this version are not compatible with those saved by Version
1.0. Conversion of old drawing files is only possible by going through TEX
source codes and corresponding imports. This is a convoluted procedure, but no
data is lost.

In principle, all files from previous versions can be read correctly (reverse
compatibility). However, files read in from future versions may result in
incomplete images.

The parameter file texdraw.inf generated by previous versions is, for the most
part, not compatible with the format generated by the current version. However,
TEXDraw will warn you if this file originated from a previous version.


Description of Version Developments

0.10  Original program by Gregor Fritz. Had various quirks. In particular, was
very uncomfortable with the object selection process.

All the following versions originated from me (JP). Versions 0.2 to 0.99
represented development stages, only for internal use. They were never released
to the public.

1.00  First publicly released version. Included oval boxes, Bzier curves,
ellipses, and EPIC instructions. Screen redraw completely rewritten. Finally,
correct picture construction. Large screen compatibility. Completely new object
selection, including management of combined objects. Import of TEX source
files. Correction of various minor errors. Improved text input. Correction of
an error during redraw of text boxes.

1.05  Introduction of help texts and (almost) unrestricted selection of
\unitlength. Incorporating of applicable picture sizes in the menu bar.
Improved input of the number of points on Bzier curves.

1.10  Introduction of further fill possibilities for rectangles and circles.

1.11  Improved display of the transient value of \unitlength during the drawing
of circles.

1.20  Incorporation of centering, rotation and mirroring of selected objects.
New arrangement of icons. Lines/arrows of fixed x/y value removed.

1.30  Three nasty bugs removed. (Previously, the ungrouping of a combined
object caused all objects behind it to be erased. In the Info readout, instead
of the maximum number of nested levels, the sum of all combined objects was
shown. Line breaks were not converted to the corresponding TEX commands during
text output.) Resizing and locking of selected objects introduced. New draw
functions: half circle, triangle, rectangle (flat and three dimensional).
Because of the new functions, a switching procedure between Selections/Options
and EPIC icons needed to be introduced.

1.35  Backup support initiated. Text in (almost) any style enabled.

1.40  PICTEX conversion icorporated.

1.41  Error related to the original TOS 1.4 file selection box corrected.

1.42  Icon window enlarged to facilitate program use. Hence the dropping of the
menu entries Group/Ungroup Selection.

1.45  HPGL import and definite size changing incorporated.

1.50  METAFONT conversion incorporated.

1.60  A whole flood of changes and additions. Internal resolution changed from
1/3 to 1/4 \unitlength. New \unitlength values (multiples and fractions of
standard sizes). Movable view section (finally). HPGL import broadened and set
to original resolution (1/40 mm). Possible disabling of size limitation for
circles (because of METAFONT). Change from GEMIMG and STAD pictures in
METAFONT files. Changeover to MagicLib and MagicTools by Peter Hellinger.

1.65  TEXDraw now runs on the Atari TT. Keyboard shortcuts available for menu
entries. Internal resolution values between 1 and 5 can be freely selected.
Preferences may be saved. Command lines may be used. Change from GEMIMG and
STAD pictures in TEX files. Preparation for METAFONT macros with special drawn
lines.

1.66  Vector symbol sets are now directly accessible. Custom picture size
default setting introduced. Alternating with right mouse button introduced. A
flood of errors, which crept in during the changeover to MagicLib/Tools, were
corrected, such as \shortstack error, EPIC grid, etc. (And you thought you only
get that from beta versions!) Apologies to all users who suffered.

1.67  The menu entry IMG > TEX now selectable by mouse, and not only from the
keyboard.

1.69  Rectangles with rounded corners are now plotted the same way as in LATEX.
The conversion to METAFONT also works correctly now. Keyboard shortcuts are
broadened to include combinations with the Control and Alternate keys.

1.70  Now GEMINI 1.2 is fully supported (ARGV paramater transmittal). An
annoying bug related to METAFONT conversion is removed. (Finally the values in
the TFM file agree.) View section may be moved with the cursor keys. During
METAFONT conversion, a TEX file may be generated for overlaying associated text
if desired. Correction of a warning message query error related to circle
segments.

1.71  More solid HPGL conversion. View section may be moved using numeric
keypad keys.

1.75  Smarter METAFONT conversion, avoids "enormous numbers". Introduction of
custom lines. Introduction of overview mode, in which the entire drawing may be
both viewed and edited. Removal of various minor bugs. Last generated object is
now first to be selected. HPGL import stabilized.

1.76  The 40 character problem was finally resolved. A variety of minor bugs
were corrected (on account of which the beta version of this release was
unuseable).

1.77  Defineable METAFONT parameter. Vector font speeded up and error related
to \makebox corrected. Path utilization in info file corrected. Menu entries
for graphic conversion combined.

1.78  The annoying ";" error related to METAFONT conversion corrected. Path
utilization in info file corrected (again, and for good). Several menu entries
combined. Fill pattern from top left to bottom right now operational. Undo
function available for settings.

1.79  An overall bug cleanup and optimization. Increased arrangement
possibilities for selected objects.


1.5  The author's address

Please direct all correspondence (praise, abuse, etc.) to:
Jens Pirnay
Wrmstrae 1
8400 Regensburg
Germany
Tel.: 0941/45952
email: pirnay@vax1.rz.uniregensburg.dbp.de
Account number: 5 19 95 83
Regensburg Savings Bank (BLZ 750 500 00)



2  INSTALLATION


2.1  Necessary files

To install, simply copy the files texdraw.prg and texdraw.rsc into a folder.

To be accessible, the corresponding parameter files texdraw.inf (system
defaults), and texdraw.fnt (list of incorporated character sets) must be in the
same folder as the main program (see Section 3.1.4).

For METAFONT conversion, the file linmacros.mf is needed. This should be copied
into a folder in which the current implementation of METAFONT will search for
files to include.

You will note that files with the extension LTD are related to this program.
With both the GEMINI and the original desktop, it is possible, by double
clicking on such a file, to run TEXDraw and load the selected picture.


2.2  System requirements

TEXDraw runs with a minimum screen resolution of 640 x 400 pixels, colour or
monochrome. This means basically the Atari ST in monochrome mode. In theory,
TEXDraw should also run on large monitors (not tested), and under GDOS
(tested). Only two colours are supported, so there's not much to be gained by
running in colour mode.

Any computer model or TOS version should run TEXDraw. (TOS 1.0, 1.4 and 1.6
tested.)

Since version 1.60, TEXDraw will also run on the Atari TT (thanks to Martin
Wunderli).



3  THE OPERATION

The screen is divided into four parts: the GEM dropdown menus at the very top,
a coordinate readout window at top left, an icon window directly underneath,
and the actual drawing window.


3.0.1  The drawing window

The drawing window comprises the actual drawing. The title bar shows the name
of the current drawing. The info line shows the current size, or possibly a
help message.

The picture size is set to a standard 120 x 100 mm format. (However, this may
be changed. See below.) This work area ("paper") is filled with white. Its gray
background is visible at the edges. It is possible (as in LATEX) to draw
outside the paper. The edge can be cut away if desired (menu entry in Options
dropdown menu).

The number of pixels which correspond to one \unitlength can be set with the
System Defaults menu entry (see Section 3.1.4).


3.0.2   The visible portion of the picture

The picture may be shown with a large degree of magnification, as happens
automatically after an HPGL import (see below). In this case, only a small
portion of the whole picture is visible on the screen. The visible portion may
be changed in a manner common to GEM displays. Click on the arrows or the gray
portion of a scroll bar, or drag the white block.

To revert to displaying the standard section (coordinate of 0,0 in the lower
left corner), click the top right corner of the screen (the socalled full
box).

The view section may also be moved with the cursor keys. Pressing a cursor key
corresponds to clicking an arrow in the scroll bar. Pressing a cursor key
together with the Control key corresponds to clicking the gray area of a scroll
bar.

The four corners, the centre of the four sides, or the centre of the drawing
can be brought into view very easily. Push the corresponding key on the numeric
keypad. For example, 7 means top left, 3 means lower right, etc.


3.0.3  The size of the picture

The picture environment is set to a standard size of 120 x 100 mm. (However,
this may be changed. See section 3.1.4.) The current size is permanently
displayed in the info line of the screen. It is also available through the menu
entry About TEXDraw under the TEXDRAW dropdown menu.

The size can be changed as follows. Click on the arrow of a scroll bar while
holding down the Control key, and the section will be enlarged (or reduced) by
one \unitlength. Click on the gray portion of a scroll bar, again while holding
down the Control key, and the size will be changed by ten \unitlength. The
white slider block of the scroll bar has no function here.

Another method is by selecting the Choose Picture Size entry under the
Miscellaneous dropdown menu (see Section 3.1.5).


3.0.4  Moveable dialog and alert boxes

The Dialog and Alert boxes can be moved about on the screen. Click on the
"folded corner" at top right, and drag the box about with the left mouse button
held down.

Also, most functions can be activated from the keyboard. Push the key
corresponding to the underlined character in the function, while holding down
the Alternate key.


3.0.5  The Close box

If you click on the Close box of the drawing window, an alert box will request
your confirmation, after which the drawing will be erased and the window
closed.


3.1  The menu bar

Nearly all menu functions may be activated also from the keyboard. The
corresponding keyboard shortcut is shown at the end of each entry in the
dropdown menus. If you're fussy and a little bit adventurous, you can change
these keyboard combinations in the RSC file. They will become active the next
time the program is loaded.


3.1.1  The TEXDRAW menu

Any accessories that have been loaded are available under this menu. There is
also the About TEXDraw menu entry, which shows the copyright, as well as the
following statistics: the picture size, the total number of all objects
(including those that have been combined, see below), the number of (discreet)
objects, the number of selected objects, and the maximum number of nested
levels of combined objects.


3.1.2  The File menu

All functions related to loading, saving, and converting of pictures are
grouped under the File menu. The command to quit the program is also found
here.

The File menu consists of the following menu entries:

> LOAD. A drawing which has been saved in a format compatible with the program
is loaded. Any current objects are erased.

> MERGE. Same as Load, except current objects are not erased.

> SAVE. The current drawing is saved in a format compatible with the program,
under the same name with which it was loaded.

> SAVE AS. The current drawing is saved in a format compatible with the
program. In this case, the name under which it will be stored is user
defineable.

> IMPORT ALIEN FORMAT. This command will attempt to read files which had been
saved in a format incompatible with the program.

Currently, the following formats are supported:

 LATEX picture environment. This function is less than perfect, but
nonetheless useful for retrieving objects from files received or generated in
this format.

Note: Any associated \unitlength instruction is ignored. It is always set to 1
mm.

 HPGL (HewlettPackard Graphic Language). An HPGL command file for
HewlettPackard compatible plotters is interpreted.

This works successfully in most cases, and so offers access to all types of CAD
files. (Beyond the home territory of the Atari ST, files from MSDOS programs
such as ASYST and MATHCAD can be handled, since they can save in HPGL format.)
Because most programs only use a fraction of the HP7475A plotter's command set,
chances are good that only a little of the picture information will be lost.

It may happen that TEXDraw rejects a picture with the message that it is not
an HPGL file. This is usually due to some ESC sequence or other at the
beginning of the file. You should simply ignore the warning message, and thing
should progress in a satisfactory manner.

 FIG format. This is the file format of the FIG Graphic Editor, which is
widely used on the Unix platform. TEXDraw supports most of the command set in
Release 2.0.

> COMPILE. This menu entry allows the current drawing to be converted into a
file compatible with various programs or into macro command sets.

At present, the following formats are supported:

 LATEX picture environment. The drawing currently in memory is converted to a
corresponding LATEX file. It can then be read into a particular document using
\input{<name>}. Or it can be incorporated directly into the source text. If
Complete File was selected in the preceding dialog box, a corresponding
framework file is also generated, which can be directly interpreted by TEX.

 PICTEX output. The drawing currently in memory is converted to a
corresponding PICTEX file. It can then be read into a particular document using
\input{<name>}. Or it can be incorporated directly into the source text. Here,
as with the LATEX conversion, a framework file can also be generated.

 METAFONT output. This function allows drawings to be converted to METAFONT
format. This means that larger and more complicated drawings, such as those
originating with an HPGL import (see above) can be output with the highest
quality. If there is any text in the picture, it will be ignored during
conversion. It is, however, possible to generate a TEX file which contains only
the text information. This "picture of the text characters" may then be used as
an overlay. To incorporate such a drawing, see also Section 4.

 FIG format. This is the file format of the FIG Graphic Editor, which is
widely used on the Unix platform. TEXDraw supports most of the command set in
Release 2.0.

> QUIT PROGRAM. After a confirmation request, the program is terminated. Any
work in progress is not automatically saved.


3.1.3  The Selection menu

All functions related to selected objects are grouped under the Selection menu.
With a few exceptions, they are only available when objects are in fact
selected.

The Selection menu consists of the following menu entries:

> SELECT ALL. All objects are selected.

> CANCEL SELECTION. All objects are deselected.

> CHANGE SIZE. It is possible to resize objects interactively (see Section
3.3.11). For precice numerical control, an object's new dimensions may be
stated as a percentage of the original size.

> TO FOREGROUND. Selected objects are brought to the foreground.

> TO BACKGROUND. Selected objects are sent to the background.

> ADJUST SELECTION. All selected objects as a whole (not each individual
object) are repositioned within the overall picture or relative to a Reference
Object (see Section 3.3.11). The new position can be one of the four corners,
the midpoint of one of the sides, or the centre point.

> SAVE SELECTION. The selected objects are saved in a file format compatible
with the program.

> LOAD AND SELECT. Same as the Merge command in the File menu, except that here
the loaded objects become selected. Any currently selected object will be
deselected.


3.1.4  The Options menu

The Options menu consists of the following menu entries:

> LIMITED CIRCLE SIZE. If this function is active (as indicated by a check mark
beside the menu entry), then the upper limit imposed by LATEX on the size of
circles or segments is taken into account. It is still possible, for example
with METAFONT or PICTEX, to draw much larger circles, so that this limitation
may be overcome.

> SIMULATE HPGL TEXT. This function allows the simulation of text in an HPGL
file with a particular vector font. It will then appear in the METAFONT output.
It can also appear in any direction handled by the plotter.

> CHOOSE VECTOR FONT. This menu entry displays the name of the active
(BorlandBGI compatible) vector font. This is important for any text
replacement during HPGL import. In the associated dialog box, a number not
already used may be chosen, allowing a BGI font to be loaded.

When the program is loaded, the associated folder is searched for a parameter
file called texdraw.fnt. Each line of this file contains the file name of a
BGIcompatible vector font, which is then loaded. This file must be created and
customized using an editor. Note: If no path is indicated in the name, the
vector font folder (established in the texdraw.inf file, see below) is searched
first, and then the associated folder.

> SHOW JUST DRAW AREA. If this function is active (as indicated by a check mark
beside the menu entry), then only the actual area of the picture will be shown.
The surrounding area is filled with gray.

> METAFONT OPTIONS. This allows the selection of the line thickness and the
ASCII code for the picture character during a METAFONT conversion.

> SYSTEM DEFAULTS. In the associated dialog box, the internal resolution (i.e.
the number of pixels per \unitlength) and the position of alert and dialog
boxes may be selected. (This will be of interest to TT and large monitor
users.)

If the Save option is active, then the respective paths for all relevant file
types (TEX, MF, IMG, PAC, CHR), the current window size, the \unitlength, and
the internal resolution setting are saved. They will take effect the next time
the program is loaded. Also a parameter file called texdraw.inf is created,
which allows the settings to be consulted. This file must be in the same folder
as the main program.

In particular, the folders in which the generated LATEX, PICTEX and METAFONT
files are stored may be defined and customized here (with an editor). Any
changes you make are at you own risk. (The format of this file is described in
Appendix A.)


3.1.5  The Miscellaneous menu

The Miscellaneous menu consists of the following menu entries:

> CHANGE \UNITLENGTH. This establishes the \unitlength. Currently, only certain
sizes are selectable. Normally, changing the standard size of 1 mm does no
harm, with the exception of circles and quarter circles, since in LATEX only a
few discreet circle sizes are available.

Also note that in LATEX, lines must have a minimum length in order to be
visible. Lines that are too short are suppressed in any subsequent printout.

For this reason, an automatic conversion to the new unit may be selected.
Because of the internal description of the coordinates, it will be rounded to
an integer!

> CHOOSE PICTURE SIZE. Here, the picture size can be established directly. An
alternate, interactive method is described in Section 3.0.3.

> OVERVIEW. Working on large drawings can be cumbersome. This menu entry allows
you to switch to a mode which shows the entire drawing, regardless of size. You
may continue to work on the drawing as before. Selecting this function again
will switch out of  this mode.

> OVERVIEW FACTOR. This menu entry allows you to establish the zoom factor for
Overview mode.

> CONVERT BIT IMAGE. This menu allows existing graphics to be turned into a
format readable by TEX.

 Raster graphics (in GEMIMG or STAD format) can be turned into METAFONT
source code or TEX format, or directly into TEX character sets.

Very little optimization is carried out during the transformation. Rather, the
picture is converted line for line into point/line commands, or into a set of
\rule commands.

Beware of graphics with large areas of gray. The METAFONT or TEX files can
become gigantic!

For incorporation of fonts generated in this manner, see Section 4.

 Vector graphics (GEM Metafile, Calamus vector graphic, PostScript subset) can
be changed into METAFONT source code. Presently, this is more in theory than in
practice, but will definitely become reality (by Version 10.0 if not sooner).


3.2  The coordinate window

As the mouse cursor is moved over the work area, its corresponding x and y
position is displayed interactively in the coordinate window.

There is also a dx and dy display, which becomes active when a drawing
operation requires the selection of a second (or subsequent) point. In this
case, the x and y values correspond to the first (or immediately preceding)
point. This is very useful for precision work.


3.3  The icon window

The icon window is situated at the left side of the screen directly under the
coordinate window. It consists of a total of forty icons which denote the
drawing operations.

In most cases, the procedure for creating an object is as follows. First click
and select the respective icon (if not already selected). Then establish the
first point by clicking the mouse at the desired position on the "paper".

For a great many drawing operations, clicking the right mouse button while the
cursor is over the working area, changes the options corresponding to these
operations. For lines and boxes, the line thickness may be changed. For text
input, the text position may be selected. For EPIC lines, the base symbol will
be shown. The three operations related to selecting (Select, Move/Resize, Copy)
are cycled to the next one with each click.

The functions of the icons may be best described when they are divided into the
following groups.


3.3.1  Options

Clicking one of the following icons causes a change in certain drawing
functions. The current state of the icon will be indicated by its appearance.
(Normally the next option is chosen. With the shift key, the preceding option
is chosen.)

 The Text Mode icon determines whether or not the text should be shown with a
bounding box, and how this box should appear. According to the chosen mode, the
bounding box will be either omitted (\makebox), or shown (\framebox and
\dashbox). This box is the reference for positioning the current text (see
below).

 The Text Type icon determines whether text should be drawn and generated as
normal TEX text, or whether the input text should be simulated by a vector font
(BorlandBGI compatible). (See Section 3.1.4.)

 The Line Thickness icon determines the thickness of lines in boxes, for EPIC
grids, as well as all lines and arrows. (Corresponds to LATEX commands
\thicklines and \thinlines). Unfortunately, thick dashed and dotted lines are
shown as thick continuous lines. (This depends on GEM and the TOS version.) For
most line related drawing operations, this option may be toggled with the right
mouse button.

 The Text Position icon determines the positioning of text in boxes. Nine
positions are possible. A click of the right mouse button will switch to the
next option.

 The Fill Status icon determines whether circles and normal rectangles (not
dashed or dotted) should be filled. A total of seven fill possibilities are
available, permitting all fills through \line, including solid. (It may happen
that very short lines are suppressed during printout. Here too LATEX expects a
minimum line length. Sorry.)

 The Symbol icon determines whether symbols should be shown on the joints of
EPIC line segments. Five symbols are possible.


3.3.2  Text handling

Text is always generated in the same fashion. First, the bounding box is
established (see Boxes, later on). Then the text is entered from the keyboard.

We will differentiate between two types of text: normal and vector text. We
will also differentiate between four text modes: text without a bounding box,
text with a normal bounding box, text with a dashed bounding box, and text with
an invisible bounding box. (See Section 3.3.1.)

For normal text, it is possible to input copy consisting of several lines. The
\\ is recognized and simulated for line breaks. The \\ can be input directly,
or with the convenient ControlReturn keyboard combination. According to the
chosen mode, the bounding box will be either omitted (\makebox), or shown
(\framebox and \dashbox). The alignment of the composed text may be selected
with the function keys: F1 for centred, F2 for flush left, F3 for flush right.

Vector text cannot handle copy of more than one line. However, the character
set, the size, the rotation relative to the horizontal, and the text skew angle
may be changed interactively, as follows.

 Character set. Select the corresponding vector font with the function keys F1
to F10. (Also see section 3.1.4.)

 Text size. With the up and down arrow keys, text size can be changed in 10%
increments. If the shift key is held down, the increments are 50%.

 Text rotation. With the left and right arrow keys, the rotation of the text
relative to the horizontal is changed in 5 degree increments. If the Control
key is held down, the increments are 45 degrees.

 Text skew angle. With the left and right arrow keys, together with the shift
key, the skew angle of the text may be changed.

 Preferences. The current values of size, rotation and skew may be saved with
the Help key, and recalled at any time with the Undo key.

In addition to the already named methods of incorporating text into a drawing,
there is another generally useful method for text input. Hold down the Control
key during the selection of a drawing function. When the drawing operation is
completed, text is generated in the bounding box. The procedures described
above may be used to orient and align the text. This mode is designated by a
"T" at the far left of the info line.

This is available with almost all drawing operations, with the following two
exceptions.

 Not with normal lines and vectors (I didn't see any sense in it), but
possible with EPIC lines and with triangles and rectangles (see below)

 Not with standard text functions (this would mean a double text input)


3.3.3  Boxes

Boxes of any type are created as follows. First, a corner point is clicked.
Then the box is drawn up to the desired size. The dimensions of the evolving
box are shown in the coordinate window as dx and dy.


3.3.4  Lines and arrows

After clicking the start point, the line is drawn up. Since LATEX permits only
certain angles of slope, you may notice jumps in the orientation while drawing.


3.3.5  Circles

Filled or unfilled circles are created as follows. First, establish the centre
point with a mouse click. Then draw up the circle to the desired size. There is
an upper limit to the size. (LATEX can only handle circles up to a certain
radius.) This depends on the \unitlength setting in effect.


3.3.6  Curves

Quarter circles and half circles are created in the same way as circles.
(Establish the centre point, then draw it up.) Rectangles with rounded corners
are created in the same way as boxes (see above). One peculiarity. When drawing
up a half circle, hold down the shift key. Otherwise, a quarter circle is
created.


3.3.7  Bzier curves

There are two different commands. One creates an individual Bzier curve. The
other creates a closed path made up of four linked segments, nestled inside a
diamond shaped envelope.

The individual Bzier curves are created as follows. First, establish the end
points by drawing a straight line. Then adjust the shape by pulling on the
control point. The end points may also be adjusted.

The Bzier ellipses are created in a similar way. Pull out the first, and then
the other diagonal of the diamond shaped envelope. The resulting curve will now
take shape.

The number of points which comprise an individual Bzier curve is determined in
the same way for both commands. Starting with 50 points, this number can be
changed by moving the mouse in the x direction. The number is progressively
monitored in the dx field of the coordinate window. The increment is normally
one point. If the right mouse button is held down, it is ten points. If both
mouse buttons are held down, it is one hundred points. The procedure is ended
with a click of the left mouse button.

During the entire procedure, the Bzier curve corresponding to the current
number of points is displayed. This permits an accurate control over the actual
appearance of the resulting curve. The algorithm used in the program is an
implementation of the corresponding TEX instructions, giving the benefit of
true WYSIWYG.


3.3.8  Triangles/rectangles, sections and cones

You may readily create the following commonly used geometric forms: triangles
and rectangles, triangle and rectangle sections, triangle and rectangle cones.
The various available forms are clearly designated by their appearance.

A section is a form whose bottom and top surfaces are identical, and whose
corner points are connected to each other by straight lines.

With cones and pyramids, on the other hand, the corner points of the bottom
surface are connected by straight lines to a single point, called the apex.
Caution is required here, since due to the limited selection of straight lines
in LATEX, it may happen that extreme cones are not correctly generated, the
apex being off position.

In all cases, start by constructing the flat surface (a base line, and then the
shape drawn up). Then draw up the desired body shape.


3.3.9  EPIC lines

A line of connected segments may be constructed, where the slope angle of
individual segments, in contrast to normal LATEX lines, is not subject to any
limitations. As the appearance of the Symbol icon indicates (see above), a
given symbol (diamond, cross, etc.) is shown at each junction point (see
Options). A click of the right mouse button will switch this option.


3.3.10  EPIC grids

First, determine the size and position of the grid by drawing up the
corresponding box. Then establish the spacing of the horizontal and vertical
grid lines by moving the mouse. The appearance of the grid is updated as it is
changed. This procedure is ended with a click of the left mouse button. There
is no lable for the grid. (The integer values proposed by EPIC are generally
not suitable.) If one is required, it must be added later to the TEX source
code (by \multiputlist, for example).


3.3.11  Selection of objects

Any object can be selected with a single click within the bounding box of the
object. If several objects overlap at the click point, the top one will be
selected. The stacking order of objects may be changed with the menu entries To
Foreground and To Background (a procedure common to many draw programs). If you
click where no objects exists, all objects will be deselected. The bounding
boxes of selected objects are displayed with "pull handles", as shown in the
illustration further down.

By holding down the left mouse button, you can draw up a frame which will
select every object whose bounding box lies completely inside this frame. All
other objects will be deselected.

If the Control key is held down while an object is selected, it becomes a
Reference Object, which is utilized by the Adjust Selection function (see
Section 3.1.3). A Reference Object is identified by diamondshaped markers at
the corners and at the midpoint of each side. In other respects, it possesses
the same characteristics as normally selected objects.

This behaviour is changed by holding down the shift key. The selection state of
the selected object(s) is switched. The selection state of other objects
remains unchanged.

By choosing the Key icon, all selected objects are marked for protection from
changes (restacking, copying, resizing, moving, rotating, mirroring, grouping,
ungrouping, erasing). This condition can be released by clicking on the Gray
Key icon. A protected object is identified by outlined handles on its bounding
box, as shown:

Selected objects may be resized, moved, or copied, depending on the icon
currently chosen. The size may be changed by clicking on a handle (a procedure
common to many draw programs, also see Section 3.1.3). Clicking within the area
of any selected object(s) will cause a bounding box to appear, which you may
drag to a new position while holding down the left mouse button. You may find
it difficult to move a small object, since a click will usually land on a
handle rather than on the interior area. In this case, holding down the shift
key will prevent resizing, allowing you to reposition the object.

You may cycle through the three related operation of Select, Move/Resize, and
Copy by clicking the right mouse button.

Selected objects may be mirrored horizontally or vertically by choosing the
appropriate icon. Text cannot be turned upside down; only its position within
the bounding box will change.

In a similar fashion, selected objects may be rotated by 90 degrees to the left
or right by choosing the appropriate icon. Text itself cannot be rotated.

Selected objects can be grouped into a combined object. These combined objects
are saved during conversion as a nested "picture environment". The respective
icons allow the components to be grouped or ungrouped.

By selecting the Trashcan icon, all selected objects are erased.


3.3.12  Various other functions

As a visual aid for creating objects, a grid, either dotted or lined, with a
spacing of 5 \unitlength, may be displayed in the drawing area.

The whole drawing may be erased with the Page Trashcan icon. A dialog box will
request your confirmation, after which the entire picture (including protected
objects, see above) is erased.



4  INCORPORATING PARTICULAR PICTURE CHARACTER SETS

I have not yet made it clear how METAFONT files are incorporated into TEX
documents. First, the MF files must be converted from METAFONT. This generates
ordinary TEX character sets (such as the CMR family) containing only one
character, being the letter A (Ascii 65). (This may be changed. See Section
3.1.4.) This letter contains the picture information.

For TEX to be able to use this character, this character set must be loaded
into the document somewhere near the beginning (with LATEX, preferably before
\begin{document}). One way of achieving this is by means of

\font\picture = test

where "test" represents the name of the particular font to be loaded. The
picture can then be inserted anywhere in the document with the command
{\picture A}.



5  FUTURE UPGRADES

If you have any ideas or suggestions for improving the program, just drop me a
line. You just might see your suggestion implemented in the next version.

There is a plan to circumvent the tedious roundabout procedure of converting
raster graphics via METAFONT, and changing them directly into GF or PK
character set files.

A version of EPIC for TEX implementation (CSG commands) by Chr. Strunk should
be ready soon.

If you want to know whether a new version is ready, just give me a call.



6  TEXDRAW ON OTHER PLATFORMS?

I am planning to develop a version of TEXDraw for MSDOS. But before starting,
I need to decide which graphic interface to use (MSWindows, GEM, or whatever
else).

I would appreciate it if MSDOS users would get in touch with me regarding this
idea. My commitment to the project will depend on their response.

Also, since my work on my Doctorate in Physics is taking up a lot of my
efforts, I am in no position to make any promises.



7  TIPS

(This section may not make perfect sense, since I didn't understand the German
text too well.)

There are, incidentally, some DVI drivers which understand particular line
commands. Examples include the drivers of the MSDOS version emTEX, or various
drivers in the UNIX world which support the TPIC standard. For these drivers
there is a modified EPIC file called emepic.sty or eepic.sty which can handle
the line output over exactly these \special commands.

The DVI files generated in this manner are usually shorter and give nicer
results. Still, they are not more device independent, perhaps due to the source
text, since the particular EPIC commands are the same.

In order to utilize the advantages of these drivers, you need only replace the
epic option by emepic or eepic with the \documentstyle command.



8  BUGS IN THE PROGRAM

No doubt there are still some lurking somewhere. I accept no responsibility for
any resulting damage. Use of the program is as per the Licencing Contract of
the Open Software Foundation (=GNU).

If you've identified a problem, or have any suggestions, don't hesitate to
contact me. My address is on page 7.



9  CREDIT WHERE CREDIT IS DUE...

I owe thanks to the following people:

Donald E. Knuth for TEX and METAFONT, Gregor Fritz for his original program
(without which I may never have gotten started), Martin Wunderli for his TT
testing, Lutz Birkhahn for his MEATFONT macros and file selector error, Peter
Hellinger for his MagicLib, Jens Decker for the METAFONT error, Karsten Sievert
for his error list, Stephan Gerle for the icon window error.

Whoever thinks his name should appear in the above list can count on me to
include it for a small fee.



10  THE SOURCE CODE

TEXDraw was originally developed with TDIModula2 and MagicTools by Peter
Hellinger. It has since been adapted for the new MegamaxM2 compiler. With
sufficient effort, it can also be adapted for C, etc. (Have fun, ha ha!) The
source code is available from me to registered users by sending in a diskette,
a (sufficiently) stamped, selfaddressed envelope, and an "honorarium" of 10
DM. Then I could sit back and wait for news of improvements to the program. If
they were good enough, we could announce them to the benefit and amazement of
all users. Note that MagicTools are not included with the package since this is
a commercially available product.



APPENDIX A   FORMAT OF THE TEXDRAW.INF FILE

The texdraw.inf file contains the basic paths for searching or saving files.
These paths should be tailored to your own system configuration.

The file as tailored to my own configuration is as follows:

(See table on page 25 of German text.)

The meaning of a given line is indicated by the keyword at the end of the line.

Important: Each line must start with a printed character rather than any
leading spaces, since these will cause errors! Do not change the order of the
lines!!



!! Any changes are at your own risk !!

Keyword    Meaning    Ext.    Mode

Meaning
Standard path for drawings
Standard path for LATEX source text
Standard path for PICTEX source text
Standard path for METAFONT source text
Standard path for GEMIMG pictures
Standard path for STAD pictures
Standard path for LATEX import
Standard path for HPGL import
Standard path for BGI vector fonts
Standard path for TEX character sets
Standard path for GEM Metafiles
Standard path for PostScript files
Standard path for Calamus graphics
Standard path for FIG graphics

(See table on page 26 of German text.)

You should avoid altering the resulting values directly. For this reason, no
further documentation is offered on them. They are chosen from the values
already in effect and saved with the System Defaults entry of the Options menu
(Save option active).

