summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples')
-rw-r--r--graphics/circuit_macros/examples/Alogix.m428
-rw-r--r--graphics/circuit_macros/examples/CanLogic.m444
-rw-r--r--graphics/circuit_macros/examples/Diodes.m44
-rw-r--r--graphics/circuit_macros/examples/Makefile3
-rw-r--r--graphics/circuit_macros/examples/Mixer.m46
-rw-r--r--graphics/circuit_macros/examples/UNO.m42
-rw-r--r--graphics/circuit_macros/examples/Views.dms5
-rw-r--r--graphics/circuit_macros/examples/control.m48
-rw-r--r--graphics/circuit_macros/examples/dpv/CanLogicDPV.m444
-rw-r--r--graphics/circuit_macros/examples/dpv/UNODPV.m42
-rw-r--r--graphics/circuit_macros/examples/dpv/examplesDPV.htmx10
-rw-r--r--graphics/circuit_macros/examples/dpv/examplesDPVs.htmx11
-rw-r--r--graphics/circuit_macros/examples/dpv/sfgDPV.m46
-rw-r--r--graphics/circuit_macros/examples/dpv/tstDPV.htmx11
-rw-r--r--graphics/circuit_macros/examples/examples.pdfbin1903610 -> 1902473 bytes
-rw-r--r--graphics/circuit_macros/examples/extras/README_extras18
-rw-r--r--graphics/circuit_macros/examples/extras/Y14-5_example.m453
-rw-r--r--graphics/circuit_macros/examples/files.tex3
-rw-r--r--graphics/circuit_macros/examples/keyboard.pdfbin118060 -> 0 bytes
-rw-r--r--graphics/circuit_macros/examples/mf/cct.mf2
-rw-r--r--graphics/circuit_macros/examples/mpost/Makefile19
-rw-r--r--graphics/circuit_macros/examples/sfg.m48
-rw-r--r--graphics/circuit_macros/examples/shadowed.m41
-rw-r--r--graphics/circuit_macros/examples/xfig/xfiglib.fig2
-rw-r--r--graphics/circuit_macros/examples/xtras61
25 files changed, 141 insertions, 210 deletions
diff --git a/graphics/circuit_macros/examples/Alogix.m4 b/graphics/circuit_macros/examples/Alogix.m4
index 1bafd90681..fd586869b7 100644
--- a/graphics/circuit_macros/examples/Alogix.m4
+++ b/graphics/circuit_macros/examples/Alogix.m4
@@ -28,28 +28,26 @@ B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N) \
"{\sf\small\sl B.In5}" at B.In5+(0,-1.5bp__) rjust
# Here is how to include an arbitrary circuit
+# (an SR-flipflop, for example)
# that is not one of the standard gates.
# First, define the circuit with a name ending
-# in _gate. Make sure its inputs are on the left
-# and named In1, In2, ... and the output Out
-# is on the right.
-define(`SR_gate',`[
+# in _gate. Put its inputs named In1, In2, ...
+# on the left and the output Out on the right.
+define(`SR_gate',`[ v = 2*L_unit
S: NOR_gate
- R: NOR_gate at S+(0,-L_unit*(AND_ht+4))
- w = (S.Out.x-R.In1.x)/3
- v = 2*L_unit
- line right_ dimen_/2 from S.Out
+ line right_ 4*L_unit from S.Out
Out: Here
- TR: R.In1-(v,0)
- line from S.Out+(v,0) down w*3/2 then left S.Out.x-TR.x+v down w \
- then to TR then to R.In1
- TS: S.In2-(v,0);
- line from R.Out right v then up w*3/2 then left R.Out.x-TS.x+v up w \
- then to TS then to S.In2
+ R: NOR_gate at S+(0,-10*L_unit)
+ TS: S.In2-(v,0)
+ TR: (TS,R.In1)
+ dot(at S.Out+(v,0))
+ line down v*3/2 then to TR+(0,v) then to TR then to R.In1
+ line from R.Out right v then up v*3/2 then to TS+(0,-v) \
+ then to TS then to S.In2
In1: S.In1
In2: R.In2 ]')
# Now define the function by which the circuit
-# will be invoked:
+# will be invoked using the built-in _AutoGate:
define(`SRff',`_AutoGate(SR,$@)')
# You are done. Here is an example:
diff --git a/graphics/circuit_macros/examples/CanLogic.m4 b/graphics/circuit_macros/examples/CanLogic.m4
index 88e2646928..5b809d9e6f 100644
--- a/graphics/circuit_macros/examples/CanLogic.m4
+++ b/graphics/circuit_macros/examples/CanLogic.m4
@@ -25,18 +25,18 @@ define(`CanLogic',
`define(`terms',`shift(shift(shift(shift($@))))')
# Determine required input variables and negated
# variables
- Loopover_(`t_',`varloop(`v_',`define(X`'v_)',`define(XN`'v_)',t_)',terms)
+ Loopover_(`t_',`CLvarloop(`v_',`define(X`'v_)',`define(XN`'v_)',t_)',terms)
# Draw the inputs with NOT gates as necessary
PrevInput: Here-(inputsep,0)
- Loopover_(`t_',`varloop(`v_',
- `ifdef(D`'v_,,`ifdef(XN`'v_,`DrawInNotIn(v_)',`DrawIn(v_)')')',
- `ifdef(D`'v_,,`ifdef(X`'v_,`DrawInNotIn(v_)',`DrawNotIn(v_)')')', t_)',
+ Loopover_(`t_',`CLvarloop(`v_',
+ `ifdef(D`'v_,,`ifdef(XN`'v_,`CLDrawInNotIn(v_)',`CLDrawIn(v_)')')',
+ `ifdef(D`'v_,,`ifdef(X`'v_,`CLDrawInNotIn(v_)',`CLDrawNotIn(v_)')')', t_)',
terms)
# Draw 2nd-layer gates
right_
LastGateSE: PrevInput+(5*jog,-(AND_wd*L_unit*1.5)) dnl
Loopover_(`t_',
- `define(`termcount',m4Lx)DrawLayerGate(G`'termcount,$1,$2,t_)',
+ `define(`termcount',m4Lx)CLDrawLayerGate(G`'termcount,$1,$2,t_)',
terms)
# Draw output gate
linethick = gatelineth
@@ -45,26 +45,26 @@ define(`CanLogic',
Out: Here
linethick = lineth
# Connect 2nd-layer gates to the output gate
- VectorConnect(G,termcount,OP)
+ CLVectorConnect(G,termcount,OP)
# Connect the inputs and negated inputs to
# 2nd-layer gates
- Loopover_(`t_',`ConnectInputs(G`'m4Lx,t_)',terms)
+ Loopover_(`t_',`CLConnectInputs(G`'m4Lx,t_)',terms)
# Clean up
- Loopover_(`t_',`DeleteLogDefs(t_)',terms)
+ Loopover_(`t_',`CLDeleteLogDefs(t_)',terms)
')
- `VectorConnect(number of 2nd layer gates,
+ `CLVectorConnect(number of 2nd layer gates,
common 2nd layer gate name,
output gate name)
Connect the 2nd-layer gate outputs to the
output gate inputs'
-define(`VectorConnect',
+define(`CLVectorConnect',
`for_(1,`$2',1,
`line from `$1'm4x.Out right `$3'.In1.x-`$1'm4x.Out.x \
- jog/2*(`$2'+1-abs(2*m4x-`$2'-1)) \
then down `$1'm4x.Out.y - `$3'.In`'m4x.y then to `$3'.In`'m4x ')')
Draw and label a non-inverted input
-define(`DrawIn',
+define(`CLDrawIn',
`PrevInput: PrevInput+(inputsep,0)
In`'$1: PrevInput
"$$1$" ljust at PrevInput # Maybe labels should be done externally
@@ -72,7 +72,7 @@ define(`DrawIn',
define(D`'$1)')
Draw and label an inverted input
-define(`DrawNotIn',
+define(`CLDrawNotIn',
`PrevInput: PrevInput+(inputsep,0)
In`'$1: PrevInput
"$$1$" ljust at PrevInput # Maybe labels should be done externally
@@ -84,7 +84,7 @@ define(`DrawNotIn',
define(D`'$1)')
Draw and label an input that is required both
inverted and uninverted.
-define(`DrawInNotIn',
+define(`CLDrawInNotIn',
`PrevInput: PrevInput+(inputsep,0)
In`'$1: PrevInput
"$$1$" ljust at PrevInput # Maybe labels should be done externally
@@ -97,23 +97,23 @@ define(`DrawInNotIn',
linethick = lineth
InNt`'$1: Here
define(D`'$1)')
- `varloop(`var',ifnotnegated,ifnegated,term)
+ `CLvarloop(`var',ifnotnegated,ifnegated,term)
Loop over term variables performing actions'
-define(`varloop',`ifelse(`$4',,,substr(`$4',0,1),~,
+define(`CLvarloop',`ifelse(`$4',,,substr(`$4',0,1),~,
`define(`$1',substr($4,1,1)) $3
- varloop(`$1',`$2',`$3',substr($4,2))',
+ CLvarloop(`$1',`$2',`$3',substr($4,2))',
`define(`$1',substr($4,0,1)) $2
- varloop(`$1',`$2',`$3',substr($4,1))')')')
+ CLvarloop(`$1',`$2',`$3',substr($4,1))')')')
Count gate inputs and mark last appearance
-define(`Countinputs',`varloop(`v_',
+define(`CLCountinputs',`CLvarloop(`v_',
`define(`incount',incr(incount)) define(Last`'v_,`$1')',
`define(`incount',incr(incount)) define(LastN`'v_,`$1')',$2)')
Draw a 2nd layer gate
-define(`DrawLayerGate',
+define(`CLDrawLayerGate',
`define(`incount',0) dnl
- Countinputs($1,$4) dnl
+ CLCountinputs($1,$4) dnl
ifelse(incount,1,
`LastGateSE: LastGateSE-(0,jog)
$1: [ In1:Here; line right AND_wd*L_unit; Out: Here] \
@@ -124,7 +124,7 @@ define(`DrawLayerGate',
linethick = lineth ')')
Connect this gate to its input lines
-define(`ConnectInputs',`define(`innum',0) varloop(`v_',
+define(`CLConnectInputs',`define(`innum',0) CLvarloop(`v_',
`define(`innum',incr(innum))
line from `$1'.In`'innum to (In`'v_,`$1'.In`'innum)dnl
ifelse(`$1',m4xpand(Last`'v_),`then to In`'v_',`; dot')',
@@ -134,7 +134,7 @@ define(`ConnectInputs',`define(`innum',0) varloop(`v_',
Delete definitions to allow more than one
circuit per diagram
-define(`DeleteLogDefs',`varloop(`v_',
+define(`CLDeleteLogDefs',`CLvarloop(`v_',
`undefine(Last`'v_) undefine(D`'v_) undefine(X`'v_)',
`undefine(LastN`'v_) undefine(D`'v_) undefine(XN`'v_)',$1)')
diff --git a/graphics/circuit_macros/examples/Diodes.m4 b/graphics/circuit_macros/examples/Diodes.m4
index bb34913822..f9fb94cdd2 100644
--- a/graphics/circuit_macros/examples/Diodes.m4
+++ b/graphics/circuit_macros/examples/Diodes.m4
@@ -45,9 +45,9 @@ movewid = 2pt__
{ {diode(,Z,RE) ; move ; "`{\tt diode(,Z,RE)}'" ljust}
move down 0.30; right_
{diode(,U) ; move ; "`{\tt diode(,U)}'" ljust}
- move down 0.25; right_
+ move down 0.15; right_
{diode(,T) ; move ; "`{\tt diode(,T)}'" ljust}
- move down 0.20; right_
+ move down 0.30; right_
{diode(,P) ; move ; "`{\tt diode(,P)}'" ljust}
move down 0.30; right_
{diode(,LE) ; move ; "`{\tt diode(,LE)}'" ljust}
diff --git a/graphics/circuit_macros/examples/Makefile b/graphics/circuit_macros/examples/Makefile
index b6ccbe2942..f3444395af 100644
--- a/graphics/circuit_macros/examples/Makefile
+++ b/graphics/circuit_macros/examples/Makefile
@@ -278,6 +278,7 @@ clobber: clean
rm -f *.ps
-@for dir in mf mpost pdflatex xfig psfrag svg dev test; \
do (if test -d $$dir ; then cd $$dir; make clobber; fi) ; done
+ rm -f ../doc/Circuit_macros.pdf ../Circuit_macros.pdf
rm -f *.warn
rm -f examples.pdf
rm -rf index.html html basenames *.png* dist zips htmlfiles svgfiles
@@ -295,7 +296,7 @@ clean:
rm -f core boxdims.tar.gz pics
rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.tif *.epsi eps *-mfpic* *.svg
rm -f fig*.tex $(TEXPICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig
- rm -f rose.pdf
+ rm -f rose.pdf keyboard.pdf
rm -f *.dim *.bak rotate.ps tst.ps *.bbl *-pics.ps
rm -f *.tfm *[0-9]pk *.png *.svg *.1 *.gif
rm -f F_* Version.tex *stackdump *.ico ./.[A-Za-z]*
diff --git a/graphics/circuit_macros/examples/Mixer.m4 b/graphics/circuit_macros/examples/Mixer.m4
index 13291261c8..fbae37b095 100644
--- a/graphics/circuit_macros/examples/Mixer.m4
+++ b/graphics/circuit_macros/examples/Mixer.m4
@@ -57,9 +57,9 @@ Q2: mosfet(,,dMESDQuB,E) at (Q1,T2.s-(0,elen_-del))
capacitor(to (T1.L3.end-(del,0),Here),C)
rlabel(,\SI{0.1}{\micro{}}\hbox{\sf F}\hskip20pt)
LOD: dot
- { line to (RF,Here); dot(,,1)
- move left_ 4bp__; "sftxt(local)" rjust "sftxt(oscillator)" rjust
- move left 40bp__ }
+ { line to (RF,Here); dot(,,1); move left_ 4bp__; textht = 10bp__
+ { "sftxt(local)" wid 30bp__ rjust at Here+(0,5bp__) }
+ "sftxt(oscillator)" wid 50 bp__ rjust at Here+(0,-5bp__) }
line from T2.T left_ to (Q1.S,T2.T)
T2T: dot
{ capacitor(down_ to (Here,BT),C); rlabel(,\SI{0.1}{\micro{}}\hbox{\sf F})
diff --git a/graphics/circuit_macros/examples/UNO.m4 b/graphics/circuit_macros/examples/UNO.m4
index 5a4e5381b7..dab914ac80 100644
--- a/graphics/circuit_macros/examples/UNO.m4
+++ b/graphics/circuit_macros/examples/UNO.m4
@@ -153,7 +153,7 @@ divert(0)dnl
dot
dot(at R1.start-(2*del,0))
xtal(down_ 2*lg_pinsep)
- rlabel(16,,"MHz"); dot
+ rlabel(,16,"MHz"); dot
XT2: dot(at last line.start-(2*del,0)); { "XT2" at last [].n above }
Br1: jumper(left_ from U3.Pin33.end to (XT2,U3.Pin33))
diff --git a/graphics/circuit_macros/examples/Views.dms b/graphics/circuit_macros/examples/Views.dms
deleted file mode 100644
index c92e42bac2..0000000000
--- a/graphics/circuit_macros/examples/Views.dms
+++ /dev/null
@@ -1,5 +0,0 @@
-w[1]=58.0802
-w[2]=47.6604
-w[3]=46.9552
-w[4]=120.41
-w[5]=114.866
diff --git a/graphics/circuit_macros/examples/control.m4 b/graphics/circuit_macros/examples/control.m4
index e42a63edec..9da5c4a7fc 100644
--- a/graphics/circuit_macros/examples/control.m4
+++ b/graphics/circuit_macros/examples/control.m4
@@ -134,6 +134,7 @@ Plant: box wid boxwid*3/2 ht boxht*5/4 \
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
ifelse(1,1,`
+ifelse(0,1,`
Multiblock: [
boxht = 0.4
boxwid = boxht
@@ -172,7 +173,12 @@ 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)
- "(c) A multiblock example" below ljust at Multiblock.sw+(0,-3pt__)
+')
+ifelse(1,1,`
+Attitude: [
+] with .nw at Observer.sw + (0,-0.3)
+')
+ "(c) A multiblock example" below ljust at last [].sw+(0,-3pt__)
')
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
diff --git a/graphics/circuit_macros/examples/dpv/CanLogicDPV.m4 b/graphics/circuit_macros/examples/dpv/CanLogicDPV.m4
index b6c1d02e2f..2f05d8e366 100644
--- a/graphics/circuit_macros/examples/dpv/CanLogicDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/CanLogicDPV.m4
@@ -27,18 +27,18 @@ define(`CanLogic',
`define(`terms',`shift(shift(shift(shift($@))))')
# Determine required input variables and negated
# variables
- Loopover_(`t_',`varloop(`v_',`define(X`'v_)',`define(XN`'v_)',t_)',terms)
+ Loopover_(`t_',`CLvarloop(`v_',`define(X`'v_)',`define(XN`'v_)',t_)',terms)
# Draw the inputs with NOT gates as necessary
LastInput: Here-(inputsep,0)
- Loopover_(`t_',`varloop(`v_',
- `ifdef(D`'v_,,`ifdef(XN`'v_,`DrawInNotIn(v_)',`DrawIn(v_)')')',
- `ifdef(D`'v_,,`ifdef(X`'v_,`DrawInNotIn(v_)',`DrawNotIn(v_)')')', t_)',
+ Loopover_(`t_',`CLvarloop(`v_',
+ `ifdef(D`'v_,,`ifdef(XN`'v_,`CLDrawInNotIn(v_)',`CLDrawIn(v_)')')',
+ `ifdef(D`'v_,,`ifdef(X`'v_,`CLDrawInNotIn(v_)',`CLDrawNotIn(v_)')')', t_)',
terms)
# Draw 2nd-layer gates
right_
LastGateSE: LastInput+(5*jog,-(AND_wd*L_unit*1.5))
Loopover_(`t_',
- `define(`termcount',m4Lx)DrawLayerGate(G`'termcount,$1,$2,t_)',
+ `define(`termcount',m4Lx)CLDrawLayerGate(G`'termcount,$1,$2,t_)',
terms)
# Draw output gate
linethick = gatelineth
@@ -47,26 +47,26 @@ define(`CanLogic',
Out: Here
linethick = lineth
# Connect 2nd-layer gates to the output gate
- VectorConnect(G,termcount,OP)
+ CLVectorConnect(G,termcount,OP)
# Connect the inputs and negated inputs to
# 2nd-layer gates
- Loopover_(`t_',`ConnectInputs(G`'m4Lx,t_)',terms)
+ Loopover_(`t_',`CLConnectInputs(G`'m4Lx,t_)',terms)
# Clean up
- Loopover_(`t_',`DeleteLogDefs(t_)',terms)
+ Loopover_(`t_',`CLDeleteLogDefs(t_)',terms)
')
- `VectorConnect(number of 2nd layer gates,
+ `CLVectorConnect(number of 2nd layer gates,
common 2nd layer gate name,
output gate name)
Connect the 2nd-layer gate outputs to the
output gate inputs'
-define(`VectorConnect',
+define(`CLVectorConnect',
`for_(1,`$2',1,
`line from `$1'm4x.Out right `$3'.In1.x-`$1'm4x.Out.x \
- jog/2*(`$2'+1-abs(2*m4x-`$2'-1)) \
then down `$1'm4x.Out.y - `$3'.In`'m4x.y then to `$3'.In`'m4x ')')
Draw and label a non-inverted input
-define(`DrawIn',
+define(`CLDrawIn',
`LastInput: LastInput+(inputsep,0)
In`'$1: LastInput
"svg_it($1)" ljust at LastInput # Maybe labels should be done externally
@@ -74,7 +74,7 @@ define(`DrawIn',
define(D`'$1)')
Draw and label an inverted input
-define(`DrawNotIn',
+define(`CLDrawNotIn',
`LastInput: LastInput+(inputsep,0)
InN`'$1: LastInput
"svg_it($1)" ljust at LastInput # Maybe labels should be done externally
@@ -86,7 +86,7 @@ define(`DrawNotIn',
define(D`'$1)')
Draw and label an input that is required both
inverted and uninverted.
-define(`DrawInNotIn',
+define(`CLDrawInNotIn',
`LastInput: LastInput+(inputsep,0)
In`'$1: LastInput
"svg_it($1)" ljust at LastInput # Maybe labels should be done externally
@@ -99,23 +99,23 @@ define(`DrawInNotIn',
linethick = lineth
InNt`'$1: Here
define(D`'$1)')
- `varloop(`var',ifnotnegated,ifnegated,term)
+ `CLvarloop(`var',ifnotnegated,ifnegated,term)
Loop over term variables performing actions'
-define(`varloop',`ifelse(`$4',,,substr(`$4',0,1),~,
+define(`CLvarloop',`ifelse(`$4',,,substr(`$4',0,1),~,
`define(`$1',substr($4,1,1)) $3
- varloop(`$1',`$2',`$3',substr($4,2))',
+ CLvarloop(`$1',`$2',`$3',substr($4,2))',
`define(`$1',substr($4,0,1)) $2
- varloop(`$1',`$2',`$3',substr($4,1))')')')
+ CLvarloop(`$1',`$2',`$3',substr($4,1))')')')
Count gate inputs and mark last appearance
-define(`Countinputs',`varloop(`v_',
+define(`CLCountinputs',`CLvarloop(`v_',
`define(`incount',incr(incount)) define(Last`'v_,`$1')',
`define(`incount',incr(incount)) define(LastN`'v_,`$1')',$2)')
Draw a 2nd layer gate
-define(`DrawLayerGate',
+define(`CLDrawLayerGate',
`define(`incount',0)
- Countinputs($1,$4)
+ CLCountinputs($1,$4)
ifelse(incount,1,
`LastGateSE: LastGateSE-(0,jog)
$1: [ In1:Here; line right AND_wd*L_unit; Out: Here] \
@@ -126,7 +126,7 @@ define(`DrawLayerGate',
linethick = lineth ')')
Connect this gate to its input lines
-define(`ConnectInputs',`define(`innum',0) varloop(`v_',
+define(`CLConnectInputs',`define(`innum',0) CLvarloop(`v_',
`define(`innum',incr(innum))
line from `$1'.In`'innum to (In`'v_,`$1'.In`'innum)dnl
ifelse(`$1',m4xpand(Last`'v_),`then to In`'v_',`; dot')',
@@ -136,7 +136,7 @@ define(`ConnectInputs',`define(`innum',0) varloop(`v_',
Delete definitions to allow more than one
circuit per diagram
-define(`DeleteLogDefs',`varloop(`v_',
+define(`CLDeleteLogDefs',`CLvarloop(`v_',
`undefine(Last`'v_) undefine(D`'v_) undefine(X`'v_)',
`undefine(LastN`'v_) undefine(D`'v_) undefine(XN`'v_)',$1)')
diff --git a/graphics/circuit_macros/examples/dpv/UNODPV.m4 b/graphics/circuit_macros/examples/dpv/UNODPV.m4
index 86b5100f34..3e5fb11e93 100644
--- a/graphics/circuit_macros/examples/dpv/UNODPV.m4
+++ b/graphics/circuit_macros/examples/dpv/UNODPV.m4
@@ -153,7 +153,7 @@ divert(0)dnl
dot
dot(at R1.start-(2*del,0))
xtal(down_ 2*lg_pinsep)
- rlabel(16,,MHz); dot
+ rlabel(,16,MHz); dot
XT2: dot(at last line.start-(2*del,0)); { "XT2" at last [].n above }
Br1: jumper(left_ from U3.Pin33.end to (XT2,U3.Pin33))
diff --git a/graphics/circuit_macros/examples/dpv/examplesDPV.htmx b/graphics/circuit_macros/examples/dpv/examplesDPV.htmx
index 8d33b9f07e..84fb877209 100644
--- a/graphics/circuit_macros/examples/dpv/examplesDPV.htmx
+++ b/graphics/circuit_macros/examples/dpv/examplesDPV.htmx
@@ -21,6 +21,16 @@ flowcharts, picture overlay, ASME Y14.5' >
<link rel="shortcut icon" href="../Circuit_macros.ico" type="image/x-icon" />
</HEAD>
+`<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-HRS8TQGRE8"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-HRS8TQGRE8');
+</script>'
+
<!-- m4 macros: ------------------------------------------------------------
define(`ifinstr',`ifelse(`$2',,`$1',index(`$1',`$2'),-1,
`ifinstr(shift(shift(shift($@))))',`$3')')
diff --git a/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx b/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx
index 7ad5f84e9f..e46725b0d7 100644
--- a/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx
+++ b/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx
@@ -21,6 +21,17 @@ flowcharts, picture overlay, ASME Y14.5' >
<link rel="shortcut icon" href="../Circuit_macros.ico" type="image/x-icon" />
</HEAD>
+`<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-HRS8TQGRE8"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-HRS8TQGRE8');
+</script>'
+
+
<!-- m4 macros: ------------------------------------------------------------
define(`ifinstr',`ifelse(`$2',,`$1',index(`$1',`$2'),-1,
`ifinstr(shift(shift(shift($@))))',`$3')')
diff --git a/graphics/circuit_macros/examples/dpv/sfgDPV.m4 b/graphics/circuit_macros/examples/dpv/sfgDPV.m4
index 4e32981619..a516b3fb97 100644
--- a/graphics/circuit_macros/examples/dpv/sfgDPV.m4
+++ b/graphics/circuit_macros/examples/dpv/sfgDPV.m4
@@ -1,7 +1,7 @@
.PS
# sfgDPV.m4
gen_init(svg_font(Times,11bp__))
-sfg_init( 1.2 ) # scale default size by 1.2
+sfg_init( blen=1.2 ) # default edge length
textht = textht*0.9
@@ -71,7 +71,7 @@ define(`svg_choose',`[ P:"svg_fsize(( ),150)"
"svg_small(`$2')" at P-(0,3bp__)
]')
-G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and increase node size
+G4: [sfg_init( blen=2;rad=0.25/2 ) # change node spacing and size
s1 = 0.9
s2 = 1.2
N0: sfgnode(,svg_fsize(0,120),,invis)
@@ -98,7 +98,7 @@ G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and increase node size
] with .nw at G3.sw+(0,-0.1)
# 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 increase node size
+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) )
sfgline(,
diff --git a/graphics/circuit_macros/examples/dpv/tstDPV.htmx b/graphics/circuit_macros/examples/dpv/tstDPV.htmx
index 64d1753399..3859f9f30f 100644
--- a/graphics/circuit_macros/examples/dpv/tstDPV.htmx
+++ b/graphics/circuit_macros/examples/dpv/tstDPV.htmx
@@ -21,6 +21,17 @@ flowcharts, picture overlay, ASME Y14.5' >
<link rel="shortcut icon" href="../Circuit_macros.ico" type="image/x-icon" />
</HEAD>
+`<!-- Google tag (gtag.js) -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=G-HRS8TQGRE8"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+
+ gtag('config', 'G-HRS8TQGRE8');
+</script>'
+
+
<!-- m4 macros: ------------------------------------------------------------
define(`ifinstr',`ifelse(`$2',,`$1',index(`$1',`$2'),-1,
`ifinstr(shift(shift(shift($@))))',`$3')')
diff --git a/graphics/circuit_macros/examples/examples.pdf b/graphics/circuit_macros/examples/examples.pdf
index ac0892249d..1ca1e0ca2d 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/extras/README_extras b/graphics/circuit_macros/examples/extras/README_extras
index 140802fb68..1c18266a6a 100644
--- a/graphics/circuit_macros/examples/extras/README_extras
+++ b/graphics/circuit_macros/examples/extras/README_extras
@@ -1,6 +1,14 @@
-THIS DIRECTORY contains a Makefile and .m4 sources for diagrams
-not included in the examples files. Type "make" and, to clean up,
-"make clean". This directory is assumed to be a subdirectory of
-the examples directory in order to include the necessary definition
-files.
+THIS DIRECTORY contains a Makefile and m4 sources for diagrams not
+included in the examples files. Many of these correspond to questions
+asked on stackexchange, of the form "How do I draw ... with tikz?"
+Producing drawings like these can be satisfying, as shown by the alacrity
+with which knowledgable people assist when questions are asked. Often,
+the question has more to do with geometry than drawing language, and
+the examples here using m4 with dpic merely confirm that the coding can
+often be done reasonably in several possible languages.
+
+This directory is assumed to be a subdirectory of the examples directory
+in order to include the necessary definition files.
+
+Type "make" and, to clean up, "make clean".
diff --git a/graphics/circuit_macros/examples/extras/Y14-5_example.m4 b/graphics/circuit_macros/examples/extras/Y14-5_example.m4
deleted file mode 100644
index cb4397516c..0000000000
--- a/graphics/circuit_macros/examples/extras/Y14-5_example.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-.PS
-# Y14-5_example.m4
-# https://en.wikipedia.org/wiki/Geometric_dimensioning_and_tolerancing
-cct_init
-textht = 11bp__*2/3
-command "{\sf"
-sinclude(ASME_Y14-5.m4def)
-sinclude(../ASME_Y14-5.m4def)
-
- boxht = 7.5/0.5*textht
- boxwid = 15/7.5 * boxht
- circlerad = 2.3/0.5*textht*0.5
- thicklines_(1)
- arrowht = textht*0.8
- arrowwid = textht*0.6
-
- Box: box
- Circle: circle at Box.c; {CM: move from Circle.se down textht right textht}
-thinlines_
-CLV: ctrline( up_ Box.ht with .c at Box.c, Box.ht/2 )
-CLH: ctrline( right Box.ht with .c at Box.c, Box.ht/2 )
-
- dimension_(from Box.nw to Box.n,Box.ht/6)
- thicklines_(1)
- {Y14_frame("10") with .s at AS_C+(0,textht/2)}
- thinlines_
- line from 3rd last line.start to CLV.end
- dimension_(from Box.w to Box.nw,Box.ht/6)
- thicklines_(1)
- {Y14_frame("5") with .e at AS_C+(-textht/2,0)}
- thinlines_
- line from 4th last line.start to CLH.start
-
-thicklines_
- DA: Y14_frame("A") at Box.ne+(-textht*1.5,textht*5)
- datumarrow(from DA.s to (DA,Box.n))
- DB: Y14_frame("B") at Box.sw+(-textht*5,textht*2)
- datumarrow(from DB.e to (Box.w,DB))
-
- F: Y14_frame(Y14_pos_,
- Y14_dia_;"0.03";"(M)",
- "A","B","C") with .w at Box.se+(-textht*4,-textht*2)
- G: Y14_frame(Y14_fla_,Y14_cyl_,Y14_lin_,
- Y14_sur_,Y14_per_,Y14_ang_,
- Y14_par_) with .nw at F.sw+(0,-0.1)
- H: Y14_frame(Y14_pos_,Y14_cir_,Y14_tot_,Y14_dia_) \
- with .nw at G.sw+(0,-0.1)
-
- { CB: move left textht from F.w }
- arrow <- from Circle.se to Intersect_(CM,CB) then to F.w
-
- command "}"
-.PE
diff --git a/graphics/circuit_macros/examples/files.tex b/graphics/circuit_macros/examples/files.tex
index 8ca2c08f76..333eeb6825 100644
--- a/graphics/circuit_macros/examples/files.tex
+++ b/graphics/circuit_macros/examples/files.tex
@@ -793,8 +793,7 @@ ifpostscript(,\bfig{%
\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/keyboard.pdf b/graphics/circuit_macros/examples/keyboard.pdf
deleted file mode 100644
index 0d5fa829b8..0000000000
--- a/graphics/circuit_macros/examples/keyboard.pdf
+++ /dev/null
Binary files differ
diff --git a/graphics/circuit_macros/examples/mf/cct.mf b/graphics/circuit_macros/examples/mf/cct.mf
index fd626e6be7..776d8f4183 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/03/10 at 23:35
+% from TeX source "font" on 2023/05/31 at 20:45
numeric mfpicversion; mfpicversion := 110;
if unknown mode: mode := localfont; fi
if unknown mag: mag := 1000/1000; fi
diff --git a/graphics/circuit_macros/examples/mpost/Makefile b/graphics/circuit_macros/examples/mpost/Makefile
index 978e1e3592..af86f44cbe 100644
--- a/graphics/circuit_macros/examples/mpost/Makefile
+++ b/graphics/circuit_macros/examples/mpost/Makefile
@@ -61,7 +61,7 @@ MPOST = mpost --tex=latex
TR = | tr '=' '\134'
-LATEX = latex
+LATEX = latex --quiet
DVIPS = dvips
DIMFILE = tmp.dim
@@ -95,8 +95,9 @@ $(DOC).ps: $(DOC).dvi
EXL = exlinks
$(DOC).dvi: $(DOC).tex
- -if test "$(DOC)" = "examplesmpost" ; then make exlinks dims; fi
- make $(FIGS) rose.pdf
+ -if test "$(DOC)" = "examplesmpost" ; then \
+ make exlinks dims; rose.pdf; fi
+ make $(FIGS)
$(LATEX) $(DOC)
-if test -n "$(BOXDIMS)" ; then rm -f dims; \
for box in $(BOXDIMS) ; do rm -f $$box.1; done; \
@@ -112,9 +113,14 @@ figs: $(EXL) $(FIGS)
rose.pdf: ../rose.m4
m4 pdf.m4 ../rose.m4 | dpic -d > rose.pdf
-exlinks:
+ignore:
+ @echo ""
@echo ""
@echo 'Ignore "cannot create ... exists and file.1 not found" warnings.'
+ @echo ""
+ @echo ""
+
+exlinks: ignore
-@if test ! -f ex11.m4 ; then \
ls ../*.m4 | sed -e 's/^/ln -s /' -e '/test.m4/d' | sh;\
fi
@@ -125,10 +131,9 @@ exlinks:
clobber: clean
-tst:
+tst: ignore
rm -f tst.ps tst.dvi test.1 test.mp
- make EXL="" DPIC="$(DPIC)" CONFIGFILE="$(CONFIGFILE)" DOC=tstmpost \
- FIGS=test.1 BOXDIMS=test
+ make EXL="" DPIC="$(DPIC)" DOC=tstmpost FIGS=test.1 BOXDIMS=test
rm -f *.frs
tst1: test.1 tstmpost.tex
diff --git a/graphics/circuit_macros/examples/sfg.m4 b/graphics/circuit_macros/examples/sfg.m4
index a2efdb2ec6..1d22326d45 100644
--- a/graphics/circuit_macros/examples/sfg.m4
+++ b/graphics/circuit_macros/examples/sfg.m4
@@ -1,6 +1,6 @@
.PS
# sfg.m4
-sfg_init( 1.2 ) # scale default size by 1.2
+sfg_init( 1.2 ) # default edge length = 1.2
iflatex(`textoffset = 1bp__; ifpsfrag(`textht = 9.5bp__',
`latexcommand({\small)') ')
@@ -43,7 +43,7 @@ B: [
#showbox_(,"B")
# Graph 3
-G3: [#sfg_init( 0.85,0.35/2 ) # change node spacing and increase node size
+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))
@@ -70,7 +70,7 @@ A: [#sfg_init( 0.75,0.15 )
] with .w at G3.e+(linewid/2,0)
#showbox_(,"A")
-G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and increase node size
+G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and size
s1 = 0.9
s2 = 1.2
N0: sfgnode(,\hbox{\Large 0},,invis)
@@ -92,7 +92,7 @@ G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and increase node size
#showbox_(,"G4")
# 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 increase node size
+G5: [sfg_init( 1.75,0.25/2 ) # change node spacing and size
Dstar: sfgnode(,*)
D0: sfgnode(at Dstar+(2,0),\diamond_0)
sfgline(,`1-r_{x{-}1,x}-q^i_{x{-}1,x}',,->)
diff --git a/graphics/circuit_macros/examples/shadowed.m4 b/graphics/circuit_macros/examples/shadowed.m4
index b0bf0afa15..f25be03732 100644
--- a/graphics/circuit_macros/examples/shadowed.m4
+++ b/graphics/circuit_macros/examples/shadowed.m4
@@ -1,4 +1,5 @@
.PS
+# shadowed.m4
gen_init
divert(-1)
diff --git a/graphics/circuit_macros/examples/xfig/xfiglib.fig b/graphics/circuit_macros/examples/xfig/xfiglib.fig
index 53db089ade..e284b3c82f 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.03.01 option -x for Fig 3.2
+# dpic version 2023.06.01 option -x for Fig 3.2
1200 2
6 0 0 3975 5025
6 0 0 3975 5025
diff --git a/graphics/circuit_macros/examples/xtras b/graphics/circuit_macros/examples/xtras
deleted file mode 100644
index d2211aa5f5..0000000000
--- a/graphics/circuit_macros/examples/xtras
+++ /dev/null
@@ -1,61 +0,0 @@
-mv ASMEbox.m4 extras
-mv Ant.m4 extras
-mv ArrowFn.m4 extras
-mv Attention.m4 extras
-mv Autoencoder.m4 extras
-mv Bridge.m4 extras
-mv CSlight.m4 extras
-mv Ccurve.m4 extras
-mv Chuck.m4 extras
-mv Clocks.m4 extras
-mv ControlLoop.m4 extras
-mv Counting.m4 extras
-mv Cruller.m4 extras
-mv Cylinder.m4 extras
-mv Egg.m4 extras
-mv Euro.m4 extras
-mv Eye.m4 extras
-mv Fefets.m4 extras
-mv FieldLines.m4 extras
-mv Floor.m4 extras
-mv Flow2.m4 extras
-mv Hexagon.m4 extras
-mv Highgain.m4 extras
-mv IC10107.m4 extras
-mv Koch.m4 extras
-mv Lyap.m4 extras
-mv Metamodel.m4 extras
-mv Obliq.m4 extras
-mv OneLine.m4 extras
-mv OpAmpFilter.m4 extras
-mv Optics.m4 extras
-mv Orbits.m4 extras
-mv PPA.m4 extras
-mv PerpTo.m4 extras
-mv Pipe.m4 extras
-mv Planes.m4 extras
-mv RandomNodes.m4 extras
-mv Region.m4 extras
-mv Resolver.m4 extras
-mv SPM.m4 extras
-mv SampleFlow.m4 extras
-mv ShadeSector.m4 extras
-mv Shadow.m4 extras
-mv Shaky.m4 extras
-mv Star.m4 extras
-mv Stator.m4 extras
-mv TR_fill.m4 extras
-mv Views.m4 extras
-mv Wheat.m4 extras
-mv Wheel.m4 extras
-mv Y14-5_example.m4 extras
-mv Zcos.m4 extras
-mv birds.m4 extras
-mv bistable.m4 extras
-mv brace.m4 extras
-mv chaos.m4 extras
-mv hsv.m4 extras
-mv person.m4 extras
-mv rotellipse.m4 extras
-mv squiggle.m4 extras
-mv venus.m4 extras