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:
</em> <a href=
"geda-gaf_utility.ru.html" class=
"wikilink1" title=
"geda-gaf_utility.ru.html">Русский
</a>
17 <h1 class=
"sectionedit1" id=
"gaf_-_geda_gaf_command-line_utility">gaf - gEDA/gaf Command-Line Utility
</h1>
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
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>
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>
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>
37 See the
<em>gaf(
1)
</em> manual page for more information on the utility
42 <!-- EDIT1 SECTION "gaf - gEDA/gaf Command-Line Utility" [54-804] -->
43 <h2 class=
"sectionedit2" id=
"gaf_export">gaf export
</h2>
47 The detailed description of the
<strong>gaf export
</strong> command can be
48 found in the
<em>gaf(
1)
</em> manual page.
52 <!-- EDIT2 SECTION "gaf export" [805-927] -->
53 <h2 class=
"sectionedit3" id=
"gaf_config">gaf config
</h2>
57 This section describes how to set up
<strong>gschem
</strong> and
<strong>gnetlist
</strong>
58 using the
<strong>gaf config
</strong> command.
62 See the
<em>gaf(
1)
</em> manual page for more information on the utility
67 <!-- EDIT3 SECTION "gaf config" [928-1127] -->
68 <h3 class=
"sectionedit4" id=
"configuration_files">Configuration files
</h3>
72 Configuration settings used to configure these programs are
73 written to gEDA config files.
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>
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>
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>
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>
87 <li class=
"level1"><div class=
"li"> <em><code>$HOME/.gEDA/geda-user.conf
</code></em> for user settings.
</div>
89 <li class=
"level1"><div class=
"li"> <em><code>path/to/a/project/geda.conf
</code></em> for your local project settings.
</div>
94 Note that you can edit these files manually using your favorite
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
105 All the config files consist of sections, called groups,
106 containing key-value pairs.
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
';
'. 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:
118 <pre class=
"code">gaf config --project export size
1000</pre>
121 The right command will look like this:
123 <pre class=
"code">gaf config --project export size
"1000;
1000"</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.
132 Next sections describe all existing groups.
136 <!-- EDIT4 SECTION "Configuration files" [1128-3260] -->
137 <h3 class=
"sectionedit5" id=
"export_group">export group
</h3>
141 <em><strong>Table
1.
</strong></em> <strong>export
</strong> group parameters
143 <div class=
"table sectionedit6"><table class=
"inline">
146 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 leftalign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
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>
153 <td class=
"col0 leftalign"> dpi
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> 96 </td>
156 <td class=
"col0 leftalign"> font
</td><td class=
"col1 leftalign"> string
</td><td class=
"col2 centeralign"> Arial
</td>
159 <td class=
"col0 leftalign"> layout
</td><td class=
"col1 leftalign"> predefined string: “portrait”, “landscape”, or “auto”
</td><td class=
"col2 centeralign"> auto
</td>
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>
165 <td class=
"col0 leftalign"> monochrome
</td><td class=
"col1 leftalign"> boolean
</td><td class=
"col2 centeralign"> true
</td>
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>
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>
174 <!-- EDIT6 TABLE [3329-4345] -->
177 <h4 id=
"align">align
</h4>
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.
188 For
<a href=
"#gaf_export" title=
":geda:gaf_utility.txt ↵" class=
"wikilink1">gaf export
</a> command, you can use your locale
'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.
198 <h4 id=
"dpi">dpi
</h4>
202 Set the number of pixels per inch used when generating PNG output.
207 <h4 id=
"font">font
</h4>
211 Set the font to be used for drawing text.
215 See the section
<a href=
"#fonts" title=
":geda:gaf_utility.txt ↵" class=
"wikilink1">Fonts
</a> below for more information on fonts
221 <h4 id=
"layout">layout
</h4>
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.
232 <h4 id=
"margins">margins
</h4>
236 Set the widths of the margins to be used.
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.
248 Note: setting less than four numbers for the margin key or using
249 of any unit suffixes will not work.
254 <h4 id=
"monochrome">monochrome
</h4>
258 Toggle monochrome or color output.
263 <h4 id=
"paper">paper
</h4>
267 Size the output for a particular paper size.
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.
281 <h4 id=
"size">size
</h4>
285 Size the output with specific dimensions. If the size is
286 “auto”, select the size that best fits the drawing.
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.
296 <!-- EDIT5 SECTION "export group" [3261-6606] -->
297 <h3 class=
"sectionedit7" id=
"gnetlist_group">gnetlist group
</h3>
301 <em><strong>Table
2.
</strong></em> <strong>gnetlist
</strong> group parameters
303 <div class=
"table sectionedit8"><table class=
"inline">
306 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
310 <td class=
"col0 leftalign"> default-bus-name
</td><td class=
"col1 leftalign"> string
</td><td class=
"col2 centeralign"> unnamed_bus
</td>
313 <td class=
"col0 leftalign"> default-net-name
</td><td class=
"col1 leftalign"> string
</td><td class=
"col2 centeralign"> unnamed_net
</td>
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>
319 <td class=
"col0 leftalign"> traverse-hierarchy
</td><td class=
"col1 leftalign"> boolean
</td><td class=
"col2 centeralign"> true
</td>
322 <!-- EDIT8 TABLE [6679-7223] -->
325 <h4 id=
"default-bus-name">default-bus-name
</h4>
329 Define the default bus name for the buses unnamed in the
334 Buses are still not used by any gnetlist backend, so this
335 parameter is not useful yet.
340 <h4 id=
"default-net-name">default-net-name
</h4>
344 Define the default net name for the nets unnamed in the
349 It is used to create netnames of the form “unnamed_netN”
350 where
<code>N
</code> is a number.
355 <h4 id=
"net-naming-priority">net-naming-priority
</h4>
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.
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.
375 <h4 id=
"traverse-hierarchy">traverse-hierarchy
</h4>
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
385 <!-- EDIT7 SECTION "gnetlist group" [6607-8296] -->
386 <h3 class=
"sectionedit9" id=
"gschem_group">gschem group
</h3>
390 <em><strong>Table
3.
</strong></em> <strong>gschem
</strong> group parameters
392 <div class=
"table sectionedit10"><table class=
"inline">
395 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
399 <td class=
"col0 leftalign"> default-filename
</td><td class=
"col1 leftalign"> string
</td><td class=
"col2 centeralign"> untitled
</td>
402 <!-- EDIT10 TABLE [8365-8456] -->
405 <h4 id=
"default-filename">default-filename
</h4>
409 Define the default file name for any new schematic files created
410 in
<strong>gschem
</strong>.
414 It is used to create filenames of the form “untitled_N.sch”
415 where
<code>N
</code> is a number.
419 <!-- EDIT9 SECTION "gschem group" [8297-8650] -->
420 <h3 class=
"sectionedit11" id=
"gschemlibrary_group">gschem.library group
</h3>
424 <em><strong>Table
4.
</strong></em> <strong>gschem.library
</strong> group parameters
426 <div class=
"table sectionedit12"><table class=
"inline">
429 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
433 <td class=
"col0 leftalign"> component-attributes
</td><td class=
"col1 leftalign"> comma separated list of attribute names
</td><td class=
"col2 centeralign"> *
</td>
436 <td class=
"col0 leftalign"> sort
</td><td class=
"col1 leftalign"> boolean
</td><td class=
"col2 centeralign"> false
</td>
439 <!-- EDIT12 TABLE [8735-9070] -->
442 <h4 id=
"component-attributes">component-attributes
</h4>
446 Holds a list of attribute names that are displayed in the
447 component select dialog.
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.
459 <h4 id=
"sort">sort
</h4>
463 Sort the component library.
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.
473 <!-- EDIT11 SECTION "gschem.library group" [8651-9654] -->
474 <h3 class=
"sectionedit13" id=
"gschemprinting_group">gschem.printing group
</h3>
478 <em><strong>Table
5.
</strong></em> <strong>gschem.printing
</strong> group parameters
480 <div class=
"table sectionedit14"><table class=
"inline">
483 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
487 <td class=
"col0 leftalign"> layout
</td><td class=
"col1 leftalign"> predefined string: “portrait”, “landscape”, or “auto”
</td><td class=
"col2 centeralign"> auto
</td>
490 <td class=
"col0 leftalign"> monochrome
</td><td class=
"col1 leftalign"> boolean
</td><td class=
"col2 centeralign"> false
</td>
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>
496 <!-- EDIT14 TABLE [9741-10144] -->
499 <h4 id=
"layout1">layout
</h4>
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.
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>.
518 Note: as of now, printing using the script
<em><code>print.scm
</code></em> doesn
't
519 use the
<code>layout
</code> key setting.
524 <h4 id=
"paper1">paper
</h4>
528 Size the output for a particular paper size.
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>.
539 <h4 id=
"monochrome1">monochrome
</h4>
543 Toggle monochrome or color output.
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>.
552 <!-- EDIT13 SECTION "gschem.printing group" [9655-11157] -->
553 <h3 class=
"sectionedit15" id=
"gschemdialog-geometry_groups">gschem.dialog-geometry.* groups
</h3>
557 These groups include:
560 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.arc-angle
</div>
562 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.autonumber
</div>
564 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.color-edit
</div>
566 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.compselect
</div>
568 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.coord
</div>
570 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.fill-type
</div>
572 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.find-text
</div>
574 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.hide-text
</div>
576 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.hotkeys
</div>
578 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.line-type
</div>
580 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.log
</div>
582 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.multiattrib
</div>
584 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.pin-type-edit
</div>
586 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.show-text
</div>
588 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.singleattrib
</div>
590 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.slot-edit
</div>
592 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.snap-size
</div>
594 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.text-edit
</div>
596 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.text-entry
</div>
598 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.text-size
</div>
600 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.translate
</div>
605 There are two special groups having additional settings:
608 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.compselect
</div>
610 <li class=
"level1"><div class=
"li"> gschem.dialog-geometry.multiattrib
</div>
615 <em><strong>Table
5.
</strong></em> <strong> gschem.dialog-geometry.*
</strong> groups parameters
617 <div class=
"table sectionedit16"><table class=
"inline">
620 <th class=
"col0 centeralign" colspan=
"3"> All dialogs
</th>
623 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
627 <td class=
"col0 leftalign"> x
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> -
</td>
630 <td class=
"col0 leftalign"> y
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> -
</td>
633 <td class=
"col0 leftalign"> width
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> -
</td>
636 <td class=
"col0 leftalign"> height
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> -
</td>
639 <th class=
"col0 centeralign" colspan=
"3"> gschem.dialog-geometry.compselect
</th>
642 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
645 <td class=
"col0 leftalign"> hpaned
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> -
</td>
648 <td class=
"col0 leftalign"> vpaned
</td><td class=
"col1 leftalign"> integer
</td><td class=
"col2 centeralign"> -
</td>
651 <td class=
"col0 leftalign"> source-tab
</td><td class=
"col1 leftalign"> 0 or
1 </td><td class=
"col2 centeralign"> 1 </td>
654 <th class=
"col0 centeralign" colspan=
"3"> gschem.dialog-geometry.multiattrib
</th>
657 <th class=
"col0 centeralign"> Key
</th><th class=
"col1 centeralign"> Format
</th><th class=
"col2 centeralign"> Default
</th>
660 <td class=
"col0 leftalign"> show_inherited
</td><td class=
"col1 leftalign"> boolean
</td><td class=
"col2 centeralign"> true
</td>
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
679 X position of the dialog window.
688 Y position of the dialog window.
693 <h4 id=
"width">width
</h4>
697 Width of the dialog window.
702 <h4 id=
"height">height
</h4>
706 Height of the dialog window.
711 <h4 id=
"hpaned">hpaned
</h4>
715 Width of the horizontal pane where components are selected in the
716 component select dialog.
721 <h4 id=
"vpaned">vpaned
</h4>
725 Height of the vertical pane containing component preview in the
726 component select dialog.
731 <h4 id=
"source-tab">source-tab
</h4>
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.
742 <h4 id=
"show_inherited">show_inherited
</h4>
746 Visibility setting for inherited attributes in the multiattrib
751 <!-- EDIT15 SECTION "gschem.dialog-geometry.* groups" [11158-14803] -->
752 <h2 class=
"sectionedit17" id=
"gaf_shell">gaf shell
</h2>
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.
764 <!-- EDIT17 SECTION "gaf shell" [14804-15142] -->
765 <h2 class=
"sectionedit18" id=
"fonts">Fonts
</h2>
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
't ensure that it is anything like the requested pattern.
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.
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.
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
'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.
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.
810 <em><strong>Table
6.
</strong></em> Possible font settings
812 <div class=
"table sectionedit19"><table class=
"inline">
815 <th class=
"col0"> Setting
</th><th class=
"col1"> Value
</th>
819 <td class=
"col0 leftalign"> Style
</td><td class=
"col1"> Normal
<br/>
824 <td class=
"col0 leftalign"> Weight
</td><td class=
"col1"> Thin
<br/>
837 <td class=
"col0"> Variant
</td><td class=
"col1">Normal
<br/>
841 <td class=
"col0"> Stretch
</td><td class=
"col1"> UltraCondensed
<br/>
852 <!-- EDIT19 TABLE [16724-17072] -->
854 <!-- EDIT18 SECTION "Fonts" [15143-17074] -->
855 <h2 class=
"sectionedit20" id=
"examples">Examples
</h2>
859 <!-- EDIT20 SECTION "Examples" [17075-17095] -->
860 <h3 class=
"sectionedit21" id=
"set_up_exporting">Set up exporting
</h3>
864 Use the “landscape” layout by default for a local project:
866 <pre class=
"code">gaf config --project export layout landscape
</pre>
869 Use the “letter” paper size by default for all your printouts:
871 <pre class=
"code">gaf config --user export paper na_letter
</pre>
874 Set paper size to the definite value of
1×2 inch for a local
877 <pre class=
"code">gaf config --project export size
"72;
144"</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:
883 <pre class=
"code">gaf config --project export margins
"18;
36;
18;
36"</pre>
886 This command will align your project
's schematics to the right.
888 <pre class=
"code">gaf config --project export align
"1.0;
0.5"</pre>
891 This command is wrong, it doesn
't work for you even if your locale
892 uses comma as a separator for floating point numbers:
894 <pre class=
"code">gaf config --project export align
"1,
0;
0,
0"</pre>
897 This command, though, works in this case (e.g., in the ru_RU.UTF-
8
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>.
907 To print all your schematics in color (note: “False” or “FALSE”
910 <pre class=
"code">gaf config --project export monochrome false
</pre>
913 Set up a custom user font:
915 <pre class=
"code">gaf config --user export font
"OpenGost Type B TT Italic
"</pre>
918 Choose another font for a local project:
920 <pre class=
"code">gaf config --project export font
"Arial Bold
"</pre>
923 <!-- EDIT21 SECTION "Set up exporting" [17096-18390] -->
924 <h3 class=
"sectionedit22" id=
"set_up_netlisting">Set up netlisting
</h3>
928 Use more short net and bus names in all netlists created by the
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>:
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>
945 <pre class=
"code">gaf config --project gnetlist net-naming-priority netname-attribute
</pre>
948 <!-- EDIT22 SECTION "Set up netlisting" [18391-18955] -->
949 <h3 class=
"sectionedit23" id=
"set_up_gschem">Set up gschem
</h3>
953 Use shorter names for new files:
955 <pre class=
"code">gaf config --user gschem default-filename empty
</pre>
958 <!-- EDIT23 SECTION "Set up gschem" [18956-19063] -->
959 <h3 class=
"sectionedit24" id=
"set_up_gschem_library_view">Set up gschem library view
</h3>
963 This command explicitly tells that you want to always show
966 <pre class=
"code">gaf config --project gschem.library component-attributes
"*
"</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.
976 Display only attributes that are in the filter list:
978 <pre class=
"code">gaf config --project gschem.library component-attributes
"refdes;device;description
"</pre>
981 Don
't show any attributes in the component select dialog:
983 <pre class=
"code">gaf config --project gschem.library component-attributes
""</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:
990 <pre class=
"code">gaf config --project gschem.library component-attributes
"refdes,device,description
"</pre>
993 Sort the component library in
<strong>gschem
</strong> alphabetically:
995 <pre class=
"code">gaf config --user gschem.library sort true
</pre>
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>:
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>:
1011 <pre class=
"code">gaf config --project gschem.printing paper iso_a5
</pre>
1014 Always use B
&W printing output from within
<strong>gschem
</strong>:
1016 <pre class=
"code">gaf config --user gschem.printing monochrome true
</pre>
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
't show any inherited attributes in the multiattrib dialog:
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.
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,
1043 <pre class=
"code">gaf shell -c
"(display (user-config-dir))
"</pre>
1046 The same for the system configuration directories:
1048 <pre class=
"code">gaf shell -c
"(display (sys-config-dirs))
"</pre>
1051 <!-- EDIT27 SECTION "Using gaf shell" [20867-] --></body>