summaryrefslogtreecommitdiff
path: root/lib/xcircuit.1.in
blob: e194a0df84c0a9e3b31e83b00fda9478d21b8f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
.TH XCircuit 1 "January 5, 2000" "X11R6"
.SH NAME
xcircuit - Draw circuit schematics or almost anything; make
circuit netlists from schematics.
.SH SYNOPSIS
.B xcircuit [\fIfilename\fP[,...]] 
.SH DESCRIPTION
The program xcircuit is a generic drawing program tailored
especially for making publication-quality renderings of 
circuit diagrams (hence the name).  The output is pure
PostScript, and the graphical interface attempts to maintain
as much consistency as possible between the X11 window
rendering and the final printer output.
.sp
\fIxcircuit\fP is mouse, menu, and keyboard\-driven, with the emphasis
on single-character keyboard macros.
.SH OPTIONS
.TP 8
.B \fIfilename\fP[,...]
Begin running xcircuit by loading in the PostScript file
filename.  If filename does not have a .ps extension,
xcircuit will attempt to look for both the filename
as entered and, upon failure, with the .ps extension.
The file must be in xcircuit format.  \fIfilename\fP
may also be a comma-separated list of files.

.SH BASIC ELEMENTS
There are five drawing elements.  These are as follows:  
.TP 3
.B a)
polygon (multiple lines which may or may not be closed and filled)
.TP 3
.B b)
arc (ellipse segment which may be closed and/or filled as above)
.TP 3
.B c)
label (any text)
.TP 3
.B d)
curve (based on the PostScript "curveto" algorithm)
.TP 3
.B e)
object instance (see below)
.PP
There are two composite elements, which are:
.TP 3
.B f)
path (a connected series of polygons, arcs, and curves)
.TP 3
.B g)
object (something containing polygons, arcs, labels, 
curves, paths, and instances of other objects)

.SH MOUSE BUTTONS
The mouse button system, the object library, and the paged buffer
system are loosely based on the
Caltech circuit-simulation program "log" (either "analog" or "diglog").
.sp
The general idea is to make the most commonly-used functions the
easiest to perform, and (to the extent possible) to scale (inversely)
the complexity of performing a function with the frequency of that task.
Because this program is tailored to circuit drawing, the most common
functions are drawing lines and moving object instances.  The next most
common function is selection of elements singly or in groups.
.sp
Mouse button 1 can be tapped to start a connected chain of lines, the
most common drawing function.  In addition, button 1
has a function called "grab", which occurs after the button has
been continually pressed for a short length of time (about 1/5 second).
As the name implies, "grab" grabs hold of an element which can then
be moved around the screen.
.sp
Button 2 can be used to select an item if tapped, and if pressed
and held down, a box will be drawn and everything inside that box
selected when the button is released.  In all other cases, button 2
will complete a command.  For users who have only two mouse buttons
and do not emulate the middle mouse button with the combination of
buttons 1 and 3, use the combination of the Shift key and mouse
button 1 to emulate mouse button 2.
.sp
Button 3 will normally abort a command.  During editing of an arc,
spline, or polygon, button 3 will revert back to the previous form,
or abort if there is no remaining edit history.
.sp
All other commands are 
available from the pulldown menus and/or from the keyboard using
single-key macros (with easy-to-remember mnemonics).
Keyboard commands are quicker, since they act on the present cursor
position, whereas menu commands require an extra step.

.SH BUILT-IN LIBRARY
The library is intended to provide a convenient way to store and
retrieve elements of a picture which will be used more than once.
For the application of circuit drawing, a built-in library provides
basic objects such as transistors, amplifiers, resistors, capacitors,
arrows, circles, power and ground symbols, and the like.  This file
is a composite of several library files (such as "builtins.lps",
"analog.lps", and "digital.lps") which are called by the startup
script
PYTHON ("xcstartup.py")
TCL ("xcstartup.tcl")
NOINTERP ("startup.script")
The program first looks for the startup script in
the current directory, and then searches in the directory given by
the environment variable "XCIRCUIT_LIB_DIR", and finally, in the
hard-coded global directory (LIBDIR) if it could not find it elsewhere.
Thus each user can add to or modify the file of builtins to reflect
personal taste.  Since the PostScript output contains all object
definitions, these changes to the built-in functions are inherently
transferrable.  Xcircuit will automatically resolve conflicts between
objects having the same name but different contents.
.sp
The library is accesible from the pull-down menu or with the "l"
keyboard macro.  When inside the library, clicking the first mouse
button on an object "grabs" that object and returns the graphics
state immediately to the page being edited, so that the object
will be placed when the mouse button is released.

.SH ZOOMING
Xcircuit has unconstrained zooming and snap-to positioning.  Objects
scale completely:  line widths and text sizes will increase/decrease
proportionally with the zoom, as well as dot/dash spacing and all
other features.  Xcircuit does have a minimum integer grid in
coordinate space, which translates to 0.005 inches at an output scale
of 1.  The maximum zoom scale gives a screen size translating to
about 100 by 100 inches at an output scale of 1.  The effective
scale can be varied by changing the output scale (reached from the
"File/Write" menu selection) in order to fit a drawing to a page or
to get a grid matched to a specific dimension.  A separate scale
parameter changes the scale of the reported position relative to
the output scale (as it will appear on a printed page).

.SH SNAP-TO GRID
The snap-to grid is an all-important feature for circuit drawing,
wherein it is critical that elements line up properly with one another.
In \fIxcircuit\fP, there is no way to get off the snap-to grid except by
turning the snap function off and physically pushing elements off
the grid.  Generally, it is most convenient to leave the snap function
on and use key macros "+" and "-" to double/halve it as necessary.
In any case, objects can always be returned to the snap grid with
the "snap" function (key macro "S").

.SH SELECTION MECHANISM
Objects are selected using a variety of search methods.  The
select box (formed by holding down mouse button 2 and dragging
the pointer) uses the simplest method, searching for
curve/polygon segment endpoints, arc centers, and label
and object bounding boxes falling within the select box frame.
General object selection is more complicated.  Polygons, Arcs,
and Curves are selected by their outer edges, not the interiors.
Currently this is also true for filled instances of those types.
A line is selected if the pointer is in a
region describing a box around it, which is adusted according
to the scale (zoom factor).  Every object has an
associated bounding box, which is rectangular but may be rotated
with respect to the top level window.  An object instance is
selected if the pointer falls within its bounding box.  Each
label also has a bounding box carefully calculated from the width
of the text string.
.sp
Often the selection mechanism will find multiple elements in
range of the pointer.  In this case, each object in turn will be
presented, colored in blue (or the specified "querycolor" in the
defaults file), and the user has the option of accepting the 
highlighted element for selection using the mouse button 1, or
rejecting it with mouse button 3.  When all the elements under
consideration have been accepted or rejected, the program
proceeds to execute whatever function was in progress.  This
selection method takes a little while to get used to, but is
sensible and seems to work well.

