1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./style.css" />
6 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./design.css" />
7 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"./print.css" />
9 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
14 <em>Translations of this page are also available in the following languages:
</em> <a href=
"geda-faq-gschem.fr.html" class=
"wikilink1" title=
"geda-faq-gschem.fr.html">Français
</a>,
<a href=
"geda-faq-gschem.ru.html" class=
"wikilink1" title=
"geda-faq-gschem.ru.html">Русский
</a>.
17 <h1 id=
"general">General
</h1>
22 <h2 id=
"ifoundabugwhatcanidoaboutit">I found a bug! What can I do about it?
</h2>
25 <li class=
"level1"><div class=
"li"> See if you can reproduce the bug.
</div>
27 <li class=
"level1"><div class=
"li"> Ask on the geda-user mailing list if there is a work around, or has been dealt with in the bleeding edge version of gEDA/gaf. Note, that you must subscribe to the geda-user e-mail list before you can post to this list.
</div>
29 <li class=
"level1"><div class=
"li"> See whether the issue is already in the bug tracking system of geda/gaf. If not, file a bug report. Make sure to give all information necessary to reproduce the bug and add the version of gEDA/gaf that contains the bug.
</div>
31 <li class=
"level1"><div class=
"li"> Finally, as with all open source projects, you may flex your programming muscles and try to fix the bug yourself. Please file a patch of the changes you had to make to the BTS of geda/gaf. The patch will be gladly accepted to improve the next release of gEDA/gaf.
</div>
37 <h1 id=
"gschemusage">Gschem usage
</h1>
42 <h2 id=
"thereisnosymbolinthechooserdialog">There is no symbol in the chooser dialog!
</h2>
46 The chooser dialog presents a list of captions of the library sections. Click on the right-pointing triangle to the left of caption. This will expand the list. Scroll down to the symbol you want to add to the schematics.
51 <h2 id=
"howdoimoveacomponent">How do I move a component?
</h2>
54 <li class=
"level1"><div class=
"li"> Select the component by clicking it with the left mouse button. The component will highlight.
</div>
56 <li class=
"level1"><div class=
"li"> Drag the component (using the left mouse button) to the place you want it.
</div>
62 <h2 id=
"howdoimovecomponentswithoutdraggingatailofconnectednets">How do I move components without dragging a tail of connected nets?
</h2>
66 Type [or] to toggle this behaviour. That is, the
"o
" key followed by the
"r
" key. The status window will report if the toggle command was performed. The command can also be accessed via the Options menu.
71 <h2 id=
"howdoichangethesizeofthetextonasymbol">How do I change the size of the text on a symbol?
</h2>
74 <li class=
"level1"><div class=
"li"> Select the symbol.
</div>
76 <li class=
"level1"><div class=
"li"> Right click → down symbol (or do Hierarchy → down symbol). This takes you to the symbol editor.
</div>
78 <li class=
"level1"><div class=
"li"> Select the pinnumber you want to change.
</div>
80 <li class=
"level1"><div class=
"li"> Do Edit → Edit Text (or type keyboard shortcut
"ex
").
</div>
82 <li class=
"level1"><div class=
"li"> Change the font size in the pop-up box.
</div>
84 <li class=
"level1"><div class=
"li"> Repeat for all desired text elements.
</div>
86 <li class=
"level1"><div class=
"li"> File → save
</div>
88 <li class=
"level1"><div class=
"li"> Right click → up (or Hierarchy → Up). Now you are back in the schematic editor.
</div>
90 <li class=
"level1"><div class=
"li"> With the symbol still selected do Edit → Update component (or use the keyboard shortcut “ep”). If this doesn’t work, just delete the symbol and reload it.
</div>
95 More generally, you can use this procedure to edit anything on a symbol. (Substitute “Edit Text” for your desired edit, of course.)
100 <h2 id=
"isitpossibletooverlinetextingschem">Is it possible to overline text in gschem?
</h2>
104 Yes, overbars are possible. A backslash followed by an underscore will start an overlined section of text. A second backslash-underscore combo will return to normal text. Example: Double click on an attribute and type
"\_this\_
".
108 Note, on transfer to pcb, there will be no overline on the layout.The backslash is ignored, which leaves an underscore at the edges of the overlined text.
113 <h2 id=
"howdoiunlockalockedcomponent">How do I unlock a locked component
</h2>
117 When a component is locked it cannot be selected with the middle mouse button; however it is selectable using a window select. To window select a component, click and hold the left mouse button and drag the mouse to create a rectangular region containing the component to be unlocked. Execute the command
<strong><em>Edit
</em></strong> <strong>→
</strong> <strong><em>unLock
</em></strong> to unlock the component.
122 <h2 id=
"howcanigetrefdesautomaticallynumberedwhenidrawaschematic">How can I get refdes automatically numbered when I draw a schematic?
</h2>
126 Edit the system-gschemrc file or place the following into a gschemrc file (either
<strong><code>~/.gEDA/gschemrc
</code></strong> or a
<strong><code>gschemrc
</code></strong> file in the local directory where you invoke gschem):
128 <pre class=
"code">(load (string-append geda-data-path
"/scheme/auto-uref.scm
")) ; load the autonumbering script
129 (add-hook! add-component-hook auto-uref) ; autonumber when adding a component
130 (add-hook! copy-component-hook auto-uref) ; autonumber when copying a component
</pre>
134 <h2 id=
"whatisabusandhowdoiuseit">What is a Bus and how do I use it?
</h2>
138 A
'bus
' is purely decoration. The netlister ignores it. The netname= attribute does actual work of connecting points together--this is what gnetlist reads and transforms into your netlist. It is not possible to connect to a discrete line or
'bit
' on a bus because, again, the bus is merely a graphical entity.
142 Some users have found it helpful to organize their nets by incorporating a bus name into the net name. For example
"net=busA:
1" may be added to each busripper to aid in sorting out the nets.
147 <h2 id=
"whatarethemousebindingsingschem">What are the mouse bindings in gschem?
</h2>
154 <li class=
"level1"><div class=
"li"> Left mouse button is used for picking and drawing.
</div>
156 <li class=
"level1"><div class=
"li"> Middle mouse button is either move object (just hold down the middle button over an object and move the mouse) or copy object (ALT key held down while holding down the middle button over object and move the mouse).
</div>
158 <li class=
"level1"><div class=
"li"> Right mouse button is a popup menu.
</div>
163 You can change the middle button by adding the following to a gschemrc file:
165 <pre class=
"code">(middle-button
"action
") ;default binding, move or copy an object
</pre>
170 <pre class=
"code">(middle-button
"stroke
") ;draw mouse gestures/strokes (must install libstroke to enable
</pre>
175 <pre class=
"code">(middle-button
"repeat
") ;repeat the last command executed
</pre>
178 You can change the right button by adding the following to a gschemrc file:
180 <pre class=
"code">(third-button
"popup
") ;default binding, show a popup menu
</pre>
185 <pre class=
"code">(third-button
"mousepan
") ;use the mouse to pan around the schematic
</pre>
188 For more information on these options, please see the
<code>${install_prefix}/share/gEDA/system-gschemrc
</code> file.
193 <h2 id=
"cangschemdohierarchicaldesignswithsubsheets">Can gschem do hierarchical designs with sub sheets?
</h2>
197 Yes. Sub sheets are represented by special symbols on the top level schematic. You can find an example for a hierarchical design in the doc section of gschem (
<code>geda-doc/examples/gTAG/gTAG.sch
</code>). Currently, there is no way to automatically build a sub sheet symbol from an actual sub sheet. The sub sheet symbol has to be drawn manually. Any patches or external scripts that get the job done would be greatly appreciated.
201 A
<code>source=
</code> attribute attached to the sub sheet symbol gives the path to the sub sheet file. The pins of the symbol correspond to ports from top sheet to sub sheet. These ports should correspond to a refdes of a port symbol on the sub sheet. The port symbols in the default library of geda are
<code>in-
1.sym
</code> and
<code>out-
1.sym
</code>. Use the hierarchy menu to navigate within the hierarchy of sub sheets. Alternatively, you can navigate with the page manager.
205 To convert a hierarchy to a netlist just call gsch2pcb on the top level schematic. By default, net names and refdes
's of components are strictly local to the subsheet. They get the sub sheet symbol refdes as a prefix when inserted into the net list. You can even use multiple instances of a sub sheet symbol without undue short cuts. Whether or not net names and refdes
's are mangled and thus local to the sub sheet can be configured in the config file gnetlistrc. Copy the corresponding lines from
<code>system-gnetlistrc
</code> to
<code>gnetlistrc
</code> in the current working directory or to
<code>$HOME/.gEDA/gnetlistrc
</code>. A convenient configuration is to make nets delivered by power symbols global while ordinary nets remain local to the sub sheet. This can be achieved with
"hierarchy-netattrib-mangle
" enabled.
210 <h2 id=
"cangschemdoahierarchywherethetop-levelsymbolpointstoamulti-pageschematic">Can gschem do a hierarchy where the top-level symbol points to a multi-page schematic?
</h2>
214 Yes. Just attach the
<code>source=
</code> attribute multiple times with different values. Drill down into
215 the schematic from the symbol, then use [page-up] / [page-down] to navigate through the pages on that level.
220 <h2 id=
"canthehierarchybesetupinmultipledirectories">Can the hierarchy be setup in multiple directories?
</h2>
224 Yes. Make sure, the
<code>(source-library
"...
")
</code> and
<code>(component-library
"...
")
</code> declarations in your gafrc file list the appropriate paths.
229 <h2 id=
"howdoideclareaglobalnet">How do I declare a global net
</h2>
233 All netnames are global with regard to the current sheet. Whether or not netnames are global in a hierarchical stack of schematics, depends on the
234 settings in gnetlistrc. This file can reside in $HOME/.gEDA or locally next to the schematics. Defaults are set in system-gschemrc. Copy the
235 respective lines to your local gnetlistrc, if you want a different behavior.
239 There is no way to make individual netnames global. However, you can differentiate between netnames granted to nets the
240 netname attribute and netnames defined by the net attribute. This aims at power symbols, which set their net with the net attribute. That way, you
241 don
't need to hand the power nets in the sub sheet symbols.
246 <h2 id=
"howcanoptionsandlibrariesbespecificonsubsheetlevel">How can options and libraries be specific on subsheet level?
</h2>
250 When opening schematics, libgeda changes directory. So it should load any gafrc in the sub-dirs too, as and when the schematics
256 <h2 id=
"aretherelimitationstohierarchydesign">Are there limitations to hierarchy design?
</h2>
260 Although support for subsheets covers many aspects of hierarchical design, there are some limitations:
263 <li class=
"level1"><div class=
"li"> Buses cannot connect into subsheets.
</div>
265 <li class=
"level1"><div class=
"li"> There is no GUI way to start subsheets. You need to manually create a separate symbol for each subsheet.
</div>
270 Feel free to fix these issues. Contributions are welcome.
275 <h1 id=
"gschemsymbols">gschem symbols
</h1>
280 <h2 id=
"wheredoifindsymbolsbeyondthedefaultlibrary">Where do I find symbols beyond the default library?
</h2>
284 There is a website gedasymbols.org dedicated to user contributed resources for gEDA. You can search the site, preview symbols and download them individually. If you have configured your gafrc files accordingly you can put the symbols right next to the schematics file of your project. You might want to build a local library of symbols, so all projects can access the new symbols. See
<a href=
"geda-faq-gschem.html#can_gafrc_use_a_variable_to_set_the_root_of_my_library" class=
"wikilink1" title=
"geda-faq-gschem.html">below
</a> for the details.
288 You can even download all user contributed content from gedasymbols. See the instructions on how to
289 access gedasymbols using CVS.
294 <h2 id=
"whatsthisbusinessaboutheavyvslightsymbols">What
's this business about heavy vs. light symbols?
</h2>
298 This nomenclature arose from a discussion which frequently appears on the geda-user and geda-dev mailing lists. A light symbol is one which contains very few built-in attributes in the symbol itself. It requires that the user attach almost all attributes at the schematic level (e.g. using either gschem or gattrib). A heavy symbol is one which contains many attributes (such as package footprints, SPICE model names, etc.) built into the symbol file itself. A heavy symbol therefore requires very little attribute attachment at the schematic level – you just place it and you’re done.
302 The debate between proponents of heavy and light symbols is very detailed and involved. Briefly, proponents of heavy symbols believe that they provide better integration between gschem and PCB since the important layout attributes (such as
<a href=
"geda-pcb_tips.html#i_want_to_use_pcb_to_do_layout._how_do_i_know_what_value_to_use_for_the_footprint_attribute" class=
"wikilink1" title=
"geda-pcb_tips.html">footprint name
</a>) are already built into the symbol. This is considered a good thing for new users (noobs) who just want to design a simple board and don’t appreciate or don’t care about the zillions of variations that even a simple resistor might have (e.g. different footprint, TCR, precision, material composition, etc). Proponents of light symbols prefer to deal with attributes at the schematic level because they believe it to be more flexible. They are quick to point out that a library of heavy symbols will quickly grow into the thousands of parts with grotesquely long names trying to distinguish between the different variations of the part. They also point out that the utility “gattrib” is the preferred tool for dealing with attributes at the schematic level (i.e. in the .sch file).
306 GEDA/gaf, as default configured, uses light symbols, although it can be configured to use heavy symbols. For further information, you may read these discussions from the geda-user mailing list:
310 http://archives.seul.org/geda/user/Jun-
2005/msg00001.html
314 http://archives.seul.org/geda/dev/Oct-
2005/msg00043.html
318 http://archives.seul.org/geda/user/Dec-
2007/msg00146.html
323 <h2 id=
"iamloadedasymbolfromthelibraryhowcomeitisnotalignedtothegrid">I am loaded a symbol from the library. How come it is not aligned to the grid?
</h2>
327 The vast majority of symbols in the library is designed for
100 units grid. Make sure, your grid is set to
100 units. Choose
"Snap_Grid_Spacing
" in the options menu for a dialog to check and change the grid.
331 The symbols in the symbol library, were contributed by users just like you. Some people use different grid settings than other people (e.g.
50 units rather than
100). If you discover a symbol which seems to be off the grid, try to reduce your grid spacing and move the hot spots of the pins so that they sit on the grid. Then revert to your preferred grid settings. In addition, you may send the corrected symbol to the mailinglist geda-user
335 The symbols at gedasymbols.org are even more adapted to the specific preference of their author.
336 Yes, the gEDA docs strongly suggest that symbols use
100 units grid spacing. But everybody likes to do things their own way, and there is no overall symbol dictator to enforce the rules on contributed symbols. That said, the vast majority of symbols out there conform to the recommendation. You just need to be aware of this possibility.
341 <h2 id=
"isthereanexplicitnoconnectsymbolthaticanshouldplaceintheschematictopreventgnetlistfromthinkingiveforgottenaconnection">Is there an explicit
"no connect
" symbol that I can/should place in the schematic to prevent gnetlist from thinking I
've forgotten a connection?
</h2>
345 Answer: misc → nc-left, nc-right, nc-top, nc-bottom.
349 Caution: occasionally this may create a net called “no_connect” (or “NC??
") which may lead to no-connect pins being connected together in gnetlist – which you probably
<em class=
"u">don’t
</em> want to happen.
353 If you want an entire symbol to be graphical (no elec. connections) , add a
"graphical=
1" attribute. The netlister will ignore these symbols entirely.
358 <h2 id=
"howdoipromoteaninvisiblesymbolattributeintotheschematic">How do I promote an invisible symbol attribute into the schematic?
</h2>
362 Most attributes living in the symbol do not get promoted to the schematic unless they are visible. To promote invisible symbol attributes, look for the following keywords in the system-gafrc file:
364 <pre class=
"code">(attribute-promotion
"enabled
");
365 (promote-invisible
"disabled
") ; ⇐ This one
366 (keep-invisible
"enabled
")
</pre>
369 Add to your gafrc file:
371 <pre class=
"code">(promote-invisible
"enabled
")
</pre>
374 and you will get all the attributes promoted. The “keep-invisible” keyword will keep hidden those attributes that are hidden in the symbol file.
379 <h2 id=
"whatshouldidoaboutpowerpinsonmysymbolsmakethemvisibleexplicitorinvisibleimplicit">What should I do about power pins on my symbols: Make them visible (explicit) or invisible (implicit)?
</h2>
383 In the past, digital logic circuits often hid the power pin, and attached power nets using an attribute inside the symbol. Modern thought is that this is a bad practice (although religious wars still occasionally rage about this topic).
387 It’s marginally OK for an old logic circuit which is all
5V TTL to have hidden power and GND pins. If you only have +
5V on your board, then hiding the power pin can simplify your schematic somewhat. However, few designers design such circuits nowadays;
5V TTL (and
5V CMOS) are rapidly becoming antique technologies.
391 It’s always been unacceptable to hide the power pins on analog chips. First, analog often has multiple power connections (VCC, VEE) which need to be explicitly drawn out. Second, good design practice is to place decoupling caps on each and every power pin. Sometimes one places an inductor in series with power also. Since these should be drawn into the schematic, it is best done by attaching them to an explicit power pin. Therefore, one should never use hidden power pins for analog symbols.
395 New logic circuits often use multiple supplies for different chip sections (OVDD, DVDD, etc). It is also typical to have several logic families on a single board (
5V,
3.3V etc.). Therefore, it’s best to explicitly place and wire the power pins on the symbol. Hidden power pins are a recipe for disaster since you can all too easily misconnect a
5V part to a
3.3V power net, for example.
399 To paraphrase Nancy Reagan: Just say “no” to hidden power pins.
403 That said, it may still be useful to detach the power pins from the functional part of the symbol. To do so, define a separate power symbol and give it the same
<a href=
"geda-glossary.html" class=
"wikilink1" title=
"geda-glossary.html">refdes
</a> as the functional part. A run of gsch2pcb will treat the siblings properly as one single component. As neither gschem nor gsch2pcb explicitly know that the component is only complete with both symbols defined, you have to check yourself. With this workaround, you can draw all power related circuitry in one corner of the schematic where it does not interfere with the signal nets. In many cases this is advantageous with analog circuits.
408 <h2 id=
"isitpossibletohavezerolengthpins">Is it possible to have zero length pins?
</h2>
412 You can set both ends of the pin to the same coordinate. This will give you a pure red marker without a pin extending from it. Currently, the GUI won
't let you draw such a pin. Append the following line to a symbol file in a file editor:
414 <pre class=
"code">P
100 100 100 100 1 0 0</pre>
417 This is a zero size pin at the bottom left of the canvas. You can move it around, attach attributes, or copy it like any other pin. Unattached, it looks like a little red flag, while with a net attached it disappears. Gnetlist has no trouble treating it as a pin.
422 <h2 id=
"isthereaspecificationormanualforcreatinggschemsymbolswhereisit">Is there a specification or manual for creating gschem symbols? Where is it?
</h2>
426 Yes. It is the
<a href=
"geda-gschem_symbol_creation.html" class=
"wikilink1" title=
"geda-gschem_symbol_creation.html">Symbol Creation Guide
</a>.
431 <h2 id=
"isthereasymbolwizardingschem">Is there a symbol wizard in gschem?
</h2>
435 There is no wizard included in the gschem-GUI. But there are scripts which automatically create symbols from parameters given in a config file. One of these scripts is
<a href=
"geda-tragesym_readme.html" class=
"wikilink1" title=
"geda-tragesym_readme.html">tragesym
</a>. It is part of the default installation of geda. A short
<a href=
"geda-tragesym_tutorial.html" class=
"wikilink1" title=
"geda-tragesym_tutorial.html">tutorial
</a> will get you started with this tool.
439 One of the major contributors to the project wrote his own symbol creation script: djboxsym
443 Additionally, there is a tool (ibs2symdef.py) for generating symdef files for use with djboxsym from IBIS models. It is distributed with the PyBIS project: PyBIS wiki
447 Check the
<a href=
"geda-gschemsymbolgenerators.html" class=
"wikilink2" title=
"geda-gschemsymbolgenerators.html">gschem symbol generators
</a> page for others generators
453 <h2 id=
"wherecanifindinformationongschemsfileformat">Where can I find information on gschem
's file format?
</h2>
457 Unlike many other EDA software, the format of gschem is strictly human readable ASCII. This is deliberate, to facilitate scripting. It also allows for quick fixes with the text editor. The format of gschem files is described
<a href=
"geda-file_format_spec.html" class=
"wikilink1" title=
"geda-file_format_spec.html">here
</a>.
462 <h2 id=
"whyaresymbolssobig">Why are symbols so big?
</h2>
466 There is nothing in gschem that defines the absolute size of objects. The only connection to real world units is the file name of the various title blocks. For some long forgotten reason, the frame of the title block symbols named
"title-A4.sym
", or
"title-B.sym
" can contain only relatively simple circuits made of the symbols in the default library. If you
'd like to put a frame around more complex circuits just choose a title page symbol that fits.
470 When printing, gschem scales the output so that everything fits within the desired paper format. This paper format is completely independent of the title page symbol used in the schematic. So there is no need to scale the symbols themselves to make them fit a particular paper size.
471 Most people prefer to use title-A2.sym or title-A3.sym when printing to A4 sized paper. Some use title block symbols with no frame at all and draw a rectangle as needed (e.g. title-block.sym by Kai-Martin Knaak).
475 That said, there may be circumstances where you actually want scaled symbols. There is a number of options to achieve this:
478 <li class=
"level1"><div class=
"li"> DJ Delorie contributed a Perl script called scale-schematic on his pages in
<a href=
"geda-glossary.html" class=
"wikilink1" title=
"geda-glossary.html">gedasymbols.org
</a>.
</div>
480 <li class=
"level1"><div class=
"li"> Build your own library of symbols. This is not that far off, since many people end-up using exclusively their own symbols anyway.
</div>
486 <h1 id=
"gschemconfigurationcustomization">Gschem configuration/customization
</h1>
490 Gschem is configurable in more ways than can be described here. Look at
"system-gschemrc
" for suggestions what else can be done.
495 <h2 id=
"howdoiconfiguremylocalgafrctofindmylocalsymboldirectory">How do I configure my local gafrc to find my local symbol directory?
</h2>
498 <li class=
"level1"><div class=
"li"> Create a project directory, for example ${HOME}/myproj.
</div>
500 <li class=
"level1"><div class=
"li"> Place the symbols you want to use into ${HOME}/myproj/symbols.
</div>
502 <li class=
"level1"><div class=
"li"> Create a gafrc file in ${HOME}/myproj.
</div>
504 <li class=
"level1"><div class=
"li"> In gafrc, put this line:
<pre class=
"code"> (component-library
"./symbols
")
</pre>
507 <li class=
"level1"><div class=
"li"> Run gschem from your project directory ${HOME}/myproj. That is, do this to run gschem:
<pre class=
"code">cd ${HOME}/myproj
508 gschem myschematic.sch
</pre>
517 <li class=
"level1"><div class=
"li"> The guile stuff which processes your RC file doesn
't understand or expand shell wildcards like
"~
" or ${HOME}. It does understand
".
" as the current working directory, and it does understand absolute file paths. If you want to do something tricky, you can try to use Scheme functions to get directory information.
</div>
519 <li class=
"level1"><div class=
"li"> Make sure gafrc lives in your main project directory.
</div>
521 <li class=
"level1"><div class=
"li"> Run all gEDA programs from your main project directory.
</div>
523 <li class=
"level1"><div class=
"li"> Run the programs from the command line in a terminal shell -- don
't use any whizzy, shiny desktop icons to run gschem (if you have them) since you won
't know what directory gschem is starting in, and gschem might not find gafrc.
</div>
525 <li class=
"level1"><div class=
"li"> The key is: start gschem in the same directory as where your gafrc lives.
</div>
531 <h2 id=
"howcanisettherootofmylibrary">How can I set the root of my library?
</h2>
535 There are two approaches. If you want each of your library to have a unique name, you have to set it individually for each and every directory of your local lib in your gafrc file. However, you don
't have to repeat the absolute base path over and over. You can use the function
'build-path
' to concatenate the path on the fly:
537 <pre class=
"code">(define gedasymbols
"/path/to/local/library
")
538 (component-library (build-path gedasymbols
"analog
"))
539 (component-library (build-path gedasymbols
"block
"))
540 (component-library (build-path gedasymbols
"connector
"))
</pre>
543 If you don
't want to list separate subdirectories, you can only
544 set the name of a root directory using:
546 <pre class=
"code">(component-library-search
"/path/to/local/library
" "library:
")
</pre>
550 <h2 id=
"canthelibrarypathcontainenvironmentvariables">Can the library path contain environment variables?
</h2>
554 Use
<code>getenv
"ENV
"</code> to refer to the environment variable ENV inside the scheme stanzas of gafrc lines:
556 <pre class=
"code">; Define a path to the local repository:
557 (define symbolspath (build-path (getenv
"HOME
")
"geda
" "symbols
"))
558 ; Use the path to point to a specific component-library:
559 (component-library (build-path symbolspath
"analog
"))
</pre>
562 An alternative syntax is
<code>${ENV}
</code>:
564 <pre class=
"code">(component-library
"${HOME}/geda/symbols/analog
")
</pre>
568 <h2 id=
"isthereawaytogivealibraryanamethatdiffersfromitsdirectory">Is there a way to give a library a name that differs from its directory?
</h2>
572 Add a third argument to the component-library stanza in gafrc, e.g.:
574 <pre class=
"code">(component-library
"/home/comp/sch_symbols/AutoGen/Panasonic/
0603/
1P
" "Panasonic
0603 1P
")
</pre>
578 <h2 id=
"canmylocallibrarycoverfrequentlyneededsubcircuits">Can my local library cover frequently needed sub circuits?
</h2>
582 Yes, symbols can contain symbols and nets.
585 <li class=
"level1"><div class=
"li"> Copy the subcircuit to a fresh sheet. (unlock and remove the default title block as you won
't need it)
</div>
587 <li class=
"level1"><div class=
"li"> The values of refdes attributes should end with
"?
", to allow to auto number them later.
</div>
589 <li class=
"level1"><div class=
"li"> Move the sub circuit to the lower left of the available space. (You can use symbol-translate from the edit menu)
</div>
591 <li class=
"level1"><div class=
"li"> Save the sub circuit as a *.sym file in your local library.
</div>
593 <li class=
"level1"><div class=
"li"> Choose
"Include component as individual objects
" when selecting this complex symbol for your actual schematic. The whole sub circuit will be pasted to your sheet. Be sure to switch back to the default mode for inclusion of ordinary symbols.
</div>
599 <h2 id=
"thelibrarywindowisclutteredwithdefaultsymbolscanirestricttomylocallib">The library window is cluttered with default symbols. Can I restrict to my local lib?
</h2>
603 Put a localized version of the following lines in a gafrc.
605 <pre class=
"code">; empty the library path and populate it with local paths
606 (reset-component-library)
607 (component-library
"/foo/localgedalib1
")
608 (component-library
"/bar/foo/localgedalib2
")
</pre>
611 You can either add directories of your local library separately or add a whole tree with subdirs. See above on
<a href=
"#howcanisettherootofmylibrary" title=
":geda:faq-gschem.txt ↵" class=
"wikilink1">how to do this
</a>. It
's a good idea to place this gafrc in your project
's dir. That way, if you start gschem from some other place, you still get the system symbols shown. This also allows to configure special symbol libs for specific projects.
616 <h2 id=
"howcanichangethedefaultsizeoffloatingtext">How can I change the default size of floating text?
</h2>
622 <pre class=
"code">(text-size
10)
</pre>
625 into your gschemrc and replace
"10" with your favorite size.
630 <h2 id=
"canihavelightbackgroundcolorplease">Can I have light background color, please?
</h2>
634 Put this line in a gschemrc file at a place where gschem looks at start-up:
636 <pre class=
"code">(load (build-path geda-rc-path
"gschem-colormap-lightbg
"))
</pre>
640 <h2 id=
"howcanitweakcolorsingschem">How can I tweak colors in gschem?
</h2>
644 Currently, there is no GUI to tweak the colors of gschem interactively. However, you can set them in a RC file.
647 <li class=
"level1"><div class=
"li"> Copy the file
<code>gschem-colormap-lightbg
</code> or
<code>gschem-colormap-darkbg
</code> to
<code>$HOME/.gEDA/mycolors
</code>.
</div>
649 <li class=
"level1"><div class=
"li"> Edit the settings in
<code>.gEDA/mycolors
</code> to please your taste.
</div>
651 <li class=
"level1"><div class=
"li"> Add this line to your
<code>gschemrc
</code>:
</div>
654 <pre class=
"code">(load (build-path (getenv
"HOME
")
".gEDA
" "mycolors
"))
</pre>
658 <h2 id=
"eachtimeistartgschemthelogmessagewindowisshowncanidisableit">Each time I start gschem, the log message window is shown. Can I disable it?
</h2>
662 In the system-gschemrc file, you will find the following section:
664 <pre class=
"code">; log-window string
666 ; Controls if the log message window is mapped when gschem is started up
668 ; startup - opened up when gschem starts
669 ; later - NOT opened up when gschem starts
670 ; (can be opened by Options/Show Log Window)
672 (log-window
"startup
")
673 ;(log-window
"later
")
</pre>
676 Comment out the
<strong><code>startup
</code></strong> line (with a ;) and comment in the
<strong><code>later
</code></strong> line, or add the following line to your gschemrc file:
678 <pre class=
"code">(log-window
"later
")
</pre>
681 If you want to see the logging messages on stdout instead of the log window, put this line in your gschemrc file:
683 <pre class=
"code">(logging-destination
"tty
")
</pre>
687 <h2 id=
"isthereawaytodisableloggingtohomegedalogs">Is there a way to disable logging to $HOME/.gEDA/logs/ ?
</h2>
691 Put this line in your gschemrc file:
693 <pre class=
"code">(logging
"disabled
")
</pre>
697 <h2 id=
"canigetacustomizedtitleblockwithnewschematics">Can I get a customized title block with new schematics?
</h2>
701 Put the following line into your gschemrc file:
703 <pre class=
"code">(define default-titleblock
"title-A3.sym
")
</pre>
706 Replace
"title-A3.sym
" with the file name of your favorite title block symbol.
711 <h1 id=
"printingoutput">Printing/Output
</h1>
716 <h2 id=
"howdoiprintschematicsfromthecommandline">How do I print schematics from the command line?
</h2>
720 PostScript or PDF files of schematics can be created from the command line using the
<strong>gaf export
</strong> tool.
724 The command line below creates a PDF file from a schematic file (replace MY_SCH with the name of your schematic):
726 <pre class=
"code">gaf export -o MY_SCH.pdf MY_SCH.sch
</pre>
729 The
<code>bash
</code> script below, which I name
<strong><code>gschem-print
</code></strong>, creates a Postscript file for each schematic file that is specified on the command line and then outputs each Postscript file to the default printer:
731 <pre class=
"code">#!/bin/bash
733 #
'gaf export
' options
734 # -oPS_FILENAME output to Postscript file PS_FILENAME
738 base=
"${name%.*}
"
739 gaf export --output=$base.ps -- $base.sch
740 lpr -P$PRINTER $base.ps
744 The paper size can be adjusted using the
<strong>-p
</strong> option. To set the paper size to A4 use something like:
746 <pre class=
"code">gaf export --paper=iso_a4 -o MY_SCH.pdf MY_SCH.sch
</pre>
749 To set the preferred paper size to
"US Letter
" for all schematics you open, run:
751 <pre class=
"code">gaf config --user export paper na_letter
</pre>
755 <h2 id=
"howcanigetcolorpdfpngoutput">How can I get color PDF/PNG output?
</h2>
759 Edit the
<strong><code>system-gschemrc
</code></strong> file or place the following into a
<strong><code>gschemrc
</code></strong> file (either
<strong><code>~/.gEDA/gschemrc
</code></strong> or a
<strong><code>gschemrc
</code></strong> file in the local directory where you invoke gschem):
761 <pre class=
"code">(print-color
"enabled
") ; for color PDF output
762 (image-color
"enabled
") ; for color PNG output (enabled by default)
</pre>
766 <h2 id=
"howcanigetblackandwhitepostscriptpngoutput">How can I get black and white postscript/PNG output?
</h2>
770 For black and white PS output, place the following into a gschemrc file:
772 <pre class=
"code">(output-color
"disabled
") ; for monochrome postscript output
</pre>
775 For black and white PNG images, place the following into a gschemrc file:
777 <pre class=
"code">(image-color
"disabled
") ; for monochrome PNG output
</pre>
781 <h2 id=
"howcaniproducepdfoutput">How can I produce PDF output?
</h2>
785 Use
<strong>File→Write image…
</strong> to show the
"Write image…
" window. This gives the option to export to PDF.
791 <pre class=
"code">gaf export --output=foo.pdf bar.sch
</pre>
795 <h2 id=
"howcaniinsertschematicsintomylatexdocument">How can I insert schematics into my LaTeX document?
</h2>
799 For use with normal the
<code>latex
</code> command, you will need an EPS (Encapsulated PostScript) file. For
<code>pdflatex
</code>, you will need a PDF file. To generate an appropriate file, run:
801 <pre class=
"code">gaf export --size=auto --output=foo.eps foo.sch
</pre>
806 <pre class=
"code">gaf export --size=auto --output=foo.pdf foo.sch
</pre>
809 Add
<code>usepackage{graphicx}
</code> to the preamble of your LaTeX document. Use the command
<code>includegraphics
</code> to place your schematic.
815 <pre class=
"code latex"><span class=
"sy0">\
</span><a href=
"http://www.golatex.de/wiki/index.php?title=%5Cdocumentclass"><span class=
"kw1">documentclass
</span></a><span class=
"sy0">{
</span><span class=
"re9">article
<span class=
"sy0">}
</span>
816 <span class=
"sy0">\
</span><a href=
"http://www.golatex.de/wiki/index.php?title=%5Cusepackage"><span class=
"kw1">usepackage
</span></a><span class=
"sy0">{
</span>graphicx
<span class=
"sy0">}
</span>
817 <span class=
"re8">\begin
</span><span class=
"sy0">{
</span><span class=
"re7">document
</span><span class=
"sy0">}
</span>
818 <span class=
"re8">\begin
</span><span class=
"sy0">{
</span><span class=
"re7">figure
</span><span class=
"sy0">}
</span>
819 <span class=
"sy0">\
</span><a href=
"http://www.golatex.de/wiki/index.php?title=%5Cincludegraphics"><span class=
"kw1">includegraphics
</span></a><span class=
"sy0">[
</span><span class=
"re2">width=
100mm
</span><span class=
"sy0">]{
</span>foo
<span class=
"sy0">}
</span>
820 <span class=
"re8">\end
</span><span class=
"sy0">{
</span><span class=
"re7">figure
</span><span class=
"sy0">}
</span>
821 <span class=
"re8">\end
</span><span class=
"sy0">{
</span><span class=
"re7">document
</span></span><span class=
"sy0">}
</span></pre>
825 <h2 id=
"howcanisplitpostscriptoutputovermultiplepages">How can I split Postscript output over multiple pages?
</h2>
829 gschem does not provide this functionality internally, however there is a program called “poster” which does exactly this. It can be downloaded from either here (GNU) or here (KDE Print).
834 <h1 id=
"gscheminstallationrun-timeproblems">Gschem installation/run-time problems
</h1>
839 <h2 id=
"afterinstallationgschemdoesnotworkwhatcouldbewrong">After installation gschem does not work!? What could be wrong?
</h2>
843 If you run gschem and you get a window without a menu bar, no colors, and the program terminates when you press a key with the following message:
845 <pre class=
"code">ERROR: Unbound variable: current-keymap
</pre>
848 Or you get errors like this:
850 <pre class=
"code">Gtk-CRITICAL : file gtkpixmap.c: line
97 (gtk_pixmap_new): assertion `val != NULL’ failed.
851 Gtk-CRITICAL : file gtkpixmap.c: line
97 (gtk_pixmap_new): assertion `val != NULL’ failed.
852 Tried to get an invalid color:
0
853 Tried to get an invalid color:
7
854 Tried to get an invalid color:
0
855 Tried to get an invalid color:
7</pre>
858 then gschem is not finding an rc file. There are two required rc files. The first is
<strong><code>system-gschemrc
</code></strong> and the second is
<strong><code>system-gafrc
</code></strong>.
861 <li class=
"level1"><div class=
"li"> The system-gschemrc rc file should be installed when you install gschem and typically resides in
<strong><code>${prefix}/share/gEDA/system-gschemrc
</code></strong>.
<strong><code>${prefix}
</code></strong> is where you installed gschem (usually
<strong><code>/usr
</code></strong> or
<strong><code>/usr/local
</code></strong> or
<strong><code>$HOME/geda
</code></strong>). This file can also be installed in /etc/gEDA (the .debs packages do this).
</div>
863 <li class=
"level1"><div class=
"li"> The system-gafrc rc file should be installed when you install the
<code>libgeda
</code> shared library gEDA/gaf. It resides in
<strong><code>${prefix}/share/gEDA/system-gafrc
</code></strong>. This file can also be installed in
<strong><code>/etc/gEDA
</code></strong> (the .debs packages do this). This file is not loaded directly by gschem.
</div>
868 Make sure these file are installed. The gschem.log file (which is created everytime you run gschem) holds valuable debugging information which should help in determining what is wrong. Check this file for where gschem is looking for the rc files.
872 Also, some older releases of gEDA/gaf had some bugs when the rc files were installed in other locations (other that
<strong><code>${prefix}/share/gEDA
</code></strong>), so please upgrade to a more current release.
877 <h2 id=
"addcomponentsoffersnosymbolswhatcanidoaboutit">"Add Components
" offers no symbols! What can I do about it?
</h2>
881 Make sure that at least one of your config files contains a valid path to a symbol library. At startup, gschem checks for the following config files (on a Debian system):
884 <li class=
"level1"><div class=
"li"> distributed system-wide gafrc file:
<code>/etc/gEDA/system-gafrc
</code> (will be overwritten on update)
</div>
886 <li class=
"level1"><div class=
"li"> local system-wide gafrc file
<code>/usr/share/gEDA/gafrc.d/gafrc
</code> (with geda versions after summer
2009)
</div>
888 <li class=
"level1"><div class=
"li"> user gafrc file:
<code>~/.gEDA/gafrc
</code></div>
890 <li class=
"level1"><div class=
"li"> local gafrc file:
<code>$PWD/gafrc
</code></div>
892 <li class=
"level1"><div class=
"li"> system gschemrc file:
<code>/etc/gEDA/system-gschemrc
</code></div>
894 <li class=
"level1"><div class=
"li"> user gschemrc file:
<code>~/.gEDA/gschemrc
</code></div>
896 <li class=
"level1"><div class=
"li"> local gschemrc file:
<code>$PWD/gschemrc
</code></div>
901 All of these config files may or may not append paths to the library search list. If a config file contains the command
903 <pre class=
"code">(reset-component-library)
</pre>
906 the library search path will be emptied. Order is obviously important, as this command will erase any previously appended paths.
911 <h2 id=
"imusinggschemgafthroughasshconnectionandigetanerrorlikexlibextensionrendermissingondisplaylocalhost100">I
'm using gschem/gaf through a SSH connection and I get an error like:
'Xlib: extension
"RENDER
" missing on display
"localhost:
10.0".
'</h2>
915 If you are getting into the remote machine by doing:
917 <pre class=
"code">$ ssh -X your_username@your_remote_machine
</pre>
920 and afterwards you get the Xlib RENDER message, then try using:
922 <pre class=
"code">$ ssh -Y your_username@your_remote_machine
</pre>
925 The latter enables trusted X11 forwarding.