summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/README
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/README')
-rw-r--r--graphics/circuit_macros/README152
1 files changed, 76 insertions, 76 deletions
diff --git a/graphics/circuit_macros/README b/graphics/circuit_macros/README
index 67fb1093f5..326bb4730d 100644
--- a/graphics/circuit_macros/README
+++ b/graphics/circuit_macros/README
@@ -1,5 +1,5 @@
-* Circuit_macros Version 9.7, copyright (c) 2021 J. D. Aplevich under *
+* Circuit_macros Version 9.8, copyright (c) 2022 J. D. Aplevich under *
* the LaTeX Project Public Licence in file Licence.txt. The files of *
* this distribution may be redistributed or modified provided that this *
* copyright notice is included and provided that modifications are clearly *
@@ -31,9 +31,9 @@ Sources are available as a git repository at
REQUIRED SOFTWARE:
Preferred setup:
- GNU m4, dpic (see below), LaTeX, PSTricks, dvips
- or
m4, dpic, LaTeX or PDFLaTeX, TikZ-PGF
+ or
+ GNU m4, dpic, LaTeX, PSTricks, dvips
The GNU m4 macro processor is assumed, and a small number of macros
require GNU m4 features. Other versions of m4 will work with most macros.
@@ -59,8 +59,8 @@ USAGE
or pstricks graphics for LaTeX; see below for integration with other
tools and production of other formats. You probably should try out
the basic usage before integrating the macros with sophisticated
- system-dependent tools. When developing your own diagrams, refer to
- the macro descriptions in the List of Macros section of Circuit_macros.pdf.
+ system-dependent tools. When developing your own diagrams, refer to the
+ macro descriptions in the List of Macros section of Circuit_macros.pdf.
Suppose that a source file, cct.m4 say, has been created and the top
two lines are
@@ -144,37 +144,54 @@ SOURCES AND MANUALS:
(Do not read this manual first). Autoconf uses quote characters [ and ]
instead of the default ` and ' which work well with the pic language.
- Gpic is part of the GNU groff distribution, for which the source
- and documentation is available from http://ftp.gnu.org/gnu/groff/
- but there are mirror sites as well. The original AT&T pic manual
- can be obtained at http://doc.cat-v.org/unix/v10/10thEdMan/pic.pdf
- A more extensive manual is found in the documentation that comes with
- GNU pic, which is typically installed as gpic. A pdf copy is included
- with the dpic distribution and a version can be found on the web at
- http://www.kohala.com/start/troff/gpic.raymond.ps
-
DPIC:
- Dpic is not included here you say? If you want to try the LaTeX
- picture objects, mfpic, PSTricks, TikZ-PGF, MetaPost, xfig, SVG, PDF,
- or Postscript output provided by dpic, there are at least three possibilities:
- Some Linux distributions will install dpic automatically, the current
- (free) C source and Windows executable can be obtaied from
- http://ece.uwaterloo.ca/~aplevich/dpic/
- and a git repository containing complete source is at
+ Several Linux distributions will install dpic by command but the version
+ may not be the latest. A git repository containing complete source is at
https://gitlab.com/aplevich/dpic
- The source can be found in a number of repositories but many contain
- older versions, see https://repology.org/project/dpic/badges
+ and source plus a Windows executable can be obtaied from
+ http://ece.uwaterloo.ca/~aplevich/dpic/
The best advice is to obtain the newest version.
The dpic distribution includes dpic-doc.pdf, a manual containing a summary
- of the pic language and of features unique to dpic.
+ of the pic language and a detailed description of features unique to dpic.
+
+GPIC:
+ Gpic is part of the GNU groff distribution, for which the source
+ and documentation is available from http://ftp.gnu.org/gnu/groff/
+ but there are mirror sites as well. A more extensive manual is found
+ in the documentation that comes with GNU pic, which is typically
+ installed as gpic. A pdf copy is included with the dpic distribution
+ and a version can be found on the web at
+ http://www.kohala.com/start/troff/gpic.raymond.ps
+ The original AT&T pic manual can be found at
+ http://doc.cat-v.org/unix/v10/10thEdMan/pic.pdf
+
+SVG output, Inkscape:
+ Dpic -v produces svg output. If the result is to be directly
+ inserted into html, then as for Postscript output, the diagram
+ source file has to be adapted to remove any LaTeX formatting. The
+ configuration file svg.m4 contains macros that can assist. To avoid
+ this problem at the expense of an extra postprocessing step,
+ sophisticated text formatting and font selection can be retained
+ by first producing pdf output and then converting to SVG using,
+ say, pdf2svg (https://github.com/dawbarton/pdf2svg) or dvisvgm
+ (https://www.ctan.org/pkg/dvisvgm).
+
+ SVG is the native file format for the Inkscape graphics editor.
+ Therefore, elements defined by these macros can be output by dpic -v in
+ svg format for later manipulation by Inkscape. A very basic palette of
+ circuit elements for Inkscape is found in examples/svg/paletteSVG.m4.
+ In the svg subdirectory, type "make paletteSVG.svg", read the resulting
+ file into Inkscape, and then ungroup the elements as desired. You would
+ probably wish to add to or customize these elements for extensive use.
EXAMPLES
A set of examples is included in this distribution, showing electric
circuits, block diagrams, flow charts, signal-flow graphs, basic
use of colour and fill, and other applications. Read the manual
- Circuit_macros.pdf and view or print the file examples.pdf in the
- examples directory. For the curious, There are additional source
+ Circuit_macros.pdf and view the files examples.pdf in the
+ examples directory or make and view the html file in the examples/svg
+ directory. For the curious, There are additional source
files in the examples directory that are not shown in examples.pdf.
For the possibly unstable development version of these macros, try
http://ece.uwaterloo.ca/~aplevich/Circuit_macros/
@@ -184,14 +201,26 @@ EXAMPLES
examples directory are for testing metafont, metapost, pgf, psfrag,
and xfig examples.
-INTEGRATION WITH OTHER TOOLS:
- Installation and usage of the macros have evolved smewhat since the
+WORKFLOW:
+ Installation and usage of the macros have evolved somewhat since the
beginning, so archived instructions on the net may be slightly more
- complicated than currently necessary. Because I was producing books,
- I simply added commands to the appropriate Makefiles. However, others
- have developed tools that simplify workflow for their circumstances.
- The following are representative but keep in mind that systems and
- installations evolve over time:
+ complicated than currently necessary.
+
+ I use a very simple workflow most of the time: three open windows;
+ one to edit the diagram source, one to run LaTeX and produce pdf or
+ postscript, and a document viewer window. The lines
+ :set mps+=`:'
+ :set mps+=<:>
+ were added to my default .vimrc file to highlight matched pairs of
+ brackets, braces, parentheses, and, expecially for m4 programming,
+ single quotes.
+
+INTEGRATION WITH OTHER TOOLS:
+ To automate document production, I simply added commands to
+ the appropriate Makefiles. However, others have developed tools
+ that simplify workflow for their circumstances. The following are
+ representative but keep in mind that systems and installations evolve
+ over time:
A Python-based GUI called PyCirkuit is
at https://pypi.org/project/pycirkuit/ and
@@ -220,13 +249,9 @@ INTEGRATION WITH OTHER TOOLS:
https://github.com/ag-ckt/cirkuit/tree/V0.5.0. There is uncertainty
about installation possibilities because of evolving library dependencies.
- A wiki offering examples and tips is at
- http://swwiki.e-dschungel.de/circuit_macros
- It is in German but Google translate works well on the page.
-
Another recent introduction is at
https://www.root.cz/clanky/publikovanie-elektrickych-schem-a-diagramov-pomocou-circuit-macros/
- It is in Czech but, again, Google translate works well.
+ It is in Czech but Google translate works well.
LaTeX automation tools are discussed at, for example,
http://tex.stackexchange.com/questions/64/tools-for-automating-document-compilation
@@ -238,30 +263,24 @@ INTEGRATION WITH OTHER TOOLS:
A nice description of a Mac installation is at
https://www.hamish.science/2020/06/24/circuitmacros
- A previewer app for Mac OS X written by Collin J. Delker is available at
- http://www.collindelker.com/wp/2013/04/circuit_macros_previewer/
-
VARIATIONS
- Macros such as these inevitably will be modified to suit individual
+ Macros such as these will be modified inevitably to suit individual
needs and taste. They continue to evolve in my own library as I use
them and as others send comments. No such collection can hope to
include all possible circuit-related symbols, so you will probably
find yourself writing your own macros or adapting some of these.
Be careful to rename modified macros to avoid confusion. The learning
curve compares well to other packages, but there is no trivially
- easy way to produce high-quality graphics. (If a picture is worth
- a thousand words, ask yourself how long it would take to write and
- revise a thousand words.)
+ easy way to produce high-quality graphics. (If "a picture is worth
+ a thousand words," ask yourself how long it would take to write, revise,
+ and perfect a thousand words.)
See eschpic on Github for IEC-style electrical drawings.
- For an example of the use of dpic in a wiki (thanks to Jason Grout), see
- http://jasongrout.org/software/dokuwiki/format-plugin
-
- Pic dates from the 1980s and was first developed as a preprocessor for
- the *roff family of Unix word processors. Some additional libraries such
- as chem (for chemical structures) and dformat (for data structures) are
- still viable.
+ The pic language dates from the 1980s and was first developed
+ as a preprocessor for the *roff family of Unix wordprocessors.
+ Some additional libraries such as chem (for chemical structures)
+ and dformat (for data structures) are still viable.
Pic macros for drawing graphs are described at
http://www.math.uiuc.edu/~west/gpic.html
@@ -288,26 +307,6 @@ Postscript, CorelDraw, Adobe Illustrator:
LaTeX formatting instructions in the source are not obeyed. These programs
also import svg output produced by dpic -v.
-SVG output, Inkscape:
- Dpic -v produces svg output. If the result is to be directly
- inserted into html, then as for Postscript output, the diagram
- source file has to be adapted to remove any LaTeX formatting. The
- configuration file svg.m4 contains macros that can assist. To avoid
- this problem at the expense of an extra postprocessing step,
- sophisticated text formatting and font selection can be retained
- by first producing pdf output and then converting to SVG using,
- say, pdf2svg (https://github.com/dawbarton/pdf2svg) or dvisvgm
- (https://www.ctan.org/pkg/dvisvgm).
-
- SVG is the native file format for the Inkscape graphics editor.
- Therefore, elements defined by these macros can be output by dpic
- -v in svg format for later manipulation by Inkscape. A very basic
- palette of circuit elements for importing into Inkscape is found
- in examples/svg/paletteSVG.m4. In the svg subdirectory, type "make
- paletteSVG.svg", read the resulting file into Inkscape, and then ungroup
- the elements as desired. You would probably wish to add to or customize
- these elements for extensive use.
-
Metafont:
The file examples/mf/cct.mf is a Metafont source for a few variants of
the basic elements, produced using the mfpic output of dpic. It may
@@ -327,10 +326,11 @@ Xfig:
LIBRARIES:
The file libgen.m4 contains general-purpose macros and is read
automatically by other libraries. The file libcct.m4 defines basic
- circuit elements. Binary logic-circuit elements are in liblog.m4.
- Macros for drawing 3D projections are in lib3D.m4, and some macros
- for drawing double-line arrows are in darrow.m4. The file dpictools.pic
- contains pic macros and is read automatically by some of the examples.
+ circuit elements. Binary logic-circuit elements are in liblog.m4 and
+ additional single-line elements are in libSLD.m4. Macros for drawing 3D
+ projections are in lib3D.m4, and some macros for drawing double-line
+ arrows are in darrow.m4. The file dpictools.pic contains pic macros
+ and is read automatically by some of the examples.
Feel free to contact me with comments or questions. I have retired
from full-time work but continue the hobby of maintaining these files.