.SH COLOR
Color in xcircuit is implemented with the idea of "color inheritance".
Every page has a "default color" of black.  All elements which have
color value "Inherit" will inherit the default color, black.  If an
object instance is painted blue (for instance), all components in
that object which have color value "Inherit" will inherit its color,
blue.  The reason for this is that it allows different object
instances to be painted different colors (such as if one part of
a circuit is highlighted for emphasis), while making it possible for
object instances to be multicolored, if necessary.  Changing the
color of an object instance will have no observable effect on the 
drawing if none of the components of the object inherit that color.
An object may have both normally colored components and components
which inherit their color, in which case only those components with
the "Inherit" value will change color when the color of the object
instance is changed.

.SH SCHEMATIC CAPTURE
XCircuit implements a sophisticated schematic capture.  Unlike
virtually all schematic capture software currently available,
xcircuit allows the designer to draw the circuit in a "natural"
way, making use both of schematic hierarchies and simple
hierarchies created simply by grouping elements together.  If
the chosen netlist format is hierarchical (like SPICE), both
hierarchical forms will be retained in the output.  For element
grouping, input/output ports connecting into to the group will
be determined automatically, from context.  A schematic capture
tutorial is available from the xcircuit website,
.br
http://opencircuitdesign.com/xcircuit/tutorial/tutorial2.html.
.br

Netlist types currently available are "SPICE", "sim", and "PCB".

