Circuit_macros, Version 7.8.4

Tools for drawing electric circuits and other line diagrams.


From the README file:

This is a set of macros for drawing high-quality line diagrams to include in TeX, LaTeX, web, or similar documents, with support for SVG and other formats. Fundamental electric circuit elements and basic logic gate based on IEEE and European standards are included, with several tools and examples of other types of diagrams. Elements can be scaled or drawn in any orientation and are easy to modify. The advantages and disadvantages of such a system are similar to those of TeX itself, which is macro-based and non-wysiwyg, with ordinary text input.

The macros are to be processed by an m4 macro processor, and evaluate to drawing commands in the pic "little language," which is easy to read and learn. The diagram is then automatically translated into TiKZ, PSTricks, or other formats for processing by LaTeX or other applications. Pic is well suited to line drawings requiring parametric or conditional components, fine adjustment, significant geometric calculations, repetition, or recursion. Arbitrary text for formatting by LaTeX can be placed at will in the diagram. Free interpreters for m4 and pic are readily available.

Changes in this version are summarized here

Example diagrams can be viewed as html with links to the diagram sources, as pdf, or as directly produced svg with links to modified source files.

To draw your own diagrams using this method, you need the following components:

  1. A pic interpreter: The dpic interpreter was used to process these diagrams. Dpic produces output in the following formats:
    • PSTricks format (powerful and flexible)
    • TikZ PGF format (also powerful)
    • SVG (for the web and Inkscape)
    • encapsulated Postscript, raw text
    • encapsulated Postscript, psfrag text
    • xfig format
    • basic LaTeX graphics (limited capabilities)
    • LaTeX pict2e graphics
    • eepicemu format
    • mfpic format
    • MetaPost format

    The file processing sequence is typically to convert m4 source to pic statements and then to PSTricks or TikZ drawing commands, resulting in a .tex file for inclusion in a LaTeX document. The dpic interpreter is available in source form. A PC executable is also available, but you should download the source along with the executable in order to obtain the documentaion files in the doc directory. GNU pic, sometimes called gpic, is an alternative that uses tpic specials (see the readme file).

  2. An m4 macro processor:
    Pic interpreters include basic macro facilities, but the circuit macros and these examples extend the pic language using the more powerful m4 macro processor, which is available for Unix-like systems and Macs. PC source and executables can be obtained at least as follows:
  3. The Circuit_macro distribution: The complete distribution is available on any CTAN archive in graphics/Circuit_macros. Click here to navigate to a CTAN site, or try the latest (possibly unstable) development version, zipped or as a tar.gz file. See the Circuit_macros CHANGES file for differences between the development version and the stable CTAN version.

Detailed instructions are given in the README file and in the user's manual CMman.pdf available in the distribution.