summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-02 03:04:28 +0000
committerNorbert Preining <norbert@preining.info>2024-01-02 03:04:28 +0000
commit6b10e9901a24325e837f0fdc2cbce8f43f18ccff (patch)
tree3c9f999691258a32058bf6b3e8353eadeda85f9b /graphics
parent094e5f512c4ea5981db967dd89c47363a603529b (diff)
CTAN sync 202401020304
Diffstat (limited to 'graphics')
-rw-r--r--graphics/circuit_macros/CHANGES5
-rw-r--r--graphics/circuit_macros/Copying2
-rw-r--r--graphics/circuit_macros/README17
-rw-r--r--graphics/circuit_macros/darrow.m431
-rw-r--r--graphics/circuit_macros/doc/AmpTableMan.m411
-rw-r--r--graphics/circuit_macros/doc/ArrestersMan.m49
-rw-r--r--graphics/circuit_macros/doc/AudioMan.m48
-rw-r--r--graphics/circuit_macros/doc/Buffer.m49
-rw-r--r--graphics/circuit_macros/doc/CanLogicMan.tex142
-rw-r--r--graphics/circuit_macros/doc/Circuit_macros.bib15
-rw-r--r--graphics/circuit_macros/doc/Circuit_macros.pdfbin1059727 -> 1086791 bytes
-rw-r--r--graphics/circuit_macros/doc/Flowdiag.m415
-rw-r--r--graphics/circuit_macros/doc/FusesMan.m432
-rw-r--r--graphics/circuit_macros/doc/OpampMan.m448
-rw-r--r--graphics/circuit_macros/doc/PconnMan.m48
-rw-r--r--graphics/circuit_macros/doc/QTrans.m42
-rw-r--r--graphics/circuit_macros/doc/ResistorsMan.m42
-rw-r--r--graphics/circuit_macros/doc/SourcesMan.m490
-rw-r--r--graphics/circuit_macros/doc/SwitchesMan.m412
-rw-r--r--graphics/circuit_macros/doc/Version.tex2
-rw-r--r--graphics/circuit_macros/doc/body.tex441
-rw-r--r--graphics/circuit_macros/doc/defines.tex3951
-rw-r--r--graphics/circuit_macros/doc/fetMan.m46
-rw-r--r--graphics/circuit_macros/doc/heaterMan.m434
-rw-r--r--graphics/circuit_macros/doc/relaycoilMan.m455
-rw-r--r--graphics/circuit_macros/dpictools.pic13
-rw-r--r--graphics/circuit_macros/examples/Alogix.m47
-rw-r--r--graphics/circuit_macros/examples/AmpTable.m49
-rw-r--r--graphics/circuit_macros/examples/Arresters.m49
-rw-r--r--graphics/circuit_macros/examples/Dini.m41
-rw-r--r--graphics/circuit_macros/examples/EVplugs.m4101
-rw-r--r--graphics/circuit_macros/examples/Flow.m410
-rw-r--r--graphics/circuit_macros/examples/FlowchartDefs.m4def50
-rw-r--r--graphics/circuit_macros/examples/Fuses.m442
-rw-r--r--graphics/circuit_macros/examples/Makefile1
-rw-r--r--graphics/circuit_macros/examples/MoreTable.m443
-rw-r--r--graphics/circuit_macros/examples/Opamp.m446
-rw-r--r--graphics/circuit_macros/examples/Plate.m42
-rw-r--r--graphics/circuit_macros/examples/Resistors.m42
-rw-r--r--graphics/circuit_macros/examples/Rotbox.m49
-rw-r--r--graphics/circuit_macros/examples/Sources.m487
-rw-r--r--graphics/circuit_macros/examples/Switches.m412
-rw-r--r--graphics/circuit_macros/examples/Three.m47
-rw-r--r--graphics/circuit_macros/examples/Tubediags.m44
-rw-r--r--graphics/circuit_macros/examples/UNO.m44
-rw-r--r--graphics/circuit_macros/examples/control.m48
-rw-r--r--graphics/circuit_macros/examples/dpv/AlogixDPV.m46
-rw-r--r--graphics/circuit_macros/examples/dpv/ArrestersDPV.m410
-rw-r--r--graphics/circuit_macros/examples/dpv/EVplugsDPV.m4104
-rw-r--r--graphics/circuit_macros/examples/dpv/FlowDPV.m410
-rw-r--r--graphics/circuit_macros/examples/dpv/FusesDPV.m44
-rw-r--r--graphics/circuit_macros/examples/dpv/MoreTableDPV.m410
-rw-r--r--graphics/circuit_macros/examples/dpv/OpampDPV.m448
-rw-r--r--graphics/circuit_macros/examples/dpv/ResistorsDPV.m42
-rw-r--r--graphics/circuit_macros/examples/dpv/RotboxDPV.m410
-rw-r--r--graphics/circuit_macros/examples/dpv/SourcesDPV.m420
-rw-r--r--graphics/circuit_macros/examples/dpv/SwitchesDPV.m410
-rw-r--r--graphics/circuit_macros/examples/dpv/ThreeDPV.m46
-rw-r--r--graphics/circuit_macros/examples/dpv/TubediagsDPV.m44
-rw-r--r--graphics/circuit_macros/examples/dpv/ex05DPV.m49
-rw-r--r--graphics/circuit_macros/examples/dpv/examplesDPV.htmx2
-rw-r--r--graphics/circuit_macros/examples/dpv/examplesDPVs.htmx2
-rw-r--r--graphics/circuit_macros/examples/dpv/sfgDPV.m440
-rw-r--r--graphics/circuit_macros/examples/dpv/tstDPV.htmx3
-rw-r--r--graphics/circuit_macros/examples/ex05.m45
-rw-r--r--graphics/circuit_macros/examples/examples.pdfbin1902836 -> 1917517 bytes
-rw-r--r--graphics/circuit_macros/examples/examples.tex41
-rw-r--r--graphics/circuit_macros/examples/extras/ClassDAmp.m466
-rw-r--r--graphics/circuit_macros/examples/extras/Flow2.m44
-rw-r--r--graphics/circuit_macros/examples/fet.m46
-rw-r--r--graphics/circuit_macros/examples/files.tex22
-rw-r--r--graphics/circuit_macros/examples/heater.m426
-rw-r--r--graphics/circuit_macros/examples/mf/Makefile1
-rw-r--r--graphics/circuit_macros/examples/mf/cct.mf288
-rwxr-xr-xgraphics/circuit_macros/examples/mf/mftest4
-rwxr-xr-xgraphics/circuit_macros/examples/mpost/mptest2
-rw-r--r--graphics/circuit_macros/examples/sfg.m424
-rw-r--r--graphics/circuit_macros/examples/shadowed.m442
-rw-r--r--graphics/circuit_macros/examples/tubedefs.m42
-rw-r--r--graphics/circuit_macros/examples/xfig/xfiglib.fig8
-rw-r--r--graphics/circuit_macros/gpic.m42
-rw-r--r--graphics/circuit_macros/lib3D.m42
-rw-r--r--graphics/circuit_macros/libSLD.m42
-rw-r--r--graphics/circuit_macros/libcct.m4318
-rw-r--r--graphics/circuit_macros/libgen.m4222
-rw-r--r--graphics/circuit_macros/liblog.m4168
-rw-r--r--graphics/circuit_macros/mfpic.m42
-rw-r--r--graphics/circuit_macros/mpost.m412
-rw-r--r--graphics/circuit_macros/pdf.m415
-rw-r--r--graphics/circuit_macros/pgf.m42
-rw-r--r--graphics/circuit_macros/postscript.m414
-rw-r--r--graphics/circuit_macros/psfrag.m42
-rw-r--r--graphics/circuit_macros/pstricks.m42
-rw-r--r--graphics/circuit_macros/svg.m455
-rw-r--r--graphics/circuit_macros/xfig.m42
95 files changed, 3896 insertions, 3179 deletions
diff --git a/graphics/circuit_macros/CHANGES b/graphics/circuit_macros/CHANGES
index 647e124d6b..020a7de9e7 100644
--- a/graphics/circuit_macros/CHANGES
+++ b/graphics/circuit_macros/CHANGES
@@ -1,5 +1,10 @@
CHANGES
+Version 10.5: Options for numersous element macros: sfgarc, sfgline,
+ sfgself, LCintersect, LEintersect, and others. Systematic facilities
+ for Filling and customizing element bodies. New macros ColoredV,
+ cangle, definergbcolor. Added dpictools.pic macros to the manual.
+ Removed obsolete macros. Edits of the manual.
Version 10.4: New options for source, sarrow, darrow routines.
Version 10.3: Tweaked sfg_init and NeedDpicTools functionality;
macro lin_ang, langle, ACsymbol, DCsymbol, Ysymbol, Deltasymbol,
diff --git a/graphics/circuit_macros/Copying b/graphics/circuit_macros/Copying
index 7368181b7f..2e951040b8 100644
--- a/graphics/circuit_macros/Copying
+++ b/graphics/circuit_macros/Copying
@@ -1,4 +1,4 @@
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/README b/graphics/circuit_macros/README
index 2598327896..a9f7f75c86 100644
--- a/graphics/circuit_macros/README
+++ b/graphics/circuit_macros/README
@@ -1,5 +1,5 @@
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -267,8 +267,8 @@ VARIATIONS
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, revise,
+ 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.
@@ -278,10 +278,6 @@ VARIATIONS
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
- After minor adaptation to dpic syntax, many of them can be simplified.
-
A collection of traditional pic resources and related material is
available at http://www.kohala.com/start/troff/troff.html In particular,
W. Richard Stevens illustrated his books on Unix and TCP/IP using
@@ -289,7 +285,8 @@ VARIATIONS
under dpic.
MetaPost examples: Go to the examples/mpost directory. Check the
- Makefile as described in the README file, type "make", and stand well back.
+ Makefile as described in the README file, type "make", and stand
+ well back.
Postscript with embedded psfrag strings:
Type "make" in the examples/psfrag directory to process examples
@@ -299,8 +296,8 @@ Postscript, CorelDraw, Adobe Illustrator:
Circuits and other diagrams not requiring LaTeX-formatted text can be
processed through m4 and dpic -r to produce encapsulated Postscript
output. This output can also be imported into CorelDraw or Adobe
- Illustrator. However, Postscript is not a word processor, so any
- LaTeX formatting instructions in the source are not obeyed. These programs
+ Illustrator. However, Postscript is not a word processor, so any LaTeX
+ formatting instructions in the source are not obeyed. These programs
also import svg output produced by dpic -v.
Metafont:
diff --git a/graphics/circuit_macros/darrow.m4 b/graphics/circuit_macros/darrow.m4
index c563a189dc..49f8c9a878 100644
--- a/graphics/circuit_macros/darrow.m4
+++ b/graphics/circuit_macros/darrow.m4
@@ -1,7 +1,7 @@
divert(-1)
darrow.m4 Macros for double lines and arrows
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -86,7 +86,7 @@ define(`dleft',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
{ line thick m4dlthk/(1bp__) to rvec_(m4dlthk,0) }
ifelse(rgbstring(dfillcolor),"",,
`{line thick m4dlthk/(1bp__)-2*linethick \
- m4osh(m4innershade,outlined,`dfillcolor') \
+ m4fixcolor(outlined,m4innershade,`dfillcolor') \
to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,m4dlthk/2+dfillext)}
move to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,m4dlthk/2) ')
ifgpic(`{line from rvec_(0,m4dlthk/2-lthick/2) to rvec_(0,m4dlthk/2-lthick/2)}
@@ -107,7 +107,7 @@ define(`dright',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
{ line thick m4dlthk/(1bp__) to rvec_(m4dlthk,0) }
ifelse(rgbstring(dfillcolor),"",,
`{line thick m4dlthk/(1bp__)-2*linethick \
- m4osh(m4innershade,outlined,`dfillcolor') \
+ m4fixcolor(outlined,m4innershade,`dfillcolor') \
to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,-m4dlthk/2-dfillext)}
move to rvec_(m4dlthk/2,0) then to rvec_(m4dlthk/2,-m4dlthk/2) ')
ifgpic(`{line from rvec_(0,-m4dlthk/2+lthick/2) \
@@ -118,10 +118,11 @@ define(`dright',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
move to rvec_(m4dlthk/2,-m4dlthk/2)') popdef(`m4innershade',`m4outline')
rp_ang = rp_ang-pi__/2')
-
- define(`m4osh',`ifelse(`$1',,`ifelse(`$3',,,``$2' rgbstring($3)')',
- index(`$1',`"'),0,``$2' `$1'' ,
- ``$2' rgbstring(m4ctrunc(`$1'))')')dnl
+ `m4fixcolor(outlined|shaded,"colorname"|(r,g,b),colormacro)
+ define(`colormacro',`r,g,b')'
+ define(`m4fixcolor',`ifelse(`$2',,`ifelse(`$3',,,``$1' rgbstring($3)')',
+ index(`$2',`"'),0,``$1' `$2'' ,
+ ``$1' rgbstring(m4ctrunc(`$2'))')')
`dturn(arg,dlthick,attribs)
Turn arg relative degrees ccw
@@ -144,14 +145,14 @@ define(`dturn',`deleminit_(,ifelse(`$2',,dlthick,`$2'),`$2')
F: S+vec_(0,-sgn*r)
X: 0.5 between B and E
ifelse(rgbstring(dfillcolor),`""',,`line thick 0 \
- m4osh(m4innershade,outlined,`dfillcolor') \
- m4osh(m4innershade,shaded,`dfillcolor') \
+ m4fixcolor(outlined,m4innershade,`dfillcolor') \
+ m4fixcolor(shaded,m4innershade,`dfillcolor') \
from S to F then to D then to E then to H then to G then to J then to S')
ifgpic(`m4tmpth = linethick; linethick=0
shade(dfillgrey,`line from C to A then to B; line from E to D then to F')
linethick = m4tmpth')
- line thick lthick/(1bp__) m4osh(m4outline,outlined) from C to A then to B
- line thick lthick/(1bp__) m4osh(m4outline,outlined) from E to D then to F
+ line thick lthick/(1bp__) m4fixcolor(outlined,m4outline) from C to A then to B
+ line thick lthick/(1bp__) m4fixcolor(outlined,m4outline) from E to D then to F
# Loopover_(`Px',`"Px" at Px above;', A,B,C,D,E,F,S,X)
# Loopover_(`Px',`"Px" at Px above;', G,H,J)
`$4' popdef(`m4innershade',`m4outline')] with .S at Here
@@ -330,8 +331,8 @@ define(`Darc',
`pushkeys_(ifelse(`$1',,`$2',`$5'),thick:dlthick;wid:dlthick*1.75;ht:dlthick;
outline::N;innershade::N;ends::N;centre:Here:N;rad:darcrad;
startdeg::;enddeg::;)dnl
- pushdef(`m4ou',`m4osh(m4outline,outlined)')dnl
- pushdef(`m4sh',`m4osh(m4innershade,outlined,`dfillcolor')')dnl
+ pushdef(`m4ou',`m4fixcolor(outlined,m4outline)')dnl
+ pushdef(`m4sh',`m4fixcolor(outlined,m4innershade,`dfillcolor')')dnl
ifelse(`$1',,
`darc(m4centre,m4rad,m4startdeg*dtor_,m4enddeg*dtor_,
m4thick,m4wid,m4ht,m4ends,m4ou,m4sh)',
@@ -388,8 +389,8 @@ define(`Darrow',
define(`Dline',
`pushkeys_(`$2',thick:dlthick;outline::N;innershade::N;ends::N;name::N;)dnl
ifelse(m4name,,,m4name:) dline(`$1',ifinstr(`$2',S;,t),ifinstr(`$2',E;,t),
- m4thick,m4ends,m4osh(m4outline,outlined),
- m4osh(m4innershade,outlined,`dfillcolor'))
+ m4thick,m4ends,m4fixcolor(outlined,m4outline),
+ m4fixcolor(outlined,m4innershade,`dfillcolor'))
popdef(`m4thick',`m4outline',`m4innershade',`m4ends',`m4name') ')
define(`m4ctrunc',`substr(`$1',1,eval(len(`$1')-2))')
diff --git a/graphics/circuit_macros/doc/AmpTableMan.m4 b/graphics/circuit_macros/doc/AmpTableMan.m4
index c94f682cbc..e820f8d1a9 100644
--- a/graphics/circuit_macros/doc/AmpTableMan.m4
+++ b/graphics/circuit_macros/doc/AmpTableMan.m4
@@ -1,22 +1,23 @@
.PS
-# `Amptable.m4'
+# `AmptableMan.m4'
cct_init
movewid = 2pt__
{
{amp ; move ; "{\tt `amp'}" ljust}
move down 0.4; right_
- {amp(,0.3) ; move ; "{\tt `amp'(,0.3)}" ljust}
+ {amp(,0.3) ; move ; "\tt `amp'(,0.3)" ljust}
}
move right_ 2.0
-{ {delay ; move ; "{\tt `delay'}" ljust}
+{ {delay(,,fill_(0.9)) ; move ;
+ "`\tt\shortstack[l]{delay(,{,}\\ fill\_(0.9))}'" ljust}
move down 0.4; right_
{delay(,0.2) ; move ; "{\tt `delay'(,0.2)}" ljust}
}
move right_ 2.0
-{ {integrator ; move ; "{\tt `integrator'}" ljust}
+{ {integrator ; move ; "\tt `integrator'" ljust}
move down 0.5; right_
- {integrator(,0.3) ; move ; "{\tt `integrator'(,0.3)}" wid 82pt__ ljust}
+ {integrator(,0.3) ; move ; "\tt `integrator'(,0.3)" wid 82pt__ ljust}
}
.PE
diff --git a/graphics/circuit_macros/doc/ArrestersMan.m4 b/graphics/circuit_macros/doc/ArrestersMan.m4
index dc08e40429..7ba4613582 100644
--- a/graphics/circuit_macros/doc/ArrestersMan.m4
+++ b/graphics/circuit_macros/doc/ArrestersMan.m4
@@ -54,11 +54,12 @@ R2: [
[
arrester(,E)
{`"\tt \ldots(,E)"' at last line.c+(0,-0.25)}
- move sep
- A: arrester(,DE)
- {`"\tt \ldots(,DE)"' at last [].s+(0,-0.1)}
+ move up_ 0.1 then right_ sep
+ A: arrester(,DE,,,fill_(0.95))
+ {`"\tt \ldots(,DE,{,},"' wid 61bp__ at A.A+(-0.1,-0.40) ljust \
+ `"\tt fill\_(0.95))"' ljust }
Dlabels
- move sep*3
+ move down_ 0.1 then right_ sep*3
A: arrester(,DS)
{`"\tt \ldots(,DS)"' at last [].s+(0,-0.1)}
Dlabels
diff --git a/graphics/circuit_macros/doc/AudioMan.m4 b/graphics/circuit_macros/doc/AudioMan.m4
index 662c6d0c99..1f61d384ac 100644
--- a/graphics/circuit_macros/doc/AudioMan.m4
+++ b/graphics/circuit_macros/doc/AudioMan.m4
@@ -32,8 +32,8 @@ L:[
thicklines_
]
[
- H: speaker(,,H)
- `"\tt speaker(,{,}H)"' at H.s+(0,-0.30) #below
+ H: speaker(,,H,fill_(0.9))
+ `"\tt speaker(,{,}H,"' at H.s+(0,-0.30) `"\tt fill\_(0.9))"'
] with .sw at last [].se+(0.25,-0.1)
]
[
@@ -93,8 +93,8 @@ R:[
E: earphone(,,C)
`"\tt earphone(,{,}C)"' at E.s+(0,-0.2) #below
thinlines_
- arrow <- from E.L up 0.15 left 0.15; "\sl L" rjust
- arrow <- from E.R up 0.15 right 0.15; "\sl R" ljust
+ arrow <- from E.L.nw up 0.1 left 0.1; "\sl L" rjust
+ arrow <- from E.R.ne up 0.1 right 0.1; "\sl R" ljust
"\sl N" at E.N above
"\sl C" at E.C
thicklines_
diff --git a/graphics/circuit_macros/doc/Buffer.m4 b/graphics/circuit_macros/doc/Buffer.m4
index 545875fe32..41c1501f4d 100644
--- a/graphics/circuit_macros/doc/Buffer.m4
+++ b/graphics/circuit_macros/doc/Buffer.m4
@@ -25,9 +25,9 @@ log_init
`"\tt BUFFER\_gate(,N,bd,bd,NN)"' at B2.s+(0,-18bp__) }
thicklines_
- B3: BUFFER_gen(ITNOC,bd,bd,PN,,N,LH_symbol at C) \
+ B3: BUFFER_gen(ITNOC,bd,bd,PN,,N,,LH_symbol at C) \
with .sw at last [].se+(esep,0)
- { `"\tt BUFFER\_gen(ITNOC,bd,bd,PN,{,}N,"' ljust \
+ { `"\tt BUFFER\_gen(ITNOC,bd,bd,PN,{,}N,{,}"' ljust \
`"\tt $\;\;$LH\_symbol at C)"' ljust at B3.s+(-60bp__,-30bp__) }
thinlines_
{ arrow <- left 0.2 up 0.2 from B3.In1; "\sl In1" rjust
@@ -41,9 +41,10 @@ log_init
B4: BUFFER_gate(right_ elen_ from last [].sw+(0,-0.35),,bd,bd)
{ `"\tt BUFFER\_gate(right\_ elen\_,{,}bd,bd)"' ljust at B4.end }
move to B4.start+(0,-dimen_)
- B6: BUFFER_gate(right_ elen_,N,bd,bd,,N,LH_symbol(I) at C)
+ B6: BUFFER_gate(right_ elen_,N,bd,bd,,N,,LH_symbol(I) at C)
line down dimen_/4 from last [].N_SE1.s then left dimen_*2/3
- {`"\tt BUFFER\_gate(right\_ elen\_,N,bd,bd,{,}N,LH\_symbol(I) at C)"' ljust \
+ {`"\tt BUFFER\_gate(right\_ elen\_,N,bd,bd,{,}N,{,}LH\_symbol(I) at C)"' \
+ ljust \
`"\tt line down dimen\_/3 from last [].N\_SE1.s then left dimen\_*2/3"' \
ljust at B6.end }
diff --git a/graphics/circuit_macros/doc/CanLogicMan.tex b/graphics/circuit_macros/doc/CanLogicMan.tex
deleted file mode 100644
index da849dd23d..0000000000
--- a/graphics/circuit_macros/doc/CanLogicMan.tex
+++ /dev/null
@@ -1,142 +0,0 @@
-\begin{tikzpicture}[scale=2.54]%
-% dpic version 2023.06.01 option -g for TikZ and PGF 1.01
-\ifx\dpiclw\undefined\newdimen\dpiclw\fi
-\global\def\dpicdraw{\draw[line width=\dpiclw]}
-\global\def\dpicstop{;}
-\dpiclw=0.8bp
-\dpiclw=0.8bp
-\dpiclw=0.5bp
-\draw (0,0) node[right=-2bp]{$a$};
-\dpicdraw (0,0)
- --(0,-0.15)\dpicstop
-\dpicdraw[fill=black](0,-0.15) circle (0.007874in)\dpicstop
-\dpicdraw (0,-0.15)
- --(0.3,-0.15)
- --(0.3,-0.3)\dpicstop
-\dpiclw=1bp
-\dpicdraw (0.3,-0.475)
- --(0.2,-0.3)
- --(0.4,-0.3)
- --(0.3,-0.475)\dpicstop
-\dpicdraw (0.3,-0.5125) circle (0.014764in)\dpicstop
-\dpiclw=0.5bp
-\draw (0.6,0) node[right=-2bp]{$b$};
-\dpicdraw (0.6,0)
- --(0.6,-0.15)\dpicstop
-\dpicdraw[fill=black](0.6,-0.15) circle (0.007874in)\dpicstop
-\dpicdraw (0.6,-0.15)
- --(0.9,-0.15)
- --(0.9,-0.3)\dpicstop
-\dpiclw=1bp
-\dpicdraw (0.9,-0.475)
- --(0.8,-0.3)
- --(1,-0.3)
- --(0.9,-0.475)\dpicstop
-\dpicdraw (0.9,-0.5125) circle (0.014764in)\dpicstop
-\dpiclw=0.5bp
-\draw (1.2,0) node[right=-2bp]{$c$};
-\draw (1.5,0) node[right=-2bp]{$d$};
-\dpiclw=1bp
-\dpicdraw (2.1,-0.975)
- --(1.9,-0.975)
- --(1.9,-0.675)
- --(2.1,-0.675)\dpicstop
-\dpicdraw (2.1,-0.675)
- ..controls (2.15359,-0.675) and (2.203109,-0.70359)
- ..(2.229904,-0.75)
- ..controls (2.256699,-0.79641) and (2.256699,-0.85359)
- ..(2.229904,-0.9)
- ..controls (2.203109,-0.94641) and (2.15359,-0.975)
- ..(2.1,-0.975)\dpicstop
-\dpiclw=0.5bp
-\dpiclw=1bp
-\dpicdraw (2.1,-1.425)
- --(1.9,-1.425)
- --(1.9,-1.125)
- --(2.1,-1.125)\dpicstop
-\dpicdraw (2.1,-1.125)
- ..controls (2.15359,-1.125) and (2.203109,-1.15359)
- ..(2.229904,-1.2)
- ..controls (2.256699,-1.24641) and (2.256699,-1.30359)
- ..(2.229904,-1.35)
- ..controls (2.203109,-1.39641) and (2.15359,-1.425)
- ..(2.1,-1.425)\dpicstop
-\dpiclw=0.5bp
-\dpicdraw (1.9,-1.575)
- --(2.25,-1.575)\dpicstop
-\dpiclw=1bp
-\dpicdraw (2.1,-2.025)
- --(1.9,-2.025)
- --(1.9,-1.725)
- --(2.1,-1.725)\dpicstop
-\dpicdraw (2.1,-1.725)
- ..controls (2.15359,-1.725) and (2.203109,-1.75359)
- ..(2.229904,-1.8)
- ..controls (2.256699,-1.84641) and (2.256699,-1.90359)
- ..(2.229904,-1.95)
- ..controls (2.203109,-1.99641) and (2.15359,-2.025)
- ..(2.1,-2.025)\dpicstop
-\dpiclw=0.5bp
-\dpiclw=1bp
-\dpicdraw (2.891667,-1.2)
- --(2.768056,-1.2)\dpicstop
-\dpicdraw (2.773689,-1.197268)
- ..controls (2.820003,-1.29276) and (2.820485,-1.40411)
- ..(2.775,-1.5)\dpicstop
-\dpicdraw (2.768056,-1.5)
- --(2.891667,-1.5)\dpicstop
-\dpicdraw (2.891667,-1.2)
- ..controls (2.992105,-1.2) and (3.083302,-1.258626)
- ..(3.125,-1.35)\dpicstop
-\dpicdraw (2.891667,-1.5)
- ..controls (2.992105,-1.5) and (3.083302,-1.441374)
- ..(3.125,-1.35)\dpicstop
-\dpiclw=0.5bp
-\dpicdraw (2.25,-0.825)
- --(2.640199,-0.825)
- --(2.640199,-1.2375)
- --(2.790199,-1.2375)\dpicstop
-\dpicdraw (2.25,-1.275)
- --(2.490199,-1.275)
- --(2.490199,-1.3125)
- --(2.806758,-1.3125)\dpicstop
-\dpicdraw (2.25,-1.575)
- --(2.490199,-1.575)
- --(2.490199,-1.3875)
- --(2.806758,-1.3875)\dpicstop
-\dpicdraw (2.25,-1.875)
- --(2.640199,-1.875)
- --(2.640199,-1.4625)
- --(2.790199,-1.4625)\dpicstop
-\dpicdraw (1.9,-0.7125)
- --(0,-0.7125)\dpicstop
-\dpicdraw[fill=black](0,-0.7125) circle (0.007874in)\dpicstop
-\dpicdraw (1.9,-0.7875)
- --(0.6,-0.7875)
- --(0.6,0)\dpicstop
-\dpicdraw (1.9,-0.8625)
- --(1.2,-0.8625)\dpicstop
-\dpicdraw[fill=black](1.2,-0.8625) circle (0.007874in)\dpicstop
-\dpicdraw (1.9,-0.9375)
- --(1.5,-0.9375)\dpicstop
-\dpicdraw[fill=black](1.5,-0.9375) circle (0.007874in)\dpicstop
-\dpicdraw (1.9,-1.2)
- --(0.9,-1.2)
- --(0.9,-0.55)\dpicstop
-\dpicdraw (1.9,-1.35)
- --(0,-1.35)
- --(0,0)\dpicstop
-\dpicdraw (1.9,-1.575)
- --(1.2,-1.575)
- --(1.2,0)\dpicstop
-\dpicdraw (1.9,-1.8)
- --(1.5,-1.8)
- --(1.5,0)\dpicstop
-\dpicdraw (1.9,-1.95)
- --(0.3,-1.95)
- --(0.3,-0.55)\dpicstop
-\dpicdraw (3.125,-1.348634)
- --(3.275,-1.348634)\dpicstop
-\draw (3.275,-1.348634) node[right=-2bp]{$f$};
-\end{tikzpicture}%
-\vspace*{-0.5\baselineskip}
diff --git a/graphics/circuit_macros/doc/Circuit_macros.bib b/graphics/circuit_macros/doc/Circuit_macros.bib
index b19a0b7c14..290ba863c5 100644
--- a/graphics/circuit_macros/doc/Circuit_macros.bib
+++ b/graphics/circuit_macros/doc/Circuit_macros.bib
@@ -35,6 +35,13 @@ note={%
\url{http://cahiers.gutenberg.eu.org/cg-bin/article/CG_1994___16_21_0.pdf}},
year={1994}}
+@article{GNUM4,
+author={GNU contributors},
+title={GNU M4 1.4.19 macro processor},
+journal={GNU},
+note={\url{https://www.gnu.org/software/m4/manual/m4.html}},
+year={2021}}
+
@book{Goossens97,
author={Goossens, M. and Rahtz, S. and Mittelbach, F.},
title={The \LaTeX Graphics Companion},
@@ -175,3 +182,11 @@ title={TiKz \& PGF},
note={CTAN,
\url{http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf}},
year={2013}}
+
+@article{WikipediaM4,
+author={Wikipedia contributors},
+title={M4 (computer language)},
+journal={Wikipedia, the Free Encyclopedia},
+note={%
+ \url{https://en.wikipedia.org/w/index.php?title=M4_(computer_language)&oldid=1175783700}},
+year={2023}}
diff --git a/graphics/circuit_macros/doc/Circuit_macros.pdf b/graphics/circuit_macros/doc/Circuit_macros.pdf
index dcc3027e97..85a2703bc7 100644
--- a/graphics/circuit_macros/doc/Circuit_macros.pdf
+++ b/graphics/circuit_macros/doc/Circuit_macros.pdf
Binary files differ
diff --git a/graphics/circuit_macros/doc/Flowdiag.m4 b/graphics/circuit_macros/doc/Flowdiag.m4
index c551c9eb2c..50b14362a2 100644
--- a/graphics/circuit_macros/doc/Flowdiag.m4
+++ b/graphics/circuit_macros/doc/Flowdiag.m4
@@ -1,6 +1,8 @@
.PS
# `Flowdiag.m4'
gen_init
+ellipsewid = ellipsewid*1.2
+ellipseht = ellipseht*1.2
define(`shadellipse',`{ellipse $1 fill invis
define(`m4h',`1.0 pt__')dnl
@@ -8,11 +10,14 @@ define(`shadellipse',`{ellipse $1 fill invis
ht last ellipse .ht + linethick pt__ at last ellipse+(m4h,-m4h)}
ellipse fill 1 $1')
- shadellipse "{\tt .m4}" "diagram"
- arrow right linewid*2/3
+ shadellipse "{\tt .m4}" "diagram" "source"
+ arrow right linewid*0.6
+
+ shadellipse "configuration"
+ arrow right linewid*0.6
{shadellipse(with .b at Here+(-linewid*0.5,boxht/3+linewid/3)) \
- "{\tt .m4}" "macros"}
+ "{\tt .m4}" "library" "macros"}
arrow from last ellipse.b down linewid/3 then right linewid*0.5
move down boxht/6; right
@@ -27,8 +32,8 @@ define(`shadellipse',`{ellipse $1 fill invis
{arrow from last ellipse.b down linewid/3 then right linewid*0.5}
move up boxht/6; right
- shadebox(box "\LaTeX" "or" "PDFlatex")
- arrow right linewid*2/3
+ shadebox(box "\LaTeX" "PDFlatex" "etc.")
+ arrow right linewid*0.6
shadebox(box wid boxht "{\tt .dvi}" "or" "{\tt .pdf}")
diff --git a/graphics/circuit_macros/doc/FusesMan.m4 b/graphics/circuit_macros/doc/FusesMan.m4
index dc9262f1e2..131f83d66b 100644
--- a/graphics/circuit_macros/doc/FusesMan.m4
+++ b/graphics/circuit_macros/doc/FusesMan.m4
@@ -5,39 +5,41 @@ cct_init
movewid = 0.25
{
- fuse ; {"`{\tt fuse}'" at last line.c+(0,-0.2)}
+ fuse ; {"`\tt fuse'" at last line.c+(0,-0.2)}
move
- fuse(,D) ; {"`{\tt fuse(,D)}'" at last line.c+(0,-0.2)}
+ fuse(,D) ; {"`\tt fuse(,D)'" at last line.c+(0,-0.2)}
move
- fuse(,B) ; {"`{\tt fuse(,B)}'" at last line.c+(0,-0.2)}
+ fuse(,B) ; {"`\tt fuse(,B)'" at last line.c+(0,-0.2)}
move
- fuse(,C) ; {"`{\tt fuse(,C)}'" at last line.c+(0,-0.2)}
+ fuse(,C) ; {"`\tt fuse(,C)'" at last line.c+(0,-0.2)}
move
- fuse(,S) ; {"`{\tt fuse(,S)}'" at last line.c+(0,-0.2)}
+ fuse(,S,,,fill_(0.9))
+ {"`\tt\shortstack[l]{fuse(,S,{,},\\fill\_(0.9))}'" \
+ at last line.c+(0,-0.25)}
move
- fuse(,SB) ; {"`{\tt fuse(,SB)}'" at last line.c+(0,-0.2)}
+ fuse(,SB) ; {"`\tt fuse(,SB)'" at last line.c+(0,-0.2)}
}
move down; right_
{
- cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.25)}
+ cbreaker; {"`\tt cbreaker'" at last line.c+(0,-0.25)}
move
- cbreaker(,R); {"`{\tt cbreaker(,R)}'" at last line.c+(0,-0.25)}
+ cbreaker(,R); {"`\tt cbreaker(,R)'" at last line.c+(0,-0.25)}
move
- cbreaker(,,D); {"`{\tt $\ldots$(,{,}D)}'" at last line.c+(0,-0.25)}
+ cbreaker(,,D); {"`\tt $\ldots$(,{,}D)'" at last line.c+(0,-0.25)}
move
- cbreaker(,,T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.25)}
+ cbreaker(,,T); {"`\tt $\ldots$(,{,}T)'" at last line.c+(0,-0.25)}
move
- cbreaker(,,TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.25) }
+ cbreaker(,,TS); {"`\tt $\ldots$(,{,}TS)'" at last line.c+(0,-0.25) }
}
move down; right_
{
- fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)}
+ fuse(,HB) ; {"`\tt fuse(,HB)'" at last line.c+(0,-0.2)}
move
- fuse(,HC,0.5,0.3) ; {"`{\tt $\ldots$(,HC,0.5,0.3)}'" at last line.c+(0,-0.27)}
+ fuse(,HC,0.5,0.3) ; {"`\tt $\ldots$(,HC,0.5,0.3)'" at last line.c+(0,-0.27)}
move
- jumper ; {"`{\tt jumper}'" at last line.c+(0,-0.2) }
+ jumper ; {"`\tt jumper'" at last line.c+(0,-0.2) }
move
- jumper(,CJBED) ; {"`{\tt $\ldots$(,CJBED)}'" at last line.c+(0,-0.2) }
+ jumper(,CJBED) ; {"`\tt $\ldots$(,CJBED)'" at last line.c+(0,-0.2) }
move
jumper(,body=outlined "gray" shaded "gray";)
"`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" \
diff --git a/graphics/circuit_macros/doc/OpampMan.m4 b/graphics/circuit_macros/doc/OpampMan.m4
index 5bdb8ac208..c96ff2f3c9 100644
--- a/graphics/circuit_macros/doc/OpampMan.m4
+++ b/graphics/circuit_macros/doc/OpampMan.m4
@@ -1,45 +1,45 @@
.PS
-# Opamp.m4
+# OpampMan.m4
sinclude(FOpamp.dim)
sinclude(Circuit_macros.dim)
+sinclude(tst.dim)
s_init(Opamp)
cct_init
-
- A: opamp
+ A: opamp(,,,\;body=shaded "yellow")
thinlines_
- s_box(`\tt opam{}p') at A.s-(0,0.35)
- s_box(\tt Out) below at A.Out
+ s_box(`\tt\shortstack[l]{opam{}p(,{,},\\body=shaded \"yellow\")}') \
+ at A.s-(0,0.35)
+ s_box(\sl Out) below at A.Out
spline <- from A.In1 left 0.1 then up 0.1 left 0.1
- s_box(\tt In1) rjust above
+ s_box(\sl In1) rjust above
spline <- from A.In2 left 0.1 then down 0.1 left 0.1
- s_box(\tt In2) rjust below
+ s_box(\sl In2) rjust below
arrow <- up 0.1 right 0.1 from A.N
- s_box(\tt N) ljust above
+ s_box(\sl N) ljust above
arrow <- up 0.1 right 0.1 from A.E1
- s_box(\tt E1) ljust above
+ s_box(\sl E1) ljust above
arrow <- up 0.1 right 0.1 from A.E
- s_box(\tt E) ljust above
+ s_box(\sl E) ljust above
arrow <- down 0.1 right 0.1 from A.E2
- s_box(\tt E2) ljust below
+ s_box(\sl E2) ljust below
arrow <- down 0.1 right 0.1 from A.S
- s_box(\tt S) ljust below
+ s_box(\sl S) ljust below
arrow <- left 0.2 from A.W
- s_box(\tt W) rjust
+ s_box(\sl W) rjust
thicklines_
- Point_(15)
- B: opamp(,,,,PR) with .sw at A.se+(0.65,0)
+ Point_(90)
+ B: opamp(,,,,PR) with .sw at A.se+(1,0)
thinlines_
- s_box(`\tt Point\_(15); opam{}p(,{,},{,}PR)') at B.s-(0,0.20)
- spline <- right arrowht up arrowht from B.V1 then right 0.1
- s_box(\tt V1) ljust
+ s_box(`\tt\shortstack[l]{Point\_(90);\\opam{}p(,{,},{,}PR)}') \
+ at B.s-(0,0.20)
+ spline <- left arrowht down arrowht from B.V1 then left 0.1
+ s_box(\sl V1) rjust
spline <- right arrowht down arrowht from B.V2 then right 0.1
- s_box(\tt V2) ljust
+ s_box(\sl V2) ljust
thicklines_
- Point_(90)
- C: opamp with .sw at B.se+(1.05,0)
- s_box(`\tt Point\_(90); opam{}p') at C.s-(0,0.35)
right_
- D: opamp(,,,,T) with .sw at C.se+(0.65,0)
- s_box(`\tt opam{}p(,{,},{,}T)') at D.s-(0,0.20)
+ D: opamp(,,,body=shaded "orange",T) with .sw at B.se+(0.95,0)
+ s_box(`\tt\shortstack[l]{opam{}p(,{,},\\body=shaded \"orange\"\\,T)}') \
+ at D.s+(0.2,-0.25)
.PE
diff --git a/graphics/circuit_macros/doc/PconnMan.m4 b/graphics/circuit_macros/doc/PconnMan.m4
index 2543048d00..427600f71d 100644
--- a/graphics/circuit_macros/doc/PconnMan.m4
+++ b/graphics/circuit_macros/doc/PconnMan.m4
@@ -24,10 +24,10 @@ P1: [
C3: pconnex(,ACF) with .w at last [].e+(0.2,0)
`"\tt (,ACF)"' at last [].s below
- C5: pconnex(U,D) with .w at last [].e+(0.25,0)
- `"\tt (U,D)"' at last [].s below
- C6: pconnex(U,DF) with .w at last [].e+(0.25,0)
- `"\tt (U,DF)"' at last [].s below
+ C5: pconnex(Up,D) with .w at last [].e+(0.25,0)
+ `"\tt (Up,D)"' at last [].s below
+ C6: pconnex(Up,DF) with .w at last [].e+(0.25,0)
+ `"\tt (Up,DF)"' at last [].s below
C7: pconnex(U,J) with .w at last [].e+(0.25,0)
`"\tt (U,J)"' at last [].s below
C8: pconnex(U,JF) with .w at last [].e+(0.25,0)
diff --git a/graphics/circuit_macros/doc/QTrans.m4 b/graphics/circuit_macros/doc/QTrans.m4
index 95039e6f1c..1bc3a15a0a 100644
--- a/graphics/circuit_macros/doc/QTrans.m4
+++ b/graphics/circuit_macros/doc/QTrans.m4
@@ -10,7 +10,7 @@ elen = 0.75
rlabel(+,V,-); llabel(,{1\over{j\omega C}},)
dot }
arrowline(right_ elen*2/3); llabel(,I)
- T1: transformer(down_ Vs.len,,6,,4) with .P1 at Here
+ T1: transformer(down_ Vs.len,,6,,4) with .P1 at Here # Place P1
"$T1$" at last [].n above
line from T1.P2 to Origin
line from T1.S1 up_ to (T1.S1,Vs.end) then right_ elen*2/3
diff --git a/graphics/circuit_macros/doc/ResistorsMan.m4 b/graphics/circuit_macros/doc/ResistorsMan.m4
index 57ebc4e34f..d13795283d 100644
--- a/graphics/circuit_macros/doc/ResistorsMan.m4
+++ b/graphics/circuit_macros/doc/ResistorsMan.m4
@@ -19,7 +19,7 @@ vm = 0.28
{resistor(,,AC) ; move ;"`{\tt resistor(,{,}AC)}'" ljust}
}
move down vm; right_
-{ {resistor(,,B) ; move ;"`{\tt resistor(,{,}B)}'" ljust}
+{ {resistor(,5,B) ; move ;"`{\tt resistor(,5,B)}'" ljust}
move right_ hm
{resistor(,,E) ; move
"`\shortstack[l]{\tt resistor(,{,}E)\\ {\tt $\equiv$ ebox}}'" ljust}
diff --git a/graphics/circuit_macros/doc/SourcesMan.m4 b/graphics/circuit_macros/doc/SourcesMan.m4
index 9f39d1e044..6647a84d1d 100644
--- a/graphics/circuit_macros/doc/SourcesMan.m4
+++ b/graphics/circuit_macros/doc/SourcesMan.m4
@@ -1,9 +1,6 @@
.PS
-# `Sources.m4'
+# `SourcesMan.m4'
cct_init
-divert(-1)
-
-divert(0)dnl
iflatex(`ifpsfrag(,`latexcommand({\sf)') ')
@@ -11,49 +8,58 @@ movewid = 2pt__
moveht = 0.275
define(`NL',`; move down $1; right_')
{
- {source ; move ; "`source'" ljust} NL
- {source(,I) ; move ; "`source(,I)'" ljust} NL
- {source(,i) ; move ; "`source(,i)'" ljust} NL
- {source(,ii) ; move ; "`source(,ii)'" ljust} NL
- {source(,V) ; move ; "`source(,V)'" ljust} NL
- {source(,v) ; move ; "`source(,v)'" ljust} NL
- {source(,S) ; move ; "`source(,S)'" ljust} NL
- {source(,AC); move ; "`source(,AC)'" ljust} NL
- {source(,X) ; move ; "`source(,X)'" ljust} NL
- {source(,F) ; move ; "`source(,F)'" ljust} NL
- {source(,G) ; move ; "`source(,G)'" ljust} NL
- {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3)
- {proximity ; move ; "`\shortstack[l]{proximity\\ = consource(,P)}'" ljust}
+ {source ; move ; "`\tt source'" ljust} NL
+ {source(,I) ; move ; "`\tt source(,I)'" ljust} NL
+ {C:source(,i) ; move ; "`\tt source(,i)'" ljust} NL
+ {D:source(,ti) ; move ; "`\tt source(,ti)'" ljust} NL
+ {source(,ii) ; move ; "`\tt source(,ii)'" ljust} NL
+ {source(,V) ; move ; "`\tt source(,V)'" ljust} NL
+ {source(,v) ; move ; "`\tt source(,v)'" ljust} NL
+ {source(,tv) ; move ; "`\tt source(,tv)'" ljust} NL
+ {source(,SC) ; move ; "`\tt source(,SC)'" ljust} NL
+ {source(,AC); move ; "`\tt source(,AC)'" ljust} NL
+ {source(,X) ; move ; "`\tt source(,X)'" ljust} NL
+ {source(,F) ; move ; "`\tt source(,F)'" ljust} NL
+ {source(,G) ; move ; "`\tt source(,G)'" ljust} NL
+ {source(,Q) ; move ; "`\tt source(,Q)'" ljust} NL #(0.3)
}
move right_ 2.0
{
- {source(,,0.4) ; move ; "`source(,{,}0.4)'" ljust} NL(0.35)
- {source(,P) ; move ; "`source(,P)'" ljust} NL
- {source(,U) ; move ; "`source(,U)'" ljust} NL
- {source(,H) ; move ; "`source(,H)'" ljust} NL
- {source(,R) ; move ; "`source(,R)'" ljust} NL
- {source(,SC) ; move ; "`source(,SC)'" ljust} NL
- {source(,SCr) ; move ; "`source(,SCr)'" ljust} NL
- {source(,T) ; move ; "`source(,T)'" ljust} NL
- {source(,L) ; move ; "`source(,L)'" ljust} NL
- {source(,B) ; move ; "`source(,B)'" ljust} NL
- {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8)
- {norator ; move ; "`norator'" ljust}
+# {source(,,0.4) ; move ; "`\tt source(,{,}0.4)'" ljust} NL(0.35)
+ {source(,,0.4,,shaded "yellow") ; move ;
+ "`\tt\shortstack[l]{source(,{,}0.4,{,}\\ shaded \"yellow\")}'" ljust} NL(0.35)
+# {source(,P) ; move ; "`\tt source(,P)'" ljust} NL
+ {source(,P,,,fill_(0.9)) ; move ;
+ "`\tt\shortstack[l]{source(,P,{,},\\ fill\_(0.9))}'" ljust} NL
+ {source(,U) ; move ; "`\tt source(,U)'" ljust} NL
+ {source(,H) ; move ; "`\tt source(,H)'" ljust} NL
+ {source(,R) ; move ; "`\tt source(,R)'" ljust} NL
+ {source(,S) ; move ; "`\tt source(,S)'" ljust} NL
+ {source(,SCr) ; move ; "`\tt source(,SCr)'" ljust} NL
+ {source(,T) ; move ; "`\tt source(,T)'" ljust} NL
+ {source(,L) ; move ; "`\tt source(,L)'" ljust} NL
+ {source(,B) ; move ; "`\tt source(,B)'" ljust} NL
+ {nullator ; move ; "`\tt nullator'" ljust} NL(moveht*0.8)
+ {norator ; move ; "`\tt norator'" ljust} NL(moveht*0.9)
+ {ttmotor(,G) ; move ; "`\tt ttmotor(,G)'" ljust} NL(moveht*1.1)
+ {proximity ; move ;
+ "`\tt \shortstack[l]{proximity\\ = consource(,P)}'" ljust}
}
move right_ 2.0
- {source(,N) ; move ; "`source(,N)'" ljust} NL
- {source(,"\rm mA");move; "`source(,\"mA\")'" ljust} NL(0.31)
-# {source(,"mA");move; "`source(,'" ljust \
-# "`\enskip \"mA\")'" ljust} NL(0.31)
- {consource ; move ; "`consource'" ljust} NL(0.32)
- {consource(,I) ; move ; "`consource(,I)'" ljust} NL(0.32)
- {consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32)
- {source(,SE) ; move ; "`source(,SE)'" ljust} NL
- {consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32)
- {consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3)
- {battery ; move ; "`battery'" ljust} NL(0.3)
- {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35)
- {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust}
+ {source(,N) ; move ; "`\tt source(,N)'" ljust} NL
+ {source(,"\rm mA");move; "`\tt source(,\"mA\")'" ljust} NL(0.31)
+# {source(,"mA");move; "`\tt source(,'" ljust \
+# "`\tt \enskip \"mA\")'" ljust} NL(0.31)
+ {consource ; move ; "`\tt consource'" ljust} NL(0.32)
+ {consource(,I) ; move ; "`\tt consource(,I)'" ljust} NL(0.32)
+ {consource(,i) ; move ; "`\tt consource(,i)'" ljust} NL(0.32)
+ {consource(,ti) ; move ; "`\tt consource(,ti)'" ljust} NL(0.32)
+ {source(,SE) ; move ; "`\tt source(,SE)'" ljust} NL
+ {consource(,V) ; move ; "`\tt consource(,V)'" ljust} NL(0.32)
+ {consource(,v) ; move ; "`\tt consource(,v)'" ljust} NL(0.3)
+ {consource(,tv) ; move ; "`\tt consource(,tv)'" ljust} NL(0.3)
+ {battery ; move ; "`\tt battery'" ljust} NL(0.3)
+ {battery(,3,R) ; move ; "`\tt battery(,3,R)'" ljust} #NL(0.35)
iflatex(`ifpsfrag(,`latexcommand(})')')
.PE
diff --git a/graphics/circuit_macros/doc/SwitchesMan.m4 b/graphics/circuit_macros/doc/SwitchesMan.m4
index 9f58980171..a442d60ac0 100644
--- a/graphics/circuit_macros/doc/SwitchesMan.m4
+++ b/graphics/circuit_macros/doc/SwitchesMan.m4
@@ -61,7 +61,7 @@ movewid = 0.25
move down 0.4; right_; {
dswitch(,,WBCb); {"\tt (,{,}WBCb)" at last [].s Below}
move right_
- dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" at last [].s Below}
+ dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" wid 50bp__ at last [].s Below}
move right_
dswitch(,,WBcDI); {"\tt (,{,}WBcDI)" at last [].s Below}
thinlines_
@@ -129,17 +129,17 @@ movewid = 0.25
move down_ 6bp__ then right_
dswitch(,,WBPrM); {"\tt (,{,}WBPrM)" at last [].s Below}
move right_
- dswitch(,,WBDIGX,W); #{"\tt (,{,}WBDIGX,W)" at last [].s Below}
+ dswitch(,,WBDIGX,text=W)
{"\tt (,{,}WBDIGX," ljust at last line.start+(0,-15bp__) \
"\tt text=W)" ljust}
move right_
- dswitch(,,WBDIGC,text=M)
+ dswitch(,,WBDIGC,circle="M")
{"\tt (,{,}WBDIGC," ljust at last line.start+(0,-15bp__) \
- "\tt text=M)" ljust}
+ "\tt circle=\"M\")" ljust}
move right_
- dswitch(,,WBcDIGC,text=M) #
+ dswitch(,,WBcDIGC,circle="M") #
{"\tt (,{,}WBcDIGC," ljust at last line.start+(0,-15bp__) \
- "\tt text=M)" ljust}
+ "\tt circle=\"M\")" ljust}
}
.PE
diff --git a/graphics/circuit_macros/doc/Version.tex b/graphics/circuit_macros/doc/Version.tex
index 1f7ee14733..4a5d56e9c4 100644
--- a/graphics/circuit_macros/doc/Version.tex
+++ b/graphics/circuit_macros/doc/Version.tex
@@ -1 +1 @@
-Version 10.4
+Version 10.5
diff --git a/graphics/circuit_macros/doc/body.tex b/graphics/circuit_macros/doc/body.tex
index 296ba4e295..b6b9ca0dde 100644
--- a/graphics/circuit_macros/doc/body.tex
+++ b/graphics/circuit_macros/doc/body.tex
@@ -59,7 +59,7 @@ This manual%
describes a method for drawing electric circuits and
other diagrams in \latex and web documents.
The diagrams are defined in the simple \pic drawing language~\cite{KRpic}
-augmented with \Mfour macros~\cite{KRm4}, and are
+augmented with \Mfour macros~\cite{KRm4,GnuM4}, and are
processed by \Mfour and a \pic processor to
convert them to \TPGF, \PSTricks, other \latex-compatible code, \SVG,
or other formats.
@@ -84,9 +84,9 @@ systems, project management software with graphical interfaces can
automate the process, but the steps can also be performed by a script,
makefile, or by hand for simple documents as described in~\SR{Quickstart:}.
-The diagram source file is preprocessed as illustrated in
+The diagram source file is processed as illustrated in
\FR{Flowdiag}. A configuration file is read by \Mfour,
-followed by the diagram source.
+followed by the diagram source and library macros.
The result is passed through a
\pic interpreter to produce {\tt .tex} output that can be inserted
into a {\tt .tex} document using the \verb|\input| command.
@@ -114,7 +114,7 @@ that understands \tpic specials, typically {\bq dvips}~\cite{dvips}.
The \dpic processor extends the pic language in small but important ways;
consequently, some of the macros and examples in this distribution work fully
only with \dpic.
-\Pic processors contain basic macro facilities, so some of the
+\Pic processors provide basic macro facilities, so some of the
concepts applied here do not require \Mfour.
\subsection{Quick start\label{Quickstart:}}
@@ -132,8 +132,9 @@ labeled circuits.
There are several ways of drawing the same picture; for example,
nodes (such as {\tt Origin}) can be defined and circuit branches
drawn between them; or absolute coordinates can be used (e.g.,
- {\tt source(up\_ from (0,0) to (0,0.75))} ). Element sizes and styles
- can be varied as described in later sections.\label{quick}}%
+ {\tt source(up\_ from (0,0) to (0,0.75))} ). Element sizes
+ can be varied and non-two-terminal elements included (\FR{QTrans})
+ as described in later sections.\label{quick}}%
\end{figure}
\subsubsection{\protect{Using \Mfour}%
@@ -156,34 +157,33 @@ containing the library files.
Now there are at least two basic possibilities as follows,
but be sure to read \SR{Simplifications:} for simplified use.
-\subsubsection{\protect{Processing with \dpic and \PSTricks or \TPGF}%
+\subsubsection{\protect{Processing with \dpic and \TPGF or \PSTricks}%
\label{Processingwithpstricks:}}
-If you are using \dpic with \PSTricks,
-put \verb|\usepackage{pstricks}| in the main \latex source file header and
-type the following commands or put them into a script:
+If you are using \dpic with \TPGF,
+put \verb|\usepackage{tikz}| in the main \latex source file header and
+type the following commands or put them into a script or makefile:
{\vspace*\parsep\tt
- m4 pstricks.m4 quick.m4 > quick.pic
+ m4 pgf.m4 quick.m4 > quick.pic
\brtt
- dpic -p quick.pic > quick.tex
+ dpic -g quick.pic > quick.tex
\vspace*\parsep}
-
\noindent
-To produce \TPGF code,
-the \latex header should contain \verb|\usepackage{tikz}|.
-The commands are modified to read \verb|pgf.m4|
-and invoke the {\tt-g} option of \dpic as follows:
+To produce \PSTricks code,
+the \latex header should contain \verb|\usepackage{pstricks}|.
+The commands are modified to read \verb|pstricks.m4|
+and invoke the {\tt-p} option of \dpic as follows:
{\vspace*\parsep\tt
% {\tt
- m4 pgf.m4 quick.m4 > quick.pic
+ m4 pstricks.m4 quick.m4 > quick.pic
\brtt
- dpic -g quick.pic > quick.tex
+ dpic -p quick.pic > quick.tex
\vspace*\parsep}
\enlargethispage{\baselineskip}
-A configuration file ({\tt pstricks.m4} and {\tt pgf.m4} in the
+A configuration file ({\tt pgf.m4} and {\tt pstricks.m4} in the
above examples) is {\em always} the first file to be given to \Mfour.
Put the following or its equivalent in the document body:
\begin{verbatim}
@@ -194,16 +194,16 @@ Put the following or its equivalent in the document body:
\label{Symbolic_label}
\end{figure}
\end{verbatim}
-Then for \PSTricks,
+Then for \TPGF,
+Invoking PDFlatex on the source produces {\tt .pdf} output directly.
+For \PSTricks,
the commands ``{\tt latex} {\sl file}{\tt;} {\tt dvips} {\sl file}''
produce {\sl file}{\tt.ps},
which can be printed or viewed using {\tt gsview}, for example.
-For \TPGF,
-Invoking PDFlatex on the source produces {\tt .pdf} output directly.
The essential line is \verb|\input quick| whether or not the {\tt figure}
environment is used.
-The effect of the \Mfour command above is shown in \FR{ConfigA}.
+The effect of the second \Mfour command above is shown in \FR{ConfigA}.
\begin{figure}[H]
% \vspace*{-\baselineskip}
\input ConfigA
@@ -313,7 +313,7 @@ document. Define a macro \verb|\mtotex| as shown in the
following example:
{\tt \verb^\documentclass{article}^ \brtt
-\verb^\usepackage{tikz}^ \brtt
+\verb^\usepackage{tikz} % or \usepackage{pstricks}^ \brtt
\verb^\newcommand\mtotex[2]{\immediate\write18{m4 ^%-I^ {\sl installdir}
\verb^#2.m4 | dpic -#1 > #2.tex}}%^\break
\verb^\begin{document}^ \brtt
@@ -365,19 +365,18 @@ The configuration files for \dpic are as follows,
depending on the output format (see \SR{Alternative:}):
{\tt pstricks.m4, pgf.m4, mfpic.m4, mpost.m4, postscript.m4, psfrag.m4, svg.m4,
gpic.m4,} or {\tt xfig.m4}.
-The file {\tt psfrag.m4} simply defines the macro {\tt psfrag\_} and
-then reads {\tt postscript.m4}.
-For \gpic, the configuration file is {\tt gpic.m4}.
+%The file {\tt psfrag.m4} simply defines the macro {\tt psfrag\_} and
+%then reads {\tt postscript.m4}.
The usual case for producing circuit diagrams is to read
-{\tt pstricks.m4} or {\tt pgf.m4} first when \dpic is the postprocessor or
+ {\tt pgf.m4} or {\tt pstricks.m4}
+ first when \dpic is the postprocessor or
to set one of these as the default configuration file.
+For \gpic, the configuration file is {\tt gpic.m4}.
+\pagebreak
At the top of each diagram source, put one or more initialization
commands; that is,
-
-{\tt cct\_init, log\_init, sfg\_init, darrow\_init, threeD\_init}
-
-\noindent
+{\tt cct\_init, log\_init, sfg\_init, darrow\_init, threeD\_init,}
or, for diagrams not requiring specialized macros, {\tt gen\_init}.
As shown in \FRS{ConfigA} and~\REF{ConfigB},
each initialization command reads in the appropriate macro
@@ -385,10 +384,21 @@ library if it hasn't already been read;
for example, {\tt cct\_init} tests whether {\tt libcct.m4} has been
read and includes it if necessary.
-A few of the distributed example files contain other experimental macros
+The distribution includes a collection of \pic utilities in the file
+{\tt dpictools.pic,} which is loaded automatically by macros that
+invoke the {\tt NeedDpicTools} macro.
+
+The file libSLD.m4 contains macros for drawing single-line
+power distribution diagrams. The line
+{\tt include(libSLD.m4)} loads the macros.
+A few of the distributed example files contain other macros
that can be pasted into diagram source files; see
{\tt Flow.m4} or {\tt Buttons.m4}, for example.
+Also included in the distribution is a generous set of examples
+to show capabilities of the macros and to act as a source of code
+if you wish to produce similar diagrams.
+
The libraries contain hints and explanations that might help in debugging
or if you wish to modify any of the macros. Macros are generally named
using the obvious circuit element names so that programming becomes something
@@ -426,7 +436,7 @@ beginning with an upper-case letter.
The classic \pic manual~\cite{KRpic} is still a good introduction to \pic, but
a more complete manual~\cite{Raymond95} can be found in the GNU \groff\
package, and both are available on the web~\cite{KRpic,Raymond95}. Reading
-either will give you competence with \pic in an hour or two. Explicit mention
+either will give you basic competence with \pic in an hour. Explicit mention
of {\tt *roff} string and font constructs in these manuals should be replaced by
their equivalents in the \latex context.
%A man-page language summary is
@@ -754,12 +764,9 @@ A list of the library macros and their arguments is in
\SR{defines}. The arguments have default values, so that only
those that differ from defaults need be specified.
-\FR{BigResistor}, which shows a resistor, also serves as
+\FR{BigResistor} shows a resistor and serves as
an example of \pic commands.
-%Consider the resistor shown in \FR{BigResistor},
-%which also serves as an example of \pic commands.
The first part of the source file for this figure is
-%as follows:
on the left:
\begin{figure}[H]
@@ -773,9 +780,9 @@ on the left:
The lines of \FR{BigResistor}
and the remaining source lines of the file are explained below:
\begin{itemize}
-\item The first line invokes the macro {\tt cct\_init} that
+\item The first line after {\tt .PS} invokes the macro {\tt cct\_init} that
loads the library {\tt libcct.m4}
- and initializes local variables needed by some circuit-element macros.
+ and initializes local variables needed by circuit-element macros.
\item
The sizes of circuit elements are proportional to the \pic environmental
@@ -784,8 +791,8 @@ and the remaining source lines of the file are explained below:
a macro that evaluates to {\tt linewid} unless redefined, and the default
element length is {\tt elen\_}, which evaluates to
{\tt dimen\_*3/2} unless redefined.
- Setting {\tt linewid} to 2.0 as in the example means that the default element
- length becomes 3.0\,in.
+ Setting {\tt linewid} to $2.0$ as in the example means that the
+ default element length becomes $2.0 \times 3/2 = 3.0$\,in.
For resistors, the default length of the body is {\tt dimen\_/2,} and the
width is {\tt dimen\_/6.} All of these values can be customized.
Element scaling and the use of SI units is discussed further in
@@ -837,7 +844,7 @@ were added after the previously shown source:
width and height can be specified, and the box centre positioned at
the centre of the block.
\item The next paragraph draws two objects, a spline with an arrowhead,
- and a string left justified at the end of the spline. Other
+ and a string left-justified at the end of the spline. Other
string-positioning modifiers than {\tt ljust} are {\tt rjust,}
{\tt above,} and {\tt below.}
@@ -850,6 +857,46 @@ Two-terminal elements are shown in
Several are included more than once to illustrate
some of their arguments, which are listed in detail in \SR{defines}.
+Most of the two-terminal elements are oriented; that is, they have
+a defined direction or polarity. Several element macros include an
+argument that reverses polarity, but there is also a more general
+mechanism, as follows.
+
+The first argument of the macro
+\par
+{\tt reversed(`}{\sl macro name}{\tt',}{\sl macro arguments}{\tt )}
+\par
+\noindent
+is the name of a two-terminal element in quotes, followed by the
+element arguments. The element is drawn with reversed direction; thus,
+\par
+{\tt diode(right\_ 0.4); reversed(`diode',right\_ 0.4)}
+\par
+\noindent
+draws two diodes to the right, but the second one points left.
+
+%\pagebreak
+Similarly, the macro
+\par
+{\tt resized(}{\sl factor},`{\sl macro name}',{\sl macro arguments}{\tt )}
+\par
+\noindent
+will resize the body of an element by temporarily multiplying
+the {\tt dimen\_} macro by {\sl factor} but
+\Mfour\ primitives can be employed instead as follows:
+\par
+{\tt pushdef(`dimen\_',dimen\_*({\sl factor})),%
+{\sl macro name}({\sl arguments}) popdef(`dimen\_')}
+\par
+\noindent
+More general resizing should be
+done by redefining {\tt dimen\_} globally as described in \SR{Circuitscaling:}.
+%These two macros can be nested; the following scales the above example
+%by 1.8, for example
+%\par
+%{\tt resized(1.8,`diode',right\_ 0.4);}
+%{\tt resized(1.8,`reversed',`diode',right\_ 0.4)}
+
\enlargethispage{\baselineskip}
\FR{Resistors} shows some resistors with typical variants.
The first macro argument specifies the
@@ -922,12 +969,30 @@ More basic elements are in \FR{MoreTable}, and amplifiers in \FR{AmpTable}.
\label{AmpTable}
\end{figure}
+%\enlargethispage{\baselineskip}
+Diodes are shown in \FR{Diodes}.
+\begin{figure}[H]
+ \input DiodesMan
+ \caption{The macro {\tt
+ diode(\linespec, B|b|CR|D|L|LE[R]|P[R]|S|T|U|V|v|w|Z|{\sl chars}, [R][E])}.
+ Appending {\tt K} to the second argument draws an open arrowhead.}
+ \label{Diodes}
+ \end{figure}
+The arrows are drawn relative to the diode direction by the {\tt LE}
+option. For absolute arrow directions, one can
+define a wrapper (see \SR{Writing:}) for the {\tt diode} macro to draw arrows
+at 45 degrees, for example:
+\par
+{\tt define(`myLED',`diode(`\$1'); em\_arrows(N,45)
+ with .Tail at last [].ne')}
+
\FR{Sources} shows sources, many of which contain internal symbols,
and of which the {\tt AC} and {\tt S} options illustrate the need
to draw a single cycle of a sinusoid or approximate sinusoid.
-\begin{figure}[H]
+\begin{figure}[hbt]
\input SourcesMan
- \caption{Sources and source-like elements.}
+ \caption{Sources and source-like elements. An argument of each
+ element allows customization such as shading.}
\label{Sources}
\end{figure}
As a convenience,
@@ -946,26 +1011,21 @@ and for power-system diagrams, macros
and
{\tt Ysymbol(at {\sl position, keys,} U|D|L|R|{\sl degrees})},
-\enlargethispage{\baselineskip}
-Diodes are shown in \FR{Diodes}.
-\begin{figure}[H]
- \input DiodesMan
- \caption{The macro {\tt
- diode(\linespec, B|b|CR|D|L|LE[R]|P[R]|S|T|U|V|v|w|Z|{\sl chars}, [R][E])}.
- Appending {\tt K} to the second argument draws an open arrowhead.}
- \label{Diodes}
+Fuses, breakers, and jumpers are in \FR{Fuses},
+and switches with numerous controls in \FR{Switches}.
+%Switches with numerous controls are in \FR{Switches},
+%and fuses, breakers, and jumpers in \FR{Fuses}.
+\begin{figure}[hbt]
+ \input FusesMan
+ \caption{Variations of the macros
+ {\tt fuse(\linespec, A|dA|B|C|D|E|S|HB|HC|SB, {\sl wid}, {\sl ht},
+ {\sl attributes}),}
+ {\tt cbreaker(\linespec,L|R,D|T|TS),}
+ and
+ {\tt jumper(\linespec,{\sl chars}|{\sl keys}).}}
+ \label{Fuses}
\end{figure}
-The arrows are drawn relative to the diode direction by the {\tt LE}
-option. For absolute arrow directions, one can
-define a wrapper (see \SR{Writing:}) for the {\tt diode} macro to draw arrows
-at 45 degrees, for example:
-\par
-{\tt define(`myLED',`diode(`\$1'); em\_arrows(N,45)
- with .Tail at last [].ne')}
-
-Switches with numerous controls are in \FR{Switches},
-and fuses, breakers, and jumpers in \FR{Fuses}.
-\begin{figure}[H]
+\begin{figure}[hbt]
\input SwitchesMan
\caption{The
{\tt switch(\linespec,L|R,{\sl chars},L|B|D,{\sl attribs})}
@@ -973,7 +1033,7 @@ and fuses, breakers, and jumpers in \FR{Fuses}.
{\tt lswitch(\linespec,[L|R],[O|C][D][K][A])},
{\tt bswitch(\linespec,[L|R],[O|C])},
and the many-optioned
- {\tt dswitch(\linespec,R,W[ud]B {\sl chars,text})} shown.
+ {\tt dswitch(\linespec,R,W[ud]B {\sl chars,attributes})} shown.
The switch is drawn in the current drawing direction.
A second-argument {\tt R} produces a mirror
image with respect to the drawing direction.
@@ -981,55 +1041,8 @@ and fuses, breakers, and jumpers in \FR{Fuses}.
embellish switches in the bottom row.}
\label{Switches}
\end{figure}
-\begin{figure}[H]
- \input FusesMan
- \caption{Variations of the macros
- {\tt fuse(\linespec, A|dA|B|C|D|E|S|HB|HC|SB, {\sl wid}, {\sl ht}),}
- {\tt cbreaker(\linespec,L|R,D|T|TS),}
- and
- {\tt jumper(\linespec,{\sl chars}|{\sl keys}).}}
- \label{Fuses}
- \end{figure}
-
-Most of the two-terminal elements are oriented; that is, they have
-a defined direction or polarity. Several element macros include an
-argument that reverses polarity, but there is also a more general
-mechanism, as follows.
-
-The first argument of the macro
-\par
-{\tt reversed(`}{\sl macro name}{\tt',}{\sl macro arguments}{\tt )}
-\par
-\noindent
-is the name of a two-terminal element in quotes, followed by the
-element arguments. The element is drawn with reversed direction; thus,
-\par
-{\tt diode(right\_ 0.4); reversed(`diode',right\_ 0.4)}
-\par
-\noindent
-draws two diodes to the right, but the second one points left.
-
-Similarly, the macro
-\par
-{\tt resized(}{\sl factor},`{\sl macro name}',{\sl macro arguments}{\tt )}
-\par
-\noindent
-will resize the body of an element by temporarily multiplying
-the {\tt dimen\_} macro by {\sl factor} but
-\Mfour\ primitives can be employed instead as follows:
-\par
-{\tt pushdef(`dimen\_',dimen\_*({\sl factor})),%
-{\sl macro name}({\sl arguments}) popdef(`dimen\_')}
-\par
-\noindent
-More general resizing should be
-done by redefining {\tt dimen\_} globally as described in \SR{Circuitscaling:}.
-%These two macros can be nested; the following scales the above example
-%by 1.8, for example
-%\par
-%{\tt resized(1.8,`diode',right\_ 0.4);}
-%{\tt resized(1.8,`reversed',`diode',right\_ 0.4)}
+\pagebreak
\FR{Arresters} shows a collection of surge-protection devices, or arresters,
of which the {\tt E} and {\tt S} types may be either 2-terminal or as
3-terminal (composite) elements described in \SR{Composite:}.
@@ -1044,6 +1057,7 @@ of which the {\tt E} and {\tt S} types may be either 2-terminal or as
\label{Arresters}
\end{figure}
+\enlargethispage{\baselineskip}
\FR{Variable} shows some two-terminal elements with
arrows or lines overlaid to indicate variability using the macro
\par
@@ -1075,7 +1089,6 @@ thus, the following line draws the third resistor in \FR{Variable}:
\label{Variable}
\end{figure}
-\pagebreak
\FR{Emarrows} contains radiation-effect arrows for embellishing two-terminal
and other macros.
\begin{figure}[H]
@@ -1165,9 +1178,10 @@ as math-mode strings, on the left side of the last {\tt []} block (or
the block named in the fifth argument if present) {\em with respect to
the current direction:} {\tt up, down, left, right.} The second macro
places the strings along the centre of the element, and the third along
-the right side. Labels beginning with {\tt sprintf} or a double quote
-are copied literally rather than assumed to be in math mode. A simple
-circuit example with labels is shown in \FR{Loop}.
+the right side. The fourth applies a displacement {\sl long, lat} with
+respect to the drawing direction. Labels beginning with {\tt sprintf}
+or a double quote are copied literally rather than assumed to be in
+math mode. A simple circuit example with labels is shown in \FR{Loop}.
\begin{figure}[H]
\vspace*{-\baselineskip}
\parbox{4in}{\small \verbatiminput{Loop.m4}}%
@@ -1197,7 +1211,6 @@ are required to place the element as in the following example:
\par
{\tt resistor(from (1,1) to (2,1))}.
-\noindent
However, \pic has a very useful concept of the current point (explicitly
named {\tt Here}); thus,
\par
@@ -1257,7 +1270,7 @@ The macro {\tt eleminit\_} in the two-terminal elements invokes
to establish element length and direction.
As shown in \FR{Oblique},
-\begin{figure}[H]
+\begin{figure}[hbt]
\vspace{-\baselineskip}
\parbox{4.5in}{\small \verbatiminput{Oblique.m4}}%
\hfill\raise-0.7in\llap{\hbox{\input Oblique }}%
@@ -1388,9 +1401,12 @@ not change the drawing direction.
\xection{Composite circuit elements\label{Composite:}}
Many basic elements are not two-terminal. These elements are usually enclosed in
a \verb|[ ]| \pic block, and contain named interior locations and components.
-The block must be placed by using its compass corners, thus:
+Nearly all elements drawn within blocks can be customized by adding an
+extra argument, which is executed as the last item within the block.
+By default, a block is placed as if it were a box; otherwise,
+the block must be placed by using its compass corners, thus:
{\sl element} {\tt with} {\sl corner} {\tt at} {\sl position}
-or, when the block contains a predefined location, thus:
+or, when the block contains predefined locations, thus:
{\sl element} {\tt with} {\sl location} {\tt at} {\sl position}.
In some cases, an invisible line can be specified by the first argument
to determine length and direction (but not position) of the block.
@@ -1398,25 +1414,22 @@ A few macros are positioned with the first argument;
the {\tt ground} macro, for example:
{\tt ground(}{\tt at} {\sl position}{\tt ).}
-Nearly all elements drawn within blocks can be customized by adding an
-extra argument, which is executed as the last item within the block.
-
-As a preliminary example,
-\FR{QTrans} shows the file {\tt quick.m4} adapted to include a
-transformer,
-% a composite element with predefined interior locations
-%{\sl P1,} {\sl P2,} {\sl S1,} {\sl S2} and others. The {\tt transformer} macro
-which is described in more detail below.
+\enlargethispage{\baselineskip}
+\FR{QTrans} illustrates the adaptation of file {\tt quick.m4} to
+include a transformer, a composite element described in detail below,
+followed by code for the figure.
\begin{figure}[H]
% \vspace*{-\baselineskip}
- \parbox{4in}{\small \verbatiminput{QTrans.m4}}%
- \hspace*{-0.45in}\raise-0.15in\hbox{\input QTrans }
- \vspace*{-\baselineskip}
- \caption{The file {\tt quick.m4} has been modified to include a
- transformer, of which the length and orientation of connectors
- is given by the first argument, and which is placed by reference
- to internal position {\sl P1.} Label {\sl Vs} has
- been added for convenient reference.}
+% \parbox{4in}{\small \verbatiminput{QTrans.m4}}%
+% \hspace*{-0.45in}\raise-0.15in\hbox{\input QTrans }
+% \vspace*{-\baselineskip}
+ \input Qtrans
+ \caption{The file {\tt quick.m4} modified to include a composite
+ element, the transformer, which is positioned by placing an
+ internal point.}
+% transformer, of which the length and orientation of connectors
+% is given by the first argument, and which is positioned in this
+% example by placing the internal position {\sl P1.}}
\label{QTrans}
\end{figure}
@@ -1443,6 +1456,11 @@ puts dots at opposite ends.
\label{Xform}
\end{figure}
+The code for \FR{QTrans} is reproduced in the following.
+Label {\sl Vs} has been added for later reference.
+The transformer is positioned by placing internal position {\sl P1.}
+\verbatiminput{QTrans.m4}
+
The macro {\tt
potentiometer(\linespec,{\sl cycles},{\sl fractional pos},{\sl length},
$\ldots$)},
@@ -1457,6 +1475,7 @@ direction.
\label{Potentiometers}
\end{figure}
+\pagebreak
The macro {\tt
addtaps([{\sl arrowhd} | type={\sl arrowhd};name={\sl Name}],
{\sl fraction, length, fraction, length,}
@@ -1482,7 +1501,6 @@ These two macros require the two-terminal element to be drawn either up,
down, to the left, or to the right; they are not designed for obliquely
drawn elements.
-\pagebreak
A few composite symbols derived from two-terminal elements
are shown in \FR{Composite}.
\begin{figure}[H]
@@ -1495,15 +1513,17 @@ are shown in \FR{Composite}.
\label{Composite}
\end{figure}
-%\enlargethispage{\baselineskip}
+\enlargethispage{\baselineskip}
The ground symbol is shown in \FR{Grounds}.
-The first argument specifies position; for example, the two lines shown
-have identical effect:
-\par
-{\tt move to (1.5,2); ground
-\par
-ground(at (1.5,2)) }
-
+The first argument specifies position; for example,
+{\tt ground(at (1.5,2))} has the same effect as
+{\tt move to (1.5,2); ground.}
+%The first argument specifies position; for example, the two lines shown
+%have identical effect:
+%\par
+%{\tt move to (1.5,2); ground
+%\par
+%ground(at (1.5,2)) }
The second argument truncates
the stem, and the third defines the symbol type.
The fourth argument specifies the angle at which the symbol is drawn,
@@ -1532,8 +1552,8 @@ shown in \FR{Antennas} are similar to those of {\tt ground}.
\label{Antennas}
\end{figure}
-\FR{Opamp} illustrates the macro
-{\tt opamp({\sl\linespec, - label, + label, size, chars})\label{OPAMP}}.
+\FR{Opamp} illustrates the macro {\tt
+ opamp({\sl\linespec, - label, + label, size, chars, attributes})\label{OPAMP}}.
\begin{figure}[H]
\input OpampMan
\caption{Operational amplifiers. The {\tt P} option adds
@@ -1577,12 +1597,13 @@ with predefined internal locations as shown.
\begin{figure}[H]
\input AudioMan
\caption{Audio components:
- {\tt speaker(U|D|L|R|{\sl degrees},{\sl size},{\sl type}),
+ {\tt speaker(U|D|L|R|{\sl degrees},{\sl size},{\sl type},{\sl attributes}),
bell, microphone, buzzer,
earphone}, with their internally named positions and components.}
\label{Audio}
\end{figure}
-The first argument specifies the device orientation.
+The first argument specifies the device orientation. The fourth can add
+fill or line attributes.
Thus,
\par
{\tt S: speaker(U) with .In2 at Here}
@@ -1591,7 +1612,7 @@ Thus,
places an upward-facing speaker with input {\sl In2} at the
current location.
-
+\pagebreak
The {\tt nport({\sl box specs {\tt[;} other commands{\tt]},
nw, nn, ne, ns, space ratio, pin lgth, style})}
macro is shown in \FR{Nport}.
@@ -1602,7 +1623,6 @@ macro is shown in \FR{Nport}.
The {\tt nterm} macro draws single pins instead of pin pairs.}
\label{Nport}
\end{figure}
-\pagebreak
The macro begins with the line
\verb|define(`nport',`[Box: box `$1'|,
so the first argument is a box specification such as size, fill,
@@ -1651,6 +1671,7 @@ The above example and the related gyrator macro are illustrated in
\label{NLG}
\end{figure}
+\pagebreak
\FR{Contact} shows the macro {\tt contact({\sl chars})},
which contains predefined locations {\sl P, C, O}
for the armature and normally closed and normally
@@ -1665,7 +1686,6 @@ An {\tt I} in the first argument draws open circles for contacts.
\label{Contact}
\end{figure}
-\pagebreak
The {\tt contacts({\sl poles, chars})} macro in \FR{Contacts}
draws multiple contacts.
\begin{figure}[H]
@@ -1686,13 +1706,14 @@ actuator types.
\label{relaycoil}
\end{figure}
+\pagebreak
The {\tt relay} macro in \FR{Relay}
defines coil terminals {\sl V1, V2} and contact
terminals {\sl P$_i$, C$_i$, O$_i$.}
\begin{figure}[H]
\input RelayMan
\vspace{-1ex}
- \caption{The {\tt relay({\sl poles, chars})}
+ \caption{The {\tt relay({\sl poles, chars, attributes})}
macro (drawing direction right).}
\label{Relay}
\end{figure}
@@ -1707,7 +1728,6 @@ composite elements that must be placed accordingly.
\label{NPDT}
\end{figure}
-\pagebreak
The {\tt jack} and {\tt plug} macros and their defined points are
illustrated in \FR{Jack}.
The first argument of both macros establishes the drawing direction.
@@ -1720,6 +1740,7 @@ The first argument of both macros establishes the drawing direction.
\label{Jack}
\end{figure}
\noindent%
+\enlargethispage{\baselineskip}
The second argument is a string of characters defining drawn components.
An {\tt R} in the string specifies a
right orientation with respect to the drawing direction.
@@ -1741,8 +1762,11 @@ A macro for drawing headers is in \FR{Headers}.
\end{figure}
Some connectors are shown in \FR{Conn} and \FR{Pconn}.
-The {\tt tstrip} macro allows ``{\sl key}{\tt =}{\sl value}{\tt ;}'' arguments
-for width and height.
+The {\tt tstrip} macro allows keys
+ {\tt wid={\sl{}value};}
+ {\tt ht={\sl{}value};} and
+ {\tt box={\sl{}attributes};}
+ in argument 3 for width, height, and e.g., fill, color, or dashed.
\begin{figure}[H]
\input ConnMan
\caption{Macros {\tt tstrip(R|L|U|D|{\sl degrees}, {\sl chars})},
@@ -1765,7 +1789,7 @@ For simplicity, the complete spline
is first drawn and then blanked in appropriate places using the background
(core) color (\verb!lightgray! for example, default \verb!white!).
\begin{figure}[H]
- \vspace*{-\baselineskip}%
+% \vspace*{-\baselineskip}%
\input WindingsMan
\caption{The {\tt winding(L|R, diam, pitch, turns, core wid, core color)}
macro draws a coil with axis along the current drawing direction.
@@ -1774,6 +1798,7 @@ is first drawn and then blanked in appropriate places using the background
\label{Windings}
\end{figure}
+\pagebreak
\subsection{Semiconductors\label{Semiconductors:}}%
\FR{Bip} shows the variants of bipolar transistor macro
{\tt bi\_tr(\linespec,L|R,P,E)}
@@ -1794,7 +1819,6 @@ current drawing direction according to the second argument. Setting the third
argument to {\tt P} creates a PNP device instead of NPN, and setting the
fourth to {\tt E} draws an envelope around the device.
-\pagebreak
\FR{Darlington} shows a composite macro with several optional internal elements.
\begin{figure}[H]
\input Darlington
@@ -1828,6 +1852,7 @@ specified as shown in \FR{bitrans}.
\label{bitrans}
\end{figure}
+\pagebreak
A UJT macro with predefined internal locations {\sl B1,} {\sl B2,}
and {\sl E} is shown in \FR{ujt}.
\begin{figure}[H]
@@ -1868,6 +1893,7 @@ but require a third argument for the label for the compound block; thus,
draws the element from position {\sl A} to position {\sl B} with label
{\sl Q3}, and draws a line from {\sl G}.
+\pagebreak
Some FETs with predefined internal locations {\sl S,} {\sl D,} and {\sl G} are
also included, with similar arguments to those of {\tt bi\_tr,} as shown in
\FR{fet}.
@@ -1919,6 +1945,7 @@ also shows a pass transistor.
\label{Tgate}
\end{figure}
+\pagebreak
Some other non-two-terminal macros are {\tt dot}, which has an
optional argument ``{\tt at} {\sl location}'', the line-thickness
macros, the {\tt fill\_} macro, and {\tt crossover}, which is a useful if
@@ -1983,6 +2010,7 @@ by half the line thickness (macro {\tt hlth}) as shown on the upper row
of the figure,
or a two-segment line can be overlaid at the corner to produce the same effect.
+\pagebreak
\xection{Looping\label{Looping:}}
Sequential actions can be performed using either the
\dpic command
@@ -2016,16 +2044,19 @@ which evaluates {\sl actions} and increments counter {\tt m4Lx}
for each instance of {\sl variable} set to {\sl value1, value2, $\ldots$}
\xection{Logic gates\label{Logicgates:}}
-\FR{Logic} shows the basic logic gates included in
-library {\tt liblog.m4}.
-The first argument of the gate macros can be an integer $N$ from $0$ to $16,$
-specifying the number of input
-locations {\tt In1,} $\ldots$ {\tt In}$N,$ as illustrated for
-the NOR gate in the figure.
-By default, $N=2$ except for macros {\tt NOT\_gate} and {\tt BUFFER\_gate},
-which have one input {\tt In1} unless they are given a
-first argument, which is treated as the line specification of a
-two-terminal element.
+Library {\tt liblog.m4} contains a selection of basic and advanced logic
+gates and structures. The default size and style parameters defined
+near the top of the file can be globally redefined or temporarily set
+locally. Individual gates also have arguments that allow adjustment of
+size, and fill, for example.
+
+\FR{Logic} shows the basic logic gates. The first argument of the gate
+macros can be an integer $N$ from $0$ to $16,$ specifying the number
+of input locations {\tt In1,} $\ldots$ {\tt In}$N,$ as illustrated
+for the NOR gate in the figure. By default, $N=2$ except for macros
+{\tt NOT\_gate} and {\tt BUFFER\_gate}, which have one input {\tt In1}
+unless they are given a first argument, which is treated as the line
+specification of a two-terminal element.
\begin{figure}[H]
\vspace*{-0.5\baselineskip}
\input LogicMan
@@ -2049,6 +2080,7 @@ regardless of gate orientation, as in \FR{FF}.
\label{FF}
\end{figure}
+\pagebreak
Beyond a default number (6) of inputs, the
gates are given wings as in \FR{exVIII}.
\begin{figure}[H]
@@ -2376,7 +2408,6 @@ which executes the given actions successively with
\label{sampleIC}}%
\end{figure}
-%\pagebreak
\xection{Single-line diagrams\label{SingleLine:}}
\input SLDsMan
Standard single-line diagrams for power distribution employ many of
@@ -2733,7 +2764,7 @@ can be defined as shown in \FR{Thermal}.
\label{Thermal}
\end{figure}
-\enlargethispage{\baselineskip}
+\pagebreak
\Example{2}
In the following,
two macros are defined to simplify the repeated drawing
@@ -2800,7 +2831,6 @@ define(`hybrid_PI_BJT',
`$2' ] ')
\end{verbatim}
-\pagebreak
\Example{4}
A number of elements have arguments meant explicitly for customization.
\FR{Sinus} customizes the {\tt source} macro to show a cycle of a horizontal sinusoid with adjustable phase given by argument 2 in degrees,
@@ -2822,6 +2852,7 @@ $3,$4,$5)')
\label{Sinus}
\end{figure}
+\pagebreak
\Example{5}
Repeated subcircuits might appear only
as the subcircuit and its mirror image, for example, so the
@@ -3398,8 +3429,8 @@ invoked in the outermost scope of a pic diagram, and the
\xection{Web documents, {\ttfamily pdf}, and alternative output formats%
\label{Alternative:}}
-Circuit diagrams contain graphics and symbols, and the issues related to
-web publishing are similar to those for other mathematical documents.
+The issues related to web publishing are similar to those for other
+documents containing both graphics and text.
Here the important factor is that \gpic\ {\tt -t} generates output
containing \tpic \verb|\special| commands, which must be converted
to the desired output, whereas \dpic can generate several alternative
@@ -3465,30 +3496,30 @@ as illustrated in \FR{Workflow} and in example files included with the
distribution. The \latex drawing commands alone or with {\tt eepic}
or {\tt pict2e} extensions are suitable only for simple diagrams.
-\pagebreak
\xection{Developer's notes\label{Developersnotes:}}
In the course of writing a book in the late 1980s when there was little
-available for creating line diagrams in \latex, I wished to eliminate
-the tedious coordinate calculations required by the \latex
-picture objects that I was then using. The \pic\ language seemed to be a
-good fit for this purpose, and I took a few days off to write a \pic-like
-interpreter (\dpic). The macros in this distribution and the interpreter
-are the result of that effort, drawings I have had to produce since,
-and suggestions received from others. The interpreter has been upgraded
-over time to generate \mfpic, \MetaPost~\cite{metapost,drawingwithmetapost},
-raw \Postscript, \Postscript with {\tt psfrag} tags, raw PDF, \PSTricks,
-and Ti{\it k}Z PGF output, the latter two my preference because of their
-quality and flexibility, including facilities for colour and rotations,
-together with simple font selection. \Xfig{}-compatible output was
-introduced early on to allow the creation of diagrams both by programming
-and by interactive graphics. \SVG output was added relatively recently,
-and seems suitable for producing web diagrams directly and for further
-editing by the Inkscape interactive graphics editor. The latest addition
-is raw PDF output, which has very basic text capability and is most
-suitable for creating diagrams without labels, but on which sophisticated
-text can be overlaid if necessary. \Dpic can write the coordinates of
-selected locations to an external file to be used in overlaying text or
-other items on the diagram.
+available for creating line diagrams in \latex, I wished to eliminate the
+tedious coordinate calculations required by the \latex picture objects
+that I was then using. The \pic\ language seemed to be a good fit for
+this purpose, and I took a few days off to write a \pic-like interpreter
+(\dpic). The macros in this distribution and the interpreter are
+the result of that effort, drawings I have had to produce since, and
+suggestions received from others. The emphasis throughout has been to
+produce a few types of diagrams well rather than attempting to satisfy
+the needs of everyone.
+
+\Dpic has been upgraded over time to generate \mfpic,
+\MetaPost~\cite{metapost,drawingwithmetapost}, raw \Postscript,
+\Postscript with {\tt psfrag} tags, raw PDF, \PSTricks, and Ti{\it k}Z
+PGF output, the latter two my preference because of their quality and
+flexibility, including facilities for colour and rotations, together
+with simple font selection. \Xfig{}-compatible output was introduced
+early on to allow the creation of diagrams both by programming and by
+interactive graphics. \SVG output was added relatively recently, and
+seems suitable for producing web diagrams directly and for further editing
+by the Inkscape interactive graphics editor. The latest addition is raw
+PDF output, which has very basic text capability and is most suitable for
+creating diagrams without labels.
The simple \pic\ language is but one of many available tools for creating
line graphics. Consequently, the main value of this distribution
@@ -3536,13 +3567,12 @@ Similarly, the SVG output can be read directly by the Inkscape graphics
editor, but SVG can also be used directly for web pages.
\Dpic will also generate low-level \MetaPost or \Postscript code, so
that diagrams defined using \pic can be manipulated and combined with
-others. The \Postscript output can be imported into
-CorelDraw
-%\Textregistered
-and Adobe Illustrator
-%\Textregistered
-for further processing.
-With raw \Postscript, \PDF, and \SVG output, the user is
+others.
+I learned to great benefit that the \Postscript output can be imported into
+CorelDraw and Adobe Illustrator for further processing,
+so that detailed diagram components produced by pic program can be combined
+with effects best acheived using a wysiwyg drawing program.
+With raw \Postscript, \PDF, and \SVG output however, the user is
responsible for ensuring that the correct fonts are provided and for
formatting the text.
@@ -3899,7 +3929,6 @@ without sacrificing ease of use.
\end{enumerate}
-\pagebreak
\xection{List of macros\label{Listofmacros:}}
\label{defines}
The following table lists macros in the libraries, configuration
diff --git a/graphics/circuit_macros/doc/defines.tex b/graphics/circuit_macros/doc/defines.tex
index 7f3ceea1b3..0c9c67bfbf 100644
--- a/graphics/circuit_macros/doc/defines.tex
+++ b/graphics/circuit_macros/doc/defines.tex
@@ -11,7 +11,7 @@
%\newcommand{\macx}[2]{%
% \phantomsection\pdfbookmark[subsection]{#1}{#2}#1}
-\newcommand{\macrodef}[5]{%\begin{samepage}%
+\newcommand{\macrodef}[5]{%\begin{minipage}[b]{\textwidth}%
\phantomsection\pdfbookmark[subsubsection]{#1}{#2}%
\setbox\Defbox=\hbox{\tt #1#3}%
\ifdim\wd\Defbox>\textwidth%
@@ -19,9 +19,10 @@
\ifdim\wd\Defbox>\leftwid%
\box\Defbox\hfill\break\hspace*{\leftwid}%
\else\hbox to \leftwid{\box\Defbox\hfill}\fi%
+ \nopagebreak
\hbox to \libwid{#4\hfill}\parbox[t]{\rightwid}%
{\raggedright #5}%
-% \end{samepage}%
+ %\end{minipage}%
\vspace{\parsep}\\}%
\newcommand{\seesect}[1]{ (\SR{#1})}
@@ -34,6 +35,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\raggedbottom
\vspace{\abovedisplayskip}
\noindent
\LR{A} \LR{B} \LR{C} \LR{D} \LR{E} \LR{F} \LR{G} \LR{H} \LR{I} \LR{J}
@@ -42,101 +44,113 @@
\\
\Letter{A}%
-\macrodef{above\_}{above_}{}
- {gen}
- {string position above relative to current direction}
-\macrodef{abs\_}{abs_}{({\sl number})}
- {gen}
- {absolute value function}
-\macrodef{ACsymbol}{ACsymbol}{(at {\sl position, len, ht,}
- [n:][A]U|D|L|R|{\sl degrees}) }
- {cct}
+\macrodef{above\_}{above_}{}%
+ {gen}%
+ {string position above relative to current direction}%
+\macrodef{abs\_}{abs_}{({\sl number})}%
+ {gen}%
+ {absolute value function}%
+\macrodef{ACsymbol}{ACsymbol}{(at {\sl position, len, ht,}%
+ [n:][A]U|D|L|R|{\sl degrees}) }%
+ {cct}%
{draw a stack of $n$ (default 1) AC symbols
- ( 1-cycle sine waves); If arg 4 contains A, two arcs
+ (1-cycle sine waves); If arg 4 contains A, two arcs
are used. The current drawing direction is default, otherwise Up, Down,
Left, Right, or at {\sl degrees} slant; \seesect{Twoterminal:} e.g.,\\
- {\tt ebox; $\lbrace$ACsymbol(at last [],{,}dimen\_/8)$\rbrace$}}
-\macrodef{adc}{adc}{({\sl width,height,nIn,nN,nOut,nS})}
- {cct}
- {ADC with defined width, height, and number of inputs {\tt In$i$},
- top terminals {\tt N$i$}, ouputs {\tt Out$i$},
- and bottom terminals~{\tt S$i$}}
-\macrodef{addtaps}{addtaps}{[{\sl arrowhd}
+ {\tt ebox; $\lbrace$ACsymbol(at last [],{,}dimen\_/8)$\rbrace$}}%
+\macrodef{adc}{adc}{({\sl width,height,nIn,nN,nOut,nS})}%
+ {cct}%
+ {Analog-digital converter with defined width, height, and number of
+ inputs {\tt In$i$}, top terminals {\tt N$i$}, ouputs {\tt Out$i$},
+ and bottom terminals~{\tt S$i$}}%
+\macrodef{addtaps}{addtaps}{[{\sl arrowhd}%
| type={\sl arrowhd};name={\sl Name}],
- {\sl fraction, length, fraction, length,} $\cdots$)}
- {cct}
+ {\sl fraction, length, fraction, length,} $\cdots$)}%
+ {cct}%
{Add taps to the previous two-terminal element.
- {\sl arrowhd} = blank or one of {\tt . - <- -> <->}.
+ {\sl arrowhd} is blank or one of {\tt . - <- -> <->}.
Each fraction determines the position along the element body of the tap.
A negative length draws the tap to the right of the current
direction; positive length to the left.
Tap names are Tap1, Tap2, $\cdots$ by default or
Name1, Name2, $\cdots$ if specified
- \seesect{Composite:}}
-\macrodef{along\_}{along_}{({\sl linear object name})}
- {gen}
- {short for {\tt between {\sl name}.start and {\sl name}.end}}
-\macrodef{Along\_}{Along_}{({\sl LinearObj,distance,}[R])}
- {gen}
+ \seesect{Composite:}}%
+\macrodef{along\_}{along_}{({\sl linear object name})}%
+ {gen}%
+ {short for {\tt between {\sl name}.start and {\sl name}.end}}%
+\macrodef{Along\_}{Along_}{({\sl LinearObj,distance,}[R])}%
+ {gen}%
{Position arg2 (default all the way) along a linear object
- from {\tt .start} to {\tt .end}
- (from {\tt .end} to {\tt .start} if arg3={\tt R}) }
-\macrodef{amp}{amp}{(\linespec,{\sl size})}
- {cct}
- {amplifier\seesect{Twoterminal:}}
+ from {\tt .start} to {\tt .end}%
+ (from {\tt .end} to {\tt .start} if arg3={\tt R}) }%
+\macrodef{amp}{amp}{(\linespec, {\sl size}, {\sl attributes})}%
+ {cct}%
+ {amplifier\seesect{Twoterminal:}}%
\macrodef{And, Or, Not, Nand, Nor, Xor, Nxor, Buffer}%
- {And, Or, Not, Nand, Nor, Xor, Nxor, Buffer}{}
- {log}
- {Wrappers of {\tt AND\_gate}, $\ldots$ for use in the {\tt Autologix}
- macro}
-\macrodef{AND\_gate}{AND_gate}{({\sl n},N)}
- {log}
- {basic `and' gate, 2 or {\sl n\/} inputs; {\tt N}=negated input.
- Otherwise, arg1 can be a sequence of letters {\tt P|N}
- to define normal or negated inputs
- \seesect{Logicgates:}}
-\macrodef{AND\_gen}{AND_gen}{($n$,{\sl chars},[{\sl wid},[{\sl ht}]])}
- {log}
+ {And, Or, Not, Nand, Nor, Xor, Nxor, Buffer}{}%
+ {log}%
+ {Wrappers of {\tt AND\_gate}, $\ldots$ for use in the {\tt Autologix}%
+ macro}%
+\macrodef{AND\_gate}{AND_gate}{({\tt {\sl n}, [N][B],
+ [{\sl wid}, [{\sl ht}]], {\sl attributes}})}%
+ {log}%
+ {`and' gate, 2 or {\sl n\/} inputs ($0 \leq n \leq 16$) drawn in the
+ current direction;
+ {\tt N}: negated inputs; {\tt B}: box shape.
+ Alternatively, {\tt AND\_gate({\sl chars}, [B], {\sl wid},
+ {\sl ht}, {\sl attributes})}, where
+ arg1 is a sequence of letters {\tt P|N} to define
+ normal or negated inputs.
+ \seesect{Logicgates:}}%
+\macrodef{AND\_gen}{AND_gen}{($n$, {\sl chars}, [{\sl wid}, [{\sl ht}]],
+ {\sl attributes})}%
+ {log}%
{general AND gate: $n$=number of inputs $(0\leq n\leq 16)$;
- {\sl chars:}
+ {\sl chars:}%
B=base and straight sides; A=Arc;
[N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles;
[N]O=output; C=center.
- Otherwise, arg1 can be a sequence of letters {\tt P|N}
- to define normal or negated inputs.}
-\macrodef{AND\_ht}{AND_ht}{}
- {log}
- {height of basic `and' and `or' gates in {\tt L\_unit}s}
-\macrodef{AND\_wd}{AND_wd}{}
- {log}
- {width of basic `and' and `or' gates in {\tt L\_unit}s}
+ Otherwise, arg1 can be a sequence of letters {\tt P|N}%
+ to define normal or negated inputs; arg2 is as above except that
+ {\tt [N]I} is ignored. Arg 5 contains body attributes.}%
+\macrodef{AND\_ht}{AND_ht}{}%
+ {log}%
+ {height of basic `and' and `or' gates in {\tt L\_unit}s}%
+\macrodef{AND\_wd}{AND_wd}{}%
+ {log}%
+ {width of basic `and' and `or' gates in {\tt L\_unit}s}%
\macrodef{antenna}{antenna}{%
- (at {\sl location}, T, A|L|T|S|D|P|F, U|D|L|R|{\sl degrees})}
- {cct}
- {antenna, without stem for nonblank 2nd arg; {\tt A}=aerial,
- {\tt L}=loop, {\tt T}=triangle, {\tt S}=diamond, {\tt D}=dipole,
- {\tt P}=phased, {\tt F}=fork;
- up, down, left, right, or angle from horizontal (default 90)
- \seesect{Composite:}}
+ (at {\sl location}, T, A|L|T|S|D|P|F, U|D|L|R|{\sl degrees})}%
+ {cct}%
+ {antenna, without stem for nonblank 2nd arg; arg3 is\\
+ {\tt A}: aerial (default),\\
+ {\tt L}: loop,\\
+ {\tt T}: triangle,\\
+ {\tt S}: diamond,\\
+ {\tt D}: dipole,\\
+ {\tt P}: phased,\\
+ {\tt F}: fork;\\
+ arg4 specifies Up, Down, Left, Right, or angle from horizontal (default 90)
+ \seesect{Composite:}}%
\macrodef{arca}{arca}{({\sl absolute chord linespec}, ccw|cw, {\sl radius},
- {\sl modifiers}) }
- {gen}
- {arc with acute angle (obtuse if radius is negative), drawn in a [ ] block}
+ {\sl modifiers}) }%
+ {gen}%
+ {arc with acute angle (obtuse if radius is negative), drawn in a [ ] block}%
\macrodef{ArcAngle}{ArcAngle}{({\sl position, position, position, radius,
- modifiers, label}) }
- {gen}
+ modifiers, label}) }%
+ {gen}%
{Arc angle symbol drawn ccw at arg2. Arg4 is the radius from arg2;
arg5 contains line attributes, e.g., {\tt thick linethick/2 ->};
- arg6 is an optional label at mid-arc}
+ arg6 is an optional label at mid-arc}%
\macrodef{arcd}{arcd}{({\sl center},
- {\sl radius},{\sl start degrees},{\sl end degrees}) }
- {gen}
+ {\sl radius},{\sl start degrees},{\sl end degrees}) }%
+ {gen}%
{Arc definition (see {\tt arcr}), angles in degrees
- \seesect{Positions:}}
+ \seesect{Positions:}}%
\macrodef{arcdimension\_}{arcdimension_}{({\sl arcspec},{\sl offset},%
{\sl label},
- D|H|W|{\sl blank width},{\sl tic offset},{\sl arrowhead })}
- {gen}
+ D|H|W|{\sl blank width},{\sl tic offset},{\sl arrowhead })}%
+ {gen}%
{like {\tt dimension\_}, for drawing arcs for dimensioning diagrams;
{\sl arrowhead=}{\tt -> | <-}. Uses the first argument as the attributes
of an invisible arc: {\tt arc invis }{\sl arg1}. {\sl Arg2} is the
@@ -146,63 +160,86 @@
{\tt D:} blank width is the diagonal length of {\sl arg3};
{\tt H:} blank width is the height of {\sl arg3} + {\tt textoffset*2};
{\tt W:} blank width is the width of {\sl arg3} + {\tt textoffset*2};
- otherwise {\sl arg4} is the absolute blank width}
+ otherwise {\sl arg4} is the absolute blank width}%
\macrodef{arcr}{arcr}{({\sl center},{\sl radius},{\sl start angle},{\sl
- end angle,modifiers,ht}) }
- {gen}
+ end angle,modifiers,ht}) }%
+ {gen}%
{Arc definition. If arg5 contains {\tt <-} or {\tt ->} then a midpoint
arrowhead of height equal to arg6 is added. Arg5 can contain modifiers
(e.g. outlined "red"), for the arc and arrowhead. Modifiers following
the macro affect the arc only,
- e.g., {\tt arcr(A,r,0,pi\_/2,->) dotted ->}
- \seesect{Positions:}}
+ e.g., {\tt arcr(A,r,0,pi\_/2,->) dotted ->}%
+ \seesect{Positions:}}%
\macrodef{arcto}{arcto}{({\sl position 1},{\sl position 2},{\sl
- radius},[dashed|dotted])}
- {gen}
- {line toward position 1 with rounded corner toward position 2}
+ radius},[dashed|dotted])}%
+ {gen}%
+ {line toward position 1 with rounded corner toward position 2}%
+\macrodef{array}{array}{({\sl variable, expr1, expr2, \ldots})}%
+ {dpictools}%
+ {$\;\;$ Populate a singly-subscripted array:
+ {\tt {\sl var}[1]={\sl expr1;} {\sl var}[2]={\sl expr2;} \ldots}.}%
+\macrodef{array2}{array2}{({\sl variable, expr1, expr2, \ldots})}%
+ {dpictools}%
+ {$\;\;$ Populate a doubly-subscripted array:
+ {\tt {\sl var}[{\sl expr1},1]={\sl expr2;}%
+ {\sl var}[{\sl expr1},2]={\sl expr3;} \ldots}.}%
+\macrodef{arraymax}{arraymax}{({\sl data array, n, index name, value})}%
+ {dpictools}%
+ {$\;\;$ Find the index in {\sl array[1:n]} of the first occurrence
+ of the maximum array element value. The value is assigned if arg4 is
+ nonblank; example:
+ {\tt array(x,4,9,8,6); arraymax( x,4,i )}%
+ assigns 2 to {\sl i,} and {\tt arraymax( x,4,i,m )}%
+ assigns 2 to {\sl i} and 9 to {\sl m.}}%
+\macrodef{arraymin}{arraymin}{({\sl data array, n, index name, value})}%
+ {dpictools}%
+ {$\;\;$ Find the index in {\sl array[1:n]} of the first occurrence
+ of the minimum array element value. The value is assigned if arg4 is
+ nonblank; see {\tt arraymax}.}%
\macrodef{arrester}{arrester}{(\linespec,{\sl chars},
{\sl len}[:arrowhead ht],
- {\sl ht}[:arrowhead wid] )}
- {cct}
-{
- {\sl Arg2 chars:}
- {\tt G=} spark gap (default),
- {\tt g=} general (dots),
- {\tt E=} gas discharge,
- {\tt S=} box enclosure,
- {\tt C=} carbon block,
- {\tt A=} electrolytic cell,
- {\tt H=} horn gap,
- {\tt P=} protective gap,
- {\tt s=} sphere gap,
- {\tt F=} film element,
- {\tt M=} multigap.
- {\sl Modifiers in arg2:}
- {\tt R=} right orientation,
- {\tt L=} left orientation,
+ {\sl ht}[:arrowhead wid],
+ {\sl attributes} )}%
+ {cct}%
+{ Arg2 {\sl chars:}\\
+ {\tt G=} spark gap (default)\\
+ {\tt g=} general (dots)\\
+ {\tt E=} gas discharge\\
+ {\tt S=} box enclosure\\
+ {\tt C=} carbon block\\
+ {\tt A=} electrolytic cell\\
+ {\tt H=} horn gap\\
+ {\tt P=} protective gap\\
+ {\tt s=} sphere gap\\
+ {\tt F=} film element\\
+ {\tt M=} multigap\\
+ {\sl Modifiers in arg2:}\\
+ {\tt R=} right orientation\\
+ {\tt L=} left orientation\\
{\tt D=} 3-terminal element for {\tt S, E}
- only, with terminals {\sl A, B, G}
- \seesect{Twoterminal:}}
-\macrodef{arrowline}{arrowline}{(\linespec)}
- {cct}
+ only, with terminals {\sl A, B, G}\\
+ Arg5 applies to options C, E, S
+ \seesect{Twoterminal:}}%
+\macrodef{arrowline}{arrowline}{(\linespec)}%
+ {cct}%
{line (dotted, dashed permissible) with centred arrowhead
- \seesect{Twoterminal:}}
-\macrodef{assign3}{assign3}{({\sl var name,var name,var name,arg4,arg5,arg6})}
- {gen}
- {Assigns \$1 = arg4 if \$1 is nonblank; similarly \$2 = arg5 and \$3 = arg6}
-\macrodef{AutoGate}{AutoGate}{}
- {log}
+ \seesect{Twoterminal:}}%
+\macrodef{assign3}{assign3}{({\sl var name,var name,var name,arg4,arg5,arg6})}%
+ {gen}%
+ {Assigns \$1 = arg4 if \$1 is nonblank; similarly \$2 = arg5 and \$3 = arg6}%
+\macrodef{AutoGate}{AutoGate}{}%
+ {log}%
{Draw the tree for a gate as in the {\tt Autologix} macro. No inputs
or external connections are drawn. The names of the internal gate
- inputs are stacked in {\tt `AutoInNames'}}
+ inputs are stacked in {\tt `AutoInNames'}}%
\macrodef{Autologix}{Autologix}%
{({\sl Boolean function sequence},%
- [N[oconnect]][L[eftinputs]][R][V][M][;offset={\sl value}])}
- {log}
+ [N[oconnect]][L[eftinputs]][R][V][M][;offset={\sl value}])}%
+ {log}%
{Draw the Boolean expressions defined in function notation.
The first argument is a semicolon (;)-separated sequence of
Boolean function specifications using the functions
- {\tt And, Or, Not, Buffer, Xor, Nand, Nor, Nxor}
+ {\tt And, Or, Not, Buffer, Xor, Nand, Nor, Nxor}%
with variables, e.g.,
{\tt Autologix(And(Or(x1,~x2),Or(~x1,x2)));}.
Each function specification is of the form
@@ -212,7 +249,7 @@
{\tt@}{\sl attributes} to a function can be used to place it.
\par
The function arguments are variable names or nested Boolean functions.
- Each unique variable {\sl var} causes an input point {\tt In}{\sl var}
+ Each unique variable {\sl var} causes an input point {\tt In}{\sl var}%
to be defined. Preceding the variable by a {\tt \~{}} causes a NOT gate
to be drawn at the input.
The inputs are drawn in a row at the upper left by default.
@@ -227,171 +264,199 @@
Each variable {\sl var} corresponds also to one of the input array
points with label {\tt In}{\sl var}.
Setting {\tt offset=}{\sl value} displaces the
- drawn input list in order to disambiguate the input connections when {\tt L}
+ drawn input list in order to disambiguate the input connections when {\tt L}%
is used.
\par
In the (possibly rare) case where one or more inputs of a normal function
gate is to have a NOT-circle, an additional first argument of the function
- is inserted, of the form {\tt [{\sl charseq}]}, where {\sl charseq}
+ is inserted, of the form {\tt [{\sl charseq}]}, where {\sl charseq}%
is a string containing the characters {\tt P} for a normal input or
{\tt N} for a negated input, the length of the string equal to the number
of gate inputs. For example:
- {\tt Autologix(Xor([PN],And(x,y),And(x,y)),LRV)}}
+ {\tt Autologix(Xor([PN],And(x,y),And(x,y)),LRV)}}%
\Letter{B}%
-\macrodef{basename\_}{basename_}{({\sl string sequence, separator})}
- {gen}
+\macrodef{basename\_}{basename_}{({\sl string sequence, separator})}%
+ {gen}%
{Extract the rightmost name from a sequence of names separated by arg2
- (default dot ``.'')}
-\macrodef{battery}{battery}{(\linespec,{\sl n},R)}
- {cct}
+ (default dot ``.'')}%
+\macrodef{battery}{battery}{(\linespec,{\sl n},R)}%
+ {cct}%
{n-cell battery: default 1 cell,
- R=reversed polarity\seesect{Twoterminal:}}
-\macrodef{b\_}{b_}{}
- {gen}
- {blue color value}
+ R=reversed polarity\seesect{Twoterminal:}}%
+\macrodef{b\_}{b_}{}%
+ {gen}%
+ {blue color value}%
\macrodef{b\_current}{b_current}{({\sl label},{\sl pos},In|Out,Start|End,{\sl
- frac})}
- {cct}
+ frac})}%
+ {cct}%
{labelled branch-current arrow to {\sl frac} between branch end and body
- \seesect{Branchcurrent:}}
-\macrodef{beginshade}{beginshade}{({\sl gray value})}
- {gen}
- {begin gray shading, see {\tt shade}
- e.g., {\tt beginshade(.5);} {\sl closed line specs}; {\tt endshade}}
-\macrodef{bell}{bell}{( U|D|L|R|{\sl degrees}, {\sl size})}
- {cct}
+ \seesect{Branchcurrent:}}%
+\macrodef{beginshade}{beginshade}{({\sl gray value})}%
+ {gen}%
+ {begin gray shading, see {\tt shade}%
+ e.g., {\tt beginshade(.5);} {\sl closed line specs}; {\tt endshade}}%
+\macrodef{bell}{bell}{( U|D|L|R|{\sl degrees}, {\sl size})}%
+ {cct}%
{bell, {\sl In1} to {\sl In3} defined
- \seesect{Composite:}}
-\macrodef{below\_}{below_}{}
- {gen}
- {string position relative to current direction}
-\macrodef{Between\_}{Between_}{({\sl Pos1, Pos2,distance,}[R])}
- {gen}
+ \seesect{Composite:}}%
+\macrodef{below\_}{below_}{}%
+ {gen}%
+ {string position relative to current direction}%
+\macrodef{Between\_}{Between_}{({\sl Pos1, Pos2,distance,}[R])}%
+ {gen}%
{Position {\sl distance} from {\sl Pos1} toward {\sl Pos2}. If
- the fourth arg is {\tt R} then from {\sl Pos2} toward {\sl Pos1}.}
-\macrodef{binary\_}{binary_}{($n$, [$m$])}
- {gen}
+ the fourth arg is {\tt R} then from {\sl Pos2} toward {\sl Pos1}.}%
+\macrodef{binary\_}{binary_}{($n$, [$m$])}%
+ {gen}%
{binary representation of $n,$ left padded to $m$ digits if the second
- argument is nonblank}
-\macrodef{bi\_trans}{bi_trans}{(\linespec,L|R,{\sl chars},E)}
- {cct}
- { bipolar transistor, core left or right; chars:
- {\tt BU}=bulk line,
- {\tt B}=base line and label,
- {\tt S}=Schottky base hooks,
- {\tt uEn|dEn}=emitters E0 to En,
- {\tt uE|dE}=single emitter,
- {\tt Cn|uCn|dCn}=collectors C0 to Cn; {\tt u} or {\tt d} add an arrow,
- {\tt C}=single collector; {\tt u} or {\tt d} add an arrow,
- {\tt G}=gate line and location,
- {\tt H}=gate line; {\tt L}=L-gate line and location,
- {\tt [d]D}=named parallel diode,
- {\tt d}=dotted connection,
- {\tt [u]T}=thyristor trigger line;
- arg 4 = E: envelope
- \seesect{Semiconductors:}}
-\macrodef{bi\_tr}{bi_tr}{(\linespec,L|R,P,E)}
- {cct}
+ argument is nonblank}%
+\macrodef{bisect}{bisect}{%
+ ({\sl function name, left bound, right bound, tolerance, variable}))}%
+ {dpictools}%
+ {$\;\;$ Solve $\hbox{\sl function}(x) = 0$ by the method of
+ bisection.
+ Like {\tt findroot} but uses recursion and is without a {\tt[]} box.
+ The calculated value is assigned to the variable named in the
+ last argument (\SR{Libraries:}). Example:\\
+ {\tt define parabola \{ \$2 = (\$1)\char94{}2 - 1 \};\\
+ bisect( parabola, 0, 2, 1e-8, x )}. }%
+\macrodef{bi\_trans}{bi_trans}{(\linespec,L|R,{\sl chars},E)}%
+ {cct}%
+ { bipolar transistor, core left or right; chars:\\
+ {\tt BU}: bulk line\\
+ {\tt B}: base line and label\\
+ {\tt S}: Schottky base hooks\\
+ {\tt uEn|dEn}: emitters E0 to En\\
+ {\tt uE|dE}: single emitter\\
+ {\tt Cn|uCn|dCn}: collectors C0 to Cn; {\tt u} or {\tt d} add an arrow\\
+ {\tt C}: single collector; {\tt u} or {\tt d} add an arrow\\
+ {\tt G}: gate line and location\\
+ {\tt H}: gate line;\\
+ {\tt L}: L-gate line and location\\
+ {\tt [d]D}: named parallel diode\\
+ {\tt d}: dotted connection\\
+ {\tt [u]T}: thyristor trigger line\\
+ arg 4 = {\tt E}: envelope
+ \seesect{Semiconductors:}}%
+\macrodef{bi\_tr}{bi_tr}{(\linespec,L|R,P,E)}%
+ {cct}%
{left or right, N- or P-type bipolar transistor, without or with envelope
- \seesect{Semiconductors:}}
+ \seesect{Semiconductors:}}%
\macrodef{boxcoord}{boxcoord}{({\sl planar obj},{\sl x fraction},{\sl y
- fraction})}
- {gen}
- {internal point in a planar object}
-\macrodef{boxdim}{boxdim}{({\sl name},h|w|d|v,{\sl default})}
- {gen}
- {evaluate, e.g.\ {\sl name}{\tt \_w} if defined, else {\sl default\/}
+ fraction})}%
+ {gen}%
+ {internal point in a planar object}%
+\macrodef{boxdim}{boxdim}{({\sl name},h|w|d|v,{\sl default})}%
+ {gen}%
+ {evaluate, e.g.\ {\sl name}{\tt \_w} if defined, else {\sl default\/}%
if given, else 0 {\tt v} gives sum of {\tt d} and {\tt h} values
- \seesect{Interaction:}}
-\macrodef{BOX\_gate}{BOX_gate}{({\sl inputs,output,swid,sht,label})}
- {log}
+ \seesect{Interaction:}}%
+\macrodef{BOX\_gate}{BOX_gate}{({\sl inputs, output, swid, sht, label,
+ attributes })}%
+ {log}%
{output=[{\tt P|N}], inputs=[{\tt P|N}]$\ldots$, sizes swid and sht
in {\tt L\_unit}s (default {\tt AND\_wd} = 7)
- \seesect{Logicgates:}}
-\macrodef{bp\_\_}{bp__}{}
- {gen}
- {big-point-size factor, in scaled inches, ({\tt *scale/72})}
-\macrodef{bswitch}{bswitch}{(\linespec, [L|R],chars)}
- {cct}
+ \seesect{Logicgates:}}%
+\macrodef{bp\_\_}{bp__}{}%
+ {gen}%
+ {big-point-size factor, in scaled inches, ({\tt *scale/72})}%
+\macrodef{bswitch}{bswitch}{(\linespec, [L|R],chars)}%
+ {cct}%
{pushbutton switch R=right orientation (default L=left);
- chars: O= normally open, C=normally closed }
+ chars: O= normally open, C=normally closed }%
\macrodef{BUFFER\_gate}{BUFFER_gate}{(\linespec, [N|B],
- {\sl wid, ht,} [N|P]\char42, [N|P]\char42, [N|P]\char42)}
- {log}
- {basic buffer, dfault 1 input or as a 2-terminal element,
- arg2: {\tt N}=negated input, {\tt B}=box gate; arg 5:
- normal ({\tt P}) or negated {\tt N}) inputs labeled In1
- \seesect{Logicgates:}}
-\macrodef{BUFFER\_gen}{BUFFER_gen}{({\sl chars,wd,ht},[N|P]*,[N|P]*,[N|P]*)}
- {log}
- {general buffer, {\sl chars:} {\tt T}=triangle,
- {\tt [N]O}=output location {\tt Out}
- ({\tt NO} draws circle {\tt N\_Out});
- {\tt [N]I, [N]N, [N]S, [N]NE, [N]SE}
- input locations; {\tt C}=centre location.
+ {\sl wid, ht,} [N|P]\char42, [N|P]\char42, [N|P]\char42,
+ {\sl attributes})}%
+ {log}%
+ {basic buffer, dfault 1 input or as a 2-terminal element,\\
+ arg2: {\tt N}: negated input, {\tt B}: box gate;\\
+ arg 5: normal ({\tt P}) or negated {\tt N}) inputs labeled In1
+ \seesect{Logicgates:}}%
+\macrodef{BUFFER\_gen}{BUFFER_gen}{({\sl chars,wd,ht},[N|P]*,[N|P]*,[N|P]*,
+ {\sl attributes})}%
+ {log}%
+ {general buffer, {\sl chars:}\\
+ {\tt T}: triangle,\\
+ {\tt [N]O}: output location {\tt Out}%
+ ({\tt NO} draws circle {\tt N\_Out});\\
+ {\tt [N]I, [N]N, [N]S, [N]NE, [N]SE} input locations;\\
+ {\tt C}: centre location.\\
Args 4-6 allow alternative
- definitions of respective {\tt In, NE,}
- and {\tt SE} argument sequences }
-\macrodef{BUF\_ht}{BUF_ht}{}
- {log}
- {basic buffer gate height in {\tt L\_unit}s}
-\macrodef{BUF\_wd}{BUF_wd}{}
- {log}
- {basic buffer gate width in {\tt L\_unit}s}
-\macrodef{buzzer}{buzzer}{( U|D|L|R|{\sl degrees, size,}[C])}
- {cct}
+ definitions of respective {\tt In, NE,}%
+ and {\tt SE} argument sequences }%
+\macrodef{BUF\_ht}{BUF_ht}{}%
+ {log}%
+ {basic buffer gate height in {\tt L\_unit}s}%
+\macrodef{BUF\_wd}{BUF_wd}{}%
+ {log}%
+ {basic buffer gate width in {\tt L\_unit}s}%
+\macrodef{buzzer}{buzzer}{( U|D|L|R|{\sl degrees, size,}[C])}%
+ {cct}%
{buzzer, {\sl In1} to {\sl In3} defined, C=curved
- \seesect{Composite:}}
+ \seesect{Composite:}}%
\Letter{C}%
+\macrodef{cangle}{cangle}{({\sl Start, End},[d])}%
+ {gen}%
+ {Angle in radians of the sector at arg2 with arm ends given
+ by arg1 and arg3 (degrees if arg4=d).}%
\macrodef{capacitor}{capacitor}{(\linespec,{\sl chars},R,
- {\sl height}, {\sl wid})}
- {cct}
- {capacitor, {\sl chars}:
- F or blank=flat plate;
- dF flat plate with hatched fill;
- C=curved-plate;
- dC=curved-plate with variability arrowhead;
- CP=constant phase element;
- E=polarized boxed plates;
- K=filled boxed plates;
- M=unfilled boxes;
- M=one rectangular plate;
- P=alternate polarized;
- + adds a polarity sign;
- +L polarity sign to the left of drawing direction;
- arg3: R=reversed polarity;
- arg4 = height (defaults F: {\tt dimen\_}$/3$,
- C,P: {\tt dimen\_}$/4$, E,K: {\tt dimen\_}$/5$);
- arg5 = wid (defaults F: {\sl height}*0.3,
- C,P: {\sl height}*0.4, CP: {\sl height}*0.8, E,K: {\sl height})
- \seesect{Twoterminal:}}
-\macrodef{cbreaker}{cbreaker}{(\linespec, L|R, D|Th|TS, body name)}
- {cct}
- {circuit breaker to left or right, {\tt D}=with dots; {\tt Th}=thermal;
- {\tt TS}=squared thermal; default body bounding box name is
- {\sl Br}\seesect{Twoterminal:}}
-\macrodef{ccoax}{ccoax}{(at {\sl location}, M|F, {\sl diameter})}
- {cct}
- {coax connector, {\tt M}=male, {\tt F}=female
- \seesect{Composite:}}
-\macrodef{cct\_init}{cct_init}{}
- {cct}
- {initialize circuit-diagram environment (reads {\tt libcct.m4})}
+ {\sl height}, {\sl wid})}%
+ {cct}%
+ {capacitor, {\sl chars}:\\
+ {\tt F} or blank: flat plate\\
+ {\tt dF} flat plate with hatched fill\\
+ {\tt C} curved-plate\\
+ {\tt dC} curved-plate with variability arrowhead\\
+ {\tt CP} constant phase element\\
+ {\tt E} polarized boxed plates\\
+ {\tt K} filled boxed plates\\
+ {\tt M} unfilled boxes\\
+ {\tt N} one rectangular plate\\
+ {\tt P} alternate polarized\\
+ {\tt +} adds a polarity sign\\
+ {\tt +L} polarity sign to the left of drawing direction\\
+ arg3: {\tt R=}reversed polarity\\
+ arg4: height (defaults {\tt F:} {\tt dimen\_}$/3$,
+ {\tt C,P:} {\tt dimen\_}$/4$,
+ {\tt E,K:} {\tt dimen\_}$/5$)\\
+ arg5: wid (defaults {\tt F:} {\sl height}*0.3,
+ {\tt C,P:} {\sl height}*0.4,
+ {\tt CP:} {\sl height}*0.8,
+ {\tt E,K:} {\sl height})
+ \seesect{Twoterminal:}}%
+\macrodef{case}{case}{({\sl i, alt1, alt2, \ldots})}%
+ {dpictools}%
+ {$\;\;$ Case statement for dpic; execute alternative {\sl i.}%
+ Example: {\tt case( 2, x=5, x=10, x=15 )} sets {\tt x} to 10.
+ Note: this is a macro so {\tt \${}n} refers to the {\sl n}-th
+ argument of {\tt case}.}%
+\macrodef{cbreaker}{cbreaker}{(\linespec, L|R, D|Th|TS, body name)}%
+ {cct}%
+ {circuit breaker to left or right, {\tt D}: with dots; {\tt Th}: thermal;
+ {\tt TS}: squared thermal; default body bounding box name is
+ {\sl Br}\seesect{Twoterminal:}}%
+\macrodef{ccoax}{ccoax}{(at {\sl location}, M|F, {\sl diameter, attributes})}%
+ {cct}%
+ {coax connector, {\tt M}: male, {\tt F}: female
+ \seesect{Composite:}}%
+\macrodef{cct\_init}{cct_init}{}%
+ {cct}%
+ {initialize circuit-diagram environment (reads {\tt libcct.m4})}%
\macrodef{centerline\_}{centerline_}{({\sl linespec, thickness{\tt|}color,
- minimum long dash len, short dash len, gap len}}
- {gen}
- {Technical drawing centerline}
-\macrodef{c\_fet}{c_fet}{(\linespec,R,P)}
- {cct}
- {left or right, plain or negated pin simplified MOSFET}
-\macrodef{Cintersect}{Cintersect}{({\sl Pos1, Pos2, rad1, rad2,} [R])}
- {gen}
+ minimum long dash len, short dash len, gap len}}%
+ {gen}%
+ {Technical drawing centerline}%
+\macrodef{c\_fet}{c_fet}{(\linespec,R,P)}%
+ {cct}%
+ {left or right, plain or negated pin simplified MOSFET}%
+\macrodef{Cintersect}{Cintersect}{({\sl Pos1, Pos2, rad1, rad2,} [R])}%
+ {gen}%
{Upper (lower if arg5={\tt R}) intersection of circles at
- {\sl Pos1} and {\sl Pos2}, radius {\sl rad1} and {\sl rad2}}
+ {\sl Pos1} and {\sl Pos2}, radius {\sl rad1} and {\sl rad2}}%
\macrodef{clabel}{clabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],%
- [{\sl block name}])}
- {cct}
+ [{\sl block name}])}%
+ {cct}%
{Triple label along the drawing axis of the body of an element in the
current direction \seesect{Labels:}. Labels are placed at the
beginning, centre, and end of the last {\tt []} block (or a named
@@ -400,43 +465,67 @@
{\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt
right} to supplement the default relative position. The fifth
argument is the optional name of the {\tt []} block to be labelled,
- which is {\tt last []} by default.}
-\macrodef{cm\_\_}{cm__}{}
- {gen}
- {absolute centimetres}
-\macrodef{consource}{consource}{(\linespec,V|I|v|i,R)}
- {cct}
+ which is {\tt last []} by default.}%
+\macrodef{cm\_\_}{cm__}{}%
+ {gen}%
+ {absolute centimetres}%
+\macrodef{cmyktorgb}{cmyktorgb}{({\sl c, m, y, k, r, g, b})}%
+ {dpictools}%
+ {$\;\;$ cmyk values in percent, i.e., 0 to 100, to rgb.}%
+\macrodef{consource}{consource}{(\linespec,V|I|v|i,R,{\sl attributes})}%
+ {cct}%
{voltage or current controlled source with alternate forms;
- {\tt R}=reversed polarity\seesect{Twoterminal:}}
-\macrodef{contact}{contact}{({\sl chars})}
- {cct}
+ {\tt R}: reversed polarity\seesect{Twoterminal:}}%
+\macrodef{ColoredV}{ColoredV}{%
+ (box|circle|ellipse,({\sl r,g,b})|(({\sl colorseq})),{\sl attributes})}%
+ {gen}%
+ {box (default), circle, or ellipse in a {\tt []} block.
+ If arg2 is blank then all formatting is in arg3. If arg2 is blank
+ then all formatting is in arg3; if parenthesized r,g,b, the object
+ is shaded top to bottom white to the specified rgb color; if a
+ double-parenthesized colorseq then the colorseq defines the internal
+ shading top to bottom. A {\sl colorseq} is of the form
+ 0, r0,g0,b0, {\sl frac1},r1,g1,b1, {\sl frac2},r2,g2,b2,
+ \ldots 1,rn,gn,bn with $0 < \hbox{\sl frac1} < \hbox{\sl frac2} \ldots 1$.
+ Examples: {\tt ColoredV(circle,(1,0,0));
+ ColoredV(ellipse,(1,0.04,1),wid 0.75 ht 1 outlined "magenta" "Goodbye");
+ ColoredV(box,(1,0,0),outlined "blue" rad 0.1, (0,1,1,0, 1,0,0,1)).} }%
+\macrodef{contact}{contact}{({\sl chars})}%
+ {cct}%
{single-pole contact:
- {\tt O}= normally open,
- {\tt C}= normally closed (default),
- {\tt I}= open circle contacts,
- {\tt P}= three position,
- {\tt R}= right orientation,
- {\tt T}= T contacts,
- {\tt U}= U contacts
- \seesect{Composite:}}
-\macrodef{contacts}{contacts}{({\sl count, chars})}
- {cct}
+ {\tt O}: normally open\\
+ {\tt C}: normally closed (default)\\
+ {\tt I}: open circle contacts\\
+ {\tt P}: three position\\
+ {\tt R}: right orientation\\
+ {\tt T}: T contacts\\
+ {\tt U}: U contacts
+ \seesect{Composite:}}%
+\macrodef{contacts}{contacts}{({\sl count, chars})}%
+ {cct}%
{multiple ganged single-pole contacts:
- {\tt P}= three position,
- {\tt O}= normally open,
- {\tt C}= normally closed,
- {\tt D}= dashed ganging line over contact armatures
- {\tt I}= open circle contacts,
- {\tt R}= right orientation,
- {\tt T}= T contacts,
- {\tt U}= U contact lines parallel to drawing direction
- \seesect{Composite:}}
-\macrodef{contline}{contline}{({\sl line})}
- {gen}
- {evaluates to {\tt continue}
- if processor is {\bf dpic}, otherwise to first arg (default {\tt line})}
-\macrodef{corner}{corner}{({\sl line thickness,attributes,turn radians})}
- {gen}
+ {\tt P}: three position\\
+ {\tt O}: normally open\\
+ {\tt C}: normally closed\\
+ {\tt D}: dashed ganging line over contact armatures
+ {\tt I}: open circle contacts\\
+ {\tt R}: right orientation\\
+ {\tt T}: T contacts\\
+ {\tt U}: U contact lines parallel to drawing direction
+ \seesect{Composite:}}%
+\macrodef{contline}{contline}{({\sl line})}%
+ {gen}%
+ {evaluates to {\tt continue}%
+ if processor is {\bf dpic}, otherwise to first arg (default {\tt line})}%
+\macrodef{copy3}{copy3}{({\sl vector1,vector2})}%
+ {dpictools}%
+ {$\;\;$ Copy vector1 into vector named by arg2.}%
+\macrodef{copythru}{copythru}{({\sl dpic macro name,} "{\sl file name}")}%
+ {dpictools}%
+ {$\;\;$ Implements the gpic {\tt copy {\sl filename} thru {\sl macro-name}}%
+ for file data separated by commas, spaces, or tabs.}%
+\macrodef{corner}{corner}{({\sl line thickness,attributes,turn radians})}%
+ {gen}%
{ Mitre (default filled square) drawn at end of last line or at a
given position.
arg1 default: current line thickness;
@@ -445,354 +534,445 @@
is drawn;
arg3= radians (turn angle, +ve is ccw, default $\pi/2$).
The corner is enclosed in braces
- in order to leave {\tt Here} unchanged unless arg2 begins with {\tt at}
- \seesect{Corners:}}
-\macrodef{Cos}{Cos}{({\sl integer})}
- {gen}
- {cosine function, {\sl integer\/} degrees}
-\macrodef{cosd}{cosd}{({\sl arg})}
- {gen}
- {cosine of an expression in degrees}
+ in order to leave {\tt Here} unchanged unless arg2 begins with {\tt at}%
+ \seesect{Corners:}}%
+\macrodef{Cos}{Cos}{({\sl integer})}%
+ {gen}%
+ {cosine function, {\sl integer\/} degrees}%
+\macrodef{cosd}{cosd}{({\sl arg})}%
+ {gen}%
+ {cosine of an expression in degrees}%
\macrodef{Cosine}{Cosine}{( {\sl amplitude}, {\sl freq}, {\sl time},
- {\sl phase} )}
- {gen}
- {function $a\times\cos(\omega t + \phi)$ }
-\macrodef{cross3D}{cross3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D}
- {cross product of two triples}
-\macrodef{cross}{cross}{(at {\sl location, size}|{\sl keys})}
- {gen}
+ {\sl phase} )}%
+ {gen}%
+ {function $a\times\cos(\omega t + \phi)$ }%
+\macrodef{cross3}{cross3}{({\sl vec1, vec2, vec3})}%
+ {dpictools}%
+ {$\;\;$ The 3-vector cross product
+ $\hbox{\sl vec3} = \hbox{\sl vec1} \times \hbox{\sl vec2}$.}%
+\macrodef{cross3D}{cross3D}{({\sl x1,y1,z1,x2,y2,z2})}%
+ {3D}%
+ {cross product of two triples}%
+\macrodef{cross}{cross}{(at {\sl location, size}|{\sl keys})}%
+ {gen}%
{Plots a small cross. The possible key-value pairs are:
{\tt size={\sl expr};},
- {\tt line={\sl attributes};} }
+ {\tt line={\sl attributes};} }%
\macrodef{crossover}{crossover}{(\linespec, [L|R][:{\sl line attributes}],
- Line1, Line2, .{.}.)}
- {cct}
- {line jumping left or right over ordered named lines\seesect{Semiconductors:}}
-\macrodef{crosswd\_}{crosswd_}{}
- {gen}
- {cross dimension}
-\macrodef{csdim\_}{csdim_}{}
- {cct}
- {controlled-source width}
+ Line1, Line2, .{.}.)}%
+ {cct}%
+ {line jumping left or right over ordered named lines\seesect{Semiconductors:}}%
+\macrodef{crosswd\_}{crosswd_}{}%
+ {gen}%
+ {cross dimension}%
+\macrodef{csdim\_}{csdim_}{}%
+ {cct}%
+ {controlled-source width}%
\Letter{D}%
-\macrodef{dabove}{dabove}{(at {\sl location})}
- {darrow}
- {above (displaced dlinewid/2)}
-\macrodef{dac}{dac}{({\sl width,height,nIn,nN,nOut,nS})}
- {cct}
+\macrodef{dabove}{dabove}{(at {\sl location})}%
+ {darrow}%
+ {above (displaced dlinewid/2)}%
+\macrodef{dac}{dac}{({\sl width,height,nIn,nN,nOut,nS})}%
+ {cct}%
{DAC with defined width, height, and number of inputs {\tt In$i$},
top terminals {\tt N$i$}, ouputs {\tt Out$i$},
- and bottom terminals~{\tt S$i$} \seesect{Logicgates:}}
+ and bottom terminals~{\tt S$i$} \seesect{Logicgates:}}%
\macrodef{Darc}{Darc}{({\sl center position},
{\sl radius}, {\sl start radians}, {\sl end radians},
- {\sl parameters})}
- {darrow}
+ {\sl parameters})}%
+ {darrow}%
{Wrapper for {\tt darc}.
CCW arc in {\tt dline} style, with closed ends or (dpic only) arrowheads.
Semicolon-separated {\sl parameters}:
- {\tt thick=}{\sl value}, {\tt wid=}{\sl value}, {\tt ends=}
+ {\tt thick=}{\sl value}, {\tt wid=}{\sl value}, {\tt ends=}%
{\sl x}{\tt -},
{\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->},
- {\tt <-}, {\tt <-}{\sl x}, {\tt <->}
- where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.}
+ {\tt <-}, {\tt <-}{\sl x}, {\tt <->}%
+ where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.}%
\macrodef{darc}{darc}{({\sl center position},
{\sl radius}, {\sl start radians}, {\sl end radians}, {\sl dline thickness},
{\sl arrowhead wid}, {\sl arrowhead ht},
- {\sl end symbols}, {\sl outline attributes}, {\sl inner attributes})}
- {darrow}
+ {\sl end symbols}, {\sl outline attributes}, {\sl inner attributes})}%
+ {darrow}%
{See also {\tt Darc}.
CCW arc in {\tt dline} style, with closed ends or (dpic only) arrowheads.
Permissible {\sl end symbols}:
{\sl x}{\tt -},
{\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->},
- {\tt <-}, {\tt <-}{\sl x}, {\tt <->}
+ {\tt <-}, {\tt <-}{\sl x}, {\tt <->}%
where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.
An inner arc is drawn overlaying the outer arc.
- Example: {\tt darc(,{,},{,},{,},{,}outlined "red",outlined "yellow")}.}
-\macrodef{Darlington}{Darlington}{(L|R,{\sl chars})}
- {cct}
+ Example: {\tt darc(,{,},{,},{,},{,}outlined "red",outlined "yellow")}.}%
+\macrodef{Darlington}{Darlington}{(L|R,{\sl chars})}%
+ {cct}%
{Composite Darlington pair Q1 and Q2 with internal locations E, B, C;
- Characters in {\sl arg2:}
- E= envelope,
- P= P-type,
- B1= internal base lead,
- D= damper diode,
- R1= Q1 bias resistor; E1= ebox,
- R2= Q2 bias resistor; E1= ebox,
+ Characters in {\sl arg2:}\\
+ E= envelope\\
+ P= P-type\\
+ B1= internal base lead\\
+ D= damper diode\\
+ R1= Q1 bias resistor; E1= ebox\\
+ R2= Q2 bias resistor; E1= ebox\\
Z= zener bias diode
- \seesect{Semiconductors:}}
+ \seesect{Semiconductors:}}%
\macrodef{darrow}{darrow}{(\linespec,
t,t,{\sl width},{\sl arrowhd wd},{\sl arrowhd ht},{\sl parameters},
- {\sl color attributes})}
- {darrow}
+ {\sl color attributes})}%
+ {darrow}%
{See also {\tt Darrow}.
Double arrow, truncated at beginning (arg2={\tt t}) or
end (arg3={\tt t}), specified sizes,
with arrowhead and optional closed stem. The parameters (arg7) are
- {\tt {\sl x}-} or {\tt ->} or {\tt {\sl x}->} or {\tt <-} or {\tt <-{\sl x}}
+ {\tt {\sl x}-} or {\tt ->} or {\tt {\sl x}->} or {\tt <-} or {\tt <-{\sl x}}%
or {\tt <->} where {\sl x} is {\tt |} or {\tt !}.
The {\tt !-} or {\tt -!} parameters close
the stem with half-thickness lines to simplify butting to other objects.
The color attributes are, e.g.,
{\tt outlined "{\sl color}" shaded "{\sl color}"}.
Example:
- {\tt linethick=5; darrow(down\_\ 2,{,},0.5,0.75,0.75,|,outlined "red")}. }
-\macrodef{Darrow}{Darrow}{(\linespec, {\sl parameters})}
- {darrow}
+ {\tt linethick=5; darrow(down\_\ 2,{,},0.5,0.75,0.75,|,outlined "red")}. }%
+\macrodef{Darrow}{Darrow}{(\linespec, {\sl parameters})}%
+ {darrow}%
{Wrapper for {\tt darrow}.
- Semicolon-separated {\sl parameters}:
- {\tt S;}, {\tt E;} truncate at start or end by dline thickness/2;
- {\tt thick=}{\sl val}; (total thicknes, ie width);
- {\tt wid=}{\sl val}; (arrowhead width);
- {\tt ht=}{\sl val}; (arrowhead height);
- {\tt ends=}
+ Semicolon-separated {\sl parameters}:\\
+ {\tt S;}, {\tt E;} truncate at start or end by dline thickness/2\\
+ {\tt thick=}{\sl val}; (total thicknes, ie width)\\
+ {\tt wid=}{\sl val}; (arrowhead width)\\
+ {\tt ht=}{\sl val}; (arrowhead height)\\
+ {\tt ends=}%
{\sl x}{\tt -}{\sl x} or
{\tt -}{\sl x} or
{\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line)
- or {\tt |} (full-width line).
+ or {\tt |} (full-width line).\\
Examples:
{\tt define(`dfillcolor',`1,0.85,0') linethick=5;
rgbdraw(1,0,0,Darrow(down\_\ 2,thick=0.5; wid=0.75; ht=0.75; ends=|->))},
which is equivalent to
{\tt Darrow(down\_\ 2,thick=0.5; wid=0.75; ht=0.75; \
- ends=|->; outline="red")}. }
-\macrodef{darrow\_init}{darrow_init}{}
- {darrow}
- {Initialize darrow drawing parameters (reads library file {\tt darrow.m4})}
+ ends=|->; outline="red")}. }%
+\macrodef{darrow\_init}{darrow_init}{}%
+ {darrow}%
+ {Initialize darrow drawing parameters (reads library file {\tt darrow.m4})}%
\macrodef{dashline}{dashline}{(\linespec,{\sl thickness}|{\sl color}|<->,
- {\sl dash len, gap len},G)}
- {gen}
- {dashed line with dash at end ({\tt G} ends with gap)}
-\macrodef{dbelow}{dbelow}{(at {\sl location})}
- {darrow}
- {below (displaced dlinewid/2)}
-\macrodef{dcosine3D}{dcosine3D}{({\sl i,x,y,z})}
- {3D}
- {extract i-th entry of triple x,y,z}
-\macrodef{DCsymbol}{DCsymbol}{(at {\sl position, len, ht,}
- U|D|L|R|{\sl degrees}) }
- {cct}
+ {\sl dash len, gap len},G)}%
+ {gen}%
+ {dashed line with dash at end ({\tt G} ends with gap)}%
+\macrodef{dbelow}{dbelow}{(at {\sl location})}%
+ {darrow}%
+ {below (displaced dlinewid/2)}%
+\macrodef{dcosine3D}{dcosine3D}{({\sl i,x,y,z})}%
+ {3D}%
+ {extract i-th entry of triple x,y,z}%
+\macrodef{DCsymbol}{DCsymbol}{(at {\sl position, len, ht,}%
+ U|D|L|R|{\sl degrees}) }%
+ {cct}%
{A DC symbol (a dashed line below a solid line).
The current drawing direction is default, otherwise Up, Down,
Left, Right, or at {\sl degrees} slant; e.g.,
- {\tt source(up\_ dimen\_); $\lbrace$ DCsymbol(at last [],{},{},R) $\rbrace$}
- \seesect{Twoterminal:} }
-\macrodef{delay}{delay}{(\linespec,{\sl size})}
- {cct}
- {delay element\seesect{Twoterminal:}}
-\macrodef{delay\_rad\_}{delay_rad_}{}
- {cct}
- {delay radius}
-\macrodef{deleminit\_}{deleminit_}{}
- {darrow}
- {sets drawing direction for dlines}
+ {\tt source(up\_ dimen\_); $\lbrace$ DCsymbol(at last [],{},{},R) $\rbrace$}%
+ \seesect{Twoterminal:} }%
+\macrodef{DefineCMYKColor}{DefineCMYKColor}{({\sl color-name, c, m, y, k})}%
+ {dpictools}%
+ {$\;\;$ Like {\tt DefineRGBColor} but takes arguments in percent, i.e.,
+ the range $[0,100].$ Define dpic macro {\sl colorname}%
+ according to the postprocessor specified by dpic command-line option.
+ The macro evaluates to a string.}%
+\macrodef{DefineHSVColor}{DefineHSVColor}{({\sl color-name, h, s, v})}%
+ {dpictools}%
+ {$\;\;$ Like {\tt DefineRGBColor} but takes argument {\sl h} in the
+ range $[0,360],$ {\sl s} in $[0,1],$ and {\sl v} in $[0,1].$
+ Define dpic macro {\sl colorname}%
+ according to the postprocessor specified by dpic command-line option.
+ The macro evaluates to a string.}%
+\macrodef{DefineRGBColor}{DefineRGBColor}{({\sl color-name, r, g, b})}%
+ {dpictools}%
+ {$\;\;$ Arguments are in the range 0 to 1. Define dpic macro {\sl colorname}%
+ according to the postprocessor specified by dpic command-line option.
+ The macro evaluates to a string.}%
+\macrodef{definergbcolor}{definergbcolor}{({\sl color-name, r, g, b})}%
+ {gen}%
+ {Arguments are in the range 0 to 1. Define color name
+ according to the postprocessor. Similar to dpictools {\tt DefineRGBColor}%
+ but the color name is an m4 macro, not a string.}%
+\macrodef{delay}{delay}{(\linespec,{\sl size},{\sl attributes})}%
+ {cct}%
+ {delay element\seesect{Twoterminal:}}%
+\macrodef{delay\_rad\_}{delay_rad_}{}%
+ {cct}%
+ {delay radius}%
+\macrodef{deleminit\_}{deleminit_}{}%
+ {darrow}%
+ {sets drawing direction for dlines}%
\macrodef{Deltasymbol}{Deltasymbol}{(at {\sl position},keys,
- U|D|L|R|{\sl degrees}) (default {\tt U} for up)}
- {cct}
+ U|D|L|R|{\sl degrees}) (default {\tt U} for up)}%
+ {cct}%
{Delta symbol for power-system diagrams.
- {\sl keys:} {\tt size={\sl expression;}}
+ {\sl keys:} {\tt size={\sl expression;}}%
{\tt type=C|O} (default {\tt C} for closed;
- {\tt O} draws an ``open'' symbol); }
+ {\tt O} draws an ``open'' symbol); }%
\macrodef{Demux}{Demux}{({\sl n},{\sl label},
{\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE],
- {\sl wid},{\sl ht}})}
- {log}
- {binary multiplexer, $n$ inputs,
- {\tt L} reverses input pin numbers,
- {\tt B} displays binary pin numbers,
- {\tt H} displays hexadecimal pin numbers,
- {\tt X} do not print pin numbers,
+ {\sl wid},{\sl ht},{\sl attributes}})}%
+ {log}%
+ {binary demultiplexer, $n$ inputs\\
+ {\tt L} reverses input pin numbers\\
+ {\tt B} displays binary pin numbers\\
+ {\tt H} displays hexadecimal pin numbers\\
+ {\tt X} do not print pin numbers\\
{\tt N[{\sl n}]} puts Sel or Sel$0$ .. Sel$n$ at the top
- (i.e., to the left of the drawing direction),
+ (i.e., to the left of the drawing direction)\\
{\tt S[{\sl n}]} puts the Sel inputs at the bottom (default)
{\tt OE} ({\tt N=}negated) {\tt OE} pin
- \seesect{Logicgates:}}
+ \seesect{Logicgates:}}%
\macrodef{dend}{dend}{(at {\sl location},
- {\sl line thickness}{\tt |}{\sl attributes})}
- {darrow}
- {Close (or start) double line (Note specifying {\tt dends=} for {\tt Dline}
+ {\sl line thickness}{\tt |}{\sl attributes})}%
+ {darrow}%
+ {Close (or start) double line (Note specifying {\tt dends=} for {\tt Dline}%
is a similar function. Arg2 is dline thickness or atributes:
{\tt thick={\sl expression};} (dline thickness in drawing units)
- {\tt outline=({\sl r,g,b})|"{\sl color}";}}
-\macrodef{d\_fet}{d_fet}{(\linespec,R,P,E|S)}
- {cct}
+ {\tt outline=({\sl r,g,b})|"{\sl color}";}}%
+\macrodef{d\_fet}{d_fet}{(\linespec,R,P,E|S)}%
+ {cct}%
{left or right, N or P depletion MOSFET, envelope or simplified
- \seesect{Semiconductors:}}
-\macrodef{dfillcolor}{dfillcolor}{}
- {darrow}
- {dline fill color (default white)}
-\macrodef{diff3D}{diff3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D}
- {difference of two triples}
-\macrodef{diff\_}{diff_}{({\sl a},{\sl b})}
- {gen}
- {difference function}
-\macrodef{dimen\_}{dimen_}{}
- {cct}
- {size parameter for scaling circuit element bodies \seesect{Circuitscaling:}}
+ \seesect{Semiconductors:}}%
+\macrodef{dfillcolor}{dfillcolor}{}%
+ {darrow}%
+ {dline fill color (default white)}%
+\macrodef{diff3}{diff3}{({\sl vec1, vec2, vec3})}%
+ {dpictools}%
+ {$\;\;$ The 3-vector subtraction
+ $\hbox{\sl vec3} = \hbox{\sl vec1} - \hbox{\sl vec2}$.}%
+\macrodef{dfitcurve}{dfitcurve}{({\sl Name, n, linetype, m})}%
+ {dpictools}%
+ {$\;\;$ Draw a spline through {\sl Name}{\tt [m],} \ldots {\sl Name}{\tt [n]}%
+ with attribute {\sl linetype} {\tt dotted,} for example.
+ The calculated control points {\sl P[i]} satisfy approximately:
+ {\sl P[0] = V[0];} {\sl P[i-1]/8 + P[i]*3/4 + P[i+1]/8 = V[i];}%
+ {\sl P[n] = V[n].} See m4 macro {\tt fitcurve.}}%
+\macrodef{dfitpoints}{dfitpoints}{({\sl V,n,m,P,mp})}%
+ {dpictools}%
+ {$\;\;$ Compute the control locations {\tt P[mP], P[mP+1]...} for
+ the spline passing throught points {\tt V[m]...V[n].} Used by
+ macro {\tt dfitcurve}.}%
+\macrodef{diff3D}{diff3D}{({\sl x1,y1,z1,x2,y2,z2})}%
+ {3D}%
+ {difference of two triples}%
+\macrodef{diff\_}{diff_}{({\sl a},{\sl b})}%
+ {gen}%
+ {difference function}%
+\macrodef{dimen\_}{dimen_}{}%
+ {cct}%
+ {size parameter for scaling circuit element bodies \seesect{Circuitscaling:}}%
\macrodef{dimension\_}{dimension_}{(\linespec,{\sl offset},{\sl label},
- D|H|W|{\sl blank width},{\sl tic offset},{\sl arrowhead })}
- {gen}
+ D|H|W|{\sl blank width},{\sl tic offset},{\sl arrowhead })}%
+ {gen}%
{macro for dimensioning diagrams;
- {\sl arrowhead=}{\tt -> | <-}}
+ {\sl arrowhead=}{\tt -> | <-}}%
\macrodef{diode}{diode}{(\linespec,%
B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
-[R][E])}
- {cct}
+[R][E])}%
+ {cct}%
{diode:
- {\tt B}=bi-directional,
- {\tt b}=bi-directional with outlined zener crossbar,
- {\tt CR}=current regulator,
- {\tt D}=diac,
- {\tt G}=Gunn,
- {\tt L}=open form with centre line,
- {\tt LE[R]}=LED [right],
- {\tt P[R]}=photodiode [right],
- {\tt S}=Schottky,
- {\tt Sh}=Shockley,
- {\tt T}=tunnel,
- {\tt U}=limiting,
- {\tt V}=varicap,
- {\tt v}=varicap (curved plate),
- {\tt w}=varicap (reversed polarity),
- {\tt Z}=zener;
+ {\tt B}: bi-directional\\
+ {\tt b}: bi-directional with outlined zener crossbar\\
+ {\tt CR}: current regulator\\
+ {\tt D}: diac\\
+ {\tt G}: Gunn\\
+ {\tt L}: open form with centre line\\
+ {\tt LE[R]}: LED [right]\\
+ {\tt P[R]}: photodiode [right]\\
+ {\tt S}: Schottky\\
+ {\tt Sh}: Shockley\\
+ {\tt T}: tunnel\\
+ {\tt U}: limiting\\
+ {\tt V}: varicap\\
+ {\tt v}: varicap (curved plate)\\
+ {\tt w}: varicap (reversed polarity)\\
+ {\tt Z}: zener\\
appending {\tt K} to arg 2 draws open arrowheads;
- arg 3: {\tt R}=reversed polarity, {\tt E}=enclosure \seesect{Twoterminal:}}
+ arg 3: {\tt R}: reversed polarity, {\tt E}: enclosure \seesect{Twoterminal:}}%
%\macrodef{DIP}{DIP}{({\sl pin count, attributes})}%
-% {log}
+% {log}%
% {Dual in-line package diagram. Default pin count = 8.
% Arg2 ({\sl attributes})= semicolon-separated list of optional terms:
-% {\tt bodywid=}{\sl expr} (default 0.25$\,$in${}={}$5{\tt *L\_unit}),
+% {\tt bodywid=}{\sl expr} (default 0.25$\,$in${} {}$5{\tt *L\_unit}),
% {\tt bodylen=}{\sl expr} (default {\sl pin count} $\times$ {\sl pin pitch}),
% {\tt pinpitch=}{\sl expr} (default 0.1),
% {\tt pinwid=}{\sl expr} (default 0.06),
% {\tt pinlen=}{\sl expr} (default 0.05),
% {\tt direct=U|D|L|R} (default {\tt U} for up),
% {\tt type=I|Q} (default {\tt I}; Q=pins of alternating length)
-% \seesect{Logicgates:}}
-\macrodef{dir\_}{dir_}{}
- {darrow}
- {used for temporary storage of direction by darrow macros}
-\macrodef{distance}{distance_}{({\sl Position 1}, {\sl Position2})}
- {gen}
- {distance between named positions}
-\macrodef{distance}{distance}{({\sl position}, {\sl position})}
- {gen}
- {distance between positions}
+% \seesect{Logicgates:}}%
+\macrodef{dir\_}{dir_}{}%
+ {darrow}%
+ {used for temporary storage of direction by darrow macros}%
+\macrodef{distance}{distance_}{({\sl Position 1}, {\sl Position2})}%
+ {gen}%
+ {distance between named positions}%
+\macrodef{distance}{distance}{({\sl position}, {\sl position})}%
+ {gen}%
+ {distance between positions}%
\macrodef{dlabel}{dlabel}{({\sl long},{\sl lat},{\sl label},{\sl
- label},{\sl label},{\sl chars})}
- {cct}
- {general triple label; {\sl chars:}
- $x$ (drawing direction) displacement is from the centre of the last
+ label},{\sl label},{\sl chars})}%
+ {cct}%
+ {general triple label; {\sl chars:}%
+ $X$ displacement {\tt {\sl long, lat}} with respect to the drawing
+ direction is from the centre of the last
line rather than the centre of the last {\tt [ ]};
L,R,A,B align labels ljust, rjust, above,
- or below (absolute) respectively \seesect{Labels:}}
+ or below (absolute) respectively \seesect{Labels:}}%
\macrodef{dleft}{dleft}{({\tt at} {\sl position}, {\sl line thickness},
- {\sl attributes})}
- {darrow}
+ {\sl attributes})}%
+ {darrow}%
{Double line left turn 90 degrees. Attributes can be
- {\tt outline=({\sl r, g, b})|"{\sl color}";}
- {\tt innershade=({\sl r, g, b})|"{\sl color}";}
- where rgb values in parentheses or a defined color is specified.}
-\macrodef{Dline}{Dline}{(\linespec, {\sl parameters})}
- {darrow}
+ {\tt outline=({\sl r, g, b})|"{\sl color}";}%
+ {\tt innershade=({\sl r, g, b})|"{\sl color}";}%
+ where rgb values in parentheses or a defined color is specified.}%
+\macrodef{Dline}{Dline}{(\linespec, {\sl parameters})}%
+ {darrow}%
{Wrapper for {\tt dline}.
- The semicolon-separated {\sl parameters} are:
- {\tt S;}, {\tt E;} truncate at start or end by dline thickness/2;
- {\tt thick={\sl val};} (total thicknes, ie width);
- {\tt outline={\sl color};} (e.g., {\tt "red"} or {\tt (1,0,0)}),
- {\tt innershade={\sl color};} (e.g., {\tt (0,1,1)} or {\tt "cyan"}),
- {\tt name={\sl Name};},
- {\tt ends=}
+ The semicolon-separated {\sl parameters} are:\\
+ {\tt S;}, {\tt E;} truncate at start or end by dline thickness/2;\\
+ {\tt thick={\sl val};} (total thicknes, ie width);\\
+ {\tt outline={\sl color};} (e.g., {\tt "red"} or {\tt (1,0,0)}),\\
+ {\tt innershade={\sl color};} (e.g., {\tt (0,1,1)} or {\tt "cyan"}),\\
+ {\tt name={\sl Name};},\\
+ {\tt ends=}%
{\sl x}{\tt -}{\sl x} or
{\tt -}{\sl x} or
{\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line)
- or {\tt |;} (full-width line).}
-\macrodef{dline}{dline}{(\linespec,t,t,{\sl width},{\sl parameters})}
- {darrow}
+ or {\tt |;} (full-width line).}%
+\macrodef{dline}{dline}{(\linespec,t,t,{\sl width},{\sl parameters})}%
+ {darrow}%
{See also {\tt Dline}.
Double line, truncated by half width at either end, closed
at either or both ends.
- {\sl parameters=}
+ {\sl parameters=}%
{\sl x}{\tt -}{\sl x} or
{\tt -}{\sl x} or
{\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line)
- or {\tt |} (full-width line).}
-\macrodef{dlinewid}{dlinewid}{}
- {darrow}
- {width of double lines}
-\macrodef{dljust}{dljust}{(at {\sl location})}
- {darrow}
- {ljust (displaced dlinewid/2)}
-\macrodef{dna\_}{dna_}{}
- {cct}
- {internal character sequence that specifies which subcomponents are drawn}
-\macrodef{dn\_}{dnx}{}
- {gen}
- {down with respect to current direction}
-%\macrodef{dnm\_}{dnm_}{}
-% {cct}
-% {similar to dna\_}
-\macrodef{dot3D}{dot3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D}
- {dot product of two triples}
-\macrodef{dot}{dot}{(at {\sl location},{\sl radius}|{\sl keys},{\sl fill})}
- {gen}
+ or {\tt |} (full-width line).}%
+\macrodef{dlinewid}{dlinewid}{}%
+ {darrow}%
+ {width of double lines}%
+\macrodef{dljust}{dljust}{(at {\sl location})}%
+ {darrow}%
+ {ljust (displaced dlinewid/2)}%
+\macrodef{dna\_}{dna_}{}%
+ {cct}%
+ {internal character sequence that specifies which subcomponents are drawn}%
+\macrodef{dn\_}{dnx}{}%
+ {gen}%
+ {down with respect to current direction}%
+%\macrodef{dnm\_}{dnm_}{}%
+% {cct}%
+% {similar to dna\_}%
+\macrodef{dot3}{dot3}{({\sl vec1, vec2})}%
+ {dpictools}%
+ {$\;\;$ Expands to the dot (scalar) product of the two 3-vector arguments:
+ $(\${}1[1]\cdot\${}2[1] + \${}1[2]\cdot\${}2[2] + \${}1[3]\cdot\${}2[3])$.}%
+\macrodef{dot3D}{dot3D}{({\sl x1,y1,z1,x2,y2,z2})}%
+ {3D}%
+ {dot product of two triples}%
+\macrodef{dot}{dot}{(at {\sl location},{\sl radius}|{\sl keys},{\sl fill})}%
+ {gen}%
{Filled circle (third arg= gray value: 0=black, 1=white). The possible
key-value pairs are:
{\tt rad={\sl expr};} and
- {\tt circle={\sl attributes};} }
-\macrodef{dotrad\_}{dotrad_}{}
- {gen}
- {dot radius}
-\macrodef{down\_}{down_}{}
- {gen}
- {sets current direction to down \seesect{Placing:}}
+ {\tt circle={\sl attributes};} }%
+\macrodef{dotrad\_}{dotrad_}{}%
+ {gen}%
+ {dot radius}%
+\macrodef{down\_}{down_}{}%
+ {gen}%
+ {sets current direction to down \seesect{Placing:}}%
+\macrodef{dpquicksort}{dpquicksort}{({\sl array name, lo, hi, ix})}%
+ {dpictools}%
+ {$\;\;$ Given array {\sl a[lo:hi]} and index array {\sl ix[lo:hi] =
+ lo, lo+1, lo+2,\ldots hi}, sort {\sl a[lo:hi]} and do identical exchanges
+ on {\sl ix}.}%
+\macrodef{dprot}{dprot}{({\sl radians, x, y})}%
+ {dpictools}%
+ {$\;\;$ Evaluates to a rotated pair (see m4 {\tt rot\_}).}%
+\macrodef{dprtext}{dprtext}{({\sl degrees, text})}%
+ {dpictools}%
+ {$\;\;$ Rotated PStricks or pgf text in a {\tt []} box.}%
\macrodef{dright}{dright}{({\tt at} {\sl position}, {\sl line thickness},
- {\sl attributes})}
- {darrow}
+ {\sl attributes})}%
+ {darrow}%
{Double line right turn 90 degrees. Attributes can be
- {\tt outline=({\sl r, g, b})|"{\sl color}";}
- {\tt innershade=({\sl r, g, b})|"{\sl color}";}
- where rgb values in parentheses or a defined color is specified.}
-\macrodef{drjust}{drjust}{(at {\sl location})}
- {darrow}
- {rjust (displaced dlinewid/2)}
-\macrodef{dswitch}{dswitch}{(\linespec,L|R,W[ud]B {\sl chars})}
- {cct}
- {SPST switch left or right, W=baseline, B=contact blade,
- dB=contact blade to the right of drawing direction,
- Bm = mirror contact blade,
- Bo = contact blade more widely open,
- Cb = circuit-breaker function,
- Co = contactor function,
- C = external operating mechanism,
- D = circle at contact and hinge,
- (dD = hinge only, uD = contact only)
- E = emergency button,
- EL = early close (or late open),
- LE = late close (or early open),
- F = fused,
- H = time delay closing,
- uH = time delay opening,
- HH = time delay opening and closing,
- K=vertical closing contact line,
- L = limit,
- M = maintained (latched),
- MM = momentary contact on make,
- MR = momentary contact on release,
- MMR = momentary contact on make and release,
- O = hand operation button,
- P = pushbutton,
- Pr{\tt [T|M]} = proximity (touch-sensitive or magnetically controlled),
- Th = thermal control linkage,
- Tr = tripping,
- Y = pull switch,
- Z = turn switch
- \seesect{Twoterminal:}}
-\macrodef{dtee}{dtee}{([L|R], {\sl line thickness}, {\sl attributes})}
- {darrow}
+ {\tt outline=({\sl r, g, b})|"{\sl color}";}%
+ {\tt innershade=({\sl r, g, b})|"{\sl color}";}%
+ where rgb values in parentheses or a defined color is specified.}%
+\macrodef{drjust}{drjust}{(at {\sl location})}%
+ {darrow}%
+ {rjust (displaced dlinewid/2)}%
+\macrodef{dswitch}{dswitch}{(\linespec, L|R, W[ud]B {\sl chars},
+ {\sl attributes})}%
+ {cct}%
+ {
+ Comprehensive IEEE-IEC single-pole switch:
+ arg2={\tt R}: orient to the right of
+ drawing dir
+ arg4 is a key-value sequence for the body of
+ {\tt GC} and {\tt GX} options:
+ {\tt GC} keys: {\tt diam, circle;}%
+ {\tt GX} keys: {\tt lgth, wdth, box, text}.
+\par
+ Arg 3:
+ blank means {\tt WB} by default\\
+ {\tt B}: contact blade open\\
+ {\tt Bc}: contact blade closed\\
+ {\tt Bm}: mirror blade\\
+ {\tt Bo}: contact blade more widely open\\
+ {\tt dB}: contact blade to the right of
+ direction\\
+ {\tt Cb}: circuit breaker function
+ (IEC S00219)\\
+ {\tt Co}: contactor function (IEC S00218)\\
+ {\tt C}: external operating mechanism\\
+ {\tt D}: circle at contact and hinge
+ ({\tt dD} = hinge only,
+ {\tt uD}: contact only)\\
+ {\tt DI}: Disconnector, isolator
+ (IEC S00288)\\
+ {\tt E}: emergency button\\
+ {\tt EL}: early close (or late open)\\
+ {\tt LE}: late close (or early open)\\
+ {\tt F}: fused\\
+ {\tt GC}: disk control mechanism, attribs:
+ {\tt diam={\sl expr};
+ circle={\sl circle attribs};}\\
+ {\tt GX}: box control mechanism, attribs:
+ {\tt lgth={\sl expr}; wdth={\sl expr}; %
+ box={\sl box attr};}%
+ {\tt text={\sl char};}\\
+ {\tt H}: time delay closing\\
+ {\tt uH}: time delay opening\\
+ {\tt HH}: time delay opening and closing\\
+ {\tt K}: vertical closing contact line
+ use {\tt WdBK} for a normally-closed
+ switch\\
+ {\tt L}: limit\\
+ {\tt M}: maintained (latched)\\
+ {\tt MM}: momentary contact on make\\
+ {\tt MR}: momentary contact on release\\
+ {\tt MMR}: momentary contact on make and
+ release\\
+ {\tt O}: hand operation button\\
+ {\tt P}: pushbutton\\
+ {\tt Pr[T|M]}: proximity (touch-sensitive or
+ magnetically controlled)\\
+ {\tt R}: time-delay operating arm\\
+ {\tt Sd}: Switch-disconnector\\
+ {\tt Th}: thermal control linkage\\
+ {\tt Tr}: tripping\\
+ {\tt W}: baseline with gap\\
+ {\tt Y}: pull switch\\
+ {\tt Z}: turn switch
+ \seesect{Twoterminal:}}%
+\macrodef{dtee}{dtee}{([L|R], {\sl line thickness}, {\sl attributes})}%
+ {darrow}%
{Double arrow tee junction with tail to left,
right, or (default) back along current direction, leaving the current
location at the tee centre; e.g.,
@@ -800,28 +980,28 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
\{ darrow(down\_,t) \}; darrow(right\_,t)}.
The attributes are
{\tt thick={\sl expr};} (line thickness in drawing units),
- {\tt innershade=({\sl r,g,b})|"{\sl color}";}
- {\tt outline=({\sl r,g,b})|"{\sl color}";}. }
-\macrodef{dtor\_}{dtor_}{}
- {gen}
- {degrees to radians conversion constant}
+ {\tt innershade=({\sl r,g,b})|"{\sl color}";}%
+ {\tt outline=({\sl r,g,b})|"{\sl color}";}. }%
+\macrodef{dtor\_}{dtor_}{}%
+ {gen}%
+ {degrees to radians conversion constant}%
\macrodef{dturn}{dturn}{({\sl degrees ccw},{\sl line thickness},
- {\sl attributes})}
- {darrow}
+ {\sl attributes})}%
+ {darrow}%
{Tturn dline arg1 degrees left (ccw).
Attributes can be
- {\tt outline=({\sl r, g, b})|"{\sl color}";}
- {\tt innershade=({\sl r, g, b})|"{\sl color}";}
- where rgb values in parentheses or a defined color is specified.}
+ {\tt outline=({\sl r, g, b})|"{\sl color}";}%
+ {\tt innershade=({\sl r, g, b})|"{\sl color}";}%
+ where rgb values in parentheses or a defined color is specified.}%
%
\Letter{E}%
-\macrodef{earphone}{earphone}{( U|D|L|R|{\sl degrees, size})}
- {cct}
+\macrodef{earphone}{earphone}{( U|D|L|R|{\sl degrees, size})}%
+ {cct}%
{earphone, {\sl In1} to {\sl In3} defined
- \seesect{Composite:}}
+ \seesect{Composite:}}%
\macrodef{ebox}{ebox}{(\linespec,{\sl lgth},{\sl wdth},{\sl fill value},
- {\sl box attributes})}
- {cct}
+ {\sl box attributes})}%
+ {cct}%
{ two-terminal box element with adjustable dimensions and fill
value 0 (black) to 1 (white). {\sl lgth} (length) and {\sl wdth} (width)
are relative
@@ -829,111 +1009,109 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
\linespec\ and argument 2 is a semicolon-separated sequence of key=value
terms. The possible keys are {\tt lgth, wdth, text, box},
e.g., {\tt lgth=0.2; text=\char34{}XX\char34;
- box=shaded \char34{}green\char34}\seesect{Twoterminal:}}
-\macrodef{E\_\_}{E__}{}
- {gen}
- {the constant $e$}
-\macrodef{e\_}{e_}{}
- {gen}
- {.e relative to current direction}
-\macrodef{e\_fet}{e_fet}{(\linespec,R,P,E|S)}
- {cct}
+ box=shaded \char34{}green\char34}\seesect{Twoterminal:}}%
+\macrodef{E\_\_}{E__}{}%
+ {gen}%
+ {the constant $e$}%
+\macrodef{e\_}{e_}{}%
+ {gen}%
+ {.e relative to current direction}%
+\macrodef{e\_fet}{e_fet}{(\linespec,R,P,E|S)}%
+ {cct}%
{left or right, N or P enhancement MOSFET, normal
or simplified, without or with envelope
- \seesect{Semiconductors:}}
-\macrodef{elchop}{elchop}{({\sl Name1,Name2})}
- {gen}
+ \seesect{Semiconductors:}}%
+\macrodef{elchop}{elchop}{({\sl Name1,Name2})}%
+ {gen}%
{{\tt chop} for ellipses: evaluates to {\tt chop} $r$ where $r$ is
the distance from the centre of ellipse Name1 to the intersection of
the ellipse with a line to location Name2;
- e.g., {\tt line from A to E elchop(E,A)}}
-\macrodef{eleminit\_}{eleminit_}{(\linespec)}
- {cct}
- {internal line initialization}
-\macrodef{elen\_}{elen_}{}
- {cct}
- {default element length}
+ e.g., {\tt line from A to E elchop(E,A)}}%
+\macrodef{eleminit\_}{eleminit_}{(\linespec)}%
+ {cct}%
+ {internal line initialization}%
+\macrodef{elen\_}{elen_}{}%
+ {cct}%
+ {default element length}%
\macrodef{ellipsearc}{ellipsearc}{({\sl width, height, startangle, endangle,
- rotangle, {\tt cw|ccw}, line attributes})}
- {gen}
+ rotangle, {\tt cw|ccw}, line attributes})}%
+ {gen}%
{Arc of a rotated ellipse in a {\tt [ ]} block. Angles are in radians.
Arg5 is the angle of the width axis;
e.g., {\tt ellipsearc(2,1,0,pi\_,pi\_/4,{},dashed ->)}. Internal locations
- are {\tt Start, End, C} (for centre). }
-\macrodef{em\_arrows}{em_arrows}{({\sl type}|{\sl keys,angle,length})}
- {cct}
- { Radiation arrows: {\sl type} {\tt N|I|E [D|T]}
- {\tt N}=nonionizing, {\tt I}=ionizing, {\tt E}=simple;
- {\tt D}=dot on arrow stem; {\tt T}=anchor tail;
- {\sl keys:} {\tt type=}{\sl chars} as above;
- {\tt lgth}={\sl expr};
- {\tt sep}={\sl expr}; arrow separation
- {\tt angle}={\sl degrees}; absolute direction\seesect{Twoterminal:}}
-\macrodef{endshade}{endshade}{}
- {gen}
- {end gray shading, see {\tt beginshade}}
-\macrodef{Equidist3}{Equidist3}{({\sl Pos1, Pos2, Pos3, Result, distance})}
- {gen}
+ are {\tt Start, End, C} (for centre). }%
+\macrodef{em\_arrows}{em_arrows}{({\sl type}|{\sl keys, angle, length})}%
+ {cct}%
+ { Radiation arrows: {\sl type} {\tt N|I|E [D|T]}:\\
+ {\tt N}: nonionizing,\\
+ {\tt I}: ionizing,\\
+ {\tt E}: simple;\\
+ {\tt D}: dot on arrow stem;\\
+ {\tt T}: anchor tail;\\
+ {\sl keys:} {\tt type=}{\sl chars} as above;\\
+ {\tt angle=}{\sl degrees}; (absolute direction)\\
+ {\tt lgth=}{\sl expr};\\
+ {\tt sep=}{\sl expr}; arrow separation
+ \seesect{Twoterminal:}}%
+\macrodef{endshade}{endshade}{}%
+ {gen}%
+ {end gray shading, see {\tt beginshade}}%
+\macrodef{Equidist3}{Equidist3}{({\sl Pos1, Pos2, Pos3, Result, distance})}%
+ {gen}%
{Calculates location named {\sl Result} equidistant from the first three
positions, i.e.\ the centre of the circle passing through the three
- positions. If arg5 is nonblank, it is equated to the radius.}
-\macrodef{expe}{expe}{}
- {gen}
- {exponential, base $e$}
+ positions. If arg5 is nonblank, it is returned equated to the radius.}%
+\macrodef{expe}{expe}{}%
+ {gen}%
+ {exponential, base $e$}%
%
\Letter{F}%
-\macrodef{f\_box}{f_box}{({\sl boxspecs},{\sl text},{\sl expr1},$\cdots$)}
- {gen}
+\macrodef{f\_box}{f_box}{({\sl boxspecs},{\sl text},{\sl expr1},$\cdots$)}%
+ {gen}%
{like {\tt s\_box} but the text is overlaid on a box of identical size.
If there is only one argument then the default box
is invisible and filed white
- \seesect{Interaction:}}
-\macrodef{Fector}{Fector}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D}
+ \seesect{Interaction:}}%
+\macrodef{Fector}{Fector}{({\sl x1,y1,z1,x2,y2,z2})}%
+ {3D}%
{vector projected on current view plane with top face
- of 3-dimensonal arrowhead normal to x2,y2,z2 }
-\macrodef{Fe\_fet}{Fe_fet}{(\linespec,R,{\sl chars})}
- {cct}
+ of 3-dimensonal arrowhead normal to x2,y2,z2 }%
+\macrodef{Fe\_fet}{Fe_fet}{(\linespec,R,{\sl chars})}%
+ {cct}%
{FET with superimposed ferroelectric symbol. Args 1 to 3 are as for
the {\tt mosfet} macro
- \seesect{Semiconductors:}}
-\macrodef{FF\_ht}{FF_ht}{}
- {cct}
- {flipflop height parameter in {\tt L\_unit}s}
-\macrodef{FF\_wid}{FF_wid}{}
- {cct}
- {flipflop width parameter in {\tt L\_unit}s}
-\macrodef{fill\_}{fill_}{({\sl number})}
- {gen}
- {fill macro, 0=black, 1=white\seesect{Semiconductors:}}
-\macrodef{fitcurve}{fitcurve}{(V,n,[e.g. dotted],m (default 0))}
- {gen}
- {Draw a spline through positions V[m], $ldots$ V[n]: Works only with dpic.}
-\macrodef{FlipFlop6}{FlipFlop6}{({\sl label},{\sl spec},{\sl boxspec})}
- {log}
- {{\em This macro (6-input flip-flops)
- has been superseded by {\tt FlipFlopX} and may be deleted
- in future}.
- {\sl spec}={\tt [[n]NQ][[n]Q][[n]CK][[n]PR][lb]}
- {\tt [[n]CLR][[n]S][[n].|D|T|R]} to include and negate pins,
- {\tt lb} to print labels }
+ \seesect{Semiconductors:}}%
+\macrodef{FF\_ht}{FF_ht}{}%
+ {cct}%
+ {flipflop height parameter in {\tt L\_unit}s}%
+\macrodef{FF\_wid}{FF_wid}{}%
+ {cct}%
+ {flipflop width parameter in {\tt L\_unit}s}%
+\macrodef{fill\_}{fill_}{({\sl number})}%
+ {gen}%
+ {fill macro, 0=black, 1=white\seesect{Semiconductors:}}%
+\macrodef{findroot}{findroot}{%
+ ({\sl function name, left bound, right bound, tolerance, variable}))}%
+ {dpictools}%
+ {$\;\;$ Solve $\hbox{\sl function}(x) = 0$ by the method of
+ bisection. The calculated value is assigned to the variable named in the
+ last argument (\SR{Libraries:}). Example:
+ {\tt define parabola \{ \$2 = (\$1)\char94{}2 - 1 \};
+ findroot( parabola, 0, 2, 1e-8, x )}. }%
+\macrodef{fitcurve}{fitcurve}{(V, n, {\sl attributes,} m (default 0))}%
+ {gen}%
+ {Draw a spline through positions V[m], \ldots V[n]: Works only with dpic.}%
\macrodef{FlipFlop}{FlipFlop}{(D|T|RS|JK,{\sl label},{\sl boxspec},%
- {\sl pinlength})}
- {log}
+ {\sl pinlength})}%
+ {log}%
{flip-flops,
- {\sl boxspec}=e.g.\ ht x wid y \seesect{Logicgates:}}
-\macrodef{FlipFlopJK}{FlipFlopJK}{({\sl label}, {\sl spec},{\sl boxspec})}
- {log}
- {{\em This macro (JK flip-flop)
- has been superseded by {\tt FlipFlopX} and may be deleted
- in future}.
- Similar to {\tt FlipFlop6}.}
+ {\sl boxspec} e.g.,\ ht x wid y \seesect{Logicgates:}}%
\macrodef{FlipFlopX}{FlipFlopX}{({\sl boxspec, label, leftpins, toppins,
- rightpins, bottompins, pinlength})}
- {log}
+ rightpins, bottompins, pinlength})}%
+ {log}%
{General flipflop.
Arg 1 modifies the box (labelled Chip) default specification.
- Each of args 3 to 6 is null or a string of {\sl pinspecs}
+ Each of args 3 to 6 is null or a string of {\sl pinspecs}%
separated by semicolons ({\tt;}). A {\sl Pinspec} is either empty
or of the form
{\tt[}{\sl pinopts}{\tt]:[}{\sl label}{\tt[:}{\sl Picname}{\tt]]}.
@@ -941,352 +1119,393 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,%
Pins are placed top to bottom or left to right along the box edges with
null {\sl pinspecs} counted for placement. Pins are named by side and number
by default; eg {\tt W1, W2, ..., N1, N2, ..., E1, ..., S1, ...} ; however,
- if {\tt:}{\sl Picname} is present in a {\sl pinspec} then {\sl Picname}
+ if {\tt:}{\sl Picname} is present in a {\sl pinspec} then {\sl Picname}%
replaces the default name.
A {\sl pinspec} label is text placed at the pin base. Semicolons are
- not allowed in labels; use, e.g., {\tt \char92{}char59\char123\char125}
+ not allowed in labels; use, e.g., {\tt \char92{}char59\char123\char125}%
instead.
To put a bar over a label, use {\tt lg\_bartxt(}{\sl label}{\tt)}.
The {\sl pinopts} are {\tt[N|L|M][E]};
- {\tt N}=pin with not circle;
- {\tt L}=active low out; {\tt M}=active low in;
- {\tt E}=edge trigger \seesect{Logicgates:}. Optional arg 7 is the length
- of pins}
+ {\tt N}: pin with not circle;
+ {\tt L}: active low out;
+ {\tt M}: active low in;
+ {\tt E}: edge trigger \seesect{Logicgates:}.\\
+ Optional arg 7 is the length of pins}%
\macrodef{foreach\_}{foreach_}{(`{\sl variable}',{\sl actions},{\sl
- value1, value2, $\ldots$})}
- {gen}
+ value1, value2, $\ldots$})}%
+ {gen}%
{Clone of Loopover\_ by a different name:
Repeat {\sl actions} with {\sl variable} set successively to
{\sl value1, value2, $\ldots$}, setting macro {\tt m4Lx} to 1, 2,
- $\ldots$, terminating if {\sl variable} is nul}
-\macrodef{for\_}{for_}{({\sl start},{\sl end},{\sl increment},`{\sl actions}')}
- {gen}
- {integer for loop with index variable {\tt m4x} \seesect{Looping:}}
-\macrodef{FTcap}{FTcap}{({\sl chars})}
- {cct}
+ $\ldots$, terminating if {\sl variable} is nul}%
+\macrodef{for\_}{for_}{({\sl start},{\sl end},{\sl increment},`{\sl actions}')}%
+ {gen}%
+ {integer for loop with index variable {\tt m4x} \seesect{Looping:}}%
+\macrodef{FTcap}{FTcap}{({\sl chars})}%
+ {cct}%
{Feed-through capacitor; example of a composite element derived from
- a two-terminal element. Defined points: {\sl .Start, .End, .C .T1 .T2 T}
- Arg 1: (default) {\tt A}= type A, {\tt B}= type B, {\tt C}= type C
- \seesect{Composite:}}
-\macrodef{fuse}{fuse}{({\sl linespec, type, wid, ht})}
- {cct}
+ a two-terminal element. Defined points: {\sl .Start, .End, .C .T1 .T2 T}%
+ Arg 1: {\tt A}: type A (default),
+ {\tt B}: type B,
+ {\tt C}: type C
+ \seesect{Composite:}}%
+\macrodef{fuse}{fuse}{({\sl linespec, type, wid, ht, attributes})}%
+ {cct}%
{fuse symbol, type$=$
- {\tt A|B|C|D|S|HB|HC|SB} or {\tt dA=D}\seesect{Twoterminal:}}
+ {\tt A|B|C|D|S|HB|HC|SB} or {\tt dA=D}\seesect{Twoterminal:}}%
%
\Letter{G}%
-\macrodef{gap}{gap}{(\linespec,{\sl fill},A)}
- {cct}
- {gap with (filled) dots, A=chopped arrow between dots\seesect{Twoterminal:}}
-\macrodef{gen\_init}{gen_init}{}
- {gen}
+\macrodef{gap}{gap}{(\linespec,{\sl fill},A)}%
+ {cct}%
+ {gap with (filled) dots, A=chopped arrow between dots\seesect{Twoterminal:}}%
+\macrodef{gen\_init}{gen_init}{}%
+ {gen}%
{initialize environment for general diagrams
- (customizable, reads {\tt libgen.m4})}
-\macrodef{g\_fet}{g_fet}{(\linespec,R,P,{\sl shade spec})}
- {cct}
+ (customizable, reads {\tt libgen.m4})}%
+\macrodef{g\_fet}{g_fet}{(\linespec,R,P,{\sl shade spec})}%
+ {cct}%
{left or right, N or P graphene FET, without or with shading
- \seesect{Semiconductors:}}
-\macrodef{g\_}{g_}{}
- {gen}
- {green color value}
-\macrodef{G\_hht}{G_hht}{}
- {log}
- {gate half-height in {\tt L\_unit}s}
-\macrodef{glabel\_}{glabel_}{}
- {cct}
- {internal general labeller}
-%\macrodef{gpar\_}{gpar_}{({\sl element},{\sl element},{\sl separation})}
-% {cct}
-% {two same-direction elements in parallel}
-\macrodef{gpolyline\_}{gpolyline_}{({\sl fraction},{\sl location}, ...)}
- {gen}
- {internal to {\tt gshade}}
-\macrodef{graystring}{graystring}{({\sl gray value})}
- {gen}
+ \seesect{Semiconductors:}}%
+\macrodef{g\_}{g_}{}%
+ {gen}%
+ {green color value}%
+\macrodef{G\_hht}{G_hht}{}%
+ {log}%
+ {gate half-height in {\tt L\_unit}s}%
+\macrodef{glabel\_}{glabel_}{}%
+ {cct}%
+ {internal general labeller}%
+%\macrodef{gpar\_}{gpar_}{({\sl element},{\sl element},{\sl separation})}%
+% {cct}%
+% {two same-direction elements in parallel}%
+\macrodef{gpolyline\_}{gpolyline_}{({\sl fraction},{\sl location}, ...)}%
+ {gen}%
+ {internal to {\tt gshade}}%
+\macrodef{graystring}{graystring}{({\sl gray value})}%
+ {gen}%
{evaluates to a string compatible with the postprocessor in use
to go with {\tt colored}, {\tt shaded}, or {\tt outlined} attributes.
(PSTricks, metapost, pgf-tikz, pdf, postscript, svg).
- The argument is a fraction in the range $[0,1]$; see {\tt rgbstring}}
-\macrodef{grid\_}{grid_}{({\sl x},{\sl y})}
- {log}
- {absolute grid location}
+ The argument is a fraction in the range $[0,1]$; see {\tt rgbstring}}%
+\macrodef{grid\_}{grid_}{({\sl x},{\sl y})}%
+ {log}%
+ {absolute grid location}%
\macrodef{ground}{ground}{(at {\sl location}, T|{\sl stem length},
- N|F|S|L|P[A]|E, U|D|L|R|{\sl degrees})}
- {cct}
- { ground, without stem for 2nd arg = T;
- {\tt N}=normal, {\tt F}=frame, {\tt S}=signal, {\tt L}=low-noise,
- {\tt P}=protective,
- {\tt PA}=protective alternate,
- {\tt E}=European; up, down, left, right, or angle
- from horizontal (default -90)
- \seesect{Composite:}}
-\macrodef{gshade}{gshade}{({\sl gray value},A,B,...,Z,A,B)}
- {gen}
+ N|F|S|L|P[A]|E, U|D|L|R|{\sl degrees})}%
+ {cct}%
+ { ground, without stem for 2nd arg = T;\\
+ {\tt N}: normal,\\
+ {\tt F}: frame,\\
+ {\tt S}: signal,\\
+ {\tt L}: low-noise,\\
+ {\tt P}: protective,\\
+ {\tt PA}: protective alternate,\\
+ {\tt E}: European; up, down, left, right, or angle
+ from horizontal (default -90) \\
+ \seesect{Composite:}}%
+\macrodef{gshade}{gshade}{({\sl gray value},A,B,...,Z,A,B)}%
+ {gen}%
{(Note last two arguments). Shade a polygon with named
- vertices, attempting to avoid sharp corners}
-\macrodef{gyrator}{gyrator}{({\sl box specs,space ratio,pin lgth,}[N][V])}
- {cct}
- {Gyrator two-port wrapper for {\tt nport}, {\tt N} omits pin dots; {\tt V}
+ vertices, attempting to avoid sharp corners}%
+\macrodef{gyrator}{gyrator}{({\sl box specs,space ratio,pin lgth,}[N][V])}%
+ {cct}%
+ {Gyrator two-port wrapper for {\tt nport}, {\tt N} omits pin dots; {\tt V}%
gives a vertical orientation
- \seesect{Composite:}}
+ \seesect{Composite:}}%
%
\Letter{H}%
-\macrodef{hatchbox}{hatchbox}{({\sl boxspec,hashsep,hatchspec})}
- {gen}
- {Manhattan box with 45 degree hatching, e.g.,
- {\tt hatchbox(outlined "blue",{},dashed outlined "green" thick 0.4)}}
-\macrodef{Header}{Header}{(1|2,{\sl rows,wid,ht,box attributes})}
- {log}
+\macrodef{hatchbox}{hatchbox}{({\sl boxspec,hashsep,hatchspec,angle})
+ {\rm or} hatchbox({\sl keys})}%
+ {gen}%
+% {Alternate invocation: {\tt hatchbox({\sl keys})}.
+ {Manhattan box hatched at a specified separation
+ and angle (default 45 degrees).
+ Defined keys are:\\
+ {\tt wid={\sl expr};}\\
+ {\tt ht={\sl expr};}\\
+ {\tt box={\sl attributes};} (e.g. {\tt dashed outline "{\sl color}"})\\
+ {\tt fillcolor="{\sl color}"|({\sl r,g,b});}\\
+ {\tt hatchsep={\sl expr};}\\
+ {\tt hatchspec={\sl attributes};}\\
+ {\tt angle={\sl expr};}%
+ e.g.,
+ {\tt hatchbox(outlined "blue",{},dashed outlined "green" thick 0.4)};\\
+ also
+ {\tt DefineRGBColor(mycolor,1,0.2,0.5);\\
+ hatchbox(box=dashed outlined mycolor)}}%
+\macrodef{Header}{Header}{(1|2,{\sl rows,wid,ht,box attributes})}%
+ {log}%
{Header block with 1 or 2 columns and square Pin 1:
arg1 = number of columns;
arg2 = pins per column;
arg3,4 = custom wid, ht;
- arg5 = e.g., {\tt fill\_(0.9)}
- \seesect{Composite:}}
+ arg5 = e.g., {\tt fill\_(0.9)}%
+ \seesect{Composite:}}%
\macrodef{HeaderPin}{HeaderPin}{({\sl location, type, Picname},%
-n|e|s|w,{\sl length})}
- {log}
+n|e|s|w,{\sl length})}%
+ {log}%
{General pin for {\tt Header} macro; arg 4 specifies pin direction
- with respect to the current drawing direction)}
-\macrodef{heatere}{heatere}{({\sl linespec, keys,} [R][T])}
- {cct}
+ with respect to the current drawing direction)}%
+\macrodef{heatere}{heatere}{({\sl linespec, keys,} [R][T])}%
+ {cct}%
{Heater element with curved sides\seesect{Twoterminal:}.
{\tt R} means right orientation;
{\tt T} truncates leads to the width of the body.
The {\sl keys} for the body are
- {\tt lgth={\sl expr};}
+ {\tt lgth={\sl expr};}%
{\tt wdth={\sl expr};} (default {\tt lgth*2/5});
- {\tt cycles={\sl expr};}
- {\tt line={\sl attributes};} (e.g., {\tt dotted, dashed, outlined})}
+ {\tt cycles={\sl expr};}%
+ {\tt line={\sl attributes};} (e.g., {\tt dotted, dashed, outlined})}%
\macrodef{heater}{heater}{({\sl linespec, ndivisions|keys, wid, ht,
- boxspec}|[E[R][T]])}
- {cct}
- {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,}
- draws an {\tt heatere({\sl linespec, keys,} [R][T]),}
+ boxspec}|[E[R][T]])}%
+ {cct}%
+ {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,}%
+ draws an {\tt heatere({\sl linespec, keys,} [R][T]),}%
otherwise a
- {\tt heatert({\sl linespec, nparts, wid, ht, boxspec})}}
-\macrodef{heatert}{heatert}{({\sl linespec, nparts|keys, wid, ht, boxspec})}
- {cct}
+ {\tt heatert({\sl linespec, nparts, wid, ht, boxspec})}}%
+\macrodef{heatert}{heatert}{({\sl linespec, nparts|keys, wid, ht, boxspec})}%
+ {cct}%
{Two-terminal rectangular heater element\seesect{Twoterminal:}.
The {\sl keys} for the body are
- {\tt parts={\sl expr};}
- {\tt lgth={\sl expr};}
+ {\tt parts={\sl expr};}%
+ {\tt lgth={\sl expr};}%
{\tt wdth={\sl expr};} (default {\tt lgth*2/5});
- {\tt box={\sl body attributes};}
+ {\tt box={\sl body attributes};}%
(e.g., {\tt dotted, dashed, outlined, shaded}).
- Args 3--5 are unused if any key is given}
-\macrodef{hexadecimal\_}{hexadecimal_}{($n$, [$m$])}
- {gen}
+ Args 3--5 are unused if any key is given}%
+\macrodef{hexadecimal\_}{hexadecimal_}{($n$, [$m$])}%
+ {gen}%
{hexadecimal representation of $n,$ left padded to $m$ digits if the second
- argument is nonblank}
-\macrodef{hex\_digit}{hex_digit}{($n$)}
- {gen}
- {hexadecimal digit for $0 \leq n < 16$}
-\macrodef{H\_ht}{H_ht}{}
- {log}
- {hysteresis symbol dimension in {\tt L\_unit}s}
-\macrodef{hlth}{hlth}{}
- {gen}
- {current line half thickness in drawing units}
-\macrodef{hoprad\_}{hoprad_}{}
- {cct}
- {hop radius in crossover macro}
-\macrodef{ht\_}{ht_}{}
- {gen}
- {height relative to current direction}
+ argument is nonblank}%
+\macrodef{hex\_digit}{hex_digit}{($n$)}%
+ {gen}%
+ {hexadecimal digit for $0 \leq n < 16$}%
+\macrodef{H\_ht}{H_ht}{}%
+ {log}%
+ {hysteresis symbol dimension in {\tt L\_unit}s}%
+\macrodef{histbins}{histbins}{({\sl data-array name, n, min, max, nbins,
+ bin array name})}%
+ {dpictools}%
+ {$\;\;$ Generate the distribution of {\sl n} values in {\sl data-array}.
+ If given, arg3 and arg4 specify maximum and minimum data values,
+ otherwise they are calculated. Bins have index 0 to arg5-1.}%
+\macrodef{hlth}{hlth}{}%
+ {gen}%
+ {current line half thickness in drawing units}%
+\macrodef{hoprad\_}{hoprad_}{}%
+ {cct}%
+ {hop radius in crossover macro}%
+\macrodef{hsvtorgb}{hsvtorgb}{({\sl h, s, v, r, g, b})}%
+ {dpictools}%
+ {$\;\;$ hsv color triple to rgb; {\sl h} has range 0 to 360.}%
+\macrodef{ht\_}{ht_}{}%
+ {gen}%
+ {height relative to current direction}%
%
\Letter{I}%
-\macrodef{ifdpic}{ifdpic}{({\sl if true},{\sl if false})}
- {gen}
- {test if dpic has been specified as pic processor}
-\macrodef{ifgpic}{ifgpic}{({\sl if true},{\sl if false})}
- {gen}
- {test if gpic has been specified as pic processor}
+\macrodef{ifdpic}{ifdpic}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if dpic has been specified as pic processor}%
+\macrodef{ifgpic}{ifgpic}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if gpic has been specified as pic processor}%
\macrodef{ifinstr}{ifinstr}{({\sl string},{\sl string},{\sl if true},{\sl
- if false})}
- {gen}
+ if false})}%
+ {gen}%
{test if the second argument is a substring of the first; also
{\tt ifinstr({\sl string},{\sl string},{\sl if true},{\sl
- string},{\sl string},{\sl if true}, $\ldots$ {\sl if false})}
- }
-\macrodef{ifmfpic}{ifmfpic}{({\sl if true},{\sl if false})}
- {gen}
- {test if mfpic has been specified as pic post-processor}
-\macrodef{ifmpost}{ifmpost}{({\sl if true},{\sl if false})}
- {gen}
- {test if MetaPost has been specified as pic post-processor}
-\macrodef{ifpgf}{ifpgf}{({\sl if true},{\sl if false})}
- {gen}
- {test if \TPGF~has been specified as pic post-processor}
-\macrodef{ifpostscript}{ifpostscript}{({\sl if true},{\sl if false})}
- {gen}
- {test if Postscript ({\tt dpic -r}) has been specified as pic output format}
-\macrodef{ifpsfrag}{ifpsfrag}{({\sl if true},{\sl if false})}
- {gen}
+ string},{\sl string},{\sl if true}, $\ldots$ {\sl if false})}%
+ }%
+\macrodef{ifmfpic}{ifmfpic}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if mfpic has been specified as pic post-processor}%
+\macrodef{ifmpost}{ifmpost}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if MetaPost has been specified as pic post-processor}%
+\macrodef{ifpgf}{ifpgf}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if \TPGF~has been specified as pic post-processor}%
+\macrodef{ifpostscript}{ifpostscript}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if Postscript ({\tt dpic -r}) has been specified as pic output format}%
+\macrodef{ifpsfrag}{ifpsfrag}{({\sl if true},{\sl if false})}%
+ {gen}%
{Test if either {\tt psfrag} or {\tt psfrag\_} has been defined. For
postscript with psfrag strings, one or the other should be defined
- prior to or at the beginning of the diagram}
-\macrodef{ifpstricks}{ifpstricks}{({\sl if true},{\sl if false})}
- {gen}
- {test if \PSTricks~has been specified as post-processor}
-\macrodef{ifroff}{ifroff}{({\sl if true},{\sl if false})}
- {gen}
- {test if {\bf troff} or {\bf groff} has been specified as post-processor}
-\macrodef{ifxfig}{ifxfig}{({\sl if true},{\sl if false})}
- {gen}
- {test if Fig 3.2 ({\tt dpic -x}) has been specified as pic output format}
-\macrodef{igbt}{igbt}{(\linespec,L|R,[L][[d]D])}
- {cct}
+ prior to or at the beginning of the diagram}%
+\macrodef{ifpstricks}{ifpstricks}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if \PSTricks~has been specified as post-processor}%
+\macrodef{ifroff}{ifroff}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if {\bf troff} or {\bf groff} has been specified as post-processor}%
+\macrodef{ifxfig}{ifxfig}{({\sl if true},{\sl if false})}%
+ {gen}%
+ {test if Fig 3.2 ({\tt dpic -x}) has been specified as pic output format}%
+\macrodef{igbt}{igbt}{(\linespec,L|R,[L][[d]D])}%
+ {cct}%
{left or right IGBT, L=alternate gate type, D=parallel diode,
- dD=dotted connections }
+ dD=dotted connections }%
\macrodef{inductor}{inductor}{(\linespec, W|L, {\sl cycles}, M[n]|P[n]|K[n],
- {\sl loop wid})}
- {cct}
- {inductor, arg2: narrow (default), W=wide, L=looped;
- arg3: number of arcs or cycles (default 4);
- arg4: M=magnetic core, P=powder (dashed) core, K=long-dashed core,
+ {\sl loop wid})}%
+ {cct}%
+ {inductor, arg2: (default narrow), {\tt W}: wide, {\tt L}: looped;\\
+ arg3: number of arcs or cycles (default 4);\\
+ arg4:
+ {\tt M}: magnetic core,
+ {\tt P}: powder (dashed) core,
+ {\tt K}: long-dashed core,
n={\sl integer} (default 2) number of core lines named
- {\sl M4Core1, M4Core2,} $\ldots$;
- arg5: loop width (default L,W: {\tt dimen\_}/5; other: {\tt dimen\_}/8)
- \seesect{Twoterminal:}}
-\macrodef{in\_\_}{in__}{}
- {gen}
- {absolute inches}
-\macrodef{inner\_prod}{inner_prod}{({\sl linear obj},{\sl linear obj})}
- {gen}
- {inner product of (x,y) dimensions of two linear objects}
-\macrodef{integrator}{integrator}{(\linespec,{\sl size})}
- {cct}
- {integrating amplifier\seesect{Twoterminal:}}
+ {\sl M4Core1, M4Core2,} $\ldots$;\\
+ arg5: loop width (default {\tt L, W}: {\tt dimen\_}/5;
+ other: {\tt dimen\_}/8)
+ \seesect{Twoterminal:}}%
+\macrodef{in\_\_}{in__}{}%
+ {gen}%
+ {absolute inches}%
+\macrodef{inner\_prod}{inner_prod}{({\sl linear obj},{\sl linear obj})}%
+ {gen}%
+ {inner product of (x,y) dimensions of two linear objects}%
+\macrodef{integrator}{integrator}{(\linespec,{\sl size})}%
+ {cct}%
+ {integrating amplifier\seesect{Twoterminal:}}%
\macrodef{intersect\_}{intersect_}{({\sl line1}.start,{\sl line1}.end,
-{\sl line2}.start,{\sl line2}.end)}
- {gen}
- {intersection of two lines}
-\macrodef{Intersect\_}{Intersect_}{({\sl Name1},{\sl Name2})}
- {gen}
- {intersection of two named lines}
-\macrodef{Int\_}{Int_}{}
- {gen}
- {corrected (old) gpic $int()$ function}
-\macrodef{IOdefs}{IOdefs}{(\linespec,{\sl label},[P|N]*,L|R) }
- {log}
- {Define locations {\sl label}{\tt 1}, $\ldots$ {\sl label}{\tt n}
- along the line; {\tt P}= label only;
- {\tt N}=with {\tt NOT\_circle};
- {\tt R}=circle to right of current direction }
+{\sl line2}.start,{\sl line2}.end)}%
+ {gen}%
+ {intersection of two lines}%
+\macrodef{Intersect\_}{Intersect_}{({\sl Name1},{\sl Name2})}%
+ {gen}%
+ {intersection of two named lines}%
+\macrodef{Int\_}{Int_}{}%
+ {gen}%
+ {corrected (old) gpic $int()$ function}%
+\macrodef{IOdefs}{IOdefs}{(\linespec,{\sl label},[P|N]*,L|R) }%
+ {log}%
+ {Define locations {\sl label}{\tt 1}, $\ldots$ {\sl label}{\tt n}%
+ along the line; {\tt P}: label only;
+ {\tt N}: with {\tt NOT\_circle};
+ {\tt R}: circle to right of current direction }%
%
\Letter{J}%
-\macrodef{jack}{jack}{(U|D|L|R|{\sl degrees},{\sl chars})}
- {cct}
- {arg1: drawing direction; string arg2: {\tt R}=right orientation,
+\macrodef{jack}{jack}{(U|D|L|R|{\sl degrees},{\sl chars})}%
+ {cct}%
+ {arg1: drawing direction; string arg2: {\tt R}: right orientation,
one or more {\tt L[M][B]} for L and auxiliary contacts with make or break
points; {\tt S[M][B]} for S and auxiliary contacts
- \seesect{Composite:}}
-\macrodef{j\_fet}{j_fet}{(\linespec,L|R,P,E)}
- {cct}
+ \seesect{Composite:}}%
+\macrodef{j\_fet}{j_fet}{(\linespec,L|R,P,E)}%
+ {cct}%
{left or right, N or P JFET, without or with envelope
- \seesect{Semiconductors:}}
-\macrodef{jumper}{jumper}{({\sl linespec, chars}|{\sl keys})}
- {cct}
+ \seesect{Semiconductors:}}%
+\macrodef{jumper}{jumper}{({\sl linespec, chars}|{\sl keys})}%
+ {cct}%
{ Two-terminal solder jumper with named body parts.
The {\sl chars} character sequence specifies the jumper components,
and normally begins with {\tt C} and ends with {\tt D.} The character
- {\tt E} is an empty (blank) gap, {\tt J} is a filled gap, {\tt B}
- is a box component. The components are named {\sl T1, T2, \ldots}
- Examples: {\tt CED} is a simple open jumper (the default); {\tt CJD}
+ {\tt E} is an empty (blank) gap, {\tt J} is a filled gap, {\tt B}%
+ is a box component. The components are named {\sl T1, T2, \ldots}%
+ Examples: {\tt CED} is a simple open jumper (the default); {\tt CJD}%
closed; {\tt CEBED} three-contact open; {\tt CJBED} three-contact
open and closed.
The {\sl keys} are: {\tt type=}{\sl chars} as previously;
{\tt body=}{\sl attributes} (e.g. {\tt fill\_(0.5)});
{\tt wdth=}{\sl expr};
{\tt name=}{\sl chars} (the body name)%
-\seesect{Twoterminal:}}
+\seesect{Twoterminal:}}%
%
\Letter{K}%
-\macrodef{KelvinR}{KelvinR}{({\sl cycles},[R],{\sl cycle wid})}
- {cct}
- {IEEE resistor in a {\tt [ ]} block with Kelvin taps {\sl T1} and {\sl T2}
- \seesect{Composite:}}
+\macrodef{KelvinR}{KelvinR}{({\sl cycles},[R],{\sl cycle wid})}%
+ {cct}%
+ {IEEE resistor in a {\tt [ ]} block with Kelvin taps {\sl T1} and {\sl T2}%
+ \seesect{Composite:}}%
%
\Letter{L}%
-\macrodef{lamp}{lamp}{(\linespec, [R][T])}
- {cct}
+\macrodef{lamp}{lamp}{(\linespec, [R][T])}%
+ {cct}%
{Two-terminal incandescent lamp. {\tt T} truncates leads to the body width.
- \seesect{Twoterminal:}}
-\macrodef{langle}{langle}{({\sl Start, End})}
- {gen}
- {Angle in radians from horizontal of the line from {\sl Start}
- to {\sl End}.}
-\macrodef{larrow}{larrow}{({\sl label},{\tt ->|<-},{\sl dist})}
- {cct}
+ \seesect{Twoterminal:}}%
+\macrodef{langle}{langle}{({\sl Start, End})}%
+ {gen}%
+ {Angle in radians from horizontal of the line from {\sl Start}%
+ to {\sl End}.}%
+\macrodef{larrow}{larrow}{({\sl label},{\tt ->|<-},{\sl dist})}%
+ {cct}%
{arrow {\sl dist} to left of last-drawn 2-terminal element
- \seesect{Branchcurrent:}}
-\macrodef{lbox}{lbox}{({\sl wid}, {\sl ht}, {\sl attributes})}
- {gen}
- {box oriented in current direction, arg 3= e.g.\ {\tt dashed shaded "red"}}
-\macrodef{LCintersect}{LCintersect}{({\sl line name, Centre, rad,} [R])}
- {gen}
- { First (second if arg4 is R) intersection of a line with a circle}
-\macrodef{LCtangent}{LCtangent}{({\sl Pos1, Centre, rad,} [R])}
- {gen}
+ \seesect{Branchcurrent:}}%
+\macrodef{lbox}{lbox}{({\sl wid}, {\sl ht}, {\sl attributes})}%
+ {gen}%
+ {box oriented in current direction, arg 3= e.g.\ {\tt dashed shaded "red"}}%
+\macrodef{LCintersect}{LCintersect}{({\sl line name, Centre, rad,} [R],
+ [{\sl Line start, End}])}%
+ {gen}%
+ { First (second if arg4 is R) intersection of a line with a circle.
+ Solves $|V.{\tt start} + tV| = {\sl radius}$ for $t$ where $V$ is the line.
+ If arg1 is blank then the line start and end are given in arg5 and arg6.}%
+\macrodef{LCtangent}{LCtangent}{({\sl Pos1, Centre, rad,} [R])}%
+ {gen}%
{ Left (right if arg4=R) tangent point of line
- from Pos1 to circle at Centre with radius arg3}
-\macrodef{left\_}{left_}{}
- {gen}
- {left with respect to current direction \seesect{Placing:}}
+ from Pos1 to circle at Centre with radius arg3}%
+\macrodef{left\_}{left_}{}%
+ {gen}%
+ {left with respect to current direction \seesect{Placing:}}%
\macrodef{LEintersect}{LEintersect}{({\sl line name, Centre, ellipse wid,
- ellipse ht}, [R])}
- {gen}
- { First (second if arg5 is R) intersection of a line with an ellipse}
-\macrodef{length3D}{length3D}{(x,y,z)}
- {3D}
- {Euclidean length of triple x,y,z}
-\macrodef{LEtangent}{LEtangent}{({\sl Pos1, Centre, ellips wid, ellipse ht}
- [R])}
- {gen}
+ ellipse ht}, [R], [{\sl Line start, End}])}%
+ {gen}%
+ { First (second if arg5 is R) intersection of a line with an ellipse.
+ If arg1 is blank then the line start and end are given in arg6 and arg7.}%
+\macrodef{length3}{length3}{({\sl vector})}%
+ {dpictools}%
+ {$\;\;$ Euclidean length of 3-vector argument.}%
+\macrodef{length3D}{length3D}{(x,y,z)}%
+ {3D}%
+ {Euclidean length of triple x,y,z}%
+\macrodef{LEtangent}{LEtangent}{({\sl Pos1, Centre, ellips wid, ellipse ht}%
+ [R])}%
+ {gen}%
{ Left (right if arg5=R) tangent point of line
- from Pos1 to ellipse at Centre with given width and height}
-\macrodef{lg\_bartxt}{lg_bartxt}{}
- {log}
- {draws an overline over logic-pin text (except for xfig)}
+ from Pos1 to ellipse at Centre with given width and height}%
+\macrodef{lg\_bartxt}{lg_bartxt}{}%
+ {log}%
+ {draws an overline over logic-pin text (except for xfig)}%
\macrodef{lg\_pin}{lg_pin}{({\sl location, label, Picname},
- n|e|s|w[L|M|I|O][N][E], {\sl pinno, optlen})}
- {log}
- {comprehensive logic pin;
- {\sl label}= text (indicating logical pin function, usually),
- {\sl Picname}= pic label for referring to the pin (line),
- {\tt n|e|s|w}=orientation (north, south, east, west),
- {\tt L}=active low out,
- {\tt M}=active low in,
- {\tt I}=inward arrow,
- {\tt O}=outward arrow,
- {\tt N}=negated,
- {\tt E}=edge trigger}
-\macrodef{lg\_pintxt}{lg_pintxt}{}
- {log}
- {reduced-size text for logic pins}
-\macrodef{lg\_plen}{lg_plen}{}
- {log}
- {logic pin length in in {\tt L\_unit}s}
-\macrodef{LH\_symbol}{LH_symbol}{([U|D|L|R|{\sl degrees}][I])}
- {log}
- {logic-gate hysteresis symbol; {\tt I=}inverted}
-\macrodef{lin\_ang}{lin_ang}{({\sl line-reference}[,d])}
- {gen}
+ n|e|s|w[L|M|I|O][N][E], {\sl pinno, optlen})}%
+ {log}%
+ {comprehensive logic pin;\\
+ {\sl label}: text (indicating logical pin function, usually),\\
+ {\sl Picname}: pic label for referring to the pin (line),\\
+ {\tt n|e|s|w}: orientation (north, south, east, west),\\
+ {\tt L}: active low out,\\
+ {\tt M}: active low in,\\
+ {\tt I}: inward arrow,\\
+ {\tt O}: outward arrow,\\
+ {\tt N}: negated,\\
+ {\tt E}: edge trigger}%
+\macrodef{lg\_pintxt}{lg_pintxt}{}%
+ {log}%
+ {reduced-size text for logic pins}%
+\macrodef{lg\_plen}{lg_plen}{}%
+ {log}%
+ {logic pin length in in {\tt L\_unit}s}%
+\macrodef{LH\_symbol}{LH_symbol}{([U|D|L|R|{\sl degrees}][I])}%
+ {log}%
+ {logic-gate hysteresis symbol; {\tt I:} inverted}%
+\macrodef{lin\_ang}{lin_ang}{({\sl line-reference}[,d])}%
+ {gen}%
{the angle of a line or move from {\tt .start} to {\tt .end} of a linear
- object (in degrees if arg2={\tt d})}
-\macrodef{linethick\_}{linethick_}{({\sl number})}
- {gen}
- {set line thickness in points}
-\macrodef{lin\_leng}{lin_leng}{({\sl line-reference})}
- {gen}
- {length of a line, equivalent to {\sl line-reference}{\tt .len}
- with dpic}
-\macrodef{ljust\_}{ljust_}{}
- {gen}
- {ljust with respect to current direction}
+ object (in degrees if arg2={\tt d})}%
+\macrodef{linethick\_}{linethick_}{({\sl number})}%
+ {gen}%
+ {set line thickness in points}%
+\macrodef{lin\_leng}{lin_leng}{({\sl line-reference})}%
+ {gen}%
+ {length of a line, equivalent to {\sl line-reference}{\tt .len}%
+ with dpic}%
+\macrodef{ljust\_}{ljust_}{}%
+ {gen}%
+ {ljust with respect to current direction}%
\macrodef{llabel}{llabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],%
- [{\sl block name}])}
- {cct}
+ [{\sl block name}])}%
+ {cct}%
{Triple label on the left of the body of an element with respect to the
current direction \seesect{Labels:}. Labels are placed at the
beginning, centre, and end of the last {\tt []} block (or a named
@@ -1295,478 +1514,553 @@ n|e|s|w,{\sl length})}
{\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt
right} to supplement the default relative position. The fifth
argument is the optional name of the {\tt []} block to be labelled,
- which is {\tt last []} by default}
-\macrodef{loc\_}{loc_}{({\sl x}, {\sl y})}
- {gen}
- {location adjusted for current direction}
-\macrodef{log10E\_}{log10E_}{}
- {gen}
- {constant $\log_{10}(e)$}
-\macrodef{loge}{loge}{}
- {gen}
- {logarithm, base $e$}
-\macrodef{log\_init}{log_init}{}
- {log}
+ which is {\tt last []} by default}%
+\macrodef{loc\_}{loc_}{({\sl x}, {\sl y})}%
+ {gen}%
+ {location adjusted for current direction}%
+\macrodef{log10E\_}{log10E_}{}%
+ {gen}%
+ {constant $\log_{10}(e)$}%
+\macrodef{loge}{loge}{}%
+ {gen}%
+ {logarithm, base $e$}%
+\macrodef{log\_init}{log_init}{}%
+ {log}%
{initialize environment for logic diagrams
- (customizable, reads {\tt liblog.m4})}
+ (customizable, reads {\tt liblog.m4})}%
+\macrodef{loop}{loop}{({\sl initial assignments, test, loop end, statements})}%
+ {dpictools}%
+ {$\;\;$ C-like loop. Commas in arg3 and arg4 must
+ be in quotes or parentheses. Example:
+ {\tt loop(i=1, i<=3, i+=1, print i)} prints 1, 2, 3.}%
\macrodef{Loopover\_}{Loopover_}{(`{\sl variable}',{\sl actions},{\sl
- value1, value2, $\ldots$})}
- {gen}
+ value1, value2, $\ldots$})}%
+ {gen}%
{Repeat {\sl actions} with {\sl variable} set successively to
{\sl value1, value2, $\ldots$}, setting macro {\tt m4Lx} to 1, 2,
- $\ldots$, terminating if {\sl variable} is nul}
+ $\ldots$, terminating if {\sl variable} is nul}%
\macrodef{lpop}{lpop}{({\sl xcoord}, {\sl ycoord}, {\sl radius},
{\sl fill},
- {\sl zero ht})} {gen}
+ {\sl zero ht})} {gen}%
{for lollipop graphs: filled circle with stem to
- (xcoord,zeroht)}
-\macrodef{lp\_xy}{lp_xy}{}
- {log}
- {coordinates used by {\tt lg\_pin}}
-\macrodef{lswitch}{lswitch}{( \linespec, L|R, {\sl chars} )}
- {cct}
+ (xcoord,zeroht)}%
+\macrodef{lp\_xy}{lp_xy}{}%
+ {log}%
+ {coordinates used by {\tt lg\_pin}}%
+\macrodef{lswitch}{lswitch}{( \linespec, L|R, {\sl chars} )}%
+ {cct}%
{knife switch R=right orientation (default L=left);
- {\sl chars}=[O{\tt|}C][D][K][A] O=opening arrow; C=closing arrow;
- D=dots; K=closed switch; A=blade arrowhead \seesect{Twoterminal:}}
-\macrodef{lthick}{lthick}{}
- {gen}
- {current line thickness in drawing units}
-\macrodef{lt\_}{lt_}{}
- {gen}
- {left with respect to current direction}
-\macrodef{LT\_symbol}{LT_symbol}{(U|D|L|R|{\sl degrees})}
- {log}
- {logic-gate triangle symbol}
-\macrodef{L\_unit}{L_unit}{}
- {log}
- {logic-element grid size}
+ {\sl chars}: [O{\tt|}C][D][K][A] O=opening arrow; C=closing arrow;
+ D=dots; K=closed switch; A=blade arrowhead \seesect{Twoterminal:}}%
+\macrodef{lthick}{lthick}{}%
+ {gen}%
+ {current line thickness in drawing units}%
+\macrodef{lt\_}{lt_}{}%
+ {gen}%
+ {left with respect to current direction}%
+\macrodef{LT\_symbol}{LT_symbol}{(U|D|L|R|{\sl degrees})}%
+ {log}%
+ {logic-gate triangle symbol}%
+\macrodef{L\_unit}{L_unit}{}%
+ {log}%
+ {logic-element grid size}%
%
\Letter{M}%
-\macrodef{m4\_arrow}{m4_arrow}{(\linespec,{\sl ht},{\sl wid})}
- {gen}
- {arrow with adjustable head, filled when possible}
-\macrodef{m4dupstr}{m4dupstr}{({\sl string},{\sl n},`{\sl name}')}
- {gen}
+\macrodef{m4\_arrow}{m4_arrow}{(\linespec,{\sl ht},{\sl wid})}%
+ {gen}%
+ {arrow with adjustable head, filled when possible}%
+\macrodef{m4dupstr}{m4dupstr}{({\sl string},{\sl n},`{\sl name}')}%
+ {gen}%
{Defines {\sl name} as {\sl n} concatenated copies of {\sl
- string}.}
-\macrodef{m4lstring}{m4lstring}{({\sl arg1},{\sl arg2})}
- {gen}
+ string}.}%
+\macrodef{m4lstring}{m4lstring}{({\sl arg1},{\sl arg2})}%
+ {gen}%
{expand {\sl arg1} if it begins
- with {\tt sprintf} or {\tt "}, otherwise {\sl arg2}}
-\macrodef{m4xpand}{m4xpand}{({\sl arg})}
- {gen}
- {Evaluate the argument as a macro}
-\macrodef{m4xtract}{m4xtract}{(`{\sl string1}',{\sl string2})}
- {gen}
- {delete {\sl string2} from {\sl string1}, return 1 if present}
-\macrodef{manhattan}{manhattan}{}
- {gen}
- {sets direction cosines for left, right, up, down}
-\macrodef{Max}{Max}{({\sl arg, arg, $\ldots$})}
- {gen}
- {Max of an arbitrary number of inputs}
-\macrodef{memristor}{memristor}{({\sl linespec, wid, ht})}
- {cct}
- {memristor element\seesect{Twoterminal:}}
-\macrodef{microphone}{microphone}{( A|U|D|L|R|{\sl degrees, size})}
- {cct}
+ with {\tt sprintf} or {\tt "}, otherwise {\sl arg2}}%
+\macrodef{m4xpand}{m4xpand}{({\sl arg})}%
+ {gen}%
+ {Evaluate the argument as a macro}%
+\macrodef{m4xtract}{m4xtract}{(`{\sl string1}',{\sl string2})}%
+ {gen}%
+ {delete {\sl string2} from {\sl string1}, return 1 if present}%
+\macrodef{manhattan}{manhattan}{}%
+ {gen}%
+ {sets direction cosines for left, right, up, down}%
+\macrodef{Magn}{Magn}{({\sl length, height,} U|D|L|R|{\sl degrees})}%
+ {cct}%
+ {magnetic action symbol.}%
+\macrodef{Max}{Max}{({\sl arg, arg, $\ldots$})}%
+ {gen}%
+ {Max of an arbitrary number of inputs}%
+\macrodef{memristor}{memristor}{({\sl linespec, wid, ht, attributes})}%
+ {cct}%
+ {memristor element\seesect{Twoterminal:}}%
+\macrodef{microphone}{microphone}{( A|U|D|L|R|{\sl degrees, size, attributes})}%
+ {cct}%
{microphone; if arg1 = A: upright mic, otherwise arg1 sets
direction
of standard microphone with {\sl In1} to {\sl In3} defined
- \seesect{Composite:}}
-\macrodef{Min}{Min}{({\sl arg, arg, $\ldots$})}
- {gen}
- {Min of an arbitrary number of inputs}
+ \seesect{Composite:}}%
+\macrodef{Min}{Min}{({\sl arg, arg, $\ldots$})}%
+ {gen}%
+ {Min of an arbitrary number of inputs}%
\macrodef{Mitre\_}{Mitre_}{%
- ({\sl Line1,Line2,length,line attributes})}
- {gen}
+ ({\sl Line1,Line2,length,line attributes})}%
+ {gen}%
{e.g., {\tt Mitre\_(L,M)} draws angle at intersection of lines
L and M with legs of length arg3 (default {\tt linethick bp\_\_/2});
sets {\tt Here} to intersection
- \seesect{Corners:}}
+ \seesect{Corners:}}%
\macrodef{mitre\_}{mitre_}{%
- ({\sl Position1,Position2,Position3,length,line attributes})}
- {gen}
+ ({\sl Position1,Position2,Position3,length,line attributes})}%
+ {gen}%
{e.g., {\tt mitre\_(A,B,C)} draws angle ABC with legs
- of length arg4 (default {\tt linethick bp\_\_/2}); sets {\tt Here}
+ of length arg4 (default {\tt linethick bp\_\_/2}); sets {\tt Here}%
to Position2
- \seesect{Corners:}}
-\macrodef{mm\_\_}{mm__}{}
- {gen}
- {absolute millimetres}
-\macrodef{mosfet}{mosfet}{(\linespec,L|R,{\sl chars},E)}
- {cct}
+ \seesect{Corners:}}%
+\macrodef{mm\_\_}{mm__}{}%
+ {gen}%
+ {absolute millimetres}%
+\macrodef{mosfet}{mosfet}{(\linespec,L|R,{\sl chars},E)}%
+ {cct}%
{MOSFET left or right, included components defined by characters,
envelope.
- arg 3 chars:
- {\tt [u][d]B:} center bulk connection pin;
- {\tt D:} D pin and lead;
- {\tt E:} dashed substrate;
- {\tt F:} solid-line substrate;
- {\tt [u][d]G:} G pin to substrate at source;
- {\tt [u][d]H:} G pin to substrate at center;
- {\tt L:} G pin to channel (obsolete);
- {\tt [u][d]M:} G pin to channel, u: at drain end, d: at source end;
- {\tt [u][d]M{\sl n}:} multiple gates G0 to G{\sl n};
- {\tt Py:} parallel diode;
- {\tt Pz:} parallel zener diode;
- {\tt Q:} connect B pin to S pin;
- {\tt R:} thick channel;
- {\tt [u][d]S:} S pin and lead u: arrow up, d: arrow down;
- {\tt [d]T:} G pin to center of channel d: not circle;
- {\tt X:} XMOSFET terminal;
+ arg 3 chars:\\
+ {\tt [u][d]B:} center bulk connection pin\\
+ {\tt D:} D pin and lead\\
+ {\tt E:} dashed substrate\\
+ {\tt F:} solid-line substrate\\
+ {\tt [u][d]G:} G pin to substrate at source\\
+ {\tt [u][d]H:} G pin to substrate at center\\
+ {\tt L:} G pin to channel (obsolete)\\
+ {\tt [u][d]M:} G pin to channel, u: at drain end, d: at source end\\
+ {\tt [u][d]M{\sl n}:} multiple gates G0 to G{\sl n}\\
+ {\tt Py:} parallel diode\\
+ {\tt Pz:} parallel zener diode\\
+ {\tt Q:} connect B pin to S pin\\
+ {\tt R:} thick channel\\
+ {\tt [u][d]S:} S pin and lead u: arrow up, d: arrow down\\
+ {\tt [d]T:} G pin to center of channel d: not circle\\
+ {\tt X:} XMOSFET terminal\\
{\tt Z:} simplified complementary MOS
- \seesect{Semiconductors:}}
-\macrodef{Mux\_ht}{Mux_ht}{}
- {cct}
- {Mux height parameter in {\tt L\_unit}s}
+ \seesect{Semiconductors:}}%
+\macrodef{Mux\_ht}{Mux_ht}{}%
+ {cct}%
+ {Mux height parameter in {\tt L\_unit}s}%
\macrodef{Mux}{Mux}{({\sl n},{\sl label},
- {\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE], {\sl wid},{\sl ht}})}
- {log}
+ {\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE], {\sl wid}, {\sl ht},
+ {\sl attributes}})}%
+ {log}%
{binary multiplexer, $n$ inputs,
{\tt L} reverses input pin numbers, {\tt B} display binary pin
numbers, {\tt H} display hexadecimal pin numbers, {\tt X} do not
print pin numbers, {\tt N[{\sl n}]} puts Sel or Sel$0$ .. Sel$n$
at the top (i.e., to the left of the drawing direction), {\tt
- S[{\sl n}]} puts the Sel inputs at the bottom (default) {\tt OE}
- ({\tt N=}negated) {\tt OE} pin \seesect{Logicgates:}}
-\macrodef{Mux\_wid}{Mux_wid}{}
- {cct}
- {Mux width parameter in {\tt L\_unit}s}
-\macrodef{Mx\_pins}{Mx_pins}{}
- {log}
- {max number of gate inputs without wings}
+ S[{\sl n}]} puts the Sel inputs at the bottom (default) {\tt OE}%
+ ({\tt N}: negated) {\tt OE} pin \seesect{Logicgates:}}%
+\macrodef{Mux\_wid}{Mux_wid}{}%
+ {cct}%
+ {Mux width parameter in {\tt L\_unit}s}%
+\macrodef{Mx\_pins}{Mx_pins}{}%
+ {log}%
+ {max number of gate inputs without wings}%
%
\Letter{N}%
-\macrodef{NAND\_gate}{NAND_gate}{({\sl n},N)}
- {log}
- {`nand' gate, 2 or {\sl n\/} inputs; N=negated input.
- Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
+\macrodef{NAND\_gate}{NAND_gate}{({\tt {\sl n}, [N][B],
+ [{\sl wid}, [{\sl ht}]], {\sl attributes}})}%
+ {log}%
+ {`nand' gate, 2 or {\sl n\/} inputs ($0 \leq n \leq 16$);
+ {\tt N}: negated inputs; {\tt B}: box shape.
+ Alternatively, {\tt NAND\_gate({\sl chars}, [B], {\sl wid},
+ {\sl ht}, {\sl attributes})}, where
+ arg1 is a sequence of letters {\tt P|N} to define
normal or negated inputs.
- \seesect{Logicgates:}}
-\macrodef{N\_diam}{N_diam}{}
- {log}
- {diameter of `not' circles in {\tt L\_unit}s}
-\macrodef{NeedDpicTools}{NeedDpicTools}{}
- {gen}
+ \seesect{Logicgates:}}%
+\macrodef{N\_diam}{N_diam}{}%
+ {log}%
+ {diameter of `not' circles in {\tt L\_unit}s}%
+\macrodef{NeedDpicTools}{NeedDpicTools}{}%
+ {gen}%
{executes {\tt copy "HOMELIB\_/dpictools.pic"} if the file has
- not been read}
-\macrodef{neg\_}{neg_}{}
- {gen}
- {unary negation}
-\macrodef{ne\_}{ne_}{}
- {gen}
- {.ne with respect to current direction}
-\macrodef{n\_}{n_}{}
- {gen}
- {.n with respect to current direction}
-\macrodef{norator}{norator}{(\linespec,{\sl width},{\sl ht})}
- {cct}
- { norator two-terminal element \seesect{Twoterminal:}}
-\macrodef{NOR\_gate}{NOR_gate}{({\sl n},N)}
- {log}
- {`nor' gate, 2 or {\sl n\/} inputs; N=negated input.
+ not been read}%
+\macrodef{neg\_}{neg_}{}%
+ {gen}%
+ {unary negation}%
+\macrodef{ne\_}{ne_}{}%
+ {gen}%
+ {.ne with respect to current direction}%
+\macrodef{n\_}{n_}{}%
+ {gen}%
+ {.n with respect to current direction}%
+\macrodef{norator}{norator}{(\linespec,{\sl width},{\sl ht},{\sl attributes})}%
+ {cct}%
+ { norator two-terminal element \seesect{Twoterminal:}}%
+\macrodef{NOR\_gate}{NOR_gate}{({\sl n},N)}%
+ {log}%
+ {`nor' gate, 2 or {\sl n\/} inputs; {\tt N}: negated input.
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
- \seesect{Logicgates:}}
-\macrodef{NOT\_circle}{NOT_circle}{}
- {log}
- {`not' circle}
-\macrodef{NOT\_gate}{NOT_gate}{(\linespec,[B][N|n],{\sl wid},{\sl
-height})}
- {log}
+ \seesect{Logicgates:}}%
+\macrodef{NOT\_circle}{NOT_circle}{}%
+ {log}%
+ {`not' circle}%
+\macrodef{NOT\_gate}{NOT_gate}{(\linespec,[B][N|n],{\sl wid},{\sl height},
+ {\sl attributes})}%
+ {log}%
{`not' gate.
When {\sl linespec} is blank then the element is composite and In1,
Out, C, NE, and SE are defined; otherwise the element is drawn as a
- two-terminal element. arg2: {\tt B}=box gate, {\tt N}=not circle at
- input and output, {\tt n}=not circle at input only
- \seesect{Logicgates:}}
-\macrodef{NOT\_rad}{NOT_rad}{}
- {log}
- {`not' radius in absolute units}
-\macrodef{NPDT}{NPDT}{({\sl npoles,}[R])}
- {cct}
+ two-terminal element. arg2: {\tt B}: box gate, {\tt N}: not circle at
+ input and output, {\tt n}: not circle at input only
+ \seesect{Logicgates:}}%
+\macrodef{NOT\_rad}{NOT_rad}{}%
+ {log}%
+ {`not' radius in absolute units}%
+\macrodef{NPDT}{NPDT}{({\sl npoles,}[R])}%
+ {cct}%
{Double-throw switch; {\sl npoles:} number of poles;
- {\tt R}= right orientation with respect to drawing direction
- \seesect{Composite:}}
+ {\tt R}: right orientation with respect to drawing direction
+ \seesect{Composite:}}%
\macrodef{nport}{nport}{({\sl box spec{\tt ;}other commands,
-nw,nn,ne,ns,space ratio,pin lgth,style, other commands})}
- {cct}
+nw,nn,ne,ns,space ratio,pin lgth,style, other commands})}%
+ {cct}%
{ Default is a standard-box twoport. Args 2 to 5 are
the number of ports to be drawn on w, n, e, s sides. The port pins
are named by side, number, and by a or b pin, e.g., W1a, W1b, W2a,
$\ldots$ Arg 6 specifies the ratio of port width to interport space
(default 2), and arg 7 is the pin length. Set arg 8 to N to omit
the dots on the port pins. Arguments 1 and 9 allow customizations
- \seesect{Composite:}}
-\macrodef{N\_rad}{N_rad}{}
- {log}
- {radius of `not' circles in {\tt L\_unit}s}
+ \seesect{Composite:}}%
+\macrodef{N\_rad}{N_rad}{}%
+ {log}%
+ {radius of `not' circles in {\tt L\_unit}s}%
\macrodef{nterm}{nterm}{({\sl box spec{\tt ;}other commands,
-nw,nn,ne,ns,pin lgth,style, other commands})}
- {cct}
+nw,nn,ne,ns,pin lgth,style, other commands})}%
+ {cct}%
{n-terminal box macro (default three pins).
Args 2 to 5 are the number of pins to be drawn on W, N, E, S
sides. The pins are named by side and number, e.g. W1, W2, N1,
$\ldots$ Arg 6 is the pin length. Set arg 7 to N to omit the
dots on the pins. Arguments 1 and 8 allow customizations, e.g.
{\tt nterm(,{,},{,},{,}N,"\$a\$" at Box.w ljust,"\$b\$" at Box.e rjust,
- "\$c\$" at Box.s above)} }
-\macrodef{nullator}{nullator}{(\linespec,{\sl width},{\sl ht})}
- {cct}
- { nullator two-terminal element \seesect{Twoterminal:}}
-\macrodef{nw\_}{nw_}{}
- {gen}
- {.nw with respect to current direction}
-\macrodef{NXOR\_gate}{NXOR_gate}{({\sl n},N)}
- {log}
- {`nxor' gate, 2 or {\sl n\/} inputs; N=negated input.
+ "\$c\$" at Box.s above)} }%
+\macrodef{nullator}{nullator}{(\linespec,{\sl width},{\sl ht},{\sl attributes})}%
+ {cct}%
+ { nullator two-terminal element \seesect{Twoterminal:}}%
+\macrodef{nw\_}{nw_}{}%
+ {gen}%
+ {.nw with respect to current direction}%
+\macrodef{NXOR\_gate}{NXOR_gate}{({\sl n},N)}%
+ {log}%
+ {`nxor' gate, 2 or {\sl n\/} inputs; {\tt N}: negated input.
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
- \seesect{Logicgates:}}
+ \seesect{Logicgates:}}%
%
\Letter{O}%
-\macrodef{opamp}{opamp}{(\linespec,{\sl label},{\sl
-label},{\sl size},{\sl
- chars}, other commands)}
- {cct}
- {operational amplifier with $-,$ $+$ or other internal labels,
- specified size. {\sl chars:} {\tt P=} add power connections, {\tt
- R=} swap In1, In2 labels, {\tt T=} truncated point. The internally
+\macrodef{opamp}{opamp}{\tt (\linespec,{\sl label, label, size|keys, chars,
+ other commands})}%
+ {cct}%
+ {operational amplifier with $-,$ $+$ or other internal labels and
+ specified size, drawn in a {\tt [ ]} block.
+ {\sl chars:} {\tt P} add power connections, {\tt
+ R} swap {\sl In1, In2 labels,} {\tt T} truncated point. The internally
defined positions are {\sl W, N, E, S, Out, NE, SE, In, In2}, and
- the (obsolete) positions {\sl E1 = NE, E2 = SE}. The first and last
- arguments allow added customizations
- \seesect{Composite:}}
-\macrodef{open\_arrow}{open_arrow}{(\linespec,{\sl ht},{\sl wid})}
- {gen}
- {arrow with adjustable open head}
-\macrodef{OR\_gate}{OR_gate}{({\sl n},N)}
- {log}
- {`or' gate, 2 or {\sl n\/} inputs; N=negated input.
+ the (obsolete) positions {\sl E1 = NE, E2 = SE}. Instead of a size
+ value, arg4 can be a key-value sequence. The keys are:
+ {\tt lgth={\sl expr};},
+ {\tt wdth={\sl expr};},
+ {\tt body={\sl attributes};}, e.g., {\tt body=shaded "{\sl color}"}.
+ \seesect{Composite:}}%
+\macrodef{open\_arrow}{open_arrow}{(\linespec,{\sl ht},{\sl wid})}%
+ {gen}%
+ {arrow with adjustable open head}%
+\macrodef{OR\_gate}{OR_gate}{({\sl n},[N][B], {\sl wid,} {\sl ht,}%
+ {\sl attributes})}%
+ {log}%
+ {Or gate, $n$ inputs ($0 \leq n \leq 16$); arg2: {\tt N}: negated inputs;
+ {\tt B}: box gate.
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
- \seesect{Logicgates:}}
-\macrodef{OR\_gen}{OR_gen}{($n$,{\sl chars},[{\sl wid},[{\sl ht}]])}
- {log}
- {general OR gate: $n$=number of inputs $(0\leq n\leq 16)$;
- {\sl chars:} B=base and straight sides; A=Arcs;
- [N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles; [N]P=XOR arc;
- [N]O=output; C=center.
+ \seesect{Logicgates:}}%
+\macrodef{OR\_gen}{OR_gen}{($n$,{\sl chars},[{\sl wid},[{\sl ht}]],
+ {\sl attributes})}%
+ {log}%
+ {General OR gate: $n$=number of inputs $(0\leq n\leq 16)$;
+ {\sl chars:}%
+ {\tt B}: base and straight sides;\\
+ {\tt A}: arcs;\\
+ {\tt [N]NE,[N]SE,[N]I,[N]N,[N]S}: inputs or circles;\\
+ {\tt [N]P}: XOR arc;\\
+ {\tt [N]O}: output; C=center.\\
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
- normal or negated inputs.}
-\macrodef{OR\_rad}{OR_rad}{}
- {log}
- {radius of OR input face in {\tt L\_unit}s}
+ normal or negated inputs. If arg5 contains {\tt shaded rgbstring(...)}%
+ the arguments of {\tt rgbstring} may not contain parentheses.}%
+\macrodef{OR\_rad}{OR_rad}{}%
+ {log}%
+ {radius of OR input face in {\tt L\_unit}s}%
%
\Letter{P}%
\macrodef{parallel\_}{parallel_}{(\char96{\sl elementspec}\char39,%
- \char96{\sl elementspec}\char39 $\ldots$)}
- {cct}
- { Parallel combination of two-terminal elements in a {\tt [
- ]} block.
- Each argument is a {\em quoted} elementspec of the form {\tt[Sep={\sl
- val};][{\sl Label}:] {\sl element}; [{\sl attributes}]} where
- an {\sl attribute} is of the form {\tt[llabel($\ldots$);] |
- [rlabel($\ldots$);] | [b\_current($\ldots$);]}. An argument may
- also be {\tt series\_($\ldots$)} or {\tt parallel\_($\ldots$)} {\em
- without} attributes or quotes. Sep={\sl val}; in the first branch
- sets the default separation of all branches to {\sl val}; in a later
- element Sep={\sl val}; applies only to that branch. An element may
- have normal arguments but should not change the drawing direction.
- \seesect{Seriesandparallel:}}
-\macrodef{pconnex}{pconnex}{(R|L|U|D|{\sl degrees},{\sl chars})}
- {cct}
- {power connectors, arg 1: drawing direction; {\sl chars:}
- {\tt R}=right orientation, {\tt M|F}= male, female, {\tt A|AC}=115V,
- 3 prong, B=box, C=circle, {\tt P}= PC connector, {\tt D}= 2-pin
- connector, {\tt G|GC}= GB 3-pin, {\tt J}= 110V 2-pin
- \seesect{Composite:}}
-\macrodef{pc\_\_}{pc__}{}
- {gen}
- {absolute points}
-\macrodef{perpto}{perpto}{({\sl Pos1, Line, Point})}
- {gen}
+ \char96{\sl elementspec}\char39 $\ldots$)}%
+ {cct}%
+ { Parallel combination of two-terminal elements in a {\tt []} block.
+ Each argument is a {\em quoted} elementspec of the form\\
+ {\tt[Sep={\sl val};][{\sl Label}:]{\sl element};[{\sl attributes}]} where
+ an {\sl attribute} is of the form\\
+ {\tt[llabel($\ldots$);]|[rlabel($\ldots$);]|[b\_current($\ldots$);]}.\\
+ An argument may also be {\tt series\_($\ldots$)} or {\tt
+ parallel\_($\ldots$)} {\em without} attributes or quotes. Sep={\sl
+ val}; in the first branch sets the default separation of all branches
+ to {\sl val}; in a later element Sep={\sl val}; applies only to
+ that branch. An element may have normal arguments but should not
+ change the drawing direction.
+ \seesect{Seriesandparallel:}}%
+\macrodef{pconnex}{pconnex}{(R|L|U|D|{\sl degrees},{\sl chars, attributes})}%
+ {cct}%
+ {power connectors, arg 1: drawing direction; {\sl chars:}\\
+ {\tt R} (right orientation)\\
+ {\tt M|F} (male, female)\\
+ {\tt A[B]|AC} (115V 3-prong, B: default box, C: circle)\\
+ {\tt P} (PC connector)\\
+ {\tt D} (2-pin connector)\\
+ {\tt G|GC} (GB 3-pin)\\
+ {\tt J} (110V 2-pin)
+ \seesect{Composite:}}%
+\macrodef{pc\_\_}{pc__}{}%
+ {gen}%
+ {absolute points}%
+\macrodef{perpto}{perpto}{({\sl Pos1, Line, Point})}%
+ {gen}%
{{\sl Point} is the label for the point on {\sl Line} of the
perpendicular
- from {\sl Point} to {\sl Line}.}
-\macrodef{PerpTo}{PerpTo}{({\sl Pos1, Pos2, Pos3})}
- {gen}
+ from {\sl Point} to {\sl Line}.}%
+\macrodef{PerpTo}{PerpTo}{({\sl Pos1, Pos2, Pos3})}%
+ {gen}%
{The point between Pos2 and Pos3 of intersection of the perpendicular
to Pos1, i.e., the perpendicular projection of Pos1 onto the line
- from Pos2 to Pos3.}
-\macrodef{pi\_}{pi_}{}
- {gen}
- {$\pi$}
-\macrodef{plug}{plug}{(U|D|L|R|{\sl degrees},[2|3][R])}
- {cct}
+ from Pos2 to Pos3.}%
+\macrodef{pi\_}{pi_}{}%
+ {gen}%
+ {$\pi$}%
+\macrodef{plug}{plug}{(U|D|L|R|{\sl degrees},[2|3][R])}%
+ {cct}%
{arg1: drawing direction; string arg2: {\tt R} right orientation,
- {\tt 2|3} number of conductors \seesect{Composite:}}
-\macrodef{pmod}{pmod}{({\sl integer}, {\sl integer})}
- {gen}
- {+ve $\hbox{mod}(M,N)$ e.g., $\hbox{\tt pmod}(-3,5)=2$}
-\macrodef{point\_}{point_}{({\sl angle})}
- {gen}
- {(radians) set direction cosines}
-\macrodef{Point\_}{Point_}{({\sl integer})}
- {gen}
- {sets direction cosines in degrees \seesect{Placing:}}
-\macrodef{polar\_}{polar_}{({\sl x},{\sl y})}
- {gen}
- {rectangular-to polar conversion}
+ {\tt 2|3} number of conductors \seesect{Composite:}}%
+\macrodef{pmod}{pmod}{({\sl integer}, {\sl integer})}%
+ {gen}%
+ {+ve $\hbox{mod}(M,N)$ e.g., $\hbox{\tt pmod}(-3,5)=2$}%
+\macrodef{point\_}{point_}{({\sl angle})}%
+ {gen}%
+ {(radians) set direction cosines}%
+\macrodef{Point\_}{Point_}{({\sl integer})}%
+ {gen}%
+ {sets direction cosines in degrees \seesect{Placing:}}%
+\macrodef{polar\_}{polar_}{({\sl x},{\sl y})}%
+ {gen}%
+ {rectangular-to polar conversion}%
+\macrodef{polygon}{polygon}{({\sl n},{\sl keys})}%
+ {gen}%
+ {Regular polygon in a {\tt []} block. The keys are
+ {\tt line={\sl line attributes};} (e.g., {\tt dashed shaded "blue"}),
+ {\tt rot={\sl degrees};} (angle of first internal vertex {\tt V[0]}),
+ {\tt side|rad={\sl expression};} size by side length or by radius.
+ The internal defined points are the centre {\tt C} and vertices
+ {\tt V[0]} $\ldots$ {\tt V[{\sl n}-1]}. }%
+\macrodef{posarray}{posarray}{({\sl Name, Position1, Position2, \ldots})}%
+ {dpictools}%
+ {$\;\;$ Populate a singly-subscripted array of positions:
+ {\tt {\sl Name}[1]:{\sl Position1;}%
+ {\sl Name}[2]={\sl Position2;} \ldots}.}%
+\macrodef{posarray2}{posarray2}{({\sl Name, expr, Position1, Position2,
+ \ldots})}%
+ {dpictools}%
+ {$\;\;$ Populate a doubly-subscripted array of positions:
+ {\tt {\sl Name}[{\sl expr},1]={\sl Position1;}%
+ {\sl Name}[{\sl expr},2]={\sl Position2;} \ldots}.}%
\macrodef{potentiometer}{potentiometer}{(\linespec,%
- {\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)} {cct}
+ {\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)} {cct}%
{resistor with taps T1, T2, $\ldots$
with specified fractional positions and lengths (possibly neg)
- \seesect{Composite:}}
-\macrodef{print3D}{print3D}{(x,y,z)}
- {3D} {write out triple for debugging}
-\macrodef{prod\_}{prod_}{({\sl a},{\sl b})}
- {gen}
- {binary multiplication}
-\macrodef{project}{project}{({\sl x},({\sl y},({\sl z})}
- {3D} {3D to 2D projection onto the plane perpendicular to the view
- vector with
- angles defined by {\tt setview({\sl azim, elev})}}
-\macrodef{proximity}{proximity}{(\sl linespec)}
- {cct}
- {proximity detector (= {\tt consource(,P)})}
-\macrodef{psset\_}{psset_}{({\sl PSTricks settings})}
- {gen}
- {set PSTricks parameters}
-\macrodef{PtoL}{PtoL}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) }
- {gen}
+ \seesect{Composite:}}%
+\macrodef{print3D}{print3D}{(x,y,z)}%
+ {3D} {write out triple for debugging}%
+\macrodef{prod\_}{prod_}{({\sl a},{\sl b})}%
+ {gen}%
+ {binary multiplication}%
+\macrodef{project}{project}{({\sl x},{\sl y},{\sl z})}%
+ {3D}%
+ {3D to 2D projection onto the plane perpendicular to the view
+ vector {\tt View3D} with angles defined by
+ {\tt setview({\sl azimuth, elevation, rotation})}.}%
+\macrodef{Proxim}{Proxim}{({\sl size,} U|D|L|R|{\sl degrees, attributes})}%
+ {cct}%
+ {proximity detector with fillable body.}%
+\macrodef{proximity}{proximity}{(\sl linespec)}%
+ {cct}%
+ {proximity detector (= {\tt consource(,P)})}%
+\macrodef{psset\_}{psset_}{({\sl PSTricks settings})}%
+ {gen}%
+ {set PSTricks parameters}%
+\macrodef{PtoL}{PtoL}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) }%
+ {gen}%
{Evaluates to {\tt from {\sl position} to
- {\sl position} + Rect\_({\sl length, angle}) }
- from the polar-coordinate data in the arguments }
-\macrodef{pt\_\_}{pt__}{}
- {gen}
- {\TeX\ point-size factor, in scaled inches, ({\tt *scale/72.27})}
-\macrodef{ptrans}{ptrans}{(\linespec, [R|L])}
- {cct}
+ {\sl position} + Rect\_({\sl length, angle}) }%
+ from the polar-coordinate data in the arguments }%
+\macrodef{pt\_\_}{pt__}{}%
+ {gen}%
+ {\TeX\ point-size factor, in scaled inches, ({\tt *scale/72.27})}%
+\macrodef{ptrans}{ptrans}{(\linespec, [R|L])}%
+ {cct}%
{pass transistor; {\tt L=} left orientation
- \seesect{Semiconductors:}}
-\macrodef{pushkey\_}{pushkey_}{({\sl string, key, default value,}[N])}
- {gen}
+ \seesect{Semiconductors:}}%
+\macrodef{pushkey\_}{pushkey_}{({\sl string, key, default value,}[N])}%
+ {gen}%
{Key-value definition.
If {\sl string} contains the substring
- {\sl key}{\tt =}{\sl expr} then macro {\tt m4{\sl key}}
+ {\sl key}{\tt =}{\sl expr} then macro {\tt m4{\sl key}}%
is defined using {\tt pushdef()} to
expand to {\tt ({\sl expr})}, or to {\tt ({\sl default value})} if the
substring is missing. Arg 1 can contain several such substrings separated
by semicolons.
If arg4 is nonblank, the parentheses are omitted.
- \seesect{Macroarguments:}}
-\macrodef{pushkeys\_}{pushkeys_}{({\sl string, key sequence})}
- {gen}
+ \seesect{Macroarguments:}}%
+\macrodef{pushkeys\_}{pushkeys_}{({\sl string, key sequence})}%
+ {gen}%
{Multiple key-value definitions. Arg 2 is a semicolon-separated
- sequence of terms of the form {\tt {\sl key}:{\sl default value}:[N]}
+ sequence of terms of the form {\tt {\sl key}:{\sl default value}:[N]}%
which must contain no semicolons and the default values contain no colons.
Macro {\tt pushkey\_} is applied to each of the terms in order.
- \seesect{Macroarguments:}}
-\macrodef{pvcell}{pvcell}{({\sl linespec, width, height})}
- {cct}
- {PV cell}
-\macrodef{px\_\_}{px__}{}
- {gen}
- {absolute SVG screen pixels}
+ \seesect{Macroarguments:}}%
+\macrodef{pvcell}{pvcell}{({\sl linespec, width, height, attributes})}%
+ {cct}%
+ {PV cell}%
+\macrodef{px\_\_}{px__}{}%
+ {gen}%
+ {absolute SVG screen pixels}%
%
\Letter{R}%
-\macrodef{rarrow}{rarrow}{({\sl label,{\tt ->|<-},{\sl dist}})}
- {cct}
+\macrodef{randn}{randn}{({\sl array name, $n,$ mean, stddev})}%
+ {dpictools}%
+ {$\;\;$ Assign $n$ Gaussian random numbers in array
+ $\hbox{\sl name}[1], \hbox{\sl name}[2], \ldots \hbox{\sl name}[n]$
+ with given mean and standard deviation.}%
+\macrodef{rarrow}{rarrow}{({\sl label,{\tt ->|<-},{\sl dist}})}%
+ {cct}%
{arrow {\sl dist} to right of last-drawn 2-terminal element
- \seesect{Branchcurrent:}}
-\macrodef{Rect\_}{Rect_}{({\sl radius},{\sl angle})}
- {gen}
- {(deg) polar-to-rectangular conversion}
-\macrodef{rect\_}{rect_}{({\sl radius},{\sl angle})}
- {gen}
- {(radians) polar-rectangular conversion}
+ \seesect{Branchcurrent:}}%
+\macrodef{Rect\_}{Rect_}{({\sl radius},{\sl angle})}%
+ {gen}%
+ {(deg) polar-to-rectangular conversion}%
+\macrodef{rect\_}{rect_}{({\sl radius},{\sl angle})}%
+ {gen}%
+ {(radians) polar-rectangular conversion}%
\macrodef{reed}{reed}{({\sl linespec, width, height, box attribues},
-[R][C])}
- {cct}
+[R][C])}%
+ {cct}%
{Enclosed reed two-terminal contact;
- {\tt R}=right orientation; {\tt C}=closed contact; e.g., {\tt
- reed(,,dimen\_/5,shaded "lightgreen"} \seesect{Composite:}}
+ {\tt R}: right orientation; {\tt C}: closed contact; e.g., {\tt
+ reed(,{,}dimen\_/5,shaded "lightgreen"} \seesect{Composite:}}%
\macrodef{relaycoil}{relaycoil}{({\sl chars, wid, ht,} R|L|U|D|{\sl
-degrees})}
- {cct}
+degrees, attributes})}%
+ {cct}%
{chars:
- {\tt X}=or default: external lines from A2 and B2; {\tt AX}=external
- lines at positions A1,A3; {\tt BX}=external lines at positions
- B1,B3; {\tt NX}=no lines at positions A1,A2,A3,B1,B2,B3; {\tt
- SO}=slow operating; {\tt SOR}=slow operating and release; {\tt
- SR}=slow release; {\tt HS}=high speed; {\tt NAC}=unaffected by AC
- current; {\tt AC AC}=current; {\tt ML}=mechanically latched; {\tt
- PO}=polarized; {\tt RM}=remanent; {\tt RH}=remanent; {\tt TH}=thermal;
- {\tt EL}=electronic
- \seesect{Composite:}}
-\macrodef{relay}{relay}{({\sl number of poles, chars})}
- {cct}
- {relay: n poles (default 1), {\sl chars:} {\tt O}=normally open,
- {\tt C}=normally closed, {\tt P}=three position, default double
- throw, {\tt L}=drawn left (default), {\tt R}=drawn right, {\tt
- Th}=thermal. Argument 3={\tt [L|R]} is deprecated but works for
- backward compatibility
- \seesect{Composite:}}
-\macrodef{resetdir\_}{resetdir_)}{}
- {gen}
- {resets direction set by {\tt setdir\_}}
-\macrodef{resetrgb}{resetrgb}{}
- {gen}
- {cancel {\tt r\_, g\_, b\_} color definitions}
-\macrodef{resistor}{resistor}{(\linespec,n|E,{\sl chars}, {\sl
- cycle wid})}
- {cct}
- {resistor, n cycles (default 3), {\sl chars:}
- {\tt AC}=general complex element,
- {\tt E}={\tt ebox}, {\tt ES}={\tt ebox} with slash, {\tt Q}=offset,
- {\tt H}=squared, {\tt N}=IEEE, {\tt B}=not burnable, {\tt V}=varistor
- variant, {\tt R}=right-oriented, {\sl cycle width} (default {\tt
- dimen\_}$/6$) \seesect{Twoterminal:}}
-\macrodef{resized}{resized}{({\sl factor},`{\sl macro name}',args)}
- {cct}
- {scale the element body size by {\sl factor}}
-\macrodef{restorem4dir}{restorem4dir}{([`{\sl stack name}'])}
- {gen}
+ {\tt X}: or default: external lines from A2 and B2;\\
+ {\tt AX}: external lines at positions A1,A3;\\
+ {\tt BX}: external lines at positions B1,B3;\\
+ {\tt NX}: no lines at positions A1,A2,A3,B1,B2,B3;\\
+ {\tt SO}: slow operating;\\
+ {\tt SOR}: slow operating and release;\\
+ {\tt SR}: slow release;\\
+ {\tt HS}: high speed;\\
+ {\tt NAC}: unaffected by AC current;\\
+ {\tt AC}: AC current;\\
+ {\tt ML}: mechanically latched;\\
+ {\tt PO}: polarized;\\
+ {\tt RM}: remanent;\\
+ {\tt RH}: remanent;\\
+ {\tt TH}: thermal;\\
+ {\tt EL}: electronic
+ \seesect{Composite:}}%
+\macrodef{relay}{relay}{({\sl number of poles, chars, attributes})}%
+ {cct}%
+ {relay: n poles (default 1),\\
+ {\sl chars:} {\tt O}: normally open,\\
+ {\tt C}: normally closed,\\
+ {\tt P}: three position, default double throw,\\
+ {\tt L}: drawn left (default),\\
+ {\tt R}: drawn right,\\
+ {\tt Th}: thermal.\seesect{Composite:}}%
+\macrodef{resetdir\_}{resetdir_)}{}%
+ {gen}%
+ {resets direction set by {\tt setdir\_}}%
+\macrodef{resetrgb}{resetrgb}{}%
+ {gen}%
+ {cancel {\tt r\_, g\_, b\_} color definitions}%
+\macrodef{resistor}{resistor}{(\linespec, n|E, {\sl chars}, {\sl cycle wid})}%
+ {cct}%
+ {resistor, n cycles (default 3), {\sl chars:}\\
+ {\tt AC}: general complex element,\\
+ {\tt E}: {\tt ebox},\\
+ {\tt ES}: {\tt ebox} with slash,\\
+ {\tt Q}: offset,\\
+ {\tt H}: squared,\\
+ {\tt N}: IEEE,\\
+ {\tt B}: not burnable,\\
+ {\tt V}: varistor variant,\\
+ {\tt R}: right-oriented,\\
+ {\sl cycle width} (default {\tt dimen\_}$/6$)
+ \seesect{Twoterminal:}}%
+\macrodef{resized}{resized}{({\sl factor},`{\sl macro name}',args)}%
+ {cct}%
+ {scale the element body size by {\sl factor}}%
+\macrodef{restorem4dir}{restorem4dir}{([`{\sl stack name}'])}%
+ {gen}%
{Restore m4 direction parameters from the named stack;
- default {\tt `savm4dir\_'}}
-\macrodef{reversed}{reversed}{(`{\sl macro name}',args)}
- {cct}
- {reverse polarity of 2-terminal element}
-\macrodef{rgbdraw}{rgbdraw}{({\sl color triple}, {\sl drawing commands})}
- {gen}
+ default {\tt `savm4dir\_'}}%
+\macrodef{reversed}{reversed}{(`{\sl macro name}',args)}%
+ {cct}%
+ {reverse polarity of 2-terminal element}%
+\macrodef{rgbdraw}{rgbdraw}{({\sl color triple}, {\sl drawing commands})}%
+ {gen}%
{color drawing for PSTricks, pgf, MetaPost, SVG postprocessors;
(color entries are 0 to 1),
see {\tt setrgb} \seesect{Semiconductors:}. Exceptionally, the color
of SVG arrows other than the default black has to be defined using the
- {\tt outlined }{\sl string} and {\tt shaded }{\sl string} constructs.}
-\macrodef{rgbfill}{rgbfill}{({\sl color triple}, {\sl closed path})}
- {gen}
+ {\tt outlined }{\sl string} and {\tt shaded }{\sl string} constructs.}%
+\macrodef{rgbfill}{rgbfill}{({\sl color triple}, {\sl closed path})}%
+ {gen}%
{fill with arbitrary color (color entries are 0 to 1); see {\tt
- setrgb}\seesect{Semiconductors:}}
-\macrodef{rgbstring}{rgbstring}{({\sl color triple or color name})}
- {gen}
+ setrgb}\seesect{Semiconductors:}}%
+\macrodef{rgbstring}{rgbstring}{({\sl color triple or color name})}%
+ {gen}%
{evaluates to a string compatible with the postprocessor in use
to go with {\tt colored}, {\tt shaded}, or {\tt outlined} attributes.
(PSTricks, metapost, pgf-tikz, pdf, postscript, svg). The arguments
are fractions in the range $[0,1]$; For example, {\tt box outlined
rgbstring(0.1,0.2,0.7) shaded rgbstring(0.75,0.5,0.25)}. For those
postprocessors that allow it, there can be one argument which is the
- name of a defined color}
+ name of a defined color}%
+\macrodef{rgbtocmyk}{rgbtocmyk}{({\sl r, g, b, c, m, y, k})}%
+ {dpictools}%
+ {$\;\;$ rgb to cmyk values in the range 0 to 100.}%
+\macrodef{rgbtohsv}{rgbtohsv}{({\sl r, g, b, h, s, v})}%
+ {dpictools}%
+ {$\;\;$ rgb color triple to hsv with {\sl h} range 0 to 360.}%
\macrodef{RightAngle}{RightAngle}{({\sl Pos1, Pos2, Pos3, line len,
- attributes})} {gen}
+ attributes})} {gen}%
{Draw a right-angle symbol at {\sl Pos2}, of size
given by arg4. Arg5 =
- line attributes, e.g., {\tt outlined "gray"}}
-\macrodef{right\_}{right_}{}
- {gen}
- {set current direction right \seesect{Placing:}}
-\macrodef{rjust\_}{rjust_}{}
- {gen}
- {right justify with respect to current direction}
+ line attributes, e.g., {\tt outlined "gray"}}%
+\macrodef{right\_}{right_}{}%
+ {gen}%
+ {set current direction right \seesect{Placing:}}%
+\macrodef{rjust\_}{rjust_}{}%
+ {gen}%
+ {right justify with respect to current direction}%
\macrodef{rlabel}{rlabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],%
- [{\sl block name}])}
- {cct}
+ [{\sl block name}])}%
+ {cct}%
{Triple label on the right of the body of an element with respect to the
current direction \seesect{Labels:}. Labels are placed at the
beginning, centre, and end of the last {\tt []} block (or a named
@@ -1775,54 +2069,54 @@ degrees})}
{\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt
right} to supplement the default relative position. The fifth
argument is the optional name of the {\tt []} block to be labelled,
- which is {\tt last []} by default}
-\macrodef{rot3Dx}{rot3Dx}{({\sl radians,x,y,z})}
- {3D} {rotates x,y,z about x axis}
-\macrodef{rot3Dy}{rot3Dy}{({\sl radians,x,y,z})}
- {3D} {rotates x,y,z about y axis}
-\macrodef{rot3Dz}{rot3Dz}{({\sl radians,x,y,z})}
- {3D} {rotates x,y,z about z axis}
-\macrodef{rotbox}{rotbox}{({\sl wid,ht,type},[r|t={\sl val}])}
- {gen}
+ which is {\tt last []} by default}%
+\macrodef{rot3Dx}{rot3Dx}{({\sl radians,x,y,z})}%
+ {3D} {rotates x,y,z about x axis}%
+\macrodef{rot3Dy}{rot3Dy}{({\sl radians,x,y,z})}%
+ {3D} {rotates x,y,z about y axis}%
+\macrodef{rot3Dz}{rot3Dz}{({\sl radians,x,y,z})}%
+ {3D} {rotates x,y,z about z axis}%
+\macrodef{rotbox}{rotbox}{({\sl wid,ht,type},[r|t={\sl val}])}%
+ {gen}%
{box oriented in current direction in {\tt [ ]} block;
- {\sl type}= e.g. {\tt dotted shaded "green".} Defined internal
+ {\sl type=} e.g. {\tt dotted shaded "green".} Defined internal
locations: N, E, S, W (and NE, SE, NW, SW if arg4 is blank). If arg4
is {\tt r=}{\sl val} then corners have radius {\sl val}. If arg4 is
{\tt t=}{\sl val} then a spline with tension {\sl val} is used to draw
- a ``superellipse,'' and the bounding box is then only approximate. }
-\macrodef{rotellipse}{rotellipse}{({\sl wid,ht,attributes})}
- {gen}
+ a ``superellipse,'' and the bounding box is then only approximate. }%
+\macrodef{rotellipse}{rotellipse}{({\sl wid,ht,attributes})}%
+ {gen}%
{ellipse oriented in current direction in {\tt [ ]} block;
e.g. {\tt Point\_(45); rotellipse(,{},dotted fill\_(0.9)).} Defined
- internal locations: N, S, E, W.}
-\macrodef{Rot\_}{Rot_}{({\sl position, degrees})}
- {gen}
- {rotate position by degrees}
-\macrodef{rot\_}{rot_}{({\sl x, y, angle})}
- {gen}
- {rotate {\sl x,y} by theta radians}
-\macrodef{round}{round}{(at {\sl location,line thickness,attributes})}
- {gen}
+ internal locations: N, S, E, W.}%
+\macrodef{Rot\_}{Rot_}{({\sl position, degrees})}%
+ {gen}%
+ {rotate position by degrees}%
+\macrodef{rot\_}{rot_}{({\sl x, y, angle})}%
+ {gen}%
+ {rotate {\sl x,y} by theta radians}%
+\macrodef{round}{round}{(at {\sl location,line thickness,attributes})}%
+ {gen}%
{filled circle for rounded corners; attributes={\tt colored
- "gray"}
+ "gray"}%
for example; leaves {\tt Here} unchanged if arg1 is blank
- \seesect{Corners:}}
-\macrodef{rpoint\_}{rpoint_}{(\linespec)}
- {gen}
- {set direction cosines}
-\macrodef{rpos\_}{rpos_}{({\sl position})}
- {gen}
- {Here + {\sl position}}
-\macrodef{r\_}{r_}{}
- {gen}
- {red color value}
-\macrodef{rrot\_}{rrot_}{({\sl x, y, angle})}
- {gen}
- {\tt Here + vrot\_({\sl x, y, cos(angle), sin(angle))}}
+ \seesect{Corners:}}%
+\macrodef{rpoint\_}{rpoint_}{(\linespec)}%
+ {gen}%
+ {set direction cosines}%
+\macrodef{rpos\_}{rpos_}{({\sl position})}%
+ {gen}%
+ {Here + {\sl position}}%
+\macrodef{r\_}{r_}{}%
+ {gen}%
+ {red color value}%
+\macrodef{rrot\_}{rrot_}{({\sl x, y, angle})}%
+ {gen}%
+ {\tt Here + vrot\_({\sl x, y, cos(angle), sin(angle))}}%
\macrodef{rs\_box}{rs_box}{([angle={\sl degrees};]
- {\sl text},{\sl expr1},$\cdots$)}
- {gen}
- {like {\tt s\_box} but the text is rotated by {\tt text\_ang}
+ {\sl text},{\sl expr1},$\cdots$)}%
+ {gen}%
+ {like {\tt s\_box} but the text is rotated by {\tt text\_ang}%
(default 90) degrees, unless
the first argument begins with {\tt angle={\sl decimal number};},
in which case the number defines the rotation angle.
@@ -1831,222 +2125,253 @@ degrees})}
the specified angle is used.
The examples {\tt define(`text\_ang',45); rs\_box(Hello World)} and
{\tt rs\_box(angle=45; Hello World)} are equivalent
- \seesect{Interaction:}, \seesect{Pstricks:}}
-\macrodef{rsvec\_}{rsvec_}{({\sl position})}
- {gen}
- {Here + {\sl position}}
-\macrodef{r\_text}{r_text}{({\sl degrees},{\sl text},at {\sl position})}
- {gen}
+ \seesect{Interaction:}, \seesect{Pstricks:}}%
+\macrodef{rsvec\_}{rsvec_}{({\sl position})}%
+ {gen}%
+ {Here + {\sl position}}%
+\macrodef{r\_text}{r_text}{({\sl degrees},{\sl text},at {\sl position})}%
+ {gen}%
{Rotate text by arg1 degrees (provides a single command for
PSTricks, PGF, or SVG only) placed at position in arg3.
The first argument is a decimal constant (not an expression) and
the text is a simple string without quotes.
- \seesect{Interaction:}, \seesect{Pstricks:}}
-\macrodef{rtod\_\_}{rtod__}{}
- {gen}
- {constant, degrees/radian}
-\macrodef{rtod\_}{rtod_}{}
- {gen}
- {constant, degrees/radian}
-\macrodef{rt\_}{rt_}{}
- {gen}
- {right with respect to current direction}
-\macrodef{rvec\_}{rvec_}{({\sl x},{\sl y})}
- {gen}
- {location relative to current direction}
+ \seesect{Interaction:}, \seesect{Pstricks:}}%
+\macrodef{rtod\_\_}{rtod__}{}%
+ {gen}%
+ {constant, degrees/radian}%
+\macrodef{rtod\_}{rtod_}{}%
+ {gen}%
+ {constant, degrees/radian}%
+\macrodef{rt\_}{rt_}{}%
+ {gen}%
+ {right with respect to current direction}%
+\macrodef{rvec\_}{rvec_}{({\sl x},{\sl y})}%
+ {gen}%
+ {location relative to current direction}%
%
\Letter{S}%
-\macrodef{sarrow}{sarrow}{(\linespec,{\sl keys})}
- {gen}
- {Single-segment, single-headed special arrows.
- The {\sl keys} are
+\macrodef{sarrow}{sarrow}{(\linespec,{\sl keys})}%
+ {gen}%
+ {Single-segment, single-headed special arrows with {\sl keys}:\\
{\tt type=}{\tt O[pen]} (default)
- | {\tt D[iamond]} | {\tt C[rowfoot]} | {\tt P[lain]}
- | {\tt R[ight]} | {\tt L[eft]} {\tt ;}
- {\tt wdth=}{\tt expression}{\tt ;} (default {\tt arrowwid})
- {\tt lgth=}{\tt expression}{\tt ;} (default {\tt arrowht})
- {\tt shaft=}{\sl shaft attributes} (e.g., {\tt dashed}){\tt ;}
- {\tt head=}{\sl head attributes} (e.g., {\tt shaded}){\tt ;}
+ | {\tt D[iamond]} | {\tt C[rowfoot]} | {\tt P[lain]}%
+ | {\tt R[ight]} | {\tt L[eft]} {\tt ;}\\
+ {\tt wdth=}{\sl expression}{\tt ;} (default {\tt arrowwid})\\
+ {\tt lgth=}{\sl expression}{\tt ;} (default {\tt arrowht})\\
+ {\tt shaft=}{\sl shaft attributes} (e.g., {\tt dashed}){\tt ;}\\
+ {\tt head=}{\sl head attributes} (e.g., {\tt shaded}){\tt ;}\\
{\tt name=}{\sl Name}{\tt ;} (default {\sl Sarrow\_})
- \seesect{Macroarguments:}}
-\macrodef{savem4dir}{savem4dir}{([`{\sl stack name}'])}
- {gen}
+ \seesect{Macroarguments:}}%
+\macrodef{savem4dir}{savem4dir}{([`{\sl stack name}'])}%
+ {gen}%
{Stack m4 direction parameters in the named stack
- (default {\tt `savm4dir\_'})}
-\macrodef{s\_box}{s_box}{({\sl text},{\sl expr1},$\cdots$)}
- {gen}
+ (default {\tt `savm4dir\_'})}%
+\macrodef{s\_box}{s_box}{({\sl text},{\sl expr1},$\cdots$)}%
+ {gen}%
{generate dimensioned text string using {\tt\char92{}boxdims} from
- {\tt boxdims.sty}. Two or more args are passed to {\tt sprintf()}
- (default 90) degrees \seesect{Interaction:}}
-\macrodef{sbs}{sbs}{({\sl linespec, chars, label})}
- {cct}
+ {\tt boxdims.sty}. Two or more args are passed to {\tt sprintf()}%
+ (default 90) degrees \seesect{Interaction:}}%
+\macrodef{sbs}{sbs}{({\sl linespec, chars, label})}%
+ {cct}%
{Wrapper to place an SBS thyristor as a two-terminal element with
{\tt [ ]} block label given by the third argument
- \seesect{Semiconductors:}}
-\macrodef{sc\_draw}{sc_draw}{({\sl dna string, chars, iftrue, iffalse})}
- {cct}
- {test if chars are in string, deleting chars from string}
-\macrodef{scr}{scr}{({\sl linespec, chars, label})}
- {cct}
+ \seesect{Semiconductors:}}%
+\macrodef{sc\_draw}{sc_draw}{({\sl dna string, chars, iftrue, iffalse})}%
+ {cct}%
+ {test if chars are in string, deleting chars from string}%
+\macrodef{scr}{scr}{({\sl linespec, chars, label})}%
+ {cct}%
{Wrapper to place an SCR thyristor as a two-terminal element with
{\tt [ ]} block label given by the third argument
- \seesect{Semiconductors:}}
-\macrodef{scs}{scs}{({\sl linespec, chars, label})}
- {cct}
+ \seesect{Semiconductors:}}%
+\macrodef{scs}{scs}{({\sl linespec, chars, label})}%
+ {cct}%
{Wrapper to place an SCS thyristor as a two-terminal element with
{\tt [ ]} block label given by the third argument
- \seesect{Semiconductors:}}
-\macrodef{s\_dp}{s_dp}{({\sl name},{\sl default})}
- {gen}
- {depth of the most recent (or named) {\tt s\_box}
- \seesect{Interaction:}}
+ \seesect{Semiconductors:}}%
+\macrodef{s\_dp}{s_dp}{({\sl name},{\sl default})}%
+ {gen}%
+ {depth of the most recent (or named) {\tt s\_box}%
+ \seesect{Interaction:}}%
\macrodef{series\_}{series_}{({\sl elementspec}, {\sl elementspec},
-$\ldots$)}
- {cct}
+$\ldots$)}%
+ {cct}%
{ Series combination in a {\tt []} block of elements
with shortened default length. An {\sl elementspec} is of the
form {\tt [{\sl Label}:] {\sl element}; [{\sl attributes}]},
where an {\sl attribute} is of the form {\tt [llabel($\ldots$);] |
[rlabel($\ldots$);] [b\_current($\ldots$);]}. Internal points {\tt
Start}, {\tt End}, and {\tt C} are defined
- \seesect{Seriesandparallel:} }
-\macrodef{se\_}{se_}{}
- {gen}
- {.se with respect to current direction}
-\macrodef{setdir\_}{setdir_}{(R|L|U|D|{\sl degrees}, {\sl default}
- U|D|R|L|{\sl degrees})}
- {gen}
+ \seesect{Seriesandparallel:} }%
+\macrodef{se\_}{se_}{}%
+ {gen}%
+ {.se with respect to current direction}%
+\macrodef{setdir\_}{setdir_}{(R|L|U|D|{\sl degrees}, {\sl default}%
+ U|D|R|L|{\sl degrees})}%
+ {gen}%
{store drawing direction and set it to
up, down, left, right, or angle in degrees (reset by {\tt
resetdir\_}). The directions may be spelled out, i.e., Right,
Left, $\ldots$
- \seesect{Seriesandparallel:}}
-\macrodef{setkey\_}{setkey_}{({\sl string, key, default,}[N])}
- {gen}
+ \seesect{Seriesandparallel:}}%
+\macrodef{setkey\_}{setkey_}{({\sl string, key, default,}[N])}%
+ {gen}%
{Key-value definition, like {\tt pushkey\_()} but the resulting
- macro is defined using {\tt define()} rather than {\tt pushdef().}
- \seesect{Macroarguments:}}
-\macrodef{setkeys\_}{setkeys_}{({\sl string, key sequence})}
- {gen}
+ macro is defined using {\tt define()} rather than {\tt pushdef().}%
+ \seesect{Macroarguments:}}%
+\macrodef{setkeys\_}{setkeys_}{({\sl string, key sequence})}%
+ {gen}%
{Multiple key-value definition using {\tt define()} rather than
{\tt pushdef().} See macro {\tt pushkeys\_}.
- \seesect{Macroarguments:}}
+ \seesect{Macroarguments:}}%
\macrodef{setrgb}{setrgb}{({\sl red value, green value, blue value},[{\sl
- name}])}
- {gen}
+ name}])}%
+ {gen}%
{define colour for lines and text, optionally named (default
- {\tt lcspec}); \seesect{Semiconductors:}}
+ {\tt lcspec}); \seesect{Semiconductors:}}%
\macrodef{setview}{setview}{({\sl azimuth degrees},{\sl elevation
-degrees})}
- {3D} {set projection viewpoint}
-\macrodef{sfgabove}{sfgabove}{}
- {cct}
- {like above but with extra space}
+ degrees}, {\sl rotation degrees})}%
+ {3D} {Set projection viewpoint for the {\tt project} macro.
+ The view vector is obtained by looking in along the $x$ axis,
+ then rotating about $-x,$ $-y,$ and $z$ in that order. The components
+ {\tt view3D1, view3D2,} and {\tt view3D3} are defined, as well as
+ positions {\tt UPx\_, UPy\_,} and {\tt UPz\_} which are the projections
+ of unit vectors {\tt (1,0,0), (0,1,0),} and {\tt (0,0,1)} respectively
+ onto the plane.}%
+\macrodef{sfgabove}{sfgabove}{}%
+ {cct}%
+ {like above but with extra space}%
\macrodef{sfgarc}{sfgarc}{(\linespec,{\sl text},{\sl text
justification},cw|ccw,
- {\sl height scale factor})}
- {cct}
- {directed arc drawn between nodes, with text label
- and a height-adjustment parameter }
-\macrodef{sfgbelow}{sfgbelow}{}
- {cct}
- {like below but with extra space}
+ {\sl height scale factor},{\sl arc attributes})}%
+ {cct}%
+ {Directed arc drawn between nodes, with text label
+ and a height-adjustment parameter. Example:
+ {\tt sfgarc(from B to A,-B/M,below,{,}1.1,outlined "red")} }%
+\macrodef{sfgbelow}{sfgbelow}{}%
+ {cct}%
+ {like below but with extra space}%
\macrodef{sfg\_init}{sfg_init}{({\sl default line len, node rad,
arrowhd len,
- arrowhd wid}), (reads {\tt libcct.m4})} {cct}
+ arrowhd wid}), (reads {\tt libcct.m4})} {cct}%
{initialization of signal
- flow graph macros}
-\macrodef{sfgline}{sfgline}{(\linespec,{\sl text},{\sl text
-justification})}
- {cct}
- {directed straight line chopped by node radius, with text label}
+ flow graph macros}%
+\macrodef{sfgline}{sfgline}{(\linespec,{\sl text},{\tt
+ sfgabove|sfgbelow|ljust|rjust},{\sl line attributes})}%
+ {cct}%
+ {Directed straight line chopped by node radius, with text label,
+ e.g., {\tt sfgline(,K/M,{,}dashed colored "orange")} }%
\macrodef{sfgnode}{sfgnode}{(at {\sl location},{\sl text},above|below,{\sl
- circle options})}
- {cct}
+ circle attributes})}%
+ {cct}%
{small circle default white interior, with text label. The default
- label position is inside if the diameter is bigger than {\tt textht}
+ label position is inside if the diameter is bigger than {\tt textht}%
and {\tt textwid}; otherwise it is {\tt sfgabove.} Options such as
- fill or line thickness can be given.}
+ color, fill, or line thickness can be given, e.g.,
+ {\tt thick 0.8 outlined "red" shaded "orange"}. }%
\macrodef{sfgself}{sfgself}{(at {\sl location}, U|D|L|R|{\sl degrees},
- {\sl text}, {\sl text justification}, cw|ccw, {\sl scale factor})}
- {cct}
- {self-loop drawn at angle {\sl angle} from a node,
- with text label and a size-adjustment parameter }
-\macrodef{shadebox}{shadebox}{(box {\sl attributes, shade width})}
- {gen}
- {Box with edge shading. Arg2 is in points. See also {\tt shaded} }
+ {\sl text label}, {\sl text justification}, cw|ccw, {\sl scale factor},
+ [-> | <- | <->], {\sl attributes})}%
+ {cct}%
+ {Self-loop drawn at an angle from a node,
+ with text label, specified arrowheads, and a size-adjustment parameter.
+ The attributes can set thickness and color, for example. }%
+\macrodef{shade}{shade}{({\sl gray value},{\sl closed line specs})}%
+ {gen}%
+ {Fill arbitrary closed curve. Note: when producing pdf via pdflatex, line
+ thickness changes within this macro must be made via the {\tt linethick}%
+ environment variable rather than by the {\tt thickness} line attribute}%
+\macrodef{shadebox}{shadebox}{(box {\sl attributes, shade width})}%
+ {gen}%
+ {Box with edge shading. Arg2 is in points. See also {\tt shaded} }%
\macrodef{ShadedPolygon}{ShadedPolygon}{({\sl vertexseq, line attributes,
- degrees, colorseq})} {gen}
+ degrees, colorseq})} {gen}%
{Draws the polygon specified in arg1 and
shades the interior according
to arg4 by drawing lines perpendicular to the angle in arg3. The {\sl
vertexseq} is a colon ({\tt:}) separated sequence of vertex positions
(or names) of the polygon in cw or ccw order. A {\sl colorseq} is of
the form 0, r0,g0,b0, {\sl frac1},r1,g1,b1, {\sl frac2},r2,g2,b2,
- \ldots 1,rn,gn,bn with $0 < \hbox{\sl frac1} < \hbox{\sl frac2}
- \ldots 1$ }
-\macrodef{shade}{shade}{({\sl gray value},{\sl closed line specs})}
- {gen}
- {Fill arbitrary closed curve. Note: when producing pdf via pdflatex, line
- thickness changes within this macro must be made via the {\tt linethick}
- environment variable rather than by the {\tt thickness} line attribute}
+ \ldots 1,rn,gn,bn with $0 < \hbox{\sl frac1} < \hbox{\sl frac2} \ldots 1$ }%
+\macrodef{ShadeObject}{ShadeObject}{({\sl drawroutine name, n, colorseq})}%
+ {dpictools}%
+ {$\;\;$ Fill an area in a {\tt []} block with graded color
+ defined by {\sl colorseq,} an indexed sequence of rgb colors:
+ {\sl 0,r0,g0,b0,}%
+ {\sl frac1,r1,g1,b1,}%
+ {\sl frac2,r2,g2,b2,}%
+ \ldots
+ {\sl 1,rn,gn,bn}%
+ with $0 < \hbox{\sl frac1}$ $< \hbox{\sl frac2} <$ $\ldots < 1.$ The macro
+ {\sl drawroutine{\tt(}frac, r, g, b{\tt)}} typically draws a colored line
+ and must be defined according to the area to be filled.
+ The routine is called $n{+}1$ times for
+ $\hbox{\sl frac}= 0, 1/n, 2/n, \ldots 1$ with rgb arguments interpolated
+ in hsv space between {\sl colorseq} points.
+ Example (shade a box with 101 graded-color lines):\\
+ {\tt B: box\\
+ define HorizShade \lbr\ line right B.wid \textbackslash\\
+ $\;$ thick B.ht/100/(1bp\_\_) from (0,-(\$1)*B.ht) \textbackslash\\
+ $\;$ outlined rgbstring(\$2,\$3,\$4) \rbr;}%
+ {\tt ShadeObject(HorizShade,100, 0,1,0,0, 1,0,0,1) \textbackslash\\
+ $\;$ at B}.}%
\macrodef{shadowed}{shadowed}{(box|circle|ellipse|line,
- {\sl position spec, keys})}
- {gen}
+ {\sl position spec, keys})}%
+ {gen}%
{ Object with specified shadow. {\sl possspec} is e.g.,
{\tt with .w at ...} or {\tt at} {\sl position}.
The {\sl keys} are
- {\tt attrib=}{\sl object attributes}{\tt ;}
+ {\tt attrib=}{\sl object attributes}{\tt ;}%
{\tt shadowthick=}{\sl expr}{\tt ;} (default {\tt linethick*)}5/4),
{\tt shadowcolor=}{\sl string}{\tt ;} (default {\tt "gray"}),
{\tt shadowangle=}{\sl expr}{\tt ;} (default $-45$)
- for box only: {\tt rad=}{\sl expr}{\tt ;}
- }
+ for box only: {\tt rad=}{\sl expr}{\tt ;}%
+ }%
\macrodef{shielded}{shielded}{(`{\sl two-terminal element}',
- L|U, {\sl line attributes})} {cct}
+ L|U, {\sl line attributes})} {cct}%
{shielding in a {\tt [ ]} box for
two-terminal element. Arg2= blank
(default) to enclose the element body; L for the left side with
respect to drawing direction, R for right. Internal points {\tt
- .Start, .End,} and {\tt .C} are defined}
-\macrodef{s\_ht}{s_ht}{({\sl name},{\sl default})}
- {gen}
- {height of the most recent (or named) {\tt s\_box}
- \seesect{Interaction:}}
-\macrodef{SIdefaults}{SIdefaults}{}
- {gen}
+ .Start, .End,} and {\tt .C} are defined}%
+\macrodef{s\_ht}{s_ht}{({\sl name},{\sl default})}%
+ {gen}%
+ {height of the most recent (or named) {\tt s\_box}%
+ \seesect{Interaction:}}%
+\macrodef{SIdefaults}{SIdefaults}{}%
+ {gen}%
{Sets {\tt scale = 25.4} for drawing units in mm, and sets
pic parameters {\tt lineht = 12, linewid = 12, moveht = 12,
movewid = 12,
arcrad = 6, circlerad = 6, boxht = 12, boxwid = 18, ellipseht = 12,
- ellipsewid = 18, dashwid = 2, arrowht = 3, arrowwid = arrowht/2,}}
-\macrodef{sign\_}{sign_}{({\sl number})}
- {gen}
- {sign function}
-\macrodef{sinc}{sinc}{({\sl number})}
- {gen}
- {the $\hbox{sinc}(x)$ function}
-\macrodef{sind}{sind}{({\sl arg})}
- {gen}
- {sine of an expression in degrees}
-\macrodef{s\_init}{s_init}{({\sl name})}
- {gen}
+ ellipsewid = 18, dashwid = 2, arrowht = 3, arrowwid = arrowht/2,}}%
+\macrodef{sign\_}{sign_}{({\sl number})}%
+ {gen}%
+ {sign function}%
+\macrodef{sinc}{sinc}{({\sl number})}%
+ {gen}%
+ {the $\hbox{sinc}(x)$ function}%
+\macrodef{sind}{sind}{({\sl arg})}%
+ {gen}%
+ {sine of an expression in degrees}%
+\macrodef{s\_init}{s_init}{({\sl name})}%
+ {gen}%
{initialize {\tt s\_box} string label to {\sl name} which should
be unique
- \seesect{Interaction:}}
-\macrodef{Sin}{Sin}{({\sl integer})}
- {gen}
- {sine function, {\sl integer\/} degrees}
+ \seesect{Interaction:}}%
+\macrodef{Sin}{Sin}{({\sl integer})}%
+ {gen}%
+ {sine function, {\sl integer\/} degrees}%
\macrodef{sinusoid}{sinusoid}{({\sl amplitude, frequency, phase, tmin,
- tmax, linetype})}
- {gen}
+ tmax, linetype})}%
+ {gen}%
{draws a sinusoid over the interval $(t_{\hbox{\scriptsize min}},
t_{\hbox{\scriptsize max}})$;
e.g., to draw a dashed sine curve, amplitude {\sl a},
of {\sl n} cycles of length {\sl x} from {\sl A}, {\tt
- sinusoid(a,twopi\_*n/x,-pi\_/2,0,x,dashed) with .Start at A}}
-\macrodef{sl\_box}{sl_box}{({\sl stem linespec, keys, stem object})}
- {SLD}
+ sinusoid(a,twopi\_*n/x,-pi\_/2,0,x,dashed) with .Start at A}}%
+\macrodef{sl\_box}{sl_box}{({\sl stem linespec, keys, stem object})}%
+ {SLD}%
{One-terminal SLD element: argument 1 is a \linespec\ to define the stem
or, in the case of a zero-length stem, one of {\tt U, D, L, R,} or an
angle in degrees, optionally followed by {\tt at {\sl position}}.
@@ -2068,19 +2393,19 @@ justification})}
\MR{sl_ttbox}{\tt sl\_ttbox} key-value pairs defining box attributes
for the breaker (default name {\sl Br})
- \seesect{SingleLine:}}
-\macrodef{sl\_breaker}{sl_breaker}{({\sl linespec,} {\tt type=[A|C][D];}
- {\sl ttbox args})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_breaker}{sl_breaker}{({\sl linespec,} {\tt type=[A|C][D];}%
+ {\sl ttbox args})}%
+ {SLD}%
{Two-terminal SLD element:
type {\tt A} (the default) is for a box breaker; type
{\tt C} for a curved breaker; adding a {\tt D} puts drawout elements
in the input and output leads.
Otherwise, the arguments are as for
- \MR{sl_ttbox}{\tt sl\_ttbox}
- \seesect{SingleLine:}}
-\macrodef{sl\_busbar}{sl_busbar}{({\sl linespec, np, keys})}
- {SLD}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
+ \seesect{SingleLine:}}%
+\macrodef{sl\_busbar}{sl_busbar}{({\sl linespec, np, keys})}%
+ {SLD}%
{Composite SLD element drawn in a {\tt [ ]} block. A busbar is
essentially a thick straight line
drawn along the {\sl linespec} with positions evenly distributed
@@ -2099,10 +2424,10 @@ justification})}
{\tt port=D} (for a dot at each port position);
{\tt line=}{\sl pic line attributes}.
{\tt indent=}{\sl indent distance}.
- \seesect{SingleLine:}}
+ \seesect{SingleLine:}}%
\macrodef{sl\_ct}{sl_ct}{%
- ({\tt at}{\sl position},{\sl keys},{\tt R|L|U|D|}{\sl degrees})}
- {SLD}
+ ({\tt at}{\sl position},{\sl keys},{\tt R|L|U|D|}{\sl degrees})}%
+ {SLD}%
{Composite SLD element drawn in a {\tt [ ]} block:
The keys are as follows:
@@ -2126,9 +2451,9 @@ justification})}
Key {\tt scale} allows scaling (default scale 1.0) but, with \dpic,
the {\tt scaled} directive can also be used.
- \seesect{SingleLine:}}
-\macrodef{sl\_disk}{sl_disk}{({\sl stem linespec, keys, breaker})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_disk}{sl_disk}{({\sl stem linespec, keys, breaker})}%
+ {SLD}%
{One-terminal SLD element: argument 1 is a \linespec\ to define the stem
or, in the case of a zero-length stem, one of {\tt U, D, L, R,} or an
angle in degrees, optionally followed by {\tt at {\sl position}}.
@@ -2144,27 +2469,27 @@ justification})}
Argument 3 is null for no breaker in the stem, {\tt C} for a default
closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for
these marks, or
- \MR{sl_ttbox}{\tt sl\_ttbox}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
key-value pairs defining box attributes for the breaker
(default name {\sl Br})
\label{sl_disk}%
- \seesect{SingleLine:}}
-\macrodef{sl\_drawout}{sl_drawout}{({\sl linespec, keys,} R)}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_drawout}{sl_drawout}{({\sl linespec, keys,} R)}%
+ {SLD}%
{Two-terminal SLD element: argument 1 is a \linespec\ as for ordinary
two-terminal elements.
Argument 2 contains semicolon (;)-separated key-value body attributes:
{\tt type=T} (for truncated leads);
- {\tt lgth={\sl{}expr},}
+ {\tt lgth={\sl{}expr},}%
{\tt wdth={\sl{}expr}} (body size);
{\tt name={\sl{}Name}} (default {\sl Body});
{\tt line={\sl{}pic line attributes}}; (e.g., {\tt thick 2})
Argument 3 is {\tt R} to reverse the direction of the drawn chevrons.
- \seesect{SingleLine:}}
-\macrodef{sl\_generator}{sl_generator}{({\sl stem linespec, keys, breaker})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_generator}{sl_generator}{({\sl stem linespec, keys, breaker})}%
+ {SLD}%
{One-terminal SLD element: argument 2 is
{\tt type=AC|WT|BS|StatG|PV|Y|Delta} and,
if {\tt type=PV,} the {\tt SL\_box} keys;
@@ -2173,12 +2498,12 @@ justification})}
Argument 3 is null for no breaker in the stem, {\tt C} for a default
closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for
these marks, or
- \MR{sl_ttbox}{\tt sl\_ttbox}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
key-value pairs defining box attributes for the breaker
(default name {\sl Br})
- \seesect{SingleLine:}}
-\macrodef{sl\_grid}{sl_grid}{({\sl stem linespec, keys, breaker})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_grid}{sl_grid}{({\sl stem linespec, keys, breaker})}%
+ {SLD}%
{One-terminal SLD element: argument 1 is a \linespec\ to define the stem
or, in the case of a zero-length stem, one of {\tt U, D, L, R,} or an
angle in degrees, optionally followed by {\tt at {\sl position}}.
@@ -2193,22 +2518,22 @@ justification})}
Argument 3 is null for no breaker in the stem, {\tt C} for a default
closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for
these marks, or
- \MR{sl_ttbox}{\tt sl\_ttbox}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
key-value pairs defining box attributes for the breaker
(default name {\sl Br})
- \seesect{SingleLine:}}
-\macrodef{sl\_inverter}{sl_inverter}{({\sl ttbox args})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_inverter}{sl_inverter}{({\sl ttbox args})}%
+ {SLD}%
{Two-terminal SLD element: the arguments are as for
- \MR{sl_ttbox}{\tt sl\_ttbox}
- \seesect{SingleLine:}}
-\macrodef{sl\_lamp}{sl_lamp}{({\sl stem linespec, keys, breaker})}
- {SLD}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
+ \seesect{SingleLine:}}%
+\macrodef{sl\_lamp}{sl_lamp}{({\sl stem linespec, keys, breaker})}%
+ {SLD}%
{One-terminal SLD element: the arguments are as for
- \MR{sl_disk}{\tt sl\_disk}
- \seesect{SingleLine:}}
-\macrodef{sl\_load}{sl_load}{({\sl stem linespec, keys, breaker})}
- {SLD}
+ \MR{sl_disk}{\tt sl\_disk}%
+ \seesect{SingleLine:}}%
+\macrodef{sl\_load}{sl_load}{({\sl stem linespec, keys, breaker})}%
+ {SLD}%
{One-terminal SLD element: argument 1 is a \linespec\ to define the stem
or, in the case of a zero-length stem, one of {\tt U, D, L, R,} or an
angle in degrees, optionally followed by {\tt at {\sl position}}.
@@ -2224,12 +2549,12 @@ justification})}
Argument 3 is null for no breaker in the stem, {\tt C} for a default
closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for
these marks, or
- \MR{sl_ttbox}{\tt sl\_ttbox}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
key-value pairs defining box attributes for the breaker
(default name {\sl Br})
- \seesect{SingleLine:}}
-\macrodef{sl\_meterbox}{sl_meterbox}{({\sl stem linespec, keys, breaker})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_meterbox}{sl_meterbox}{({\sl stem linespec, keys, breaker})}%
+ {SLD}%
{One-terminal SLD element: argument 1 is a \linespec\ to define the stem
or, in the case of a zero-length stem, one of {\tt U, D, L, R,} or an
angle in degrees, optionally followed by {\tt at {\sl position}}.
@@ -2246,13 +2571,13 @@ justification})}
Argument 3 is null for no breaker in the stem, {\tt C} for a default
closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for
these marks, or
- \MR{sl_ttbox}{\tt sl\_ttbox}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
key-value pairs defining box attributes for the breaker
(default name {\sl Br})
- \seesect{SingleLine:}}
+ \seesect{SingleLine:}}%
\macrodef{sl\_reactor}{sl_reactor}{({\sl stem linespec, keys, breaker keys,
- breaker keys})}
- {SLD}
+ breaker keys})}%
+ {SLD}%
{Two-terminal SLD element: argument 1 is a \linespec\ as for ordinary
two-terminal elements.
@@ -2268,24 +2593,24 @@ justification})}
Argument 4 defines the breaker in the output lead as for argument 3
except that the default breaker name is {\sl BrO}.
- \seesect{SingleLine:}}
-\macrodef{sl\_rectifier}{sl_rectifier}{({\sl ttbox args})}
- {SLD}
+ \seesect{SingleLine:}}%
+\macrodef{sl\_rectifier}{sl_rectifier}{({\sl ttbox args})}%
+ {SLD}%
{Two-terminal SLD element: the arguments are as for
- \MR{sl_ttbox}{\tt sl\_ttbox}
- \seesect{SingleLine:}}
-\macrodef{sl\_slash}{sl_slash}{(at {\sl position, keys,}
- [$n$:]R|L|U|D|{\sl degrees})}
- {SLD}
+ \MR{sl_ttbox}{\tt sl\_ttbox}%
+ \seesect{SingleLine:}}%
+\macrodef{sl\_slash}{sl_slash}{(at {\sl position, keys,}%
+ [$n$:]R|L|U|D|{\sl degrees})}%
+ {SLD}%
{Slash symbol for SLD elements: draws $n$ slashes in a {\tt [] } block.
The keys are
{\tt lines={\sl line attributes,} e.g., dotted thick {\sl expr}};
{\tt size=}{\sl expr} (default {\tt ht dimen\_/3}).
- \seesect{SingleLine:}}
+ \seesect{SingleLine:}}%
%
\macrodef{sl\_transformer3}{sl_transformer3}{({\sl linespec, keys,
- breaker keys, symbol keys})}
- {SLD}
+ breaker keys, symbol keys})}%
+ {SLD}%
{Composite (block) SLD element: argument 1 is a \linespec\ that can be used
to set the direction and distance between primary terminals but not
position.
@@ -2300,8 +2625,8 @@ justification})}
Argument 3 is colon (:)-separated sequence of up to three breaker
attribute specifications for the input, output, and teriary breaker
- in order. A null or blank means no breaker, {\tt tt\_breaker}
- specifications otherwise. Default breaker names are {\sl BrI}
+ in order. A null or blank means no breaker, {\tt tt\_breaker}%
+ specifications otherwise. Default breaker names are {\sl BrI}%
and {\sl BrO} as for
{\tt sl\_transformer,} and {\sl Br} for the third breaker.
@@ -2311,12 +2636,12 @@ justification})}
{\tt Y} for a Y-symbol;
{\tt Delta} for a $\Delta$ symbol;
otherwise, other customization commands expanded in a {\tt \lbr\rbr} pair.
- \seesect{SingleLine:}}
+ \seesect{SingleLine:}}%
%
\macrodef{sl\_transformer}{sl_transformer}{({\sl linespec, keys,
input breaker keys, output breaker keys,
- input circle inner object, output circle inner object})}
- {SLD}
+ input circle inner object, output circle inner object})}%
+ {SLD}%
{Two-terminal SLD element: argument 1 is a \linespec\ as for ordinary
two-terminal elements.
@@ -2350,11 +2675,11 @@ justification})}
{\tt YN} for a Y-symbol with ground;
{\tt Delta} for a $\Delta$ symbol;
otherwise, other customization commands expanded in a {\tt \lbr\rbr} pair.
- \seesect{SingleLine:}}
+ \seesect{SingleLine:}}%
%
\macrodef{sl\_ttbox}{sl_ttbox}{({\sl linespec, keys, input breaker keys,
- output breaker keys})}
- {SLD}
+ output breaker keys})}%
+ {SLD}%
{Two-terminal SLD element: argument 1 is a \linespec\ as for ordinary
two-terminal elements.
@@ -2375,121 +2700,150 @@ justification})}
Argument 4 defines the breaker in the output lead as for argument 3
except that the default breaker name is {\sl BrO}.
\label{sl_ttbox}%
- \seesect{SingleLine:}}
-\macrodef{s\_name}{s_name}{}
- {gen}
+ \seesect{SingleLine:}}%
+\macrodef{s\_name}{s_name}{}%
+ {gen}%
{the value of the last {\tt s\_init} argument
- \seesect{Interaction:}}
-\macrodef{sourcerad\_}{sourcerad_}{}
- {cct}
- {default source radius}
+ \seesect{Interaction:}}%
+\macrodef{sourcerad\_}{sourcerad_}{}%
+ {cct}%
+ {default source radius}%
+\macrodef{slantbox}{slantbox}{%
+ ({\sl wid, height, x offset, y offset, attributes})}%
+ {dpictools}%
+ {$\;\;$ Trapezoid formed from a box with top corners displaced right by
+ $x$ offset and right corners displaced up by $y$ offset.}%
\macrodef{source}{source}{(\linespec,
- V|v|I|i|ii|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, {\sl
- diameter},R)}
- {cct}
- {source, blank or:
- V = voltage source; v = alternate voltage source;
- I = current source; i = alternate current source;
- ii = double arrow current source; AC = AC source;
- B = bulb; F = fluorescent; G = generator; H = step
- function; L = lamp; N = neon; P = pulse; Q = charge;
- R = ramp; r = right orientation; S = sinusoid;
- SC = quarter arc; SE = arc; T = triangle; U =
- square-wave; X = interior X; other = custom interior
- label or waveform; arg 4: R = reversed polarity;
- arg 5 modifies the circle with e.g., color or fill
- \seesect{Twoterminal:}}
-\macrodef{speaker}{speaker}{( U|D|L|R|{\sl degrees},{\sl size},H)}
- {cct}
- {speaker, {\sl In1} to {\sl In7} defined; {\tt H}=horn
- \seesect{Composite:}}
-\macrodef{sprod3D}{sprod3D}{(a,x,y,z)}
- {3D} {scalar product of triple x,y,z by a}
-\macrodef{sp\_}{sp_}{}
- {gen}
- {evaluates to medium space for gpic strings}
-\macrodef{sqrta}{sqrta}{({\sl arg})}
- {gen}
+ V|v|tv|I|i|ti|ii|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, {\sl
+ diameter},R)}%
+ {cct}%
+ {source, arg2 blank or:\\
+ {\tt V}: voltage source;\\
+ {\tt v}: alternate voltage source;\\
+ {\tt tv}: truncated-bar alternate voltage source;\\
+ {\tt I}: current source;\\
+ {\tt i}: alternate current source;\\
+ {\tt ti}: truncated-bar alternate current source;\\
+ {\tt ii}: double arrow current source; AC: AC source;\\
+ {\tt B}: bulb;\\
+ {\tt F}: fluorescent;\\
+ {\tt G}: generator;\\
+ {\tt H}: step function;\\
+ {\tt L}: lamp;\\
+ {\tt N}: neon;\\
+ {\tt P}: pulse;\\
+ {\tt Q}: charge;\\
+ {\tt R}: ramp;
+ {\tt r}: right orientation;
+ {\tt S}: sinusoid;\\
+ {\tt SC}: quarter arc;\\
+ {\tt SE}: arc;\\
+ {\tt T}: triangle;\\
+ {\tt U}: square-wave;\\
+ {\tt X}: interior X;\\
+ other: custom interior label or waveform;\\
+ arg 4: R: reversed polarity;\\
+ arg 5 modifies the circle with e.g., color or fill
+ \seesect{Twoterminal:}}%
+\macrodef{speaker}{speaker}{( U|D|L|R|{\sl degrees},{\sl size},H,attributes)}%
+ {cct}%
+ {speaker, {\sl In1} to {\sl In7} defined; {\tt H}: horn
+ \seesect{Composite:}}%
+\macrodef{sprod3}{sprod3}{({\sl scalar, vec1, vec2})}%
+ {dpictools}%
+ {$\;\;$ Multiplied vector by scalar arg1: {\sl vec2 = vec1 * arg1}.}%
+\macrodef{sprod3D}{sprod3D}{(a,x,y,z)}%
+ {3D} {scalar product of triple x,y,z by arg1}%
+\macrodef{sp\_}{sp_}{}%
+ {gen}%
+ {evaluates to medium space for gpic strings}%
+\macrodef{sqrta}{sqrta}{({\sl arg})}%
+ {gen}%
{square root of the absolute value of {\sl arg}; i.e.,
- {\tt sqrt(abs({\sl arg}))}}
-\macrodef{SQUID}{SQUID}{({\sl n, diameter, initial angle}, {\tt ccw|cw})}
- {cct}
+ {\tt sqrt(abs({\sl arg}))}}%
+\macrodef{SQUID}{SQUID}{({\sl n, diameter, initial angle}, {\tt ccw|cw})}%
+ {cct}%
{Superconducting quantum interface device
with {\sl }n junctions labeled {\tt J1, ... J}{\sl n} placed around
a circle with initial angle -90 deg (by default) with respect to the
- current drawing direction. The default diameter is {\tt dimen\_} }
-\macrodef{s\_}{s_}{}
- {gen}
- {.s with respect to current direction}
-\macrodef{stackargs\_}{stackargs}{(`{\sl stackname}',{\sl args})}
- {gen}
- {Stack arg 2, arg 3, ... onto the named stack up to a blank arg}
-\macrodef{stackcopy\_}{stackcopy_}{(`{\sl name 1}',`{\sl name 2}')}
- {gen}
+ current drawing direction. The default diameter is {\tt dimen\_} }%
+\macrodef{s\_}{s_}{}%
+ {gen}%
+ {.s with respect to current direction}%
+\macrodef{stackargs\_}{stackargs}{(`{\sl stackname}',{\sl args})}%
+ {gen}%
+ {Stack arg 2, arg 3, ... onto the named stack up to a blank arg}%
+\macrodef{stackcopy\_}{stackcopy_}{(`{\sl name 1}',`{\sl name 2}')}%
+ {gen}%
{Copy stack 1 into stack 2, preserving the order of pushed
- elements}
-\macrodef{stackdo\_}{stackdo}{(`{\sl stackname}',{\sl commands})}
- {gen}
- {Empty the stack to the first blank entry, performing arg 2}
+ elements}%
+\macrodef{stackdo\_}{stackdo}{(`{\sl stackname}',{\sl commands})}%
+ {gen}%
+ {Empty the stack to the first blank entry, performing arg 2}%
\macrodef{stackexec\_}{stackexec_}{(`{\sl name 1}',`{\sl name 2}',%
- {\sl commands})}
- {gen}
+ {\sl commands})}%
+ {gen}%
{Copy stack 1 into stack 2, performing arg3 for each nonblank
- entry}
-\macrodef{stackprint\_}{stackprint_}{(`{\sl stack name}')}
- {gen}
- {Print the contents of the stack to the terminal}
+ entry}%
+\macrodef{stackprint\_}{stackprint_}{(`{\sl stack name}')}%
+ {gen}%
+ {Print the contents of the stack to the terminal}%
%\macrodef{stackpromote\_}{stackpromote_}{({\sl prefix},%
-% `{\sl stack name}',{\sl In name})}
-% {gen}
+% `{\sl stack name}',{\sl In name})}%
+% {gen}%
% {Define locations {\tt In1} or {\sl In name }{\tt 1}, $\ldots$ corresponding % to the locations in stack {\sl stack name}, as created by the
% {\tt AutoGate} and {\tt Autologic} macros. Each location is prefixed
-% by argument 1 ``.''}
-\macrodef{stackreverse\_}{stackreverse_}{(`{\sl stack name}')}
- {gen}
- {Reverse the order of elements in a stack, preserving the name}
+% by argument 1 ``.''}%
+\macrodef{stackreverse\_}{stackreverse_}{(`{\sl stack name}')}%
+ {gen}%
+ {Reverse the order of elements in a stack, preserving the name}%
\macrodef{stacksplit\_}{stacksplit_}{(`{\sl stack name}',{\sl string},{\sl
- separator})}
- {gen}
+ separator})}%
+ {gen}%
{Stack the fields of {\sl string} left to right separated
by nonblank
{\sl separator} (default .). White space preceding the fields
- is ignored.}
-\macrodef{sum3D}{sum3D}{({\sl x1,y1,z1,x2,y2,z2})}
- {3D} {sum of two triples}
-\macrodef{sum\_}{sum_}{({\sl a},{\sl b})}
- {gen}
- {binary sum}
-\macrodef{sus}{sus}{({\sl linespec, chars, label})}
- {cct}
+ is ignored.}%
+\macrodef{sum3}{sum3}{({\sl vec1, vec2, vec3})}%
+ {dpictools}%
+ {$\;\;$ The 3-vector sum
+ $\hbox{\sl vec3} = \hbox{\sl vec1} + \hbox{\sl vec2}$.}%
+\macrodef{sum3D}{sum3D}{({\sl x1,y1,z1,x2,y2,z2})}%
+ {3D} {sum of two triples}%
+\macrodef{sum\_}{sum_}{({\sl a},{\sl b})}%
+ {gen}%
+ {binary sum}%
+\macrodef{sus}{sus}{({\sl linespec, chars, label})}%
+ {cct}%
{Wrapper to place an SUS thyristor as a two-terminal element with
{\tt [ ]} block label given by the third argument
- \seesect{Semiconductors:}}
-\macrodef{svec\_}{svec_}{({\sl x},{\sl y})}
- {log}
- {scaled and rotated grid coordinate vector}
-\macrodef{s\_wd}{s_wd}{({\sl name},{\sl default})}
- {gen}
- {width of the most recent (or named) {\tt s\_box}
- \seesect{Interaction:}}
-\macrodef{switch}{switch}{(\linespec,L|R,[C|O][D],[B|D])}
- {cct}
+ \seesect{Semiconductors:}}%
+\macrodef{svec\_}{svec_}{({\sl x},{\sl y})}%
+ {log}%
+ {scaled and rotated grid coordinate vector}%
+\macrodef{s\_wd}{s_wd}{({\sl name},{\sl default})}%
+ {gen}%
+ {width of the most recent (or named) {\tt s\_box}%
+ \seesect{Interaction:}}%
+\macrodef{switch}{switch}{(\linespec,L|R,[C|O][D],[B|D])}%
+ {cct}%
{SPST switch (wrapper for bswitch, lswitch, and dswitch),
- arg2: R=right orientation (default L=left);
- if arg4=blank (knife switch): arg3 = [O{\tt|}C][D][A]
- O= opening, C=closing, D=dots, A=blade arrowhead;
- if arg4=B (button switch): arg3 = O{\tt|}C
- O=normally open, C=normally closed,
- if arg4=D: arg3 = same as for dswitch \seesect{Twoterminal:}}
-\macrodef{sw\_}{sw_}{}
- {gen}
- {.sw with respect to current direction}
+ arg2: {\tt R}: right orientation (default {\tt L} for left);\\
+ if arg4=blank (knife switch): arg3 = {\tt [O|C][D][A]},
+ {\tt O}: opening, {\tt C}: closing, {\tt D}:dots,
+ {\tt A}: blade arrowhead;\\
+ if arg4=B (button switch): arg3 =
+ {\tt O|C}: {\tt O}: normally open, {\tt C}: normally closed;\\
+ if arg4={\tt D}: arg3 = same as for dswitch \seesect{Twoterminal:}}%
+\macrodef{sw\_}{sw_}{}%
+ {gen}%
+ {.sw with respect to current direction}%
%
\Letter{T}%
\macrodef{tapped}{tapped}{(`{\sl two-terminal element}',
[{\sl arrowhd} | type={\sl arrowhd};name={\sl Name}],
- {\sl fraction, length, fraction, length,} $\cdots$)}
- {cct}
+ {\sl fraction, length, fraction, length,} $\cdots$)}%
+ {cct}%
{Draw the two-terminal element with taps in a [ ] block (see
{\tt addtaps}).
{\sl arrowhd} = blank or one of {\tt . - <- -> <->}. Each fraction
@@ -2498,237 +2852,260 @@ justification})}
length to the left. Tap names are Tap1, Tap2, $\cdots$ by default
or Name1, Name2, $\cdots$ if specified. Internal block names are
{\tt .Start, .End,} and {.C} corresponding to the drawn element,
- and the tap names \seesect{Composite:} }
-\macrodef{ta\_xy}{ta_xy}{({\sl x, y})}
- {cct}
- {macro-internal coordinates adjusted for {\tt L|R}}
-\macrodef{tbox}{tbox}{({\sl text,wid,ht},<|>|<>,{\sl type})}
- {cct}
+ and the tap names \seesect{Composite:} }%
+\macrodef{ta\_xy}{ta_xy}{({\sl x, y})}%
+ {cct}%
+ {macro-internal coordinates adjusted for {\tt L|R}}%
+\macrodef{tbox}{tbox}{({\sl text,wid,ht},<|>|<>,{\sl attributes})}%
+ {cct}%
{Pointed terminal box. The {\sl text} is placed at the rectangular
center
in math mode unless the text begins with {\tt "} or {\tt sprintf} in
which case the arument is used literally. Arg 4 determines whether
the point is forward, backward, or both with respect to the current
drawing direction.
- \seesect{Composite:}}
-\macrodef{tconn}{tconn}{({\sl linespec, chars}|{\sl keys}, {\sl wid})}
- {cct}
- {Terminal connector drawn on a linespec, with head enclosed in a {\tt [ ]}
+ \seesect{Composite:}}%
+\macrodef{tconn}{tconn}{({\sl linespec, chars}|{\sl keys}, {\sl wid})}%
+ {cct}%
+ {Terminal connector drawn on a linespec, with head enclosed in a {\tt []}%
block. The permissible {\sl chars} are:
- {\tt > | >> | < | << | A | AA | M | O | OF}.
+ {\tt > | >{}> | < | <{}< | A | AA | M | O | OF}.
Type {\tt O} draws a node (circle); {\tt OF} a filled circle.
- Type {\tt M} is a black bar; {\tt A} is an open arc end; type {\tt AA}
+ Type {\tt M} is a black bar; {\tt A} is an open arc end; type {\tt AA}%
a double open arc. Type {\tt >} (the default) is an arrow-like output
connector; {\tt <} and {\tt <<} input connectors. Arg 3 is arrowhead
width or circle diameter when key-value pairs are not used.
If keys are specified, they are {\tt type=}{\sl chars} as previously;
{\tt wdth=}{\sl expr}; {\tt lgth=}{\sl expr}; {\tt sep=}{\sl expr};
- {\tt head=}{\sl attributes except} {\tt lgth, wdth.}
+ {\tt head=}{\sl attributes except} {\tt lgth, wdth.}%
The key {\tt sep=} is the double-head separation
- \seesect{Composite:}}
-\macrodef{tgate}{tgate}{({\sl linespec,} [B][R|L])}
- {cct}
+ \seesect{Composite:}}%
+\macrodef{testexpr}{testexpr}{({\sl variable, expr1, expr2, \ldots})}%
+ {dpictools}%
+ {$\;\;$ Set the variable given by arg1 to the index of the first true
+ alternative in a sequence of logical expressions, e.g.,
+ {\tt testexpr(i, 1>2, 1<2 )} sets {\sl i} to 2. The variable is set to 0
+ if no test is true.}%
+\macrodef{tgate}{tgate}{({\sl linespec,} [B][R|L])}%
+ {cct}%
{transmission gate, {\tt B=} ebox type; {\tt L=} oriented left
- \seesect{Semiconductors:}}
-\macrodef{thermocouple}{thermocouple}{({\sl linespec, wid, ht,} L|R [T])}
- {cct}
+ \seesect{Semiconductors:}}%
+\macrodef{thermocouple}{thermocouple}{({\sl linespec, wid, ht,} L|R [T])}%
+ {cct}%
{ Thermocouple drawn to the left (by default) of the
{\sl linespec} line. A {\tt T} argument truncates the leads so
- only the two branches appear. {\tt R=}
- right orientation. \seesect{Twoterminal:}}
-\macrodef{thicklines\_}{thicklines_}{({\sl number})}
- {gen}
- {set line thickness in points}
-\macrodef{thinlines\_}{thinlines_}{({\sl number})}
- {gen}
- {set line thickness in points}
-\macrodef{threeD\_init}{threeD_init}{}
- {3D} {initialize 3D transformations (reads {\tt lib3D.m4})}
+ only the two branches appear. {\tt R=}%
+ right orientation. \seesect{Twoterminal:}}%
+\macrodef{thicklines\_}{thicklines_}{({\sl number})}%
+ {gen}%
+ {set line thickness in points}%
+\macrodef{thinlines\_}{thinlines_}{({\sl number})}%
+ {gen}%
+ {set line thickness in points}%
+\macrodef{threeD\_init}{threeD_init}{}%
+ {3D} {initialize 3D transformations (reads {\tt lib3D.m4})}%
\macrodef{thyristor}{thyristor}{(\linespec,%
- {\tt [SCR|SCS|SUS|SBS|IEC][{\sl chars}]})}
- {cct}
- {Composite thyristor element in {\tt []}block:
- types
- SCR: silicon controlled rectifier
- (default), SCS: silicon controlled
- switch, SUS: silicon unilateral switch,
- SBS: silicon bilateral switch, IEC:
- type IEC.
- {\sl Chars} to modify or define the element:
- K: open arrowheads, A: arrowhead, F:
- half arrowhead, B: bidirectional diode,
- E: adds envelope, H: perpendicular
- gate (endpoint G), N: anode gate
- (endpoint Ga), U: centre line in diodes
- V: perpendicular gate across arrowhead
- centre,
- R=right orientation, E=envelope
- \seesect{Semiconductors:}}
-\macrodef{thyristor\_t}{thyristor_t}{({\sl linespec, chars, label})}
- {cct}
+ {\tt [SCR|SCS|SUS|SBS|IEC][{\sl chars}]})}%
+ {cct}%
+ {Composite thyristor element in {\tt []}block, types:\\
+ {\tt SCR}: silicon controlled rectifier (default),\\
+ {\tt SCS}: silicon controlled switch,\\
+ {\tt SUS}: silicon unilateral switch,\\
+ {\tt SBS}: silicon bilateral switch,\\
+ {\tt IEC}: type IEC.\\
+ {\sl Chars} to modify or define the element:\\
+ {\tt K}: open arrowheads,\\
+ {\tt A}: arrowhead,\\
+ {\tt F}: half arrowhead,\\
+ {\tt B}: bidirectional diode,\\
+ {\tt E}: adds envelope,\\
+ {\tt H}: perpendicular gate (endpoint {\sl G}),\\
+ {\tt N}: anode gate (endpoint {\sl Ga}),\\
+ {\tt U}: centre line in diodes,\\
+ {\tt V}: perpendicular gate across arrowhead centre,\\
+ {\tt R}: right orientation,\\
+ {\tt E}: envelope
+ \seesect{Semiconductors:}}%
+\macrodef{thyristor\_t}{thyristor_t}{({\sl linespec, chars, label})}%
+ {cct}%
{Wrapper to place a thyristor as a two-terminal element with
{\tt [ ]} block label given by the third argument
- \seesect{Semiconductors:}}
-\macrodef{tikznode}{tikznode}{({\sl \Tikz node name, position}) }
- {pgf}
- {insert \Tikz code to define a zero-size \Tikz node at {\sl location}
+ \seesect{Semiconductors:}}%
+\macrodef{tikznode}{tikznode}{({\sl \Tikz node name, position}) }%
+ {pgf}%
+ {insert \Tikz code to define a zero-size \Tikz node at {\sl location}%
(default {\tt Here}) to assist with inclusion of \pic code output
in \Tikz diagrams. This macro must be invoked in the outermost
- \pic scope. \seesect{Tikzwithpic:}}
-\macrodef{tline}{tline}{(\linespec,{\sl wid},{\sl ht}) }
- {cct}
- {transmission line, manhattan direction\seesect{Twoterminal:}}
-\macrodef{ToPos}{ToPos}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) }
- {gen}
+ \pic scope. \seesect{Tikzwithpic:}}%
+\macrodef{tline}{tline}{(\linespec,{\sl wid},{\sl ht}) }%
+ {cct}%
+ {transmission line, manhattan direction\seesect{Twoterminal:}}%
+\macrodef{ToPos}{ToPos}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) }%
+ {gen}%
{Evaluates to {\tt from {\sl position} - Rect\_({\sl length, angle}) to
- {\sl position}} from the polar-coordinate data in the arguments }
+ {\sl position}} from the polar-coordinate data in the arguments }%
\macrodef{transformer}{transformer}{(\linespec,L|R,{\sl np},%
-[A|P][W|L][D1|D2|D12|D21],{\sl ns})}
- {cct}
- {2-winding transformer or choke with terminals P1, P2, TP, S1,
- S2, TS:
- arg2: L = left, R = right, arg3: np primary arcs, arg5: ns secondary
- arcs, arg4: A = air core, P = powder (dashed) core, W = wide windings,
- L = looped windings, D1: phase dots at P1 and S1 end; D2 at P2 and
- S2 end; D12 at P1 and S2 end; D21 at P2 and S1 end
- \seesect{Composite:}}
-\macrodef{tr\_xy\_init}{tr_xy_init}{({\sl origin, unit size, sign })}
- {cct}
- {initialize {\tt tr\_xy}}
-\macrodef{tr\_xy}{tr_xy}{({\sl x, y})}
- {cct}
- {relative macro internal coordinates adjusted for {\tt L|R}}
-\macrodef{tstrip}{tstrip}{(R|L|U|D|{\sl degrees, nterms, chars})}
- {cct}
+[A|P][W|L][D1|D2|D12|D21],{\sl ns})}%
+ {cct}%
+ {2-winding transformer or choke with terminals {\sl P1, P2, TP, S1, S2, TS}:\\
+ arg2: {\tt L}: left, {\tt R}: right,\\
+ arg3: np primary arcs,\\
+ arg5: ns secondary arcs,\\
+ arg4:
+ {\tt A}: air core,\\
+ {\tt P}: powder (dashed) core,\\
+ {\tt W}: wide windings,\\
+ {\tt L}: looped windings,\\
+ {\tt D1}: phase dots at {\sl P1} and {\sl S1} end;\\
+ {\tt D2}: at {\sl P2} and {\sl S2} end;\\
+ {\tt D12}: at {\sl P1} and {\sl S2} end;\\
+ {\tt D21} at {\sl P2} and {\sl S1} end
+ \seesect{Composite:}}%
+\macrodef{tr\_xy\_init}{tr_xy_init}{({\sl origin, unit size, sign })}%
+ {cct}%
+ {initialize {\tt tr\_xy}}%
+\macrodef{tr\_xy}{tr_xy}{({\sl x, y})}%
+ {cct}%
+ {relative macro internal coordinates adjusted for {\tt L|R}}%
+\macrodef{tstrip}{tstrip}{(R|L|U|D|{\sl degrees, nterms, chars})}%
+ {cct}%
{terminal strip, chars:
- I=invisible terminals, C=circle terminals (default), D=dot terminals,
- O=omitted separator lines, {\tt wid=}value{\tt ;} total strip width,
- {\tt ht=}value{\tt ;} strip height
- \seesect{Composite:}}
+ I (invisible terminals), C (default circle terminals), D (dot terminals),
+ O (omitted separator lines), {\tt wid=}value{\tt ;} total strip width,
+ {\tt ht=}value{\tt ;} strip height, {\tt box={\sl shaded etc.};}%
+ \seesect{Composite:}}%
\macrodef{ttmotor}{ttmotor}{({\sl linespec, string, diameter, brushwid,
-brushht})}
- {cct}
- {motor with label\seesect{Twoterminal:}}
-\macrodef{twopi\_}{twopi_}{}
- {gen}
- {$2\pi$}
+brushht})}%
+ {cct}%
+ {motor with label\seesect{Twoterminal:}}%
+\macrodef{twopi\_}{twopi_}{}%
+ {gen}%
+ {$2\pi$}%
%
\Letter{U}%
-\macrodef{ujt}{ujt}{(\linespec,R,P,E)}
- {cct}
+\macrodef{ujt}{ujt}{(\linespec,R,P,E)}%
+ {cct}%
{unijunction transistor, right, P-channel, envelope
- \seesect{Semiconductors:}}
-\macrodef{unit3D}{unit3D}{(x,y,z)}
- {3D} {unit triple in the direction of triple x,y,z}
-\macrodef{up\_\_}{up__}{}
- {gen}
- {up with respect to current direction}
-\macrodef{up\_}{up_}{}
- {gen}
- {set current direction up \seesect{Placing:}}
+ \seesect{Semiconductors:}}%
+\macrodef{unit3D}{unit3D}{(x,y,z)}%
+ {3D} {unit triple in the direction of triple x,y,z}%
+\macrodef{up\_\_}{up__}{}%
+ {gen}%
+ {up with respect to current direction}%
+\macrodef{up\_}{up_}{}%
+ {gen}%
+ {set current direction up \seesect{Placing:}}%
%
\Letter{V}%
-\macrodef{variable}{variable}{(`{\sl element}',
- {\tt [A|P|L|[u]N|[u]NN][C|S]}, [+|-]{\sl angle},
- {\sl length}, at position)}
- {cct}
- {overlaid arrow or line to indicate variable 2-terminal element:
- {\tt A}=arrow, {\tt P}=preset, {\tt L}=linear, {\tt N}= symmetric
- nonlinear, {\tt C}=continuous, {\tt S}=setpwise; {\tt u} changes
- the nonlinearity direction. The angle is absolute but preceding
- it with a sign makes the angle (often -30 or -45) relative to the
- element drawing direction. If arg5 is blank the symbol is placed
- over the last {\tt [ ]} block
- \seesect{Twoterminal:}}
-\macrodef{Vcoords\_}{Vcoords_}{({\sl position})}
- {gen}
- {The $x, y$ coordinate pair of the position}
-\macrodef{Vdiff\_}{Vdiff_}{({\sl position},{\sl position})}
- {gen}
+\macrodef{variable}{variable}{(`{\sl element}', {\sl chars}, [+|-]{\sl angle},
+ {\sl length}, at position)}%
+% {\tt [A|P|L|[u]N|[u]NN][C|S]},
+ {cct}%
+ {Overlaid arrow or line to indicate variable 2-terminal element:
+ The {\sl chars} are\\
+ {\tt A}: arrow,\\
+ {\tt P}: preset,\\
+ {\tt L}: linear,\\
+ {\tt N}: symmetric nonlinear,\\
+ {\tt C}: continuous,\\
+ {\tt S}: setpwise;\\
+ {\tt u} changes the nonlinearity direction. The angle is absolute
+ but preceding it with a sign makes the angle (often -30 or -45)
+ relative to the element drawing direction.\\
+ If arg5 is blank the symbol is placed over the last {\tt []} block
+ \seesect{Twoterminal:}}%
+\macrodef{Vcoords\_}{Vcoords_}{({\sl position})}%
+ {gen}%
+ {The $x, y$ coordinate pair of the position}%
+\macrodef{Vdiff\_}{Vdiff_}{({\sl position},{\sl position})}%
+ {gen}%
{{\tt Vdiff\_(A,B)} evaluates to {\tt A-(B)} with dpic, {\tt
- A-(B.x,B.y)}
- with gpic}
-\macrodef{vec\_}{vec_}{({\sl x},{\sl y})}
- {gen}
- {position rotated with respect to current direction}
-\macrodef{View3D}{View3D}{}
- {3D} {The view vector (triple) defined by {\tt setview({\sl azim,
- elev})}. The
- {\tt project} macro projects onto the plane perpendicular to this
- vector}
-\macrodef{vlength}{vlength}{({\sl x},{\sl y})}
- {gen}
- {vector length $\sqrt{x^2+y^2}$}
-\macrodef{vperp}{vperp}{({\sl linear object})}
- {gen}
- {unit-vector pair CCW-perpendicular to linear object}
-\macrodef{Vperp}{Vperp}{({\sl position name}, {\sl position name})}
- {gen}
+ A-(B.x,B.y)}%
+ with gpic}%
+\macrodef{vec\_}{vec_}{({\sl x},{\sl y})}%
+ {gen}%
+ {position rotated with respect to current direction}%
+\macrodef{vec3}{vec3}{({\sl vector})}%
+ {dpictools}%
+ {$\;\;$ Expands to the threee components of the vector argument separated
+ by commas.}%
+\macrodef{View3D}{View3D}{}%
+ {3D} {The view vector (triple) defined by {\tt setview({\sl azimuth,
+ elevation, rotation})}. The {\tt project} macro projects onto the plane
+ through {\tt (0,0)} and orthogonal to this vector.}%
+\macrodef{vlength}{vlength}{({\sl x},{\sl y})}%
+ {gen}%
+ {vector length $\sqrt{x^2+y^2}$}%
+\macrodef{vperp}{vperp}{({\sl linear object})}%
+ {gen}%
+ {unit-vector pair CCW-perpendicular to linear object}%
+\macrodef{Vperp}{Vperp}{({\sl position name}, {\sl position name})}%
+ {gen}%
{unit-vector pair CCW-perpendicular to line joining two named
- positions}
-\macrodef{vrot\_}{vrot_}{({\sl x},{\sl y},{\sl xcosine},{\sl ycosine})}
- {gen}
- {rotation operator}
-\macrodef{vscal\_}{vscal_}{({\sl number},{\sl x},{\sl y})}
- {gen}
- {vector scale operator}
-\macrodef{Vsprod\_}{Vsprod_}{({\sl position}, {\sl expression})}
- {gen}
- {The vector in arg 1 multiplied by the scalar in arg 2}
-\macrodef{Vsum\_}{Vsum_}{({\sl position},{\sl position})}
- {gen}
+ positions}%
+\macrodef{vrot\_}{vrot_}{({\sl x},{\sl y},{\sl xcosine},{\sl ycosine})}%
+ {gen}%
+ {rotation operator}%
+\macrodef{vscal\_}{vscal_}{({\sl number},{\sl x},{\sl y})}%
+ {gen}%
+ {vector scale operator}%
+\macrodef{Vsprod\_}{Vsprod_}{({\sl position}, {\sl expression})}%
+ {gen}%
+ {The vector in arg 1 multiplied by the scalar in arg 2}%
+\macrodef{Vsum\_}{Vsum_}{({\sl position},{\sl position})}%
+ {gen}%
{{\tt Vsum\_(A,B)} evaluates to {\tt A+B} with dpic, {\tt
- A+(B.x,B.y)}
- with gpic}
+ A+(B.x,B.y)}%
+ with gpic}%
%
\Letter{W}%
-\macrodef{while\_}{while_}{(`{\sl test}',`{\sl actions}')}
- {gen}
- {Integer m4 while loop}
-\macrodef{wid\_}{wid_}{}
- {gen}
- {width with respect to current direction}
+\macrodef{while\_}{while_}{(`{\sl test}',`{\sl actions}')}%
+ {gen}%
+ {Integer m4 while loop}%
+\macrodef{wid\_}{wid_}{}%
+ {gen}%
+ {width with respect to current direction}%
\macrodef{winding}{winding}{(L|R, {\sl diam, pitch, turns, core wid,
- core color})}
- {cct}
- {core winding drawn in the current direction; {\tt R}=right-handed
- \seesect{Composite:}}
-\macrodef{w\_}{w_}{}
- {gen}
- {.w with respect to current direction}
-\macrodef{XOR\_gate}{XOR_gate}{({\sl n},N)}
- {log}
- {`xor' gate, 2 or {\sl n\/} inputs; N=negated input.
+ core color})}%
+ {cct}%
+ {core winding drawn in the current direction; {\tt R}: right-handed
+ \seesect{Composite:}}%
+\macrodef{w\_}{w_}{}%
+ {gen}%
+ {.w with respect to current direction}%
+\macrodef{XOR\_gate}{XOR_gate}{({\sl n},N)}%
+ {log}%
+ {`xor' gate, 2 or {\sl n\/} inputs; {\tt N}: negated input.
Otherwise, arg1 can be a sequence of letters {\tt P|N} to define
normal or negated inputs.
- \seesect{Logicgates:}}
-\macrodef{XOR\_off}{XOR_off}{}
- {log}
- {XOR and NXOR offset of input face}
+ \seesect{Logicgates:}}%
+\macrodef{XOR\_off}{XOR_off}{}%
+ {log}%
+ {XOR and NXOR offset of input face}%
%
\Letter{X}%
-\macrodef{xtal}{xtal}{(\linespec,{\sl keys})}
- {cct}
+\macrodef{xtal}{xtal}{(\linespec,{\sl keys})}%
+ {cct}%
{Quartz crystal. The {\sl keys} are
- {\tt type=N} (default) or {\tt R} (round);
- type {\tt N} keys:
- {\tt lgth=}{\sl expr} (body length);
- {\tt wdth=}{\sl expr} (body width);
- {\tt bxwd=}{\sl expr} (body inner box width);
- {\tt box=} box attributes ({\tt shaded} $\ldots$);
- type {\tt R} keys:
- {\tt outerdiam=}{\sl expr};
- {\tt innerdiam=}{\sl expr};
- {\tt outer=} outer circle attributes ({\tt dotted} $\ldots$);
+ {\tt type=N} (default) or {\tt type=R} (round);\\
+ type {\tt N} keys:\\
+ {\tt lgth=}{\sl expr} (body length);\\
+ {\tt wdth=}{\sl expr} (body width);\\
+ {\tt bxwd=}{\sl expr} (body inner box width);\\
+ {\tt box=} box attributes ({\tt shaded} $\ldots$);\\
+ type {\tt R} keys:\\
+ {\tt outerdiam=}{\sl expr};\\
+ {\tt innerdiam=}{\sl expr};\\
+ {\tt outer=} outer circle attributes ({\tt dotted} $\ldots$);\\
{\tt inner=} inner circle attributes ({\tt shaded} $\ldots$)%
-\seesect{Twoterminal:}}
-\macrodef{xtract}{xtract}{({\sl string, substr1, substr2, $\ldots$})}
- {gen}
- {returns substrings if present}
+\seesect{Twoterminal:}}%
+\macrodef{xtract}{xtract}{({\sl string, substr1, substr2, $\ldots$})}%
+ {gen}%
+ {returns substrings if present}%
\Letter{Y}%
\macrodef{Ysymbol}{Ysymbol}{(at {\sl position},keys,
- U|D|L|R|{\sl degrees}) (default {\tt U} for up)}
- {cct}
+ U|D|L|R|{\sl degrees}) (default {\tt U} for up)}%
+ {cct}%
{Y symbol for power-system diagrams
- {\sl keys:} {\tt size={\sl expression}; type=G}}
-% \end{tabbing}
+ {\sl keys:} {\tt size={\sl expression}; type=G}}%
+% \end{tabbing}%
diff --git a/graphics/circuit_macros/doc/fetMan.m4 b/graphics/circuit_macros/doc/fetMan.m4
index 9c39871378..3eb92ae5dc 100644
--- a/graphics/circuit_macros/doc/fetMan.m4
+++ b/graphics/circuit_macros/doc/fetMan.m4
@@ -151,7 +151,11 @@ Row3: [
{`"{\tt $\;$ Fe\_fet(,,TEDSQuB)}"' at J.s+(0,-0.15) below
"$G$" at J.G rjust
"$S$" at J.S rjust
- "$D$" at J.D ljust }
+ "$D$" at J.D ljust
+ thinlines_
+ arrow <- down .05 left .18 from (J.G.x,J.G.y-0.1)
+ "\tt T" rjust
+ thicklines_ }
] with .nw at last [].sw
Row4: [
diff --git a/graphics/circuit_macros/doc/heaterMan.m4 b/graphics/circuit_macros/doc/heaterMan.m4
index da22dbabc6..862486a0df 100644
--- a/graphics/circuit_macros/doc/heaterMan.m4
+++ b/graphics/circuit_macros/doc/heaterMan.m4
@@ -2,25 +2,31 @@
# heaterMan.m4
cct_init
-movewid = 2 pt__
-hm = 2.05
-right_
{
- {lamp ; move; "`{\tt lamp}'" ljust}
+ {E: lamp(,,shaded "yellow")
+ "`\tt\shortstack[l]{lamp(,{,}\\\;shaded \"yellow\")}'" ljust below \
+ at E.start -(textoffset,0) }
move right_ 1.5
- {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust}
+ {E: lamp(,T)
+ "`\tt lamp(,T)'" ljust below at E.start -(textoffset,0)}
+ move right_ 1.0
+ {E: thermocouple
+ "`\tt thermocouple'" ljust below at E.start -(textoffset,0)}
move right_ 1.25
- {thermocouple ; move;" `{\tt thermocouple}'" ljust }
- move right_ hm
- {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust }
+ {E: thermocouple(,,,T)
+ "`\tt thermocouple(,{,},T)'" ljust below at E.start -(textoffset,0) }
}
-move down 0.25; right_
+move down 0.5; right_
{
- {heater; move;"`{\tt heater}'" ljust}
- move right_ hm
- {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust}
- move right_ hm+0.4
- {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust}
+ {E: heater(,,,,shaded "red!50")
+ "`\tt\shortstack[l]{heater(,{,},{,}\\ \;shaded \"red!50\")}'" ljust below \
+ at (E.start-(textoffset,0),last [].sw)}
+ move right_ 1.5
+ {E: heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust below \
+ at E.start -(textoffset,0) }
+ move right_ 1.5
+ {E: heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust below \
+ at E.start -(textoffset,0) }
}
.PE
diff --git a/graphics/circuit_macros/doc/relaycoilMan.m4 b/graphics/circuit_macros/doc/relaycoilMan.m4
index 7966a32294..962b0732b9 100644
--- a/graphics/circuit_macros/doc/relaycoilMan.m4
+++ b/graphics/circuit_macros/doc/relaycoilMan.m4
@@ -4,40 +4,41 @@ cct_init
spc = dimen_/3
{ relaycoil; S: `"\tt relaycoil"' at last [].s+(0,-16bp__)
- { "\sl V1" wid 10bp__ at last [].V1 rjust
- "\sl V2" at last [].V2 ljust }
- K: relaycoil(NX) with .nw at last [].ne+(spc*4,0); "\tt (NX)" at (last [],S)
+ {`"\sl V1"' wid 10bp__ at last [].V1 rjust
+ `"\sl V2"' at last [].V2 ljust }
+ K: relaycoil(NX,,,,fill_(0.9)) with .nw at last [].ne+(spc*4,0)
+ `"\tt (NX,{,},{,}"' at (last [],S) `"\tt fill\_(0.9))"'
{ thinlines_
- spline <- from K.A1 left 7bp__ then up 4bp__ left 4bp__; "\sl A1" rjust
- arrow <- from K.A2 left 10bp__; "\sl A2" rjust
- spline <- from K.A3 left 7bp__ then down 4bp__ left 4bp__; "\sl A3" rjust
- spline <- from K.B1 right 7bp__ then up 4bp__ right 4bp__; "\sl B1" ljust
- arrow <- from K.B2 right 10bp__; "\sl B2" ljust
- spline <- from K.B3 right 7bp__ then down 4bp__ right 4bp__; "\sl B3" ljust
+ spline <- from K.A1 left 7bp__ then up 4bp__ left 4bp__;`"\sl A1"' rjust
+ arrow <- from K.A2 left 10bp__;`"\sl A2"' rjust
+ spline <- from K.A3 left 7bp__ then down 4bp__ left 4bp__;`"\sl A3"' rjust
+ spline <- from K.B1 right 7bp__ then up 4bp__ right 4bp__;`"\sl B1"' ljust
+ arrow <- from K.B2 right 10bp__;`"\sl B2"' ljust
+ spline <- from K.B3 right 7bp__ then down 4bp__ right 4bp__;`"\sl B3"' ljust
thicklines_
}
- relaycoil(AXSR) with .nw at last [].ne+(spc*5,0); "\tt (AXSR)" at (last [],S)
- { "\sl V1" at last [].V1 rjust; "\sl V2" at last [].V2 rjust }
- relaycoil(BXSR) with .nw at last [].ne+(spc*2,0); "\tt (BXSR)" at (last [],S)
- { "\sl V1" at last [].V1 ljust; "\sl V2" at last [].V2 ljust }
- relaycoil(SR) with .nw at last [].ne+(spc*3,0); "\tt (SR)" at (last [],S)
- relaycoil(SO) with .nw at last [].ne+(spc,0); "\tt (SO)" at (last [],S)
- relaycoil(SOR) with .nw at last [].ne+(spc,0); "\tt (SOR)" at (last [],S)
- relaycoil(PC) with .nw at last [].ne+(spc,0); "\tt (PC)" at (last [],S)
+ relaycoil(AXSR) with .nw at last [].ne+(spc*5,0);`"\tt (AXSR)"' at (last [],S)
+ {`"\sl V1"' at last [].V1 rjust;`"\sl V2"' at last [].V2 rjust }
+ relaycoil(BXSR) with .nw at last [].ne+(spc*2,0);`"\tt (BXSR)"' at (last [],S)
+ {`"\sl V1"' at last [].V1 ljust;`"\sl V2"' at last [].V2 ljust }
+ relaycoil(SR) with .nw at last [].ne+(spc*3,0);`"\tt (SR)"' at (last [],S)
+ relaycoil(SO) with .nw at last [].ne+(spc,0);`"\tt (SO)"' at (last [],S)
+ relaycoil(SOR) with .nw at last [].ne+(spc,0);`"\tt (SOR)"' at (last [],S)
+ relaycoil(PC) with .nw at last [].ne+(spc,0);`"\tt (PC)"' at (last [],S)
}
spc = dimen_/4
{
move down_ 3/4; right_
- relaycoil(HS); S: "\tt (HS)" at last [].s+(0,-12bp__)
- relaycoil(NAC) with .nw at last [].ne+(spc,0); "\tt (NAC)" at (last [],S)
- relaycoil(AC) with .nw at last [].ne+(spc,0); "\tt (AC)" at (last [],S)
- relaycoil(ML) with .nw at last [].ne+(spc,0); "\tt (ML)" at (last [],S)
- relaycoil(PO) with .nw at last [].ne+(spc,0); "\tt (PO)" at (last [],S)
- relaycoil(RM) with .nw at last [].ne+(spc,0); "\tt (RM)" at (last [],S)
- relaycoil(RH) with .nw at last [].ne+(spc,0); "\tt (RH)" at (last [],S)
- relaycoil(TH) with .nw at last [].ne+(spc,0); "\tt (TH)" at (last [],S)
- relaycoil(EL) with .nw at last [].ne+(spc,0); "\tt (EL)" at (last [],S)
- relaycoil(MR) with .sw at last [].se+(spc,0); "\tt (MR)" at (last [],S)
+ relaycoil(HS); S:`"\tt (HS)"' at last [].s+(0,-12bp__)
+ relaycoil(NAC) with .nw at last [].ne+(spc,0);`"\tt (NAC)"' at (last [],S)
+ relaycoil(AC) with .nw at last [].ne+(spc,0);`"\tt (AC)"' at (last [],S)
+ relaycoil(ML) with .nw at last [].ne+(spc,0);`"\tt (ML)"' at (last [],S)
+ relaycoil(PO) with .nw at last [].ne+(spc,0);`"\tt (PO)"' at (last [],S)
+ relaycoil(RM) with .nw at last [].ne+(spc,0);`"\tt (RM)"' at (last [],S)
+ relaycoil(RH) with .nw at last [].ne+(spc,0);`"\tt (RH)"' at (last [],S)
+ relaycoil(TH) with .nw at last [].ne+(spc,0);`"\tt (TH)"' at (last [],S)
+ relaycoil(EL) with .nw at last [].ne+(spc,0);`"\tt (EL)"' at (last [],S)
+ relaycoil(MR) with .sw at last [].se+(spc,0);`"\tt (MR)"' at (last [],S)
}
.PE
diff --git a/graphics/circuit_macros/dpictools.pic b/graphics/circuit_macros/dpictools.pic
index 8d3c81776c..c6ba472200 100644
--- a/graphics/circuit_macros/dpictools.pic
+++ b/graphics/circuit_macros/dpictools.pic
@@ -3,7 +3,7 @@
# m4 macro NeedDpicTools or the pic statement copy "HOMELIB_/dpictools.pic"
# when HOMELIB_ is defined or, generically, copy "<path>dpictools.pic"
-# Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under #
+# Circuit_macros Version 10.5, copyright (c) 2024 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 #
@@ -65,12 +65,12 @@ define array {
define array2 { for i_array=3 to $+ do {
exec sprintf("$1[%g,%g]=$%g",$2,i_array-2,i_array);}}
-# posarray(Var,Position1,Position2,...)
-# Var[1]:Position1; Var[2]:Position2,...
+# posarray(Name,Position1,Position2,...)
+# Name[1]:Position1; Name[2]:Position2,...
define posarray {
for i_array=2 to $+ do { exec sprintf("$1[%g] : $%g",i_array-1,i_array); }}
-# posarray2(Var,expr,position1,position2,...)
+# posarray2(Var,expr,Position1,Position2,...)
# Var[expr,1]:position1; Var[expr,2]:Position2,...
define posarray2 { for i_array=3 to $+ do {
exec sprintf("$1[%g,%g] : $%g",$2,i_array-2,i_array); }}
@@ -322,6 +322,8 @@ define rgbtocmyk {
# Define dpic macro colorname according to the
# postprocessor specified by dpic command-line
# option; colorname then evaluates to a string
+# See m4 macro definergbcolor which gives a
+# color name
define DefineRGBColor {
case(abs(dpicopt), # The order of the following is defined in dpic source:
# MFpic:
@@ -388,7 +390,6 @@ define ShadeObject { [ Origin: Here; nSteps = abs($2)
nextP = $3; nextR = $4; nextG = $5; nextB = $6
nextarg = 7
thisP = nextP
-# Creates [] wid 0 ht 0 at (0,0):
if $2 < 0 then { rgbtohsv(nextR,nextG,nextB,nextH,nextS,nextV) } \
else { rgbtohsv(nextR^2,nextG^2,nextB^2,nextH,nextS,nextV) }
if nextP*nSteps >= 1 then { nextP = 0 }
@@ -451,7 +452,7 @@ define rnd {int($1+sign($1)/2)} # round function
# Operations on complex numbers (x,y)
define Zsum {($1+($2))}
define Zdiff{($1-($2))}
-define Zprod {($1.x*$2.x-$1.y*$2.y,$1.y*$2.x+$1.x*$2.y)}
+define Zprod{($1.x*$2.x-$1.y*$2.y,$1.y*$2.x+$1.x*$2.y)}
define Zinv {($1.x/($1.x^2+$1.y^2),-$1.y/($1.x^2+$1.y^2))}
define Zexp {((cos($1.y),sin($1.y))*expe($1.x))}
define Zcos {(cos($1.x)*cosh($1.y),-sin($1.x)*sinh($1.y))}
diff --git a/graphics/circuit_macros/examples/Alogix.m4 b/graphics/circuit_macros/examples/Alogix.m4
index 4e5abd837c..f77a159875 100644
--- a/graphics/circuit_macros/examples/Alogix.m4
+++ b/graphics/circuit_macros/examples/Alogix.m4
@@ -18,12 +18,13 @@ A: Autologix(
# Draw a tree of gates only. The ~ has been
# replaced by NOT gates.
-B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N) \
+definergbcolor(lightblue,0.72,0.72,0.9)
+B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N,shaded "lightblue") \
with .sw at A.e+(1.3,-0.5)
"{\sl Out}" at B.Out above ljust
`"\shortstack[l]{\tt B: Autologix( \\ \tt \
- Or(And(B,Not(C)),And(Not(A),B,C)),N)}"' \
- wid 242pt__ ht 20pt__ at B.s+(0,-0.2)
+ Or(And(B,Not(C)),And(Not(A),B,C)),N,\\ \tt \
+ shaded \"lightblue\")}"' wid 242pt__ ht 20pt__ at B.s+(0,-0.3)
for_(1,4,1,`"{\sf\small\sl B.In`'m4x}" at B.In`'m4x rjust')
"{\sf\small\sl B.In5}" at B.In5+(0,-1.5bp__) rjust
diff --git a/graphics/circuit_macros/examples/AmpTable.m4 b/graphics/circuit_macros/examples/AmpTable.m4
index c94f682cbc..023533c634 100644
--- a/graphics/circuit_macros/examples/AmpTable.m4
+++ b/graphics/circuit_macros/examples/AmpTable.m4
@@ -5,18 +5,19 @@ movewid = 2pt__
{
{amp ; move ; "{\tt `amp'}" ljust}
move down 0.4; right_
- {amp(,0.3) ; move ; "{\tt `amp'(,0.3)}" ljust}
+ {amp(,0.3) ; move ; "\tt `amp'(,0.3)" ljust}
}
move right_ 2.0
-{ {delay ; move ; "{\tt `delay'}" ljust}
+{ {delay(,,fill_(0.9)) ; move ;
+ "`\tt\shortstack[l]{delay(,{,}\\ fill\_(0.9))}'" ljust}
move down 0.4; right_
{delay(,0.2) ; move ; "{\tt `delay'(,0.2)}" ljust}
}
move right_ 2.0
-{ {integrator ; move ; "{\tt `integrator'}" ljust}
+{ {integrator ; move ; "\tt `integrator'" ljust}
move down 0.5; right_
- {integrator(,0.3) ; move ; "{\tt `integrator'(,0.3)}" wid 82pt__ ljust}
+ {integrator(,0.3) ; move ; "\tt `integrator'(,0.3)" wid 82pt__ ljust}
}
.PE
diff --git a/graphics/circuit_macros/examples/Arresters.m4 b/graphics/circuit_macros/examples/Arresters.m4
index 25dd8a8e33..8c11c19eae 100644
--- a/graphics/circuit_macros/examples/Arresters.m4
+++ b/graphics/circuit_macros/examples/Arresters.m4
@@ -54,11 +54,12 @@ R2: [
[
arrester(,E)
{`"\tt \ldots(,E)"' at last line.c+(0,-0.25)}
- move sep
- A: arrester(,DE)
- {`"\tt \ldots(,DE)"' at last [].s+(0,-0.1)}
+ move up_ 0.1 then right_ sep
+ A: arrester(,DE,,,fill_(0.95))
+ {`"\tt \ldots(,DE,{,},"' wid 61bp__ at A.A+(-0.1,-0.40) ljust \
+ `"\tt fill\_(0.95))"' ljust }
Dlabels
- move sep*3
+ move down_ 0.1 then right_ sep*3
A: arrester(,DS)
{`"\tt \ldots(,DS)"' at last [].s+(0,-0.1)}
Dlabels
diff --git a/graphics/circuit_macros/examples/Dini.m4 b/graphics/circuit_macros/examples/Dini.m4
index 1846917a4a..85bf0d30c7 100644
--- a/graphics/circuit_macros/examples/Dini.m4
+++ b/graphics/circuit_macros/examples/Dini.m4
@@ -3,6 +3,7 @@
# This diagram can be produced using, e.g.
# m4 pdf.m4 Dini.m4 | dpic -d > Dini.pdf
+# https://tex.stackexchange.com/questions/516734/plot-dinis-surface
threeD_init
NeedDpicTools
scale = 1.5
diff --git a/graphics/circuit_macros/examples/EVplugs.m4 b/graphics/circuit_macros/examples/EVplugs.m4
index 6fefd07048..d3e40c8dd2 100644
--- a/graphics/circuit_macros/examples/EVplugs.m4
+++ b/graphics/circuit_macros/examples/EVplugs.m4
@@ -1,6 +1,9 @@
.PS
# EVplugs.m4
# https://en.wikipedia.org/wiki/CHAdeMO
+# https://en.wikipedia.org/wiki/North_American_Charging_Standard
+# https://tesla-cdn.thron.com/static/HXVNIC_North_American_Charging_Standard_Technical_Specification_TS-0023666_HFTPKZ.pdf?xseo=&response-content-disposition=inline%3Bfilename%3D%22North-American-Charging-Standard-Technical-Specification-TS-0023666.pdf%22
+
gen_init
divert(-1)
@@ -60,7 +63,6 @@ define(`EV_J3068',`[ pushkeys_(`$1',
Arc: arc thick m4thick from NW to NE with .c at C m4BG ifelse(`$2',,,
`shaded rgbstring(patsubst(`$2',:,`,'))
line invis from NE to Ac+(0,m4diamLNP/2) \
- then to Ac+(0,m4diamLNP/2) \
then to NW+(1,-1)/sqrt(2)*m4diamLNP/2 + (0,m4diamLNP/2) \
then to NW then to NE shaded rgbstring(patsubst(`$2',:,`,'))')
arc thick m4thick to Ac+(0,m4diamLNP/2) with .c at Ac m4BG
@@ -146,17 +148,86 @@ define(`EV_CHAdeMO',`[ pushdef(`m4sk',33/140/pEVskale) pushkeys_(`$1',
S: circle diam idiam thick m4inthick with .s at C.s+(0,m4thick bp__/2) m4S
E: circle diam idiam thick m4inthick at Cintersect(N,N.diam,S,S.diam) m4DCminus
W: circle diam idiam thick m4inthick at Cintersect(S,S.diam,N,N.diam) m4DCplus
- Loopover_(`Z',
+ foreach_(`Z',
`line thick m4inthick up Z.diam*0.6 right Z.diam*0.6 with .c at Z
line thick m4inthick up Z.diam*0.6 left Z.diam*0.6 with .c at Z',N,S)
- Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \
at N+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',FG,NC,DCP,SS1)
- Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \
at S+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',PP,CL,SS2,CH)
`$3' popdef(`m4sk',`m4wdth',`m4thick',`m4inthick',`m4BG',
`m4DCplus',`m4DCminus',`m4N',`m4S',
`m4FG',`m4NC',`m4SS1',`m4DCP',`m4PP',`m4CL',`m4CH',`m4SS2') ]')
+ `EV_NAC(keys)
+ NAC (Tesla) charging plug in a [] block
+ keys: wdth=expr; # plug width
+ diamL=expr; # diam of L1, L2
+ BG=background attributes; # shaded "gray"
+ L1=attributes; # L1 attributes ...
+ L1inner=attributes; # inner circle...
+ L2=attributes; # L2 attributes ...
+ L2inner=attributes; # inner circle...
+ inner=attributes; # central object
+ Gnd=attributes;
+ Gndinner=attributes;
+ PP=attributes;
+ CP=attributes; '
+define(`EV_NAC',`[ pushkeys_(`$1', `wdth:1.6; diamL:m4wdth*0.28; BG::N;
+ L1::N; L1inner::N; L2::N; L2inner::N; Gndinner::N; inner::N;
+ Gnd::N; PP::N; CP::N; ')
+ sN = 1/pEVskale*m4wdth/1.6 # drawing coord scale factor
+ tt = 8.5/160*m4wdth; # outer width
+ rt = (4^2+43^2)/(2*4)/4*sN; rb = (23^2+56.5^2)/(2*23)/4*sN # arc radii
+ Ct: (0,0.83*m4wdth-rt); Cb: (0,rb) # arc centres
+ ra = rb*0.45; ri = ra/4 # radii
+ NAC_fillet(Ct,-rt,Cb,-rb,ra,NW,Wt,Wb) # draw outer boundary
+ NE: (-NW.x,NW.y); Eb: (-Wb.x,Wb.y); Et: (-Wt.x,Wt.y)
+ m = 9; n = 0; P[n]: (0,0)
+ NAC_arc(m,Cb,rb,-pi_/2,langle(Cb,Eb))
+ NAC_arc(m,NE,ra,langle(NE,Eb),langle(NE,Et))
+ NAC_arc(m,Ct,rt,langle(Ct,Et),pi_/2)
+ fitcurve(P,n,shaded "lightgray" m4BG,-n)
+ pushdef(`m4EVs',`shaded graystring(1)')dnl # inner circles
+ L1: circle diam m4diamL at ( 21.5/2,23.75)*sN m4EVs m4L1
+ inLt = L1.rad/4/(1bp__)
+ L1i: circle thick inLt rad L1.rad-(inLt+L1.thick)/2 bp__ outlined "yellow" \
+ at L1 m4L1inner
+ L2: circle diam m4diamL at (-21.5/2,23.75)*sN m4EVs m4L2
+ L2i: circle thick inLt rad L2.rad-(inLt+L2.thick)/2 bp__ outlined "yellow" \
+ at L2 m4L2inner
+ Gnd: circle diam m4wdth/7 at (0,L1.y-15.92*sN) m4EVs m4Gnd
+ Gndi: circle thick Gnd.rad/4/(1bp__) rad Gnd.rad-(Gnd.rad/4/(1bp__)+ \
+ Gnd.thick)/2 bp__ outlined "green" at Gnd m4Gndinner
+ PP: circle diam Gnd.diam/2 at (-17/2*sN,L1.y-16.52*sN) m4EVs m4PP
+ CP: circle diam Gnd.diam/2 at ( 17/2*sN,L1.y-16.52*sN) m4EVs m4CP
+ rs = (15^2+50^2)/(2*15)/4*sN; Cs: (0,0.3*m4wdth-rs) # inner tri-shape
+ m = 9; n = 0; P[0]: Ct+(0,rt-tt)
+ NAC_fillet(L2,L2.rad+tt,Ct,-(rt-tt),ri,FW,Fb,Ft)
+ NAC_fillet(Cb,-(rb-tt),L2,L2.rad+tt,ri,GW,Gt,Gb)
+ NAC_fillet(Cs,rs,Cb,-(rb-tt),ri,SW,St,Sb)
+ NAC_arc(3,Ct,rt-tt,pi_/2,langle(Ct,Ft))
+ NAC_arc(m,FW,ri,langle(FW,Ft),NAC_ang(FW,Fb))
+ NAC_arc(m,L2,L2.rad+tt,langle(L2,Fb),langle(L2,Gb))
+ NAC_arc(m,GW,ri,NAC_ang(GW,Gb),NAC_ang(GW,Gt))
+ NAC_arc(m,Cb,rb-tt,NAC_ang(Cb,Gt),NAC_ang(Cb,Sb))
+ NAC_arc(m,SW,ri,NAC_ang(SW,Sb),NAC_ang(SW,St))
+ NAC_arc(m,Cs,rs,langle(Cs,St),pi_/2)
+ fitcurve(P,n,fill_(1) m4inner,-n)
+ popdef(`m4EVs',`m4CP',`m4PP',`m4Gnd',`m4inner',
+ `m4L2',`m4L2inner',`m4L1',`m4L1inner',`m4Gndinner',
+ `m4BG',`m4diamL',`m4wdth') `$2' ]')
+ define(`NAC_fillet', #( C1, r1, C2, r2, frad, Cf, T1, T2 )
+ ``$6': Cintersect(`$1',(abs(`$2')+sign(`$2')*(`$5')),
+ `$3',(abs(`$4')+sign(`$4')*(`$5')))
+ `$7': LCintersect(,`$6',`$5',ifelse(index(`$2',-),0,R),`$1',`$6')
+ `$8': LCintersect(,`$6',`$5',ifelse(index(`$4',-),0,R),`$3',`$6')')
+ define(`NAC_arc', #( m, C, rad, a0, af )
+ `m4a0 = `$4'; m4af = `$5'; for i=1 to `$1' do { n+=1
+ P[n]: `$2'+(rect_(`$3',(1-i/`$1')*m4a0+i/`$1'*m4af))
+ P[-n]: (-P[n].x,P[n].y) }')
+ define(`NAC_ang',`pmod(langle(`$1',`$2'),twopi_)')
+
divert(0)dnl
ifsvg(svg_font(sans-serif,6bp__))
@@ -188,21 +259,31 @@ P4: EV_CCS2(L1="L1";L2="L2";L3="L3";N="N";PE="PE",0.85:0.85:0.85,
DCplus="DC+";DCminus="DC-") with .w at P3.e+(P1.wid/5,0)
"EVsmall(PP)" at P4.J.PP EVk
"EVsmall(CP)" at P4.J.CP EVk
+
P5: EV_CHAdeMO( BG=outlined "blue" fill_(0.8);
DCplus=shaded "red" "DC+";
DCminus=shaded "red" "DC-";
- Loopover_(`L',`L=fill_(1);',N,S)
+ foreach_(`L',`L=fill_(1);',N,S)
FG=shaded "green";
- Loopover_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \
+ foreach_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \
with .w at P4.e+(P4.w.x-P3.e.x,0)
- Loopover_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2)
-#
+ foreach_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2)
+
+P6: EV_NAC(wdth=1) with .w at P5.e+(P5.wid/5,0)
+ foreach_(`L',`"EVtxt(`L'm4Lx)" at P6.L',L1,L2)
+thinlines_
+ arrow <- from P6.Gnd.s down P6.ht/5; "EVtxt(Gnd)" below
+ arrow <- from P6.PP.sw down P6.ht/8 left P6.ht/8; "EVtxt(`PP')" rjust
+ arrow <- from P6.CP.se down P6.ht/8 right P6.ht/8; "EVtxt(`CP')" ljust
+thicklines_
+
"EVtxt(`EV_CCS2')" at P4.s+(0,-10bp__)
+ "EVtxt(`EV_NAC')" at (P6,last "")
+ "EVtxt(`EV_CHAdeMO')" at (P5,last "")
"EVtxt(`EV_CCS1')" at (P3,last "")
"EVtxt(`EV_J3068')" at (P2,last "")
"EVtxt(`EV_J1772')" at (P1,last "")
- "EVtxt(`EV_CHAdeMO')" at (P5,last "")
- ] # with .nw at last [].sw+(0,-0.2)
+ ]
iflatex(command "}%")
ifsvg(command "</g>")
diff --git a/graphics/circuit_macros/examples/Flow.m4 b/graphics/circuit_macros/examples/Flow.m4
index 7c514050f0..d91a5eef31 100644
--- a/graphics/circuit_macros/examples/Flow.m4
+++ b/graphics/circuit_macros/examples/Flow.m4
@@ -45,7 +45,7 @@ Case: Fcase(,
arrow down linewid/3 from last [].S
Fbox("Task 1.5",, shaded Thistle) with .N at Here
E:last [].E; S:last [].S],
- "Test 2",Fbox("Task 2" "is bigger", wid fboxwid*1.2 ht fboxht*3/2, \
+ "Test 2",Fbox("Task 2" "is bigger", wid flowboxwid*1.2 ht flowboxht*3/2, \
shaded SeaGreen),
"Test 3",Fbox("Task 3",, shaded RubineRed)dnl
)
@@ -70,7 +70,7 @@ Repeatuntil: Frepeatuntil("$n \geq 5$",,,Fbox("Task"),
Ifthenelse: Fifthenelse("$A<B$",,,
Fbox("False"),
- Fbox("True",ht fboxht*1.2 wid fboxwid)dnl
+ Fbox("True",ht flowboxht*1.2 wid flowboxwid)dnl
) with .nw at Repeatuntil.sw +(-0.5,-0.3)
"\sl .N" at Ifthenelse.N rjust above; "\sl .S" at Ifthenelse.S below rjust
@@ -106,7 +106,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
B2: Fbox(`"Execu\c{c}\~ao"') with .W at B1.E+(awid*3,0)
B3: Fbox(`"Sele\c{c}\~ao"') with .W at B2.E+(awid*3,0)
LT: Ftest(`"Avalia\c{c}\~ao do" "Planejamento"',
- wid fboxwid*1.5 ht fboxht*2.0,
+ wid flowboxwid*1.5 ht flowboxht*2.0,
shaded YellowGreen,
"Correto" at Box.e above ljust;
"Incompleto" at Box.w above rjust) with .S at 0.5 between B1.ne and B2.nw
@@ -114,7 +114,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
arrow from LT.W to (B1.N,LT.W) then to B1.N
arrow from LT.E to (B2.N,LT.E) then to B2.N
RT: Ftest(`"Avalia\c{c}\~ao da" "Execu\c{c}\~ao"',
- wid fboxwid*1.5 ht fboxht*2.0,
+ wid flowboxwid*1.5 ht flowboxht*2.0,
shaded YellowGreen,
"Correto" at Box.e below ljust;
"Incompleto" at Box.w below rjust) with .N at 0.5 between B2.se and B3.sw
@@ -129,6 +129,6 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
arrow up_ awid from B5.N
ellipse wid boxwid/2 ht boxwid/3 shaded "red" # at (B5.S,Start)
# arrow down_ awid from B5.S to last ellipse.n
-] with .nw at last [].Compound.sw+(0,2.5*fboxht)
+] with .nw at last [].Compound.sw+(0,2.5*flowboxht)
.PE
diff --git a/graphics/circuit_macros/examples/FlowchartDefs.m4def b/graphics/circuit_macros/examples/FlowchartDefs.m4def
index fc3dfca6a0..a57d483c4c 100644
--- a/graphics/circuit_macros/examples/FlowchartDefs.m4def
+++ b/graphics/circuit_macros/examples/FlowchartDefs.m4def
@@ -1,7 +1,9 @@
divert(-1)
- Google flowchart display symbol
- FlowchartDefs.m4
- `Some experimental flow-chart macros.
+ FlowchartDefs.m4def
+ Google: flowchart display symbols
+ `Some flow-chart macros with minimal
+ decoration.
+
In the following, every block (subchart) is
in [] brackets, with .N, .S, .E and .W
internally defined. Follow this convention
@@ -12,18 +14,14 @@ divert(-1)
the size, and the third can be used
to add color, dashed lines, labels,
or other embellishements. Default is
- grey fill if arg3 is blank.
-
- These macros have been renamed from earlier
- versions because of slight differences of
- arguments.'
+ grey fill if arg3 is blank.'
define(`FlowchartDefs_')
`Default sizes:'
-define(`fboxwid',linewid*2)
-define(`fboxht',linewid*0.75)
-define(`farrowht',linewid*0.5)
+define(`flowboxwid',linewid*2)
+define(`flowboxht',linewid*0.75)
+define(`flowarrowht',linewid*0.5)
`Fbox( "text", wid expr ht expr, attributes )
The basic task box: arg1 may be 1 or more
@@ -33,13 +31,13 @@ define(`farrowht',linewid*0.5)
the \boxdims macro in the manual. Example:
Fbox("$x < 1$",,
shaded rgbstring(0.46,0.53,0.63))'
-define(`Fbox',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fbox',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box `$2' ifelse(`$3',,`fill_(fillval)',`$3') `$1'
N: Box.n; S:Box.s; E:Box.e; W: Box.w
`$4']')
`Fdelay("text",wid expr ht expr,attributes)'
-define(`Fdelay',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fdelay',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'
N: Box.n; S: Box.s; E: Box.e; W: Box.w
arc from Box.se-(Box.ht/2,0) to Box.ne-(Box.ht/2,0) \
@@ -49,7 +47,7 @@ define(`Fdelay',`[ boxwid = fboxwid; boxht = fboxht
`$4']')
`Fdisplay("text",wid expr ht expr,attributes)'
-define(`Fdisplay',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fdisplay',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'
N: Box.n; S: Box.s; E: Box.e; W: Box.w
NE: Box.ne-(Box.ht/4,0); SE: (NE,Box.s)
@@ -66,7 +64,7 @@ define(`Fdisplay',`[ boxwid = fboxwid; boxht = fboxht
`$4']')
`Fstored("text",wid expr ht expr,attributes)'
-define(`Fstored',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fstored',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'
r = Box.ht*7/8; d = r - sqrt(r^2-(Box.ht/2)^2)
N: Box.n; S: Box.s; E: Box.e-(d,0); W: Box.w
@@ -82,7 +80,7 @@ define(`Fstored',`[ boxwid = fboxwid; boxht = fboxht
`Fconnect("text",
wid expr ht expr[:U|D|L|R|angle], attributes)'
-define(`Fconnect',`[ boxht = fboxht; boxwid = boxht
+define(`Fconnect',`[ boxht = flowboxht; boxwid = boxht
define(`m4wh',`m4Leftstr(`$2')')dnl
define(`m4wid',`patsubst(patsubst(m4wh, ht .*),^wid ,)')dnl
ifelse(m4wid,,`define(`m4wid',boxwid)')dnl
@@ -101,9 +99,9 @@ define(`Fconnect',`[ boxht = fboxht; boxwid = boxht
`Fdata("text",wid expr ht expr,
xslant,attributes)'
-define(`Fdata',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fdata',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'
- xs = ifelse(`$3',,fboxht/6,`($3)/2')
+ xs = ifelse(`$3',,flowboxht/6,`($3)/2')
NE: Box.ne+(xs,0); SE: Box.se-(xs,0)
NW: Box.nw+(xs,0); SW: Box.sw-(xs,0)
N: Box.n; E: Box.e; S: Box.s; W: Box.w
@@ -113,17 +111,17 @@ define(`Fdata',`[ boxwid = fboxwid; boxht = fboxht
`$5']')
`Fprep("text",wid expr ht expr,attributes)'
-define(`Fprep',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fprep',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'
- NE: Box.ne-(fboxht/4,0); E: Box.e; SE: (NE,Box.s); N: Box.n
- NW: Box.nw+(fboxht/4,0); W: Box.w; SW: (NW,Box.s); S: Box.s
+ NE: Box.ne-(flowboxht/4,0); E: Box.e; SE: (NE,Box.s); N: Box.n
+ NW: Box.nw+(flowboxht/4,0); W: Box.w; SW: (NW,Box.s); S: Box.s
line from N to NE to E to SE to SW to W to NW to N \
ifelse(`$3',,`fill_(fillval)',`$3')
ifelse(`$1',,,`$1' at Box)
`$4']')
`Fkeyboard("text",wid expr ht expr,attributes)'
-define(`Fkeyboard',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fkeyboard',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'
NW: Box.nw-(0,min(Box.ht/4,Box.wid/16)); W: Box.w; SW: Box.sw; S: Box.s
NE: Box.ne+(0,min(Box.ht/4,Box.wid/16)); E: Box.e; SE: Box.se; N: 0.5 between NW and NE
@@ -132,7 +130,7 @@ define(`Fkeyboard',`[ boxwid = fboxwid; boxht = fboxht
`$4']')
`Fdocument("text",wid expr ht expr,attributes)'
-define(`Fdocument',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fdocument',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box invis `$2'; Q: move from Box.sw to Box.se
NE: Box.ne; E: Box.e; SE: Box.se-(0,Box.ht/4); N: Box.n
NW: Box.nw; W: Box.w; SW: Box.sw-(0,Box.ht/4); S: Box.s-(0,Box.ht/4)
@@ -144,7 +142,7 @@ define(`Fdocument',`[ boxwid = fboxwid; boxht = fboxht
`$4']')
`Fkeying("text",wid expr ht expr,attributes)'
-define(`Fkeying',`[ boxwid = fboxwid; boxht = fboxht
+define(`Fkeying',`[ boxwid = flowboxwid; boxht = flowboxht
Box: box `$2' invis
hsq = (Box.wid/2)^2-(Box.ht/2)^2
if hsq > 0 then { d = Box.wid/2-sqrt(hsq) } else { d = 0 }
@@ -161,7 +159,7 @@ define(`Fkeying',`[ boxwid = fboxwid; boxht = fboxht
`If-then
Ftest( "text", wid expr ht expr, attributes )'
-define(`Ftest',`[boxwid = fboxwid*0.8; boxht = fboxht*1.4
+define(`Ftest',`[boxwid = flowboxwid*0.8; boxht = flowboxht*1.4
Box: box `$2' invis
N: Box.n; S: Box.s; E: Box.e; W: Box.w
line from 0.5 between last box.n and last box.e to last box.e to last box.s \
@@ -191,7 +189,7 @@ define(`Fcase',`[ down; S: Here; sx = S.x
define(`Fcaseloop_',`ifelse(`$3',,,
`Test`$1': Ftest(patsubst(`$3',":.*,"),`$2',
ifinstr(`$3',":,`patsubst(`$3',.*":,)')) with .N at S
- Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,fboxht)/2)
+ Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,flowboxht)/2)
arrow right linewid/4 from Test`$1'.E \
then down Test`$1'.E.y-Task`$1'.W.y then to Task`$1'.W
S: (Test`$1'.S.x,min(Test`$1'.S.y,Task`$1'.S.y)-linewid/3)
diff --git a/graphics/circuit_macros/examples/Fuses.m4 b/graphics/circuit_macros/examples/Fuses.m4
index 2a01cfa3f2..68629f407d 100644
--- a/graphics/circuit_macros/examples/Fuses.m4
+++ b/graphics/circuit_macros/examples/Fuses.m4
@@ -5,44 +5,46 @@ cct_init
movewid = 0.25
{
- fuse ; {"`{\tt fuse}'" at last line.c+(0,-0.2)}
+ fuse ; {"`\tt fuse'" at last line.c+(0,-0.2)}
move
- fuse(,D) ; {"`{\tt fuse(,D)}'" at last line.c+(0,-0.2)}
+ fuse(,D) ; {"`\tt fuse(,D)'" at last line.c+(0,-0.2)}
move
- fuse(,B) ; {"`{\tt fuse(,B)}'" at last line.c+(0,-0.2)}
+ fuse(,B) ; {"`\tt fuse(,B)'" at last line.c+(0,-0.2)}
move
- fuse(,C) ; {"`{\tt fuse(,C)}'" at last line.c+(0,-0.2)}
+ fuse(,C) ; {"`\tt fuse(,C)'" at last line.c+(0,-0.2)}
move
- fuse(,S) ; {"`{\tt fuse(,S)}'" at last line.c+(0,-0.2)}
+ fuse(,S,,,fill_(0.9))
+ {"`\tt\shortstack[l]{fuse(,S,{,},\\fill\_(0.9))}'" \
+ at last line.c+(0,-0.2)}
move
- fuse(,SB) ; {"`{\tt fuse(,SB)}'" at last line.c+(0,-0.2)}
+ fuse(,SB) ; {"`\tt fuse(,SB)'" at last line.c+(0,-0.2)}
}
move down; right_
{
- fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)}
+ cbreaker; {"`\tt cbreaker'" at last line.c+(0,-0.25)}
move
- fuse(,HC,0.5,0.3) ; {"`{\tt $\ldots$(,HC,0.5,0.3)}'" at last line.c+(0,-0.27)}
+ cbreaker(,R); {"`\tt cbreaker(,R)'" at last line.c+(0,-0.25)}
move
- cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.2)}
+ cbreaker(,,D); {"`\tt $\ldots$(,{,}D)'" at last line.c+(0,-0.25)}
move
- cbreaker(,R,D); {"`{\tt $\ldots$(,R,D)}'" at last line.c+(0,-0.2)}
+ cbreaker(,,T); {"`\tt $\ldots$(,{,}T)'" at last line.c+(0,-0.25)}
move
- cbreaker(,,T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.2)}
- move
- cbreaker(,,TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.2) }
+ cbreaker(,,TS); {"`\tt $\ldots$(,{,}TS)'" at last line.c+(0,-0.25) }
}
move down; right_
{
- jumper ; {"`{\tt jumper}'" at last line.c+(0,-0.2) }
+ fuse(,HB) ; {"`\tt fuse(,HB)'" at last line.c+(0,-0.2)}
move
- jumper(,CJBED) ; {"`{\tt $\ldots$(,CJBED)}'" at last line.c+(0,-0.2) }
+ fuse(,HC,0.5,0.3) ; {"`\tt $\ldots$(,HC,0.5,0.3)'" at last line.c+(0,-0.27)}
move
- jumper(,body=outlined "gray" shaded "gray";)
- {"`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" wid 172bp__ \
- with .w at (last line.start, last "")
- "`\tt \hphantom{$\ldots$(,body=}shaded \"gray\";)'" \
- at last "".sw+(0,-10bp__) ljust }
+ jumper ; {"`\tt jumper'" at last line.c+(0,-0.2) }
move
+ jumper(,CJBED) ; {"`\tt $\ldots$(,CJBED)'" at last line.c+(0,-0.2) }
+ move
+ jumper(,body=outlined "gray" shaded "gray";)
+ "`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" \
+ at last line.start+(0,-20bp__) ljust \
+ "`\tt \hphantom{body=}shaded \"gray\";)'" ljust
}
.PE
diff --git a/graphics/circuit_macros/examples/Makefile b/graphics/circuit_macros/examples/Makefile
index f3444395af..252fe33fe9 100644
--- a/graphics/circuit_macros/examples/Makefile
+++ b/graphics/circuit_macros/examples/Makefile
@@ -99,6 +99,7 @@ BS = tr '|' '\134'
LTX = pdflatex --shell-escape
PDFLTXSRC=printf "|documentclass[11pt]{standalone}\n\
+|usepackage[dvipsnames]{xcolor}\n\
|usepackage{times,boxdims,siunitx,amssymb,tikz,geometry}\n\
|geometry{paperwidth=15in,paperheight=14in,margin=1in}\n\
|pagestyle{empty}|thispagestyle{empty}\n\
diff --git a/graphics/circuit_macros/examples/MoreTable.m4 b/graphics/circuit_macros/examples/MoreTable.m4
index 3d90b71eb4..cc198c198b 100644
--- a/graphics/circuit_macros/examples/MoreTable.m4
+++ b/graphics/circuit_macros/examples/MoreTable.m4
@@ -2,26 +2,33 @@
# heater.m4
cct_init
-Heater: [
- movewid = 2 pt__
- hm = 2.05
- right_
+Heater:[
{
- {lamp ; move; "`{\tt lamp}'" ljust}
+ {E: lamp(,,shaded "yellow")
+ "`\tt\shortstack[l]{lamp(,{,}\\\;shaded \"yellow\")}'" ljust below \
+ at E.start -(textoffset,0) }
move right_ 1.5
- {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust}
+ {E: lamp(,T)
+ "`\tt lamp(,T)'" ljust below at E.start -(textoffset,0)}
+ move right_ 1.0
+ {E: thermocouple
+ "`\tt thermocouple'" ljust below at E.start -(textoffset,0)}
move right_ 1.25
- {thermocouple ; move;" `{\tt thermocouple}'" ljust }
- move right_ hm
- {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust }
+ {E: thermocouple(,,,T)
+ "`\tt thermocouple(,{,},T)'" ljust below at E.start -(textoffset,0) }
}
- move down 0.4; right_
+move down 0.5; right_
{
- {heater; move;"`{\tt heater}'" ljust}
- move right_ hm
- {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust}
- move right_ hm+0.4
- {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust}
+ definergbcolor(lightred,0.8,0.16,0.16)
+ {E: heater(,,,,shaded "lightred")
+ "`\tt\shortstack[l]{heater(,{,},{,}\\ \;shaded \"'lightred`\")}'" ljust below \
+ at (E.start-(textoffset,0),last [].sw)}
+ move right_ 1.5
+ {E: heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust below \
+ at E.start -(textoffset,0) }
+ move right_ 1.5
+ {E: heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust below \
+ at E.start -(textoffset,0) }
}
]
@@ -40,8 +47,8 @@ vm = 0.28
#}
# move down 0.25; right_
{ {memristor ; move;"`{\tt memristor}'" ljust}
- move right_ hm
- {heater; move;"`{\tt heater}'" ljust}
+# move right_ hm
+# {heater; move;"`{\tt heater}'" ljust}
move right_ hm
{tline ; move;"`{\tt tline}'" ljust}
}
@@ -65,5 +72,5 @@ vm = 0.28
{xtal(,type=R;outerdiam=0.2) ; move ;"`{\tt xtal(,type=R)}'" ljust}
}
-] with .nw at Heater.sw+(0,-0.2)
+] with .nw at Heater.sw+(0,-0.3)
.PE
diff --git a/graphics/circuit_macros/examples/Opamp.m4 b/graphics/circuit_macros/examples/Opamp.m4
index 5bdb8ac208..207c0c8785 100644
--- a/graphics/circuit_macros/examples/Opamp.m4
+++ b/graphics/circuit_macros/examples/Opamp.m4
@@ -2,44 +2,44 @@
# Opamp.m4
sinclude(FOpamp.dim)
sinclude(Circuit_macros.dim)
+sinclude(tst.dim)
s_init(Opamp)
cct_init
-
- A: opamp
+ A: opamp(,,,\;body=shaded "yellow")
thinlines_
- s_box(`\tt opam{}p') at A.s-(0,0.35)
- s_box(\tt Out) below at A.Out
+ s_box(`\tt\shortstack[l]{opam{}p(,{,},\\body=shaded \"`yellow'\")}') \
+ at A.s-(0,0.35)
+ s_box(\sl Out) below at A.Out
spline <- from A.In1 left 0.1 then up 0.1 left 0.1
- s_box(\tt In1) rjust above
+ s_box(\sl In1) rjust above
spline <- from A.In2 left 0.1 then down 0.1 left 0.1
- s_box(\tt In2) rjust below
+ s_box(\sl In2) rjust below
arrow <- up 0.1 right 0.1 from A.N
- s_box(\tt N) ljust above
+ s_box(\sl N) ljust above
arrow <- up 0.1 right 0.1 from A.E1
- s_box(\tt E1) ljust above
+ s_box(\sl E1) ljust above
arrow <- up 0.1 right 0.1 from A.E
- s_box(\tt E) ljust above
+ s_box(\sl E) ljust above
arrow <- down 0.1 right 0.1 from A.E2
- s_box(\tt E2) ljust below
+ s_box(\sl E2) ljust below
arrow <- down 0.1 right 0.1 from A.S
- s_box(\tt S) ljust below
+ s_box(\sl S) ljust below
arrow <- left 0.2 from A.W
- s_box(\tt W) rjust
+ s_box(\sl W) rjust
thicklines_
- Point_(15)
- B: opamp(,,,,PR) with .sw at A.se+(0.65,0)
+ Point_(90)
+ B: opamp(,,,,PR) with .sw at A.se+(1,0)
thinlines_
- s_box(`\tt Point\_(15); opam{}p(,{,},{,}PR)') at B.s-(0,0.20)
- spline <- right arrowht up arrowht from B.V1 then right 0.1
- s_box(\tt V1) ljust
+ s_box(`\tt\shortstack[l]{Point\_(90);\\opam{}p(,{,},{,}PR)}') \
+ at B.s-(0,0.20)
+ spline <- left arrowht down arrowht from B.V1 then left 0.1
+ s_box(\sl V1) rjust
spline <- right arrowht down arrowht from B.V2 then right 0.1
- s_box(\tt V2) ljust
+ s_box(\sl V2) ljust
thicklines_
- Point_(90)
- C: opamp with .sw at B.se+(1.05,0)
- s_box(`\tt Point\_(90); opam{}p') at C.s-(0,0.35)
right_
- D: opamp(,,,,T) with .sw at C.se+(0.65,0)
- s_box(`\tt opam{}p(,{,},{,}T)') at D.s-(0,0.20)
+ D: opamp(,,,body=shaded "orange",T) with .sw at B.se+(0.95,0)
+ s_box(`\tt\shortstack[l]{opam{}p(,{,},\\body=shaded \"`orange'\"\\,T)}') \
+ at D.s+(0.2,-0.25)
.PE
diff --git a/graphics/circuit_macros/examples/Plate.m4 b/graphics/circuit_macros/examples/Plate.m4
index b3a08a2439..a13c09d2ae 100644
--- a/graphics/circuit_macros/examples/Plate.m4
+++ b/graphics/circuit_macros/examples/Plate.m4
@@ -93,7 +93,7 @@ thicklines_(1)
thinlines_
dimension_(from T2 to (T2.x,-T2.y),30,
dialabel("35.5" "36.0",12),textht*3)
- dimension_(from T0 to T0+(T1.x,0),-8," 6.1 " " 5.9 ",textht)
+ dimension_(from T0 to T0+(T1.x,0),-8,"6.1" "5.9",textht*3)
dimension_(from S_dimen_.end to S_dimen_.end+(T2.x,0),-9,
"15.4" "15.6",textht*4)
line from E_dimen_.start to (T2,T1) chop 0 chop 1
diff --git a/graphics/circuit_macros/examples/Resistors.m4 b/graphics/circuit_macros/examples/Resistors.m4
index 960897afc0..5e96f95822 100644
--- a/graphics/circuit_macros/examples/Resistors.m4
+++ b/graphics/circuit_macros/examples/Resistors.m4
@@ -19,7 +19,7 @@ vm = 0.28
{resistor(,,AC) ; move ;"`{\tt resistor(,{,}AC)}'" ljust}
}
move down vm; right_
-{ {resistor(,,B) ; move ;"`{\tt resistor(,{,}B)}'" ljust}
+{ {resistor(,5,B) ; move ;"`{\tt resistor(,5,B)}'" ljust}
move right_ hm
{resistor(,,E) ; move
"`\shortstack[l]{\tt resistor(,{,}E)\\ {\tt $\equiv$ ebox}}'" ljust}
diff --git a/graphics/circuit_macros/examples/Rotbox.m4 b/graphics/circuit_macros/examples/Rotbox.m4
index 4480b8d8bd..77fd899542 100644
--- a/graphics/circuit_macros/examples/Rotbox.m4
+++ b/graphics/circuit_macros/examples/Rotbox.m4
@@ -6,13 +6,12 @@ gen_init
rotbox(boxwid/2,,thick 2)
Point_(30)
rotbox(,,shaded "yellow" outlined "blue" thick 3,r=0.1) \
- at last []+vec_(boxwid,0)
+ at last [].se+vec_(boxwid,0)
"r=0.1" at last []
move to last [].ne
Point_(0)
- [[]; for_(2,8,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0)
- sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].ne+(0.1,0)
- [[]; for_(10,16,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0)
- sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].sw+(0,-0.1)
+ [[]; for_(2,16,2, `rotbox(,,dashed,t=m4x/10) with .nw at \
+ ifelse(m4x,10,`2nd [].sw+(0,-0.1)',`last [].ne+(boxwid*0.1,0)')
+ sprintf("t=%g",m4x/10) at last []') ] with .sw at last [].se+(0.1,0)
.PE
diff --git a/graphics/circuit_macros/examples/Sources.m4 b/graphics/circuit_macros/examples/Sources.m4
index 53c732b75d..8c4f9634db 100644
--- a/graphics/circuit_macros/examples/Sources.m4
+++ b/graphics/circuit_macros/examples/Sources.m4
@@ -1,9 +1,6 @@
.PS
# `Sources.m4'
cct_init
-divert(-1)
-
-divert(0)dnl
iflatex(`ifpsfrag(,`latexcommand({\sf)') ')
@@ -11,49 +8,57 @@ movewid = 2pt__
moveht = 0.275
define(`NL',`; move down $1; right_')
{
- {source ; move ; "`source'" ljust} NL
- {source(,I) ; move ; "`source(,I)'" ljust} NL
- {source(,i) ; move ; "`source(,i)'" ljust} NL
- {source(,ii) ; move ; "`source(,ii)'" ljust} NL
- {source(,V) ; move ; "`source(,V)'" ljust} NL
- {source(,v) ; move ; "`source(,v)'" ljust} NL
- {source(,SC) ; move ; "`source(,SC)'" ljust} NL
- {source(,AC); move ; "`source(,AC)'" ljust} NL
- {source(,X) ; move ; "`source(,X)'" ljust} NL
- {source(,F) ; move ; "`source(,F)'" ljust} NL
- {source(,G) ; move ; "`source(,G)'" ljust} NL
- {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3)
- {proximity ; move ; "`\shortstack[l]{proximity\\ = consource(,P)}'" ljust}
+ {source ; move ; "`\tt source'" ljust} NL
+ {source(,I) ; move ; "`\tt source(,I)'" ljust} NL
+ {C:source(,i) ; move ; "`\tt source(,i)'" ljust} NL
+ {D:source(,ti) ; move ; "`\tt source(,ti)'" ljust} NL
+ {source(,ii) ; move ; "`\tt source(,ii)'" ljust} NL
+ {source(,V) ; move ; "`\tt source(,V)'" ljust} NL
+ {source(,v) ; move ; "`\tt source(,v)'" ljust} NL
+ {source(,tv) ; move ; "`\tt source(,tv)'" ljust} NL
+ {source(,SC) ; move ; "`\tt source(,SC)'" ljust} NL
+ {source(,AC); move ; "`\tt source(,AC)'" ljust} NL
+ {source(,X) ; move ; "`\tt source(,X)'" ljust} NL
+ {source(,F) ; move ; "`\tt source(,F)'" ljust} NL
+ {source(,G) ; move ; "`\tt source(,G)'" ljust} NL
+ {source(,Q) ; move ; "`\tt source(,Q)'" ljust} NL #(0.3)
}
move right_ 2.0
{
- {source(,,0.4) ; move ; "`source(,{,}0.4)'" ljust} NL(0.35)
- {source(,P) ; move ; "`source(,P)'" ljust} NL
- {source(,U) ; move ; "`source(,U)'" ljust} NL
- {source(,H) ; move ; "`source(,H)'" ljust} NL
- {source(,R) ; move ; "`source(,R)'" ljust} NL
- {source(,S) ; move ; "`source(,S)'" ljust} NL
- {source(,SCr) ; move ; "`source(,SCr)'" ljust} NL
- {source(,T) ; move ; "`source(,T)'" ljust} NL
- {source(,L) ; move ; "`source(,L)'" ljust} NL
- {source(,B) ; move ; "`source(,B)'" ljust} NL
- {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8)
- {norator ; move ; "`norator'" ljust}
+# {source(,,0.4) ; move ; "`\tt source(,{,}0.4)'" ljust} NL(0.35)
+ {source(,,0.4,,shaded "yellow") ; move ;
+ "`\tt\shortstack[l]{source(,{,}0.4,{,}\\ shaded \"yellow\")}'" ljust} NL(0.35)
+# {source(,P) ; move ; "`\tt source(,P)'" ljust} NL
+ {source(,P,,,fill_(0.9)) ; move ;
+ "`\tt\shortstack[l]{source(,P,{,},\\ fill\_(0.9))}'" ljust} NL
+ {source(,U) ; move ; "`\tt source(,U)'" ljust} NL
+ {source(,H) ; move ; "`\tt source(,H)'" ljust} NL
+ {source(,R) ; move ; "`\tt source(,R)'" ljust} NL
+ {source(,S) ; move ; "`\tt source(,S)'" ljust} NL
+ {source(,SCr) ; move ; "`\tt source(,SCr)'" ljust} NL
+ {source(,T) ; move ; "`\tt source(,T)'" ljust} NL
+ {source(,L) ; move ; "`\tt source(,L)'" ljust} NL
+ {source(,B) ; move ; "`\tt source(,B)'" ljust} NL
+ {nullator ; move ; "`\tt nullator'" ljust} NL(moveht*0.8)
+ {norator ; move ; "`\tt norator'" ljust} NL(moveht*0.9)
+ {ttmotor(,G) ; move ; "`\tt ttmotor(,G)'" ljust} NL(moveht*1.1)
+ {proximity ; move ; "`\tt \shortstack[l]{proximity\\ = consource(,P)}'" ljust}
}
move right_ 2.0
- {source(,N) ; move ; "`source(,N)'" ljust} NL
- {source(,"\rm mA");move; "`source(,\"mA\")'" ljust} NL(0.31)
-# {source(,"mA");move; "`source(,'" ljust \
-# "`\enskip \"mA\")'" ljust} NL(0.31)
- {consource ; move ; "`consource'" ljust} NL(0.32)
- {consource(,I) ; move ; "`consource(,I)'" ljust} NL(0.32)
- {consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32)
- {source(,SE) ; move ; "`source(,SE)'" ljust} NL
- {consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32)
- {consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3)
- {battery ; move ; "`battery'" ljust} NL(0.3)
- {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35)
- {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust}
+ {source(,N) ; move ; "`\tt source(,N)'" ljust} NL
+ {source(,"\rm mA");move; "`\tt source(,\"mA\")'" ljust} NL(0.31)
+# {source(,"mA");move; "`\tt source(,'" ljust \
+# "`\tt \enskip \"mA\")'" ljust} NL(0.31)
+ {consource ; move ; "`\tt consource'" ljust} NL(0.32)
+ {consource(,I) ; move ; "`\tt consource(,I)'" ljust} NL(0.32)
+ {consource(,i) ; move ; "`\tt consource(,i)'" ljust} NL(0.32)
+ {consource(,ti) ; move ; "`\tt consource(,ti)'" ljust} NL(0.32)
+ {source(,SE) ; move ; "`\tt source(,SE)'" ljust} NL
+ {consource(,V) ; move ; "`\tt consource(,V)'" ljust} NL(0.32)
+ {consource(,v) ; move ; "`\tt consource(,v)'" ljust} NL(0.3)
+ {consource(,tv) ; move ; "`\tt consource(,tv)'" ljust} NL(0.3)
+ {battery ; move ; "`\tt battery'" ljust} NL(0.3)
+ {battery(,3,R) ; move ; "`\tt battery(,3,R)'" ljust} #NL(0.35)
iflatex(`ifpsfrag(,`latexcommand(})')')
.PE
diff --git a/graphics/circuit_macros/examples/Switches.m4 b/graphics/circuit_macros/examples/Switches.m4
index 3e599a39ef..0b2d00d0e0 100644
--- a/graphics/circuit_macros/examples/Switches.m4
+++ b/graphics/circuit_macros/examples/Switches.m4
@@ -61,7 +61,7 @@ movewid = 0.25
move down 0.4; right_; {
dswitch(,,WBCb); {"\tt (,{,}WBCb)" at last [].s Below}
move right_
- dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" at last [].s Below}
+ dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" wid 50bp__ at last [].s Below}
move right_
dswitch(,,WBcDI); {"\tt (,{,}WBcDI)" at last [].s Below}
thinlines_
@@ -129,17 +129,17 @@ movewid = 0.25
move down_ 6bp__ then right_
dswitch(,,WBPrM); {"\tt (,{,}WBPrM)" at last [].s Below}
move right_
- dswitch(,,WBDIGX,text=W); #{"\tt (,{,}WBDIGX,W)" at last [].s Below}
+ dswitch(,,WBDIGX,text=W)
{"\tt (,{,}WBDIGX," ljust at last line.start+(0,-15bp__) \
"\tt text=W)" ljust}
move right_
- dswitch(,,WBDIGC,text=M)
+ dswitch(,,WBDIGC,circle="M")
{"\tt (,{,}WBDIGC," ljust at last line.start+(0,-15bp__) \
- "\tt text=M)" ljust}
+ "\tt circle=\"M\")" ljust}
move right_
- dswitch(,,WBcDIGC,text=M) #
+ dswitch(,,WBcDIGC,circle="M")
{"\tt (,{,}WBcDIGC," ljust at last line.start+(0,-15bp__) \
- "\tt text=M)" ljust}
+ "\tt circle=\"M\")" ljust}
}
.PE
diff --git a/graphics/circuit_macros/examples/Three.m4 b/graphics/circuit_macros/examples/Three.m4
index aace5031ac..fb42359b06 100644
--- a/graphics/circuit_macros/examples/Three.m4
+++ b/graphics/circuit_macros/examples/Three.m4
@@ -2,15 +2,12 @@
# Three.m4: three-phase oscillator
cct_init
+definergbcolor(Dandelion,0.825,0.825,0)
define(`section',`[ I: Here
resistor(right elen_*0.75); llabel(,R/2)
T: dot
line down dimen_/2 then right_ dimen_/4
- Amp: opamp(,,,,,
- rgbfill(0.9,0.6,0.1,line to N then to E then to S then to Here)
- "{\scriptsize$-$}" at In1 ljust
- "{\scriptsize$+$}" at In2 ljust
- ) with .In1 at Here
+ Amp: opamp(,,,body=shaded "Dandelion") with .In1 at Here
line left dimen_/4 from Amp.In2 then down dimen_/4; G: ground
resistor(from T to (Amp.Out,T)); llabel(,R)
O: dot
diff --git a/graphics/circuit_macros/examples/Tubediags.m4 b/graphics/circuit_macros/examples/Tubediags.m4
index eb402755c7..6a4f425235 100644
--- a/graphics/circuit_macros/examples/Tubediags.m4
+++ b/graphics/circuit_macros/examples/Tubediags.m4
@@ -334,8 +334,8 @@ Pwr: [
dot(at PXform.ST3); line right_ dimen_/4; dot
dot(at PXform.ST1); line right_ dimen_/4 then down_ dimen_*3/2; ground(,T)
line from PXform.S2.end right_ dimen_*2.5 then up_ dimen_/4
- Rect2: V_5V4G with .F1.sw at Here; "5V4G" at Rect2.n+(0,dimen_/2)
- Rect1: V_5V4G with .e at Rect2.w-(dimen_/2,0); "5V4G" at Rect1.n+(0,dimen_/2)
+ Rect2: V_5U4G with .F1.sw at Here; "5U4G" at Rect2.n+(0,dimen_/2)
+ Rect1: V_5U4G with .e at Rect2.w-(dimen_/2,0); "5U4G" at Rect1.n+(0,dimen_/2)
move to Rect1.F1.sw; line to (Here,PXform.S2.end); dot
move to Rect1.F1.se; line to (Here,PXform.S2.start); dot
move to Rect2.F1.se; line to (Here,PXform.S2.start)
diff --git a/graphics/circuit_macros/examples/UNO.m4 b/graphics/circuit_macros/examples/UNO.m4
index dab914ac80..6338c307c0 100644
--- a/graphics/circuit_macros/examples/UNO.m4
+++ b/graphics/circuit_macros/examples/UNO.m4
@@ -80,7 +80,7 @@ define(`ATMEGA16U2',`[
107;nul,
2;XTAL2(PC0),
108;nul, 109;nul)
- lg_pin(Pin109+(0,lg_pinsep),RESET,Pin24,wN,24,pinlen)
+ lg_pin(Pin109+(0,lg_pinsep),ifpostscript(,\tiny\sf) RESET,Pin24,wN,24,pinlen)
]')
define(`Aleftpin',`move to Chip.sw+(0,m4Lx*lg_pinsep)
Pin`$1': ifelse(`$2',nul,Here,dnl
@@ -112,7 +112,7 @@ define(`ATMEGA328P',`[
303;nul,
10;XTAL2,
304;nul, 305;nul)
- lg_pin(Pin305+(0,lg_pinsep),RESET,Pin1,wN,1,pinlen)
+ lg_pin(Pin305+(0,lg_pinsep),ifpostscript(,\tiny\sf) RESET,Pin1,wN,1,pinlen)
]')
define(`rswitch',`dswitch(`$1',,WBoDCP)
diff --git a/graphics/circuit_macros/examples/control.m4 b/graphics/circuit_macros/examples/control.m4
index 9da5c4a7fc..5ff0b7a91a 100644
--- a/graphics/circuit_macros/examples/control.m4
+++ b/graphics/circuit_macros/examples/control.m4
@@ -133,7 +133,6 @@ Plant: box wid boxwid*3/2 ht boxht*5/4 \
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
-ifelse(1,1,`
ifelse(0,1,`
Multiblock: [
boxht = 0.4
@@ -173,11 +172,6 @@ Rf: doublebox(R_2,R_3) at ((S1.x+T.x)/2,T.y-boxht*5/4)
arrow from Rf.w to (S1,Rf) then to S1.s
"$n_2$" at S1.s+(0,-boxht/2) ljust
] with .nw at Observer.sw + (0,-0.3)
-')
-ifelse(1,1,`
-Attitude: [
-] with .nw at Observer.sw + (0,-0.3)
-')
"(c) A multiblock example" below ljust at last [].sw+(0,-3pt__)
')
@@ -217,7 +211,7 @@ UR:(D.e,UL) + (0.1,0)
line dashed to (Gh.w,Here) "Controller" above
line dashed to (Here,Gh.s+(0,-boxht/2))
line dashed to (UL,Here) then to UL
-] with .nw at last [].sw + (0,-0.2)
+] with .nw at last [].sw + (0,-0.25)
"(d) Nonlinear feedforward (for performance) and small-signal feedback
(for stability)" below ljust at Nonlinear.sw+(0,-5pt__)
diff --git a/graphics/circuit_macros/examples/dpv/AlogixDPV.m4 b/graphics/circuit_macros/examples/dpv/AlogixDPV.m4
index 68bcf53ced..c09a8a8fb8 100644
--- a/graphics/circuit_macros/examples/dpv/AlogixDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/AlogixDPV.m4
@@ -18,12 +18,14 @@ A: Autologix(
# Draw a tree of gates only. The ~ has been
# replaced by NOT gates.
-B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N) \
+B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N, shaded "lightblue" ) \
with .sw at A.e+(1.3,-0.5)
"svg_it(Out)" at B.Out above ljust
"svg_tt(`Autologix(Or(And(B,Not(C)),')" wid 165bp__ \
with .w at B.sw+(-0.6,-0.15)
- "svg_tt(`And(Not(A),B,C)),N)')" wid 122bp__ with .w at last "".w+(1.1,-0.18)
+ "svg_tt(`And(Not(A),B,C)),N,')" wid 122bp__ with .w at last "".w+(1.1,-0.18)
+ "svg_tt(`shaded \"lightblue\")')" wid 120bp__ \
+ with .w at last "".w+(0,-0.18)
for_(1,4,1,`"svg_it(B.In`'m4x)" at B.In`'m4x rjust')
"svg_it(B.In5)" at B.In5+(0,-1.5bp__) rjust
diff --git a/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4 b/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4
index f1d368106a..45a684ef09 100644
--- a/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4
@@ -51,14 +51,16 @@ R2: [
arrow <- from A.B up 0.1 right 0.1; "svg_it(B)" ljust
arrow <- from A.G up 0.05 right 0.15; "svg_it(G)" ljust
thicklines_ }')
+ sep = 0.35
[
arrester(,E)
{"svg_tt(...(,E))" at last line.c+(0,-0.25)}
- move sep
- A: arrester(,DE)
- {"svg_tt(...(,DE))" at last [].s+(0,-0.1)}
+ move up_ 0.1 then right_ sep
+ A: arrester(,DE,,,fill_(0.95))
+ {"svg_tt(...svg_lparen,DE,,,)" wid 61bp__ at A.A+(-0.1,-0.4) ljust \
+ "svg_tt(fill`'svg_fsize(_,65)`'svg_lparen`0.95'svg_rparen`'svg_rparen)" ljust}
Dlabels
- move sep*3
+ move down_ 0.1 then right_ sep*3
A: arrester(,DS)
{"svg_tt(...(,DS))" at last [].s+(0,-0.1)}
Dlabels
diff --git a/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4 b/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4
index 54530a1bfa..d3e40c8dd2 100644
--- a/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4
@@ -1,6 +1,9 @@
.PS
-# EV_lugs.m4
+# EVplugs.m4
# https://en.wikipedia.org/wiki/CHAdeMO
+# https://en.wikipedia.org/wiki/North_American_Charging_Standard
+# https://tesla-cdn.thron.com/static/HXVNIC_North_American_Charging_Standard_Technical_Specification_TS-0023666_HFTPKZ.pdf?xseo=&response-content-disposition=inline%3Bfilename%3D%22North-American-Charging-Standard-Technical-Specification-TS-0023666.pdf%22
+
gen_init
divert(-1)
@@ -60,7 +63,6 @@ define(`EV_J3068',`[ pushkeys_(`$1',
Arc: arc thick m4thick from NW to NE with .c at C m4BG ifelse(`$2',,,
`shaded rgbstring(patsubst(`$2',:,`,'))
line invis from NE to Ac+(0,m4diamLNP/2) \
- then to Ac+(0,m4diamLNP/2) \
then to NW+(1,-1)/sqrt(2)*m4diamLNP/2 + (0,m4diamLNP/2) \
then to NW then to NE shaded rgbstring(patsubst(`$2',:,`,'))')
arc thick m4thick to Ac+(0,m4diamLNP/2) with .c at Ac m4BG
@@ -146,17 +148,86 @@ define(`EV_CHAdeMO',`[ pushdef(`m4sk',33/140/pEVskale) pushkeys_(`$1',
S: circle diam idiam thick m4inthick with .s at C.s+(0,m4thick bp__/2) m4S
E: circle diam idiam thick m4inthick at Cintersect(N,N.diam,S,S.diam) m4DCminus
W: circle diam idiam thick m4inthick at Cintersect(S,S.diam,N,N.diam) m4DCplus
- Loopover_(`Z',
+ foreach_(`Z',
`line thick m4inthick up Z.diam*0.6 right Z.diam*0.6 with .c at Z
line thick m4inthick up Z.diam*0.6 left Z.diam*0.6 with .c at Z',N,S)
- Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \
at N+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',FG,NC,DCP,SS1)
- Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \
+ foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \
at S+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',PP,CL,SS2,CH)
`$3' popdef(`m4sk',`m4wdth',`m4thick',`m4inthick',`m4BG',
`m4DCplus',`m4DCminus',`m4N',`m4S',
`m4FG',`m4NC',`m4SS1',`m4DCP',`m4PP',`m4CL',`m4CH',`m4SS2') ]')
+ `EV_NAC(keys)
+ NAC (Tesla) charging plug in a [] block
+ keys: wdth=expr; # plug width
+ diamL=expr; # diam of L1, L2
+ BG=background attributes; # shaded "gray"
+ L1=attributes; # L1 attributes ...
+ L1inner=attributes; # inner circle...
+ L2=attributes; # L2 attributes ...
+ L2inner=attributes; # inner circle...
+ inner=attributes; # central object
+ Gnd=attributes;
+ Gndinner=attributes;
+ PP=attributes;
+ CP=attributes; '
+define(`EV_NAC',`[ pushkeys_(`$1', `wdth:1.6; diamL:m4wdth*0.28; BG::N;
+ L1::N; L1inner::N; L2::N; L2inner::N; Gndinner::N; inner::N;
+ Gnd::N; PP::N; CP::N; ')
+ sN = 1/pEVskale*m4wdth/1.6 # drawing coord scale factor
+ tt = 8.5/160*m4wdth; # outer width
+ rt = (4^2+43^2)/(2*4)/4*sN; rb = (23^2+56.5^2)/(2*23)/4*sN # arc radii
+ Ct: (0,0.83*m4wdth-rt); Cb: (0,rb) # arc centres
+ ra = rb*0.45; ri = ra/4 # radii
+ NAC_fillet(Ct,-rt,Cb,-rb,ra,NW,Wt,Wb) # draw outer boundary
+ NE: (-NW.x,NW.y); Eb: (-Wb.x,Wb.y); Et: (-Wt.x,Wt.y)
+ m = 9; n = 0; P[n]: (0,0)
+ NAC_arc(m,Cb,rb,-pi_/2,langle(Cb,Eb))
+ NAC_arc(m,NE,ra,langle(NE,Eb),langle(NE,Et))
+ NAC_arc(m,Ct,rt,langle(Ct,Et),pi_/2)
+ fitcurve(P,n,shaded "lightgray" m4BG,-n)
+ pushdef(`m4EVs',`shaded graystring(1)')dnl # inner circles
+ L1: circle diam m4diamL at ( 21.5/2,23.75)*sN m4EVs m4L1
+ inLt = L1.rad/4/(1bp__)
+ L1i: circle thick inLt rad L1.rad-(inLt+L1.thick)/2 bp__ outlined "yellow" \
+ at L1 m4L1inner
+ L2: circle diam m4diamL at (-21.5/2,23.75)*sN m4EVs m4L2
+ L2i: circle thick inLt rad L2.rad-(inLt+L2.thick)/2 bp__ outlined "yellow" \
+ at L2 m4L2inner
+ Gnd: circle diam m4wdth/7 at (0,L1.y-15.92*sN) m4EVs m4Gnd
+ Gndi: circle thick Gnd.rad/4/(1bp__) rad Gnd.rad-(Gnd.rad/4/(1bp__)+ \
+ Gnd.thick)/2 bp__ outlined "green" at Gnd m4Gndinner
+ PP: circle diam Gnd.diam/2 at (-17/2*sN,L1.y-16.52*sN) m4EVs m4PP
+ CP: circle diam Gnd.diam/2 at ( 17/2*sN,L1.y-16.52*sN) m4EVs m4CP
+ rs = (15^2+50^2)/(2*15)/4*sN; Cs: (0,0.3*m4wdth-rs) # inner tri-shape
+ m = 9; n = 0; P[0]: Ct+(0,rt-tt)
+ NAC_fillet(L2,L2.rad+tt,Ct,-(rt-tt),ri,FW,Fb,Ft)
+ NAC_fillet(Cb,-(rb-tt),L2,L2.rad+tt,ri,GW,Gt,Gb)
+ NAC_fillet(Cs,rs,Cb,-(rb-tt),ri,SW,St,Sb)
+ NAC_arc(3,Ct,rt-tt,pi_/2,langle(Ct,Ft))
+ NAC_arc(m,FW,ri,langle(FW,Ft),NAC_ang(FW,Fb))
+ NAC_arc(m,L2,L2.rad+tt,langle(L2,Fb),langle(L2,Gb))
+ NAC_arc(m,GW,ri,NAC_ang(GW,Gb),NAC_ang(GW,Gt))
+ NAC_arc(m,Cb,rb-tt,NAC_ang(Cb,Gt),NAC_ang(Cb,Sb))
+ NAC_arc(m,SW,ri,NAC_ang(SW,Sb),NAC_ang(SW,St))
+ NAC_arc(m,Cs,rs,langle(Cs,St),pi_/2)
+ fitcurve(P,n,fill_(1) m4inner,-n)
+ popdef(`m4EVs',`m4CP',`m4PP',`m4Gnd',`m4inner',
+ `m4L2',`m4L2inner',`m4L1',`m4L1inner',`m4Gndinner',
+ `m4BG',`m4diamL',`m4wdth') `$2' ]')
+ define(`NAC_fillet', #( C1, r1, C2, r2, frad, Cf, T1, T2 )
+ ``$6': Cintersect(`$1',(abs(`$2')+sign(`$2')*(`$5')),
+ `$3',(abs(`$4')+sign(`$4')*(`$5')))
+ `$7': LCintersect(,`$6',`$5',ifelse(index(`$2',-),0,R),`$1',`$6')
+ `$8': LCintersect(,`$6',`$5',ifelse(index(`$4',-),0,R),`$3',`$6')')
+ define(`NAC_arc', #( m, C, rad, a0, af )
+ `m4a0 = `$4'; m4af = `$5'; for i=1 to `$1' do { n+=1
+ P[n]: `$2'+(rect_(`$3',(1-i/`$1')*m4a0+i/`$1'*m4af))
+ P[-n]: (-P[n].x,P[n].y) }')
+ define(`NAC_ang',`pmod(langle(`$1',`$2'),twopi_)')
+
divert(0)dnl
ifsvg(svg_font(sans-serif,6bp__))
@@ -188,22 +259,31 @@ P4: EV_CCS2(L1="L1";L2="L2";L3="L3";N="N";PE="PE",0.85:0.85:0.85,
DCplus="DC+";DCminus="DC-") with .w at P3.e+(P1.wid/5,0)
"EVsmall(PP)" at P4.J.PP EVk
"EVsmall(CP)" at P4.J.CP EVk
+
P5: EV_CHAdeMO( BG=outlined "blue" fill_(0.8);
DCplus=shaded "red" "DC+";
DCminus=shaded "red" "DC-";
- Loopover_(`L',`L=fill_(1);',N,S)
+ foreach_(`L',`L=fill_(1);',N,S)
FG=shaded "green";
- Loopover_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \
+ foreach_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \
with .w at P4.e+(P4.w.x-P3.e.x,0)
- Loopover_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2)
-#
- ifsvg(move from P5.e right 0.2)
+ foreach_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2)
+
+P6: EV_NAC(wdth=1) with .w at P5.e+(P5.wid/5,0)
+ foreach_(`L',`"EVtxt(`L'm4Lx)" at P6.L',L1,L2)
+thinlines_
+ arrow <- from P6.Gnd.s down P6.ht/5; "EVtxt(Gnd)" below
+ arrow <- from P6.PP.sw down P6.ht/8 left P6.ht/8; "EVtxt(`PP')" rjust
+ arrow <- from P6.CP.se down P6.ht/8 right P6.ht/8; "EVtxt(`CP')" ljust
+thicklines_
+
"EVtxt(`EV_CCS2')" at P4.s+(0,-10bp__)
+ "EVtxt(`EV_NAC')" at (P6,last "")
+ "EVtxt(`EV_CHAdeMO')" at (P5,last "")
"EVtxt(`EV_CCS1')" at (P3,last "")
"EVtxt(`EV_J3068')" at (P2,last "")
"EVtxt(`EV_J1772')" at (P1,last "")
- "EVtxt(`EV_CHAdeMO')" at (P5,last "")
- ] # with .nw at last [].sw+(0,-0.2)
+ ]
iflatex(command "}%")
ifsvg(command "</g>")
diff --git a/graphics/circuit_macros/examples/dpv/FlowDPV.m4 b/graphics/circuit_macros/examples/dpv/FlowDPV.m4
index 70fc877618..4903564842 100644
--- a/graphics/circuit_macros/examples/dpv/FlowDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/FlowDPV.m4
@@ -48,7 +48,7 @@ Case: Fcase(,
arrow down linewid/3 from last [].S
Fbox("Task 1.5",, shaded Thistle) with .N at Here
E:last [].E; S:last [].S],
- "Test 2",Fbox("Task 2" "is bigger", wid fboxwid*1.2 ht fboxht*3/2, \
+ "Test 2",Fbox("Task 2" "is bigger", wid flowboxwid*1.2 ht flowboxht*3/2, \
shaded SeaGreen),
"Test 3",Fbox("Task 3",, shaded RubineRed)dnl
)
@@ -79,7 +79,7 @@ Repeatuntil: Frepeatuntil("svg_it(n svg_gt 5)",,,Fbox("Task"),
Ifthenelse: Fifthenelse("svg_it(A svg_lt B)",,,
Fbox("False"),
- Fbox("True",ht fboxht*1.2 wid fboxwid)dnl
+ Fbox("True",ht flowboxht*1.2 wid flowboxwid)dnl
) with .nw at Repeatuntil.sw +(-0.5,-0.3)
"svg_it(.N)" at Ifthenelse.N rjust above
@@ -116,7 +116,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
B2: Fbox("Execu`'svg_ccedilla`'svg_atilde`'o") with .W at B1.E+(awid*3,0)
B3: Fbox("Sele`'svg_ccedilla`'svg_atilde`'o") with .W at B2.E+(awid*3,0)
LT: Ftest("Avalia`'svg_ccedilla`'svg_atilde`'o do" "Planejamento",
- wid fboxwid*1.5 ht fboxht*2.0,
+ wid flowboxwid*1.5 ht flowboxht*2.0,
shaded YellowGreen,
"Correto" at Box.e above ljust;
"Incompleto" at Box.w above rjust) with .S at 0.5 between B1.ne and B2.nw
@@ -125,7 +125,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
arrow from LT.E to (B2.N,LT.E) then to B2.N
RT: Ftest("Avalia`'svg_ccedilla`'svg_atilde`'o da" \
"Execu`'svg_ccedilla`'svg_atilde`'o",
- wid fboxwid*1.5 ht fboxht*2.0,
+ wid flowboxwid*1.5 ht flowboxht*2.0,
shaded YellowGreen,
"Correto" at Box.e below ljust;
"Incompleto" at Box.w below rjust) with .N at 0.5 between B2.se and B3.sw
@@ -138,7 +138,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
B5: Fbox("Conclus`'svg_atilde`'o")
arrow up_ awid from B5.N
ellipse wid boxwid/2 ht boxwid/3 shaded "red"
-] with .nw at last [].Compound.sw+(0,2.5*fboxht)
+] with .nw at last [].Compound.sw+(0,2.5*flowboxht)
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/dpv/FusesDPV.m4 b/graphics/circuit_macros/examples/dpv/FusesDPV.m4
index 008a5cdc92..254ed891c6 100644
--- a/graphics/circuit_macros/examples/dpv/FusesDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/FusesDPV.m4
@@ -13,7 +13,9 @@ movewid = 0.25
move
fuse(,C) ; {"`fuse(,C)'" at last line.c+(0,-0.2)}
move
- fuse(,S) ; {"`fuse(,S)'" at last line.c+(0,-0.2)}
+ fuse(,S,,,fill_(0.9))
+ {"`fuse(,S,,,'" ljust at last [].sw+(-2bp__,-0.17) \
+ "`fill_(0.9))'" ljust}
move
fuse(,SB) ; {"`fuse(,SB)'" at last line.c+(0,-0.2)}
}
diff --git a/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4 b/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4
index d21555a241..1da12d0718 100644
--- a/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4
@@ -7,7 +7,8 @@ Heater: [
hm = 2.05
right_
{
- {lamp ; move; "`lamp'" ljust}
+ {lamp(,,shaded "yellow") ; move; "" "`lamp(,,'" ljust \
+ "`shaded \"yellow\")'" ljust}
move right_ 1.5
{lamp(,T) ; move;"`lamp(,T)'" ljust}
move right_ 1.25
@@ -17,7 +18,8 @@ Heater: [
}
move down 0.4; right_
{
- {heater; move;"`heater'" ljust}
+ {heater(,,,,shaded "orangered"); move; "" "`heater(,,,,'" ljust \
+ "`shaded \"orangered\")'" ljust}
move right_ hm
{heater(,,,,E); move;"`heater(,,,,E)'" ljust}
move right_ hm+0.4
@@ -35,8 +37,8 @@ More: [
vm = 0.28
{ {memristor ; move;"`memristor '" ljust}
- move right_ hm
- {heater; move;"`heater '" ljust}
+# move right_ hm
+# {heater; move;"`heater '" ljust}
move right_ hm
{tline ; move;"`tline '" ljust}
}
diff --git a/graphics/circuit_macros/examples/dpv/OpampDPV.m4 b/graphics/circuit_macros/examples/dpv/OpampDPV.m4
index 7137e428ce..6d77f535cb 100644
--- a/graphics/circuit_macros/examples/dpv/OpampDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/OpampDPV.m4
@@ -1,35 +1,43 @@
.PS
-# Opamp.m4
+# OpampDPV.m4
cct_init(svg_font(sans-serif,11bp__))
- A: opamp
+ A: opamp(,,, body=shaded "yellow")
thinlines_
- "`opamp'" at A.s-(0,0.25)
- "Out" below at A.Out
+ `"opamp(,,,"' wid 0.65 ljust at A.sw-(0.4,0.4) \
+ `"body=shaded \"yellow\")"' ljust
+ `"Out"' below at A.Out
spline <- from A.In1 left 0.1 then up 0.1 left 0.1
- "In1" wid 0.25 rjust above
+ `"In1"' wid 0.25 rjust above
spline <- from A.In2 left 0.1 then down 0.1 left 0.1
- "In2" rjust below
+ `"In2"' rjust below
+ arrow <- up 0.1 right 0.1 from A.N
+ `"N"' ljust above
arrow <- up 0.1 right 0.1 from A.E1
- "E1" ljust above
+ `"E1"' ljust above
+ arrow <- up 0.1 right 0.1 from A.E
+ `"E"' ljust above
arrow <- down 0.1 right 0.1 from A.E2
- "E2" ljust below
+ `"E2"' ljust below
+ arrow <- down 0.1 right 0.1 from A.S
+ `"S"' ljust below
+ arrow <- left 0.2 from A.W
+ `"W"' rjust
thicklines_
- Point_(15)
- B: opamp(,,,,PR) with .sw at A.se+(0.65,0)
+ Point_(90)
+ B: opamp(,,,,PR) with .sw at A.se+(0.75,0)
thinlines_
- "`Point_(15); opamp(,,,,PR)'" at B.s-(0,0.25)
- spline <- right arrowht up arrowht from B.V1 then right 0.1
- "V1" ljust
+ `"Point_(90);"' ljust at B.sw-(0,0.2) \
+ `"opamp(,,,,PR)"' ljust
+ spline <- left arrowht down arrowht from B.V1 then left 0.1
+ `"V1"' rjust
spline <- right arrowht down arrowht from B.V2 then right 0.1
- "V2" ljust
+ `"V2"' ljust
thicklines_
- Point_(90)
- C: opamp with .sw at B.se+(1.05,0)
- "`Point_(90); opamp'" at C.s-(0,0.25)
right_
- D: opamp(,,,,T) with .sw at C.se+(0.65,0)
- "`opamp(,,,,T)'" wid 0.85 at D.s-(0,0.25)
+ C: opamp(,,,body=shaded "orange",T) with .sw at B.se+(0.75,0)
+ `"opamp(,,,"' wid 0.85 ljust at C.sw+(0,-0.25) \
+ `"body=shaded \"orange\",T)"' wid 1.75 ljust
- command "</g>" # end font
+ command `"</g>"' # end font
.PE
diff --git a/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4 b/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4
index 419371702b..e9f54c3399 100644
--- a/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4
@@ -25,7 +25,7 @@ vm = 0.28
}
move down vm; right_
{
- {resistor(,,B) ; move ; "`resistor(,,B) '" ljust}
+ {resistor(,5,B) ; move ; "`resistor(,5,B) '" ljust}
move right_ hm
{resistor(,,E) ; move
"`resistor(,,E)'" ljust " svg_equiv `ebox'" ljust}
diff --git a/graphics/circuit_macros/examples/dpv/RotboxDPV.m4 b/graphics/circuit_macros/examples/dpv/RotboxDPV.m4
index fba198a669..c64971f048 100644
--- a/graphics/circuit_macros/examples/dpv/RotboxDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/RotboxDPV.m4
@@ -8,14 +8,12 @@ gen_init
rotbox(boxwid/2,,thick 2)
Point_(30)
rotbox(,,shaded "yellow" outlined "blue" thick 3,r=0.1) \
- at last []+vec_(boxwid,0)
+ at last [].se+vec_(boxwid,0)
"r=0.1" at last []
- move to last [].ne
Point_(0)
- [[]; for_(2,8,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0)
- sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].ne+(0.1,0)
- [[]; for_(10,16,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0)
- sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].sw+(0,-0.1)
+ [[]; for_(2,16,2, `rotbox(,,dashed,t=m4x/10) with .nw at \
+ ifelse(m4x,10,`2nd [].sw+(0,-0.1)',`last [].ne+(boxwid*0.1,0)')
+ sprintf("t=%g",m4x/10) at last []') ] with .sw at last [].se+(0.1,0)
]
.PE
diff --git a/graphics/circuit_macros/examples/dpv/SourcesDPV.m4 b/graphics/circuit_macros/examples/dpv/SourcesDPV.m4
index 6c09030183..ac6769e6ef 100644
--- a/graphics/circuit_macros/examples/dpv/SourcesDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/SourcesDPV.m4
@@ -9,20 +9,25 @@ define(`NL',`; move down $1; right_')
{source ; move ; "`source'" ljust} NL
{source(,I) ; move ; "`source(,I)'" ljust} NL
{source(,i) ; move ; "`source(,i)'" ljust} NL
+ {source(,ti) ; move ; "`source(,ti)'" ljust} NL
{source(,i) ; move ; "`source(,ii)'" ljust} NL
{source(,V) ; move ; "`source(,V)'" ljust} NL
{source(,v) ; move ; "`source(,v)'" ljust} NL
+ {source(,tv) ; move ; "`source(,tv)'" ljust} NL
{source(,AC); move ; "`source(,AC)'" ljust} NL
{source(,X) ; move ; "`source(,X)'" ljust} NL
{source(,F) ; move ; "`source(,F)'" ljust} NL
{source(,G) ; move ; "`source(,G)'" ljust} NL
- {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3)
- {proximity ; move ; "`proximity" ljust "= consource(,P)'" ljust}
+ {source(,Q) ; move ; "`source(,Q)'" ljust}
}
move right_ 2.0
{
- {source(,,0.4) ; move ; "`source(,,0.4)'" ljust} NL(0.35)
- {source(,P) ; move ; "`source(,P)'" ljust} NL
+# {source(,,0.4) ; move ; "`source(,,0.4)'" ljust} NL(0.35)
+ {source(,,0.4,,shaded "yellow") ; move ;
+ "`source(,,0.4,," ljust "shaded \"yellow\")'" ljust} NL(0.35)
+# {source(,P) ; move ; "`source(,P)'" ljust} NL
+ {source(,P,,,fill_(0.9)) ; move ;
+ "`source(,P,,," ljust "fill_(0.9))'" ljust} NL
{source(,U) ; move ; "`source(,U)'" ljust} NL
{source(,H) ; move ; "`source(,H)'" ljust} NL
{source(,R) ; move ; "`source(,R)'" ljust} NL
@@ -31,7 +36,9 @@ define(`NL',`; move down $1; right_')
{source(,L) ; move ; "`source(,L)'" ljust} NL
{source(,B) ; move ; "`source(,B)'" ljust} NL
{nullator ; move ; "`nullator'" ljust} NL(moveht*0.8)
- {norator ; move ; "`norator'" ljust}
+ {norator ; move ; "`norator'" ljust} NL(moveht*0.9)
+ {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust} NL(moveht*1.1)
+ {proximity ; move ; "`proximity" ljust "= consource(,P)'" ljust}
}
move right_ 2.0
{source(,N) ; move ; "`source(,N)'" ljust} NL
@@ -40,11 +47,12 @@ define(`NL',`; move down $1; right_')
{consource ; move ; "`consource'" ljust } NL(0.32)
{consource(,I) ; move ; "`consource(,I)'" ljust} NL(0.32)
{consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32)
+ {consource(,ti) ; move ; "`consource(,ti)'" ljust} NL(0.32)
{consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32)
{consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3)
+ {consource(,tv) ; move ; "`consource(,tv)'" ljust} NL(0.3)
{battery ; move ; "`battery'" ljust} NL(0.3)
{battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35)
- {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust}
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4 b/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4
index eb55f57c19..47b8edbea9 100644
--- a/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4
@@ -132,17 +132,17 @@ movewid = 0.25
move down_ 6bp__ then right_
dswitch(,,WBPrM); {"svg_tt(`(,,WBPrM)')" at last [].s Below}
move right_
- dswitch(,,WBDIGX,text=W); #{"svg_tt(`(,,WBDIGX,W)')" at last [].s Below}
+ dswitch(,,WBDIGX,text=W)
{"svg_tt(`(,,WBDIGX,')" ljust at last line.start+(0,-15bp__) \
"svg_tt(`text=W)')" ljust}
move right_
- dswitch(,,WBDIGC,text=M)
+ dswitch(,,WBDIGC,circle="M")
{"svg_tt(`(,,WBDIGC,')" ljust at last line.start+(0,-15bp__) \
- "svg_tt(`text=M)')" ljust}
+ "svg_tt(`circle=\"M\")')" ljust}
move right_
- dswitch(,,WBcDIGC,text=M) #
+ dswitch(,,WBcDIGC,circle="M")
{"svg_tt(`(,,WBcDIGC,')" ljust at last line.start+(0,-15bp__) \
- "svg_tt(`text=M)')" ljust}
+ "svg_tt(`circle=\"M\")')" ljust}
}
command "</g>')" # end font
diff --git a/graphics/circuit_macros/examples/dpv/ThreeDPV.m4 b/graphics/circuit_macros/examples/dpv/ThreeDPV.m4
index 7f2311d0ea..0234a81252 100644
--- a/graphics/circuit_macros/examples/dpv/ThreeDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/ThreeDPV.m4
@@ -6,11 +6,7 @@ define(`section',`[ I: Here
resistor(right elen_*0.75); llabel(,R/2)
T: dot
line down dimen_/2 then right_ dimen_/4
- Amp: opamp(,,,,,{
- rgbfill(0.9*255,0.6*255,0.1*255,line to N then to E then to S then to Here)
- "-" at In1 ljust
- "+" at In2 ljust }
- ) with .In1 at Here
+ Amp: opamp(,,,body=shaded "goldenrod") with .In1 at Here
line left dimen_/4 from Amp.In2 then down dimen_/4; G: ground(,,)
resistor(from T to (Amp.Out,T)); llabel(,R)
O: dot
diff --git a/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4 b/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4
index 03a7f451f2..a91c65e576 100644
--- a/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4
@@ -330,8 +330,8 @@ Pwr: [
dot(at PXform.ST3); line right_ dimen_/4; dot
dot(at PXform.ST1); line right_ dimen_/4 then down_ dimen_*3/2; ground(,T)
line from PXform.S2.end right_ dimen_*2.5 then up_ dimen_/4
- Rect2: V_5V4G with .F1.sw at Here; "5V4G" at Rect2.n+(0,dimen_/2)
- Rect1: V_5V4G with .e at Rect2.w-(dimen_/2,0); "5V4G" at Rect1.n+(0,dimen_/2)
+ Rect2: V_5U4G with .F1.sw at Here; "5U4G" at Rect2.n+(0,dimen_/2)
+ Rect1: V_5U4G with .e at Rect2.w-(dimen_/2,0); "5U4G" at Rect1.n+(0,dimen_/2)
move to Rect1.F1.sw; line to (Here,PXform.S2.end); dot
move to Rect1.F1.se; line to (Here,PXform.S2.start); dot
move to Rect2.F1.se; line to (Here,PXform.S2.start)
diff --git a/graphics/circuit_macros/examples/dpv/ex05DPV.m4 b/graphics/circuit_macros/examples/dpv/ex05DPV.m4
index e44542dc3d..ac82c8f861 100644
--- a/graphics/circuit_macros/examples/dpv/ex05DPV.m4
+++ b/graphics/circuit_macros/examples/dpv/ex05DPV.m4
@@ -97,8 +97,8 @@ Coxeter: [
define(`customarc',
`pushdef(`dfillcolor',`0.7,0.7,0.7') linethick_(0.4); dnl
- Darc(`$1',linewid, (`$2')*dtor_, (`$3')*dtor_,
- thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->)dnl
+ Darc(,centre=`$1';rad=linewid;startdeg= (`$2');enddeg=(`$3');
+ thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->)
linethick_(customlinethick); popdef(`dfillcolor')')
customarc((linewid,-linewid/3), 25,155)
@@ -112,4 +112,9 @@ Coxeter: [
customarc(Orig,-110,-10); "svg_it(c)" at (Rect_(linewid,-60))
] with .sw at Kalman.se+(15bp__,0)
+[
+ linethick = 5
+ Darrow(right_ Coxeter.wid,
+ thick=0.3;wid=0.55;ht=0.55;ends=<->; innershade=(0,1,1);outline=(0,0,1))
+ ] with .sw at Coxeter.nw+(0,0.3)
.PE
diff --git a/graphics/circuit_macros/examples/dpv/examplesDPV.htmx b/graphics/circuit_macros/examples/dpv/examplesDPV.htmx
index 84fb877209..52f7b939b8 100644
--- a/graphics/circuit_macros/examples/dpv/examplesDPV.htmx
+++ b/graphics/circuit_macros/examples/dpv/examplesDPV.htmx
@@ -338,7 +338,7 @@ cfig(AmpTableDPV,
Macros m4tt`'amp`,' delay</g>`,' and m4tt`'integrator</g>)
cfig(FusesDPV,
- Macros m4tt`'fuse</g> and m4tt`'cbreaker</g>)
+ Macros m4tt`'fuse</g>`,' m4tt`'cbreaker</g>`,' and m4tt`'breaker</g>)
cfig(ArrestersDPV,
The m4tt`'arrester</g> macro)
diff --git a/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx b/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx
index e46725b0d7..a52445d744 100644
--- a/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx
+++ b/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx
@@ -335,7 +335,7 @@ cfig(AmpTableDPV,
Macros m4tt`'amp`,' delay</g>`,' and m4tt`'integrator</g>)
cfig(FusesDPV,
- Macros m4tt`'fuse</g> and m4tt`'cbreaker</g>)
+ Macros m4tt`'fuse</g>`,' m4tt`'cbreaker</g>`,' and m4tt`'jumper</g>)
cfig(MoreTableDPV,
Additional two-terminal elements)
diff --git a/graphics/circuit_macros/examples/dpv/sfgDPV.m4 b/graphics/circuit_macros/examples/dpv/sfgDPV.m4
index a516b3fb97..a64a0c6c00 100644
--- a/graphics/circuit_macros/examples/dpv/sfgDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/sfgDPV.m4
@@ -4,11 +4,12 @@ gen_init(svg_font(Times,11bp__))
sfg_init( blen=1.2 ) # default edge length
textht = textht*0.9
+define(`celadon',`0.67,0.88,0.69')dnl
# Graph 1
move right 0.15
T:[
- Ft: sfgnode(,f(t),sfgbelow)
+ Ft: sfgnode(,f(t),sfgbelow,shaded "red")
sfgline(,1/K)
Y1: sfgnode(,y`'svg_sub(1),sfgbelow rjust)
sfgline(,K/M)
@@ -18,12 +19,13 @@ T:[
DY2: sfgnode(,y`'svg_sub(2) = x`'svg_sub(2),sfgbelow ljust)
{"." at DY2 +(2,-1)*textoffset}
sfgline(,1/s)
- Y2: sfgnode(,y`'svg_sub(2) = x`'svg_sub(1),sfgbelow ljust)
+ Y2: sfgnode(,y`'svg_sub(2) = x`'svg_sub(1),sfgbelow ljust,
+ shaded rgbstring(celadon))
sf = 1
- sfgarc(from DY2 to DDY2,-B/M,below,,sf)
- sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf)
- sfgarc(from Y2 to Y1,1,sfgabove,,sf)
+ sfgarc(from DY2 to DDY2,-B/M,below,,sf,outlined "gray")
+ sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf,outlined "gray")
+ sfgarc(from Y2 to Y1,1,sfgabove,,sf,outlined "gray")
]
# Graph 2
@@ -46,7 +48,9 @@ B: [
G3: [
# change node spacing and increase node size
sfg_wid = 0.85; sfg_rad = 0.35/2
- for_(1,4,1,`N`'m4x: sfgnode(,m4x,,fill_(0.9))
+ NeedDpicTools
+ cmyktorgb(96,0,0,0,r,g,b)
+ for_(1,4,1,`N`'m4x: ColoredV(circle,(r,g,b),rad sfg_rad "m4x")
sfgself(at N`'m4x,-90,P`'svg_sub(m4x),,cw)
ifelse(m4x,4,,`sfgline(,G`'svg_sub(m4x),sfgbelow)') ')
sfgarc(from N2 to N1,F`'svg_sub(2),sfgabove,ccw,)
@@ -99,15 +103,17 @@ G4: [sfg_init( blen=2;rad=0.25/2 ) # change node spacing and size
# https://tex.stackexchange.com/questions/637455/tikz-how-to-set-exact-position-of-node
G5: [sfg_init( blen=1.75;rad=0.25/2 ) # change node spacing and size
- Dstar: sfgnode(,* )
- D0: sfgnode(at Dstar+(2,0),svg_small(&lt;&gt;)svg_sub(0) )
+ Dstar: sfgnode(,*,,shaded rgbstring(celadon))
+ D0: sfgnode(at Dstar+(2,0),svg_small(&lt;&gt;)svg_sub(0),,
+ shaded rgbstring(celadon) )
sfgline(,
- svg_it(1-r`'svg_sub(`x-1,x')-q`'svg_sup(i)svg_sub(x-1`,'x,,,-0.8ex)),,->)
- Ddots: sfgnode(,... )
- sfgline(,svg_it(1-r`'svg_sub(x-4`,'x)-q`'svg_sup(i)svg_sub(x-4`,'x,,,-0.8ex)),
+ svg_it(1-r`'svg_sub(`x-1`'svg_comma`'x')-q`'svg_sup(i)svg_sub(x-1`'svg_comma`'x,,,-0.8ex)),,->)
+ Ddots: sfgnode(,...,,shaded rgbstring(celadon) )
+ sfgline(,svg_it(1-r`'svg_sub(x-4`'svg_comma`'x)-q`'svg_sup(i)svg_sub(x-4`'svg_comma`'x,,,-0.8ex)),
,->)
- D5: sfgnode(,svg_small(&lt;&gt;)svg_sub(5) )
- DD: sfgnode(at D0+(0,-1.0),svg_symbol(&``#''8224;) )
+ D5: sfgnode(,svg_small(&lt;&gt;)svg_sub(5),,shaded rgbstring(celadon) )
+ DD: sfgnode(at D0+(0,-1.0),svg_symbol(&``#''8224;),,
+ shaded rgbstring(celadon) )
sfgself(at Dstar,L,,,,0.5)
"svg_it(1-i`'svg_sub(x)-q`'svg_sub(x)svg_sup(a,,,-0.8ex))" wid 45bp__ \
at Dstar + (-0.3,0.25)
@@ -115,13 +121,13 @@ G5: [sfg_init( blen=1.75;rad=0.25/2 ) # change node spacing and size
sfgself(at D5,R,,,,0.5)
"svg_it(1-q`'svg_sub(x)svg_sup(i,,,-0.8ex)-r`'svg_sub(x))" wid 47bp__ \
at D5 + (0.3,0.25)
- sfgarc(from D0 to Dstar ->,svg_it(r`'svg_sub(x`,'x)),below_,ccw)
+ sfgarc(from D0 to Dstar ->,svg_it(r`'svg_sub(x`'svg_comma`'x)),below_,ccw)
sfgarc(from Dstar to D0 ->,svg_it(i`'svg_sub(x)),above_,ccw)
sfgarc(from Dstar to DD ->,svg_it(q`'svg_sub(x)svg_sup(a,,,-0.8ex)),
above_ ljust_,ccw)
- sfgline(from D0 to DD,svg_it(q`'svg_sup(i)svg_sub(x`,'x,,,-0.8ex)),ljust,->)
- sfgarc(from Ddots to Dstar,svg_it(r`'svg_sub(j`,'x)),below_,ccw,,->)
- sfgarc(from Ddots to DD ->,svg_it(q`'svg_sup(i)svg_sub(x-j`,'x)),
+ sfgline(from D0 to DD,svg_it(q`'svg_sup(i)svg_sub(x`'svg_comma`'x,,,-0.8ex)),ljust,->)
+ sfgarc(from Ddots to Dstar,svg_it(r`'svg_sub(j`'svg_comma`'x)),below_,ccw,,->)
+ sfgarc(from Ddots to DD ->,svg_it(q`'svg_sup(i)svg_sub(x-j`'svg_comma`'x)),
above_ rjust_,)
sfgarc(from D5 to Dstar ->,svg_it(r`'svg_sub(x)),below_,ccw)
sfgarc(from D5 to DD ->,svg_it(q`'svg_sup(i)svg_sub(x,,,-0.8ex)),
diff --git a/graphics/circuit_macros/examples/dpv/tstDPV.htmx b/graphics/circuit_macros/examples/dpv/tstDPV.htmx
index 3859f9f30f..44c899f722 100644
--- a/graphics/circuit_macros/examples/dpv/tstDPV.htmx
+++ b/graphics/circuit_macros/examples/dpv/tstDPV.htmx
@@ -261,6 +261,9 @@ There are other issues:
<td width="8%"> m4tt svg_emsp</g> <td width="50px" align="left"> |changecom(,)&`#'8195;changecom(`#')|
<td width="8%"> m4tt svg_ensp</g> <td width="50px" align="left"> |changecom(,)&`#'8194;changecom(`#')|
<td width="8%"> m4tt svg_thinsp</g> <td width="50px" align="left"> |changecom(,)&`#'8201;changecom(`#')|
+<td width="10%"> m4tt svg_equiv</g> <td align="left"> changecom(,)&`#'8801;changecom(`#')
+<td width="10%"> m4tt svg_tilde</g> <td align="left"> changecom(,)&`#'126;changecom(`#')
+<td width="10%"> m4tt svg_uscore</g> <td align="left"> changecom(,)&`#'95;changecom(`#')
</tr>
</table>
diff --git a/graphics/circuit_macros/examples/ex05.m4 b/graphics/circuit_macros/examples/ex05.m4
index 07a5c27fa9..aac16ad831 100644
--- a/graphics/circuit_macros/examples/ex05.m4
+++ b/graphics/circuit_macros/examples/ex05.m4
@@ -114,6 +114,11 @@ Coxeter: [
customarc(Orig,-110,-10); "$c$" at (Rect_(linewid,-60))
] with .sw at Kalman.se+(15bp__,0)
+[
+ linethick = 5
+ Darrow(right_ Coxeter.wid,
+ thick=0.3;wid=0.55;ht=0.55;ends=<->; innershade=(0,1,1);outline=(0,0,1))
+ ] with .sw at Coxeter.nw+(0,0.3)
',` "This diagram requires LaTex" ')
.PE
diff --git a/graphics/circuit_macros/examples/examples.pdf b/graphics/circuit_macros/examples/examples.pdf
index 1b001ac9ad..c89e3360f3 100644
--- a/graphics/circuit_macros/examples/examples.pdf
+++ b/graphics/circuit_macros/examples/examples.pdf
Binary files differ
diff --git a/graphics/circuit_macros/examples/examples.tex b/graphics/circuit_macros/examples/examples.tex
index 8d3af1327c..110720cd6a 100644
--- a/graphics/circuit_macros/examples/examples.tex
+++ b/graphics/circuit_macros/examples/examples.tex
@@ -1,11 +1,11 @@
% PSTricks examples.tex
\documentclass[11pt]{article}
+\usepackage[dvipsnames]{xcolor}
\usepackage{times}
\input mode
\usepackage{rotating}
\usepackage{graphicx}
-\usepackage{xcolor}
\usepackage{boxdims}
%\usepackage{upgreek}
\usepackage{siunitx}
@@ -33,6 +33,10 @@
only one workflow had been assumed. The most simplicity and elegance
is achieved by sticking to one pic interpreter and one postprocessor.
+ Color and other embellishments are not included in the standards
+ documents for circuit elements but examples of their use to call
+ attention to particular elements are included.
+
This document duplicates a few diagrams from the manual
Circuit\_macros.pdf. There are also a few files in the
examples directory that are not included in this document. To process
@@ -40,38 +44,3 @@
\input files
\endinput
-
-Other examples currently:
-Ball.m4
-birds.m4
-Blogix.m4
-brace.m4
-Ccurve.m4
-chaos.m4
-Chuck.m4
-clock.m4
-Cruller.m4
-debug2.m4
-Escher.m4
-Euro.m4
-Floor.m4
-Geometry.m4
-IC10107.m4
-keyval.m4
-Koch.m4
-Metamodel.m4
-OpAmpFilter.m4
-Orbits.m4
-person.m4
-Planes.m4
-PPA.m4
-Resolver.m4
-rotatetext.m4
-rotellipse.m4
-Shaky.m4
-snake.m4
-SPM.m4
-squiggle.m4
-Wheat.m4
-Zcos.m4
-
diff --git a/graphics/circuit_macros/examples/extras/ClassDAmp.m4 b/graphics/circuit_macros/examples/extras/ClassDAmp.m4
new file mode 100644
index 0000000000..b8e845cf06
--- /dev/null
+++ b/graphics/circuit_macros/examples/extras/ClassDAmp.m4
@@ -0,0 +1,66 @@
+.PS
+# ClassDAmp.m4
+# Adapted and redrawn from Maxim Engineering Journal Vol. Fifty-Nine:
+# https://pdfserv.maximintegrated.com/en/ej/EJ59.pdf
+log_init
+
+define(`String',`[
+Q1: mosfet(down_ dimen_*5/4,R,TFSDdPyQdB)
+ dot(at Q1.S)
+ { line up_ dimen_/4
+ dot(,,1); "ifsvg(`svg_it(V)svg_sub(DD)',`$V_{\hbox{\scriptsize DD}}$')" \
+ at last [].n+(0,0.05) above }
+ line left_ dimen_*2/3
+SW: switch(left_ dimen_,`$1',D); ifelse(`$1',,`rlabel(,SW1)',`llabel(,SW2)')
+Q2: mosfet(up_ dimen_*5/4,,TFSDPyQuB) with .D at Q1.D
+ ground(at Q2.S,T,S)
+Out: dot(at Q1.D)
+ line from Q1.G to Q2.G chop -lthick/2
+ G: dot(at last line.c)
+ dot(at (SW.end,Here)); { line to SW.end }
+ line from G left_ dimen_*2.5
+Rc: resistor(left_ dimen_)
+T: dot; right_
+ Comp: opamp(,,,,ifelse(`$1',R,,R)) with .Out at Here
+ [line left_ dimen_/12 then down_ dimen_/4 then left_ dimen_/12] \
+ with .e at Comp.C
+ ]')
+
+S1: String
+S2: String(R) with .Q1.S at S1.Q2.D+(0,-2*elen_)
+I1: line left_ dimen_/2 from S1.Comp.In1
+ sinusoid(dimen_/4,twopi_/(dimen_/2),-pi_/2,0,dimen_/2) \
+ with .Start at I1.end-(textoffset,0)
+I2: line left_ dimen_/2 from S2.Comp.In2
+ sinusoid(dimen_/4,twopi_/(dimen_/2),pi_/2,0,dimen_/2) \
+ with .Start at I2.end-(textoffset,0)
+ line from S1.Comp.In2 left I1.len
+ continue to (Here,S2.Comp.In1) then to S2.Comp.In1
+ dot(at 1/2 between I1.end and I2.end)
+ line left_ dimen_/2; move left_ textoffset then down_ dimen_/4
+ line up dimen_/2 then down dimen_/2 left_ dimen_/4 \
+ for_(1,3,1,`then up dimen_/2 then down dimen_/2 left_ dimen_/4 \')
+
+ right_
+N: NOR_gate with .Out at (1/2 between S1.Rc.start and S2.Rc.start)
+ line from S1.T to (S1.T,N.In1) then to N.In1
+ line from S2.T to (S2.T,N.In2) then to N.In2
+NO: dot(at N.Out+(dimen_/12,0))
+ resistor(right_ dimen_ from N.Out)
+ rlabel(,iflatex(R_{\hbox{\scriptsize On}},ifsvg(svg_it(R)`'svg_sub(On))))
+ dot
+ { line up_ dimen_/2; diode(to (NO,Here),Z); line to NO }
+ { capacitor(down_ dimen_); ground(,T,S)
+ llabel(,iflatex(C_{\hbox{\scriptsize On}},ifsvg(svg_it(R)`'svg_sub(On)))) }
+ line dashed to (S1.SW,Here)
+ arrow <-> dashed from S1.SW to S2.SW chop dimen_/4
+
+ line right_ dimen_ from S1.Out "Out-" above
+ line down_ (Here.y-S2.Out.y)/2-dimen_; ifsvg({move right_ 3*textht})
+ inductor(down_ dimen_)
+ llabel(,iflatex(L_{\hbox{\scriptsize E}},ifsvg(L`'svg_sub(E))))
+ resistor(down_ dimen_)
+ llabel(,iflatex(R_{\hbox{\scriptsize E}},ifsvg(R`'svg_sub(E))))
+ line to (Here,S2.Out) then to S2.Out "Out+" above
+
+.PE
diff --git a/graphics/circuit_macros/examples/extras/Flow2.m4 b/graphics/circuit_macros/examples/extras/Flow2.m4
index 6f8e2affbf..f806a74636 100644
--- a/graphics/circuit_macros/examples/extras/Flow2.m4
+++ b/graphics/circuit_macros/examples/extras/Flow2.m4
@@ -5,8 +5,8 @@ sinclude(../FlowchartDefs.m4def)
down_
smallsep = boxht/3
- testw = fboxwid*7/4
- testh = fboxht*9/4
+ testw = flowboxwid*7/4
+ testh = flowboxht*9/4
Start: Fbox("Start",,rad boxht/8 shaded "red!30")
arrow down_ smallsep "False" ljust
Input: Fdata(`"Input: $f(), a, b, \epsilon$"',wid boxwid*5/4,,
diff --git a/graphics/circuit_macros/examples/fet.m4 b/graphics/circuit_macros/examples/fet.m4
index 9cbd0809ce..2e67e80802 100644
--- a/graphics/circuit_macros/examples/fet.m4
+++ b/graphics/circuit_macros/examples/fet.m4
@@ -151,7 +151,11 @@ Row3: [
{`"{\tt $\;$ Fe\_fet(,,TEDSQuB)}"' at J.s+(0,-0.15) below
"$G$" at J.G rjust
"$S$" at J.S rjust
- "$D$" at J.D ljust }
+ "$D$" at J.D ljust
+ thinlines_
+ arrow <- down .05 left .18 from (J.G.x,J.G.y-0.1)
+ "\tt T" rjust
+ thicklines_ }
] with .nw at last [].sw
Row4: [
diff --git a/graphics/circuit_macros/examples/files.tex b/graphics/circuit_macros/examples/files.tex
index 333eeb6825..37bff79b12 100644
--- a/graphics/circuit_macros/examples/files.tex
+++ b/graphics/circuit_macros/examples/files.tex
@@ -57,7 +57,7 @@
\bfig{
\centerline{\getpic{Fuses}}
- \caption{Macros {\tt fuse} and {\tt cbreaker}
+ \caption{Macros {\tt fuse,} {\tt cbreaker,} and {\tt jumper}
\src{Fuses.m4}.}
}
@@ -417,11 +417,11 @@
}
\end{sidewaysfigure} %}% \end{landscape}
-\bfig{
+\ifpostscript\else\bfig{
\centerline{\getpic{UNO}}
\caption{An Arduino UNO circuit adapted and redrawn
\src{UNO.m4}.}
- }
+ }\fi
\bfig{
\centerline{\getpic{Tubediags}}
@@ -542,6 +542,7 @@
\bfig{
\centerline{\getpic{GrayCode}}
\caption{Gray code 10-bit encoder disk pattern and a crossbar switch
+ illustrating the power of looping and branching
\src{GrayCode.m4}.}
}
@@ -567,9 +568,10 @@
\ifmpost\else\ifpostscript\else\bfig{
\centerline{\getpic{shadowed}}
- \caption{The macro
+ \caption{Embellishments: the top row illustrates
{\tt shadowed(box|circle|ellipse|line,[at {\sl position}],{\sl keys})}
- shadowed object
+ and the second row
+ {\tt ColoredV(box|circle|ellipse,({\sl r,g,b})|(({\sl colorseq})),{\sl attributes})}
\src{shadowed.m4}.}
}\fi\fi
@@ -591,11 +593,11 @@
\src{Loglog.m4}.}
}
-\ifmpost\else\bfig{
+\ifmpost\else\ifpostscript\else\bfig{
\centerline{\getpic{Smithchart}}
\caption{A Smith chart
\src{Smithlchart.m4}.}
- }\fi
+ }\fi\fi
\bfig{
\centerline{\getpic{ex09}}
@@ -787,13 +789,13 @@
\caption{Overlaying a figure with line graphics %ignore%
\src{Incleps.m4}.}
}
-\else\ifpostscript% Postscript with psfrag (.eps.gz not allowed)
-ifpostscript(,\bfig{%
+\else\ifpostscript\else% Postscript with psfrag (.eps.gz not allowed)
+\bfig{%
\centerline{\boxdims{InclA}{%ignore%
\includegraphics[width=3in]{Incl.eps}}%
\hspace*{-3in}\includegraphics{Incleps.eps}}%
\caption{Overlaying a figure with line graphics %ignore%
- \src{Incleps.m4}.}})
+ \src{Incleps.m4}.}}
\fi\fi\fi\fi\fi
\fi % ifmpost
diff --git a/graphics/circuit_macros/examples/heater.m4 b/graphics/circuit_macros/examples/heater.m4
deleted file mode 100644
index d3f0f8ee33..0000000000
--- a/graphics/circuit_macros/examples/heater.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-.PS
-# heater.m4
-cct_init
-
-movewid = 2 pt__
-hm = 2.05
-right_
-{
- {lamp ; move; "`{\tt lamp}'" ljust}
- move right_ 1.5
- {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust}
- move right_ 1.25
- {thermocouple ; move;" `{\tt thermocouple}'" ljust }
- move right_ hm
- {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust }
- }
-move down 0.25; right_
-{
- {heater; move;"`{\tt heater}'" ljust}
- move right_ hm
- {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust}
- move right_ hm+0.4
- {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust}
- }
-
-.PE
diff --git a/graphics/circuit_macros/examples/mf/Makefile b/graphics/circuit_macros/examples/mf/Makefile
index 1386a927d6..b36f8c8900 100644
--- a/graphics/circuit_macros/examples/mf/Makefile
+++ b/graphics/circuit_macros/examples/mf/Makefile
@@ -1,5 +1,4 @@
# Type "make" or "make testfont.ps"
-# To test an individual diagram, type "make DOC=file clean file.ps"
LIBDIR = $$HOME/lib
M4MACROS = mfpic.m4
diff --git a/graphics/circuit_macros/examples/mf/cct.mf b/graphics/circuit_macros/examples/mf/cct.mf
index a511d1f0d9..fc30c9dbad 100644
--- a/graphics/circuit_macros/examples/mf/cct.mf
+++ b/graphics/circuit_macros/examples/mf/cct.mf
@@ -1,5 +1,5 @@
% cct.mf, generated by Mfpic, v1.10 2012/12/03,
-% from TeX source "font" on 2023/09/11 at 22:43
+% from TeX source "font" on 2024/01/01 at 16:59
numeric mfpicversion; mfpicversion := 110;
if unknown mode: mode := localfont; fi
if unknown mag: mag := 1000/1000; fi
@@ -2943,10 +2943,15 @@ polyline (false)
((0.5625,0),
(0.0625,0.25),
(0.0625,-0.25),
-(0.5625,0),
+(0.5625,0));
+
+store (curpath)
+drawn
+polyline (false)
+((0.5625,0),
(0.625,0));
-endmfpic; % (69) line 985 in the TeX source.
+endmfpic; % (69) line 986 in the TeX source.
%------------------------------------------
@@ -2955,7 +2960,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.25, 0.25, -0.625, 0);
-beginmfpic(70); % line 986 in the TeX source.
+beginmfpic(70); % line 987 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2972,10 +2977,15 @@ polyline (false)
((0,-0.5625),
(0.25,-0.0625),
(-0.25,-0.0625),
-(0,-0.5625),
+(0,-0.5625));
+
+store (curpath)
+drawn
+polyline (false)
+((0,-0.5625),
(0,-0.625));
-endmfpic; % (70) line 997 in the TeX source.
+endmfpic; % (70) line 999 in the TeX source.
%------------------------------------------
@@ -2984,7 +2994,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.625, 0, -0.25, 0.25);
-beginmfpic(71); % line 998 in the TeX source.
+beginmfpic(71); % line 1000 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3001,10 +3011,15 @@ polyline (false)
((-0.5625,0),
(-0.0625,-0.25),
(-0.0625,0.25),
-(-0.5625,0),
+(-0.5625,0));
+
+store (curpath)
+drawn
+polyline (false)
+((-0.5625,0),
(-0.625,0));
-endmfpic; % (71) line 1009 in the TeX source.
+endmfpic; % (71) line 1012 in the TeX source.
%------------------------------------------
@@ -3013,7 +3028,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.25, 0.25, 0, 0.625);
-beginmfpic(72); % line 1010 in the TeX source.
+beginmfpic(72); % line 1013 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3030,10 +3045,15 @@ polyline (false)
((0,0.5625),
(-0.25,0.0625),
(0.25,0.0625),
-(0,0.5625),
+(0,0.5625));
+
+store (curpath)
+drawn
+polyline (false)
+((0,0.5625),
(0,0.625));
-endmfpic; % (72) line 1021 in the TeX source.
+endmfpic; % (72) line 1025 in the TeX source.
%------------------------------------------
@@ -3042,7 +3062,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.175, 0.175);
-beginmfpic(73); % line 1022 in the TeX source.
+beginmfpic(73); % line 1026 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3071,7 +3091,7 @@ polyline (false)
((0.3125,0),
(0.333333,0));
-endmfpic; % (73) line 1035 in the TeX source.
+endmfpic; % (73) line 1039 in the TeX source.
%------------------------------------------
@@ -3080,7 +3100,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, -0.333333, 0);
-beginmfpic(74); % line 1036 in the TeX source.
+beginmfpic(74); % line 1040 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3109,7 +3129,7 @@ polyline (false)
((0,-0.3125),
(0,-0.333333));
-endmfpic; % (74) line 1049 in the TeX source.
+endmfpic; % (74) line 1053 in the TeX source.
%------------------------------------------
@@ -3118,7 +3138,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.175, 0.175);
-beginmfpic(75); % line 1050 in the TeX source.
+beginmfpic(75); % line 1054 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3147,7 +3167,7 @@ polyline (false)
((-0.3125,0),
(-0.333333,0));
-endmfpic; % (75) line 1063 in the TeX source.
+endmfpic; % (75) line 1067 in the TeX source.
%------------------------------------------
@@ -3156,7 +3176,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.333333);
-beginmfpic(76); % line 1064 in the TeX source.
+beginmfpic(76); % line 1068 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3185,7 +3205,7 @@ polyline (false)
((0,0.3125),
(0,0.333333));
-endmfpic; % (76) line 1077 in the TeX source.
+endmfpic; % (76) line 1081 in the TeX source.
%------------------------------------------
@@ -3194,7 +3214,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.083333, 0.083333, -0.0625, 0);
-beginmfpic(77); % line 1078 in the TeX source.
+beginmfpic(77); % line 1082 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3217,7 +3237,7 @@ polyline (false)
((0.035714,-0.0625),
(-0.035714,-0.0625));
-endmfpic; % (77) line 1088 in the TeX source.
+endmfpic; % (77) line 1092 in the TeX source.
%------------------------------------------
@@ -3226,7 +3246,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.083333, 0.083333, -0.1875, 0);
-beginmfpic(78); % line 1089 in the TeX source.
+beginmfpic(78); % line 1093 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3255,7 +3275,7 @@ polyline (false)
((0.035714,-0.1875),
(-0.035714,-0.1875));
-endmfpic; % (78) line 1101 in the TeX source.
+endmfpic; % (78) line 1105 in the TeX source.
%------------------------------------------
@@ -3264,7 +3284,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.104167, 0.104167, -0.333333, 0);
-beginmfpic(79); % line 1102 in the TeX source.
+beginmfpic(79); % line 1106 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3337,7 +3357,7 @@ polyline (false)
((0.104167,-0.041667),
(0.104167,0));
-endmfpic; % (79) line 1126 in the TeX source.
+endmfpic; % (79) line 1130 in the TeX source.
%------------------------------------------
@@ -3346,7 +3366,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.104167, 0.104167);
-beginmfpic(80); % line 1127 in the TeX source.
+beginmfpic(80); % line 1131 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3419,7 +3439,7 @@ polyline (false)
((0.041667,0.104167),
(0,0.104167));
-endmfpic; % (80) line 1151 in the TeX source.
+endmfpic; % (80) line 1155 in the TeX source.
%------------------------------------------
@@ -3428,7 +3448,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(81); % line 1152 in the TeX source.
+beginmfpic(81); % line 1156 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3474,7 +3494,7 @@ polyline (false)
((0.1625,0.3),
(-0.0375,0.21));
-endmfpic; % (81) line 1168 in the TeX source.
+endmfpic; % (81) line 1172 in the TeX source.
%------------------------------------------
@@ -3483,7 +3503,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.3, 0, -0.1625, 0.1625);
-beginmfpic(82); % line 1169 in the TeX source.
+beginmfpic(82); % line 1173 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3529,7 +3549,7 @@ polyline (false)
((-0.3,0.1625),
(-0.21,-0.0375));
-endmfpic; % (82) line 1185 in the TeX source.
+endmfpic; % (82) line 1189 in the TeX source.
%------------------------------------------
@@ -3538,7 +3558,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(83); % line 1186 in the TeX source.
+beginmfpic(83); % line 1190 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3584,7 +3604,7 @@ polyline (false)
((-0.1625,0.3),
(0.0375,0.21));
-endmfpic; % (83) line 1202 in the TeX source.
+endmfpic; % (83) line 1206 in the TeX source.
%------------------------------------------
@@ -3593,7 +3613,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.3, -0.1625, 0.1625);
-beginmfpic(84); % line 1203 in the TeX source.
+beginmfpic(84); % line 1207 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3639,7 +3659,7 @@ polyline (false)
((0.3,0.1625),
(0.21,-0.0375));
-endmfpic; % (84) line 1219 in the TeX source.
+endmfpic; % (84) line 1223 in the TeX source.
%------------------------------------------
@@ -3648,7 +3668,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(85); % line 1220 in the TeX source.
+beginmfpic(85); % line 1224 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3694,7 +3714,7 @@ polyline (false)
((0.1625,0.3),
(-0.0375,0.21));
-endmfpic; % (85) line 1236 in the TeX source.
+endmfpic; % (85) line 1240 in the TeX source.
%------------------------------------------
@@ -3703,7 +3723,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.3, 0, -0.1625, 0.1625);
-beginmfpic(86); % line 1237 in the TeX source.
+beginmfpic(86); % line 1241 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3749,7 +3769,7 @@ polyline (false)
((-0.3,0.1625),
(-0.21,-0.0375));
-endmfpic; % (86) line 1253 in the TeX source.
+endmfpic; % (86) line 1257 in the TeX source.
%------------------------------------------
@@ -3758,7 +3778,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(87); % line 1254 in the TeX source.
+beginmfpic(87); % line 1258 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3804,7 +3824,7 @@ polyline (false)
((-0.1625,0.3),
(0.0375,0.21));
-endmfpic; % (87) line 1270 in the TeX source.
+endmfpic; % (87) line 1274 in the TeX source.
%------------------------------------------
@@ -3813,7 +3833,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.3, -0.1625, 0.1625);
-beginmfpic(88); % line 1271 in the TeX source.
+beginmfpic(88); % line 1275 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3859,7 +3879,7 @@ polyline (false)
((0.3,0.1625),
(0.21,-0.0375));
-endmfpic; % (88) line 1287 in the TeX source.
+endmfpic; % (88) line 1291 in the TeX source.
%------------------------------------------
@@ -3868,7 +3888,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.4, -0.2, 0.2);
-beginmfpic(89); % line 1288 in the TeX source.
+beginmfpic(89); % line 1292 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3877,7 +3897,7 @@ store (curpath)
drawn
circle ((0.2,0),0.2);
-endmfpic; % (89) line 1293 in the TeX source.
+endmfpic; % (89) line 1297 in the TeX source.
%------------------------------------------
@@ -3886,7 +3906,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(90); % line 1294 in the TeX source.
+beginmfpic(90); % line 1298 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3926,7 +3946,7 @@ polyline (false)
((0.175,0.027778),
(0,0.027778));
-endmfpic; % (90) line 1308 in the TeX source.
+endmfpic; % (90) line 1312 in the TeX source.
%------------------------------------------
@@ -3935,7 +3955,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(91); % line 1309 in the TeX source.
+beginmfpic(91); % line 1313 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3975,7 +3995,7 @@ polyline (false)
((-0.175,0.027778),
(0,0.027778));
-endmfpic; % (91) line 1323 in the TeX source.
+endmfpic; % (91) line 1327 in the TeX source.
%------------------------------------------
@@ -3984,7 +4004,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(92); % line 1324 in the TeX source.
+beginmfpic(92); % line 1328 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4030,7 +4050,7 @@ polyline (false)
((0.175,0.027778),
(0,0.027778));
-endmfpic; % (92) line 1340 in the TeX source.
+endmfpic; % (92) line 1344 in the TeX source.
%------------------------------------------
@@ -4039,7 +4059,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(93); % line 1341 in the TeX source.
+beginmfpic(93); % line 1345 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4085,7 +4105,7 @@ polyline (false)
((-0.175,0.027778),
(0,0.027778));
-endmfpic; % (93) line 1357 in the TeX source.
+endmfpic; % (93) line 1361 in the TeX source.
%------------------------------------------
@@ -4094,7 +4114,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(94); % line 1358 in the TeX source.
+beginmfpic(94); % line 1362 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4167,7 +4187,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (94) line 1385 in the TeX source.
+endmfpic; % (94) line 1389 in the TeX source.
%------------------------------------------
@@ -4176,7 +4196,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(95); % line 1386 in the TeX source.
+beginmfpic(95); % line 1390 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4249,7 +4269,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (95) line 1413 in the TeX source.
+endmfpic; % (95) line 1417 in the TeX source.
%------------------------------------------
@@ -4258,7 +4278,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(96); % line 1414 in the TeX source.
+beginmfpic(96); % line 1418 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4331,7 +4351,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (96) line 1441 in the TeX source.
+endmfpic; % (96) line 1445 in the TeX source.
%------------------------------------------
@@ -4340,7 +4360,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(97); % line 1442 in the TeX source.
+beginmfpic(97); % line 1446 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4413,7 +4433,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (97) line 1469 in the TeX source.
+endmfpic; % (97) line 1473 in the TeX source.
%------------------------------------------
@@ -4422,7 +4442,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(98); % line 1470 in the TeX source.
+beginmfpic(98); % line 1474 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4483,7 +4503,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (98) line 1493 in the TeX source.
+endmfpic; % (98) line 1497 in the TeX source.
%------------------------------------------
@@ -4492,7 +4512,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(99); % line 1494 in the TeX source.
+beginmfpic(99); % line 1498 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4553,7 +4573,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (99) line 1517 in the TeX source.
+endmfpic; % (99) line 1521 in the TeX source.
%------------------------------------------
@@ -4562,7 +4582,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(100); % line 1518 in the TeX source.
+beginmfpic(100); % line 1522 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4623,7 +4643,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (100) line 1541 in the TeX source.
+endmfpic; % (100) line 1545 in the TeX source.
%------------------------------------------
@@ -4632,7 +4652,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(101); % line 1542 in the TeX source.
+beginmfpic(101); % line 1546 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4693,7 +4713,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (101) line 1565 in the TeX source.
+endmfpic; % (101) line 1569 in the TeX source.
%------------------------------------------
@@ -4702,7 +4722,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.35, -0.15, 0.15);
-beginmfpic(102); % line 1566 in the TeX source.
+beginmfpic(102); % line 1570 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4719,7 +4739,7 @@ store (curpath)
drawn
arcplr ((0.2,0),90,-90,0.15);
-endmfpic; % (102) line 1575 in the TeX source.
+endmfpic; % (102) line 1579 in the TeX source.
%------------------------------------------
@@ -4728,7 +4748,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, -0.35, 0);
-beginmfpic(103); % line 1576 in the TeX source.
+beginmfpic(103); % line 1580 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4745,7 +4765,7 @@ store (curpath)
drawn
arcplr ((0,-0.2),0,-180,0.15);
-endmfpic; % (103) line 1585 in the TeX source.
+endmfpic; % (103) line 1589 in the TeX source.
%------------------------------------------
@@ -4754,7 +4774,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.35, 0, -0.15, 0.15);
-beginmfpic(104); % line 1586 in the TeX source.
+beginmfpic(104); % line 1590 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4771,7 +4791,7 @@ store (curpath)
drawn
arcplr ((-0.2,0),-90,-270,0.15);
-endmfpic; % (104) line 1595 in the TeX source.
+endmfpic; % (104) line 1599 in the TeX source.
%------------------------------------------
@@ -4780,7 +4800,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, 0, 0.35);
-beginmfpic(105); % line 1596 in the TeX source.
+beginmfpic(105); % line 1600 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4797,7 +4817,7 @@ store (curpath)
drawn
arcplr ((0,0.2),-180,-360,0.15);
-endmfpic; % (105) line 1605 in the TeX source.
+endmfpic; % (105) line 1609 in the TeX source.
%------------------------------------------
@@ -4806,7 +4826,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.355556, -0.151089, 0.151089);
-beginmfpic(106); % line 1606 in the TeX source.
+beginmfpic(106); % line 1610 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4835,7 +4855,7 @@ store (curpath)
drawn
arcplr ((0.122222,0.105392),-90,-24.529547,0.256481);
-endmfpic; % (106) line 1617 in the TeX source.
+endmfpic; % (106) line 1621 in the TeX source.
%------------------------------------------
@@ -4844,7 +4864,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.355556, 0);
-beginmfpic(107); % line 1618 in the TeX source.
+beginmfpic(107); % line 1622 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4873,7 +4893,7 @@ store (curpath)
drawn
arcplr ((0.105392,-0.122222),180,245.470453,0.256481);
-endmfpic; % (107) line 1629 in the TeX source.
+endmfpic; % (107) line 1633 in the TeX source.
%------------------------------------------
@@ -4882,7 +4902,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.355556, 0, -0.151089, 0.151089);
-beginmfpic(108); % line 1630 in the TeX source.
+beginmfpic(108); % line 1634 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4911,7 +4931,7 @@ store (curpath)
drawn
arcplr ((-0.122222,-0.105392),90,155.470453,0.256481);
-endmfpic; % (108) line 1641 in the TeX source.
+endmfpic; % (108) line 1645 in the TeX source.
%------------------------------------------
@@ -4920,7 +4940,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.355556);
-beginmfpic(109); % line 1642 in the TeX source.
+beginmfpic(109); % line 1646 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4949,7 +4969,7 @@ store (curpath)
drawn
arcplr ((-0.105392,0.122222),0,65.470453,0.256481);
-endmfpic; % (109) line 1653 in the TeX source.
+endmfpic; % (109) line 1657 in the TeX source.
%------------------------------------------
@@ -4958,7 +4978,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.175, -0.1, 0.1);
-beginmfpic(110); % line 1654 in the TeX source.
+beginmfpic(110); % line 1658 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4971,7 +4991,7 @@ polyline (false)
(0,0.1),
(0.175,0));
-endmfpic; % (110) line 1662 in the TeX source.
+endmfpic; % (110) line 1666 in the TeX source.
%------------------------------------------
@@ -4980,7 +5000,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, -0.175, 0);
-beginmfpic(111); % line 1663 in the TeX source.
+beginmfpic(111); % line 1667 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4993,7 +5013,7 @@ polyline (false)
(0.1,0),
(0,-0.175));
-endmfpic; % (111) line 1671 in the TeX source.
+endmfpic; % (111) line 1675 in the TeX source.
%------------------------------------------
@@ -5002,7 +5022,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0, -0.1, 0.1);
-beginmfpic(112); % line 1672 in the TeX source.
+beginmfpic(112); % line 1676 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5015,7 +5035,7 @@ polyline (false)
(0,-0.1),
(-0.175,0));
-endmfpic; % (112) line 1680 in the TeX source.
+endmfpic; % (112) line 1684 in the TeX source.
%------------------------------------------
@@ -5024,7 +5044,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, 0, 0.175);
-beginmfpic(113); % line 1681 in the TeX source.
+beginmfpic(113); % line 1685 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5037,7 +5057,7 @@ polyline (false)
(-0.1,0),
(0,0.175));
-endmfpic; % (113) line 1689 in the TeX source.
+endmfpic; % (113) line 1693 in the TeX source.
%------------------------------------------
@@ -5046,7 +5066,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.425, -0.15, 0.15);
-beginmfpic(114); % line 1690 in the TeX source.
+beginmfpic(114); % line 1694 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5067,7 +5087,7 @@ store (curpath)
drawn
circle ((0.3875,0),0.0375);
-endmfpic; % (114) line 1700 in the TeX source.
+endmfpic; % (114) line 1704 in the TeX source.
%------------------------------------------
@@ -5076,7 +5096,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, -0.425, 0);
-beginmfpic(115); % line 1701 in the TeX source.
+beginmfpic(115); % line 1705 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5097,7 +5117,7 @@ store (curpath)
drawn
circle ((0,-0.3875),0.0375);
-endmfpic; % (115) line 1711 in the TeX source.
+endmfpic; % (115) line 1715 in the TeX source.
%------------------------------------------
@@ -5106,7 +5126,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.425, 0, -0.15, 0.15);
-beginmfpic(116); % line 1712 in the TeX source.
+beginmfpic(116); % line 1716 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5127,7 +5147,7 @@ store (curpath)
drawn
circle ((-0.3875,0),0.0375);
-endmfpic; % (116) line 1722 in the TeX source.
+endmfpic; % (116) line 1726 in the TeX source.
%------------------------------------------
@@ -5136,7 +5156,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, 0, 0.425);
-beginmfpic(117); % line 1723 in the TeX source.
+beginmfpic(117); % line 1727 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5157,7 +5177,7 @@ store (curpath)
drawn
circle ((0,0.3875),0.0375);
-endmfpic; % (117) line 1733 in the TeX source.
+endmfpic; % (117) line 1737 in the TeX source.
%------------------------------------------
@@ -5166,7 +5186,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.430556, -0.151089, 0.151089);
-beginmfpic(118); % line 1734 in the TeX source.
+beginmfpic(118); % line 1738 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5199,7 +5219,7 @@ store (curpath)
drawn
circle ((0.393056,-0.001089),0.0375);
-endmfpic; % (118) line 1746 in the TeX source.
+endmfpic; % (118) line 1750 in the TeX source.
%------------------------------------------
@@ -5208,7 +5228,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.430556, 0);
-beginmfpic(119); % line 1747 in the TeX source.
+beginmfpic(119); % line 1751 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5241,7 +5261,7 @@ store (curpath)
drawn
circle ((-0.001089,-0.393056),0.0375);
-endmfpic; % (119) line 1759 in the TeX source.
+endmfpic; % (119) line 1763 in the TeX source.
%------------------------------------------
@@ -5250,7 +5270,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.430556, 0, -0.151089, 0.151089);
-beginmfpic(120); % line 1760 in the TeX source.
+beginmfpic(120); % line 1764 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5283,7 +5303,7 @@ store (curpath)
drawn
circle ((-0.393056,0.001089),0.0375);
-endmfpic; % (120) line 1772 in the TeX source.
+endmfpic; % (120) line 1776 in the TeX source.
%------------------------------------------
@@ -5292,7 +5312,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.430556);
-beginmfpic(121); % line 1773 in the TeX source.
+beginmfpic(121); % line 1777 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5325,7 +5345,7 @@ store (curpath)
drawn
circle ((0.001089,0.393056),0.0375);
-endmfpic; % (121) line 1785 in the TeX source.
+endmfpic; % (121) line 1789 in the TeX source.
%------------------------------------------
@@ -5334,7 +5354,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.4, -0.151089, 0.151089);
-beginmfpic(122); % line 1786 in the TeX source.
+beginmfpic(122); % line 1790 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5367,7 +5387,7 @@ store (curpath)
drawn
arcplr ((0.166667,0.105392),-90,-24.529547,0.256481);
-endmfpic; % (122) line 1798 in the TeX source.
+endmfpic; % (122) line 1802 in the TeX source.
%------------------------------------------
@@ -5376,7 +5396,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.4, 0);
-beginmfpic(123); % line 1799 in the TeX source.
+beginmfpic(123); % line 1803 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5409,7 +5429,7 @@ store (curpath)
drawn
arcplr ((0.105392,-0.166667),180,245.470453,0.256481);
-endmfpic; % (123) line 1811 in the TeX source.
+endmfpic; % (123) line 1815 in the TeX source.
%------------------------------------------
@@ -5418,7 +5438,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.4, 0, -0.151089, 0.151089);
-beginmfpic(124); % line 1812 in the TeX source.
+beginmfpic(124); % line 1816 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5451,7 +5471,7 @@ store (curpath)
drawn
arcplr ((-0.166667,-0.105392),90,155.470453,0.256481);
-endmfpic; % (124) line 1824 in the TeX source.
+endmfpic; % (124) line 1828 in the TeX source.
%------------------------------------------
@@ -5460,7 +5480,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.4);
-beginmfpic(125); % line 1825 in the TeX source.
+beginmfpic(125); % line 1829 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5493,7 +5513,7 @@ store (curpath)
drawn
arcplr ((-0.105392,0.166667),0,65.470453,0.256481);
-endmfpic; % (125) line 1837 in the TeX source.
+endmfpic; % (125) line 1841 in the TeX source.
%------------------------------------------
@@ -5502,7 +5522,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.475, -0.151089, 0.151089);
-beginmfpic(126); % line 1838 in the TeX source.
+beginmfpic(126); % line 1842 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5539,7 +5559,7 @@ store (curpath)
drawn
circle ((0.4375,-0.001089),0.0375);
-endmfpic; % (126) line 1851 in the TeX source.
+endmfpic; % (126) line 1855 in the TeX source.
%------------------------------------------
@@ -5548,7 +5568,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.475, 0);
-beginmfpic(127); % line 1852 in the TeX source.
+beginmfpic(127); % line 1856 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5585,7 +5605,7 @@ store (curpath)
drawn
circle ((-0.001089,-0.4375),0.0375);
-endmfpic; % (127) line 1865 in the TeX source.
+endmfpic; % (127) line 1869 in the TeX source.
%------------------------------------------
@@ -5594,7 +5614,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.475, 0, -0.151089, 0.151089);
-beginmfpic(128); % line 1866 in the TeX source.
+beginmfpic(128); % line 1870 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5631,7 +5651,7 @@ store (curpath)
drawn
circle ((-0.4375,0.001089),0.0375);
-endmfpic; % (128) line 1879 in the TeX source.
+endmfpic; % (128) line 1883 in the TeX source.
%------------------------------------------
@@ -5640,7 +5660,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.475);
-beginmfpic(129); % line 1880 in the TeX source.
+beginmfpic(129); % line 1884 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5677,7 +5697,7 @@ store (curpath)
drawn
circle ((0.001089,0.4375),0.0375);
-endmfpic; % (129) line 1893 in the TeX source.
+endmfpic; % (129) line 1897 in the TeX source.
%------------------------------------------
@@ -5686,7 +5706,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.25, -0.1, 0.1);
-beginmfpic(130); % line 1894 in the TeX source.
+beginmfpic(130); % line 1898 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5703,7 +5723,7 @@ store (curpath)
drawn
circle ((0.2125,0),0.0375);
-endmfpic; % (130) line 1903 in the TeX source.
+endmfpic; % (130) line 1907 in the TeX source.
%------------------------------------------
@@ -5712,7 +5732,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, -0.25, 0);
-beginmfpic(131); % line 1904 in the TeX source.
+beginmfpic(131); % line 1908 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5729,7 +5749,7 @@ store (curpath)
drawn
circle ((0,-0.2125),0.0375);
-endmfpic; % (131) line 1913 in the TeX source.
+endmfpic; % (131) line 1917 in the TeX source.
%------------------------------------------
@@ -5738,7 +5758,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.25, 0, -0.1, 0.1);
-beginmfpic(132); % line 1914 in the TeX source.
+beginmfpic(132); % line 1918 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5755,7 +5775,7 @@ store (curpath)
drawn
circle ((-0.2125,0),0.0375);
-endmfpic; % (132) line 1923 in the TeX source.
+endmfpic; % (132) line 1927 in the TeX source.
%------------------------------------------
@@ -5764,7 +5784,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, 0, 0.25);
-beginmfpic(133); % line 1924 in the TeX source.
+beginmfpic(133); % line 1928 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5781,7 +5801,7 @@ store (curpath)
drawn
circle ((0,0.2125),0.0375);
-endmfpic; % (133) line 1933 in the TeX source.
+endmfpic; % (133) line 1937 in the TeX source.
%------------------------------------------
diff --git a/graphics/circuit_macros/examples/mf/mftest b/graphics/circuit_macros/examples/mf/mftest
index f75b74f39d..a92ea327a4 100755
--- a/graphics/circuit_macros/examples/mf/mftest
+++ b/graphics/circuit_macros/examples/mf/mftest
@@ -3,7 +3,7 @@
#
# Usage: mftest file
#
-# e.g. copy ex01.m4 here and type ./mftest ex01
+# e.g. copy ex03.m4 here and type chmod +x mftest; ./mftest ex03
# Invokes m4 on file.m4, and builds the resulting picture in file.ps
LIBS=mfpic.m4
@@ -17,7 +17,7 @@ echo "\documentclass{article}
%{This is a test of the -m option of dpic (mfpic output).}" \
| tr '\046' '\134' > $1.tex
-m4 -B16000 $LIBS $1.m4 | dpic -m >> $1.tex
+m4 $LIBS $1.m4 | dpic -m >> $1.tex
echo "
&closegraphsfile
diff --git a/graphics/circuit_macros/examples/mpost/mptest b/graphics/circuit_macros/examples/mpost/mptest
index cfc94b6bc0..abc9f07562 100755
--- a/graphics/circuit_macros/examples/mpost/mptest
+++ b/graphics/circuit_macros/examples/mpost/mptest
@@ -3,7 +3,7 @@
# to produce an eps file
#
# Usage: ./mptest file
-# You may have to make this file executable first.
+# You may have to make this file executable first; that is: chmod +x mptest
#
# e.g. copy ex01.m4 here and type ./mptest ex01
# Starting with file.m4, invoke m4, dpic -s, and MetaPost to produce file.1
diff --git a/graphics/circuit_macros/examples/sfg.m4 b/graphics/circuit_macros/examples/sfg.m4
index 1d22326d45..efa50eefc5 100644
--- a/graphics/circuit_macros/examples/sfg.m4
+++ b/graphics/circuit_macros/examples/sfg.m4
@@ -8,7 +8,7 @@ sfg_init( 1.2 ) # default edge length = 1.2
[
# Graph 1
T:[
- Ft: sfgnode(,f(t),sfgbelow)
+ Ft: sfgnode(,f(t),sfgbelow,shaded "red")
sfgline(,1/K)
Y1: sfgnode(,y_1,sfgbelow rjust)
sfgline(,K/M)
@@ -16,12 +16,12 @@ T:[
sfgline(,s^{-1})
DY2: sfgnode(,\d`'ot{y}_2=x_2,sfgbelow ljust) dnl dot is an m4 macro
sfgline(,s^{-1})
- Y2: sfgnode(,y_2=x_1,sfgbelow ljust)
+ Y2: sfgnode(,y_2=x_1,sfgbelow ljust,shaded "green")
sf = 1
- sfgarc(from DY2 to DDY2,-B/M,below,,sf)
- sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf)
- sfgarc(from Y2 to Y1,1,sfgabove,,sf)
+ sfgarc(from DY2 to DDY2,-B/M,below,,sf,outlined "gray")
+ sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf,outlined "gray")
+ sfgarc(from Y2 to Y1,1,sfgabove,,sf,outlined "gray")
]
#showbox_(,"T")
@@ -46,7 +46,9 @@ B: [
G3: [#sfg_init( 0.85,0.35/2 ) # change node spacing and size
sfg_wid = 0.85
sfg_rad = 0.35/2
- for_(1,4,1,`N`'m4x: sfgnode(,m4x,,fill_(0.9))
+ NeedDpicTools
+ cmyktorgb(96,0,0,0,r,g,b)
+ for_(1,4,1,`N`'m4x: ColoredV(circle,(r,g,b),"m4x" rad sfg_rad)
sfgself(at N`'m4x,-90,P_{m4x},,cw)
ifelse(m4x,4,,`sfgline(,G_{m4x},sfgbelow)') ')
sfgarc(from N2 to N1,F_2,sfgabove,ccw,)
@@ -93,13 +95,13 @@ G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and size
# https://tex.stackexchange.com/questions/637455/tikz-how-to-set-exact-position-of-node
G5: [sfg_init( 1.75,0.25/2 ) # change node spacing and size
- Dstar: sfgnode(,*)
- D0: sfgnode(at Dstar+(2,0),\diamond_0)
+ Dstar: sfgnode(,*,,shaded "green")
+ D0: sfgnode(at Dstar+(2,0),\diamond_0,,shaded "green")
sfgline(,`1-r_{x{-}1,x}-q^i_{x{-}1,x}',,->)
- Ddots: sfgnode(,\cdots)
+ Ddots: sfgnode(,\cdots,,shaded "green")
sfgline(,`1-r_{x{-}4,x}-q^i_{x{-}4,x}',,->)
- D5: sfgnode(,\diamond_5)
- DD: sfgnode(at D0+(0,-1.0),\dagger)
+ D5: sfgnode(,\diamond_5,,shaded "green")
+ DD: sfgnode(at D0+(0,-1.0),\dagger,,shaded "green")
sfgself(at Dstar,L,,,,0.5)
"$`1-i_x-q^a_x'$" wid 45bp__ at Dstar + (-0.3,0.25)
sfgself(at DD,D,1\mathstrut,above_,,0.5)
diff --git a/graphics/circuit_macros/examples/shadowed.m4 b/graphics/circuit_macros/examples/shadowed.m4
index f25be03732..1f26d36049 100644
--- a/graphics/circuit_macros/examples/shadowed.m4
+++ b/graphics/circuit_macros/examples/shadowed.m4
@@ -1,50 +1,60 @@
.PS
# shadowed.m4
gen_init
+NeedDpicTools
divert(-1)
divert(0)dnl
Boxes: [
-shadebox(box "s{}hadebox",lthick*4/(1bp__))
-
-move
-#{print "B"}
-B: shadowed(,,
- shadowthick=lthick*4;attrib=fill_(0.95) "box")
-
-move
-#{print "B1"}
+movewid = movewid/2
B1: shadowed(,,
rad=0bp__; shadowthick=lthick*4; shadowcolor="lightgray"; shadowangle=-60; \
attrib=fill_(0.85) "box")
move
-#{print "R"}
R: shadowed(box,, rad=6bp__; shadowthick=lthick*4; \
attrib=wid boxht*2 shaded "orange" outlined "red" thick 2 \
`"\tt box\char44\char44" "\tt rad=6bp\_\_"')
-]
-Others:[
-#{print "C"}
+move
C: shadowed(circle,,
shadowthick=lthick*4;shadowcolor="blue";\
attrib=outlined "green" shaded "green" diam 0.75 "circle")
move
-#{print "E"}
E: shadowed(ellipse,,
shadowthick=lthick*4; attrib=ht boxwid wid boxht shaded "yellow" \
dashed "ellipse")
-move right movewid*3/2 then down moveht/2; right_
b = boxht
+ move to (E.e.x+b,E.s.y)
F: shadowed(line,,
attrib=left b then up b right b then down b right b then to Here \
shaded "orange" outlined "red" thick 3;shadowthick=4.5bp__;\
shadowangle=45)
"line" at F.n+(0,-0.3)
-] with .nw at Boxes.sw+(0,-moveht)
+]
+
+Others:[
+movewid = movewid*0.4
+
+ cmyktorgb(96,0,0,0,r,g,b)
+ ColoredV(circle,(r,g,b), rad 0.4 "Hello" outlined "cyan")
+
+move
+ s = 0.5; v = 0.8
+ hsvtorgb(0,s,v,r0,g0,b0)
+ hsvtorgb(90,s,v,r1,g1,b1)
+ hsvtorgb(180,s,v,r2,g2,b2)
+ ColoredV(box,((0,r0,g0,b0, 0.5,r1,g1,b1, 1,r2,g2,b2)),
+ outlined "blue" rad 0.1 ht 2*boxht "Hmm...")
+
+move
+ ColoredV(ellipse,(g,r,b),wid 0.75 ht 1 outlined "magenta" "OK")
+
+move
+ ColoredV(ellipse,,outlined "magenta" shaded "yellow" "Goodbye")
+] with .nw at Boxes.sw #+(0,-moveht)
.PE
diff --git a/graphics/circuit_macros/examples/tubedefs.m4 b/graphics/circuit_macros/examples/tubedefs.m4
index fa79c05904..4830dc5d00 100644
--- a/graphics/circuit_macros/examples/tubedefs.m4
+++ b/graphics/circuit_macros/examples/tubedefs.m4
@@ -248,7 +248,7 @@ define(`V_6L6G',`[ ifelse(`$1',,,`pushdef(`tubediam',`$1')')
popdef(`tgap') `$4' ifelse(`$1',,,`popdef(`tubediam')')] ')
`5U4G rectifier(diam,R)'
-define(`V_5V4G',`[ ifelse(`$1',,,`pushdef(`tubediam',`$1')')
+define(`V_5U4G',`[ ifelse(`$1',,,`pushdef(`tubediam',`$1')')
drawEnv(`$2')
P1: line thick tubethick up tubediam/3 with .c at Env-(tubediam/6,0)
P2: line thick tubethick up tubediam/3 with .c at Env+(tubediam/6,0)
diff --git a/graphics/circuit_macros/examples/xfig/xfiglib.fig b/graphics/circuit_macros/examples/xfig/xfiglib.fig
index e284b3c82f..91a4e52740 100644
--- a/graphics/circuit_macros/examples/xfig/xfiglib.fig
+++ b/graphics/circuit_macros/examples/xfig/xfiglib.fig
@@ -6,7 +6,7 @@ Letter
100.00
Single
-2
-# dpic version 2023.06.01 option -x for Fig 3.2
+# dpic version 2024.01.01 option -x for Fig 3.2
1200 2
6 0 0 3975 5025
6 0 0 3975 5025
@@ -289,8 +289,10 @@ Single
6 750 1575 1500 2175
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
750 1875 825 1875
-2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 5
- 1425 1875 825 1575 825 2175 1425 1875 1500 1875
+2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 4
+ 1425 1875 825 1575 825 2175 1425 1875
+2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
+ 1425 1875 1500 1875
-6
6 1650 1575 2250 2025
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
diff --git a/graphics/circuit_macros/gpic.m4 b/graphics/circuit_macros/gpic.m4
index 5752faa7a6..4a69dcd786 100644
--- a/graphics/circuit_macros/gpic.m4
+++ b/graphics/circuit_macros/gpic.m4
@@ -1,7 +1,7 @@
divert(-1)
gpic.m4 Initialization for gpic.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/lib3D.m4 b/graphics/circuit_macros/lib3D.m4
index 7fd9901dd3..a7f3d95ac2 100644
--- a/graphics/circuit_macros/lib3D.m4
+++ b/graphics/circuit_macros/lib3D.m4
@@ -3,7 +3,7 @@ lib3D.m4 Macros for rotation, projection, and other
operations on argument triples representing
3D vectors or colors.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/libSLD.m4 b/graphics/circuit_macros/libSLD.m4
index e4438b73ae..d13d57a51b 100644
--- a/graphics/circuit_macros/libSLD.m4
+++ b/graphics/circuit_macros/libSLD.m4
@@ -2,7 +2,7 @@ divert(-1)
libSLD.m4 Draft macros for single-line diagram elements
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/libcct.m4 b/graphics/circuit_macros/libcct.m4
index 4f8d12c0c2..463ff4515e 100644
--- a/graphics/circuit_macros/libcct.m4
+++ b/graphics/circuit_macros/libcct.m4
@@ -1,7 +1,7 @@
divert(-1)
libcct.m4
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -58,8 +58,10 @@ NON-TWO-TERMINAL ELEMENTS are usually constructed within a block:
DEBUGGING: The statement
print "`$0'($@)" ;
inserted into a macro will display the macro name and current arguments
- provided the arguments do not contain double quotes. Similarly, the
- m4 macro m4msg( text ) will display the text during m4 processing.
+ provided the arguments do not contain double quotes. The line
+ `# $0'($@) will write a comment containing the same information into the
+ .pic output. Similarly, the m4 macro m4msg( text ) will display the
+ text during m4 processing.
==============================================================================
CUSTOMIZATIONS:
@@ -563,7 +565,7 @@ define(`transformer', `[ P1: Here define(`m4drt',m4_dir_)
define(`m4trdot',`{`$6'dot(at (0.5 between `$1' and `$2') \
+vec_(`$3'(`$4'+m4hlw)/2,`$5'dimen_/16), dotrad_/2)}')
- `delay( linespec, width )'
+ `delay( linespec, width, attributes )'
define(`delay',`eleminit_(`$1')
define(`m4ht',`ifelse(`$2',,`delay_rad_*2',`($2)')')dnl
define(`m4wd',`m4ht*5/6')dnl
@@ -571,8 +573,8 @@ define(`delay',`eleminit_(`$1')
{ line from rvec_(m4ht/3,-m4ht/2) \
to rvec_(0,-m4ht/2)\
then to rvec_(0,m4ht/2) \
- then to rvec_(m4ht/3,m4ht/2)
- arc cw from Here to rvec_(0,-m4ht) with .c at rvec_(0,-m4ht/2) }
+ then to rvec_(m4ht/3,m4ht/2) `$3'
+ arc cw from Here to rvec_(0,-m4ht) with .c at rvec_(0,-m4ht/2) `$3' }
move to rvec_(m4wd,0)
line to rvec_(rp_len/2-m4wd/2,0) }
{ [box invis ht_ m4ht wid_ m4wd ] at rvec_(rp_len/2,0)}
@@ -616,11 +618,16 @@ define(`xtal',`eleminit_(`$1') pushkey_(`$2',type,N,N)
line from rvec_(m4wd,0) to rvec_(rp_len/2+m4wd/2,0) }
line to rvec_(rp_len,0) invis ')
- `source( linespec,
- V|v|I|i|ii|AC|B|F|G|H|Q|L|N|P|R|S[C[r]|E[r]]]|T|X|U|other,
- diameter, R, attributes,body name)
- V = voltage source; v = alternate voltage source;
- I = current source; i = alternate current source;
+ `source( linespec,V|v|tv|I|i|ti|ii|AC|B|F|G|H|Q|L|N|
+ P|R|S[C[r]|E[r]]]|T|X|U|other,
+ diameter, R, attributes, body name)
+ V = voltage source;
+ v = alternate voltage source;
+ tv = truncated-bar alternate voltage source;
+ tv = truncated bar alternate voltage source;
+ i = alternate current source;
+ ti = truncated-bar alternate current source;
+ I = current source;
ii = double arrowhead current source;
AC = AC source; B = bulb; F = fluorescent; G =
generator; H = step function; L = lamp;
@@ -652,6 +659,8 @@ define(`source',`ifelse(`$4',R,
to rvec_(m4h/2,0)}',
`$2',I,`{arrow from rvec_(-m4h*3/4,0) \
to rvec_(m4h*3/4,0)}',
+ `$2',ti,`{line thick 2*linethick from rvec_(0,-m4h) \
+ to rvec_(0,m4h) chop m4h/4}',
`$2',ii,`{line from rvec_(-m4h,0) \
to rvec_(m4h,0)}
{line thick 1.2*linethick from rvec_(m4h/12,-m4h*0.45) \
@@ -697,6 +706,8 @@ define(`source',`ifelse(`$4',R,
`$2',V,`{"ifsvg(-,`$_-$')" at rvec_(-m4h/2,0) ifsvg(+(0,textht/10))}
{"ifsvg(svg_small(+),`$_+$')" \
at rvec_( m4h/2,0) ifsvg(+(0,textht/10))}',
+ `$2',tv,`{line thick 2*linethick from rvec_(-m4h,0) \
+ to rvec_(m4h,0) chop m4h/4}',
`$2',v,`{line from rvec_(-m4h,0) \
to rvec_(m4h,0)}',
`$2',AC,`{ACsymbol(,,,AR)}',
@@ -754,9 +765,9 @@ define(`m4_sourceGQ',
L: Cx+vec_(m4sh, m4sv)
R: Cx+vec_(m4sh,-m4sv)
M1: Cx-vec_(m4h/6,0)
- C1: circle rad m4h with .c at Cx
+ C1: circle rad m4h with .c at Cx `$5'
C2: ifelse(`$3',G,`circle rad m4h',`arc rad m4h from R to L') \
- with .c at C1 +vec_(m4sh*2,0)
+ `$5' with .c at C1 +vec_(m4sh*2,0)
M2: C2+vec_(m4h/6,0)
] at rvec_(m4h+m4sh,0)}
line from rvec_((m4h+m4sh)*2,0) \
@@ -784,7 +795,7 @@ define(`ttmotor',`eleminit_(`$1')
{ [box invis ht_ m4r*2 wid_ (m4r+m4w)*2] at last circle.c }
line to rvec_(rp_len,0) invis ')
- `consource( linespec ,V|I|v|i|P, R )
+ `consource( linespec ,V|I|v|i|P, R, attributes )
Controlled source
Arg3:
V= voltage
@@ -806,11 +817,15 @@ define(`consource',`ifelse(`$3',R,
ifelse(`$2',I,
`{arrow from rvec_(csdim_/4,0) \
to rvec_(csdim_*7/4,0)}',
+ `$2',ti,
+ `{line thick 2*linethick from M4CSN to M4CSS chop csdim_/4}',
`$2',i,
`{line from M4CSN to M4CSS}',
`$2',V,
`{"iflatex(`$-$',-)" at rvec_(csdim_*0.5,0) ifsvg(+(0,textht/10))}
{"iflatex(`$+$',+)" at rvec_(csdim_*1.5,0) ifsvg(+(0,textht/10))}',
+ `$2',tv,
+ `{line thick 2*linethick to M4CSE chop csdim_/4} ',
`$2',v,
`{line to M4CSE} ',
`$2',P,
@@ -819,7 +834,7 @@ define(`consource',`ifelse(`$3',R,
{[box invis ht_ 2*csdim_ wid_ 2*csdim_] at rvec_(rp_len/2,0)}
line to rvec_(rp_len,0) invis ')')
- `Proxim(size, U|D|L|R|degrees)
+ `Proxim(size, U|D|L|R|degrees, attributes)
Proximity symbol
Arg2 default: current direction'
define(`Proxim',`[
@@ -830,10 +845,10 @@ define(`Proxim',`[
M4PRS: rvec_(0,-m4prwid/2)
M4PRW: rvec_(-m4prwid/2,0)
{ line from 1/2 between M4PRN and M4PRE to M4PRE then to M4PRS \
- then to M4PRW then to M4PRN then to 1/2 between M4PRN and M4PRE }
+ then to M4PRW then to M4PRN then to 1/2 between M4PRN and M4PRE `$3' }
{ line from 1/4 between M4PRW and M4PRN to 1/4 between M4PRE and M4PRN }
{ line from 1/4 between M4PRW and M4PRS to 1/4 between M4PRE and M4PRS }
- `$3'; resetdir_ ]')
+ `$4'; resetdir_ ]')
`Magn(len, ht, U|D|L|R|degrees)
Magnetic relay action symbol'
@@ -897,7 +912,7 @@ define(`ebox',`eleminit_(`$1')
ifinstr(`$2',=,`popdef(`m4lgth',`m4wdth',`m4text',`m4box')')dnl
line to rvec_(rp_len,0) invis ')
- `fuse( linespec, chars, wid, ht )
+ `fuse( linespec, chars, wid, ht, attributes )
chars dA|B|C|D|S|SB|HB|HC or dA (=D)'
define(`fuse',`eleminit_(`$1')
define(`m4fusetype',`ifelse(`$2',,A,`$2',D,dA,`$2')')dnl
@@ -907,10 +922,10 @@ define(`fuse',`eleminit_(`$1')
{line to rvec_(max(0,rp_len/2-m4wd/2),0)
sc_draw(`m4fusetype',HB,
`{move to rvec_(m4d,0); lbox(m4wd-2*m4d,m4ht-2*m4d)}
- {lbox(m4wd,m4ht)}
+ {lbox(m4wd,m4ht,`$5')}
line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)')
sc_draw(`m4fusetype',HC,
- `{move to rvec_(m4d,0); {lbox(m4wd-2*m4d,m4ht-2*m4d)}
+ `{move to rvec_(m4d,0); {lbox(m4wd-2*m4d,m4ht-2*m4d,`$5')}
{line from rvec_((m4wd-2*m4d)/5,m4ht/2-m4d) \
to rvec_((m4wd-2*m4d)/5,-m4ht/2+m4d)}
line from rvec_((m4wd-2*m4d)*4/5,m4ht/2-m4d) \
@@ -924,22 +939,22 @@ define(`fuse',`eleminit_(`$1')
line to rvec_(max(0,rp_len/2-m4wd/2),0)dnl
ifelse(m4a,d,`; dot(at last line.start,,1)')')
sc_draw(`m4fusetype',SB,
- `{lbox(m4wd,m4ht)}
+ `{lbox(m4wd,m4ht,`$5')}
{line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)}
{m4fshade(m4fill,lbox(m4wd/5,m4ht))}
move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0)')
sc_draw(`m4fusetype',B,
- `{lbox(m4wd,m4ht)}
+ `{lbox(m4wd,m4ht,`$5')}
line to rvec_(m4wd+max(0,rp_len/2-m4wd/2),0)')
sc_draw(`m4fusetype',C,
- `{lbox(m4wd,m4ht)}
+ `{lbox(m4wd,m4ht,`$5')}
{line from rvec_(m4wd/5,-m4ht/2) \
to rvec_(m4wd/5,m4ht/2)}
{line from rvec_(m4wd*4/5,-m4ht/2) \
to rvec_(m4wd*4/5,m4ht/2)}
move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0)')
sc_draw(`m4fusetype',S,
- `{lbox(m4wd,m4ht)}
+ `{lbox(m4wd,m4ht,`$5')}
{m4fshade(m4fill,lbox(m4wd/5,m4ht))}
move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0)')
}
@@ -947,7 +962,8 @@ define(`fuse',`eleminit_(`$1')
line to rvec_(rp_len,0) invis ')
`arrester( linespec, [G|E|S][D[L|R]],
- len[:arrowhead ht], ht[:arrowhead wid] )
+ len[:arrowhead ht], ht[:arrowhead wid],
+ attributes )
arg2 chars:
G= spark gap (default)
g= general (dots)
@@ -971,7 +987,7 @@ define(`arrester',
define(`m4rL',ifinstr(`$2',L,-))dnl
define(`m4rR',ifinstr(`$2',R,-))dnl
define(`m4aht',`m4Rightstr(`$3',arrowht*2/3)')dnl
- define(`m4awd',`m4Rightstr(`$3',arrowwid*4/3)')dnl
+ define(`m4awd',`m4Rightstr(`$4',arrowwid*4/3)')dnl
define(`m4wd',
`ifinstr(m4rdna,C,`m4Leftstr(`$3',dimen_/3)',
m4rdna,F,`m4Leftstr(`$3',dimen_/3)',
@@ -1007,8 +1023,8 @@ define(`arrester',
`{dot(at rvec_(dotrad_,0))}
{dot(at rvec_(m4wd/2,0))}; dot(at rvec_(m4wd-dotrad_,0))',
m4rdna,C,
- `lbox(m4wd/3,m4ht); move to rvec_(m4wd/3,0)
- lbox(m4wd/3,m4ht)',
+ `lbox(m4wd/3,m4ht,`$5'); move to rvec_(m4wd/3,0)
+ lbox(m4wd/3,m4ht,`$5')',
m4rdna,A,
`{line to rvec_(m4wd/4,0)}
for_(1,3,1,`line from rvec_(0,m4ht/2) to rvec_(m4wd/4,0) \
@@ -1039,10 +1055,10 @@ define(`arrester',
{line from rvec_(m4wd/2,m4ht/2) to rvec_(m4wd/2,-m4ht/2)}
line from rvec_(m4wd,m4ht/2) to rvec_(m4wd,-m4ht/2)',
m4rdna,S,
- `{lbox(m4wd,m4ht)}
+ `{lbox(m4wd,m4ht,`$5')}
arrow to rvec_(m4wd/2,0) wid m4awd ht m4aht',
m4rdna,E,
- `{circle diam m4wd at rvec_(m4wd/2,0)}
+ `{circle diam m4wd at rvec_(m4wd/2,0) `$5'}
{arrow to rvec_(m4wd*3/8,0) wid m4awd ht m4aht}
{arrow <- from rvec_(m4wd*5/8,0) to rvec_(m4wd,0) wid m4awd ht m4aht}
dot(at rvec_(m4wd*6/8,m4wd/4),dotrad_*2/3) ')
@@ -1050,12 +1066,12 @@ define(`arrester',
line from rvec_(m4wd,0) to rvec_(max(0,rp_len/2+m4wd/2),0) }
line invis to rvec_(rp_len,0)') ')
- `memristor( linespec, wid, ht )'
+ `memristor( linespec, wid, ht, attributes )'
define(`memristor',`eleminit_(`$1')
define(`m4ht',ifelse(`$3',,`dimen_/5',`($3)'))define(`m4htx',`m4ht/4')dnl
define(`m4wd',ifelse(`$2',,`dimen_/2',`($2)'))define(`m4wdx',`m4wd*4/25')dnl
{ line to rvec_(max(0,rp_len/2-m4wd/2),0)
- {[lbox(m4wd,m4ht)] at rvec_(m4wd/2,0)}
+ {[lbox(m4wd,m4ht,`$4')] at rvec_(m4wd/2,0)}
line to rvec_(m4wdx,0) \
then to rvec_(m4wdx,m4htx) \
then to rvec_(m4wdx*2,m4htx) \
@@ -1069,12 +1085,12 @@ define(`memristor',`eleminit_(`$1')
line to rvec_(max(0,rp_len/2-m4wd/2),0) }
line invis to rvec_(rp_len,0)')
- `pvcell( linespec, wid, ht )'
+ `pvcell( linespec, wid, ht, attributes )'
define(`pvcell',`eleminit_(`$1')
define(`m4wd',ifelse(`$2',,`dimen_/2',`($2)'))dnl
define(`m4ht',ifelse(`$3',,`dimen_/5',`($3)'))dnl
{ line to rvec_(max(0,rp_len/2-m4wd/2),0)
- {[lbox(m4wd,m4ht)] at rvec_(m4wd/2,0)}
+ {[lbox(m4wd,m4ht,`$4')] at rvec_(m4wd/2,0)}
{line from rvec_(0,-m4ht/2) to rvec_(m4wd/3,0) then to rvec_(0,m4ht/2)}
move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0) }
line invis to rvec_(rp_len,0)')
@@ -1140,10 +1156,11 @@ define(`heatert',`eleminit_(`$1')
to rvec_(max(0,rp_len/2+m4lgth/2),0) }
line invis to rvec_(rp_len,0) popdef(`m4parts',`m4lgth',`m4wdth',`m4box')')
- `lamp(linespec,[R][T])'
+ `lamp(linespec,[R][T],attributes)'
define(`lamp',`pushdef(`m4ng',`ifinstr(`$2',R,-)')pushdef(`m4hw',`dimen_/10')dnl
pushdef(`m4dp',(m4ng`'m4hw/2))pushdef(`m4ht',(m4ng`'dimen_/8))dnl
eleminit_(ifinstr(`$2',T,m4hw*2,`$1'))
+ { [ circle rad dimen_/5 `$3' ] at rvec_(rp_len/2,m4ng`'dimen_/3.2) }
{ line to rvec_(rp_len/2-m4hw,0) \
then to rvec_(rp_len/2-m4hw,m4ng`'dimen_/3.2)
spline ifdpic(ctension_) to rvec_(0,m4ht) \
@@ -1155,7 +1172,6 @@ eleminit_(ifinstr(`$2',T,m4hw*2,`$1'))
then to rvec_(2*m4hw,0)
line to rvec_(0,-(m4ng`'dimen_/3.2)) \
then to rvec_(rp_len/2-m4hw,-(m4ng`'dimen_/3.2)) }
- { [ circle rad dimen_/5 ] at rvec_(rp_len/2,m4ng`'dimen_/3.2) }
line invis to rvec_(rp_len,0) popdef(`m4ng',`m4hw',`m4dp',`m4ht') ')
`thermocouple(linespec, wid, ht, L|R [T])
@@ -1335,8 +1351,8 @@ define(`ground',`box invis ht 0 wid 0 with .c ifelse(`$1',,`at Here',`$1')
`antenna(at position, T|stem length, A|L|T|S|D|P|F,
U|D|L|R|degrees)
arg2=T: truncate stem
- arg3= A=aerial; L=loop, T=triangle, S=diamond,
- D=dipole, P=phased, F=fork;
+ arg3= A aerial; L loop, T triangle, S diamond,
+ D dipole, P phased, F fork;
up (default), down, left, right, angle (deg)'
define(`antenna',`[ T: Here
define(`m4v',`dimen_/2')define(`m4h',`dimen_/12')dnl
@@ -1488,10 +1504,13 @@ define(`lswitch',`eleminit_(`$1') dnl
arrowht = m4t1 ; arrowwid = m4t2; ifelse(`$4',,,`{`$4'}')
line to rvec_(rp_len,0) invis ')
- `dswitch(linespec,R,W[ud]B chars,text)
+ `dswitch(linespec, R, W[ud]B chars, attributes)
Comprehensive IEEE-IEC single-pole switch:
arg2=R: orient to the right of drawing dir
- arg 4 is text for GC and GX options
+ arg4 is a key-value sequence for the body of
+ GC and GX options;
+ GC keys: diam, circle
+ GX keys: lgth, wdth, box, text
arg 3:
blank means WB by default
B=contact blade open
@@ -1510,7 +1529,7 @@ define(`lswitch',`eleminit_(`$1') dnl
LE = late close (or early open)
F = fused
GC = disk control mechanism, attribs:
- diam=expr;circle=circle attribs; text=char;
+ diam=expr; circle=circle attribs;
GX = box control mechanism, attribs:
lgth=expr;wdth=expr;box=box attr; text=char;
H = time delay closing
@@ -1577,8 +1596,7 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl
sc_draw(`dna_',GX,
`pushkeys_(`$4',`lgth:10*m4sc;wdth:10*m4sc;box::N;text::N')dnl
line from B.c to B.c+ta_xy(0,4)
- GX: rotbox(m4lgth,m4wdth,ifelse(m4box,,,type=m4box)) \
- at Here+ta_xy(0,m4lgth/2/(m4sc))
+ GX: rotbox(m4lgth,m4wdth,m4box) at Here+ta_xy(0,m4lgth/2/(m4sc))
ifelse(m4text,,,`m4lstring(m4text,"m4text") at GX.C') dnl
popdef(`m4lgth',`m4wdth',`m4box',`m4text')')
sc_draw(`dna_',C,
@@ -1705,49 +1723,51 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl
] with .M4_xyO at M4CC }
line to rvec_(rp_len,0) invis ')
- `amp( linespec,size )
+ `amp( linespec,size, attributes )
Amplifier'
define(`amp',`eleminit_(`$1') define(`m4wd',`ifelse(`$2',,`dimen_',`($2)')')dnl
{line to rvec_(max(0,rp_len/2-m4wd/2),0)
- line from rvec_(m4wd,0) \
+ {line from rvec_(m4wd,0) \
to rvec_(0,m4wd/2) \
then to rvec_(0,-m4wd/2) \
- then to rvec_(m4wd,0) \
- then to rvec_(max(m4wd,rp_len/2+m4wd/2),0) }
+ then to rvec_(m4wd,0) `$3'}
+ line from rvec_(m4wd,0) to rvec_(max(m4wd,rp_len/2+m4wd/2),0) }
{[box invis ht_ m4wd wid_ m4wd] at rvec_(max(m4wd,rp_len)/2,0)}
line to rvec_(max(rp_len,m4wd),0) invis ')
- `integrator( linespec,size )'
+ `integrator( linespec,size,attributes )'
define(`integrator',`eleminit_(`$1')
define(`m4wd',`ifelse(`$2',,`dimen_',`($2)')')dnl
{line from rvec_(m4wd/4,m4wd/2) \
to rvec_(0,m4wd/2) \
then to rvec_(0,-m4wd/2) \
- then to rvec_(m4wd/4,-m4wd/2) }
+ then to rvec_(m4wd/4,-m4wd/2) `$3' }
{line from rvec_(m4wd*5/4,0) \
- to rvec_(m4wd/4,m4wd/2) \
+ to rvec_(m4wd/4,m4wd/2) \
then to rvec_(m4wd/4,-m4wd/2) \
- then to rvec_(m4wd*5/4,0) \
- then to rvec_(max(rp_len,m4wd*5/4),0) }
+ then to rvec_(m4wd*5/4,0) `$3' }
+ {line from rvec_(m4wd*5/4,0) to rvec_(max(rp_len,m4wd*5/4),0) }
{ [box invis ht_ m4wd wid_ m4wd*5/4] at rvec_(m4wd*5/8,0) }
line to rvec_(max(rp_len,m4wd*5/4),0) invis ')
`opamp(linespec,
- - label, + label, size, chars)
+ - label, + label, size|keys, chars)
+ keys= lgth=expr;
+ wdth=expr;
+ body=attributes;
drawn as a []:
defined positions:
W, N, E, S, Out, E1, E2, In1, In2
size: expr (default lgth equals wdth)
- or wdth=expr; lgth=expr;
chars:
P: power connections V1,V2
R: labels at In1,In2 swapped
T: truncated point '
define(`opamp',
-`[ ifinstr(`$4',=,`pushkeys_(`$4',wdth:dimen_;lgth:m4wdth)',`pushdef(`m4wdth',
- `ifelse(`$4',,`dimen_',`($4)')')pushdef(`m4lgth',m4wdth)')dnl
-define(`dna_',`$5')dnl
- eleminit_(`$1',max(elen_-m4lgth/4,m4lgth))
+`[ pushdef(`m4dlgth',`ifinstr(`$4',=,dimen_,ifelse(`$4',,dimen_,`($4)'))')dnl
+ pushkeys_(`$4',body::N; lgth:m4dlgth; wdth:m4lgth;)dnl
+ pushdef(`dna_',`$5')dnl
+ eleminit_(`$1',max(elen_-m4lgth/4,m4lgth))
W: Here
N: vec_(0,m4wdth/2)
S: vec_(0,-m4wdth/2)
@@ -1755,9 +1775,9 @@ define(`dna_',`$5')dnl
C: vec_(m4lgth/2,0)
{ sc_draw(`dna_',T,
`line to N then to 0.75 between N and E \
- then to 0.75 between S and E then to S then to W
+ then to 0.75 between S and E then to S then to W m4body
line from 0.75 between W and E to E',
- `line to N then to E then to S then to W; move to E')
+ `line to N then to E then to S then to W m4body; move to E')
if rp_len > m4lgth then { line to rvec_(rp_len-m4lgth,0) }
Out: Here }
NE: vec_(m4lgth/2,m4wdth/4); E1: NE
@@ -1765,15 +1785,15 @@ define(`dna_',`$5')dnl
In1: vec_(0,m4wdth/4)
In2: vec_(0,-m4wdth/4)
{ move to In`'ifinstr(dna_,R,2,1)
- ifelse(`$2',,"ifsvg(-,`{\scriptsize$-$}')" \
+ ifelse(`$2',,"iflatex(`{\scriptsize$-$}',-)" \
at rvec_(4pt__,0) ifsvg(+(0,textht/10)),m4lstring(`$2',"`$2'"))}
{ move to In`'ifinstr(dna_,R,1,2)
- ifelse(`$3',,"ifsvg(+,`{\scriptsize$+$}')" \
+ ifelse(`$3',,"iflatex(`{\scriptsize$+$}',+)" \
at rvec_(4pt__,0) ifsvg(+(0,textht/10)),m4lstring(`$3',"`$3'"))}
sc_draw(`dna_',P,
`{line from E1 to (vec_(m4lgth/2,m4wdth/4+m4wdth/8)); V1: Here}
{line from E2 to (vec_(m4lgth/2,-(m4wdth/4+m4wdth/8))); V2: Here}')
- `$6' popdef(`m4lgth',`m4wdth')] ')
+ `$6' popdef(`m4dlgth',`dna_',`m4lgth',`m4wdth',`m4body')] ')
`dac(width,height,nIn,nN,nOut,nS)'
define(`dac',`[
@@ -2794,7 +2814,7 @@ define(`eleminit_',
`parallel_(`elementspec', `elementspec', ...
Parallel combination of two-terminal elements
- in a [ ] block. Each elementspec is quoted and
+ in a [] block. Each elementspec is quoted and
of the form
[Sep=val;][Label:] element; [attributes]
where an attribute is of the form
@@ -2846,6 +2866,7 @@ define(`parallel_',
] with .Start at Here; move to last [].End
')
+ifelse(0,1,` dnl ignore the following two macro defs ##################
`par_( element, element, separation )
Parallel combination of two branches that have
the same direction and length. The
@@ -2885,6 +2906,7 @@ define(`gpar_',
End: 0.5 between Here and M4_E1
C: 0.5 between Start and End; line to M4_E1 ] with .Start at Here
move to last [].End ')
+') dnl end of ignore ########################
define(`m4sepdefault',`dimen_') `Default separation in the parallel_ macro'
define(`m4lendefault',`dimen_') `Default length in the series_ macro'
@@ -2996,7 +3018,7 @@ define(`m4xR',ifinstr(`$2',R,R))define(`m4SR',ifelse(m4xR,R,-))dnl
`$3']')
- `relay(npoles,chars)
+ `relay(npoles,chars,attributes)
arg1: Number of poles (max 10)
chars:
any of the relaycoil options and:
@@ -3008,7 +3030,7 @@ define(`m4xR',ifinstr(`$2',R,R))define(`m4SR',ifelse(m4xR,R,-))dnl
R = drawn to right of drawing direction
Th = thermal '
define(`relay',`[ define(`m4pm',`ifinstr(`$2',R,-)')dnl
- Coil: relaycoil(`$2') define(`m4rel',rcdna_)
+ Coil: relaycoil(`$2',,,,`$3') define(`m4rel',rcdna_)
V1: Coil.V1
V2: Coil.V2
sc_draw(m4rel,Th,
@@ -3025,7 +3047,7 @@ define(`relay',`[ define(`m4pm',`ifinstr(`$2',R,-)')dnl
`P`'m4x: Cs.P`'m4x
C`'m4x: Cs.C`'m4x
O`'m4x: Cs.O`'m4x')
- `$3'] ')
+ `$4'] ')
`contacts(npoles,chars)
chars:
@@ -3148,7 +3170,8 @@ define(`contact',`[ dnl
')
`$3'] ')
- `relaycoil( chars, wid, ht, U|D|L|R|degrees )
+ `relaycoil( chars, wid, ht, U|D|L|R|degrees,
+ attributes )
chars: (see IEC 60617 S00305 - S00319)
X or default: external lines from A2 and B2
AX external lines at positions A1,A3
@@ -3173,7 +3196,7 @@ define(`relaycoil',`[ ifelse(`$4',,,`setdir_(`$4')')
define(`m4ht',ifelse(`$3',,`dimen_/2',`($3)'))dnl
define(`m4LL',`ifinstr(`$4',NX,0,dimen_/3)')dnl
define(`rcdna_',ifinstr(`$1',AX,,`$1',BX,,`$1',X,,X)`$1')dnl
- { lbox( m4wd, m4ht ) }
+ { lbox( m4wd, m4ht, `$5' ) }
{ A1: rvec_(0,m4ht/4)
A2: Here; V1: A2
A3: rvec_(0,-m4ht/4) }
@@ -3270,7 +3293,7 @@ define(`relaycoil',`[ ifelse(`$4',,,`setdir_(`$4')')
{ line from rvec_(m4wd*3/8,0) to rvec_(m4wd*3/16,m4ht*3/16) }
{ line from rvec_(m4wd*5/8,0) to rvec_(m4wd*13/16,m4ht*3/16) }
{ line from rvec_(m4wd/2,0) to rvec_(m4wd/2,-m4ht/4) } }')
- `$5'] ')
+ `$6'] ')
`reed(linespec,wid,ht,box attributes,[R][C])
Enclosed two-terminal reed contact;
@@ -3290,11 +3313,11 @@ define(`reed',`eleminit_(`$1')
{[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)}
line to rvec_(rp_len,0) invis ')
- `ccoax(at location,M|F,diameter)'
+ `ccoax(at location,M|F,diameter,attributes)'
define(`ccoax',`[define(`m4cd',ifelse(`$3',,`dimen_*0.4',`$3'))dnl
- S: circle diam m4cd
+ S: circle diam m4cd `$4'
C: circle diam m4cd/3 fill_(ifinstr(`$2',F,1,0)) at S
- `$4'] with .c ifelse(`$1',,`at Here',`$1')')
+ `$5'] with .c ifelse(`$1',,`at Here',`$1')')
`tconn( linespec, chars|keys, wid)
terminal connector with head in a [] block
@@ -3358,7 +3381,7 @@ define(`tconn',
then to rvec_(-m4wdth,-m4wdth) m4head ] with .S at Here }')
line invis to M4Se popdef(`m4type',`m4lgth',`m4wdth',`m4sep',`m4head') ')
- `tbox( text,wid,ht,<|>|<>,type )
+ `tbox( text,wid,ht,<|>|<>,attributes )
Pointed terminal box.
text is placed at centre of rectangle in math mode
unless it starts with a double quote or sprintf
@@ -3384,22 +3407,23 @@ define(`tbox',`[ define(`m4td',`ifelse(`$4',,>,`$4')')
ifelse(`$1',,,`m4lstring(`$1',`"iflatex(`$ `$1'$',` $1')"')')
`$6' popdef(`m4th2') popdef(`m4tw2') ]')
- `pconnex(R|L|U|D|degrees,chars)
+ `pconnex(R|L|U|D|degrees,chars,attributes)
arg1: drawing direction
chars:
- R=right orientation
- M|F= male, female
- A[B]|AC =115V 3-prong, B=box (default), C=circle
- P= PC connector
- D= 2-pin connector
- G[B]|GC= 3-pin, B=default, C=circle
- J= 110V 2-pin '
+ R: right orientation
+ M|F: male, female
+ A[B]|AC: 115V 3-prong, B=box (default), C=circle
+ P: PC connector
+ D: 2-pin connector
+ G[B]|GC: 3-pin, B=default, C=circle
+ J: 110V 2-pin '
define(`pconnex',
`[ define(`m4sgn',ifinstr(`$2',F,,-))define(`m4R_',ifinstr(`$2',R,-))dnl
setdir_(`$1')
define(`m4na_',`ifelse(`$2',,A,`$2')')dnl
ifinstr(m4na_,A,`
- Base: ifinstr(m4na_,AC,`circle diam dimen_',`[lbox(dimen_,dimen_) ]')
+ Base: ifinstr(m4na_,AC,`circle diam dimen_ `$3'',
+ `[lbox(dimen_,dimen_,`$3') ]')
N: m4pconpin(dimen_/12,dimen_*0.3,m4na_) \
at Base+vec_(m4sgn`'(-dimen_*0.2),m4R_`'dimen_*0.15)
H: m4pconpin(dimen_/12,dimen_*0.25,m4na_) \
@@ -3426,7 +3450,7 @@ define(`pconnex',
then to vec_(wd/2-hd/3,-hd) \
then to vec_(wd/2,-hd*2/3) \
then to vec_(wd/2,0) \
- then to Here]
+ then to Here `$3']
N: m4pconpin(dimen_/12,dimen_*0.25,m4na_) \
at Base+vec_(m4sgn`'(-dimen_*0.2),m4R_`'dimen_*0.15)
H: m4pconpin(dimen_/12,dimen_*0.25,m4na_) \
@@ -3435,10 +3459,7 @@ define(`pconnex',
at Base+vec_(0,m4R_`'(-dimen_*0.15))',
m4na_,D,
`wd = dimen_*1.2; hd = wd/2
- Base: [line to vec_(wd-hd,0)
- arc rad hd/2 ccw to rvec_(0,hd) with .c at rvec_(0,hd/2)
- line to rvec_(hd-wd,0)
- arc rad hd/2 ccw to rvec_(0,-hd) with .c at rvec_(0,-hd/2) ]
+ Base: [rotbox(wd,hd,,r=hd/2,`$3')]
H: m4pcrpin(dimen_/6,m4na_) at Base.c+vec_( (wd-hd)/2,0)
N: m4pcrpin(dimen_/6,m4na_) at Base.c+vec_(-(wd-hd)/2,0)',
m4na_,G,
@@ -3467,7 +3488,7 @@ define(`pconnex',
H: m4pconpin(dimen_/12,dimen_*0.25,m4na_) at Base.c+vec_( wd/4,0)
N: m4pconpin(dimen_/12,dimen_*0.25,m4na_) at Base.c+vec_(-wd/4,0)
')
- `$3' ; resetdir_ ]')
+ `$4' ; resetdir_ ]')
define(`m4pconpin',`[ifinstr(`$3',F,`lbox(`$1',`$2')',
`m4fshade(m4fill,lbox(`$1',`$2'))')]')
define(`m4pcrpin',`[ifinstr(`$2',F,`circle diam `$1'',
@@ -3576,7 +3597,7 @@ define(`gyrator',
`$5')') ')
`proximity(linespec)'
define(`proximity',`consource(`$1',P)')
- `nullator(linespec, wid, ht)'
+ `nullator(linespec, wid, ht, attributes)'
define(`nullator',`eleminit_(`$1')
define(`m4wd',ifelse(`$2',,`dimen_/2',`($2)'))dnl
define(`m4ht',ifelse(`$3',,`dimen_/4',`($3)'))dnl
@@ -3591,13 +3612,13 @@ define(`nullator',`eleminit_(`$1')
then to rvec_(-m4wd/2,-m4ht/4) \
then to rvec_(-m4wd/2,m4ht/4) \
then to rvec_(-m4wd/20*3,m4ht/2) \
- then to rvec_(ifdpic(0,m4wd/20),m4ht/2)
+ then to rvec_(ifdpic(0,m4wd/20),m4ht/2) `$4'
}
line from rvec_(m4wd/2,0) \
to rvec_(max(0,rp_len/2),0)}
{[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)}
line to rvec_(rp_len,0) invis ')
- `norator(linespec, wid, ht)'
+ `norator(linespec, wid, ht, attributes)'
define(`norator',`eleminit_(`$1')
define(`m4wd',ifelse(`$2',,`dimen_/2',`($2)'))dnl
define(`m4ht',ifelse(`$3',,`dimen_/4',`($3)'))dnl
@@ -3608,7 +3629,7 @@ define(`norator',`eleminit_(`$1')
then to rvec_(i*m4wd/2,m4ht/2) \
then to rvec_(i*m4wd/2,-m4ht/2) \
then to rvec_(i*m4wd/4,-m4ht/2) \
- then to Here } }
+ then to Here `$4' } }
line from rvec_(m4wd/2,0) \
to rvec_(max(0,rp_len/2),0)}
{[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)}
@@ -3735,7 +3756,7 @@ define(`m4termpins',`for_(1,m4n,1,
`$3'`'m4x: ifelse(xtract(`$4',N),N,Here,`dot') }
ifelse(m4x,m4n,,`move to rvec_(`$2',0)')')')
- `speaker(U|D|L|R|degrees, vert size, type)
+ `speaker(U|D|L|R|degrees, vert size, type, attributes)
type=H horn'
define(`speaker',`[setdir_($1,R)
define(`m4v',`ifelse(`$2',,`dimen_/3',`($2)/4')')dnl
@@ -3744,12 +3765,12 @@ define(`speaker',`[setdir_($1,R)
`{H1: line from rvec_(m4h,m4v/2) \
to rvec_(m4h*3/2,m4v*7/8) \
then to rvec_(m4h*3/2,-m4v*7/8) \
- then to rvec_(m4h,-m4v/2)}',
+ then to rvec_(m4h,-m4v/2) `$4'}',
`{H1: line from rvec_(m4h,m4v) \
to rvec_(m4h*2,m4v*2) \
then to rvec_(m4h*2,-m4v*2) \
- then to rvec_(m4h,-m4v)}')
- {lbox(m4h,m4v*2)}
+ then to rvec_(m4h,-m4v) `$4'}')
+ {lbox(m4h,m4v*2,`$4')}
{Box: box invis ht_ m4v*2 wid_ m4h at rvec_(m4h/2,0)}
In1: rvec_(0,m4v/2)
In2: Here
@@ -3758,19 +3779,20 @@ define(`speaker',`[setdir_($1,R)
In5: rvec_(m4h*3/4,m4v)
In6: rvec_(m4h/4,-m4v)
In7: rvec_(m4h*3/4,-m4v)
- `$4'; resetdir_ ]')
+ `$5'; resetdir_ ]')
- `bell(U|D|L|R|degrees, vert size)'
+ `bell(U|D|L|R|degrees, vert size, attributes)'
define(`bell',`[setdir_($1,R)
define(`m4h',`ifelse(`$2',,`dimen_/2',`($2)')')dnl
- {lbox(m4h,m4h)}
+ {lbox(m4h,m4h,`$3')}
{Box: box invis ht_ m4h wid_ m4h at rvec_(m4h/2,0)}
- {Circle: circle diameter m4h at rvec_(m4h*3/2,0)}
+ {Circle: circle diameter m4h at rvec_(m4h*3/2,0) `$3'}
In1: rvec_(0,m4h/4)
In2: Here
In3: rvec_(0,-m4h/4)
- `$3'; resetdir_ ]')
- `microphone(A|U|D|L|R|degrees, vert size)
+ `$4'; resetdir_ ]')
+ `microphone(A|U|D|L|R|degrees, vert size,
+ attributes)
Arg1= A, upright mic
Thanks to Arnold Knott'
define(`microphone',`ifinstr(`$1',A,
@@ -3783,7 +3805,7 @@ define(`microphone',`ifinstr(`$1',A,
{ arc from Here+(-bwd,bwd) to Here+(bwd,bwd) with .c at Here+(0,bwd)
line up m4sfact/4-bwd from last arc.start
line up m4sfact/4-bwd from last arc.end }
- Head: box rad bwd/2 ht bht wid bwd with .s at Here+(0,bwd/2)
+ Head: box rad bwd/2 ht bht wid bwd with .s at Here+(0,bwd/2) `$3'
Inner: box rad bwd/2 ht bht/2+bwd/2 wid bwd with .n at Head.n
move to Inner.s+(0,bwd/2)
for i=1 to 4 do {
@@ -3795,13 +3817,14 @@ define(`microphone',`ifinstr(`$1',A,
define(`m4h',`ifelse(`$2',,`dimen_/2',`($2)')')dnl
{L1: line from rvec_(m4h,-m4h/2) \
to rvec_(m4h,m4h/2)}
- {Circle: circle diameter m4h at rvec_(m4h/2,0)}
+ {Circle: circle diameter m4h at rvec_(m4h/2,0) `$3'}
In1: rvec_(m4h*(2-sqrt(3))/4,m4h/4)
In2: Here
In3: rvec_(m4h*(2-sqrt(3))/4,-m4h/4)
- `$3'; resetdir_ ]')')
+ `$4'; resetdir_ ]')')
- `buzzer(U|D|L|R|degrees, vert size,[C])'
+ `buzzer(U|D|L|R|degrees, vert size,[C],
+ attributes)'
define(`buzzer',`[setdir_($1,R)
ifelse(`$3',,
`define(`m4h',`ifelse(`$2',,`dimen_/2',`($2)')')dnl
@@ -3810,7 +3833,7 @@ define(`buzzer',`[setdir_($1,R)
then to rvec_(0,m4h/2) \
then to rvec_(0,-m4h/2) \
then to rvec_(m4h,-m4h/2) \
- then to rvec_(m4h,0)}
+ then to rvec_(m4h,0) `$4'}
{Box: box invis ht_ m4h wid_ m4h at rvec_(m4h/2,0)}
{L2: line from rvec_(m4h,m4h/2) \
to rvec_(m4h,m4h/2)+vec_(Rect_(m4h,-75))}
@@ -3820,31 +3843,32 @@ define(`buzzer',`[setdir_($1,R)
`$3',C,`define(`m4h',`ifelse(`$2',,`(dimen_/3)',`(($2)/2)')')dnl
{Face: line from rvec_(m4h,-m4h) \
to rvec_(m4h,m4h)}
- {arc ccw from Face.end to Face.start with .c at Face.c}
+ {arc ccw from Face.end to Face.start with .c at Face.c `$4'}
In1: rvec_(m4h-sqrt(m4h^2-(m4h/3)^2),m4h/3)
In2: Here
In3: rvec_(m4h-sqrt(m4h^2-(m4h/3)^2),-m4h/3)')
- `$4'; resetdir_ ]')
- `earphone(U|D|L|R|degrees, size, [C][R])
+ `$5'; resetdir_ ]')
+ `earphone(U|D|L|R|degrees, size, [C][R],
+ attributes)
earphone pair if arg3 contains C'
define(`earphone',`[ setdir_($1,R)
define(`m4h',`ifelse(`$2',,`dimen_',`($2)')')dnl
ifinstr(`$3',C,
- `L: circle diam m4h*0.4
- R: circle diam m4h*0.4 at L+vec_(m4h,0)
+ `L: circle diam m4h*0.4 `$4'
+ R: circle diam m4h*0.4 at L+vec_(m4h,0) `$4'
C: 0.5 between L and R
N: C+(vscal_(m4h/2,Vperp(L,R)))
Lx: Cintersect(L,L.rad,C,m4h/2,`$3')
Rx: Cintersect(C,m4h/2,R,R.rad,`$3')
arc ifinstr(`$3',R,c)cw rad m4h/2 from Lx to Rx with .c at C',
- `{lbox(m4h/3,m4h/2)}
+ `{lbox(m4h/3,m4h/2,`$4')}
{Box: box invis ht_ m4h/2 wid_ m4h/3 at rvec_(m4h/6,0)}
{L1: line thick 2*linethick from rvec_(m4h/3+linethick pt__,-m4h/3) \
to rvec_(m4h/3+linethick pt__, m4h/3) }
In1: rvec_(0,m4h/8)
In2: Here
In3: rvec_(0,-m4h/8)')
- `$4'; resetdir_ ]')
+ `$5'; resetdir_ ]')
`Signal-flow graph macros: labeled node,
directed labeled chopped straight line,
@@ -3872,8 +3896,9 @@ End: Here
move to last line.c
ifelse(ifinstr(`$4',->,T,`$4',<-,T),,
`{ arrow m4c_l ht sfg_aht wid sfg_awid from rvec_(-sfg_aht/2,0) \
- to rvec_(sfg_aht/2,0) }')
- ifelse(`$2',,,`"iflatex(`$ `$2'$',` $2')" ifelse(`$3',,`sfgabove',`$3')')
+ to rvec_(sfg_aht/2,0) `$4' }')
+ ifelse(`$2',,,`m4lstring(`$2',"iflatex(`$ `$2'$',` $2')") \
+ ifelse(`$3',,`sfgabove',`$3')')
] with .Start at rvec_(sfg_rad,0)
move to last [].End
')
@@ -3882,20 +3907,21 @@ End: Here
define(`sfgabove',`at Here+(0,sfg_awid/2) above')
define(`sfgbelow',`at Here+(0,-sfg_awid/2) below')
- `sfgnode(at pos,text,above_,circle options)
+ `sfgnode(at pos,text,above_,circle attributes)
Node: a white circle, possibly labelled. The
default label position is inside if the
diameter is bigger than textht and textwid'
define(`sfgnode',
- `[C: circle fill_(1) rad sfg_rad ifelse(`$4',,`thickness 0.5',`$4')] with .c \
+ `[C: circle fill_(1) rad sfg_rad ifelse(`$4',,`thick 0.5',`$4')] with .c \
ifelse(`$1',,`at rvec_(sfg_rad,0)',`$1')
move to last [].c
- ifelse(`$2',,,
- `if 2*sfg_rad > Max(textwid,textht,10pt__) \
- then { {"iflatex(`$ `$2'$',` $2')" `$3'} } \
- else { {"iflatex(`$ `$2'$',` $2')" ifelse(`$3',,`sfgabove',`$3')} }')
+ ifelse(`$2',,,`if 2*sfg_rad > Max(textwid,textht,10pt__) \
+ then { {m4lstring(`$2',`"iflatex(`$ `$2'$',` $2')"') `$3'} } \
+ else { { m4lstring(`$2',`"iflatex(`$ `$2'$',` $2')"') \
+ ifelse(`$3',,`sfgabove',`$3')} }')
')
- `sfgarc(linespec,label,above_,cw|ccw,sfact)
+ `sfgarc(linespec,label,above_,cw|ccw,sfact,
+ attributes)
An arc between nodes at the endpoints of the
linespec. The resulting positions Start, End,
C (arc center) and M (arc midpoint) are defined.
@@ -3908,23 +3934,23 @@ define(`sfgarc',`eleminit_(`$1',sfg_wid)
arcrd = (chordht^2+(rp_len)^2/4)/chordht/2
C: 0.5 between Start and End; C: C+vec_(0,ifelse(`$4',ccw,,-)(arcrd-chordht))
M: C + vec_( 0,ifelse(`$4',ccw,-)arcrd)
- ifelse(ifinstr(`$1',->,T)ifinstr(`$1',<-,T),,
- `arc -> m4c_l ifelse(`$4',ccw,ccw,cw) \
+ ifelse(ifinstr(`$1',->,T,`$1',<-,T),,
+ `arc `$6' -> m4c_l ifelse(`$4',ccw,ccw,cw) \
from Cintersect(Start,sfg_rad,C,arcrd,ifelse(`$4',ccw,R)) \
to Cintersect(C,arcrd,M,sfg_aht/2,ifelse(`$4',ccw,,R)) \
- ht sfg_aht wid sfg_awid with .c at C
+ ht sfg_aht wid sfg_awid with .c at C `$6'
arc m4c_l ifelse(`$4',ccw,ccw,cw) from M \
- to Cintersect(C,arcrd,End,sfg_rad,ifelse(`$4',ccw,R)) with .c at C',
+ to Cintersect(C,arcrd,End,sfg_rad,ifelse(`$4',ccw,R)) with .c at C `$6'',
`arc m4c_l patsubst(patsubst(`$1',.*<-,<-),->.*$,->) ifelse(`$4',ccw,ccw,cw)\
from Cintersect(Start,sfg_rad,C,arcrd,ifelse(`$4',ccw,R)) \
- to Cintersect(C,arcrd,End,sfg_rad,ifelse(`$4',ccw,R)) with .c at C')
- ifelse(`$2',,,`move to M; "iflatex(`$ `$2'$',` $2')" ifelse(`$3',,
- `sfgabove',`$3')')
+ to Cintersect(C,arcrd,End,sfg_rad,ifelse(`$4',ccw,R)) with .c at C `$6'')
+ ifelse(`$2',,,`move to M; m4lstring(`$2',"iflatex(`$ `$2'$',` $2')") \
+ ifelse(`$3',,`sfgabove',`$3')')
] with .Start at last line.start
move to last line.end
')
`sfgself(at position,U|D|L|R|degrees,label,above_,cw|ccw,sfact,
- [-> | <- | <->])
+ [-> | <- | <->], attributes)
A teardrop-shaped self-loop drawn at "angle"
degrees from "positon". The resulting Origin
and M (arc midpoint) are defined. The sixth
@@ -3933,14 +3959,14 @@ define(`sfgarc',`eleminit_(`$1',sfg_wid)
define(`sfgself',`[ Origin: Here
setdir_(`$2',U)
d = ifelse(`$6',,,`($6)*') sfg_wid/2; d = d * max(1,sfg_rad/(0.3605*d))
- { m4sfgselfcurve(-,
+ { m4sfgselfcurve(-, `$8' \
ifelse(`$5',ccw,`ifinstr(`$7',<-,<-)',`ifinstr(`$7',->,<-)'))
M: Here
- ifelse(`$7',,`{ arrow m4c_l from rvec_(0,ifelse(`$5',cw,,-)sfg_aht/2) \
+ ifelse(`$7',,`{ arrow `$8' m4c_l from rvec_(0,ifelse(`$5',cw,,-)sfg_aht/2) \
to rvec_(0,ifelse(`$5',cw,-)sfg_aht/2) ht sfg_aht wid sfg_awid }')
- ifelse(`$3',,,
- `{"iflatex(`$ `$3'$',` $3')" ifelse(`$4',,`sfgabove',`$4')}') }
- m4sfgselfcurve(,
+ ifelse(`$3',,,`{m4lstring(`$3',`"iflatex(`$ `$3'$',` $3')"') \
+ ifelse(`$4',,`sfgabove',`$4')}') }
+ m4sfgselfcurve(, `$8' \
ifelse(`$5',ccw,`ifinstr(`$7',->,<-)',`ifinstr(`$7',<-,<-)'))
resetdir_ ] with .Origin ifelse(`$1',,at Here,`$1')
move to last [].Origin
@@ -3987,25 +4013,27 @@ define(`winding',`[ define(`m4rt',`ifinstr(`$1',R,-)')
Terminal strip
n=integer number of terminals (default 4)
chars:
- I=invisible terminals
- C=circle terminals (default)
- D=dot terminals
- O=omitted internal lines
+ I invisible terminals
+ C circle terminals (default)
+ D dot terminals
+ O omitted internal lines
+ box=attributes;
wid=val; total strip width
ht=val; strip height '
define(`tstrip',`[ setdir_(`$1')
define(`m4n',`ifelse(`$2',,4,`eval($2)')')dnl
ifelse(eval(m4n<1),1,`define(`m4n',1)')dnl
- pushkey_(`$3',ht,dimen_/2)dnl
- pushkey_(`$3',wid,m4n*m4ht*0.6)dnl
- {Box: [shade(1,lbox(m4wid,m4ht))] }
+ pushkeys_(`$3',ht:dimen_/2; wid:m4n*m4ht*0.6; box::N;)
+# pushkey_(`$3',ht,dimen_/2)dnl
+# pushkey_(`$3',wid,m4n*m4ht*0.6)dnl
+ {Box: [shade(1,lbox(m4wid,m4ht,m4box))] }
bw = m4wid/(m4n)
ifinstr(`$3',O,,`for i=1 to m4n-1 do {
{move to rvec_(i*bw,-m4ht/2); line to rvec_(0,m4ht)}}')
for_(1,m4n,1,`{T`'m4x: ifinstr(`$3',I,`rvec_((m4x-0.5)*bw,0)',
`dot(at rvec_((m4x-0.5)*bw,0),,ifinstr(`$3',D,0,1))')
{L`'m4x: T`'m4x+vec_(0,m4ht/2)}; {R`'m4x: T`'m4x+vec_(0,-m4ht/2)} }')
- `$4' popdef(`m4wid',`m4ht')
+ `$4' popdef(`m4wid',`m4ht',`m4box')
resetdir_ ]')
`jack(U|D|L|R|degrees, chars)
diff --git a/graphics/circuit_macros/libgen.m4 b/graphics/circuit_macros/libgen.m4
index d69385b63a..c37bb1359d 100644
--- a/graphics/circuit_macros/libgen.m4
+++ b/graphics/circuit_macros/libgen.m4
@@ -2,7 +2,7 @@ divert(-1)
libgen.m4 Base macros for dpic and gpic diagrams
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -101,8 +101,8 @@ ifgpic(` if (rp_len == 0) then { rp_ang=0 } else {')dnl
define(`twopi__',`6.2831853071795862')`twopi_' = twopi__;dnl
define(`pi__',`(twopi_/2)')`pi_' = pi__
rp_ang = 0; right_
- define(`ctension_',`0.551784')define dpictools_ {0}dnl
- define copydpictools_ {if "$`'1"=="" then { copy "HOMELIB_/dpictools.pic"; } \
+ define(`ctension_',`0.551784')define dpictools_ {0}
+ define copydpictools_ {if "$`'1"=="" then { copy "HOMELIB_`'dpictools.pic";} \
else { copy "$`'1/dpictools.pic"; } }
ifmpost(`defineRGBprimaries')
ifpostscript(`defineRGBprimaries
@@ -164,13 +164,6 @@ define(`sfg_init',`cct_init
popdef(`m4blen',`m4rad',`m4hght',`m4wdth')dnl
')
- sfg graphs in libcct.m4
-define(`xfg_init',`cct_init
- sfg_wid = ifelse(`$1',,`(linewid/0.75*(2.5+0.25)/4)',(`$1'))# default line len
- sfg_rad = ifelse(`$2',,(0.25/4/2),(`$2')) # node radius
- sfg_aht = ifelse(`$3',,(0.25/4),(`$3')) # arrow height (arrowhead length)
- sfg_awid = ifelse(`$4',,`sfg_aht',(`$4')) # arrowhead width
- ')
==========================================================================
Pic SI defaults
@@ -199,7 +192,7 @@ define(`latexcommand',
`$2')')
define(`m4announceprocessor',`dnl Do not change the format of the next line:
-`#' `$1' Version 10.4: ifelse(m4picprocessor,gpic,`Gpic',
+`#' `$1' Version 10.5: ifelse(m4picprocessor,gpic,`Gpic',
m4postprocessor,pstricks,`PSTricks',
m4postprocessor,pgf,`TikZ PGF',
m4postprocessor,mfpic,`Mfpic',
@@ -305,9 +298,9 @@ define(`rpoint_',`line invis ifelse(`$1',,linewid/10,`$1')
ifgpic(`if (rp_len == 0) then { rp_ang=0 } else { ')dnl
rp_ang = atan2(rp_ht,rp_wid) ifgpic(` }')')
point_(rp_ang)' )
- `direction_( U|D|L|R|degrees,default R|L|U|D|degrees )
- obsolete but kept for compatibility'
-define(`direction_',`setdir_($@)')
+# `direction_( U|D|L|R|degrees,default R|L|U|D|degrees )
+# obsolete but kept for compatibility'
+#define(`direction_',`setdir_($@)')
Evaluate the argument as a macro
define(`m4xpand',`$1')
@@ -989,7 +982,7 @@ define(`cross',`[
move to last []')
`boxcoord(name,xfraction,yfraction)
- internal position in a named planar object'
+ iternal position in a named planar object'
define(`boxcoord',
`(`$2' between `$1'.w and `$1'.e,`$3' between `$1'.s and `$1'.n)')
@@ -1037,13 +1030,30 @@ define(`shadowed',`define(`m4object',`ifelse(`$1',,box,`$1')')dnl
m4object ifelse(m4object,line,,fill_(1)) m4attrib at M4C ')dnl
popdef(`m4attrib',`m4rad',`m4shadowthick',`m4shadowcolor',`m4shadowangle') ')
- `hatchbox(boxspec,hashsep,hatchspec,ang)'
- `manhattan box with hatching at ang degrees'
-define(`hatchbox',`[ a = pmod((ifelse(`$4',,45,`$4')+90),180)-90
- if a >=0 then { B: box invis `$1' with .nw at (0,0) } \
- else { B: box invis `$1' with .sw at (0,0) }
- ds = ifelse(`$2',,0.075*scale,`$2')
- ifelse(`$3',,`thicktemp = linethick; thinlines_')
+ `hatchbox(boxspec,hatchsep,hatchspec,angle)
+ or
+ hatchbox(keys)
+ Manhattan box with hatching at angle degrees
+ keys:
+ wid=expr;
+ ht=expr;
+ box=attributes; (e.g. dashed outline "color")
+ fillcolor="color"|(r,g,b);
+ hatchsep=expr;
+ hatchspec=attributes;
+ angle=expr; '
+define(`hatchbox',`[pushkeys_(`$1',wid:boxwid:N;ht:boxht:N;box::N;fillcolor::N;
+ hatchsep:0.075*scale;hatchspec::N;angle:45)
+ b = ifelse(`$4',,m4angle,`$4')
+ a = pmod((ifelse(b,,45,b)+90),180)-90
+ if a >=0 then { B: box ifinstr(`$1',=,`wid m4wid ht m4ht m4box dnl
+ ifelse(m4fillcolor,,,m4colorfix(shaded,m4fillcolor))',
+ invis `$1') with .nw at (0,0) } \
+ else { B: box ifinstr(`$1',=,`wid m4wid ht m4ht m4box dnl
+ ifelse(m4fillcolor,,,m4colorfix(shaded,m4fillcolor))',
+ invis `$1') with .sw at (0,0) }
+ ds = m4hatchsep
+ ifelse(m4hatchspec,,`thicktemp = linethick; thinlines_')
ca = cosd(a); sa = sind(a)
if abs(a) < 0.1 then { for y = ds to B.ht by ds do {
line from B.nw-(0,y) to B.ne-(0,y) } } \
@@ -1058,8 +1068,7 @@ define(`hatchbox',`[ a = pmod((ifelse(`$4',,45,`$4')+90),180)-90
if F.x > B.wid then { F: (B.wid,intersect_(T,S,B.ne,B.se).y) }
lp=((-F.y)<=B.ht && F.x<=B.wid)
# Use this with dpic-2017.08.24 or later:
-# if lp then { line from S to F `$3' }
- line from S*lp to F*lp `$3'
+ line from S*lp to F*lp m4hatchspec
}
} else { T: B.sw
for lp=1 to 0 by -1 do { T: T+(-ds*sa,ds*ca); Q: T+(-ca*d,-sa*d)
@@ -1069,12 +1078,14 @@ define(`hatchbox',`[ a = pmod((ifelse(`$4',,45,`$4')+90),180)-90
if F.x > B.wid then { F: (B.wid,intersect_(T,S,B.ne,B.se).y) }
lp=(F.y<=B.ht && F.x<=B.wid)
# Use this with dpic-2017.08.24 or later:
-# if lp then { line from S to F `$3' }
line from S*lp to F*lp `$3'
+ line from S*lp to F*lp m4hatchspec
}
} } }
- ifelse(`$3',,`linethick_(thicktemp)')
- box wid B.wid ht B.ht at B `$1'
+ ifelse(m4hatchspec,,`linethick_(thicktemp)')
+ box wid B.wid ht B.ht at B m4box ifinstr(`$1',=,,`$1')
+ popdef(`m4wid',`m4ht',`m4box',`m4fillcolor',
+ `m4hatchsep',`m4hatchspec',`m4angle') dnl
`$5' ]' )
`lbox(wid,ht,attributes)
@@ -1090,10 +1101,10 @@ define(`lbox',`pushdef(`m4bwd',ifelse(`$1',,boxwid,(`$1')))dnl
then to rvec_(m4bwd,0) `$3' dnl
popdef(`m4bwd')popdef(`m4bht') ')
- `rotbox(wid,ht,type,[r=val|t=val])
+ `rotbox(wid,ht,type attribs,[r=val|t=val])
box oriented in current direction in [] block;
wd and ht are distances between line centers.
- type= eg dotted shaded "green"
+ type=attributes eg dotted shaded "green"
if arg4 is r=val then the corner radius is val
if arg4 is t=val then a "superellipse"
is drawn using a spline of tension val
@@ -1135,7 +1146,7 @@ define(`rotbox',`[
SE: vec_( m4bw2,-m4bh2)
NW: vec_(-m4bw2, m4bh2)
SW: vec_(-m4bw2,-m4bh2)
- Line: line from E to NE then to NW then to SW then to SE then to E `$3' ')
+ Line: line from E to NE then to NW then to SW then to SE then to E `$3'')
popdef(`m4bw2',`m4bh2') `$5' ]')
`rotellipse(wid,ht,attributes)
@@ -1279,7 +1290,7 @@ define(`arcdimension_',`arc invis `$1' ; {
}')
`polygon(nsides,keys) regular polygon in [] block
keys: line=attribs; e.g. dashed shaded "red"
- rot=expr; angle of first vertex V[0]
+ rot=degrees; angle of first vertex V[0]
side|rad=expr; size by radius or side
Defined points: C, V[0], ... V[nsides-1]'
define(`polygon',`[ C: Here; nsides=ifelse(`$1',,3,`$1')
@@ -1295,6 +1306,9 @@ define(`polygon',`[ C: Here; nsides=ifelse(`$1',,3,`$1')
Fill an arbitray closed curve with a gray value
0=black, 1=white,
(requires gpic, pstricks, or postscript out)'
+ `Changing the name of this would be desirable
+ but there are just too many legacy diagrams
+ that use it.'
define(`shade',`beginshade(`$1')
`$2'
endshade')
@@ -1411,7 +1425,7 @@ define(`gpolyline',`1-(`$1') between `$2' and `$3' \
then to `$1' between `$3' and `$4' ifelse(`$5',,,`\
then to gpolyline(`$1',shift(shift($@)))')')
- `m4xshade(gray value,closed curve) internal'
+ `m4fshade(gray value,closed curve) internal'
ifelse(m4picprocessor,gpic,
`define`m4fshade',`shade(ifelse(`$1',,0,`$1'),`$2')')',
m4postprocessor,xfig,
@@ -1419,22 +1433,6 @@ m4postprocessor,xfig,
`define(`m4fshade',``$2' dnl
ifdef(`r_',`shaded rgbstring(r_,g_,b_)',`fill ifelse(`$1',,0,`$1')')')')
-ifelse(0,1,`
-ifelse(m4picprocessor,gpic,
- `define`m4fshade',`shade(ifelse(`$1',,0,`$1'),`$2')')',
-m4postprocessor,xfig,
- `define(`m4fshade',``$2' fill ifelse(`$1',,0,`$1')')',
-m4postprocessor,pdf,
- `define(`m4fshade',``$2' dnl
- ifdef(`r_',`shaded(r_,g_,b_)',`fill ifelse(`$1',,0,`$1')')')',
-m4postprocessor,svg,
- `define(`m4fshade',
- `ifdef(`r_',`rgbfill(color255(r_,g_,b_),`$2')',
- `shade(ifelse(`$1',,0,`$1'),`$2')')')',
-`define(`m4fshade',
- `ifdef(`r_',`rgbfill(r_,g_,b_,`$2')',
- `shade(ifelse(`$1',,0,`$1'),`$2')')')')
-')
`sarrow(linespec,keys)
Single-segment single-headed special arrow
keys= type=O[pen] (default)
@@ -1593,38 +1591,36 @@ define(`Cintersect',
(vscal_(sqrt(abs(m4cls*m4Cr1^2-m4cq^2))/m4cls,-m4cdy,m4cdx))')
define(`cintersect',`Cintersect($@)')
- `LCintersect(Name of line,Centre,rad,[R])
- First (second if arg4 is R) intersection
- of a line V with a circle at C:
- solves |V.start+tV-C| = r '
ifdpic(
-define(`LCintersect',
-`define(`M4LcX',`$1'.start)define(`M4LcC',`($2)')dnl
-define(`M4LcV',`(`$1'.end-M4LcX)')define(`M4LcD',`(M4LcX-M4LcC)')dnl
-define(`m4Lca',`(M4LcV.x^2+M4LcV.y^2)')dnl
-define(`m4Lcb',`(2*(M4LcV.x*M4LcD.x+M4LcV.y*M4LcD.y))')dnl
-define(`m4Lcc',`(M4LcD.x^2+M4LcD.y^2-ifelse(`$3',,circlerad,`($3)')^2)')dnl
-define(`m4Lct',
- `(-m4Lcb ifinstr(`$4',R,+,-) sqrta(m4Lcb^2-4*m4Lca*m4Lcc))/(2*m4Lca)')dnl
-(m4Lct between `$1'.start and `$1'.end)')
-
- `LEintersect(Name of line,
- Centre,ellipsewd,ellipseht, [R])
+ `LCintersect(Name of line,
+ Centre,rad,[R],[Start,End])
+ First (second if arg4 is R) intersection
+ of a line with a circle. If arg1
+ is blank then arg5 is the line start
+ position and arg6 is the end.'
+define(`LCintersect',`LEintersect(`$1',`$2',2*(`$3'),2*(`$3'),`$4',`$5',`$6')')
+
+ `LEintersect(Name of line,EllipseCentre,
+ ellipsewd,ellipseht, [R],[Start,End])
First (second if arg5 is R) intersection
- of a line (or move) and ellipse at C'
+ of a line (or move) and manhattan ellipse.
+ If arg1 is blank then arg6 is the line
+ start position and arg7 is the end.'
define(`LEintersect',
-`define(`M4LEX',`$1'.start)define(`M4LEC',`($2)')dnl
-define(`M4LEV',`(`$1'.end-M4LEX)')define(`M4LED',`(M4LEX-M4LEC)')dnl
-define(`m4LEqa',`(ifelse(`$3',,ellipsewid,`($3)')/2)')dnl
-define(`m4LEqb',`(ifelse(`$4',,ellipseht,`($4)')/2)')dnl
-define(`m4LEa',`(M4LEV.x^2/m4LEqa^2+M4LEV.y^2/m4LEqb^2)')dnl
-define(`m4LEba',`(M4LEV.x*M4LED.x/m4LEqa^2+M4LEV.y*M4LED.y/m4LEqb^2)')dnl
-define(`m4LEc',`(M4LED.x^2/m4LEqa^2+M4LED.y^2/m4LEqb^2-1)')dnl
-define(`m4LEt',
- `(-m4LEba ifinstr(`$5',R,+,-) sqrta(m4LEba^2-m4LEa*m4LEc))/m4LEa')dnl
-(m4LEt between `$1'.start and `$1'.end)')
+`pushdef(`LES',ifelse(`$1',,`$6',`$1'.start))dnl
+pushdef(`LEE',ifelse(`$1',,`$7',`$1'.end ))dnl
+pushdef(`LEV',`(LEE-LES)')dnl
+pushdef(`LEC',`(`$2'-LES)')dnl
+pushdef(`leasq',`((`$3')^2/4)')dnl
+pushdef(`lebsq',`((`$4')^2/4)')dnl
+pushdef(`leqa',`(LEV.x^2/leasq+LEV.y^2/lebsq)')dnl
+pushdef(`leqb',`(-2*LEV.x*LEC.x/leasq-2*LEV.y*LEC.y/lebsq)')dnl
+pushdef(`leqc',`(LEC.x^2/leasq+LEC.y^2/lebsq-1)')dnl
+pushdef(`leqt',
+ `((-leqb ifelse(`$5',R,+,-) sqrta(leqb^2-4*leqa*leqc))/(2*leqa))')dnl
+(LES+LEV*leqt)dnl
+popdef(`LES',`LEE',`LEV',`LEC',`leasq',`lebsq',`leqa',`leqb',`leqc',`leqt')')
)
-
`LCtangent(Pos,Center,rad,[R])
Left (right if arg4=R) tangent point of line
from Pos to circle at Center with radius arg3'
@@ -1650,9 +1646,14 @@ define(`M4LET',`LCtangent((M4LP.x/m4LEta,M4LP.y/m4LEtb),`(0,0)',1,`$5')')dnl
`langle(Start,End,[d])
Angle relative to horizontal of a line
between two points (degrees if arg3=d)'
-define(`langle',`ifelse(`$3',d,`(')dnl
+define(`langle',`ifelse(`$3',,,`(')dnl
atan2(M4Pos(`$2').y-M4Pos(`$1').y,M4Pos(`$2').x-M4Pos(`$1').x)dnl
-ifelse(`$3',d,`*rtod_`)'')')
+ifelse(`$3',,,`*rtod_`)'')')
+
+ `cangle(Start,Corner,End,[d])
+ Angle of the sector at arg2 with arm ends
+ given by arg1 and arg3 (degrees if arg4=d)'
+define(`cangle',`(langle(`$3',`$2',`$4')-langle(`$1',`$2',`$4'))')
`distance(Pos1,Pos2)' distance between positions
define(`distance',
@@ -1852,12 +1853,48 @@ define(`sinusoid',
define(`m4_t_fun',
`((`$1'+(`$3'))*(`$2')-(`$3')/tm*(sin(tm*(`$2')+w0)-sin(w0)))') ')
-define(`def_bisect',`NeedDpicTools') # This macro is obsolete
+#define(`def_bisect',`NeedDpicTools') # This macro is obsolete
- `Colour routines:'
- `graystring(value in [0,1])'
+ `Colour routines:'
+ `graystring(value in [0,1])'
define(`graystring',`rgbstring(`$1',`$1',`$1')')
+ `ColoredV(box|circle|ellipse,(r,g,b)|((colorseq)),
+ attributes)
+ box or circle or ellipse in a [] block.
+ If arg2 is blank then all formatting is in
+ arg3; if parenthesized r,g,b, the object is
+ shaded top to bottom white to the specified
+ rgb color; if a double-parenthesized colorseq
+ then the colorseq defines the internal shading
+ top to bottom. A colorseq is of the form
+ 0,r0,g0,b0,
+ frac1,r1,g1,b1,
+ frac2,r2,g2,b2,
+ ...
+ 1,rn,gn,bn
+ Examples: ColoredV(circle,(1,0,0))
+ ColoredV(ellipse,(1,0.04,1),
+ wid 0.75 ht 1 outlined "magenta" "Goodbye")
+ ColoredV(box,((0,1,1,0, 1,0,0,1)),
+ outlined "blue" rad 0.1)'
+define(`ColoredV',`[NeedDpicTools pushdef(`m4obj',ifelse(`$1',,box,`$1'))
+ C: m4obj `$3' ifsvg(,invis) # To avoid invalid svg
+ ifelse(`$2',,,`ifelse(m4obj,box,`define m4SObjLine {w = C.wid; if C.rad then {
+ if $`'1 < C.rad/C.ht then {
+ w += 2*(sqrta(C.rad^2-(C.rad-($`'1)*C.ht)^2)-C.rad)} \
+ else {if $`'1 > 1-C.rad/C.ht then {
+ w += 2*(sqrta(C.rad^2-(C.rad-(1-($`'1))*C.ht)^2)-C.rad)}} }
+ line outlined rgbstring($`'2,$`'3,$`'4) right w \
+ with .c at C.n-(0,C.ht*($`'1))}',
+ `define m4SObjLine {line outlined rgbstring($`'2,$`'3,$`'4) right \
+ C.wid*sqrt(abs(1-(1-($`'1)*2)^2)) with .c at C.n-(0,C.ht*($`'1))}')
+ ShadeObject(m4SObjLine,int(C.ht/lthick*5/4),\
+ ifelse(index(`$2',`(('),0,`patsubst(`$2',^ *`(('\|`))' *$)',
+ `0,1,1,1,1,patsubst(`$2',^ *`('\|`)' *$)')) at C')
+ m4obj ifelse(`$2',,,`m4colorfix(outlined,`$2')') `$3' with .c at C
+ `$5' popdef(`m4obj') ]')
+
`rgbstring(color triple: values in [0,1])
(example rgbstring(0.2,0.3,0.4) )
or, when allowed by the postprocessor,
@@ -1970,10 +2007,33 @@ m4postprocessor,mpost,
command sprintf("fill Y cycle withcolor (%7.5f,%7.5f,%7.5f);",`$1',`$2',`$3')
command "def drw=draw enddef; def X=;enddef; Y;"'
)')
+ Experimental, handles color for all postprocessors
+ Similar to dpictools DefineRGBColor but the result
+ is a color name
+ `definergbcolor(name,r,g,b)'
+define(`definergbcolor',
+`ifpostscript(`command \
+ sprintf("/`$1' {%7.5f %7.5f %7.5f} def",`$2',`$3',`$4')',
+`ifpdf(`define(`$1',``'`$2' `$3' `$4'`'')',
+`ifmpost(`command \
+ sprintf("color `$1'; `$1':=(%7.5f,%7.5f,%7.5f);",`$2',`$3',`$4')',
+`command \
+ sprintf("\definecolor{`$1'}{rgb}{%7.5f,%7.5f,%7.5f}%%",`$2',`$3',`$4')')')')')
+
Pstricks conditional command
define(`psset_',`ifpstricks(`dnl
command sprintf("\psset{$@}%%")
')')
+ Internal color adjustments
+ `m4colorfix(outlined|shaded,
+ "colorname"|colorname|(r,g,b),sprintf(...))'
+define(`m4colorfix',`ifelse(`$1',,,
+ `ifelse(`$2',,``$1' "grey"',index(`$2',`"'),0,``$1' `$2'',
+ index(`$2',sprintf),0,``$1' `$2'',
+ index(`$2',`('),0,``$1' rgbstring(m4ctrunc(`$2'))',
+ `$1' "`$2'")')')
+ `Delete leading ( and trailing ) '
+define(`m4ctrunc',`patsubst(`$1',^ *((\|^ *(\|) *$\|)) *$)')
Kludge for SVG color-filled line
ifsvg(
diff --git a/graphics/circuit_macros/liblog.m4 b/graphics/circuit_macros/liblog.m4
index 5f4693cd67..9c68aff0e2 100644
--- a/graphics/circuit_macros/liblog.m4
+++ b/graphics/circuit_macros/liblog.m4
@@ -1,7 +1,7 @@
divert(-1)
liblog.m4 Logic gates
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -43,6 +43,7 @@ define(`XOR_off',1) `XOR and NXOR parameter'
define(`N_diam',(3/2)) `not-circle diameter'
define(`N_rad',`(N_diam/2)') `not-circle radius'
define(`NOT_rad',`(N_rad*L_unit)') `scaled radius eg line chop NOT_rad'
+define(`N_attr') `not-circle attribs eg shaded "green"'
define(`H_ht',2) `Hysteresis symbol dimen'
define(`Mx_pins',6) `max number of gate input pins without extensions
Possibly 4 is better for negated inputs'
@@ -50,6 +51,7 @@ define(`FF_wid',12) `Bistable (flipflop)'
define(`FF_ht',18)
define(`Mux_wid',8) `Multiplexer defaults'
define(`Mux_ht',18)
+define(`Lg_body') `Gate body attributes, e.g., shaded "color"'
define(`lg_plen',4) `Logic pin'
define(`lg_pinsep',`(3*L_unit)') `logic pin separation in logic units'
@@ -71,7 +73,7 @@ define(`rsvec_',`Here+svec_(`$1',`$2')')
`NOT_circle
convenience for drawing NOT circles'
-define(`NOT_circle',`circle diam N_diam*L_unit')
+define(`NOT_circle',`circle diam N_diam*L_unit N_attr')
`LH_symbol([U|D|L|R|degrees][I])
I=inverted
@@ -92,7 +94,8 @@ define(`LT_symbol', `[ setdir_(`$1',R)
then to svec_(0,-H_ht*5/8) then to Here
`$2'; resetdir_ ] ')
- `BOX_gate(inputs,output,swid,sht,label)
+ `BOX_gate(inputs,output,swid,sht,label,
+ attributes)
drawn in the current direction
args 3 and 4 are L_unit values
inputs=[P|N]* output=P|N'
@@ -101,30 +104,31 @@ define(`m4m',`ifelse(`$1',,2,len(`$1'))')define(`m4a',`$1')dnl
define(`m4h',`ifelse(`$3',,AND_wd,`$3')')dnl
define(`m4v',`ifelse(`$4',,AND_wd,`$4')')dnl
[ Box: [Outline: line to svec_(0,m4v/2) then to svec_(m4h,m4v/2) \
- then to svec_(m4h,-m4v/2) then to svec_(0,-m4v/2) then to (0,0) ] \
+ then to svec_(m4h,-m4v/2) then to svec_(0,-m4v/2) then to (0,0) \
+ Lg_body `$6'] \
with .Outline.start at (0,0)
ifelse(`$5',,,`{ move to Box.n+(0,-5pt__)
m4lstring($5,"ifsvg(`svg_small($5,75)',`{\scriptsize$ $5 $}')") }')
IOdefs(from svec_(0,m4v/2) to svec_(0,-m4v/2),In,`$1',R)
Out: svec_(m4h,0) ifelse(`$2',N,`+svec_(N_diam,0)
N_Out: NOT_circle \
- at Out-svec_(N_rad,0)'); `$6']')
+ at Out-svec_(N_rad,0)'); `$7']')
- `AND_gate(n,[N][B],wid,ht)
+ `AND_gate(n,[N][B],[wid,[ht]],attributes)
drawn in the current direction
0 <= n <= 16; N=negated inputs, B=box shape
or
- AND_gate(chars,[B],wid,ht)
+ AND_gate(chars,[B],wid,ht,attributes)
arg1 is one or more of N|P '
define(`AND_gate',`define(`m4arg1',ifelse(`$1',,2,`$1'))dnl
ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
`m4dupstr(ifinstr(`$2',N,N,P),m4arg1,`m4PN')',`define(`m4PN',m4arg1)')dnl
ifinstr(`$2',B,
`BOX_gate(m4PN,ifinstr(`$2',N,N,P),ifelse(`$3',,,`($3)/(L_unit)'),
- ifelse(`$4',,,`($4)/(L_unit)'),ifsvg(`&```amp''';',`\&'),`$5')',
-`AND_gen(m4PN,ifelse(`$2',N,N)IBAONESEC,`$3',`$4',`$5')')')
+ ifelse(`$4',,,`($4)/(L_unit)'),ifsvg(`&```amp''';',`\&'),Lg_body `$5',`$6')',
+`AND_gen(m4PN,ifelse(`$2',N,N)IBAONESEC,`$3',`$4',Lg_body `$5',`$6')')')
- `NAND_gate(n,[N][B],wid,ht)
+ `NAND_gate(n,[N][B],[wid,[ht]],attributes)
0 <= n <= 16; N=negated inputs, B=box shape
or
NAND_gate(chars,[B],wid,ht)
@@ -134,20 +138,21 @@ ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
`m4dupstr(ifinstr(`$2',N,N,P),m4arg1,`m4PN')',`define(`m4PN',m4arg1)')dnl
ifinstr(`$2',B,
`BOX_gate(m4PN,ifelse(`$2',N,N,P),ifelse(`$3',,,`($3)/(L_unit)'),
- ifelse(`$4',,,`($4)/(L_unit)'),ifsvg(`&```amp''';',`\&'),`$5')',
-`AND_gen(m4PN,ifelse(`$2',N,N)IBANONESEC,`$3',`$4',`$5')')')
+ ifelse(`$4',,,`($4)/(L_unit)'),ifsvg(`&```amp''';',`\&'),Lg_body `$5',`$6')',
+`AND_gen(m4PN,ifelse(`$2',N,N)IBANONESEC,`$3',`$4',Lg_body `$5',`$6')')')
- `AND_gen(n,chars,[wid,[ht]])
+ `AND_gen(n,chars,[wid,[ht]],attributes)
0 <= n <= 16
B=base and straight sides; A=Arc;
[N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles,
[N]O=output; C=center location
or
- AND_gen(chars,chars,[wid,[ht]])
+ AND_gen(chars,chars,[wid,[ht]],attributes)
arg1 is one or more of N|P
eg PPPP defines 4 inputs,
NPNP negates the first and third;
- arg2 as above except [N]I is ignored '
+ arg2 as above except [N]I is ignored
+ arg5 contains body attributes '
define(`AND_gen',`define(`m4arg1',ifelse(`$1',,2,`$1'))dnl
ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
`m4dupstr(ifinstr(`$2',N,N,P),m4arg1,`m4PN')',`define(`m4PN',m4arg1)')dnl
@@ -157,11 +162,11 @@ ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
[ sc_draw(`dna_',B,`Bm: line from svec_(m4hor-m4ver/2,-m4ver/2) \
to svec_(0,-m4ver/2) \
then to svec_(0,m4ver/2) then \
- to svec_(m4hor-m4ver/2,m4ver/2)
+ to svec_(m4hor-m4ver/2,m4ver/2) Lg_body `$5'
')dnl
sc_draw(`dna_',A,`Arc: arc cw rad m4ver/2 \
to rsvec_(0,-m4ver) \
- with .c at rsvec_(0,-m4ver/2)
+ with .c at rsvec_(0,-m4ver/2) Lg_body `$5'
')dnl
sc_draw(`dna_',NNE,
`NNE: svec_(m4hor-m4ver/2,0)+svec_(Rect_(m4ver/2+N_diam,45))
@@ -202,7 +207,7 @@ ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
sc_draw(`dna_',S, `S: svec_(0,-m4ver/2)
')dnl
sc_draw(`dna_',C, `C: svec_(m4hor/2,0)')
- `$5']')
+ `$6']')
`Input locations, flat face
m4A_defs(n,[N]) or m4A_defs(string)
@@ -230,10 +235,10 @@ define(`m4A_defs',`define(`m4arg1',ifelse(`$1',,2,`$1'))dnl
`OR_gate or NOR_gate or XOR_gate or NXOR_gate
drawn in the current direction
- args = (n,[N][B],wid,ht)
+ args = (n,[N][B],wid,ht,attributes)
0 <= n <= 16; N=negated inputs, B=box shape
or
- args = (chars,[B],wid,ht)
+ args = (chars,[B],wid,ht,attributes)
arg1 is one or more of N|P '
define(`OR_gate',`m4_OR(OR,$@)')
define(`NOR_gate',`m4_OR(NOR,$@)')
@@ -244,49 +249,70 @@ define(`m4_OR',`define(`m4arg1',ifelse(`$2',,2,`$2'))dnl
ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
`m4dupstr(ifinstr(`$3',N,N,P),m4arg1,`m4PN')',`define(`m4PN',m4arg1)')dnl
ifinstr(`$3',B,
-`BOX_gate(m4PN,ifinstr(`$3',N,N,P),
+`BOX_gate(m4PN,ifinstr(`$3',N,N,P,`$6',`$7'),
ifelse(`$4',,,`($4)/(L_unit)'),ifelse(`$5',,,`($5)/(L_unit)'),
- ifinstr(`$1',XOR,`=',`ifsvg(`>=1',`\geq 1')'),`$6')',
+ ifinstr(`$1',XOR,`=',`ifsvg(`>=1',`\geq 1')'),Lg_body `$6',`$7',`$8')',
`OR_gen(m4PN,
ifinstr(`$1',XOR,P)`'ifelse(`$3',N,N)IBA`'ifelse(substr(`$1',0,1),N,N)ONESEC,
shift(shift(shift($@))))')')
- `OR_gen(n,chars,[wid,[ht]])
+ `OR_gen(n,chars,[wid,[ht]],attributes)
0 <= n <= 16
B=base and straight sides; A=Arc;
[N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles,
[N]P=XOR arc; [N]O=output; C=center
or
- OR_gen(chars,chars,[wid,[ht]])
+ OR_gen(chars,chars,[wid,[ht]],attributes)
arg1 is one or more of N|P
eg PPPP defines 4 inputs,
NPNP negates the first and third;
- arg2 as above except [N]I is ignored '
+ arg2 as above except [N]I is ignored
+ If arg5 contains shaded rgbstring(...)
+ the arguments of rgbstring may not contain
+ parentheses'
define(`OR_gen',`[define(`m4arg1',ifelse(`$1',,2,`$1'))dnl
ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
`m4dupstr(ifinstr(`$2',N,N,P),m4arg1,`m4PN')',`define(`m4PN',m4arg1)')dnl
define(`m4hor',`ifelse(`$3',,AND_wd,`($3)/(L_unit)')')define(`m4o',0)dnl
define(`m4ver',`ifelse(`$4',,ifelse(`$3',,AND_ht,AND_ht/(AND_wd)*m4hor),
`($4)/(L_unit)')')define(`dna_',ifelse(`$2',,IBAONESEC,`$2'))dnl
+ define(`m4gfill',`Lg_body `$5'')dnl
+dnl concave fill, painful code:
+ ifelse(regexp(m4gfill,`^fill \|[^a-z]fill '),-1,
+ `ifelse(regexp(m4gfill,`shaded *"'),-1,
+ `define(`m4osh',`regexp(m4gfill,`.*shaded *\(sprintf([^)]*)\).*$',\1)')
+ define(`m4att',`patsubst(m4gfill,`shaded *sprintf([^)]*)')')',
+ `define(`m4osh',`regexp(m4gfill,`.*shaded *"\([^"]*\)".*$',"\1")')
+ define(`m4att',`patsubst(m4gfill,`shaded *"[^"]*"')')')',
+ `define(`m4osh',`regexp(m4gfill,`.*fill *\([^ ]*\) .*$',`graystring(\1)')')
+ define(`m4att',`patsubst(m4gfill,`fill *[^ ]*[ $]')')')
sc_draw(`dna_',P,`define(`m4o',XOR_off*m4ver/(AND_ht))dnl
Parc: arc cw from svec_(0,m4ver/2) \
to svec_(0,-m4ver/2) \
with .c at svec_(-sqrt((OR_rad*m4ver/(AND_ht))^2-(m4ver/2)^2),0)
')dnl
sc_draw(`dna_',B,dnl
- `Bt: line from svec_(m4o+m4hor/3,m4ver/2) \
- to svec_(m4o,m4ver/2) ifdpic(chop 0 chop -hlth)
- ArcB: arc cw to svec_(m4o,-m4ver/2) \
- with .c at svec_(m4o-sqrt((OR_rad*m4ver/(AND_ht))^2-(m4ver/2)^2),0)
- Bb: line to svec_(m4o+m4hor/3,-m4ver/2) ifdpic(chop -hlth chop 0)
+ `r = OR_rad*m4ver/(AND_ht)
+ rt = sqrt(r^2-(m4ver/2)^2)
+ ifelse(m4osh,,,`for i=0 to int((r-rt)*L_unit/lthick+1) do {
+ tx = i*lthick/L_unit
+ {arc cw from svec_(tx+m4o-hlth,m4ver/2) to svec_(tx+m4o-hlth,-m4ver/2) \
+ with .c at svec_(tx+m4o-rt,0) outlined m4osh} }
+ {rotbox(m4hor/3*L_unit,m4ver*L_unit,shaded m4osh invis) with .W \
+ at svec_(m4o+r-rt,0)} ')
+ Bt: line from svec_(m4o+m4hor/3,m4ver/2) \
+ to svec_(m4o,m4ver/2) ifdpic(chop 0 chop -hlth) m4att
+ ArcB: arc cw to svec_(m4o,-m4ver/2) with .c at svec_(m4o-rt,0) m4att
+ Bb: line to svec_(m4o+m4hor/3,-m4ver/2) ifdpic(chop -hlth chop 0) m4att
')dnl
sc_draw(`dna_',A,`define(`m4m',`((m4hor*2/3)^2-(m4ver/2)^2)/(m4ver)')dnl
+ ifelse(m4osh,,,`{line invis from svec_(m4o+m4hor,0) \
+ to svec_(m4o+m4hor/3, m4ver/2) then to svec_(m4o+m4hor/3,-m4ver/2) \
+ then to svec_(m4o+m4hor,0) shaded m4osh}')
ArcN: arc cw from svec_(m4o+m4hor/3, m4ver/2) \
- to svec_(m4o+m4hor,0) \
- with .c at svec_(m4o+m4hor/3,-m4m)
+ to svec_(m4o+m4hor,0) with .c at svec_(m4o+m4hor/3,-m4m) m4gfill
ArcS: arc ccw from svec_(m4o+m4hor/3,-m4ver/2) \
- to svec_(m4o+m4hor,0) \
- with .c at svec_(m4o+m4hor/3,m4m)
+ to svec_(m4o+m4hor,0) with .c at svec_(m4o+m4hor/3,m4m) m4gfill
')dnl
sc_draw(`dna_',NNE,
`N_NNE: NOT_circle \
@@ -327,7 +353,7 @@ ifelse(ifinstr(m4arg1,N,1)`'ifinstr(m4arg1,P,1),,
sc_draw(`dna_',S, `S: svec_(m4o+m4hor/6,-m4ver/2)
')dnl
sc_draw(`dna_',C, `C: svec_(m4o+m4hor/2,0)')
- `$5']')
+ `$6']')
`Input locations, curved face
m4O_defs(n,[N]) or m4O_defs(string)
@@ -385,7 +411,8 @@ define(`IOdefs',`define(`m4dm',`ifelse(`$3',,1,len(`$3'))')
at m4dv`'m4x ifelse(`$4',R,+,-)(M4PL.x*N_rad,M4PL.y*N_rad)}')
define(`m4da',substr(m4da,1))') ')
- `BUFFER_gen(chars,wd,ht,[N|P]*,[N|P]*,[N|P]*)
+ `BUFFER_gen(chars, wd, ht,
+ [N|P]*, [N|P]*, [N|P]*, attributes)
chars: T=triangle (default),
[N]O=output location Out (NO draws circle
N_Out);
@@ -400,7 +427,7 @@ define(`BUFFER_gen',
[sc_draw(`dna_',T,`Tm: line from svec_(m4h,0) \
to svec_(0,-m4v/2) \
then to svec_(0,m4v/2) \
- then to svec_(m4h,0)
+ then to svec_(m4h,0) Lg_body `$7'
Tc: svec_(m4h/2,0)
')dnl
sc_draw(`dna_',NNE,`N_NNE: NOT_circle \
@@ -444,10 +471,10 @@ define(`BUFFER_gen',
ifelse(`$4',,,`IOdefs(from svec_(0,m4v/2) to svec_(0,-m4v/2),In,`$4',R)')
ifelse(`$5',,,`IOdefs(from svec_(0,m4v/2) to svec_(m4h,0),NE,`$5')')
ifelse(`$6',,,`IOdefs(from svec_(0,-m4v/2) to svec_(m4h,0),SE,`$6',R)')
- `$7']')
+ `$8']')
- `BUFFER_gate(linespec,[N|B],wid,ht,
- [N|P]*,[N|P]*)
+ `BUFFER_gate(linespec, [N|B], wid, ht,
+ [N|P]*, [N|P]*, attributes)
When linespec is blank then the element is
composite and In1, Out, C, NE, and SE are
defined; otherwise the element is drawn as
@@ -457,16 +484,18 @@ define(`BUFFER_gen',
sequences'
define(`BUFFER_gate',`ifinstr(`$2',B,
`BOX_gate(ifinstr(`$2',N,N,P),P,ifelse(`$3',,,`($3)/(L_unit)'),
- ifelse(`$4',,,`($4)/(L_unit)'),1,`$5')',
+ ifelse(`$4',,,`($4)/(L_unit)'),1,`$5',Lg_body `$7')',
`ifelse(`$1',,
- `BUFFER_gen(ifelse(`$2',N,N)ITOCNESE,`$3',`$4',,`$5',`$6',`$7')',
+ `BUFFER_gen(ifelse(`$2',N,N)ITOCNESE,`$3',`$4',,`$5',`$6',
+ Lg_body `$7',`$8')',
`eleminit_(`$1')
- { BUFFER_gen(ifelse(`$2',N,N)ITOC,`$3',`$4',,`$5',`$6',`$7') \
+ { BUFFER_gen(ifelse(`$2',N,N)ITOC,`$3',`$4',,`$5',`$6',Lg_body `$7',`$8') \
with .Tc at last line.c }
{ line to last [].In1; line from last [].Out to 2nd last line.end }
line invis to rvec_(rp_len,0)')')')
- `NOT_gate(linespec,[B][N|n],wid,ht)
+ `NOT_gate(linespec, [B][N|n], wid, ht,
+ attributes)
When linespec is blank then the element is
composite and In1, Out, C, NE, and SE are
defined; otherwise the element is drawn as
@@ -475,17 +504,19 @@ define(`BUFFER_gate',`ifinstr(`$2',B,
output, n=negated input only'
define(`NOT_gate',`ifinstr(`$2',B,
`BOX_gate(ifinstr(`$2',N,N,`$2',n,N,P),ifinstr(`$2',n,P,N),
- ifelse(`$3',,,`($3)/(L_unit)'),ifelse(`$4',,,`($4)/(L_unit)'),1,`$5')',
+ ifelse(`$3',,,`($3)/(L_unit)'),ifelse(`$4',,,`($4)/(L_unit)'),1,
+ Lg_body `$5',`$6')',
`ifelse(`$1',,
`BUFFER_gen(ifinstr(`$2',N,N,`$2',n,N)IT`'ifinstr(`$2',n,,N)OCNESE,
- `$3',`$4',,,,`$5')',
+ `$3',`$4',,,,Lg_body `$5',`$6')',
`eleminit_(`$1')
{ BUFFER_gen(ifinstr(`$2',N,N,`$2',n,N)IT`'ifinstr(`$2',n,,N)OC,
- `$3',`$4',,,,`$5') \
+ `$3',`$4',,,,Lg_body `$5',`$6') \
with .C at last line.c }
{ line to last [].In1; line from last [].Out to 2nd last line.end }
line invis to rvec_(rp_len,0)')')')
+###############################
`The comprehensive logic pin:
lg_pin(location, label, Picname, n|e|s|w [L|M|I|O][N][E], pinno, optlen)
label=text (indicating logical pin function, usually)
@@ -527,7 +558,8 @@ define(`lg_pin',`ifelse(`$1',,,`move to $1')
define(`lp_xy',`vrot_(`$1',`$2',m4lph,m4lpv)')
`Mux(ni, label,
- [L][B|H|X][N[n]|S[n]][[N]OE],wid,ht)
+ [L][B|H|X][N[n]|S[n]][[N]OE],
+ wid, ht, attributes)
ni = number of inputs (default 2)
The input pins are lines named
In0, In1, ... In<ni-1>
@@ -552,7 +584,8 @@ define(`Mux',`[
SW: svec_(0,-m4Mht/2)
NE: svec_(m4Mwid,m4Mht/2-2)
SE: svec_(m4Mwid,-m4Mht/2+2)
- line from W to NW then to NE then to SE then to SW then to W
+ Line: line from W to NW then to NE then to SE then to SW then to W \
+ Lg_body`$6'
ifelse(`$2',,,`"ifsvg(`svg_small($2,75)',`\scriptsize $2')" at C')
lg_pin(E,,Out,e)
define(`m4Mdna',`$3')define(`m4MOE')dnl
@@ -584,10 +617,11 @@ define(`Mux',`[
`ifelse(m4MN,X,,`ifelse(m4MOE,N,lg_bartxt(OE),OE)')'),
ifelse(m4MNO,,In`'decr(m4x),ifelse(m4MOE,N,N)OE),
w`'ifelse(m4MNO,,,ifelse(m4MOE,N,N)))')
- `$6']')
+ `$7']')
`Demux(no, label,
- [L][B|H|X][N[n]|S[n]][[N]OE],wid,ht)
+ [L][B|H|X][N[n]|S[n]][[N]OE],
+ wid, ht, attributes)
no = number of outputs (default 2)
The output pins are lines named
Out0, Out1, ... Out<ni-1>
@@ -611,7 +645,8 @@ define(`Demux',`[
SW: svec_(0,-m4Dht/2+2)
NE: svec_(m4Dwid,m4Dht/2)
SE: svec_(m4Dwid,-m4Dht/2)
- line from W to NW then to NE then to SE then to SW then to W
+ Line: line from W to NW then to NE then to SE then to SW then to W \
+ Lg_body `$6'
ifelse(`$2',,,`"ifsvg(`svg_small($2,75)',`\scriptsize $2')" at C')
# lg pin(location, label, Picname, n|e|s|w [L|M|I|O][N][E], pinno, optlen)
lg_pin(W,,In,w)
@@ -645,7 +680,7 @@ define(`Demux',`[
ifelse(m4DOE,,,`ifelse(m4DOE,N,
`lg_pin(svec_(0,m4Dht*(0.5+(1-m4Dn)/m4Dn)),lg_bartxt(OE),NOE,wN)',
`lg_pin(svec_(0,m4Dht*(0.5+(1-m4Dn)/m4Dn)),OE,OE,w)')')
- `$6']')
+ `$7']')
###########################################################################
AutoGate allowable functions (plus the ~ operator)
@@ -677,6 +712,7 @@ define(`autovsep',`L_unit') # vertical separation between input gates
Draw the gate with input sublayer Sg containing
gates G1, G2, ...
+ Example: `AutoGate(AND,$@)'
define(`AutoGate',`[
lu = L_unit define(`m4dirt',m4_dir_)
dnl Count the arguments (inputs) (could use $# )
@@ -776,6 +812,7 @@ define(`DrawInNotIn',`
InNt`'$1: Here; m4xpand(m4dirt`'_)
')
+ifelse(0,1,`
dnl `Autologic(Boolean function, ****Obsolete
dnl [N[oconnect]][L[eftinputs]][R][V][;offset=val])'
@@ -786,6 +823,7 @@ dnl [N[oconnect]][L[eftinputs]][R][V][;offset=val])'
define(`Autologic',
`print `"*** Circuit_macros warning: Autologic is obsolete; use Autologix"'
Autologix($@)')
+')
############################
`Autologix(FunctionSpec;FunctionSpec;... ,
@@ -793,27 +831,28 @@ define(`Autologic',
[N[oconnect]]
[L[eftinputs]]
[R][V]
- [;offset=val])
+ [;offset=val],
+ fill spec)
FunctionSpec =
Boolean-fn(args) [@ location attribute]'
` e.g. HalfAdder: Autologix(Xor(x,y);And(x,y),LVR)
Drawing single gates is not enough; more general Boolean expressions
- in function notation can be drawn automatically. This macro draws
+ in function notation should be drawn automatically. This macro draws
one or more trees of gates with the output or outputs
(roots) to the right (on the left if the M[irror] option is used).
The predefined functions are And, Or, Not, Nand, Nor, Xor, Nxor,
and Buffer, and may be nested; e.g., Or(And(x,~y),And(~x,y)).
Function notation does not model internal connections such as
- feedback. However, internal nodes can be accessed.
+ feedback. However, internal nodes are labelled for later access.
The exact appearance of a tree depends on the order in which
terms and variables appear in the expressions. Gates can be placed
relative to previously drawn objects using the @ location construct;
e.g. @with .nw at last [].sw+(0,-dimen_).
- Autologix locates the distinct input variables (with NOT gates for
- variables preceded by ~) in a row or column and connects them to
+ Autologix locates the distinct input variables (with variables preceded
+ by ~ given NOT gates) in a row or column and connects them to
the internal gates. If x1 (for example) appears as a variable,
then the corresponding input location is Inx1.
@@ -826,10 +865,9 @@ define(`Autologic',
In1, In2, ...
Placing inputs in a column on the left using the L option introduces
- graphic complexity that is incompletely handled. Hand tuning
- may be required for complex expressions; putting offset=value in
- arg2 shifts the array of inputs. Time will tell whether this can
- be improved.
+ graphic complexity. Therefore, hand tuning may be required for
+ complex expressions; putting offset=value in arg2 shifts the array
+ of inputs. Time will tell whether this can be improved.
Arbitrary subcircuits with inputs In1, In2, ... on the left and at
least one output Out on the right can be included (see the example
@@ -858,6 +896,7 @@ dnl Separate functions from position attributes
`pushdef(`m4BooleanFn',substr(m4BooleanR,m4xi))dnl
pushdef(`m4posattr')')dnl
')dnl
+ pushdef(`Lg_body',`$3')
dnl Sublayer of functions, outputs Out1, Out2,..
pushdef(`m4Path',ifelse(m4Path,,,m4Path.)Fx)
Fx: [ define(`m4fno',0)dnl
@@ -956,10 +995,11 @@ dnl
`m4AutoConnex(Fx,`m4InNames',ifdef(`m4LI',`ifinstr(`$2',V,Top,Bot)',Bot))')
stackexec_(`m4TAL',,
`define(`m4bn',basename_(m4TAL))undefine(Bot`'m4bn)undefine(Top`'m4bn)')
+ popdef(`Lg_body')dnl
# Define the outputs
ifelse(m4nbf,1,`Out: Fx.Out')
for_(1,m4nbf,1,`Out`'m4x: Fx.Out`'m4x')
- `$3' `# End Autologix'
+ `$4' `# End Autologix'
] ')
define(`m4AutoConnex',`define(`m4cx',0)dnl
@@ -1025,7 +1065,7 @@ define(`FlipFlop',`ifelse(
N=pin with not circle; E=edge trigger
Optional arg7 is the length of pins'
define(`FlipFlopX',`[
- Chip: box wid_ FF_wid*L_unit ht_ FF_ht*L_unit `$1'
+ Chip: box wid_ FF_wid*L_unit ht_ FF_ht*L_unit Lg_body `$1'
dnl Center label
ifelse(`$2',,,"ifsvg(`svg_small($2,75)',`\scriptsize $2')" at Chip.c)
ifelse(`$7',,,`pushdef(`lg_plen',(`$7')/L_unit)')dnl
diff --git a/graphics/circuit_macros/mfpic.m4 b/graphics/circuit_macros/mfpic.m4
index 6fde5de528..aa24fb7d34 100644
--- a/graphics/circuit_macros/mfpic.m4
+++ b/graphics/circuit_macros/mfpic.m4
@@ -1,7 +1,7 @@
divert(-1)
mfpic.m4 Initialization for mfpic.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/mpost.m4 b/graphics/circuit_macros/mpost.m4
index 21fb7c01c9..d6e0f1ed59 100644
--- a/graphics/circuit_macros/mpost.m4
+++ b/graphics/circuit_macros/mpost.m4
@@ -1,7 +1,7 @@
divert(-1)
mpost.m4 Initialization for metapost.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -22,7 +22,7 @@ define(`linethick_',`linethick = ifelse(`$1',,`0.8',`$1')
arrowwid = ifelse(`$1',,`0.05',linethick/16)*scale; dnl
arrowht = ifelse(`$1',,`0.1',linethick/8)*scale;')
- Define some primary colors
+ xcolor predefined colors
define(`defineRGBprimaries',`
define(`white',`(1,1,1)')dnl
define(`lightgrey',`(0.75,0.75,0.75)')dnl
@@ -38,6 +38,14 @@ define(`blue',`(0,0,1)')dnl
define(`cyan',`(0,1,1)')dnl
define(`magenta',`(1,0,1)')dnl
define(`yellow',`(1,1,0)')dnl
+define(`brown',`(0.59,0.29,0)')dnl
+define(`lime',`(0.8,1,0)')dnl
+define(`olive',`(0.5,0.5,0)')dnl
+define(`orange',`(1,0.5,0)')dnl
+define(`pink',`(1,0.75,0.8)')dnl
+define(`purple',`(0.5,0,0.5)')dnl
+define(`teal',`(0,0.5,0.5)')dnl
+define(`violet',`(0.56,0,1)')dnl
')
divert(0)dnl
diff --git a/graphics/circuit_macros/pdf.m4 b/graphics/circuit_macros/pdf.m4
index 685dc5e93d..375c41e4a5 100644
--- a/graphics/circuit_macros/pdf.m4
+++ b/graphics/circuit_macros/pdf.m4
@@ -1,7 +1,7 @@
divert(-1)
pdf.m4 Initialization for pdf output.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -27,8 +27,7 @@ define(`resetrgb',`popdef(`m4cl_')popdef(`r_')popdef(`g_')popdef(`b_')dnl
define(`rgbdraw',`setrgb(`$1',`$2',`$3')
shift(shift(shift($@)))
resetrgb')
-
- Define some primary colors
+ xcolor predefined colors
define(`defineRGBprimaries',`
define(`white',`1 1 1')dnl
define(`lightgrey',`0.75 0.75 0.75')dnl
@@ -43,7 +42,15 @@ define(`green',`0 1 0')dnl
define(`blue',`0 0 1')dnl
define(`cyan',`0 1 1')dnl
define(`magenta',`1 0 1')dnl
-define(`yellow',`1 1 0') ')
+define(`yellow',`1 1 0')dnl
+define(`brown',`0.59 0.29 0')dnl
+define(`lime',`0.8 1 0')dnl
+define(`olive',`0.5 0.5 0')dnl
+define(`orange',`1 0.5 0')dnl
+define(`pink',`1 0.75 0.8')dnl
+define(`purple',`0.5 0 0.5')dnl
+define(`teal',`0 0.5 0.5')dnl
+define(`violet',`0.56 0 1') ')
define(`thinlines_',`linethick = 0.4
arrowwid = 0.04*scale; arrowht = 0.2/3*scale;')
diff --git a/graphics/circuit_macros/pgf.m4 b/graphics/circuit_macros/pgf.m4
index 2bdbef1550..4ffc956930 100644
--- a/graphics/circuit_macros/pgf.m4
+++ b/graphics/circuit_macros/pgf.m4
@@ -1,7 +1,7 @@
divert(-1)
pgf.m4 Initialization for Tikz-pgf.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/postscript.m4 b/graphics/circuit_macros/postscript.m4
index 42d546fb0c..033e753d2d 100644
--- a/graphics/circuit_macros/postscript.m4
+++ b/graphics/circuit_macros/postscript.m4
@@ -1,7 +1,7 @@
divert(-1)
postscript.m4 Initialization for Postscript output.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -41,7 +41,7 @@ define(`rgbfill',
`Top-level test for comma'
define(`ifm4_rgbtestcomma',`ifinstr(`$1',`,',`$2',`$3')')
- Define some primary colors
+ xcolor predefined colors
define(`defineRGBprimaries',`
command "/white {1 1 1} def
/lightgrey {0.75 0.75 0.75} def
@@ -56,7 +56,15 @@ command "/white {1 1 1} def
/blue {0 0 1} def
/cyan {0 1 1} def
/magenta {1 0 1} def
-/yellow {1 1 0} def"')
+/yellow {1 1 0} def
+/brown {0.59 0.29 0} def
+/lime {0.8 1 0} def
+/olive {0.5 0.5 0} def
+/orange {1 0.5 0} def
+/pink {1 0.75 0.8} def
+/purple {0.5 0 0.5} def
+/teal {0 0.5 0.5} def
+/violet {0.56 0 1} def"')
define(`thinlines_',`linethick = 0.4
arrowwid = 0.04*scale; arrowht = 0.2/3*scale
diff --git a/graphics/circuit_macros/psfrag.m4 b/graphics/circuit_macros/psfrag.m4
index e05909a327..86956e45b4 100644
--- a/graphics/circuit_macros/psfrag.m4
+++ b/graphics/circuit_macros/psfrag.m4
@@ -2,7 +2,7 @@ divert(-1)
psfrag.m4 Initialization for dpic -f processing:
Postscript with psfrag strings
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/pstricks.m4 b/graphics/circuit_macros/pstricks.m4
index 1da2497e56..7012c2c9b3 100644
--- a/graphics/circuit_macros/pstricks.m4
+++ b/graphics/circuit_macros/pstricks.m4
@@ -1,7 +1,7 @@
divert(-1)
pstricks.m4 Initialization for PSTricks.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
diff --git a/graphics/circuit_macros/svg.m4 b/graphics/circuit_macros/svg.m4
index f545debb23..30d832a9ea 100644
--- a/graphics/circuit_macros/svg.m4
+++ b/graphics/circuit_macros/svg.m4
@@ -1,7 +1,7 @@
divert(-1)
svg.m4 Initialization for svg output.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *
@@ -159,57 +159,60 @@ define(`m4mx',`max(m4numx,m4denx)')dnl
define(`svg_hat',`<tspan>svg_circ</tspan><tspan dx=\"-0.9ex\">`$1'</tspan>')
+define(`svg_Delta',`svg_symbol(&`#'916;)')
+define(`svg_Gamma',`svg_symbol(&`#'915;)')
+define(`svg_Lambda',`svg_symbol(&`#'923;)')
+define(`svg_Omega',`svg_symbol(&`#'937;)')
+define(`svg_Phi',`svg_symbol(&`#'934;)')
+define(`svg_Pi',`svg_symbol(&`#'928;)')
+define(`svg_Psi',`svg_symbol(&`#'936;)')
+define(`svg_Sigma',`svg_symbol(&`#'931;)')
+define(`svg_Theta',`svg_symbol(&`#'920;)')
+define(`svg_Xi',`svg_symbol(&`#'926;)')
define(`svg_alpha',`svg_symbol(&`#'945;)')
+define(`svg_backsl',`svg_symbol(&`#'92;)')
define(`svg_beta',`svg_symbol(&`#'946;)')
define(`svg_chi',`svg_symbol(&`#'967;)')
+define(`svg_circ',`svg_symbol(&`#'710;)')
define(`svg_comma',`svg_symbol(&`#'44;)')
-define(`svg_Delta',`svg_symbol(&`#'916;)')
+define(`svg_deg',`svg_symbol(&`#'176;)')
define(`svg_delta',`svg_symbol(&`#'948;)')
+define(`svg_emsp',`svg_symbol(&`#'8195;)')
+define(`svg_ensp',`svg_symbol(&`#'8194;)')
define(`svg_epsilon',`svg_symbol(&`#'949;)')
+define(`svg_equiv',`svg_symbol(&`#'8801;)')
define(`svg_eta',`svg_symbol(&`#'951;)')
-define(`svg_Gamma',`svg_symbol(&`#'915;)')
define(`svg_gamma',`svg_symbol(&`#'947;)')
+define(`svg_geq',`svg_symbol(&`#'8805;)')
+define(`svg_grave',`svg_symbol(&`#'96;)')
+define(`svg_gt',`svg_symbol(&`#'62;)')
define(`svg_iota',`svg_symbol(&`#'953;)')
define(`svg_kappa',`svg_symbol(&`#'954;)')
-define(`svg_Lambda',`svg_symbol(&`#'923;)')
define(`svg_lambda',`svg_symbol(&`#'955;)')
+define(`svg_leq',`svg_symbol(&`#'8804;)')
+define(`svg_lparen',`svg_symbol(&`#'40;)')
+define(`svg_lt',`svg_symbol(&`#'60;)')
define(`svg_micro',`svg_symbol(&`#'956;`$1')')
define(`svg_mu',`svg_symbol(&`#'956;)')
define(`svg_nu',`svg_symbol(&`#'957;)')
define(`svg_ohm',`svg_symbol(&`#'937;)')
-define(`svg_Omega',`svg_symbol(&`#'937;)')
define(`svg_omega',`svg_symbol(&`#'969;)')
-define(`svg_Phi',`svg_symbol(&`#'934;)')
define(`svg_phi',`svg_symbol(&`#'966;)')
-define(`svg_Pi',`svg_symbol(&`#'928;)')
define(`svg_pi',`svg_symbol(&`#'960;)')
-define(`svg_Psi',`svg_symbol(&`#'936;)')
+define(`svg_pound',`svg_symbol(&`#'35;)')
+define(`svg_prime',`svg_symbol(&`#'8242;)')
define(`svg_psi',`svg_symbol(&`#'968;)')
define(`svg_rho',`svg_symbol(&`#'961;)')
-define(`svg_Sigma',`svg_symbol(&`#'931;)')
+define(`svg_rparen',`svg_symbol(&`#'41;)')
define(`svg_sigma',`svg_symbol(&`#'963;)')
define(`svg_tau',`svg_symbol(&`#'964;)')
-define(`svg_Theta',`svg_symbol(&`#'920;)')
define(`svg_theta',`svg_symbol(&`#'952;)')
+define(`svg_thinsp',`svg_symbol(&`#'8201;)')
+define(`svg_tilde',`svg_symbol(&`#'126;)')
define(`svg_upsilon',`svg_symbol(&`#'965;)')
-define(`svg_Xi',`svg_symbol(&`#'926;)')
+define(`svg_uscore',`svg_symbol(&`#'95;)')
define(`svg_xi',`svg_symbol(&`#'958;)')
define(`svg_zeta',`svg_symbol(&`#'950;)')
-define(`svg_lt',`svg_symbol(&`#'60;)')
-define(`svg_gt',`svg_symbol(&`#'62;)')
-define(`svg_leq',`svg_symbol(&`#'8804;)')
-define(`svg_geq',`svg_symbol(&`#'8805;)')
-define(`svg_prime',`svg_symbol(&`#'8242;)')
-define(`svg_grave',`svg_symbol(&`#'96;)')
-define(`svg_ensp',`svg_symbol(&`#'8194;)')
-define(`svg_emsp',`svg_symbol(&`#'8195;)')
-define(`svg_thinsp',`svg_symbol(&`#'8201;)')
-define(`svg_backsl',`svg_symbol(&`#'92;)')
-define(`svg_pound',`svg_symbol(&`#'35;)')
-define(`svg_circ',`svg_symbol(&`#'710;)')
-define(`svg_deg',`svg_symbol(&`#'176;)')
-define(`svg_equiv',`svg_symbol(&`#'8801;)')
-define(`svg_tilde',`svg_symbol(&`#'126;)')
')
define(`svgcolor',`sprintf("rgb(%g,%g,%g)",\
diff --git a/graphics/circuit_macros/xfig.m4 b/graphics/circuit_macros/xfig.m4
index 8a00a9368e..b437249f14 100644
--- a/graphics/circuit_macros/xfig.m4
+++ b/graphics/circuit_macros/xfig.m4
@@ -1,7 +1,7 @@
divert(-1)
xfig.m4 Initialization for xfig.
-* Circuit_macros Version 10.4, copyright (c) 2023 J. D. Aplevich under *
+* Circuit_macros Version 10.5, copyright (c) 2024 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 *