missing NULL terminator in set_config_x
[geda-gaf.git] / docs / wiki / geda-gaf_utility.html
blob7853ceea71783cf41f06762d5830e0d78356bba7
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
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" />
10 </head>
11 <body>
13 <p>
14 <em>Translations:</em> <a href="geda-gaf_utility.ru.html" class="wikilink1" title="geda-gaf_utility.ru.html">Русский</a>
15 </p>
17 <h1 class="sectionedit1" id="gaf_-_geda_gaf_command-line_utility">gaf - gEDA/gaf Command-Line Utility</h1>
18 <div class="level1">
20 <p>
21 <strong>gaf</strong> provides a number of small command-line utilities for
22 working with schematic and symbol files, and is designed to be
23 used for batch processing of designs created using the schematic
24 editor <a href="geda-gschem_ug.html" class="wikilink1" title="geda-gschem_ug.html">gschem</a>. It currently has three built-in
25 commands:
26 </p>
27 <ul>
28 <li class="level1"><div class="li"> <a href="#gaf_export" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf export</a> is used to create SVG, PDF, PNG, PS and EPS files from schematic and symbol files, for printing or embedding in other documents.</div>
29 </li>
30 <li class="level1"><div class="li"> <a href="#gaf_config" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf config</a> allows reading and writing settings in gEDA project, user and system configuration stores.</div>
31 </li>
32 <li class="level1"><div class="li"> <a href="#gaf_shell" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf shell</a> provides a Scheme REPL for command-line batch processing of schematic data.</div>
33 </li>
34 </ul>
36 <p>
37 See the <em>gaf(1)</em> manual page for more information on the utility
38 options.
39 </p>
41 </div>
42 <!-- EDIT1 SECTION "gaf - gEDA/gaf Command-Line Utility" [54-804] -->
43 <h2 class="sectionedit2" id="gaf_export">gaf export</h2>
44 <div class="level2">
46 <p>
47 The detailed description of the <strong>gaf export</strong> command can be
48 found in the <em>gaf(1)</em> manual page.
49 </p>
51 </div>
52 <!-- EDIT2 SECTION "gaf export" [805-927] -->
53 <h2 class="sectionedit3" id="gaf_config">gaf config</h2>
54 <div class="level2">
56 <p>
57 This section describes how to set up <strong>gschem</strong> and <strong>gnetlist</strong>
58 using the <strong>gaf config</strong> command.
59 </p>
61 <p>
62 See the <em>gaf(1)</em> manual page for more information on the utility
63 options.
64 </p>
66 </div>
67 <!-- EDIT3 SECTION "gaf config" [928-1127] -->
68 <h3 class="sectionedit4" id="configuration_files">Configuration files</h3>
69 <div class="level3">
71 <p>
72 Configuration settings used to configure these programs are
73 written to gEDA config files.
74 These files are:
75 </p>
76 <ul>
77 <li class="level1 node"><div class="li"> <em><code>geda-system.conf</code></em> for system-wide settings. The system-wide config file is sequentially searched in three places:</div>
78 <ul>
79 <li class="level2"><div class="li"> in <em><code>${XDG_CONFIG_DIRS}/gEDA</code></em>, see the <a href="http://standards.freedesktop.org/basedir-spec/latest/" class="urlextern" title="http://standards.freedesktop.org/basedir-spec/latest/" rel="nofollow">XDG Base Directory Specification</a> for more information on that environment variable,</div>
80 </li>
81 <li class="level2"><div class="li"> if no system configuration was found there, in the traditional location of gEDA rc-files, i.e. in the <em><code>${PREFIX}/share/gEDA</code></em> directory, where <code>${PREFIX}</code> is a compiled default, usually <em><code>/usr</code></em> or <em><code>/usr/local</code></em> (but Debian based distributions use the <em><code>/etc/gEDA</code></em> directory instead),</div>
82 </li>
83 <li class="level2"><div class="li"> and finally, if no configuration file was found yet, in an XDG default directory or, if it is not defined, in the <em><code>/etc/xdg/gEDA</code></em> directory.</div>
84 </li>
85 </ul>
86 </li>
87 <li class="level1"><div class="li"> <em><code>$HOME/.gEDA/geda-user.conf</code></em> for user settings.</div>
88 </li>
89 <li class="level1"><div class="li"> <em><code>path/to/a/project/geda.conf</code></em> for your local project settings.</div>
90 </li>
91 </ul>
93 <p>
94 Note that you can edit these files manually using your favorite
95 text editor.
96 </p>
98 <p>
99 The config file format is described in this
100 <a href="http://standards.freedesktop.org/desktop-entry-spec/1.0/" class="urlextern" title="http://standards.freedesktop.org/desktop-entry-spec/1.0/" rel="nofollow">freedesktop.org
101 standard</a>.
102 </p>
105 All the config files consist of sections, called groups,
106 containing key-value pairs.
107 </p>
110 Key values in the gEDA config files may be single numbers or
111 lists. Note that unlike the <a href="#gaf_export" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf export</a> command, where
112 several list separators can be used, the only separator between
113 list values in the config files is semicolon &#039;;&#039;. Another difference
114 is that, when using the <strong>gaf config</strong> command, you always have
115 to specify all parameters of the used list. Thus, for example, the
116 next command will not work properly:
117 </p>
118 <pre class="code">gaf config --project export size 1000</pre>
121 The right command will look like this:
122 </p>
123 <pre class="code">gaf config --project export size &quot;1000;1000&quot;</pre>
126 All sizes should be given in Adobe points (72 points = 1 inch).
127 Suffixes such as “pt”, “mm” and others, which can be used with the
128 <a href="#gaf_export" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf export</a> command, do not work in the config files.
129 </p>
132 Next sections describe all existing groups.
133 </p>
135 </div>
136 <!-- EDIT4 SECTION "Configuration files" [1128-3260] -->
137 <h3 class="sectionedit5" id="export_group">export group</h3>
138 <div class="level3">
141 <em><strong>Table 1.</strong></em> <strong>export</strong> group parameters
142 </p>
143 <div class="table sectionedit6"><table class="inline">
144 <thead>
145 <tr class="row0">
146 <th class="col0 centeralign"> Key </th><th class="col1 leftalign"> Format </th><th class="col2 centeralign"> Default </th>
147 </tr>
148 </thead>
149 <tr class="row1">
150 <td class="col0 leftalign"> align </td><td class="col1 leftalign"> string “auto” or list of two integers in the form <code>HALIGN;VALIGN</code> </td><td class="col2 centeralign"> auto </td>
151 </tr>
152 <tr class="row2">
153 <td class="col0 leftalign"> dpi </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> 96 </td>
154 </tr>
155 <tr class="row3">
156 <td class="col0 leftalign"> font </td><td class="col1 leftalign"> string </td><td class="col2 centeralign"> Arial </td>
157 </tr>
158 <tr class="row4">
159 <td class="col0 leftalign"> layout </td><td class="col1 leftalign"> predefined string: “portrait”, “landscape”, or “auto” </td><td class="col2 centeralign"> auto </td>
160 </tr>
161 <tr class="row5">
162 <td class="col0 leftalign"> margins </td><td class="col1 leftalign"> list of four integers in the form <code>TOP;LEFT;BOTTOM;RIGHT</code> </td><td class="col2 centeralign"> 18;18;18;18 </td>
163 </tr>
164 <tr class="row6">
165 <td class="col0 leftalign"> monochrome </td><td class="col1 leftalign"> boolean </td><td class="col2 centeralign"> true </td>
166 </tr>
167 <tr class="row7">
168 <td class="col0 leftalign"> paper </td><td class="col1 leftalign"> predefined paper size string </td><td class="col2 centeralign"> <em>locale dependent</em> </td>
169 </tr>
170 <tr class="row8">
171 <td class="col0 leftalign"> size </td><td class="col1 leftalign"> string “auto” or list of two integers in the form <code>HEIGHT;WIDTH</code> </td><td class="col2 centeralign"> auto </td>
172 </tr>
173 </table></div>
174 <!-- EDIT6 TABLE [3329-4345] -->
175 </div>
177 <h4 id="align">align</h4>
178 <div class="level4">
181 Set how the drawing is aligned within the page. <code>HALIGN</code>
182 controls the horizontal alignment, and <code>VALIGN</code> the vertical.
183 Each alignment value should be in the range 0.0 to 1.0. The “auto”
184 alignment is equivalent to a value of <code>0.5:0.5</code>, i.e. centered.
185 </p>
188 For <a href="#gaf_export" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf export</a> command, you can use your locale&#039;s separator if
189 you use it without quotes. In such a case your shell will interpret
190 the numbers for you. You cannot do this for <strong>gaf config</strong>
191 since the align key is a string. You must use a dot as the separator
192 for floating point numbers when you write that string in a config
193 file. See <a href="#examples" title=":geda:gaf_utility.txt ↵" class="wikilink1">examples</a> below.
194 </p>
196 </div>
198 <h4 id="dpi">dpi</h4>
199 <div class="level4">
202 Set the number of pixels per inch used when generating PNG output.
203 </p>
205 </div>
207 <h4 id="font">font</h4>
208 <div class="level4">
211 Set the font to be used for drawing text.
212 </p>
215 See the section <a href="#fonts" title=":geda:gaf_utility.txt ↵" class="wikilink1">Fonts</a> below for more information on fonts
216 selection.
217 </p>
219 </div>
221 <h4 id="layout">layout</h4>
222 <div class="level4">
225 When using a paper size, set the orientation of the output. If
226 “auto” layout is used, the orientation that best fits the
227 drawing will be used.
228 </p>
230 </div>
232 <h4 id="margins">margins</h4>
233 <div class="level4">
236 Set the widths of the margins to be used.
237 </p>
240 Margins can actually be wider than the values set in a config
241 file since these values only specify the minimal distances from
242 the sheet edges, and the sizes of the chosen paper may not meet
243 the sizes of the printed schematic with the margins. If not
244 specified, default margin size is 18pt for all margins.
245 </p>
248 Note: setting less than four numbers for the margin key or using
249 of any unit suffixes will not work.
250 </p>
252 </div>
254 <h4 id="monochrome">monochrome</h4>
255 <div class="level4">
258 Toggle monochrome or color output.
259 </p>
261 </div>
263 <h4 id="paper">paper</h4>
264 <div class="level4">
267 Size the output for a particular paper size.
268 </p>
271 Legal paper sizes are described in the
272 <a href="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf" class="urlextern" title="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf" rel="nofollow"> PWG 5101.1-2002 Standard</a> (<code>iso_a4</code>, <code>iso_a3</code>,
273 <code>na_letter</code>, <code>na_legal</code>, etc).
274 The default paper size depends on the current locale. For instance,
275 it is <code>A4</code> when <code>ru_RU.UTF-8</code> is used whereas it is <code>letter</code>
276 for the <code>en_US.UTF-8</code> locale.
277 </p>
279 </div>
281 <h4 id="size">size</h4>
282 <div class="level4">
285 Size the output with specific dimensions. If the size is
286 “auto”, select the size that best fits the drawing.
287 </p>
290 The paper size set by the <code>size</code> key overrides that one set by the
291 <code>paper</code> key. Note: setting only one number for the <code>size</code> key
292 or using of any unit suffixes will not work.
293 </p>
295 </div>
296 <!-- EDIT5 SECTION "export group" [3261-6606] -->
297 <h3 class="sectionedit7" id="gnetlist_group">gnetlist group</h3>
298 <div class="level3">
301 <em><strong>Table 2.</strong></em> <strong>gnetlist</strong> group parameters
302 </p>
303 <div class="table sectionedit8"><table class="inline">
304 <thead>
305 <tr class="row0">
306 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
307 </tr>
308 </thead>
309 <tr class="row1">
310 <td class="col0 leftalign"> default-bus-name </td><td class="col1 leftalign"> string </td><td class="col2 centeralign"> unnamed_bus </td>
311 </tr>
312 <tr class="row2">
313 <td class="col0 leftalign"> default-net-name </td><td class="col1 leftalign"> string </td><td class="col2 centeralign"> unnamed_net </td>
314 </tr>
315 <tr class="row3">
316 <td class="col0 leftalign"> net-naming-priority </td><td class="col1"> predefined string: “net-attribute” or “netname-attribute” </td><td class="col2 centeralign"> net-attribute </td>
317 </tr>
318 <tr class="row4">
319 <td class="col0 leftalign"> traverse-hierarchy </td><td class="col1 leftalign"> boolean </td><td class="col2 centeralign"> true </td>
320 </tr>
321 </table></div>
322 <!-- EDIT8 TABLE [6679-7223] -->
323 </div>
325 <h4 id="default-bus-name">default-bus-name</h4>
326 <div class="level4">
329 Define the default bus name for the buses unnamed in the
330 schematic.
331 </p>
334 Buses are still not used by any gnetlist backend, so this
335 parameter is not useful yet.
336 </p>
338 </div>
340 <h4 id="default-net-name">default-net-name</h4>
341 <div class="level4">
344 Define the default net name for the nets unnamed in the
345 schematic.
346 </p>
349 It is used to create netnames of the form “unnamed_netN”
350 where <code>N</code> is a number.
351 </p>
353 </div>
355 <h4 id="net-naming-priority">net-naming-priority</h4>
356 <div class="level4">
359 Specify which attribute, <code>net</code> or <code>netname</code>, has priority if a
360 net is found with two names. Any netname conflict will be
361 resolved using the chosen attribute.
362 </p>
365 This option is used when both <code>net</code> and <code>netname</code>
366 attributes are defined for some nets in your schematic and you want
367 to specify which one should define the net names that gnetlist will
368 use for netlisting. See the <a href="geda-na_howto.html" class="wikilink1" title="geda-na_howto.html">net= attribute mini-HOWTO</a>
369 and <a href="geda-master_attributes_list.html" class="wikilink1" title="geda-master_attributes_list.html">Master attributes list</a> for more
370 information on these attributes.
371 </p>
373 </div>
375 <h4 id="traverse-hierarchy">traverse-hierarchy</h4>
376 <div class="level4">
379 Decides if the hierarchy is traversed or not. If this is disabled
380 then <strong>gnetlist</strong> will not go down searching for any underlying
381 sources.
382 </p>
384 </div>
385 <!-- EDIT7 SECTION "gnetlist group" [6607-8296] -->
386 <h3 class="sectionedit9" id="gschem_group">gschem group</h3>
387 <div class="level3">
390 <em><strong>Table 3.</strong></em> <strong>gschem</strong> group parameters
391 </p>
392 <div class="table sectionedit10"><table class="inline">
393 <thead>
394 <tr class="row0">
395 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
396 </tr>
397 </thead>
398 <tr class="row1">
399 <td class="col0 leftalign"> default-filename </td><td class="col1 leftalign"> string </td><td class="col2 centeralign"> untitled </td>
400 </tr>
401 </table></div>
402 <!-- EDIT10 TABLE [8365-8456] -->
403 </div>
405 <h4 id="default-filename">default-filename</h4>
406 <div class="level4">
409 Define the default file name for any new schematic files created
410 in <strong>gschem</strong>.
411 </p>
414 It is used to create filenames of the form “untitled_N.sch”
415 where <code>N</code> is a number.
416 </p>
418 </div>
419 <!-- EDIT9 SECTION "gschem group" [8297-8650] -->
420 <h3 class="sectionedit11" id="gschemlibrary_group">gschem.library group</h3>
421 <div class="level3">
424 <em><strong>Table 4.</strong></em> <strong>gschem.library</strong> group parameters
425 </p>
426 <div class="table sectionedit12"><table class="inline">
427 <thead>
428 <tr class="row0">
429 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
430 </tr>
431 </thead>
432 <tr class="row1">
433 <td class="col0 leftalign"> component-attributes </td><td class="col1 leftalign"> comma separated list of attribute names </td><td class="col2 centeralign"> * </td>
434 </tr>
435 <tr class="row2">
436 <td class="col0 leftalign"> sort </td><td class="col1 leftalign"> boolean </td><td class="col2 centeralign"> false </td>
437 </tr>
438 </table></div>
439 <!-- EDIT12 TABLE [8735-9070] -->
440 </div>
442 <h4 id="component-attributes">component-attributes</h4>
443 <div class="level4">
446 Holds a list of attribute names that are displayed in the
447 component select dialog.
448 </p>
451 Symbol attributes in the dialog are sorted in the same order as they appear in the
452 list. If the first list element is an asterisk “*”, all
453 attributes will be displayed in the alphabetical order. An empty list
454 will disable the attribute view in the dialog.
455 </p>
457 </div>
459 <h4 id="sort">sort</h4>
460 <div class="level4">
463 Sort the component library.
464 </p>
467 If the value of this attribute is true, the component libraries
468 are sorted alphabetically. Otherwise they are sorted in the order
469 opposite to what they were added in.
470 </p>
472 </div>
473 <!-- EDIT11 SECTION "gschem.library group" [8651-9654] -->
474 <h3 class="sectionedit13" id="gschemprinting_group">gschem.printing group</h3>
475 <div class="level3">
478 <em><strong>Table 5.</strong></em> <strong>gschem.printing</strong> group parameters
479 </p>
480 <div class="table sectionedit14"><table class="inline">
481 <thead>
482 <tr class="row0">
483 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
484 </tr>
485 </thead>
486 <tr class="row1">
487 <td class="col0 leftalign"> layout </td><td class="col1 leftalign"> predefined string: “portrait”, “landscape”, or “auto” </td><td class="col2 centeralign"> auto </td>
488 </tr>
489 <tr class="row2">
490 <td class="col0 leftalign"> monochrome </td><td class="col1 leftalign"> boolean </td><td class="col2 centeralign"> false </td>
491 </tr>
492 <tr class="row3">
493 <td class="col0 leftalign"> paper </td><td class="col1 leftalign"> predefined paper size string </td><td class="col2 centeralign"> <em>locale dependent</em> </td>
494 </tr>
495 </table></div>
496 <!-- EDIT14 TABLE [9741-10144] -->
497 </div>
499 <h4 id="layout1">layout</h4>
500 <div class="level4">
503 When using a paper size, set the orientation of the output. If
504 “auto” layout is used, the orientation that best fits the
505 drawing will be used.
506 </p>
509 <strong>gschem</strong> page orientation is intended to output pages to a
510 printer rather than to PDF, so the value “auto” means that if
511 you output pages to PDF you will get rotated landscape instead of
512 ordinary. To get readable PDF with pages in landscape use instead
513 the <a href="#gaf_export" title=":geda:gaf_utility.txt ↵" class="wikilink1">gaf export</a> command, and set to “auto” the <code>layout</code> key
514 in the <a href="#export_group" title=":geda:gaf_utility.txt ↵" class="wikilink1">export group</a>.
515 </p>
518 Note: as of now, printing using the script <em><code>print.scm</code></em> doesn&#039;t
519 use the <code>layout</code> key setting.
520 </p>
522 </div>
524 <h4 id="paper1">paper</h4>
525 <div class="level4">
528 Size the output for a particular paper size.
529 </p>
532 The default <code>paper</code> value depends on the current locale.
533 See the notes on the paper size above in the description of the
534 <code>paper</code> key for the <a href="#export_group" title=":geda:gaf_utility.txt ↵" class="wikilink1">export group</a>.
535 </p>
537 </div>
539 <h4 id="monochrome1">monochrome</h4>
540 <div class="level4">
543 Toggle monochrome or color output.
544 </p>
547 It is intended that unlike the <code>monochrome</code> value in the
548 <a href="#export_group" title=":geda:gaf_utility.txt ↵" class="wikilink1">export group</a>, the key value in this group is <code>false</code>.
549 </p>
551 </div>
552 <!-- EDIT13 SECTION "gschem.printing group" [9655-11157] -->
553 <h3 class="sectionedit15" id="gschemdialog-geometry_groups">gschem.dialog-geometry.* groups</h3>
554 <div class="level3">
557 These groups include:
558 </p>
559 <ul>
560 <li class="level1"><div class="li"> gschem.dialog-geometry.arc-angle</div>
561 </li>
562 <li class="level1"><div class="li"> gschem.dialog-geometry.autonumber</div>
563 </li>
564 <li class="level1"><div class="li"> gschem.dialog-geometry.color-edit</div>
565 </li>
566 <li class="level1"><div class="li"> gschem.dialog-geometry.compselect</div>
567 </li>
568 <li class="level1"><div class="li"> gschem.dialog-geometry.coord</div>
569 </li>
570 <li class="level1"><div class="li"> gschem.dialog-geometry.fill-type</div>
571 </li>
572 <li class="level1"><div class="li"> gschem.dialog-geometry.find-text</div>
573 </li>
574 <li class="level1"><div class="li"> gschem.dialog-geometry.hide-text</div>
575 </li>
576 <li class="level1"><div class="li"> gschem.dialog-geometry.hotkeys</div>
577 </li>
578 <li class="level1"><div class="li"> gschem.dialog-geometry.line-type</div>
579 </li>
580 <li class="level1"><div class="li"> gschem.dialog-geometry.log</div>
581 </li>
582 <li class="level1"><div class="li"> gschem.dialog-geometry.multiattrib</div>
583 </li>
584 <li class="level1"><div class="li"> gschem.dialog-geometry.pin-type-edit</div>
585 </li>
586 <li class="level1"><div class="li"> gschem.dialog-geometry.show-text</div>
587 </li>
588 <li class="level1"><div class="li"> gschem.dialog-geometry.singleattrib</div>
589 </li>
590 <li class="level1"><div class="li"> gschem.dialog-geometry.slot-edit</div>
591 </li>
592 <li class="level1"><div class="li"> gschem.dialog-geometry.snap-size</div>
593 </li>
594 <li class="level1"><div class="li"> gschem.dialog-geometry.text-edit</div>
595 </li>
596 <li class="level1"><div class="li"> gschem.dialog-geometry.text-entry</div>
597 </li>
598 <li class="level1"><div class="li"> gschem.dialog-geometry.text-size</div>
599 </li>
600 <li class="level1"><div class="li"> gschem.dialog-geometry.translate</div>
601 </li>
602 </ul>
605 There are two special groups having additional settings:
606 </p>
607 <ul>
608 <li class="level1"><div class="li"> gschem.dialog-geometry.compselect</div>
609 </li>
610 <li class="level1"><div class="li"> gschem.dialog-geometry.multiattrib</div>
611 </li>
612 </ul>
615 <em><strong>Table 5.</strong></em> <strong> gschem.dialog-geometry.* </strong> groups parameters
616 </p>
617 <div class="table sectionedit16"><table class="inline">
618 <thead>
619 <tr class="row0">
620 <th class="col0 centeralign" colspan="3"> All dialogs </th>
621 </tr>
622 <tr class="row1">
623 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
624 </tr>
625 </thead>
626 <tr class="row2">
627 <td class="col0 leftalign"> x </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> - </td>
628 </tr>
629 <tr class="row3">
630 <td class="col0 leftalign"> y </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> - </td>
631 </tr>
632 <tr class="row4">
633 <td class="col0 leftalign"> width </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> - </td>
634 </tr>
635 <tr class="row5">
636 <td class="col0 leftalign"> height </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> - </td>
637 </tr>
638 <tr class="row6">
639 <th class="col0 centeralign" colspan="3"> gschem.dialog-geometry.compselect </th>
640 </tr>
641 <tr class="row7">
642 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
643 </tr>
644 <tr class="row8">
645 <td class="col0 leftalign"> hpaned </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> - </td>
646 </tr>
647 <tr class="row9">
648 <td class="col0 leftalign"> vpaned </td><td class="col1 leftalign"> integer </td><td class="col2 centeralign"> - </td>
649 </tr>
650 <tr class="row10">
651 <td class="col0 leftalign"> source-tab </td><td class="col1 leftalign"> 0 or 1 </td><td class="col2 centeralign"> 1 </td>
652 </tr>
653 <tr class="row11">
654 <th class="col0 centeralign" colspan="3"> gschem.dialog-geometry.multiattrib </th>
655 </tr>
656 <tr class="row12">
657 <th class="col0 centeralign"> Key </th><th class="col1 centeralign"> Format </th><th class="col2 centeralign"> Default </th>
658 </tr>
659 <tr class="row13">
660 <td class="col0 leftalign"> show_inherited </td><td class="col1 leftalign"> boolean </td><td class="col2 centeralign"> true </td>
661 </tr>
662 </table></div>
663 <!-- EDIT16 TABLE [12202-13769] -->
665 Note: all these values are automatically stored in the user
666 configuration files. You can change them manually, but the values
667 will be overwritten next time the dialog in question changes its
668 size or other value mentioned in the table. If you edit the values
669 when <strong>gschem</strong> is running they will be silently overwritten after
670 it closes.
671 </p>
673 </div>
675 <h4 id="x">x</h4>
676 <div class="level4">
679 X position of the dialog window.
680 </p>
682 </div>
684 <h4 id="y">y</h4>
685 <div class="level4">
688 Y position of the dialog window.
689 </p>
691 </div>
693 <h4 id="width">width</h4>
694 <div class="level4">
697 Width of the dialog window.
698 </p>
700 </div>
702 <h4 id="height">height</h4>
703 <div class="level4">
706 Height of the dialog window.
707 </p>
709 </div>
711 <h4 id="hpaned">hpaned</h4>
712 <div class="level4">
715 Width of the horizontal pane where components are selected in the
716 component select dialog.
717 </p>
719 </div>
721 <h4 id="vpaned">vpaned</h4>
722 <div class="level4">
725 Height of the vertical pane containing component preview in the
726 component select dialog.
727 </p>
729 </div>
731 <h4 id="source-tab">source-tab</h4>
732 <div class="level4">
735 This value determines which tab will be opened when you bring up
736 the component selection dialog. 0 means that the “In use” tab will
737 be chosen, 1 means that the “Libraries” tab will be chosen.
738 </p>
740 </div>
742 <h4 id="show_inherited">show_inherited</h4>
743 <div class="level4">
746 Visibility setting for inherited attributes in the multiattrib
747 dialog.
748 </p>
750 </div>
751 <!-- EDIT15 SECTION "gschem.dialog-geometry.* groups" [11158-14803] -->
752 <h2 class="sectionedit17" id="gaf_shell">gaf shell</h2>
753 <div class="level2">
756 <strong>gaf shell</strong> provides a Scheme Read-Eval-Print Loop (REPL) for
757 automating processing of schematic and symbol files. It is
758 designed to be used with the gEDA Scheme <abbr title="Application Programming Interface">API</abbr>. See the <em>gaf(1)</em>
759 manual page for more information on the utility options, and
760 <strong>info geda-scheme</strong> on which gEDA Scheme procedures you can use.
761 </p>
763 </div>
764 <!-- EDIT17 SECTION "gaf shell" [14804-15142] -->
765 <h2 class="sectionedit18" id="fonts">Fonts</h2>
766 <div class="level2">
769 On Linux, font configuring is handled by <strong>Fontconfig</strong>, and modern
770 systems (particularly <strong>pango</strong> and <strong>cairo</strong>) rely on its library in
771 looking up any font specified. You can provide the <strong>gaf</strong> command
772 with a pattern containing the font name wanted and, optionally,
773 with some settings for that font.
774 Fontconfig performs matching of the pattern against all the
775 fonts available in your system. The closest matching font is
776 selected. This ensures that a font will always be returned, but
777 doesn&#039;t ensure that it is anything like the requested pattern.
778 </p>
781 If you want to find out which fonts are available in your system,
782 you can use the <em>fc-list(1)</em> utility from the fontconfig package. To
783 check whether fontconfig could find an appropriate font by the
784 specified pattern (or to see which font will correspond to your
785 pattern), use the <em>fc-match(1)</em> utility.
786 </p>
789 See the
790 <a href="http://freedesktop.org/software/fontconfig/fontconfig-user.html" class="urlextern" title="http://freedesktop.org/software/fontconfig/fontconfig-user.html" rel="nofollow">fontconfig
791 documentation</a> for more information on how to specify the font
792 name you want to use.
793 </p>
796 In some circumstances, the font system can even embed more than one
797 font into your document. This occurs, for instance, if the most
798 appropriate font chosen by fontconfig doesn&#039;t contain some glyphs
799 for one of the languages used in the document. In this case it will
800 add some other font that does have the glyphs required.
801 </p>
804 The next table lists possible settings (acquired from the Pango
805 documentation) which you can use in your font name patterns. See
806 also the <a href="#examples" title=":geda:gaf_utility.txt ↵" class="wikilink1">Examples</a> section below.
807 </p>
810 <em><strong>Table 6.</strong></em> Possible font settings
811 </p>
812 <div class="table sectionedit19"><table class="inline">
813 <thead>
814 <tr class="row0">
815 <th class="col0"> Setting </th><th class="col1"> Value </th>
816 </tr>
817 </thead>
818 <tr class="row1">
819 <td class="col0 leftalign"> Style </td><td class="col1"> Normal<br/>
820 Oblique<br/>
821 Italic </td>
822 </tr>
823 <tr class="row2">
824 <td class="col0 leftalign"> Weight </td><td class="col1"> Thin<br/>
825 Ultralight<br/>
826 Light<br/>
827 Book<br/>
828 Normal<br/>
829 Medium<br/>
830 Semibold<br/>
831 Bold<br/>
832 Ultrabold<br/>
833 Heavy<br/>
834 Ultraheavy </td>
835 </tr>
836 <tr class="row3">
837 <td class="col0"> Variant </td><td class="col1">Normal<br/>
838 SmallCaps </td>
839 </tr>
840 <tr class="row4">
841 <td class="col0"> Stretch </td><td class="col1"> UltraCondensed<br/>
842 ExtraCondensed<br/>
843 Condensed<br/>
844 SemiCondensed<br/>
845 Normal<br/>
846 SemiExpanded<br/>
847 Expanded<br/>
848 ExtraExpanded<br/>
849 UltraExpanded </td>
850 </tr>
851 </table></div>
852 <!-- EDIT19 TABLE [16724-17072] -->
853 </div>
854 <!-- EDIT18 SECTION "Fonts" [15143-17074] -->
855 <h2 class="sectionedit20" id="examples">Examples</h2>
856 <div class="level2">
858 </div>
859 <!-- EDIT20 SECTION "Examples" [17075-17095] -->
860 <h3 class="sectionedit21" id="set_up_exporting">Set up exporting</h3>
861 <div class="level3">
864 Use the “landscape” layout by default for a local project:
865 </p>
866 <pre class="code">gaf config --project export layout landscape</pre>
869 Use the “letter” paper size by default for all your printouts:
870 </p>
871 <pre class="code">gaf config --user export paper na_letter</pre>
874 Set paper size to the definite value of 1&times;2 inch for a local
875 project:
876 </p>
877 <pre class="code">gaf config --project export size &quot;72;144&quot;</pre>
880 Set margins as a half of inch for left and right sides and as a
881 quarter of inch for top and bottom for a local project:
882 </p>
883 <pre class="code">gaf config --project export margins &quot;18;36;18;36&quot;</pre>
886 This command will align your project&#039;s schematics to the right.
887 </p>
888 <pre class="code">gaf config --project export align &quot;1.0;0.5&quot;</pre>
891 This command is wrong, it doesn&#039;t work for you even if your locale
892 uses comma as a separator for floating point numbers:
893 </p>
894 <pre class="code">gaf config --project export align &quot;1,0;0,0&quot;</pre>
897 This command, though, works in this case (e.g., in the ru_RU.UTF-8
898 locale):
899 </p>
900 <pre class="code">gaf export -a 0,0:1.0 -o file.pdf file.sch</pre>
903 Note, that I use <strong><code>gaf export</code></strong> here, not <strong><code>gaf config</code></strong>.
904 </p>
907 To print all your schematics in color (note: “False” or “FALSE”
908 will not work):
909 </p>
910 <pre class="code">gaf config --project export monochrome false</pre>
913 Set up a custom user font:
914 </p>
915 <pre class="code">gaf config --user export font &quot;OpenGost Type B TT Italic&quot;</pre>
918 Choose another font for a local project:
919 </p>
920 <pre class="code">gaf config --project export font &quot;Arial Bold&quot;</pre>
922 </div>
923 <!-- EDIT21 SECTION "Set up exporting" [17096-18390] -->
924 <h3 class="sectionedit22" id="set_up_netlisting">Set up netlisting</h3>
925 <div class="level3">
928 Use more short net and bus names in all netlists created by the
929 user:
930 </p>
931 <pre class="code">gaf config --user gnetlist default-net-name net
932 gaf config --user gnetlist default-bus-name bus</pre>
935 Ensure that a local project will use hierarchical net
936 names despite of settings in <em><code>geda-user.conf</code></em>:
937 </p>
938 <pre class="code">gaf config --project gnetlist traverse-hierarchy true</pre>
941 Rename nets connecting to <em><code>gnd-1.sym</code></em> (and other symbols
942 having the <code>net</code> attribute) if they have the <code>netname</code>
943 attribute:
944 </p>
945 <pre class="code">gaf config --project gnetlist net-naming-priority netname-attribute</pre>
947 </div>
948 <!-- EDIT22 SECTION "Set up netlisting" [18391-18955] -->
949 <h3 class="sectionedit23" id="set_up_gschem">Set up gschem</h3>
950 <div class="level3">
953 Use shorter names for new files:
954 </p>
955 <pre class="code">gaf config --user gschem default-filename empty</pre>
957 </div>
958 <!-- EDIT23 SECTION "Set up gschem" [18956-19063] -->
959 <h3 class="sectionedit24" id="set_up_gschem_library_view">Set up gschem library view</h3>
960 <div class="level3">
963 This command explicitly tells that you want to always show
964 all attributes:
965 </p>
966 <pre class="code">gaf config --project gschem.library component-attributes &quot;*&quot;</pre>
969 Please be careful when using this command in the command line. If
970 you forget the quotes, your shell will substitute the first file
971 name in the working directory file list for the
972 attribute name. This is most likely not what you want.
973 </p>
976 Display only attributes that are in the filter list:
977 </p>
978 <pre class="code">gaf config --project gschem.library component-attributes &quot;refdes;device;description&quot;</pre>
981 Don&#039;t show any attributes in the component select dialog:
982 </p>
983 <pre class="code">gaf config --project gschem.library component-attributes &quot;&quot;</pre>
986 The same as before. However, this command will not work because the
987 specified string separates values with commas instead semicolons,
988 so the whole string will be considered one attribute name:
989 </p>
990 <pre class="code">gaf config --project gschem.library component-attributes &quot;refdes,device,description&quot;</pre>
993 Sort the component library in <strong>gschem</strong> alphabetically:
994 </p>
995 <pre class="code">gaf config --user gschem.library sort true</pre>
997 </div>
998 <!-- EDIT24 SECTION "Set up gschem library view" [19064-20116] -->
999 <h3 class="sectionedit25" id="set_up_gschem_printing">Set up gschem printing</h3>
1000 <div class="level3">
1003 Choose <code>landscape</code> as the default orientation for a local
1004 project when printing from within <strong>gschem</strong>:
1005 </p>
1006 <pre class="code">gaf config --project gschem.printing layout landscape</pre>
1009 Use the A5 paper size when printing from within <strong>gschem</strong>:
1010 </p>
1011 <pre class="code">gaf config --project gschem.printing paper iso_a5</pre>
1014 Always use B&amp;W printing output from within <strong>gschem</strong>:
1015 </p>
1016 <pre class="code">gaf config --user gschem.printing monochrome true</pre>
1018 </div>
1019 <!-- EDIT25 SECTION "Set up gschem printing" [20117-20531] -->
1020 <h3 class="sectionedit26" id="set_up_gschem_dialogs">Set up gschem dialogs</h3>
1021 <div class="level3">
1024 Don&#039;t show any inherited attributes in the multiattrib dialog:
1025 </p>
1026 <pre class="code">gaf config --user gschem.dialog-geometry.multiattrib show_inherited false</pre>
1029 Note that you cannot use the <code>--project</code> (<code>-p</code>) key in the
1030 command above. This command works only in the user context and has
1031 no sense for local projects.
1032 </p>
1034 </div>
1035 <!-- EDIT26 SECTION "Set up gschem dialogs" [20532-20866] -->
1036 <h3 class="sectionedit27" id="using_gaf_shell">Using gaf shell</h3>
1037 <div class="level3">
1040 Find out the path to the gEDA user configuration directory,
1041 type:
1042 </p>
1043 <pre class="code">gaf shell -c &quot;(display (user-config-dir))&quot;</pre>
1046 The same for the system configuration directories:
1047 </p>
1048 <pre class="code">gaf shell -c &quot;(display (sys-config-dirs))&quot;</pre>
1050 </div>
1051 <!-- EDIT27 SECTION "Using gaf shell" [20867-] --></body>
1052 </html>