 
  Help for draw2latex
 
 
This is version 1 of draw2latex, 19101998.
Copyright Richard Atterer.
This program is Free Software  see the file Copying for details.


draw2latex translates drawfiles into commands for LaTeXs picture environment. Because of the various limitations of that environment and also because draw2latex isnt very sophisticated, the result can sometimes look poor. However, this utility isnt intended to convert any drawfile, rather it should be used to convert drawfiles which have been specifically designed for it.

The syntax is:

  draw2latex [-shortline] [-origin] <DrawFile> [<DrawFile> ...]

The filename for the resulting LaTeX file is created by appending /tex to the name of the drawfile. The command line switches have the following meaning:

-shortline

With the picture environment there is a minimum for the length of diagonal lines; they must be as long as or longer than a line of that angle that fits into a 10pt by 10pt square. This option influences the behaviour of draw2latex upon encountering a line thats too short: Normally, the line is made longer (in both directions) so that it is just long enough. If the -shortline switch is present, a \qbezier command is used instead, which allows for short lines, but requires more of TeXs memory.

-origin

If this switch is not present, the coordinate (0,0) of the picture environment is at the left lower corner of the global bounding box of the drawfile, which is usually what you want. If -origin is present, (0,0) is the lower left corner of the drawfile.


Note: There are 72.27 TeX points to the inch whereas RiscOS uses a value of 72. draw2latex does NOT take this into account, it assumes TeX points and RiscOS points are the same, so that if an inch grid is used in Draw, the LaTeX output will have nicer-looking numbers.



draw2latex can handle the following elements of a drawfile:

Horizontal and vertical lines of any length

The utility only distinguishes between thin and thick lines, the colour and joint type is ignored.

Diagonal lines

As outlined above, there is a minimum length for diagonal lines. There is also a restriction with regard to the possible angles a line can have: The angle is described with a vector (x,y), where x and y are whole numbers in the range [-6..6] If a line in the drawfile does not fit to one of the possible angles, it is rotated about its centre a little.

Bezirs

Draw uses cubic bezir curves, in contrast to the picture environment which only supports quadratic bezirs. The curves of a drawfile could be approximated with several quadratic bezirs, but this is not supported at present. A quadratic curve is output if the two control points of the input curve are the same. (The two curves wont look the same, though.)

Lines with arrowheads

A line can have an arrowhead at the beginning and/or end. Different sizes are not supported, except that the size differs between thin and thick lines. LaTeX offers a \vector command for this, but draw2latex always outputs a normal line followed by a vector of zero length. This is necessary because \vector allows even fewer different angles than \line. Additionally, the end of a vectors line overstrikes the tip of the arrowhead, which doesnt look nice.
LaTeX outputs a warning for diagonal vectors of zero length.

Boxes

Four lines forming a box are turned into one \framebox. Moreover, if you group a box and a text label object, the output is one \framebox with the text centered.

Text labels

If you use Trinity, Homerton or Corpus for the font, the corresponding TeX font (\rmfamily, \sffamily or \ttfamily) is selected, together with any bold or oblique/italic variants (\itshape or \slshape, \bfseries). For any other font, no extra commands are inserted. The text size is ignored, but you can alter it with a LaTeX command in the label text.

Circles

The support for circles is VERY basic. draw2latex will probably take many objects for circles which dont even remotely look like circles. Note that there is a maximum for the size of circles.

Text areas

The actual text of a text area is ignored. However, text areas can contain comments on lines beginning with \;, and draw2latex will copy anything following the \; to the LaTeX output verbatim. It will also substitute #1 to #8 with the following values:
  #1/#2 = x/y of lower left corner of the text area
  #3/#4 = x/y of upper right corner of the text area
  #5/#6 = width/height
  #7/#8 = x/y of centre of rectangle
All values are in points.


  __   _
  |_) /|  Richard Atterer
  | \/|  atterer@augsburg.baynet.de
   ` 

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3ia

mQCNAzLUINUAAAEEAK2wIzS3h7Xb4fObNGn3uOS1dlccglwzcHFvk6zbJVOgwtpQ
ze3/UKgWj5jUD3debI4rYpLHRRFnYmISMy8G0ZeOLiBv80nu7BMTwgPi7Ds7HRha
OuMvcZStRA2Y0Y/OCRwdbQeo6iMcO8NE1NC3Qi/tRmZrhQZlEir3OzAzCay9AAUR
tCxSaWNoYXJkIEF0dGVyZXIgPGF0dGVyZXJAYXVnc2J1cmcuYmF5bmV0LmRlPokA
lQIFEDUUJOAq9zswMwmsvQEBso4D/iiTHTi6pHKtNjuukk12p+4UB7UT4K67yrZO
TvwfmwxPJpxmItPnyW+H6OYa8vXAhiFA3GdeM1rTV9kRQnL20iJWk1dC6uVfb0Yo
Z19MeuE5P0bke+tBF5L0GhyfRlG9gm74XiUErmqVtz8p6Q6y9ejOqzWdePaAxXGG
zNtx1PDItDNSaWNoYXJkIEF0dGVyZXIgPGF0dGVyZXJAaW5mb3JtYXRpay50dS1t
dWVuY2hlbi5kZT6JAJUCBRA1FCNnKvc7MDMJrL0BAf+QBACMElzSwT+rBRaTy7tM
MBoHNnxsu10WgBn4haxZMY8XAdkp+iNNQ7zONpH65kmYjK/PRUPtDO7IDKS4hnqQ
f2eDB70YDhzXUEA68GZFnnzajgH4JXSQopPtmLV7+LiT6wqwU8QLiH5DY7i/QlXQ
QMgu7w4cbNliMu+8PlbB6RT1cg==
=g9Og
-----END PGP PUBLIC KEY BLOCK-----
