Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
xtexcad(1) TeX Manual xtexcad(1)

xtexcad - drawing utility that produces LaTeX \picture environments

xtexcad [-toolkitoption...] [-option...] [file]

The xtexcad utility is for drawing graphics which is intended to be included into a LaTeX document. For this purpose the graphics is saved as a LaTeX \picture environment.
In order to produce correct input to LaTeX, the slopes of lines and the diameters of circles are restricted to those that LaTeX supports.

The following commands are available under the File menu:
Erase the current graphics completely and start a new drawing.
Load graphics from a file. This pops up a file selector and lets you choose a file. See FILE FORMAT on how the input file must be structured. A file which was saved by xtexcad can be read in again.
Save the graphics under the current file name, which is displayed in the title bar of the main window. If the graphics has not been saved in a file yet, the function is the same as Save As. An already existing file is backed-up by renaming it. The suffix .old is appended to the name of the backup file. The suffix can be changed with the resource backupSuffix.
Save As
Save the current graphics under a new file name. This pops up a file selector which lets you choose a file or specify a new file name. From now on, Save will save the graphics to the new file name.
Exit from xtexcad.

The following commands are available under the Edit menu:
This creates a copy of the currently selected item.
This deletes the currently selected item.
Edit Text
If the currently selected item is a text, a framed box text or a dashed box text, this pops up a dialog in which the text can be edited.
This refreshes the drawing area.

The Draw menu allows to select the drawing mode. The currently selected mode is indicated by a check mark.
The first entry, Pick, switches to the pick mode. This allows that already drawn items can be selected and modified. To select an item move the pointer over it and press the left mouse button. Currently, an item can be selected when the pointer is over its rectangular bounding box. Press the left mouse button repeatedly to cycle through the possible items for the current pointer position. (NOTE: To select a text you must carefully point at the anchor point of the text.)
When an item is selected, it can be modified by placing the pointer over the grips. To move the item, press the middle mouse button and drag the item to the desired new location. To change the size or direction of an object, press the left mouse button and drag the grip to the desired new location.
When drawing a Line or Vector, press the left mouse button to place the starting point of the line or vector. Then press the left mouse button again to place the end point. This is now the starting point of a new line. To finish the line, press the middle or right mouse button.
For a Bezier first place the starting point, then the end point, then the curvature of the curve using the left mouse button. Then start with the next bezier.
For the Framed Box Text and the Dashed Box Text place two opposite corners of the box. Then a popup appears where the text can be typed in and the alignment of the text within the box and the shadow style of the box can be selected. After pressing Ok or Cancel, draw the next box.
For a Text simply choose the location. Then a popup appears where the text can be entered and the alignment can be specified.
For a Circle Outline and a Filled Circle first specify the center, then the size.
For a Filled Rectangle and a Rounded Rectangle specify two opposite corners.

Pressing the Options button pops up a window containing several toggle buttons. With these, some features can be switched on and off (these features can also be controlled with X Resources):
Enable Grid
displays a grid when pressed. The distance between the grid points can be specified in the text entry below in units of \unitlength. The initial value of this text field can be controlled with the resource initGridDistance. Whether the grid is initially on is controlled by the resource initGrid.
Snap to Grid
When this option is enabled and the option Enable Grid is also selected, only restricted positions in the drawing area can be selected (only the grid points). See also the resource initGrid.
Unlimited Slopes and Unlimited Diameters
When these options are switched on, unlimited slopes for lines and vectors and unlimited diameters for discs and circles are allowed. Note, that output files produced with these options enabled will not be accepted by plain LaTeX. Normally, circles, discs, lines and vectors are precisely restricted to those available with usual LaTeX fonts. See also the resources initUnlimitedSlopes and initUnlimitedCircles.
switches on a ruler along the top and left edges of the drawing area with labels in multiples of \unitlength. See also the resource initRuler.
Cross Hair
switches on a cross hair which follows the pointer. See also the resource initCross.
Minimum Length
When this option is enabled, xtexcad obeys that a minimum length is required for slanted lines and vectors. The corresponding resource is initUnlimitedLengths.

When the Shift button is pressed, a window pops up with which the drawing can be shifted in the drawing area. There are 4 buttons with arrows for the 4 directions and a small button between them which centers the drawing. The amount how far to shift the drawing can be specified in the text entry field below the arrow buttons. The inital value in this field can be controlled by the resource initOffset where the value is understood in units of \unitlength.

When the Zoom button is pressed, a window pops up where the current zoom factor (as a percent value) can be specified. The factor is limited to the range 25 through 400. The inital zoom value can be controlled by the resource initZoomFactor. The button shows the current zoom factor. (The center button of the Shift popup is useful to place the drawing in the middle of the drawing area again.)

