User Tools

Site Tools


geda:faq-gschem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
geda:faq-gschem [2012/02/20 15:14]
127.0.0.1 external edit
geda:faq-gschem [2015/07/06 16:53] (current)
vzh Added a link to new page about generators.
Line 1: Line 1:
 +//​Translations of this page are also available in the following languages://​ [[faq-gschem.fr|Français]],​ [[faq-gschem.ru|Русский]].
 +
 ====== General ====== ====== General ======
  
Line 4: Line 6:
 ===== I found a bug! What can I do about it? ===== ===== I found a bug! What can I do about it? =====
   - See if you can reproduce the bug.   - See if you can reproduce the bug.
-  - Ask on the [[http://www.geda.seul.org/mailinglist/​index.html|geda-user mailing]] ​list if there is a work around, or has been dealt with in the bleeding edge version of gEDA/gaf. Note, that you must subscribe to the geda-user e-mail list before you can post to this list.+  - Ask on the [[http://wiki.geda-project.org/geda:​mailinglists|geda-user mailing ​list]] if there is a work around, or has been dealt with in the bleeding edge version of gEDA/gaf. Note, that you must subscribe to the geda-user e-mail list before you can post to this list.
   - See whether the issue is already in the [[https://​bugs.launchpad.net/​geda|bug tracking system of geda/gaf]]. If not, file a bug report. Make sure to give all information necessary to reproduce the bug and add the version of gEDA/gaf that contains the bug.   - See whether the issue is already in the [[https://​bugs.launchpad.net/​geda|bug tracking system of geda/gaf]]. If not, file a bug report. Make sure to give all information necessary to reproduce the bug and add the version of gEDA/gaf that contains the bug.
   - Finally, as with all open source projects, you may flex your programming muscles and try to fix the bug yourself. Please file a patch of the changes you had to make to the BTS of geda/gaf. The patch will be gladly accepted to improve the next release of gEDA/gaf.   - Finally, as with all open source projects, you may flex your programming muscles and try to fix the bug yourself. Please file a patch of the changes you had to make to the BTS of geda/gaf. The patch will be gladly accepted to improve the next release of gEDA/gaf.
Line 18: Line 20:
 ===== How do I move a component? ===== ===== How do I move a component? =====
  
-In versions equal to or more recent than 20060824, do this: 
   - Select the component by clicking it with the left mouse button. The component will highlight.   - Select the component by clicking it with the left mouse button. The component will highlight.
   - Drag the component (using the left mouse button) to the place you want it.   - Drag the component (using the left mouse button) to the place you want it.
- 
-This is probably what you are already used to doing. 
- 
-For folks with older versions of gschem, here are three ways to move components within gschem: 
- 
-One: 
-  - Grab the component with the middle mouse button. The component will follow the cursor around as you move it. 
-  - To place the component, release the middle mouse button. The component will stay where you placed it. 
- 
-Two: 
-  - Select the component by clicking it with the left mouse button. The component will highlight. 
-  - Hit the “M” key on the keyboard. The component will now follow the cursor around as you move it. 
-  - To place the component, click the left mouse button. The component will stay where you placed it. 
- 
-Three: 
-  - Select the component by clicking it with the left mouse button. The component will highlight. 
-  - Click the right mouse button. A pop-up menu will appear. 
-  - With the left mouse button, click on the “move” option in the pop-up menu. 
-  - Click on the component with the left mouse button. The component will now follow the cursor around as you move it. 
-  - To place the component, click the left mouse button. The component will stay where you placed it. 
  
 ===== How do I move components without dragging a tail of connected nets? ===== ===== How do I move components without dragging a tail of connected nets? =====
Line 71: Line 52:
 ===== How can I get refdes automatically numbered when I draw a schematic? ===== ===== How can I get refdes automatically numbered when I draw a schematic? =====
 Edit the system-gschemrc file or place the following into a gschemrc file (either **''​~/​.gEDA/​gschemrc''​** or a **''​gschemrc''​** file in the local directory where you invoke gschem): Edit the system-gschemrc file or place the following into a gschemrc file (either **''​~/​.gEDA/​gschemrc''​** or a **''​gschemrc''​** file in the local directory where you invoke gschem):
-<​code>​ 
-(load (string-append gedadata "/​scheme/​auto-uref.scm"​)) ; load the autonumbering script 
-(add-hook! add-component-hook auto-uref) ​      ; autonumber when adding a component 
-(add-hook! copy-component-hook auto-uref) ​     ; autonumber when copying a component 
-</​code>​ 
  
-**Note:** Starting with version 1.2 of gschem the name of the path variable has changed: 
 <​code>​ <​code>​
 (load (string-append geda-data-path "/​scheme/​auto-uref.scm"​)) ; load the autonumbering script (load (string-append geda-data-path "/​scheme/​auto-uref.scm"​)) ; load the autonumbering script
Line 90: Line 65:
 Some users have found it helpful to organize their nets by incorporating a bus name into the net name.   For example "​net=busA:​1"​ may be added to each busripper to aid in sorting out the nets. Some users have found it helpful to organize their nets by incorporating a bus name into the net name.   For example "​net=busA:​1"​ may be added to each busripper to aid in sorting out the nets.
  
-===== How can I change Key Bindings in gschem? ===== 
-Key accels are determined by configuration files read on start-up. The default key bindings are set in the file system-gschemrc. If you want to change them, it is recommended to copy and modify the corresponding keymap section to a local config file ($HOME/​.gEDA/​gschemrc,​ or $PWD/​gschemrc). The modified section will override the definitions given in system-gschemrc. 
  
 ===== What are the mouse bindings in gschem? ===== ===== What are the mouse bindings in gschem? =====
Line 120: Line 93:
 Yes. Sub sheets are represented by special symbols on the top level schematic. You can find an example for a hierarchical design in the doc section of gschem (''​geda-doc/​examples/​gTAG/​gTAG.sch''​). Currently, there is no way to automatically build a sub sheet symbol from an actual sub sheet. The sub sheet symbol has to be drawn manually. Any patches or external scripts that get the job done would be greatly appreciated. Yes. Sub sheets are represented by special symbols on the top level schematic. You can find an example for a hierarchical design in the doc section of gschem (''​geda-doc/​examples/​gTAG/​gTAG.sch''​). Currently, there is no way to automatically build a sub sheet symbol from an actual sub sheet. The sub sheet symbol has to be drawn manually. Any patches or external scripts that get the job done would be greatly appreciated.
  
-A ''​source=''​ attribute attached to the sub sheet symbol gives the path to the sub sheet file. The pins of the symbol correspond to ports from top sheet to sub sheet. These ports should correspond to a refdes of a port symbol on the sub sheet. The port symbols in the default library of geda are ''​in-1.sym''​ and ''​out-1.sym''​. Use the hierarchy menu to navigate within the hierarchy of sub sheets. Alternatively,​ you can navigate with the page manager. ​+A ''​source=''​ attribute attached to the sub sheet symbol gives the path to the sub sheet file. The pins of the symbol correspond to ports from top sheet to sub sheet. These ports should correspond to a refdes of a port symbol on the sub sheet. The port symbols in the default library of geda are ''​in-1.sym''​ and ''​out-1.sym''​. Use the hierarchy menu to navigate within the hierarchy of sub sheets. Alternatively,​ you can navigate with the page manager.
  
 To convert a hierarchy to a netlist just call gsch2pcb on the top level schematic. By default, net names and refdes'​s of components are strictly local to the subsheet. They get the sub sheet symbol refdes as a prefix when inserted into the net list. You can even use multiple instances of a sub sheet symbol without undue short cuts. Whether or not net names and refdes'​s are mangled and thus local to the sub sheet can be configured in the config file gnetlistrc. Copy the corresponding lines from ''​system-gnetlistrc''​ to ''​gnetlistrc''​ in the current working directory or to ''​$HOME/​.gEDA/​gnetlistrc''​. A convenient configuration is to make nets delivered by power symbols global while ordinary nets remain local to the sub sheet. This can be achieved with "​hierarchy-netattrib-mangle"​ enabled. To convert a hierarchy to a netlist just call gsch2pcb on the top level schematic. By default, net names and refdes'​s of components are strictly local to the subsheet. They get the sub sheet symbol refdes as a prefix when inserted into the net list. You can even use multiple instances of a sub sheet symbol without undue short cuts. Whether or not net names and refdes'​s are mangled and thus local to the sub sheet can be configured in the config file gnetlistrc. Copy the corresponding lines from ''​system-gnetlistrc''​ to ''​gnetlistrc''​ in the current working directory or to ''​$HOME/​.gEDA/​gnetlistrc''​. A convenient configuration is to make nets delivered by power symbols global while ordinary nets remain local to the sub sheet. This can be achieved with "​hierarchy-netattrib-mangle"​ enabled.
Line 148: Line 121:
 ===== Are there limitations to hierarchy design? ===== ===== Are there limitations to hierarchy design? =====
 Although support for subsheets covers many aspects of hierarchical design, there are some limitations:​ Although support for subsheets covers many aspects of hierarchical design, there are some limitations:​
-  * Buses cannot connect into subsheets.  +  * Buses cannot connect into subsheets. 
-  * There is no GUI way to start subsheets. You need to manually create a separate symbol for each subsheet.  +  * There is no GUI way to start subsheets. You need to manually create a separate symbol for each subsheet. 
-Feel free to fix these issues. Contributions are welcome. ​ +Feel free to fix these issues. Contributions are welcome.
  
-===== The log window in gschem bugs me ===== 
-gschem'​s log window can be persuaded not to appear with this line in a gschemrc: 
-<​code>​(log-window "​later"​)</​code>​ 
-You may put the line in $HOME/​.gEDA/​gschemrc , or in the project directory, or modify the file $INSTALLDIR/​share/​gEDA/​system-gschemrc to make it a system wide default. 
  
 ====== gschem symbols ====== ====== gschem symbols ======
Line 162: Line 131:
  
 ===== Where do I find symbols beyond the default library? ===== ===== Where do I find symbols beyond the default library? =====
-There is a website [[http://​www.gedasymbols.org/​|gedasymbols.org]] dedicated to user contributed resources for gEDA. You can search the site, preview symbols and download them individually. If you have configured your gafrc files accordingly you can put the symbols right next to the schematics file of your project. You might want to build a local library of symbols, so all projects can access the new symbols. See [[faq-gschem#​can_gafrc_use_a_variable_to_set_the_root_of_my_library|below]] for the details. ​+There is a website [[http://​www.gedasymbols.org/​|gedasymbols.org]] dedicated to user contributed resources for gEDA. You can search the site, preview symbols and download them individually. If you have configured your gafrc files accordingly you can put the symbols right next to the schematics file of your project. You might want to build a local library of symbols, so all projects can access the new symbols. See [[faq-gschem#​can_gafrc_use_a_variable_to_set_the_root_of_my_library|below]] for the details.
  
 You can even download all user contributed content from gedasymbols. See the instructions on how to You can even download all user contributed content from gedasymbols. See the instructions on how to
Line 185: Line 154:
 The symbols in the symbol library, were contributed by users just like you. Some people use different grid settings than other people (e.g. 50 units rather than 100). If you discover a symbol which seems to be off the grid, try to reduce your grid spacing and move the hot spots of the pins so that they sit on the grid. Then revert to your preferred grid settings. In addition, you may send the corrected symbol to the [[http://​www.seul.org/​cgi-bin/​mailman/​listinfo/​geda-user|mailinglist geda-user]] The symbols in the symbol library, were contributed by users just like you. Some people use different grid settings than other people (e.g. 50 units rather than 100). If you discover a symbol which seems to be off the grid, try to reduce your grid spacing and move the hot spots of the pins so that they sit on the grid. Then revert to your preferred grid settings. In addition, you may send the corrected symbol to the [[http://​www.seul.org/​cgi-bin/​mailman/​listinfo/​geda-user|mailinglist geda-user]]
  
-The symbols at [[http://​www.gedasymbols.org | gedasymbols.org]] are even more adapted to the specific preference of their author. ​  ​+The symbols at [[http://​www.gedasymbols.org | gedasymbols.org]] are even more adapted to the specific preference of their author.
 Yes, the gEDA docs strongly suggest that symbols use 100 units grid spacing. ​ But everybody likes to do things their own way, and there is no overall symbol dictator to enforce the rules on contributed symbols. That said, the vast majority of symbols out there conform to the recommendation. You just need to be aware of this possibility. Yes, the gEDA docs strongly suggest that symbols use 100 units grid spacing. ​ But everybody likes to do things their own way, and there is no overall symbol dictator to enforce the rules on contributed symbols. That said, the vast majority of symbols out there conform to the recommendation. You just need to be aware of this possibility.
  
Line 231: Line 200:
  
 ===== Is there a symbol wizard in gschem? ===== ===== Is there a symbol wizard in gschem? =====
-There is no wizard included in the gschem-GUI. But there are scripts which automatically create symbols from parameters given in a config file. One of these scripts is [[tragesym_readme|tragesym]]. It is part of the default installation of geda. A short [[tragesym_tutorial|tutorial]] will get you started with this tool. +There is no wizard included in the gschem-GUI. But there are scripts which automatically create symbols from parameters given in a config file. One of these scripts is [[tragesym_readme|tragesym]]. It is part of the default installation of geda. A short [[tragesym_tutorial|tutorial]] will get you started with this tool.
  
 One of the major contributors to the project wrote his own symbol creation script: [[http://​www.gedasymbols.org/​user/​dj_delorie/​tools/​djboxsym.html|djboxsym]] One of the major contributors to the project wrote his own symbol creation script: [[http://​www.gedasymbols.org/​user/​dj_delorie/​tools/​djboxsym.html|djboxsym]]
  
 +Additionally,​ there is a tool (ibs2symdef.py) for generating symdef files for use with djboxsym from IBIS models. It is distributed with the PyBIS project: [[https://​github.com/​russdill/​pybis/​wiki|PyBIS wiki]]
 +
 +Check the [[gschem symbol generators]] page for others generators
 +available.
  
 ===== Where can I find information on gschem'​s file format? ===== ===== Where can I find information on gschem'​s file format? =====
Line 240: Line 213:
  
 ===== Why are symbols so big? ===== ===== Why are symbols so big? =====
-There is nothing in gschem that defines the absolute size of objects. The only connection to real world units is the file name of the various title blocks. For some long forgotten reason, the frame of the title block symbols named "​title-A4.sym",​ or "​title-B.sym"​ can contain only relatively simple circuits made of the symbols in the default library. If you'd like to put a frame around more complex circuits just choose a title page symbol that fits. +There is nothing in gschem that defines the absolute size of objects. The only connection to real world units is the file name of the various title blocks. For some long forgotten reason, the frame of the title block symbols named "​title-A4.sym",​ or "​title-B.sym"​ can contain only relatively simple circuits made of the symbols in the default library. If you'd like to put a frame around more complex circuits just choose a title page symbol that fits.
  
-When printing, gschem scales the output so that everything fits within the desired paper format. This paper format is completely independent of the title page symbol used in the schematic. So there is no need to scale the symbols themselves to make them fit a particular paper size. +When printing, gschem scales the output so that everything fits within the desired paper format. This paper format is completely independent of the title page symbol used in the schematic. So there is no need to scale the symbols themselves to make them fit a particular paper size.
 Most people prefer to use title-A2.sym or title-A3.sym when printing to A4 sized paper. Some use title block symbols with no frame at all and draw a rectangle as needed (e.g. [[http://​www.gedasymbols.org/​user/​kai_martin_knaak/​symbols/​titleblock/​title-block.sym|title-block.sym]] by Kai-Martin Knaak). Most people prefer to use title-A2.sym or title-A3.sym when printing to A4 sized paper. Some use title block symbols with no frame at all and draw a rectangle as needed (e.g. [[http://​www.gedasymbols.org/​user/​kai_martin_knaak/​symbols/​titleblock/​title-block.sym|title-block.sym]] by Kai-Martin Knaak).
  
Line 248: Line 221:
   * DJ Delorie contributed a Perl script called [[http://​www.gedasymbols.org/​user/​dj_delorie/​tools/​scale-schematic|scale-schematic]] on his pages in [[geda:​glossary|gedasymbols.org]].   * DJ Delorie contributed a Perl script called [[http://​www.gedasymbols.org/​user/​dj_delorie/​tools/​scale-schematic|scale-schematic]] on his pages in [[geda:​glossary|gedasymbols.org]].
   * Build your own library of symbols. This is not that far off, since many people end-up using exclusively their own symbols anyway.   * Build your own library of symbols. This is not that far off, since many people end-up using exclusively their own symbols anyway.
-  * Wojciech Kazubski maintains a package of small gEDA symbols at [[http://​www.sp5pbe.waw.pl/​~sp5smk/​my-gaf-pcb.html|http://​www.sp5pbe.waw.pl]] 
  
 ====== Gschem configuration/​customization ====== ====== Gschem configuration/​customization ======
-Gschem is configurable in more ways than can be describe ​here. Look at "​system-gschemrc"​ for suggestions what else can be done.+Gschem is configurable in more ways than can be described ​here. Look at "​system-gschemrc"​ for suggestions what else can be done.
  
  
 ===== How do I configure my local gafrc to find my local symbol directory? ===== ===== How do I configure my local gafrc to find my local symbol directory? =====
  
-  -  Create a project directory, for example ${HOME}/​myproj. +  - Create a project directory, for example ${HOME}/​myproj. 
-  -  Place the symbols you want to use into ${HOME}/​myproj/​symbols. +  - Place the symbols you want to use into ${HOME}/​myproj/​symbols. 
-  -  Create a gafrc file in ${HOME}/​myproj. +  - Create a gafrc file in ${HOME}/​myproj. 
-  -  In gafrc, put this line:  <​code>​ (component-library "​./​symbols"​) </​code>​ +  - In gafrc, put this line:  <​code>​ (component-library "​./​symbols"​) </​code>​ 
-  -  Run gschem from your project directory ${HOME}/​myproj. ​ That  is, do this to run gschem:<​code>​cd ${HOME}/​myproj+  - Run gschem from your project directory ${HOME}/​myproj. ​ That  is, do this to run gschem:<​code>​cd ${HOME}/​myproj
 gschem myschematic.sch</​code>​ gschem myschematic.sch</​code>​
  
 Points to remember: Points to remember:
   * The guile stuff which processes your RC file doesn'​t understand or expand shell wildcards like "​~"​ or ${HOME}. ​ It does understand "​."​ as the current working directory, and it does understand absolute file paths. ​ If you want to do something tricky, you can try to  use Scheme functions to get directory information.   * The guile stuff which processes your RC file doesn'​t understand or expand shell wildcards like "​~"​ or ${HOME}. ​ It does understand "​."​ as the current working directory, and it does understand absolute file paths. ​ If you want to do something tricky, you can try to  use Scheme functions to get directory information.
-  * Make sure gafrc lives in your main project directory.  +  * Make sure gafrc lives in your main project directory. 
-  * Run all gEDA programs from your main project directory. ​+  * Run all gEDA programs from your main project directory.
   * Run the programs from the command line in a terminal shell -- don't use any whizzy, shiny desktop icons to run gschem (if you have them) since you won't know what directory gschem is starting in, and gschem might not find gafrc.   * Run the programs from the command line in a terminal shell -- don't use any whizzy, shiny desktop icons to run gschem (if you have them) since you won't know what directory gschem is starting in, and gschem might not find gafrc.
   * The key is: start gschem in the same directory as where your gafrc lives.   * The key is: start gschem in the same directory as where your gafrc lives.
  
-===== Can gafrc use a variable to set the root of my library? ===== +===== How can I set the root of my library? ===== 
-Currently (v1.3.1) gschem does not descend into subdirectories ​of the symbol ​library. You have to give individually each and every directory of your local lib in your gafrc file. However, you don't have to repeat the absolute base path over and over. You can use the function '​build-path'​ to concatenate the path on the fly:+There are two approachesIf you want each of your library ​to have a unique name, you have to set it individually ​for each and every directory of your local lib in your gafrc file. However, you don't have to repeat the absolute base path over and over. You can use the function '​build-path'​ to concatenate the path on the fly:
 <​code>​(define gedasymbols "/​path/​to/​local/​library"​) <​code>​(define gedasymbols "/​path/​to/​local/​library"​)
 (component-library (build-path gedasymbols "​analog"​)) (component-library (build-path gedasymbols "​analog"​))
 (component-library (build-path gedasymbols "​block"​)) (component-library (build-path gedasymbols "​block"​))
 (component-library (build-path gedasymbols "​connector"​))</​code>​ (component-library (build-path gedasymbols "​connector"​))</​code>​
 +
 +If you don't want to list separate subdirectories,​ you can only
 +set the name of a root directory using:
 +<​code>​(component-library-search "/​path/​to/​local/​library"​ "​library:"​)</​code>​
  
 ===== Can the library path contain environment variables? ===== ===== Can the library path contain environment variables? =====
Line 288: Line 264:
 <​code>​(component-library "​${HOME}/​geda/​symbols/​analog"​)</​code>​ <​code>​(component-library "​${HOME}/​geda/​symbols/​analog"​)</​code>​
  
-===== Is there a way to give a library a name that differs from its directory? ​ =====+===== Is there a way to give a library a name that differs from its directory? =====
 Add a third argument to the component-library stanza in gafrc, e.g.: Add a third argument to the component-library stanza in gafrc, e.g.:
 <​code>​ <​code>​
Line 294: Line 270:
  
 ===== Can my local library cover frequently needed sub circuits? ===== ===== Can my local library cover frequently needed sub circuits? =====
-Yes, symbols can contain symbols and nets. +Yes, symbols can contain symbols and nets.
   - Copy the subcircuit to a fresh sheet. (unlock and remove the default title block as you won't need it)   - Copy the subcircuit to a fresh sheet. (unlock and remove the default title block as you won't need it)
-  - The values of refdes attributes should end with "?",​ to allow to auto number them later. ​+  - The values of refdes attributes should end with "?",​ to allow to auto number them later.
   - Move the sub circuit to the lower left of the available space. (You can use symbol-translate from the edit menu)   - Move the sub circuit to the lower left of the available space. (You can use symbol-translate from the edit menu)
-  - Save the sub circuit as a *.sym file in your local library.  +  - Save the sub circuit as a *.sym file in your local library. 
-  - Choose "​Include component as individual objects"​ when  selecting this complex symbol for your actual schematic. The whole sub circuit will be pasted to your sheet. Be sure to switch back to the default mode for inclusion of ordinary symbols. ​+  - Choose "​Include component as individual objects"​ when  selecting this complex symbol for your actual schematic. The whole sub circuit will be pasted to your sheet. Be sure to switch back to the default mode for inclusion of ordinary symbols.
  
 ===== The library window is cluttered with default symbols. Can I restrict to my local lib? ===== ===== The library window is cluttered with default symbols. Can I restrict to my local lib? =====
Line 309: Line 285:
 (component-library "/​bar/​foo/​localgedalib2"​) (component-library "/​bar/​foo/​localgedalib2"​)
 </​code>​ </​code>​
-You have to add each and every dir of your local library. ​Subdirs are not automatically recognized by gschem and gsch2pcbIts a good idea to place this gafrc in your projects ​dir. That way, if you start gschem from some other place, you still get the system symbols shown. This also allows to configure special symbol libs for specific projects.+You can either ​add directories ​of your local library ​separately or add a whole tree with subdirsSee above on [[#How can I set the root of my library|how to do this]]It'​s ​a good idea to place this gafrc in your project'​s ​dir. That way, if you start gschem from some other place, you still get the system symbols shown. This also allows to configure special symbol libs for specific projects.
  
  
 ===== How can I change the default size of floating text? ===== ===== How can I change the default size of floating text? =====
-Put +Put
 <​code>​(text-size 10)</​code>​ <​code>​(text-size 10)</​code>​
 into your gschemrc and replace "​10"​ with your favorite size. into your gschemrc and replace "​10"​ with your favorite size.
Line 326: Line 302:
 (load (build-path geda-rc-path "​gschem-colormap-lightbg"​)) (load (build-path geda-rc-path "​gschem-colormap-lightbg"​))
 </​code>​ </​code>​
- 
-Note, this syntax is valid for recent versions of gschem (>​=2009). Older versions need a line like  
-<​code>​(load (build-path geda-rc-path "​gschem-lightbg"​)) </​code>​ 
-Even older versions before 1.2 needed this line: 
-<​code>​(load (string-append gedadatarc "/​gschem-lightbg"​)) </​code>​ 
  
 ===== How can I tweak colors in gschem? ===== ===== How can I tweak colors in gschem? =====
Line 367: Line 338:
 Put the following line into your gschemrc file: Put the following line into your gschemrc file:
 <​code>​(define default-titleblock "​title-A3.sym"​)</​code>​ <​code>​(define default-titleblock "​title-A3.sym"​)</​code>​
-Replace "​title-A3.sym"​ with the file name of your favorite title block symbol. ​+Replace "​title-A3.sym"​ with the file name of your favorite title block symbol.
  
 ====== Printing/​Output ====== ====== Printing/​Output ======
  
 ===== How do I print schematics from the command line? ===== ===== How do I print schematics from the command line? =====
-Running ​the script ​**''​print.scm''​** will create the Postscript file that is specified on the command line.+PostScript or PDF files of schematics can be created from the command line using the **gaf export** tool.
  
-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): +The command line below creates a PDF file from a schematic file (replace MY_SCH with the name of your schematic): 
-<​code>​gschem ​-p -oMY_SCH.ps -sGEDA_SCHEME_DIR/​print.scm MY_SCH.sch</​code>​+ 
 +<​code>​gaf export ​-o MY_SCH.pdf MY_SCH.sch</​code>​
  
 The ''​bash''​ script below, which I name **''​gschem-print''​**,​ 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: The ''​bash''​ script below, which I name **''​gschem-print''​**,​ 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:
 <​code>#​!/​bin/​bash <​code>#​!/​bin/​bash
  
-gschem ​options+'gaf export' ​options
 # -oPS_FILENAME output to Postscript file PS_FILENAME # -oPS_FILENAME output to Postscript file PS_FILENAME
-# -sSCRIPT_FILENAME run script SCRIPT_FILENAME 
-# -p autoplace windows 
  
 for name in $* for name in $*
 do do
     base="​${name%.*}"​     base="​${name%.*}"​
-    ​gschem ​--o$base.ps -sGEDA_SCHEME_DIR/​print.scm ​$base.sch+    ​gaf export ​--output=$base.ps -$base.sch
     lpr -P$PRINTER $base.ps     lpr -P$PRINTER $base.ps
 done</​code>​ done</​code>​
  
-The default printing ​size is used when printing from the command line. To set the default printing ​size to A4 add +The paper size can be adjusted using the **-p** option. To set the paper size to A4 use something like: 
-<​code>​(paper-size 11.69 8.27) ; A4</​code>​ +<​code>​gaf export --paper=iso_a4 ​-o MY_SCH.pdf MY_SCH.sch</​code>​
-to your ''​gschemrc''​ in ''​$(HOME)/​.gEDA''​ (or in the local directory ''​gschemrc''​). The full list of paper-size options can be found in ''​system-gschemrc''​.+
  
- +To set the preferred paper size to "US Letter"​ for all schematics you open, run: 
-===== How can I get color postscript/PNG output? =====+<​code>​gaf config --user export paper na_letter</​code>​ 
 +===== How can I get color PDF/PNG output? =====
 Edit the **''​system-gschemrc''​** file or place the following into a **''​gschemrc''​** file (either **''​~/​.gEDA/​gschemrc''​** or a **''​gschemrc''​** file in the local directory where you invoke gschem): Edit the **''​system-gschemrc''​** file or place the following into a **''​gschemrc''​** file (either **''​~/​.gEDA/​gschemrc''​** or a **''​gschemrc''​** file in the local directory where you invoke gschem):
-<​code>​(output-color "​enabled"​) ​     ; for color postscript ​output+<​code>​(print-color "​enabled"​) ​     ; for color PDF output
 (image-color "​enabled"​) ​      ; for color PNG output (enabled by default)</​code>​ (image-color "​enabled"​) ​      ; for color PNG output (enabled by default)</​code>​
- 
-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):​ 
-<​code>​(output-color-background 16 "​black"​ "​null"​ "0 0 0" 0 0 0)</​code>​ 
- 
-The “0 0 0” is the RGB components (between 0..1) for the background color of the PS output. 
- 
-To control the background of the PNG output, change the following line in either gschem-darkbg (for the default black colored background) or gschem-lightbg (for the alternative light colored background):​ 
-<​code>​(background-color 0 "​grey94"​ "​null"​ "1 1 1" 255 255 255)</​code>​ 
- 
-The 255 255 255 are the RGB components for the background color of the PNG image. 
- 
-From version 1.5.2 onwards, print and display color maps are separate. In order to get postscript output with a light background, add the following to your gschemrc: 
- 
-<​code>​(load (build-path geda-rc-path "​print-colormap-lightbg"​))</​code>​ 
  
 ===== How can I get black and white postscript/​PNG output? ===== ===== How can I get black and white postscript/​PNG output? =====
Line 424: Line 380:
  
 ===== How can I produce PDF output? ===== ===== How can I produce PDF output? =====
-There are different ways to produce PDF in gschem: +Use **File→Write image…** ​to show the "Write image…"​ window. ​ This gives the option ​to export ​to PDF.
-  - Print to file as Postscript and externally convert ​to PDF. The utility ps2pdf needs the option -sPAPERSIZE=a4 +
-  - Use a PDF-Printer installed on the system.+
  
-The second option is more convenientbut needs a little more administration.+Alternativelyrun:
  
-In a gnome environment a prerequisite to make this work is the package cups-pdf. A PDF printer called "​CUPS-PDF-Printer"​ should be configured as a "Local Printer"​ via the usual CUPS interface. Choose Manufacturer "​Generic",​ model "​CUPS-PDF-Printer"​. +<​code>​gaf export ​--output=foo.pdf bar.sch</​code>​ 
-Add this line to the local gschemrc to make the lp print command default in gschem: +===== How can I insert schematics into my LaTeX document? =====
-<​code>​(print-command "​lp ​-d CUPS-PDF-Printer"​)</​code>​ +
-The resulting PDF will go to $HOME/PDF by default. ​+
  
-In a KDE environment ​the print command ​is "​kprinter"​ with the output option set to PDF is the way to goSo you need to add this line to the local gschemrc: +For use with normal ​the ''​latex'' ​command, you will need an EPS (Encapsulated PostScript) file For ''​pdflatex'', ​you will need a PDF file.  To generate an appropriate file, run:
-<​code>​(print-command "​kprinter"​)</​code>​+
  
-===== How can I insert schematics into my LaTeX document? ===== +<​code>​gaf export --size=auto --output=foo.eps foo.sch</​code>​ 
-  - Print the schematic to a fileThis will be generic postscript (*.ps)+ 
-  Convert the postscript file to epsi with the tool ps2epsiThis is a script from the ghostscript suite+or: 
-  - Include ​usepackage{graphicx} to the preamble of your latex document. Use the command ​**includegraphics** to place your schematic.+ 
 +<​code>​gaf export ​--size=auto --output=foo.pdf foo.sch</​code>​ 
 + 
 +Add ''​usepackage{graphicx}'' ​to the preamble of your LaTeX document. Use the command ​''​includegraphics'' ​to place your schematic.
  
 A simple example: A simple example:
-<​code>​\documentclass{article}+<​code ​latex>​\documentclass{article}
 \usepackage{graphicx} \usepackage{graphicx}
 \begin{document} \begin{document}
   \begin{figure}   \begin{figure}
-  \includegraphics[width=100mm]{ModulPID.epsi}+  \includegraphics[width=100mm]{foo}
   \end{figure}   \end{figure}
 \end{document}</​code>​ \end{document}</​code>​
Line 456: Line 410:
 ====== Gschem installation/​run-time problems ====== ====== Gschem installation/​run-time problems ======
  
-===== Gschem segfaults when I delete components on FC5 (and other Linux distributions)! Is there a work-around?​ ===== 
-This bug emerged in mid 2006 for users of Fedora Core 5 (and other linux distributions that use glib 2.10.x). The bug has been fixed by the developers; the latest versions of gEDA/gaf (i.e. Oct 2006 and beyond) shouldn'​t have this problem. ​ 
- 
-If you happen to have an older version of gEDA/gaf, you can work around this bug by setting the environment variable G_SLICE to “always-malloc”. ​  ​Specifically,​ before you run gschem, do this: 
- 
-bash: 
-<​code>​export G_SLICE=always-malloc</​code>​ 
- 
-csh: 
-<​code>​setenv G_SLICE always-malloc</​code>​ 
  
 ===== After installation gschem does not work!? What could be wrong? ===== ===== After installation gschem does not work!? What could be wrong? =====
Line 479: Line 423:
 Tried to get an invalid color: 7</​code>​ Tried to get an invalid color: 7</​code>​
  
-then gschem is not finding an rc file. There are two required rc files. The first is **''​system-gschemrc''​** and the second is **''​system-commonrc''​**.+then gschem is not finding an rc file. There are two required rc files. The first is **''​system-gschemrc''​** and the second is **''​system-gafrc''​**.
   * The system-gschemrc rc file should be installed when you install gschem and typically resides in **''​${prefix}/​share/​gEDA/​system-gschemrc''​**. **''​${prefix}''​** is where you installed gschem (usually **''/​usr''​** or **''/​usr/​local''​** or **''​$HOME/​geda''​**). This file can also be installed in /etc/gEDA (the .debs packages do this).   * The system-gschemrc rc file should be installed when you install gschem and typically resides in **''​${prefix}/​share/​gEDA/​system-gschemrc''​**. **''​${prefix}''​** is where you installed gschem (usually **''/​usr''​** or **''/​usr/​local''​** or **''​$HOME/​geda''​**). This file can also be installed in /etc/gEDA (the .debs packages do this).
-  * The system-commonrc ​rc file should be installed when you install the symbol ​library ​for gEDA/gaf. It resides in **''​${prefix}/​share/​gEDA/​system-commonrc''​**. This file can also be installed in **''/​etc/​gEDA''​** (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.+  * The system-gafrc rc file should be installed when you install the ''​libgeda''​ shared ​library gEDA/gaf. It resides in **''​${prefix}/​share/​gEDA/​system-gafrc''​**. This file can also be installed in **''/​etc/​gEDA''​** (the .debs packages do this). This file is not loaded directly by gschem.
  
 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. 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.
Line 499: Line 443:
 All of these config files may or may not append paths to the library search list. If a config file contains the command All of these config files may or may not append paths to the library search list. If a config file contains the command
 <​code>​(reset-component-library)</​code>​ <​code>​(reset-component-library)</​code>​
-the library search path will be emptied. Order is obviously important, as this command will erase any previously appended paths. ​ +the library search path will be emptied. Order is obviously important, as this command will erase any previously appended paths.
  
 ===== I'm using gschem/gaf through a SSH connection and I get an error like: 'Xlib: extension "​RENDER"​ missing on display "​localhost:​10.0"​.'​ ===== ===== I'm using gschem/gaf through a SSH connection and I get an error like: 'Xlib: extension "​RENDER"​ missing on display "​localhost:​10.0"​.'​ =====
Line 512: Line 456:
  
 The latter enables trusted X11 forwarding. The latter enables trusted X11 forwarding.
 +
geda/faq-gschem.1329768895.txt.gz · Last modified: 2012/02/22 20:09 (external edit)