.SH KEYBOARD COMMANDS
.br
.PP
\fBBasic keyboard commands:\fP
.TP 12
.B Z
Zoom in by a factor of 3/2.  If this key is pressed while a
selection box is active (created with the middle mouse
button), then acts like Zoom Box function.
.TP 12
.B z
Zoom out by a factor of 3/2.
.TP 12
.B p
Pan the screen so that the point under the mouse is brought
to the center of the program window.  This function can also
be conveniently performed by clicking on the scrollbars.
The scrollbars cannot be moved continuously due to the slow
time for screen refresh.
.TP 12
.B cursors
The arrow keys perform a pan of one-half window size in the
direction of the arrow pressed.
.TP 12
.B l
Go to the Library of built-in objects.  From the library,
use mouse button1 to grab an object and bring it back to
the edit screen, or button3 to return without selecting 
an object instance.  While in the library screen, the
zoom and pan functions can be used to move around.
.TP 12
.B >
Push into an on-screen object in order to edit that object
.TP 12
.B <
Return from editing an object.  Object pushes and pops can
be stacked indefinitely.
.TP 12
.B space
Refresh the screen.
.TP 12
.B digits 0-9
Switch to one of the first ten editing pages.  Pages greater
than 10 can be reached from the "Window/Goto Page" menu
selection.
.TP 12
.B + and -
Change snap-to grid spacing by a factor of two up or down.
.TP 12
.B | : and _
(Bar, colon, and underline) Change style on the currently
selected object to dashed, dotted, and solid, respectively.
.TP 12
.B h or ?
Print a help page summary of commands
.PP
.sp
\fBCommands to create elements:\fP
.TP 4
.B a
Arc.  Center is fixed at the initial position of the cursor.
The mouse position changes the radius of the circle.
In snap-to mode the arc boundary will pass through the snap point
closest to the cursor.  Mouse button 1 cycles from controlling
the radius to controlling the starting point, the ending point,
and separately controlling the minor axis to create ellipse.
Mouse button 2 completes the arc.
.TP 4
.B b
Box.  This is a convenience function for generating rectangular
closed polygons.  Creates a rectangle with one corner fixed at
the position of the cursor.  Subsequent movement of the cursor
defines the point diametrically opposed.  Mouse buttons 1 or 2
complete the box.
.TP 4
.B s
Spline curve.  The first endpoint is defined by the initial cursor
position.  Mouse position adjusts the other endpoint of the curve.
Mouse button 1 cycles from controlling position of the endpoint
to controlling positions of the curve control points and the curve
starting point.  Mouse button 2 completes the curve.
.TP 4
.B t
Text.  Text starts out justified according to the styles chosen
in the pull-down menu.  Text can be rejustified using the menu
or by typing the numbers on the keypad (\fBshift-keypad-1\fP through
\fBshift-keypad-9\fP).  The position of the keys on the keypad
matches the justification.  Subscripts, superscripts, font
changes, text size changes, underlining, and overlining are all
available from the pull-down menu.  Text edit mode recognizes
\fBHome\fP and \fBEnd\fP keys to move to the beginning and end
of the string, respectively.  If the X11 environment maps
control key sequences to character encodings (such as ISO-Latin1),
these may be used to insert non-ASCII text.  Another method of
inserting non-ASCII characters is the use of the backslash
character, which duplicates the action of the
Text/Insert/Character menu button.
.TP 4
.B M, m
Make object.  Takes all the elements currently selected and
compiles them into an object.  The object is then placed in the
user library.  The elements just selected are deleted from the
screen and replaced by the new object.  The center point of the
resulting object is chosen as the closest snap-to point to the
center of the object's bounding box;  if another center is desired,
then the object can be edited using the ">" command and its contents
moved with respect to its origin.  \fINote:\fP  Objects cannot have
the same name as PostScript commands or have the same name as any
other object in memory.  If such a name is found, an underscore ("_")
will be prepended to the name as many times as is necessary to
differentiate it from all other known objects.
The name also cannot contain special PostScript characters such as
slash; any such characters found will be replaced with underscores.
.sp
.PP
\fBMajor editing commands:\fP
.TP 4
.B d
Delete.  Select the nearest element or elements and delete it/them.
.TP 4
.B u
Undelete.  Xcircuit saves up to 10 delete events to be recovered.
Delete events are stored in order of occurrence, and the most
recent delete event is the first to be recovered.
When multiple elements are deleted at the same time, all of them
are stored as one delete event, and restored together.
.TP 4
.B x
Deselect. Elements which have been selected can be deselected on
a per-item basis.  In order not to be too confusing, deselect does
not query if multiple items are found under the cursor; it just
deselects them all.
.TP 4
.B c
Copy.  Make a copy of the object(s) nearest the cursor.  Object
is automatically grabbed for moving to a new position.  The 
next button1 or button2 press will place the element.  Button2
will end the copy, and button1 will continue the copy function.
.TP 4
.B e
Edit.  The action of Edit is dependent on the type of element
selected.  These are detailed below:
.TP 12
.B Label
Returns to text editing mode, starting with the cursor
at the end of the string.  Mode is like regular text entry
except that Button 3 returns text to its original string.
.TP 12
.B Polygon
Grabs one point of a polygon for repositioning.  Button 1 cycles
between points, button 2 accepts the new polygon, and button 3
returns to the previous state, unless there is no remaining edit
history, in which case it aborts the command.
Key macros available during polygon edit are:
.sp
"x"---Breaks the polygon at the given point.
.sp
"e"---Moves edit position to the next point.
.sp
"i" or "Insert"---Inserts a new point at the position.
.sp
"d" or "Delete"---Deletes the current edit point.
.sp
There are four modes for polygon editing; see the
"\fBPolygon Edit\fP" section below for details.
.TP 12
.B Arc
Allows resizing of the radius.  Mouse button 1 or the "e" key
will cycle between control of the radius, the endpoint angles,
and the ellipse minor axis.  Mouse button 2 accepts the new
arc.  Button 3 returns to the previous editing state,
unless there is no remaining edit history, in which case it
aborts the command.
.TP 12
.B Curve
Allows repositioning of one end of the curve.
Originally, the starting angle of the curve is kept fixed.
Mouse button 1 or the "e" key cycles between the four
control points of the curve, allowing control over the
angle of the curve at its endpoint and the shape of the
curve.  Mouse button 2 accepts the new curve.  Button 3
reverts back to the previous edit state
unless there is no remaining edit history, in which case
it terminates the command.
.TP 12
.B Object instance
Object instances have no properties to change
except scale, and do not respond to the "edit" command.
Scale can be changed by selecting "Options/Other/Object Size"
from the menu.
.sp
.PP
\fBMinor editing commands:\fP
.TP 4
.B R
Rotate the selected element(s) or element under the cursor
counterclockwise in 15 degree intervals.
.TP 4
.B r
Rotate the selected element(s) or element under the cursor
clockwise in 15 degree intervals.
.TP 4
.B O
Rotate the selected element(s) or element under the cursor
counterclockwise by 5 degree intervals.  This is currently
the smallest angle resolution available to xcircuit.
.TP 4
.B o
Rotate the selected element(s) or element under the cursor
clockwise by 5 degree intervals.
.TP 4
.B f
Flip an element around a vertical axis defined by an object's
origin for an object instance, or across an axis defined by
the pointer position for arcs, polygons, and curves.
.TP 4
.B F
Flip an element around a horizontal axis defined
similarly to the "f" command.
.TP 4
.B X
If two elements are selected, their order is exchanged
(this is only relevant if one element occludes another).
If one element is selected, it is raised up one in the
stack, and if it is already on top of the stack, it is
shuffled to the bottom.
.TP 4
.B S
Snap the nearest object to the snap-to grid.  For
curves the control and endpoints are snapped; for polygons, each
point is snapped; for arcs, the centerpoint is snapped; for labels
and object instances, the designated point of origin is snapped.
.TP 4
.B j
Join polygons together.  This only makes sense if it is possible
to make a single continuous (open or closed) polygon from the
selected parts.  Otherwise a warning will be posted and the parts
will remain separate.
.TP 4
.B A
Attach an element to a polygon, arc, or curve.
The element to be attached must be the one currently grabbed
(either by a "drag", copy command, or edit command).
Until it is released, it will be forced to align
its center (object, arc), endpoint (polygon, curve), or
position (label) with the closest polygon, arc, or curve.
Note that this is a very powerful tool for generating, for
example, lines tangent to a curve, or objects arranged in
a circle or along a line.
.sp
.PP
\fBLibrary editing commands:\fP
.TP 4
.B D
Delete.  The selected objects will be deleted from the library
unless other library objects or pages contain references to that
object.  \fBNote:\fP Unlike deleting object instances with the
"\fBd\fP" command, this command deletes the actual object and
releases all memory associated with that object, so the
object cannot be undeleted.
.TP 4
.B C
Copy.  Makes a copy of an object from either library page and
places the new copy in the user library.  The new object will
be renamed to avoid naming conflicts.
.TP 4
.B M
Move.  If one object has been selected, it is moved to the
position of the cursor.  If two objects have been selected,
their positions in the library are exchanged.
.TP 4
.B E
Edit label.  Edit the object name whose label is under the
cursor.  After editing, the object name will be checked for
conflicts with other object names, and altered if necessary.
.TP 4
.B H
Hide object.  If the object is a sub-instance of another object,
but is not meant to be used by itself, it can be "hidden" so
that it will not appear by itself on the library page.
.sp
.SH MENU COMMANDS
.sp
.TP 4
.B Write Postscript (W)
This command brings up a popup menu with a number of options.
First, it gives the name of the file if one exists, or else it
gives the default name of the buffer (usually \fBPage\fP \fIn\fP,
where \fIn\fP is the number of the buffer).
Next, it gives a preview of the picture scale and output
styles, which include Landscape/Portrait orientation and
Encapulated/Unencapsulated (full page) PostScript modes.
The former allows adjustment of the nominal size of the picture
when drawn in PostScript.  The default scale is 1.00, which
makes the text scale of 1.0 about 14 points on the PostScript
page.  The width and height of the resulting 
picture are also given, in inches, and any of the three
values can be changed.  The values of the other two will
be updated accordingly.  Pages which have the same name
will be grouped together into a single file, allowing
multiple pages to be stored in the same PostScript file.
However, as Encapsulated PostScript does not make sense
for this kind of file, it is not an option.
.sp
The \fBWrite File\fP button writes the current page to an
output file.  If the page has a name other than the default,
the file will automatically be saved under that name.  Otherwise,
it is necessary to change the name of the buffer.  If a file of
that name already exists on the disk, the button will read
\fBOverwrite File\fP.
.TP 4
.B Read PostScript
Reads in a file of Xcircuit format.  The
file name is requested by a popup prompt, and an extension
of ".ps" will be added if necessary.  The file is read
into the current page, which is cleared first if anything
is in it.  If the file is a multiple-page file, the current
page will be overwritten with the first page from the file,
but other pages will be loaded into empty buffers.
LGF Xcircuit can also read "lgf"-format files from
LGF the Chipmunk CAD tools programs "analog" and "diglog".
.TP 4
.B Import PostScript
Acts like "Read PostScript" except that the page is not
reset first, so graphics are added on top of existing
graphics on the page.
.TP 4
.B Clear Page
Clears the current page of all elements and resets the
name.  The contents cannot be recovered.
.TP 4
.B Alt Color
Switches between the two xcircuit color schemes.  The
color schemes can be redefined through XDefaults
(see below).  The default color schemes are black-on-white
and white-on-black.  The latter is less straining to the
eyes, but the former matches the black ink on white paper
PostScript output.  Any color scheme other than black-on-white
is not recommended for drawings with color, as the actual
output does not match the observed xcircuit screen.
.TP 4
.B Grid
Turns the grid lines on and off.
.TP 4
.B Axes
Turns the axis lines on and off.  The axes mark the 
origin (0,0) of the page.  On the top level (TopObject),
the origin has no particular relevance, since encapsulated
output will define its own boundaries, and full-page
(unencapsulated) output will be centered on the output
page, not according to the Xcircuit coordinate system.
.TP 4
.B Grid spacing
Changes the spacing of the grid lines.
Default spacing is 1/6 inch, which is about
the width of the letter 'W' in default text scale.
.TP 4
.B Grid type/display
This is a submenu allowing the coordinates and coordinate
grid to be specified in alternate units.  Listing of 
coordinates in the top window can be in default fractional
inches, decimal inches, or centimeters.  Default spacing
of grid lines is either one-quarter inch or one-half
centimeter.  Selecting an A:B scale With option
"\fBDrawing Scale\fP" causes all listed coordinates to be
multiplied by the scale.  \fINote:\fP Xcircuit will make
an attempt to keep objects on the snap/grid spacing when
switching between inch and centimeter scales.  In order
to do this, it will change the output scale by the ratio
of 2.54 to 2.5, thus keeping a closer correspondence between
inches and centimeters.  To get true centimeters on the
output page, the output scale (from the "File/Write Xcircuit PS")
can be reset to 1.0 at the expense of having all objects
intended for the inch grid displaced off of the snap grid.
.TP 4
.B Snap-to
Turns the snap-to grid on and off.  When the grid
is on, movement and placement of elements is restricted
to points on the snap-to grid.
.TP 4
.B Snap spacing
Determines the spacing of the points in the
snap-to grid.  Default is 1/12 inch, which is half
the grid line spacing.
.TP 4
.B Linewidth
Controls the default linewidth against which
all linewidths in the drawing are scaled.
.TP 4
.B Polygon Edit
The options in this submenu control how the position of
lines are affected when a point in a polygon is selected
for editing.  "\fBRhomboid-X\fP" mode moves adjoining
points as necessary to keep all horizontal lines horizontal;
"\fBRhomboid-Y\fP" mode acts similarly to keep all vertical
lines vertical.  "\fBRhomboid-A\fP" is similar to Manhattan
mode but also tracks non-Manhattan lines.
The default mode is "\fBManhattan Box Edit\fP",
which is a combination of Rhomboid-X and Rhomboid-Y.  In
"\fBNormal\fP" mode, only the point being edited can be moved.
.TP 4
.B \fPArc/Box/Curve\fB Border
The options under this menu determine the
border style of arcs, polygons, and curves.  If an element
is selected, it will be modified;  otherwise, if
no objects are selected, the style chosen is made
default for all subsequent arcs, polygons, and curves.
Elements may be drawn with or without borders (but
for obvious reasons cannot be made both borderless
and unfilled, which would be invisible)
The borders may be closed or unclosed.  For an arc,
closed means that a chord is drawn connecting the two
endpoints, if the beginning and ending angles do not
complete a full circle.  Borders may be solid, dashed,
dotted, and of varying width.
.TP 4
.B \fPArc/Box/Curve\fB Fill
The options under this menu determine the
fill style of arcs, polygons, and curves.  
Fill style may be solid, empty, or one of 7 stipple
patterns varying from light to dark, which are drawn
both in xcircuit and PostScript as stipple patterns.
Stipples can be transparent or opaque.
\fIWarning\fP:  Transparent
stipples are NOT inherent to PostScript and the hacks
necessary to implement them cause slow rendering on
a printer or PostScript previewer.  Due to the
device-dependent nature of the routines, patterns
will look abnormally large on PostScript previewers.
This transparency feature has been added with the
expectation that most circuit schematics will not
rely heavily upon halftoning.  Complicated color
patterns can be created using transparent colored,
stippled elements on top of solid-color elements. 
\fINote\fP: Ordering of elements is according to
order created.  A different ordering can be achieved
using the "\fBX\fP" (exchange) command.  This method
is not especially easy to work with, and hopefully
something better will be implemented in the future.
.TP 4
.B \fPArc/Box/Curve\fB Color
See the COLOR section above for a discussion of color
inheritance.  This menu shows all the colors available
to xcircuit with the option of adding more colors.
Currently the entry style for colors is by name or by
RGB content in the X11 style of #rrggbb where rr, gg,
and bb are hex values ranging from 00 to FF.  The only
limit to the number of colors is the X Server's colormap
depth.  If the colormap is full, xcircuit attempts to
allocate the closest possible color to the one requested.
.TP 4
.B Zoom Box
This zoom feature requests the user to create a box
(using either mouse button 1 or 2, expanding the box
while holding down the button).  When the button is
released, the view will zoom to the area of that box.
.TP 4
.B Full View
This zoom feature calculates the bounding box
of the entire picture and adjusts the scale to make
it fit comfortably inside the program window.
.SH TEXT FEATURES
Xcircuit's ability to handle text is arguably the
most complicated part of the program, and also of
the PostScript output.  Careful attention to text
justification and style is the key to a good drawing.
.TP 4
.B Text Size
Alters the size of the labels.  The value is
a scale, with a default of 1.0 which translates to
14 points on the PostScript page if the default page
scale of 1 is used.  If a label is selected, only that
label is affected.  If a label is being edited, scale
changes starting at the edit position.  Otherwise, it
becomes the default size for all subsequent labels.  Size
affects the entire text string.  Text size can be changed
anywhere inside of a string.  However, text sizes inside
a string are all given relative to the label size, not as
an absolute point size.  Sizes of subscripts and superscripts
are given relative to the natural size of the subscript or
superscript (2/3 the size of the text for which it is a
modifier).
.TP 4
.B \fPText\fB Font
Standard printer fonts Times-Roman, Helvetica,
Courier, and Symbol, are readily available.
"User-defined" fonts can also be added; however,
support is currently limited, and requires a font
object (.lps) file and encoding (.xfe) file,
examples of which are found in the fonts subdirectory
of the xcircuit library directory.
.TP 4
.B \fPText\fB Style
Four standard font styles are available, 
matching the standard printer font variations:  Normal,
Italic (or oblique), Bold, and BoldItalic.
PostScript matrix manipulation allows slanted versions
of any font, such as Symbol, for which none is otherwise
available.
.TP 4
.B \fPText\fB Insert
The Insert menu allows insertion of special characters 
which are otherwise not (necessarily) allowed from the
keyboard.  These include tab-stop, tab-forward, tab-backward,
kern, half-space, quarter-space, and "Character".  The latter
option brings up a page showing the 256-character encoding
vector for the font, allowing point-and-click entry of any
character in the font.  "Kern" instructions allow characters
to be offset vertically or horizontally relative to the rest
of the text.
.TP 4
.B \fPText\fB Encoding
Two standard font encodings are available by default,
Standard (Adobe) Encoding, and ISO-Latin1 encoding.
ISO-Latin2 and ISO-Latin5 encodings exist in the
library directory, but require the use of the program
"ogonkify" (not included) to produce correct output on
a printer.
.TP 4
.B Super and Subscripts
Superscript and subscript are
designed to closely match those in TeX output, though
they lack the proper context-dependent kerning and
other fancy features of TeX.  A superscript following
a subscript results in a superscripted subscript.
To get a superscript on top of a subscript, use the
backspace character (see below).
The Normalscript style is the way to get
out of a sub or superscript and return to the normal
size and position.
Quick super/sub/normalscripting is available from the
keypad with the "\fB+\fP" (plus), "\fB-\fP" (minus),
and "\fBEnter\fP" keys, respectively.
.TP 4
.B Overline and Underline
Overlining and underlining styles
remain in effect until the next occurrence of a style
or font change.  Overlining is
lower if all the characters are lowercase and do not
include the "tall" lowercase characters.  Overlining
or underlining can be stopped at any time using the No
Line style.  Over and Underlining is *always* preferable
to using a line.  PostScript will adjust the over or
underline to the text size and extent and actually grab
the "_" character and compute its thickness in order to
draw the line.
.TP 4
.B Tabbing
From version 2.3, xcircuit allows embedded tab stops.
Tab stops must be defined before using tab-forward or
tab-backward.  The "Tab" keyboard key inserts an
embedded tab-forward instruction into a label.  Tab-stop
and tab-backward can be inserted using the Text->Insert
menu.  A tab-forward instruction moves the cursor
to the first defined tab stop forward of the current
position.  A tab-backward instruction moves the cursor
to the first defined tab stop backward of the current
position.  If no appropriate tab stop exists, the
instruction has no effect.
.TP 4
.B Backspace
The use of the backspace character is deprecated from
xcircuit version 2.3.  The effect of an embedded backspace
is more reliably produced using tab-stop and tab-backward.
.TP 4
.B Halfspace and Quarterspace
These options allow fine control over spacing, particularly
useful when writing equations.
.TP 4
.B Justification
Text justification always starts with the
default, chosen from the options in the menu, but may
be changed at any time using the numbers on the keypad.
The position of the keys on the keypad reflect the
point of justification: 1, 4, and 7 are right-justified,
7, 8, and 9 are bottom justified, 5 is centered in both
directions.  Since the letters drawn by xcircuit are
optimized for the Helvetica font, correct justification
is the main way to get text to come out on the PostScript
page in the desired way, relative to objects or boxes or
whatever.
.SH .XCIRCUITRC FILE
Certain parameters of the xcircuit program can be
initialized from a file called \fB.xcircuitrc\fP, which
is first searched for in the current directory, and then
in the user's home directory as defined by the environment
variable $HOME.
PYTHON The XCircuitrc file is written in
PYTHON Python (see www.python.org), with certain commands whose
PYTHON main purpose is to transfer data structures between
PYTHON the Python interpreter and XCircuit.
PYTHON These commands are as follows:
PYTHON .TP 6
PYTHON .B library("\fIlibname\fP" [, \fInum\fP])
PYTHON Loads a library named \fIlibname\fP (with or without .lps
PYTHON extension) into the set of built-in objects.  \fInum\fP,
PYTHON if specified, puts the specified library onto library page 
PYTHON \fInum\fP (starts at 1).
PYTHON .TP 6
PYTHON .B override("library")
PYTHON Causes the default libraries defined in "builtins.lps"
PYTHON \fInot\fP to be loaded.
PYTHON .TP 6
PYTHON .B override("colors")
PYTHON Causes the default colors \fInot\fP to be loaded; this will
PYTHON not override the allocation of black and white, however,
PYTHON for obvious reasons.
PYTHON .TP 6
PYTHON .B font("\fIfontname\fP")
PYTHON Adds a font named \fIfontname\fP (as recognized by a
PYTHON printer) to the menu of selectable fonts.
PYTHON .TP 6 
PYTHON .B color("\fIcolorname\fP")
PYTHON Adds a color named \fIcolorname\fP (standard X11
PYTHON conventions) to the menu of selectable colors.
PYTHON .TP 6
PYTHON .B bind("\fIkey\fP", "\fIfunction\fP")
PYTHON Binds the key (or button) named \fIkey\fP to the function named
PYTHON \fIfunction\fP.  If only one argument is given, it can be
PYTHON either a key name or a function name, and bind() returns
PYTHON the associated binding(s).  If no argument is given, then
PYTHON bind() returns a dictionary of all key bindings.
PYTHON Valid function names are listed in section "KEY BINDINGS" below.
PYTHON .TP 6
PYTHON .B unbind("\fIkey\fP", "\fIfunction\fP")
PYTHON Unbinds the key (or button) named \fIkey\fP from the function named
PYTHON \fIfunction\fP.
PYTHON Valid function names are listed in section "KEY BINDINGS" below.
PYTHON .TP 6
PYTHON .B set("\fItype\fP", "\fIvalue\fP")
PYTHON Sets internal xcircuit variables, where \fItype\fP can be one of:
PYTHON .sp
PYTHON \fBboxedit\fP
PYTHON .sp
PYTHON Where \fIvalue\fP is one of "manhattan", "rhomboid-x", "rhomboid-y",
PYTHON or "normal".  Determines the default way manhattan-aligned polygon
PYTHON edges are manupulated during edits.
PYTHON .sp
PYTHON \fBlinewidth\fP
PYTHON .sp
PYTHON Where \fIvalue\fP is a real number indicating the default
PYTHON width of lines.
PYTHON .sp
PYTHON set("\fBbeep\fP", "on"|"off")
PYTHON .sp
PYTHON Where \fIvalue\fP can be \fBon\fP or \fBoff\fP, depending on 
PYTHON whether or not you want the machine beeping at you when it
PYTHON gives critical warnings.
PYTHON .sp
PYTHON set("\fBcolorscheme\fP", "normal"|"inverse")
PYTHON .sp
PYTHON Where \fIvalue\fP is \fBinverse\fP to swap the two color schemes
PYTHON and make the second scheme appear as default.
PYTHON .sp
PYTHON \fIh\fP = newelement("\fIname\fP")
PYTHON .sp
PYTHON Creates a new element and returns a handle (pointer) \fIh\fP to it which
PYTHON can be used to get and set element attributes.  Valid names are
PYTHON "Arc", "Spline", "Polygon", "Object Instance", "Label", and "Path".
PYTHON .sp
PYTHON \fId\fP = getattr(\fIh\fP)
PYTHON .sp
PYTHON Creates a dictionary \fId\fP of attributes for the element with handle
PYTHON \fIh\fP.  Dictionary keys depend on the element.
PYTHON .sp
PYTHON setattr(\fIh\fP, \fId\fP)
PYTHON .sp
PYTHON Applies the dictionary \fId\fP key:value pairs to the element pointed to
PYTHON by handle \fIh\fP.
PYTHON .sp
PYTHON \fId\fP = getpage(\fIvalue\fP)
PYTHON .sp
PYTHON Returns a dictionary \fId\fP containing information about the page \fIvalue\fP.
PYTHON If \fIvalue\fP is not specified, returns information about the current page.
PYTHON The dictionary includes a list "\fIparts\fP" of handles to every element drawn
PYTHON on the indicated page.
PYTHON .sp
PYTHON \fId\fP = getlibrary(\fIname\fP)
PYTHON .sp
PYTHON Returns a dictionary of objects for the indicated library,
PYTHON referenced by \fIname\fP, or by page number.  The dictionary contains a
PYTHON list "\fIobjects\fP" of names of every object in the library.
PYTHON .sp
PYTHON \fId\fP = getobject(\fIname\fP)
PYTHON .sp
PYTHON Returns a dictionary containing all information about an object, which
PYTHON is referenced by \fIname\fP.  The dictionary contains keys "\fIname\fP",
PYTHON containing the object name, "\fIwidth\fP" and "\fIheight\fP", a
PYTHON list "\fIparts\fP" containing handles to each element comprising the
PYTHON object, and a list "\fIparameters\fP" containing all the parameters
PYTHON defined for the object and their default values.
PYTHON .sp
PYTHON zoom(\fIfactor\fP)
PYTHON .sp
PYTHON Zooms by amount \fIfactor\fP.  Values greater than 1 indicate a zoom in;
PYTHON values less than 1 indicate a zoom out.
PYTHON .sp
PYTHON pan(\fIposition\fP)
PYTHON .sp
PYTHON Centers the screen on the (user) coordinate \fIposition\fP, which can be
PYTHON either a (X,Y) tuple or two integers X, Y.
PYTHON .sp
PYTHON refresh()
PYTHON .sp
PYTHON Refreshes the screen.  The screen is automatically refreshed after every
PYTHON Python command, but the \fBrefresh()\fP function can be used along with the
PYTHON \fBpause()\fP function for animation effects. 
PYTHON .sp
PYTHON pause(\fIdelay\fP)
PYTHON .sp
PYTHON Pauses for \fIdelay\fP seconds (is a floating-point number).  Useful in
PYTHON conjunction with \fBrefresh()\fP for animation effects.
PYTHON .sp
PYTHON \fIt\fP = getcursor()
PYTHON .sp
PYTHON Returns a tuple \fIt\fP containing the current X and Y position of the cursor.
PYTHON .sp
PYTHON .sp
PYTHON \fIt\fP = getwindow()
PYTHON .sp
PYTHON Returns a tuple \fIt\fP containing the current window width and height.
PYTHON .sp
PYTHON popupprompt(\fIprompt\fP, \fIfunction\fP)
PYTHON .sp
PYTHON Generates a popup window with text entry.  \fIprompt\fP will be printed above
PYTHON the text entry window.  Python function \fIfunction\fP (referenced by name)
PYTHON will be called when clicking the "Okay" button or pressing the Return key
PYTHON ends the text entry.  The function will be passed the contents of the text
PYTHON window as its (only) parameter.
PYTHON .sp
PYTHON filepopup(\fIprompt\fP, \fIfunction\fP)
PYTHON .sp
PYTHON Operates exactly like \fBpopupprompt()\fP, except that the window is a file
PYTHON browser instead of a simple text entry window.
PYTHON .sp
PYTHON .sp
PYTHON simplepopup(\fIprompt\fP, \fIfunction\fP)
PYTHON .sp
PYTHON Operates exactly like \fBpopupprompt()\fP, except that there is no text entry
PYTHON window, only a prompt string and the choice of "Okay" and "Cancel".
PYTHON .sp
PYTHON newbutton(\fIparent\fP, \fIname\fP, \fIfunction\fP)
PYTHON .sp
PYTHON Generates a new menu button under the menu cascade labeled \fIparent\fP.
PYTHON The new button will display the label \fIname\fP, and pushing the button
PYTHON will call the Python function \fIfunction\fP.
PYTHON .sp
PYTHON page(\fInumber\fP)
PYTHON .sp
PYTHON Go to the page numbered \fInumber\fP.
PYTHON .sp
PYTHON reset()
PYTHON .sp
PYTHON Erases the current page unconditionally, unless dependencies such as a link
PYTHON to a symbol exist.

