minor tweaks
[geda-gaf/peter-b.git] / docs / gschem / gschem.tex
blobdef9bce34b64f47340c27f54049fa28d88a6093c
1 % $Id$
3 % gEDA - GPL Electronic Design Automation
4 % Copyright (C) 2003 Ales Hvezda
6 % This program is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 2 of the License, or
9 % (at your option) any later version.
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with this program; if not, write to the Free Software
18 % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 \documentclass{article}
21 %\usepackage{epsfig}
22 \usepackage{graphicx}
23 % This line will enable hyperlinks in the PDF output
24 % file.
25 \usepackage[ps2pdf,breaklinks=true,colorlinks=true]{hyperref}
27 \setlength{\parindent}{0pt}
28 \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
30 \title{gEDA gschem Users Guide}
31 \author{Ales Hvezda\\
33 This document is released under GFDL\\
34 (\url{http://www.gnu.org/copyleft/fdl.html})}
35 \date{September 21st, 2003}
37 \begin{document}
39 \maketitle
40 \newpage
42 \tableofcontents
43 \newpage
46 \section{Overview}
48 \section{Introduction}
49 This is a very basic and crude first attempt at getting some real user
50 docs written for {\tt gschem}. This document is hardly finished or polished
51 but it is better than having no docs at all (which was the case for
52 the longest time). Please forgive the tone of this document; I (Ales)
53 am writing this just to get something done. I am by no means a
54 technical writer so I am sure some of my sentences are truly awful.
55 As everybody says, programmers should not write documentation for
56 their programs and this document is a perfect illustration of a
57 programmer breaking that rule. Please report any
58 errors/inconsistencies to {\tt ahvezda@geda.seul.org}.
60 This document assumes you understand basic schematic capture
61 concepts. For example that a component represents something and that
62 nets and buses interconnect these components to form a schematic
63 etc... Eventually this document will describe all this in more
64 detail, but for now this document is will describe how schematic
65 capture is accomplished in the gEDA system.
67 \section{Overview}
68 {\tt gschem} is the schematic capture program in the gEDA tool suite.
69 It's sole purpose is facilitate the input of circuit schematics or
70 block diagrams graphically. {\tt gschem} is also the symbol editor for the
71 gEDA system. This is possible because the schematic format and symbol
72 format are exactly the same.
74 \section{Running {\tt gschem}}
75 Running {\tt gschem} is straightforward once you have installed it
76 on your GNU/Linux or UNIX system.
78 The first step is to build and install the gEDA tools.
79 This step is not covered in this document. You can tell if you have
80 installed the tools correctly by running the following commands:
81 \begin{verbatim}
83 which gschem
84 ldd `which gschem`
86 \end{verbatim}
87 The first command should return the path to the {\tt gschem} binary and the
88 second command (only on unix-like operating systems which include the {\tt
89 ldd} utility for listing dynamic dependencies of executibles or shared
90 objects) will return which libraries are linked to {\tt gschem}; all of
91 the request libraries must be found for {\tt gschem} to run. If these
92 commands do not return the expected results, then most likely the gEDA
93 tools are not installed properly. Please see the appropriate INSTALL
94 docs (which came with the distribution) for more info on installing the
95 gEDA tools.
98 To run gschem execute ``{\tt gschem}'' at any shell prompt (without
99 the quote marks). This will
100 start the gschem program with a blank schematic. To look at an
101 example schematic which came with gschem run ``{\tt gschem
102 schematic\_name.sch}'' For a listing of the various command line flags
103 run ``{\tt gschem -h}''. For a detailed explanation of the command line
104 flags look at the gschem man page (``{\tt man gschem}'').
106 \section{User interface}
107 There are several ways to interact with gschem. gschem
108 requires a keyboard and mouse. There are three ways to initiate an
109 operation or command:
110 \begin{itemize}
111 \item Using the mouse to select the operation off a menu
112 \item Typing the keyboard shortcut(s).
113 \item Draw the appropriate stroke (if stroke support is enabled)
114 \end{itemize}
115 To make usage matters more confusing, selecting an operation
116 off of the menus behaves slightly differently than typing the
117 keyboard shortcut. Most of the operations operate on the currently
118 selected object(s), hence you need to select the object first before
119 manipulating them. The menu selected operations usually require some
120 more input (usually a mouse click) after they are picked off of the menu.
121 The keyboard shortcut operations take that required input as the current
122 mouse position. This saves an extra click since you can position
123 the mouse at the right place, type in the shortcut(s), and the command
124 then executes. Note, you can change this so that both menu and shortcut
125 behavior is exactly the same. See the section on the resource file for
126 more info on how to configure this.
128 Most of the interaction with gschem is fairly mode oriented
129 (similar to the great text editor vi). If you select operations off of
130 the menu, then you are placed into the corresponding mode (like copy
131 or move mode). You must then select an anchor point (or whatever the
132 appropriate point is) to continue the operation. Most of the commands
133 off of the menu expect the objects to be already selected. Some of the
134 modes persist after being execute while other immediately return you
135 into select mode (the default mode).
137 The shortcuts are also mode like in nature. Most of the default
138 shortcuts are for the various commands are not single keystrokes.
139 There are a few which are single keystrokes (like zoom in: `z' or
140 pan: `x'), but most are typically two keystrokes long. As examples,
141 to execute File/Save you would type `f' and `s' (without the quotes)
142 or Add/Line is `a' and `l'. You can get a listing of the shortcuts by
143 picking Help/Hotkeys. You can also see the hotkey assignments in the
144 pulldown menus as well. The shortcuts are defined in the resource files
145 ({\tt system-gschemrc}, {\tt ~/.gEDA/gschemrc}, or {\tt
146 `pwd`/gschemrc}). See the section
147 on the resource file for more info.
149 The mouse button actions in gschem are mostly configurable.
150 The first mouse button is always used to select objects or pick points.
151 This button is not configurable. The second mouse button is either a
152 copy/move action (when held down over an object), a repeat last command
153 or used to draw a stroke to execute a command. The third mouse button is
154 either a mouse pan (when held down as the mouse is moved) or a popup menu.
155 The behavior of the second and third mouse buttons is controlled through
156 the resource file (see the section below for more info).
158 \section{Basic Operations}
159 There are nine basic kinds of operations in gschem:
160 \begin{itemize}
161 \item File related (Open/Close/Save/Print etc...)
162 \item Addition of objects (Add nets/lines/pins/components etc...)
163 \item Manipulate objects (move/copy/delete/rotate/mirror etc...)
164 \item View operations (Zoom/Pan/Redraw etc...)
165 \item Hierarchy operations (Down Schematic/Down Symbol/Up)
166 \item Attribute operations (Attach/Detach/Toggle visibility etc...)
167 \item Buffer operations (Copy / Cut / Paste)
168 \item Option changing (text size/gridding/snap etc...)
169 \item Editing Grips
170 \end{itemize}
171 This section will describe each of these.
172 The terms ``page'' and ``schematic'' both refer to the same thing (a
173 collection of objects that are loaded and being displayed).
174 A window is that big window in which schematics are displayed
175 and manipulated.
177 \subsection{File related operations:}
179 \begin{itemize}
180 \item {\bf New Window} Open a new window. Each window is totally
181 separate from all other windows.
183 \item {\bf New Page} Open a new page. Usually this page will be
184 called untitled\_N.sch, where N is an incrementing number.
186 \item {\bf Open Page...} Open an page from disk. This will pop up a
187 dialog box. Please see the later section on how to use the more
188 advance features of this dialog box.
190 \item {\bf Close Page} Close the currently displayed page. This will
191 prompt you to save if you have modified the page.
194 \item {\bf Revert Page} Close and reopen the currently displayed page.
195 This will not prompt you to save the current page, but will quickly
196 discard any changes you have made and reopen the saved schematic
197 from disk. Use with caution.
199 \item {\bf Save Page} Save the page current page. If the page is
200 called untitled\_N.sch (where N is a integer), then a Save As...
201 dialog box will appear.
203 \item {\bf Save Page as...} Opens the Save As.. dialog box. Clicking
204 Save As will save the currently displayed schematic. The displayed
205 schematic will be called the new specified name.
207 \item {\bf Save All} Unconditionally saves all schematics loaded in
208 memory.
210 \item {\bf Print...} Brings up the Print dialog box. Please see the
211 dialog box section for more info on this.
213 \item {\bf Write PNG...} Brings up the Write PNG dialog box. Please
214 see the dialog box section for more info on this. Note you must
215 have libgdgeda install (and any required dependencies) if you want
216 to output images.
218 \item {\bf Close Window} Closes the current window. If there are any
219 modified schematics, a "Are you sure" dialog box will appear.
220 Clicking OK will cause all unsaved schematics to be lost.
222 \item {\bf Quit} Like Close window, but close all opened window. A
223 "Are you sure" dialog box will appear for each window which has
224 unsaved schematics
226 \item {\bf Page Manager} Brings up a dialog box which lets you pick
227 pages as well as see various info about the pages loaded in memory.
228 Please see the dialog box section for more info on this.
231 \item {\bf Page Next}\\
232 {\bf Page Prev} These two options allow you to move in between
233 opened pages.
235 \item {\bf Page Discard} Closes the current schematic forcefully. If
236 the current schematic is NOT saved then the data is lost forever.
237 You will NOT be promoted or warned if you have modified the current
238 displayed schematic. Use with caution. Useful if you want to
239 unload a schematic quickly.
241 \end{itemize}
243 \subsection{Addition of objects:}
244 An object is one of the following: line, circle, pin, net, box, bus,
245 text/attribute, and component. A component is a collection of lines,
246 circles, pins, boxes, text, and attributes.
247 \begin{itemize}
248 \item {\bf Add Component} Opens up a dialog box which lets you place
249 components from the component libraries. To place a component do
250 the following:
251 \begin{enumerate}
252 \item Select a Component library (which, btw, is specified in the
253 Resource files, see section below) from the left list
255 \item Select a Component from the right list.
257 \item Move the mouse into the main drawing window (you should see an
258 outline).
260 \item Press the first mouse button to place the component.
262 \item Keep pressing the first mouse button to place additional
263 instances of the component.
265 \end{enumerate}
267 If a component name is already selected, hitting apply and moving the
268 mouse into the main window will allow you to place that component
269 again.
271 You can rotate the component before you place it by clicking the
272 middle button. For every button click, the component will be rotate
273 90 degrees.
275 To cancel a component place press the last mouse button or the ESC
276 key.
278 Please see the dialog box section for detailed information on this
279 dialog box.
281 \item {\bf Add Net} Draws a net segment. If you select this off of
282 the top menu bar then:
283 \begin{enumerate}
284 \item Press the first mouse button to start the net.
285 \item Press the first mouse button to end the net.
286 \item Another net will start at the last endpoint.
287 \item Press the first mouse button to end that net etc...
288 \end{enumerate}
289 Press the last mouse button or ESC to cancel any net in progress.
291 If you started this using the keyboard shortcut then the net start
292 immediately at the last mouse position and then it behave exactly as
293 above (except for line \#1).
295 After drawing a net segment (or segments) and canceling the last net
296 segment, you are automatically placed in select mode. You must pick
297 add net again or type the shortcut to add more nets.
299 You can hold down the control key to draw non-orthogonal nets. Just
300 keep in mind that you cannot connect anything to the middle of a
301 non-orthogonal net.
303 The boxes at the end of the nets are connectivity cues. Filled boxes
304 signified a dangling net (not connected to anything). Filled circles
305 are midpoint connections/junctions. These cues are drawn
306 automatically and are an indicator of electrical connectivity.
308 See the section on electrical connectivity below for more information.
310 \item {\bf Add Bus} Basically the same thing as nets, except that it
311 draws buses. Buses are very new and there are many aspects which
312 are not defined yet, so keep that in mind as you uses buses. *More
313 to be added here eventually*
315 \item {\bf Add Attribute...} Brings up the add attribute dialog box.
316 This dialog box is ONLY used to add attributes. It does not display
317 or manipulate already placed attributes.
319 An attribute is nothing more than a text item which is in the form
320 {\tt name=value} (there cannot be any space to the left or right of the
321 name,value pair). It can be either unattached or attached.
323 To add an unattached attribute do the following:
325 \begin{enumerate}
326 \item Select an attribute name off of the pulldown list --or-- type
327 in the attribute name into the name entry.
328 \item Type in a value for the attribute.
329 \item Pick any of the attribute options.
330 \item Click Apply and the attribute will be placed.
331 \end{enumerate}
333 If you want to attach an attribute to an object then select the
334 desired object first and then press the add attribute apply button.
335 The text should be yellow which signifies an attached attribute. If
336 you click on an object which has attached attributes, the attached
337 attributes should be selected as well.
339 If you select Add/Attribute... off of the pull down menus then you do
340 not have much control as to where the attribute gets placed (it gets
341 places either at the lower left hand corner of the object extents or
342 at the origin of any selected object). However, if you execute
343 Add/Attribute using the hot key then the current mouse position is
344 used as the anchor point for the attribute item.
346 You cannot place an incomplete attribute (an attribute without a name
347 and value).
349 Please see the section on attributes below for more info on how to
350 use attributes and more details.
352 \item {\bf Add Text} Opens up the text add dialog box. To place text:
353 \begin{enumerate}
354 \item Type in text in entry field
355 \item Hit enter or click Apply
356 \item Move the mouse into the main window (an outline of the text
357 should appear and follow the mouse)
358 \item Press the first mouse button to place the text
359 \end{enumerate}
360 If you leave the text add dialog box open you can place the same text
361 item again and again by just clicking apply (or pressing enter) and
362 moving the mouse into the main window.
364 Text which is placed will be automatically capitalized. Please see
365 the Resource file section below on how to control this behavior.
367 To cancel a text place press the last mouse button or the ESC key.
369 If you create text in the form {\tt name=value}, then you are creating
370 attributes. gEDA allows for general attributes to be free floating
371 (or unattached). It is a good idea to change the color of these
372 floating attributes to the current attribute color (which is also
373 called the attached attribute color) to signify that this text item is
374 an attribute.
376 You can rotate the text before you place it by clicking the middle
377 button. For every button click, the text will be rotate 90 degrees.
379 To add an overbar to the text, just type \textbackslash\_ at the beginning and at the end of the characters you want below the overbar. Example: If you type ``This is an \textbackslash\_overbar\textbackslash\_'', gschem will draw the overbar just on top of the overbar word.
381 \item {\bf Add Line} Draws a line in the same fashion as drawing nets
382 with the following exceptions:
383 \begin{itemize}
384 \item A line has no electrical significance
385 \item Only a single line is drawn
386 \item You keep drawing lines as long as you are in line drawing mode.
387 \end{itemize}
388 To cancel a line rubberband in progress press the last mouse button or
389 the ESC key.
391 \item {\bf Add Circle} To draw a circle (picking Add Circle off of a
392 menu):
393 \begin{enumerate}
394 \item Pick the center of the circle with the first button
395 \item Move the mouse to see an outline of the circle
396 \item Press the first mouse button to finalize the circle
397 \end{enumerate}
399 To draw a circle (typing the shortcut), same as above except that the
400 center of the circle is picked for you at the last mouse position when
401 you type the shortcut.
403 To cancel a circle rubberband in progress press the last mouse button
404 or the ESC key.
406 \item {\bf Add Arc} To draw an arc (picking Add Arc off of a menu):
407 \begin{enumerate}
408 \item Pick the center of the arc with first mouse button
409 \item Move the mouse and pick the next point. The rubberbanded line
410 represents the radius
411 \item A dialog box will appear: specify the start angle (in degrees)
412 and specify the degrees of sweep.
413 \item Press OK to finalize the values.
414 \end{enumerate}
415 The start angle can be positive or negative. The degrees are
416 specified using the standard Cartesian coordinate system. The degrees
417 of sweep can be positive or negative.
419 To cancel an arc in progress (while rubberband the radius) press the
420 last mouse button or the ESC key or press the Cancel button in the arc
421 dialog box.
423 \item {\bf Add Pin} Draws a pin in the same fashion as drawing nets
424 with the following exception:
425 \begin{itemize}
426 \item You keep drawing pins as long as you are in pins drawing mode.
427 \end{itemize}
428 To cancel a pin rubberband in progress press the last mouse button
429 or the ESC key.
431 Sometimes it is needed an overbar on top of the name of the pin (the pinname attribute), or part of the text. See above the ``Add text'' section.
433 \end{itemize}
435 \subsection{Manipulate objects:}
436 Most of these operations are modes which operate on the current
437 selected objects. Before you can execute the desired function you
438 must select the objects you want to rotate.
440 \begin{itemize}
441 \item {\bf Undo/Redo} Undo does exactly that, it undos the last action
442 which changed the schematic.
444 Here is how gschem implements undo: Basically after every action
445 (including zooming and panning) the schematic is saved to disk (in
446 /tmp). Gschem do clean up after itself when you exit. Should
447 gschem crash, the saved files are left alone in /tmp.
449 Redo only applies when you do an Undo. You can undo something and
450 then immediately redo it. However if you do anything in between you
451 will lose the undo info. You can undo and redo to your hearts
452 desire up and down till you reach the max undo levels.
454 You can change the behavior of undo and redo by changing the
455 defaults in one of the *gschemrc files. Please see the
456 system-gschemrc for more info.
458 \item {\bf Select Mode} Select mode is the initial mode gschem starts
459 up in.
461 In select mode you can select objects.
463 You can pick single objects by clicking on them. If an object is
464 already selected than clicking on that object will keep it selected.
465 If multiple objects overlap then clicking in one spot will cycle
466 through the objects.
468 If you hold down the SHIFT key and click, you can select and
469 deselect multiple objects. Doing this with multiple overlapping
470 objects will cause the selection to cycle among the possible object
471 selections.
473 If you hold down the CONTROL key and click, you will toggle the
474 object in and out of the current selection list.
476 To select multiple objects press and hold the first mouse button and
477 drag the mouse till a selection box appears. Drag the mouse
478 (selection box) till it encompasses the objects and release the
479 first mouse button. The objects must be completely encompassed.
480 Using the selection box takes some practice. If any previous
481 objects were selected, they will be unselected.
483 If you hold down the SHIFT key while drawing a selection box then
484 you will add to the currently selected objects. Objects cannot be
485 removed using the selection box and holding down the SHIFT key.
487 If you hold down the CONTROL key while drawing a selection box then
488 you will toggle any encompassed objects. If an object was selected
489 then it will be unselected and vice versa.
491 If you pick an object which has attributes which are attached to it,
492 then these attributes will be selected as well. If you just want to
493 select the object, you must deselect the attributes. Invisible
494 attached attributes are also selected when you pick the object This
495 behavior is handy if you want to manipulate/change an object and all
496 of its attributes (moving/copying the object around).
498 The selection mechanisms are not obvious and do require some
499 practice. There are some quirks so please report them as you come
500 across them.
502 \item {\bf Edit...} Allows you to edit: Text - brings up a dialog box
503 which allows you to edit the text string and size
505 Attributes - a much more sophisticated version of above specifically
506 for attributes.
508 All attributes attached to a component - brings up a multi-attribute
509 editing dialog box.
511 \begin{enumerate}
512 \item Select the item (text/component) to edit.
513 \item Pick or type the shortcut for Edit/Edit...
514 \item Make the appropriate change and press OK
515 \end{enumerate}
516 Note, only the item will be edited; bulk text/component editing is not
517 supported (yet).
519 \item {\bf Edit Text...} Allows you to edit text only, regardless if
520 that text is an attribute or just a plain text string.
521 \begin{enumerate}
522 \item Select the text item text to edit.
523 \item Pick or type the shortcut for Edit/Edit Text...
524 \item Make the appropriate change and press OK
525 \end{enumerate}
526 Note, only the item will be edited; bulk text editing is not supported
527 (yet).
529 \item {\bf Copy Mode} This mode allows you to copy the currently
530 selected objects.
532 To copy objects (picking Edit/Copy Mode off of a menu):
533 \begin{enumerate}
534 \item Select the desired object(s)
535 \item Pick Edit/Copy Mode off of a menu
536 \item Pick an origin point for the copy (first button)
537 \item Move the outline to the desired position
538 \item Pick the destination point (first button)
539 \end{enumerate}
541 To copy objects using the shortcut for copy mode is almost the same as
542 above except that the origin point is selected automatically for you
543 once you hit the copy mode shortcut.
545 After finishing the copy, you are automatically put back into to
546 select mode.
548 Holding down the CONTROL key as you move the outline around will
549 constrain the movement to be either horizontal or vertical.
551 \item {\bf Move Mode} Move mode is just like copy (above) except that
552 instead of copying you are actually moving the objects around.
554 \item {\bf Delete} Delete allows you to remove objects off of the
555 page.
557 To delete objects:
558 \begin{enumerate}
559 \item Pick the desired object(s).
560 \item Select or type the shortcut for Edit/Delete
561 \item Objects will be deleted immediately
562 \end{enumerate}
563 Use this with caution since there is NO undo yet!
565 \item {\bf Rotate 90 Mode} Rotate mode allows you to rotate objects 90
566 degrees around a pivot/center point.
568 To rotate objects (picking Edit/Rotate 90 Mode off of a menu):
569 \begin{enumerate}
570 \item Pick the desired object(s).
571 \item Select Edit/Rotate 90 Mode off of a menu
572 \item Pick the pivot or center point of the rotate
573 \end{enumerate}
574 Rotating objects using the shortcut is similar to above except that
575 the center point is the last mouse position at which you typed the
576 shortcut.
578 The objects will be rotate 90 counter clockwise. You can keep rotate
579 objects 90 degrees till you have them in the wanted rotation. Text
580 will always appear upright.
582 \item {\bf Mirror Mode} Mirror mode allows you to mirror objects
583 horizontally around pivot.
585 To rotate objects (picking Edit/Rotate 90 Mode off of a menu):
586 \begin{enumerate}
587 \item Pick the desired object(s).
588 \item Select Edit/Mirror Mode off of a menu
589 \item Pick the pivot point of the mirror
590 \end{enumerate}
591 Mirroring objects using the shortcut is similar to above except that
592 the pivot point is the last mouse position at which you typed the
593 shortcut.
595 Objects are mirrored horizontally about the pivot point. If you want
596 to get a vertical mirror then rotate and mirror the object(s) till you
597 get the desired position.
599 Mirroring of embedded components is not supported.
601 \item {\bf Slot...} Slot... allows you to change the slot of a
602 multiple slot component. The component must support slotting (see
603 the Components/Symbols section for more info on this).
605 To change the slot:
606 \begin{enumerate}
607 \item Select the desired component.
608 \item Pick or type the shortcut for Edit/Slot...
609 \item Type in the new slot number
610 \item Press OK.
611 \end{enumerate}
612 Slotting is still in development so expect some quirks.
614 \item {\bf Color...} This option allows you to change the color of
615 any selected object (with the exception of components).
617 To change the color of the currently selected objects:
618 \begin{enumerate}
619 \item Select the desired object(s).
620 \item Pick or type the shortcut for Edit/Color...
621 \item A dialog box with a drop down menu will appear.
622 \item Pick the new color
623 \item Press Apply.
624 \end{enumerate}
625 The color change will only take effect once you press Apply. The
626 dialog box will not change to the color of the current object(s) (ie
627 it only lets you change the color and does not get the current color
628 of selected object(s)).
630 You can leave this dialog box up and select new objects and change
631 their color by pressing Apply.
633 \item {\bf Lock}\\
634 {\bf Unlock} Lock and unlock allow you to lock/unlock components in
635 a schematic. Locking means that a component cannot be selected by a
636 single click. This is useful for title blocks and other components
637 which should not be selectable because you might have other objects
638 inside its boundaries and clicking inside the component (titleblock)
639 would be a distraction.
641 To lock/unlock components:
642 \begin{enumerate}
643 \item Select the desired object(s)
644 \item Pick or type the hot key for lock/unlock
645 \end{enumerate}
646 The components will not be selectable with a single click. To select
647 a locked component, use a selection box to select it. This is the
648 only way to select a locked component.
650 You can lock and unlock regular objects (lines/pins/boxes...) which
651 is nice when you are drawing something and an object is in the way
652 continuously. Just lock it and you will not have to think about it
653 when you click to select other objects. However, locking an object is
654 not preserved in the file format so once you quit any locked objects
655 (lines/pins/boxes...) will become unlocked. The locked/unlocked state
656 of components is preserved in the file format though.
658 \item {\bf Line Width \& Type...} This dialog box lets you control
659 the width and type of lines, boxes, circles, and arcs. This dialog
660 box is still under development.
662 Select an object and then select this option will bring up a dialog
663 box which lets you set the line width, line type, line dash length,
664 and line dash spacing. Pressing OK will apply the changes.
666 \item {\bf Symbol Translate...} Symbol translate is used to take
667 whatever is drawn and translate it around using a inputed value (in
668 mils). This operation is mainly used to translate symbols around
669 (mainly to the origin).
671 To translate a symbol, just select or type the shortcut for
672 Edit/Symbol Translate... and a dialog box will appear. Enter the
673 amount you want translate (positive or negative) in the X and Y
674 directions (the same value will be applied to both directions).
676 If you enter a 0, then all the objects will be translated to the
677 origin. If you are drawing a symbol, zoom in a bit and then execute
678 this (0 for the amount), since there are still some bugs in this
679 operation. It is a requirement that snap be on and that the grid
680 snap spacing is set 100 mils when creating symbols.
682 \item {\bf Embed Component} \\ {\bf Unembed Component} gschem supports
683 a concept of embedded components which components in a schematics
684 which do not require an external symbol file of any sort. All the
685 information necessary to display a component is placed in the
686 schematic file. This causes schematic files to be significantly
687 larger, but it makes it easy to share schematics with other people
688 or archive schematics away, since you have any dependencies on
689 symbol files. You should only embed components when absolutely
690 necessary.
692 Embed Component and Unembed component work exactly alike:
693 \begin{enumerate}
694 \item Select any components you wish to (un)embed
695 \item Pick or type the shortcut for Edit/(Un)Embed Component
696 \end{enumerate}
697 If you want the unembed a component you must have a symbol with the
698 same name in the component library search path (other wise the unembed
699 will not work).
701 You can only embed and unembed components. Also, you cannot embed and
702 then mirror a component (this is a limitation of gschem and will
703 eventually be fixed).
705 You can also place embedded components directly in the Add
706 Component... dialog box.
708 \item {\bf Show Hidden Text} This operation makes all hidden/invisible
709 text visible. To use it, simply pick the option (or type its
710 shortcut) and all the invisible text will appear. Visible text is
711 unaffected by this operation.
713 This operation is useful when drawing/debugging symbols.
715 When hidden text is visible, the text "Show Hidden" will appear in
716 the lower, righthand corner.
718 \end{itemize}
720 \subsection{View operations (Zoom/Pan/Redraw etc...)}
722 \begin{itemize}
723 \item {\bf Redraw} This option redraws the current display. This is
724 useful when you have mouse/component/line/text etc... droppings left
725 over from a previous action. It is also useful when you want to
726 update all visual connectivity cues.
728 \item {\bf Pan} Pan lets you move around the display.
730 To pan the display (picking View/Pan off of a menu):
731 \begin{enumerate}
732 \item Select View/Pan off the menu
733 \item Click the first mouse button at the new center of the display.
734 \end{enumerate}
735 To pan the display using the shortcut is much simpler, simply type
736 the shortcut and the display will pan the display to the current
737 mouse location.
739 You can also enable mouse panning if you add:
741 {\tt (third-button "mousepan")}
743 to one of the gschemrc files. See the section on the resource file
744 for more info. Mouse panning is very nice for small schematics, but
745 tends to lag on larger ones.
747 \item {\bf Zoom box} Zoom box allows you to specify a zoom window for
748 zooming in.
750 To use the zoom box (picking View/Zoom box off of a menu):
751 \begin{enumerate}
752 \item Select View/Zoom box off the menu
753 \item Click and hold the first mouse button
754 \item Drag the mouse drawing the zoom box around the area you want to
755 zoom
756 \item Release the mouse button and the display will zoom
757 \end{enumerate}
758 To use the zoom box by typing the shortcut is similar. Once you type
759 the shortcut, the zoom box will start immediately using the current
760 mouse location as the first corner of the box.
762 Zoom box will attempt to zoom the requested area, but some boxes are
763 not legal and gschem will do it's best to zoom the requested area.
765 \item {\bf Zoom limits} Zoom limits will zoom the display attempting
766 to fit all the placed objects on the screen.
768 Simply pick View/Zoom limits off of a menu or type its shortcut and
769 the display will be redrawn.
771 There are the special cases (like a single horizontal line) which
772 sometimes do not display correctly (or as expected). Hopefully
773 these exceptions will be fixed someday.
775 \item {\bf Zoom In} \\
776 {\bf Zoom out} Zoom In/Out zoom the display using the picked mouse
777 location as the center of the display (or the current mouse location
778 if using the shortcut). These commands always zoom in/out by a
779 factor.
781 To use Zoom In/Out (picking View/Zoom box off of a menu):
782 \begin{enumerate}
783 \item Pick Zoom In/Out off of the menu
784 \item Click the first mouse button as the center of the zoom
785 \end{enumerate}
786 Using the shortcut is similar except that the current mouse position
787 serves as the center of the new display.
789 \item {\bf Zoom full} Zoom full will zoom the display to the maximum
790 possible displayable view.
792 Simple select it off of a menu or type it's shortcut and the display
793 will be zoomed.
795 \end{itemize}
797 \subsection{Hierarchy operations (...)}
799 \begin{itemize}
800 \item {\bf Down Schematic} Go down into a symbol, opening up any
801 underlying schematics. Basically this will open up an underlying
802 schematic of the selected component if it exists in the source
803 library search path. See the Resource File section on how to define
804 this path.
806 There are currently two ways of specifying that a symbol has an
807 underlying schematic or schematics:
809 \begin{enumerate}
810 \item The underlying schematic must have the same name as the symbol
811 but have a .sch extension and must follow the \_\# suffix naming
812 convention. See the Files section below on this convention.
814 \item Attach an attribute to the symbol called {\tt source=filename.sch}
815 filename.sch is not a path to the symbol, but rather the basename
816 (last file in the path specifier) of the symbol path. The
817 underlying schematic will still be searched in the source-library
818 path. You can specify multiple {\tt source=} attributes. The underlying
819 schematics will be opened in the order that the {\tt source=} attribute is
820 found.
821 \end{enumerate}
822 If there multiple underlying schematics, they will be loaded.
823 Movement between the schematic pages is restricted (to the same
824 level of the same set of underlying schematics) unless the rc
825 keyword enforce-hierarchy is modified to allow for a freer hierarchy
826 traversal mode. See the Resource File section for more info.
828 It is also recommend that you maintain unique names for the various
829 levels (when using the {\tt source=} attribute) to avoid possible
830 confusion. The hierarchy mechanisms are fairly new so expect some
831 odd behavior (and please report it)
833 \item {\bf Down Symbol} This option will open up the symbol of the
834 selected component.
836 Once the symbol is open, the user can edit it and save it.
838 At this time, the toplevel schematic will not see the symbol change
839 unless the toplevel schematic is reloaded or File/Revert is
840 executed. This will be fixed eventually.
842 \item {\bf Up} This option will move up the hierarchy (if there are
843 pages above the currently displayed page).
845 \item {\bf Documentation} Open any documentation available for the
846 selected symbol/component.
848 The job is handed over to "gschemdoc", which makes a best-effort
849 attempt of finding relevant documentation.
851 The documention would normally be in PDF, HTML, text or image
852 format, but gschemdoc tries to be as transparent as possible on this
853 account.
855 First and foremost, the attribute "{\tt documentation=}" is assumed to
856 point to the documentation. This attribute should either be the
857 filename (basename) of the document, or it should be a complete URL.
859 If it is a filename, and the file is found locally (in
860 /usr/share/gEDA/documentation or otherwise), the relevant viewer
861 will be initiated. Otherwise, a Google search for the document will
862 be initiated.
864 If there is no documentation attribute, the attributes "device" and
865 possibly "value" will be consulted in much the same way as for
866 "documentation". File searches will be made in forms of filenames
867 like "device-value.pdf" and "device.pdf".
869 Failing that, the file name for the symbol itself will be used as
870 basis for the search.
872 \end{itemize}
874 \subsection{Attribute operations (Attach/Detach/Toggle visibility etc...)}
875 An attribute is nothing more than a text item which is in the form
876 {\tt name=value}. It can be either unattached or attached.
878 The operations in this group manipulate attributes only.
879 Most of these operations have no effect on plain text objects.
881 \begin{itemize}
882 \item {\bf Attach} The Attach command allows you to take a text item
883 (in the proper form; {\tt name=value}) and attach it to another object.
885 To use Attributes/Attach:
886 \begin{enumerate}
887 \item Select the object which will receive the attributes
888 \item Select the text object(s) which will be attached to the above
889 object
890 \item Pick or type the shortcut for Attributes/Attach
891 \end{enumerate}
892 The order of the sequence of selecting the object and then the text
893 items is important; gschem will not allow you to select the text items
894 first and then the object. After going through the above sequence the
895 text item will turn yellow (or the current attached attribute color)
896 signifying that the text item is an attached attribute.
898 You cannot attach a single attribute to several different objects.
899 You cannot attach non-text items as attributes.
901 \item {\bf Detach} Detach allows you to deassociate attributes from
902 objects.
904 To deselect an object of all attributes:
905 \begin{enumerate}
906 \item Select the object of interest
907 \item Pick or type the shortcut for Attributes/Detach
908 \end{enumerate}
909 All the attached attributes (even if they are not selected) will be
910 detached from the object. This behavior is probably broken and will
911 eventually be fixed (so that only selected attributes are detached).
913 When you detach attributes then they turn red (or the current detached
914 attribute color). This color changes allows you to spot text which
915 was an attribute and is now dangling (unattached).
917 \item {\bf Show Value}\\
918 {\bf Show Name} \\
919 {\bf Show Both} These operations allow you to control which part of
920 the attribute string is visible. Usually you are just interested in
921 seeing the value of the attribute, but there are circumstances where
922 seeing the name and value (or maybe just the name) would be useful.
924 To use the options:
925 \begin{enumerate}
926 \item Select the attribute(s) of interest
927 \item Pick or type the shortcut for Attributes/Show *
928 \end{enumerate}
929 The text item(s) should immediately change.
931 These operations only work on text items which are in the form
932 {\tt name=value}
934 \item {\bf Toggle Vis} This operation allows you to toggle the
935 visibility of attributes.
937 To use this option:
938 \begin{enumerate}
939 \item Select the text item(s) of interest
940 \item Pick or type the shortcut for Attributes/Toggle Vis
941 \end{enumerate}
942 The text item(s) should change their visibility immediately.
944 If you make an attached attribute invisible, then you can simply
945 select the parent object and select Toggle Vis and the attribute will
946 be come visible (likewise any visible attributes attached to that
947 object will become invisible).
949 If you make a free floating (unattached) attribute invisible, then the
950 only way to make it visible (and all other invisible attributes) is to
951 use the Edit/Show Hidden Text option.
953 \end{itemize}
954 \subsection{Buffer operations}
955 Gschem supports 5 copy/cut/paste buffers which are visible across all
956 opened pages and windows.
958 \begin{itemize}
959 \item {\bf Copy} To copy something into a buffer:
960 \begin{enumerate}
961 \item Select the objects you want to copy.
962 \item Select Buffer/Copy/Copy into buffer \#.
963 \end{enumerate}
965 \item {\bf Cut} Cut is like copy in that it removes the objects from
966 the schematic
968 \item {\bf Paste} To paste a buffer into the current schematic:
970 \begin{enumerate}
971 \item Fill the buffer using the above Copy or Cut.
972 \item Go to the new schematic page/window.
973 \item Select Buffer/Paste/Paste from buffer \#.
974 \item Click the first mouse button to pick an anchor point.
975 \item Move the mouse to the final spot.
976 \item Click the first mouse button again.
977 \end{enumerate}
979 \end{itemize}
981 \subsection{Option changing (text size/gridding/snap etc...)}
983 \begin{itemize}
984 \item {\bf Text Size...} This command pops up a dialog box which
985 allows you to specify the text size of all text (including
986 attributes placed with the Add/Attribute... dialog box).
988 The text size is in points (1/72"). The default text size is 10
989 point text. The smallest text size is 2 points.
991 \item {\bf Toggle Grid} Toggles the visible grid
993 \item {\bf Toggle Snap} Toggles the snap. Be very careful using this.
994 Connections between pins and nets (and nets to nets) depends on
995 being exactly connected. Turning of the grid will almost guarantee
996 that nets/pins do not connect.
998 Before you translate a symbol using Edit/Symbol Translate, make sure
999 the snap is on.
1001 When snap mode is off, the text "Snap Off" will appear in the lower,
1002 righthand corner.
1004 \item {\bf Snap Grid Spacing...} This option brings up a dialog box
1005 which allows you to change the snap grid spacing (not the grid
1006 spacing). The units for this spacing are mils.
1008 Before you translate a symbol using Edit/Symbol Translate, make sure
1009 this spacing is set to 100.
1011 \item {\bf Toggle Outline} Toggles between drawing the outline of the
1012 current selection or just drawing a box when doing
1013 moves/copies/component and text places. The outline mode looks
1014 better, but tends to be significantly slower than using the box
1015 (bounding box) mode.
1017 \item {\bf Show Log Window} This option displays the log window if it
1018 has been closed or disabled from being displayed when you start up
1019 gschem.
1021 \item {\bf Show Coord Window} This option displays a dialog box which
1022 displays the current x, y location of the mouse pointer in screen
1023 (pixels) and world coordinates (mils)
1025 \end{itemize}
1027 \subsection{Grips}
1028 Grips are a mechanism used in gschem to provide an easy way of
1029 modifying objects inside schematics. When you select an object,
1030 little squares are placed in strategic locations (line end points or
1031 circle radius point or corners of a box) which allow you to change the
1032 object quickly. Grip support currently exists for lines, nets, pins,
1033 buses, circles, and boxes. Arcs do not yet have grips, but will
1034 eventually have them.
1036 Using grips is easy:
1037 \begin{enumerate}
1038 \item Select the object you want to change. The grips (the little
1039 boxes) will appear.
1041 \item Click and hold the first mouse button inside the box.
1043 \item Move the mouse around till you have the object where you want it
1045 \item Release the mouse button.
1046 \end{enumerate}
1048 \section{Files used/created by gschem}
1049 There are several files which gschem uses. Here is a list and a brief
1050 explanation of each:
1051 \begin{itemize}
1052 \item {\tt *.sch} Schematic files. These files contain components,
1053 nets, text, and sometimes primitive objects (like lines, circles,
1054 box etc...) Schematics do not contain pins. Schematic filenames
1055 should follow this convention: {\tt name\_\#.sch} where:
1056 \begin{itemize}
1057 \item {\tt name} is a text string which describes what this schematic contains.
1059 \item {\tt \_\#} is an underscore and a number (like {\tt \_1}, {\tt
1060 \_2}, {\tt \_7}, {\tt \_13}, etc...) This number is used to
1061 sequence schematic pages in a multiple page schematic.
1063 \item {\tt .sch} is the schematic extension/suffix. It is important
1064 the schematic pages have this extension.
1065 \end{itemize}
1067 Schematic files are pure ASCII and will always be pure ASCII. gEDA
1068 does not support any binary file formats. The file format for
1069 schematics is described in the gEDA file formats document.
1072 \item {\tt *.sym} Symbol files. The schematic and symbol file formats
1073 are identical. gschem (or a text editor) is used to create symbol
1074 files as well as schematics. Symbol files contain lines, circles,
1075 boxes, arcs, pins, text, and attributes.
1077 The naming convention for symbol files is: {\tt name-\#.sym} where:
1078 \begin{itemize}
1079 \item {\tt name} is a text string which describes what the symbol
1080 represents.
1082 \item {\tt -\#} is a dash and a number (like {\tt -1}, {\tt -2}
1083 etc...) The number is used to allow for a symbols to have the
1084 same name yet different contents. There might be multiple
1085 representations for resistors so these symbols should be called:
1086 {\tt resistor-1.sym}, {\tt resistor-2.sym}, and {\tt resister-3.sym}.
1088 \item {\tt .sym} is the symbol extension/suffix. It is important
1089 the symbols have this extension.
1090 \end{itemize}
1092 The way of specifying hierarchy is by using the {\tt source= attribute}.
1093 Please see the master attribute document for info on this mechanism.
1095 The hierarchy mechanism is still in heavy flux, so there might be
1096 some more changes.
1098 \item {\tt system-gschemrc}\\ {\tt ~/.gEDA/gschemrc}\\ {\tt gschemrc}
1099 Resource files. These contain guile (scheme) keywords which control
1100 the various configurable parameters. All three files may exist and
1101 are searched in the above listed order. {\tt system-gschemrc}
1102 contains system wide defaults. {\tt ~/.gEDA/gschemrc} lives in each
1103 users home directory and contains project wide defaults. {\tt
1104 gschemrc} lives in each project directory and contains project
1105 specific defaults. See the section below on the resource file for
1106 more info.
1108 \item {\tt gschem.log} Log file. This file contains informative,
1109 error, warnings etc... messages when gschem was run. This file is
1110 created in the working directory that gschem was started in. This
1111 allows the user to preserve log files between independent projects.
1113 \end{itemize}
1114 TBA: Suggested format for projects
1118 \section{Electrical connectivity }
1119 As you draw schematics you need be aware of what is considered
1120 to be electrically connected by the gEDA programs.
1122 Nets which are visually connected to other nets are electrically
1123 connected. This connection may be endpoint to endpoint or endpoint to
1124 midpoint. When a single endpoint to endpoint (net or pin endpoint)
1125 connection is drawn then the visual dangling net cue disappears. When
1126 an endpoint ends in the middle of another net (or multiple endpoints
1127 coming together at a single point) then a circular filled connectivity
1128 cue is drawn. You cannot connect a net to the middle of a pin. Nets
1129 can only be connected to the endpoints of pins. You cannot connect to
1130 a net if that net is not orthogonal (horizontal or vertical). The
1131 visual cues are the primary way of telling if nets/pins are connected.
1133 Bus are similar to nets with the exception that you cannot connect a
1134 net to the endpoint of a bus (only to the middle). If you do try to
1135 connect a net to the end of a bus you will see a big red X at the
1136 invalid endpoint connection. Buses are still very new so there are
1137 still many quirks.
1139 You can label nets by using the {\tt label=} attribute. Do not attach more
1140 than one {\tt label=} to a net. You only need to attach the {\tt label=} attribute
1141 to one net segment. Different nets (i.e. multiple net segments which
1142 aren't connected together) which have the same attribute {\tt label=}
1143 attached to them are also considered electrically connected. You will
1144 not get any indication of this connection by gschem, but the netlister
1145 (gnetlist) considers nets with the same {\tt label=} attribute electrically
1146 connected. The naming convention for buses has not been formalized
1147 yet.
1149 More TBA
1151 \section{Dialog boxes}
1154 \section{Components/symbols}
1155 A component or symbol represents something. Usually it represents a
1156 gate, a black box or block, or an entire device. A symbol is a
1157 collection of primitives which are grouped together. You can use
1158 lines, boxes, circles, arcs, text, attributes and pins as the
1159 primitives for building symbols. You cannot have nets, buses, or
1160 other symbols inside a component.
1162 Components are searched for by specifying (component-library "...")
1163 inside one of the *rc files. See below for more info.
1165 More to TBA
1167 \section{Attributes}
1168 An attribute is nothing more than a text item which is in the form
1169 {\tt name=value} (there cannot be any space to the left or right of the
1170 name,value pair). It can be either unattached or attached.
1171 Attributes are used extensively in the gEDA project to convey
1172 information. Things like device name, pin numbers, hidden nets, and
1173 unit reference numbers are specified using attributes. For a list of
1174 attributes be sure to look at the attributes.txt document.
1176 There are two kinds of attributes:
1177 \begin{enumerate}
1178 \item Regular attached attributes. These are attributes which take on
1179 the standard form and are attached to some object (pin, net,
1180 component, or box etc...). These attributes are usually yellow in
1181 color.
1183 \item Unattached attributes. These are attributes which take on the
1184 standard form, but are not attached to any object. These attributes
1185 are also known as floating or toplevel attributes.
1186 \end{enumerate}
1188 Regular attached attributes are attached to an object to associate the
1189 info with a specific object. For example: a pin number associated
1190 with a pin. Unattached attributes usually convey some information
1191 which is global in nature. For example: a {\tt device=} attribute (which
1192 lives inside symbols) and specifies what device the entire symbol
1193 represents.
1195 There is a third type of attribute which is a special case of \#2 but
1196 turns into \#1. This special type of attribute is known as a promoted
1197 attribute. If you place an unattached visible attribute inside a
1198 symbol and then instantiate that symbol, then that unattached
1199 attribute gets "promoted" to an attached attribute. This newly
1200 promoted attribute gets attached to the symbol. This mechanism of
1201 attribute reattachement (from within a symbol) is known as attribute
1202 promotion.
1204 There are some gotchas about attribute promotion:
1205 \begin{itemize}
1206 \item Promotion *only* happens when the symbol is placed. That means
1207 that if you place a symbol (sym1) and then change it on disk (by
1208 adding or removing floating attributes), existing sym1's will not
1209 reflect these new floating attributes (ie they won't be promoted) in
1210 any schematic.
1212 \item The {\tt device=} attribute is not promoted.
1214 \item Invisible attributes are not promoted by default. If you attach
1215 a floating attribute (like {\tt numslots=\#}) and make it invisible, it will
1216 not be promoted. Now, in order to make everybody happy, this behavior
1217 is configurable. If you add:
1218 \begin{verbatim}
1219 (promote-invisible "enabled")
1220 \end{verbatim}
1221 to the {\tt *gschemrc} files (or editing {\tt system-gschemrc}),
1222 invisible floating attributes will also be promoted (and in memory
1223 removed)
1225 However, if you enable this, then component slotting will break,
1226 because gschem expects certain floating attributes to be inside the
1227 symbol (in memory even though they are invisible). So you can add:
1228 \begin{verbatim}
1230 (keep-invisible "enabled")
1231 \end{verbatim}
1232 to the {\tt *gschemrc} files (or editing {\tt system-gschemrc}). This is enabled
1233 by default, but has no effect unless promote-invisible is enabled.
1234 \end{itemize}
1236 So, to summarize, attribute promotion takes floating attributes inside
1237 symbols and attaches them to the outside of a placed symbol. Three
1238 *rc keywords control this behavior: attribute-promotion,
1239 promote-invisible, and keep-invisible.
1241 \section{Resource File}
1242 Gschem is highly configurable. All configuration is handled through
1243 a scheme based rc file. Gschem looks for three rc files:
1245 \begin{itemize}
1246 \item {\tt system-gschemrc}: This is usually installed in
1247 {\tt /usr/share/share/gEDA} and is required for gschem to run.
1249 \item {\tt \$HOME/.gEDA/gschemrc}: A per user file. Users should put
1250 defaults in this file they want to apply to all sessions.
1252 \item local directory {\tt gschemrc}: This file holds the per project
1253 defaults. Things like component-library or source-library
1254 keywords go into this file.
1256 \end{itemize}
1257 The order of searching for these three files is as above (first {\tt
1258 system-gschemrc}, then {\tt \$HOME/.gEDA/gschemrc}, and finally the
1259 local {\tt gschemrc}).
1261 A few rules about changing the files:
1262 \begin{itemize}
1263 \item Don't break any syntax rules. Doing so will cause the scheme
1264 interpreter (guile) to stop interpreting.
1266 \item Keywords/defaults always override what came before, with the
1267 exception of cumulative keywords (like component-library).
1268 \end{itemize}
1270 For more info as to what can be configured, please look in
1271 {\tt system-gschemrc}.
1273 More TBA.
1275 \end{document}