Circuit_macros, Version 8.9.1
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 simplicity and power of m4 macros is employed to produce 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. Free, open-source interpreters for m4 and pic are readily available. This process is well suited to line drawings requiring parametric or conditional components, fine adjustment, significant geometric calculations, repetition, or recursion. Arbitrary text or other objects such as tables for formatting by LaTeX can be placed at will in the diagram.
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:
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 as a git repository at https://gitlab.com/aplevich/dpic or in source form. A PC executable is also available. Several Linux distributions make versions of dpic available. GNU pic, sometimes called gpic, is an alternative that uses tpic specials (see the readme file).
Detailed instructions are given in the README file and in the user's manual Circuit_macros.pdf available in the distribution.