NOINTERP Commands are:
NOINTERP .TP 6
NOINTERP .B library \fIlibname\fP
NOINTERP Loads a library named \fIlibname\fP (with or without .lps
NOINTERP extension) into the set of built-in objects.
NOINTERP .TP 6
NOINTERP .B override default library
NOINTERP Causes the default libraries defined in "builtins.lps"
NOINTERP \fInot\fP to be loaded.
NOINTERP .TP 6
NOINTERP .B override default colors
NOINTERP Causes the default colors \fInot\fP to be loaded; this will
NOINTERP not override the allocation of black and white, however,
NOINTERP for obvious reasons.
NOINTERP .TP 6
NOINTERP .B font \fIfontname\fP
NOINTERP Adds a font named \fIfontname\fP (as recognized by a
NOINTERP printer) to the menu of selectable fonts.
NOINTERP .TP 6 
NOINTERP .B color \fIcolorname\fP
NOINTERP Adds a color named \fIcolorname\fP (standard X11
NOINTERP conventions) to the menu of selectable colors.
NOINTERP .TP 6
NOINTERP .B set \fItype\fP \fIvalue\fP
NOINTERP Sets internal xcircuit variables, where \fItype\fP can be one of:
NOINTERP .sp
NOINTERP \fBboxedit\fP
NOINTERP .sp
NOINTERP Where \fIvalue\fP is one of "manhattan", "rhomboid-x", "rhomboid-y",
NOINTERP or "normal".  Determines the default way manhattan-aligned polygon
NOINTERP edges are manupulated during edits.
NOINTERP .sp
NOINTERP \fBlinewidth\fP
NOINTERP .sp
NOINTERP Where \fIvalue\fP is a real number indicating the default
NOINTERP width of lines.
NOINTERP .sp
NOINTERP \fBbeep\fP
NOINTERP .sp
NOINTERP Where \fIvalue\fP can be \fBon\fP or \fBoff\fP, depending on 
NOINTERP whether or not you want the machine beeping at you when it
NOINTERP gives critical warnings.
NOINTERP .sp
NOINTERP \fBcolorscheme\fP
NOINTERP .sp
NOINTERP Where \fIvalue\fP is \fBinverse\fP to swap the two color schemes
NOINTERP and make the second scheme appear as default.