This program uses the X Toolkit and Athena widgets. The class name for the application is XTeXcad. It understands all of the core resource names and classes and all of the standard X Toolkit command line options. The following standard X Toolkit command line arguments are commonly used with xtexcad:
-fn font
This option specifies the font to be used for displaying text in buttons and menu entries as well as the text in the drawing area. The font used in the drawing area can selectivly be chosen with the application resource .font (class .Font).
-fg color, -bg color
This specifies the foreground and background colors of all of xtexcads windows. The foreground color of the drawing area can selectivly be chosen with the application resource .foreground (class .Foreground).
-geometry geometry
This option specifies the prefered size and position of the application window.
-display host:display
This option specifies the X server to contact.
In addition, the following application specific resources can be used to customize xtexcad:
.initOffset, class .InitOffset
specifies the initial value by which the image is shifted by the buttons in the Shift popup. Default is 10.0.
.initZoomFactor, class .InitZoomFactor
specifies the inital zoom factor. This value is restricted to the range 25 to 400). Default is 100.
.initGridDistance, class .InitGridDistance
specifies the initial distance of the grid points. Default is 10.0.
.rulerFont, class .Font
This resource specifies the font which will be used to draw the units on the ruler if it is displayed.
.defaultUnitLength, class .DefaultUnitLength
This specifies the default TeX dimension for the \unitlength of the saved picture. The value must be a floating point number, followed by one of the two-letter units of dimension as understood by TeX (regardless of the case): pt, cm, mm, pc, in, bp, dd, cc, sp, em (font-relative unit, roughly 10pt). It is highly recommended to chose sensible multiples of pt as default (for example 10pt, 2pt, or 0.5em) because all units are internally translated to pt and 1pt corresponds approximately to 1 screen pixel at zoom 100 (see also the BUGS section). Default is 1.0pt.
.backupSuffix, class .BackupSuffix
This string is appended to the name of backup files. Default is .old.
*filter, class *Filter
This resource gives the initial value for the file filter in the file selector widget used by the Load, Save and Save As commands. Default is *.
.initSnapGrid, class .InitSnapGrid
This resource specifies whether only selected points on the grid can be chosen. Default is off.
.initRuler, class .InitRuler
This resource specifies whether the ruler is initially drawn. Default is off.
.initGrid, class .InitRuler
This resource specifies whether the grid is initially drawn. Default is off.
.initCross, class .InitRuler
This resource specifies whether the cross is initially drawn. Default is off.
.initUnlimitedSlopes, class .InitUnlimited
This resource specifies whether lines and vectors with arbitrary slopes can be drawn. Default is false.
.initUnlimitedCircles, class .InitUnlimited
This resource specifies whether circles with arbitrary diameters can be drawn. Default is false.
.initUnlimitedLengths, class .InitUnlimited
This resource specifies whether very short lines and vectors can be drawn. Default is false.

xtexcad can read not only files saved by itself but also by other means, for example hand written files. For a file to be understood by xtexcad it must contain the following: Optionally, a \unitlength=TeX dimension command, a \begin{picture} phrase (without white space after \begin) with or without the optional argument, zero or more \put, \qbezier, or \bezier commands, and an \end{picture} phrase (without white space after \end). Everything before \begin{picture} (except \unitlength) and after \end{picture} is ignored. The \qbezier command can come with or without the optional argument. Its value, however, is ignored and will not be written to the file any more when the file is saved.
A file created by xtexcad always assigns a value to \unitlength. The whole file is inside a group (curly braces) so that this assignment is local. For a newly created file, the value of \unitlength will be taken from the resource defaultUnitLength whose default is 1.0pt. If a file is loaded in, which assigns a value to \unitlength, this value will be preserved. This means that if you find that the picture is too large or too small for the LaTeX document, you can manually scale it by editing the \unitlength in the resulting file. If you later edit the file with xtexcad, it will not destroy this change, and the picture will appear scaled accordingly in the drawing area of xtexcad, since 1pt corresponds to 1 screen pixel (at zoom 100).

Leslie Lamport: LaTeX: A Document Preparation System, Goossens et al.: The LaTeX companion.

Modifying objects lacks some features like cross hair. It is also very unfriendly with servers that do not support backingstore. The grips should be transparent.
The shadow style is currently ignored.
Some aspects (the shadow-part of the text placement popup) may not work when linked with X11R4 libraries because the Toggle widget changed its behavior from R4 to R5.
The optional argument of the \qbezier command is ignored and does not get saved to the file when a picture is loaded and saved later.
Redrawing after modifying an item is worse than bad.
Internally, all units are translated to TeX points (pt), and 1 screen pixel (at zoom 100) is taken to be approximately 1pt. However, this may result in rounding and positioning errors if \unitlength is not a proper multiple of 1pt.
Sometimes, especially when drawing very short lines, it is possible to produce unsupported LaTeX-slopes of lines and vectors. Working with a large zoom factor helps. Also, for some \unitlengths the minimum line length computed is too short.

Copyright 1991 by Klaus Zitzmann, 1993-1996 by Johannes Sixt. The file selection widget is copyrighted by J.K.Wight <> which itself uses code written by Byron Rakitzis <> (the regexp package).

Klaus Zitzmann <> wrote TeXcad 1.2.
Johannes Sixt <> rewrote much of that version and produced this version of XTeXcad. Most of the changes from 2.3 to 2.4 are due to Notker Amann <>.
2000-October-01 Contributed Software

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.