Updated the wiki documentation from the official wiki on geda.seul.org
[geda-gaf/peter-b.git] / docs / wiki / geda_faq-gschem.html
blob384b4e76e8bcda1c2b62a0bc2969d9199966529e
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
4 lang="en" dir="ltr">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <title>geda:faq-gschem</title>
8 <meta name="generator" content="DokuWiki Release 2006-03-09" />
9 <link rel="start" href="http://geda.seul.org/wiki/" />
10 <link rel="contents" href="http://geda.seul.org/wiki/geda:faq-gschem?do=index" title="" />
11 <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://geda.seul.org/wiki/feed.php" />
12 <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://geda.seul.org/wiki/feed.php?mode=list&ns=geda" />
13 <link rel="alternate" type="text/html" title="Plain HTML" href="http://geda.seul.org/wiki/geda:faq-gschem?do=export_xhtml" />
14 <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://geda.seul.org/wiki/geda:faq-gschem?do=export_raw" />
15 <meta name="date" content="2006-10-19T11:52:57-0400" />
16 <meta name="robots" content="noindex,nofollow" />
17 <link rel="stylesheet" media="screen" type="text/css" href="lib/exe/css" />
18 <link rel="stylesheet" media="print" type="text/css" href="lib/exe/001css" />
19 </head>
20 <body>
21 <div class="dokuwiki export">
22 <div class="toc">
23 <div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
24 <div id="toc__inside">
26 <ul class="toc">
27 <li class="level1"><div class="li"><span class="li"><a href="#gschem_usage" class="toc">Gschem usage</a></span></div>
28 <ul class="toc">
29 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_move_a_component" class="toc">How do I move a component?</a></span></div></li>
30 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_change_the_size_of_the_text_on_a_symbol" class="toc">How do I change the size of the text on a symbol?</a></span></div></li>
31 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_unlock_a_locked_component" class="toc">How do I unlock a locked component</a></span></div></li>
32 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_get_refdes_automatically_numbered_when_i_draw_a_schematic" class="toc">How can I get refdes automatically numbered when I draw a schematic?</a></span></div></li>
33 <li class="level2"><div class="li"><span class="li"><a href="#what_is_a_bus_and_how_do_i_use_it" class="toc">What is a Bus and how do I use it?</a></span></div></li>
34 <li class="level2"><div class="li"><span class="li"><a href="#what_are_the_key_bindings_in_gschem" class="toc">What are the Key Bindings in gschem?</a></span></div></li>
35 <li class="level2"><div class="li"><span class="li"><a href="#what_are_the_mouse_bindings_in_gschem" class="toc">What are the mouse bindings in gschem?</a></span></div></li>
36 </ul>
37 </li>
38 <li class="level1"><div class="li"><span class="li"><a href="#gschem_symbols" class="toc">gschem symbols</a></span></div>
39 <ul class="toc">
40 <li class="level2"><div class="li"><span class="li"><a href="#what_s_this_business_about_heavy_vs._light_symbols" class="toc">What's this business about heavy vs. light symbols?</a></span></div></li>
41 <li class="level2"><div class="li"><span class="li"><a href="#i_am_using_a_symbol_out_of_the_library._how_come_it_s_not_aligned_to_the_grid" class="toc">I am using a symbol out of the library. How come it's not aligned to the grid?</a></span></div></li>
42 <li class="level2"><div class="li"><span class="li"><a href="#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" class="toc">Is there an explicit &quot;no connect&quot; symbol that I can/should place in the schematic to prevent gnetlist from thinking I've forgotten a connection?</a></span></div></li>
43 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_promote_an_invisible_symbol_attribute_into_the_schematic" class="toc">How do I promote an invisible symbol attribute into the schematic?</a></span></div></li>
44 <li class="level2"><div class="li"><span class="li"><a href="#what_should_i_do_about_power_pins_on_my_symbolsmake_them_visible_explicit_or_invisible_implicit" class="toc">What should I do about power pins on my symbols: Make them visible (explicit) or invisible (implicit)?</a></span></div></li>
45 <li class="level2"><div class="li"><span class="li"><a href="#is_there_a_specification_or_manual_for_creating_gschem_symbols_where_is_it" class="toc">Is there a specification or manual for creating gschem symbols? Where is it?</a></span></div></li>
46 </ul>
47 </li>
48 <li class="level1"><div class="li"><span class="li"><a href="#gschem_configuration_customization" class="toc">Gschem configuration/customization</a></span></div>
49 <ul class="toc">
50 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_change_the_default_size_of_floating_text" class="toc">How can I change the default size of floating text?</a></span></div></li>
51 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_have_a_different_background_color_other_than_black" class="toc">How can I have a different background color other than black?</a></span></div></li>
52 </ul>
53 </li>
54 <li class="level1"><div class="li"><span class="li"><a href="#printing_output" class="toc">Printing/Output</a></span></div>
55 <ul class="toc">
56 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_print_schematics_from_the_command_line" class="toc">How do I print schematics from the command line?</a></span></div></li>
57 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_get_color_postscript_png_output" class="toc">How can I get color postscript/PNG output?</a></span></div></li>
58 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_get_black_and_white_postscript_png_output" class="toc">How can I get black and white postscript/PNG output?</a></span></div></li>
59 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_insert_schematics_into_my_latex_document" class="toc">How can I insert schematics into my LaTex document?</a></span></div></li>
60 <li class="level2"><div class="li"><span class="li"><a href="#how_can_i_split_postscript_output_over_multiple_pages" class="toc">How can I split postscript output over multiple pages?</a></span></div></li>
61 </ul>
62 </li>
63 <li class="level1"><div class="li"><span class="li"><a href="#gschem_installation_run-time_problems" class="toc">Gschem installation/run-time problems</a></span></div>
64 <ul class="toc">
65 <li class="level2"><div class="li"><span class="li"><a href="#gschem_segfaults_when_i_delete_components_on_fc5_and_other_linux_distributions_is_there_a_work-around" class="toc">Gschem segfaults when I delete components on FC5 (and other Linux distributions)! Is there a work-around?</a></span></div></li>
66 <li class="level2"><div class="li"><span class="li"><a href="#after_installation_gschem_does_not_work_what_could_be_wrong" class="toc">After installation gschem does not work!? What could be wrong?</a></span></div></li>
67 <li class="level2"><div class="li"><span class="li"><a href="#add_components_offers_no_symbols_what_can_i_do_about_it" class="toc">&quot;Add Components&quot; offers no symbols! What can I do about it?</a></span></div></li></ul>
68 </li></ul>
69 </div>
70 </div>
72 <h1><a name="gschem_usage" id="gschem_usage">Gschem usage</a></h1>
73 <div class="level1">
75 </div>
76 <!-- SECTION [1-28] -->
77 <h2><a name="how_do_i_move_a_component" id="how_do_i_move_a_component">How do I move a component?</a></h2>
78 <div class="level2">
80 <p>
81 Newbies with long-time Windows experience often ask this question. Here are three ways to easily move components with gschem:
82 </p>
84 <p>
85 One:
86 </p>
87 <ol>
88 <li class="level1"><div class="li"> Grab the component with the middle mouse button. The component will follow the cursor around as you move it.</div>
89 </li>
90 <li class="level1"><div class="li"> To place the component, release the middle mouse button. The component will stay where you placed it.</div>
91 </li>
92 </ol>
94 <p>
95 Two:
96 </p>
97 <ol>
98 <li class="level1"><div class="li"> Select the component by clicking it with the left mouse button. The component will highlight.</div>
99 </li>
100 <li class="level1"><div class="li"> Hit the “M” key on the keyboard. The component will now follow the cursor around as you move it.</div>
101 </li>
102 <li class="level1"><div class="li"> To place the component, click the left mouse button. The component will stay where you placed it.</div>
103 </li>
104 </ol>
107 Three:
108 </p>
109 <ol>
110 <li class="level1"><div class="li"> Select the component by clicking it with the left mouse button. The component will highlight.</div>
111 </li>
112 <li class="level1"><div class="li"> Click the right mouse button. A pop-up menu will appear.</div>
113 </li>
114 <li class="level1"><div class="li"> With the left mouse button, click on the “move” option in the pop-up menu.</div>
115 </li>
116 <li class="level1"><div class="li"> Click on the component with the left mouse button. The component will now follow the cursor around as you move it.</div>
117 </li>
118 <li class="level1"><div class="li"> To place the component, click the left mouse button. The component will stay where you placed it.</div>
119 </li>
120 </ol>
122 </div>
123 <!-- SECTION [29-1203] -->
124 <h2><a name="how_do_i_change_the_size_of_the_text_on_a_symbol" id="how_do_i_change_the_size_of_the_text_on_a_symbol">How do I change the size of the text on a symbol?</a></h2>
125 <div class="level2">
126 <ol>
127 <li class="level1"><div class="li"> Select the symbol.</div>
128 </li>
129 <li class="level1"><div class="li"> Right click → down symbol (or do Hierarchy → down symbol). This takes you to the symbol editor.</div>
130 </li>
131 <li class="level1"><div class="li"> Select the pinnumber you want to change.</div>
132 </li>
133 <li class="level1"><div class="li"> Do Edit → Edit Text (or type keyboard shortcut &ldquo;ex&rdquo;).</div>
134 </li>
135 <li class="level1"><div class="li"> Change the font size in the pop-up box.</div>
136 </li>
137 <li class="level1"><div class="li"> Repeat for all desired text elements.</div>
138 </li>
139 <li class="level1"><div class="li"> File → save</div>
140 </li>
141 <li class="level1"><div class="li"> Right click → up (or Hierarchy → Up). Now you are back in the schematic editor.</div>
142 </li>
143 <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>
144 </li>
145 </ol>
148 More generally, you can use this procedure to edit anything on a symbol. (Substitute “Edit Text” for your desired edit, of course.)
149 </p>
151 </div>
152 <!-- SECTION [1204-1994] -->
153 <h2><a name="how_do_i_unlock_a_locked_component" id="how_do_i_unlock_a_locked_component">How do I unlock a locked component</a></h2>
154 <div class="level2">
157 When a component is locked it is unselectable using 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.
158 </p>
160 </div>
161 <!-- SECTION [1995-2404] -->
162 <h2><a name="how_can_i_get_refdes_automatically_numbered_when_i_draw_a_schematic" id="how_can_i_get_refdes_automatically_numbered_when_i_draw_a_schematic">How can I get refdes automatically numbered when I draw a schematic?</a></h2>
163 <div class="level2">
166 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):
167 </p>
168 <pre class="code">(load &quot;$YOUR_INSTALL_PATH/share/gEDA/scheme/auto-uref.scm&quot;) ; load the autonumbering script
169 (add-hook! add-component-hook auto-uref) ; autonumber when adding a component
170 (add-hook! copy-component-hook auto-uref) ; autonumber when copying a component</pre>
173 Please substitute $YOUR_INSTALL_PATH by the path where geda is installed.
174 </p>
176 </div>
177 <!-- SECTION [2405-3047] -->
178 <h2><a name="what_is_a_bus_and_how_do_i_use_it" id="what_is_a_bus_and_how_do_i_use_it">What is a Bus and how do I use it?</a></h2>
179 <div class="level2">
182 A &lsquo;bus&rsquo; is purely decoration. The netlister ignores it. The netname= attribute does actual work of connecting points together&ndash;this is what gnetlist reads and transforms into your netlist. It is not possible to connect to a discrete line or &lsquo;bit&rsquo; on a bus because, again, the bus is merely a graphical entity.
183 </p>
186 Some users have found it helpful to organize their nets by incorporating a bus name into the net name. For example &ldquo;net=busA:1&rdquo; may be added to each busripper to aid in sorting out the nets.
187 </p>
189 </div>
190 <!-- SECTION [3048-3603] -->
191 <h2><a name="what_are_the_key_bindings_in_gschem" id="what_are_the_key_bindings_in_gschem">What are the Key Bindings in gschem?</a></h2>
192 <div class="level2">
194 </div>
195 <!-- SECTION [3604-3653] -->
196 <h2><a name="what_are_the_mouse_bindings_in_gschem" id="what_are_the_mouse_bindings_in_gschem">What are the mouse bindings in gschem?</a></h2>
197 <div class="level2">
200 By default you get:
201 </p>
202 <ul>
203 <li class="level1"><div class="li"> Left mouse button is used for picking and drawing</div>
204 </li>
205 <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>
206 </li>
207 <li class="level1"><div class="li"> Right mouse button is a popup menu.</div>
208 </li>
209 </ul>
212 You can change the middle button by adding the following to a gschemrc file:
213 </p>
214 <pre class="code">(middle-button &quot;action&quot;) ;default binding, move or copy an object</pre>
217 or:
218 </p>
219 <pre class="code">(middle-button &quot;stroke&quot;) ;draw mouse gestures/strokes (must install libstroke to enable</pre>
222 or:
223 </p>
224 <pre class="code">(middle-button &quot;repeat&quot;) ;repeat the last command executed</pre>
227 You can change the right button by adding the following to a gschemrc file:
228 </p>
229 <pre class="code">(third-button &quot;popup&quot;) ;default binding, show a popup menu</pre>
232 or:
233 </p>
234 <pre class="code">(third-button &quot;mousepan&quot;) ;use the mouse to pan around the schematic</pre>
237 For more information on these options, please see the <strong><code>${install_prefix}/share/gEDA/system-gschemrc</code></strong> file.
238 </p>
240 </div>
241 <!-- SECTION [3654-4739] -->
242 <h1><a name="gschem_symbols" id="gschem_symbols">gschem symbols</a></h1>
243 <div class="level1">
245 </div>
246 <!-- SECTION [4740-4769] -->
247 <h2><a name="what_s_this_business_about_heavy_vs._light_symbols" id="what_s_this_business_about_heavy_vs._light_symbols">What's this business about heavy vs. light symbols?</a></h2>
248 <div class="level2">
251 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.
252 </p>
255 The debate between proponents of heavy and light symbols is very detailed and involved. In caricature, proponents of heavy symbols belive that they provide better integration between gschem and PCB since the important layout attributes (such as <a href="http://geda.seul.org/wiki/geda:pcb_tips#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">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 &ldquo;gattrib” is the preferred tool for dealing with attributes at the schematic level (i.e. in the .sch file).
256 </p>
259 GEDA/gaf, as default configured, uses light symbols, although it can be configured to use heavy symbols. For further information, you may read these dicussions from the geda-user mailing list:
260 </p>
263 <a href="http://archives.seul.org/geda/user/Jun-2005/msg00001.html" class="urlextern" title="http://archives.seul.org/geda/user/Jun-2005/msg00001.html" rel="nofollow">http://archives.seul.org/geda/user/Jun-2005/msg00001.html</a> <a href="http://archives.seul.org/geda/dev/Oct-2005/msg00043.html" class="urlextern" title="http://archives.seul.org/geda/dev/Oct-2005/msg00043.html" rel="nofollow">http://archives.seul.org/geda/dev/Oct-2005/msg00043.html</a>
264 </p>
266 </div>
267 <!-- SECTION [4770-6900] -->
268 <h2><a name="i_am_using_a_symbol_out_of_the_library._how_come_it_s_not_aligned_to_the_grid" id="i_am_using_a_symbol_out_of_the_library._how_come_it_s_not_aligned_to_the_grid">I am using a symbol out of the library. How come it's not aligned to the grid?</a></h2>
269 <div class="level2">
272 The symbols in the symbol library, like those available at the <a href="http://www.gedasymbols.org/" class="urlextern" title="http://www.gedasymbols.org" rel="nofollow"> gedasymbols </a> website are contributed by users just like you. Some people use different grid settings than other people (e.g. 50mil vs. 100mil). If you discover a symbol which seems to be off the grid, try reducing your grid spacing, move the symbol so that it sits on <strong>your</strong> grid, then revert to your preferred grid settings.
273 </p>
276 Yes, the gEDA docs suggest that you use a 100mil 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. Therefore, you just need to be aware of this possibility.
277 </p>
279 </div>
280 <!-- SECTION [6901-7678] -->
281 <h2><a name="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" id="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">Is there an explicit &quot;no connect&quot; symbol that I can/should place in the schematic to prevent gnetlist from thinking I've forgotten a connection?</a></h2>
282 <div class="level2">
285 Answer: misc → nc-left, nc-right, nc-top, nc-bottom.
286 </p>
289 Caution: occassionally this may create a net called “no_connect” (or “NC??&rdquo;) which may lead to no-connect pins being connected together in gnetlist – which you probably _don’t_ want to happen.
290 </p>
293 If you want an entire symbol to be graphical (no elec. connections) , add a &ldquo;graphical=1&rdquo; attribute. The netlister will ignore these symbols entirely.
294 </p>
296 </div>
297 <!-- SECTION [7679-8248] -->
298 <h2><a name="how_do_i_promote_an_invisible_symbol_attribute_into_the_schematic" id="how_do_i_promote_an_invisible_symbol_attribute_into_the_schematic">How do I promote an invisible symbol attribute into the schematic?</a></h2>
299 <div class="level2">
302 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-gschemrc file:
303 </p>
304 <pre class="code">(attribute-promotion “enabled”);
305 (promote-invisible “disabled”) ; ⇐ This one
306 (keep-invisible “enabled”)</pre>
309 Add to your gschemrc file:
310 </p>
311 <pre class="code">(promote-invisible “enabled”)</pre>
314 and you will get all the attributes promoted. The “keep-invisible” keyword will keep hidden those attributes that are hidden in the symbol file.
315 </p>
317 </div>
318 <!-- SECTION [8249-8884] -->
319 <h2><a name="what_should_i_do_about_power_pins_on_my_symbolsmake_them_visible_explicit_or_invisible_implicit" id="what_should_i_do_about_power_pins_on_my_symbolsmake_them_visible_explicit_or_invisible_implicit">What should I do about power pins on my symbols: Make them visible (explicit) or invisible (implicit)?</a></h2>
320 <div class="level2">
323 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).
324 </p>
327 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.
328 </p>
331 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.
332 </p>
335 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.
336 </p>
339 To paraphrase Nancy Reagan: Just say “no” to hidden power pins.
340 </p>
343 That said, it may still be usefull to detach the power pins from the functional part of the symbol. To do so, define a seperate power symbol and give it the same <a href="http://geda.seul.org/wiki/geda:glossary" class="wikilink1" title="geda:glossary">refdes</a> as the functional part. A run of gsch2pcb will treat the siblings properly as one single component. As neither gschem nor gsch2pcb explicitely 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.
344 </p>
346 </div>
347 <!-- SECTION [8885-11142] -->
348 <h2><a name="is_there_a_specification_or_manual_for_creating_gschem_symbols_where_is_it" id="is_there_a_specification_or_manual_for_creating_gschem_symbols_where_is_it">Is there a specification or manual for creating gschem symbols? Where is it?</a></h2>
349 <div class="level2">
352 Yes. It is the <a href="geda_scg.html" class="wikilink1" title="geda:scg">Symbol Creation Guide</a>.
353 </p>
355 </div>
356 <!-- SECTION [11143-11283] -->
357 <h1><a name="gschem_configuration_customization" id="gschem_configuration_customization">Gschem configuration/customization</a></h1>
358 <div class="level1">
361 Gschem is configurable in more ways than can be describe here. Look at &ldquo;system-gschemrc&rdquo; for suggestions what else can be done.
362 </p>
364 </div>
365 <!-- SECTION [11284-11461] -->
366 <h2><a name="how_can_i_change_the_default_size_of_floating_text" id="how_can_i_change_the_default_size_of_floating_text">How can I change the default size of floating text?</a></h2>
367 <div class="level2">
370 Put
371 </p>
372 <pre class="code">(text-size 10)</pre>
375 into your gschemrc and replace &ldquo;10&rdquo; with your favorite size.
376 </p>
378 </div>
379 <!-- SECTION [11462-11620] -->
380 <h2><a name="how_can_i_have_a_different_background_color_other_than_black" id="how_can_i_have_a_different_background_color_other_than_black">How can I have a different background color other than black?</a></h2>
381 <div class="level2">
384 Edit the system-gschemrc file and near the top you will find lines like:
385 </p>
386 <pre class="code">;
387 ; Start of color section
389 ; Load up a color scheme has a light (almost white) background
390 ; Comment out the first line and comment in the second line for a
391 ; dark (black) background. The dark background is the original look.
393 (load (string-append gedadatarc &quot;/gschem-darkbg&quot;)) ; dark background
394 ;(load (string-append gedadatarc &quot;/gschem-lightbg&quot;)) ; light background</pre>
397 Comment out the <strong><code>darkbg</code></strong> line (with a ;) and comment in the <strong><code>lightbg</code></strong> line. This will give you a light background instead of a black background. It also adjust all the other colors to be compatible with a light background.
398 </p>
401 If you want more control over the colors, please edit <strong><code>${prefix}/share/gEDA/gschem-darkbg</code></strong> or <strong><code>${prefix}/share/gEDA/gschem-lightbg</code></strong> or create your own file and load it in the <strong><code>system-gschemrc</code></strong> file.
402 </p>
405 A dark background is preferred by many users.
406 </p>
408 </div>
409 <!-- SECTION [11621-12656] -->
410 <h1><a name="printing_output" id="printing_output">Printing/Output</a></h1>
411 <div class="level1">
413 </div>
414 <!-- SECTION [12657-12686] -->
415 <h2><a name="how_do_i_print_schematics_from_the_command_line" id="how_do_i_print_schematics_from_the_command_line">How do I print schematics from the command line?</a></h2>
416 <div class="level2">
419 Running the script <strong><code>gschem-print.scm</code></strong> will create the Postscript file that is specified on the command line.
420 </p>
423 The command line below creates a Postscript file from a schematic file (replace MY_SCH with the name of your schematic and GEDA_SCHEME_DIR with the name of the directory where your gEDA scheme files are installed):
424 </p>
425 <pre class="code">gschem -p -oMY_SCH.ps -sGEDA_SCHEME_DIR/gschem-print.scm MY_SCH.sch</pre>
428 The BASH 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:
429 </p>
430 <pre class="code">#!/bin/bash
432 # gschem options
433 # -oPS_FILENAME output to Postscript file PS_FILENAME
434 # -sSCRIPT_FILENAME run script SCRIPT_FILENAME
435 # -p autoplace windows
437 for name in $*
439 base=”${name%.*}”
440 gschem -p -o$base.ps -sGEDA_SCHEME_DIR/gschem-print.scm $base.sch
441 lpr -P$PRINTER $base.ps
442 done</pre>
444 </div>
445 <!-- SECTION [12687-13672] -->
446 <h2><a name="how_can_i_get_color_postscript_png_output" id="how_can_i_get_color_postscript_png_output">How can I get color postscript/PNG output?</a></h2>
447 <div class="level2">
450 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):
451 </p>
452 <pre class="code">(output-color &quot;enabled&quot;) ; for color postscript output
453 (image-color &quot;enabled&quot;) ; for color PNG output (enabled by default)</pre>
456 To control the background of the PS output, change the following line in either gschem-darkbg (for the default black colored background) or gschem-lightbg (for the alternative light colored background):
457 </p>
458 <pre class="code">(output-color-background 16 &quot;black&quot; &quot;null&quot; &quot;0 0 0&quot; 0 0 0)</pre>
461 The “0 0 0” is the RGB components (between 0..1) for the background color of the PS output.
462 </p>
465 To control the background of the <acronym title="Portable Network Graphics">PNG</acronym> output, change the following line in either gschem-darkbg (for the default black colored background) or gschem-lightbg (for the alternative light colored background):
466 </p>
467 <pre class="code">(background-color 0 &quot;grey94&quot; &quot;null&quot; &quot;1 1 1&quot; 255 255 255)</pre>
470 The 255 255 255 are the RGB components for the background color of the <acronym title="Portable Network Graphics">PNG</acronym> image.
471 </p>
473 </div>
474 <!-- SECTION [13673-14804] -->
475 <h2><a name="how_can_i_get_black_and_white_postscript_png_output" id="how_can_i_get_black_and_white_postscript_png_output">How can I get black and white postscript/PNG output?</a></h2>
476 <div class="level2">
479 For black and white PS output, place the following into a gschemrc file:
480 </p>
481 <pre class="code">(output-color &quot;disabled&quot;) ; for monochrome postscript output</pre>
484 For black and white <acronym title="Portable Network Graphics">PNG</acronym> images, place the following into a gschemrc file:
485 </p>
486 <pre class="code">(image-color &quot;disabled&quot;) ; for monochromoe PNG output</pre>
488 </div>
489 <!-- SECTION [14805-15170] -->
490 <h2><a name="how_can_i_insert_schematics_into_my_latex_document" id="how_can_i_insert_schematics_into_my_latex_document">How can I insert schematics into my LaTex document?</a></h2>
491 <div class="level2">
492 <ol>
493 <li class="level1"><div class="li"> Print the schematic to a file. This will be generic postscript (*.ps).</div>
494 </li>
495 <li class="level1"><div class="li"> Convert the postscript file to epsi with the tool ps2epsi. This is a script from the ghostscript suite.</div>
496 </li>
497 <li class="level1"><div class="li"> Include usepackage{graphicx} to the preamble of your latex document. Use the comand includegraphics to place your schematic.</div>
498 </li>
499 </ol>
502 A simple example:
503 </p>
504 <pre class="code">\documentclass{article}
505 \usepackage{graphicx}
506 \begin{document}
507 \begin{image}
508 \includegraphics[width=100mm]{ModulPID.epsi}
509 \end{image}
510 \end{document}</pre>
512 </div>
513 <!-- SECTION [15171-15734] -->
514 <h2><a name="how_can_i_split_postscript_output_over_multiple_pages" id="how_can_i_split_postscript_output_over_multiple_pages">How can I split postscript output over multiple pages?</a></h2>
515 <div class="level2">
518 gschem does not provide this functionality internally, however there is a program called “poster” which does exactly this. It can be downloaded from either <a href="http://www.gnu.org/directory/poster.html" class="urlextern" title="http://www.gnu.org/directory/poster.html" rel="nofollow">here</a> (GNU) or <a href="http://printing.kde.org/downloads/" class="urlextern" title="http://printing.kde.org/downloads/" rel="nofollow">here</a> (KDE Print).
519 </p>
521 </div>
522 <!-- SECTION [15735-16078] -->
523 <h1><a name="gschem_installation_run-time_problems" id="gschem_installation_run-time_problems">Gschem installation/run-time problems</a></h1>
524 <div class="level1">
526 </div>
527 <!-- SECTION [16079-16131] -->
528 <h2><a name="gschem_segfaults_when_i_delete_components_on_fc5_and_other_linux_distributions_is_there_a_work-around" id="gschem_segfaults_when_i_delete_components_on_fc5_and_other_linux_distributions_is_there_a_work-around">Gschem segfaults when I delete components on FC5 (and other Linux distributions)! Is there a work-around?</a></h2>
529 <div class="level2">
532 This bug seems to have appeared for users of Fedora Core 5 (and other linux distributions that use glib 2.10.x). The bug has been fixed by the developers and the bug fix will appear in the next version of gEDA/gaf.
533 </p>
536 In the mean time, you can work around this bug by setting the environment variable G_SLICE to “always-malloc”. Specifically, before you run gschem, do this:
537 </p>
540 bash:
541 </p>
542 <pre class="code">export G_SLICE=always-malloc</pre>
545 csh:
546 </p>
547 <pre class="code">setenv G_SLICE always-malloc</pre>
549 </div>
550 <!-- SECTION [16132-16726] -->
551 <h2><a name="after_installation_gschem_does_not_work_what_could_be_wrong" id="after_installation_gschem_does_not_work_what_could_be_wrong">After installation gschem does not work!? What could be wrong?</a></h2>
552 <div class="level2">
555 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:
556 </p>
557 <pre class="code">ERROR: Unbound variable: current-keymap</pre>
560 Or you get errors like this:
561 </p>
562 <pre class="code">Gtk-CRITICAL : file gtkpixmap.c: line 97 (gtk_pixmap_new): assertion `val != NULL’ failed.
563 Gtk-CRITICAL : file gtkpixmap.c: line 97 (gtk_pixmap_new): assertion `val != NULL’ failed.
564 Tried to get an invalid color: 0
565 Tried to get an invalid color: 7
566 Tried to get an invalid color: 0
567 Tried to get an invalid color: 7</pre>
570 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-commonrc</code></strong>.
571 </p>
572 <ul>
573 <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>
574 </li>
575 <li class="level1"><div class="li"> The system-commonrc rc file should be installed when you install the symbol library for gEDA/gaf. It resides in <strong><code>${prefix}/share/gEDA/system-commonrc</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. It is loaded by a “(load ...)” in the system-gschemrc rc file.</div>
576 </li>
577 </ul>
580 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.
581 </p>
584 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.
585 </p>
587 </div>
588 <!-- SECTION [16727-18650] -->
589 <h2><a name="add_components_offers_no_symbols_what_can_i_do_about_it" id="add_components_offers_no_symbols_what_can_i_do_about_it">&quot;Add Components&quot; offers no symbols! What can I do about it?</a></h2>
590 <div class="level2">
593 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):
594 </p>
595 <ol>
596 <li class="level1"><div class="li"> system gafrc file: <code>/etc/gEDA/system-gafrc</code></div>
597 </li>
598 <li class="level1"><div class="li"> user gafrc file: <code>~/.gEDA/gafrc</code></div>
599 </li>
600 <li class="level1"><div class="li"> local gafrc file: <code>$PWD/gafrc</code></div>
601 </li>
602 <li class="level1"><div class="li"> system gschemrc file: <code>/etc/gEDA/system-gschemrc</code></div>
603 </li>
604 <li class="level1"><div class="li"> user gschemrc file: <code>~/.gEDA/gschemrc</code></div>
605 </li>
606 <li class="level1"><div class="li"> local gschemrc file: <code>$PWD/gschemrc]</code></div>
607 </li>
608 </ol>
611 All of these config files may or may not append paths to the library search list. If a config file conatins the command
612 </p>
613 <pre class="code">(reset-component-library)</pre>
616 the library search path will be emptied. Order is obviously important, as this command will erase any previously appended paths.
617 </p>
619 </div>
620 <!-- SECTION [18651-] --></div>
621 </body>
622 </html>