TCL The startup file is written in Tcl.  The command-line interface can
TCL be found in the online documentation on the website
TCL .sp
TCL \fBhttp://www.opencircuitdesign.com/xcircuit/\fP.
TCL .sp

.SH CRASH RECOVERY
XCircuit implements a crash recovery system by which a copy of the current
file is made every 15 minutes (see Xdefaults, below, for changing this
value).  XCircuit deletes this file upon a normal exit.  If, however,
XCircuit crashes or is terminated by Control-C or other sudden death,
the backup copy will remain.  On startup, XCircuit checks the /tmp
directory for any XCircuit backup files belonging to the user.  If one
is found, XCircuit will prompt the user for recovery.  Note that the
backup is unique in that it contains a copy of the entire user space at
the time of the crash.  Filenames may get overwritten, as the backup
will treat all pages as belonging to the same file.

.SH KEY BINDINGS
As noted above, keys can be bound and unbound through command-line
functions "bind" and "unbind".  Default key bindings are used throughout
this manual page.  Key names use the notation of
/usr/X11R6/include/keysymdef.h, but with the notation "XK_" being
optional, and including the addition of prefixes "Shift_", "Control_",
"Capslock_", and "Alt_", which may be used in any combination.  Note
that "Shift_" is not used for ASCII characters (e.g., "A" is used
instead of "Shift_a") unless used in combination with other special
keys (such as "Control_Shift_A" to distinguish from "Control_a",
should that be desired).  "Button1", "Button2", and "Button3" are
also valid names indicating functions attached to the mouse buttons
in normal drawing mode.  Valid functions which may be bound are as
follows, with their default values given:
.br
.sp

 Function name        Function performed         Default key binding
 ---------------------------------------------------------------------
 "Page",              change page,               Number keys 1-9 and 0
 "Justify",           change text justification, Keypad keys 1-9
 "Superscript",       set text superscript,      Keypad +
 "Subscript",         set text subscript,        Keypad -
 "Normalscript",      cancel sub/superscript,    Keypad Enter
 "Nextfont",          change to next font,       Alt-f
 "Boldfont",          change to bold font,       Alt-b
 "Italicfont",        change to italic font,     Alt-i
 "Normalfont",        cancel italic/bold,        Alt-n
 "Underline",         generate underline,        Alt-u
 "Overline",          generate overline,         Alt-o
 "ISO Encoding",      change to ISO encoding,    Alt-e
 "Return",            embedded return character, Alt-Enter
 "Halfspace",         embedded half-space,       Alt-h
 "Quarterspace",      embedded quarter-space,    Alt-q
 "Special",           special character,         Alt-c
 "Parameter",         embedded parameter,        Alt-p
 "Edit Break",        break at point,            x
 "Edit Delete",       delete point,              d, Delete
 "Edit Insert",       insert point,              i, Insert
 "Edit Next",         go to next point,          e
 "Attach",            attach line to object,     A
 "Next Library",      go to next library,        l
 "Library Directory", library directory,         L
 "Library Move",      arrange library objects,   M
 "Library Copy",      get object in copy mode,   c
 "Library Edit",      edit library name,         E
 "Library Delete",    delete library object,     D
 "Library Duplicate", duplicate object,          C
 "Library Hide",      hide library object,       H
 "Page Directory ",   page directory,            P
 "Library Pop",       return from library,       <
 "Help",              generate help screen,      h, ?
 "Redraw",            redraw the window,         space
 "View",              fit page to window,        v
 "Zoom In",           zoom in,                   Z
 "Zoom Out",          zoom out,                  z
 "Pan",               center pan,                p
 "Double Snap",       increase snap space,       +
 "Halve Snap",        decrease snap space,       -
 "Pan Left",          pan left one-half page,    Left arrow
 "Pan Right",         pan right one-half page,   Right arrow
 "Pan Up",            pan up one-half page,      Up arrow
 "Pan Down",          pan down one-half page,    Down arrow
 "Write",             popup output window,       W
 "Rotate",            Rotate,                    r,R,o,O
 "Flip X",            Flip horizontal,           f
 "Flip Y",            Flip vertical,             F
 "Snap",              Snap to grid,              S
 "Pop",               Return from object edit,   <
 "Push",              Edit object,               >
 "Delete",            Delete element,            d
 "Select",            Select element,            Select
 "Box",               Create box,                b
 "Arc",               Create arc,                a
 "Text",              Create label,              t
 "Exchange",          Exchange vertical order,   X
 "Copy",              Copy element,              c
 "Join",              Join into path,            j
 "Unjoin",            Split path into elements,  J
 "Spline",            Create spline,             s
 "Edit",              Edit element,              e
 "Undelete",          Undelete last deleted,     u
 "Select Save",       Make object from selected, M,m
 "Unselect",          Unselect element,          x
 "Dashed",            Set line style to dashed,  |
 "Dotted",            Set line style to dotted,  :
 "Solid",             Set line style to solid,   _
 "Prompt",            Execute from command line, %
 "Dot",               Place dot at location,     .
 "Exit",              Exit xcircuit              Ctrl-Alt-q
 "Netlist",           Generate a netlist,        Alt-q
 "Swap",              Swap schematic, symbol,    /
 "Pin Label",         Create pin label,          T
 "Info Label",        Create info label,         I
 "Connectivity",      Show wire connectivity,    Alt-w
 "Sim",               Generate sim netlist,      Alt-s
 "SPICE",             Generate SPICE netlist,    Alt-S
 "PCB",               Generate PCB netlist,      Alt-p
 "SPICE Flat",        Generate flattened SPICE,  Alt-f
 ------------------------------------------------------------------
.br
.sp
2-Button mouse users may find it useful to forego the Shift-Button1
combination and instead put the following commands in the startup
script:
.br
.sp
bind('Escape', 'Cancel')
.br
unbind('Button3', Cancel')
.br
bind('Button3', 'Finish')
.br
.sp
This will move the 3rd mouse button bindings to the "Escape" key, and
duplicate the 2nd mouse button bindings onto the 3rd.
.br
.sp
.SH X DEFAULTS
The color scheme of xcircuit has a default setup, but accepts 
alternate color schemes using the following keywords which can be put
in the X Defaults (.Xdefaults, .Xresources) file, such as:
.sp
.EX 0
  !
.br
  ! Sample X defaults for xcircuit, black-on-white version
.br
  !
.br
  xcircuit*foreground     : Black
.br
  xcircuit*background     : White
.br
  xcircuit*gridcolor      : Gray85
.br
  xcircuit*snapcolor      : Orange
.br
  xcircuit*selectcolor    : Blue
.br
  xcircuit*querycolor     : Green
.br
  xcircuit*axescolor      : NavajoWhite3
.br
  xcircuit*offbuttoncolor : Gray30
.br
  xcircuit*auxiliarycolor : MediumOrchid1
.EE
.sp
Two color schemes are supported at a time, ostensibly for those people
who prefer the lessened eye strain of a white-on-black scheme.  The
names of the secondary colors are the same as those for the primary
colors, but followed by "2", e.g., "xcircuit*foreground2".
.sp
.sp
One other resource defines the number of minutes between automatic saves
to the temporary file (in case of a crash or emergency Ctrl-C exit):
.sp
.EX 0
  xcircuit.timeout		: 15
.EE
.sp
Xcircuit also recognizes the core resources, such as width and height:
.sp
.EX 0
  xcircuit.width		: 600
.br
  xcircuit.height		: 500
.EE
.sp
All xcircuit foreground and background colors are taken from the
Xdefaults foreground and background.  To get, for instance, white-on-black
menus and buttons with a black-on-white drawing area, use the following:
.sp
.EX 0
  xcircuit*foreground		: White
.br
  xcircuit*background		: DarkSlateGray
.br
  xcircuit.foreground		: Black
.br
  xcircuit.background		: White
.br
This will ensure that only the drawing area is black-on-white, but all other
windows will appear in the less eye-straining white-on-black.
.br
Five different fonts can be specified in the Xdefaults.  \fihelpfont\fp is
the style of fonts on the help popup window.  \fifilefont\fp is the style
of fonts in the list of files in the file selection popup window.  \fitextfont\fp
is the style of font for entering text in the popup dialog boxes.  \fititlefont\fp
is the style of font for the cascade menu titles.  All other fonts take the
type \fifont\fp. For example:
.br
  xcircuit*font           : *times-bold-r-normal--14*
.br
  xcircuit*helpfont	  : *times-medium-r-normal--12*
.br
  xcircuit*filefont	  : *times-medium-r-normal--14*
.br
  xcircuit*textfont	  : *courier-medium-r-normal--14*
.br
  xcircuit*titlefont	  : *times-bold-r-normal--18*
.SH FILES
The file path used by xcircuit to find library files is system-dependent
(i.e., can be changed at compile time), and can be overridden in many
ways (in .xcircuitrc or by the XCIRCUIT_LIB_DIR environment variable),
but by default is:
.sp
.TP 28
.B LIBDIR
.sp
.TP 15 
.B xcircps2.pro
PostScript prolog appended to each file
.TP 15 
PYTHON .B xcstartup.py
TCL .B xcstartup.tcl
NOINTERP .B startup.script
This startup script contains commands of the type
PYTHON \fBlibrary\fP("\fIname\fP", \fInumber\fP
TCL \fBlibrary\fP \fIname\fP \fInumber\fP
NOINTERP \fBlibrary\fP \fIname\fP \fInumber\fP
which cause the designated library \fIname\fP to be immediately loaded
into library page \fInumber\fP.  The startup script is also responsible
for loading fonts, and may also be used to load colors on the color
palette, set other options, and execute commands.
.TP 15
.B generic.lps, analog.lps, digital.lps, avlsi.lps, analoglib2.lps
Files containing pre-compiled circuit elements.  The \fB.lps\fP extension
is unique for xcircuit libraries.
.TP 15
.B fonts
This subdirectory contains font definition files for xcircuit's
vector-drawn fonts.  Characters are defined by xcircuit objects and
stored in a \fB.lps\fP library.  The encoding scheme and other font
information is stored in a \fB.xfe\fP ("xcircuit font encoding")
file.
.TP 15
.B ~/.xcircuitrc \fPor\fB ./xcircuitrc
Personal xcircuit initializer;  commands are outlined above.
Libraries listed in this file will be appended to the builtin libraries.
.SH ENVIRONMENT VARIABLES
\fBxcircuit\fP understands the following environment variables:
.sp
.TP 15
.B TMPDIR
Directory for temporary (e.g., backup) files (defaults to TEMP_DIR).

.TP 15
.B XCIRCUIT_LIB_DIR
Directory where xcircuit libraries and startup files can be found
(defaults to BUILTINS_DIR).

.TP 15
.B XAPPLRESDIR
Directory where the xcircuit application defaults can be found
(defaults to RESOURCES_DIR)

.TP 15
.B HOME
Directory where xcircuit will look for startup files, after searching the
current directory.

.TP 15
.B HOST, HOSTNAME, USER
Environment variables which xcircuit uses to fill in header information
in the PostScript output (HOST and HOSTNAME are equivalent).

.SH BUGS
PostScript printers have device-dependent limits on the number of
statements within a "def" definition.  If an object definition has an
unusually large number of components, xcircuit will flag a warning when
writing the file.  However, there is no way to ensure that a file will be
accepted by a given printer.  The best way to avoid the problem is to make
sure that large drawings make good use of hierarchically nested user-defined
objects.  Note that printer errors arising from this problem have not been
observed in practice, and given the typical size of on-board memory on most
modern laser printers, probably never will be.
.sp
A list of bugs can be found in the Manifest file in the source directory.
.SH ONLINE TUTORIAL
Look for the xcircuit online tutorial at
.sp
http://opencircuitdesign.com/xcircuit/tutorial/tutorial.html
.SH SEE ALSO
xfig(1), another powerful freeware drawing program worthy of mention
(see www.xfig.org). 
Another schematic capture package worth noting is "gschem" from the
gEDA package (see www.geda.seul.org).
.SH NOTES
PostScript is a registered trademark of Adobe Systems Incorporated.
.br
XCircuit Copyright (c) 2002 Tim Edwards.  XCircuit is freely distributed
under a generous public license.  See the source distribution for details.
.br
Xw widget set Copyright (c) 1988 by Hewlett-Packard Company and the
Massachusetts Institute of Technology.
.SH AUTHOR
Tim Edwards <tim@opencircuitdesign.com>.  Thanks to Tomas Rokicki for
the PostScript routine which manufactures a Symbol-Oblique font.
Thanks to Dave Gillespie and John Lazzaro for the program "analog"
on which the graphical interface of xcircuit is (roughly) based.
Thanks to many beta-testers, some of whom were kind enough to send
patches.  Most contributors have been named in the Manifest file in
the source distribution.