summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/svg
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/svg')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AutoencoderSVG.m497
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m459
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m476
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CctTableSVG.m473
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FlowSVG.m4222
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FourbarSVG.m459
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m446
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/JackSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/LyapSVG.m4159
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m434
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile46
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/OpampSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNO.m4265
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNOSVG.m4577
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Xtest.m458
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4173
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m458
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex05SVG.m466
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx734
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/pwrsupplySVG.m4102
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/quickSVG.m48
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/randomSVG.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx3
26 files changed, 2455 insertions, 476 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AutoencoderSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AutoencoderSVG.m4
new file mode 100644
index 00000000000..05921e1bcc1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AutoencoderSVG.m4
@@ -0,0 +1,97 @@
+.PS
+# Masked_Autoencoder.m4
+gen_init
+NeedDpicTools
+svg_font(sans-serif,12bp__,textoffset)
+
+ circlerad = 0.2
+ circlesep = 0.5
+ rowsep = 0.9
+ arrowht = arrowht*0.8
+ arrowwid = arrowwid*1.4
+ linethick = 1
+
+define plan {
+ m = 0
+ for i=1 to 4 do {
+ for j=1 to ncircles[i] do {
+ exec sprintf("C[i,j]: circle thick 1.6 \"%g\" at Here",m+j)
+ if i>1 then {
+ if "$1"=="" then {
+ for k=1 to ncircles[i-1] do { arrow from C[i,j] to C[i-1,k] chop } }
+ }
+ if j!=ncircles[i] then { move right_ circlesep from C[i,j] }
+ }
+ m += ncircles[i]
+ case(i,
+ move to C[1,1]+(-circlesep/2,-rowsep),
+ move to C[2,1]+(0,-rowsep),
+ move to C[3,1]+(circlesep/2,-rowsep), )
+ }
+ }
+ gridsiz = 0.78/4
+define grid { [ SW: 0,0
+ for i=1 to $1 do {
+ move to (0,(0.5-i)*gridsiz)
+ exec sprintf("fv = $%g",2+i)
+ for j=1 to $2 do { fl = 1-(int(fv / 2^(j-1)) % 2)
+ box wid gridsiz ht gridsiz outlined "gray" shaded rgbstring(fl,fl,fl) }
+ } ]}
+
+define cxt {
+ m = 1
+ for i=2 to 4 do {
+ for j=1 to ncircles[i] do {
+ exec sprintf("narrows = $%g",m)
+ for k=1 to narrows do {
+ exec sprintf("cnum = $%g",m+k)
+ exec sprintf("arrow from C[i,j] to C[i-1,cnum] $%g chop", $+)
+ }
+ m += narrows+1
+ } } }
+
+B: box invis ht 8 wid 8
+[
+ array(ncircles,3,4,4,3)
+ plan()
+ svg_font(Times,12bp__,textoffset)
+ for j=1 to 3 do {
+ sprintf("svg_it(x)`'svg_sub(%g,60%)",j) at C[1,j].n+(0,2bp__) above
+ "svg_circ" at last ""+(-1bp__,1bp__)
+ sprintf("svg_it(x)`'svg_sub(%g,60%)",j) at C[4,j].s+(0,-2bp__) below
+ }
+
+ "V" at 0.5 between C[2,1].w and C[1,1].w
+ "W`'svg_sup(2)" at 0.5 between C[3,1].w and C[2,1].w
+ "W`'svg_sup(1)" at 0.5 between C[3,1].w and C[4,1].w
+
+GV: grid(3,4,0,15,6) with .w at C[2,4]+(circlerad*2,rowsep/2)
+ "=M`'svg_sup(V)" at GV.e ljust
+G2: grid(4,4,13,0,0,13) with .w at (GV.w,C[3,4]+(circlerad*2,rowsep/2))
+ "=M`'svg_sup(V`'svg_sup(2))" at G2.e ljust
+G1: grid(4,3,1,5,1,1) with .w at (GV.w,C[4,3]+(circlerad*2,rowsep/2))
+ "=M`'svg_sup(V`'svg_sup(1))" at G1.e ljust
+ command "</g>"
+
+ move to (GV.x+3*circlesep,C[1,1].y)
+ plan(3,1,2,1,2,2,1,2,1,2,2,3,1,2)
+ for i=2 to 4 do {
+ cxt(2,1,3,0,0,2,1,3, 0,4,1,2,3,4,0,0, 0,4,1,2,3,4,0, \
+ outlined rgbstring(0.5,0.5,0.5) shaded rgbstring(0.5,0.5,0.5) )
+ cxt(0,1,1,1,1,0, 2,2,3,0,2,2,3,2,2,3, 0,0,3,1,3,4,)
+ }
+ svg_font(Times,12bp__,textoffset)
+ for j=1 to 3 do { sprintf("svg_it(x)`'svg_sub(%g,60%)",j) \
+ at C[4,j].s+(0,-2bp__) below }
+ arrow dotted from C[1,2].n up circlesep/2
+ "svg_it(p(x`'svg_sub(2)))" at Here+(0,2bp__) above
+ "svg_it(p(x`'svg_sub(3)|x`'svg_sub(2)))" at (C[1,3]+(circlesep/2,0),last "")
+ arrow dotted from C[1,3] to last "".s chop circlerad chop textoffset
+ "svg_it(p(x`'svg_sub(1)|x`'svg_sub(2),x`'svg_sub(3)))" \
+ at (C[1,1]+(-circlesep/2,0),last "")
+ arrow dotted from C[1,1] to last "".s chop circlerad chop textoffset
+ command "</g>"
+
+ ] at B
+ command "</g>"
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m4
new file mode 100644
index 00000000000..630326f867c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Banking.m4
@@ -0,0 +1,59 @@
+.PS
+#Banking.m4
+
+gen_init
+
+ scale = 2.54 # use cm
+ svg_font(Arial Black,11 bp__,2 bp__)
+ boxwid = 6.8
+ boxht = 4.5
+ linethick_(1.5)
+
+ define(`heading',
+ `<tspan font-style=\"bold\" font-size=\"120%\" fill=\"white\">`$1'</tspan>')
+ define(`subheading',
+ `<tspan fill=\"white\" font-size=\"75%\" font-style=\"bold\">[`$1']</tspan>')
+ define(`wtext',`<tspan fill=\"white\">`$1'</tspan>')
+
+ C: circle diam 2.6 colored "mediumblue"
+ Person: box rad boxht/4 colored "mediumblue" with .n at C.s+(0,C.rad/8) \
+ "heading(Personal Banking)" \
+ "" \
+ "heading(Customer)" \
+ "subheading(Person)" \
+ "" \
+ "wtext(A customer of the bank`,' with)" \
+ "wtext(personal bank accounts.)"
+
+ A1: arrow thick 1.5 dashed down 3.5 from Person.s
+ svg_font(Arial,11 bp__,2 bp__)
+ { box invis fill 1 ht 0.4 wid 1.0 "Uses" at A1 }
+ command "</g>"
+ Internet: box colored "steelblue" \
+ "heading(Internet Banking System)" \
+ "subheading(Software system)" \
+ "" \
+ "wtext(Allows customers to view)" \
+ "wtext(information about their bank)" \
+ "wtext(accounts`,' and make payments.)"
+
+ svg_font(Arial,11 bp__,2 bp__)
+ A2: arrow thick 1.5 dashed right 5.4 from Internet.e \
+ "Sends e-mail" above "using" below
+ command "</g>"
+ Email: box colored "slategrey" \
+ "heading(E-mail System)" \
+ "subheading(Software system)" \
+ "" \
+ "wtext(Internal Microsoft Exchange)" \
+ "wtext(e-mail system.)"
+
+ A3:arrow thick 1.5 dashed from Email.nw+(0.4,0) to Person.se+(0.3,Person.ht/5)
+ svg_font(Arial,11 bp__,2 bp__)
+ { box invis fill 1 ht 0.4 wid 3.3 "Sends e-mails to" at A3 }
+ command "</g>"
+
+# etc
+
+ command "</g>" # font
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4
index 312249605ee..158b475b7b9 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4
@@ -2,7 +2,10 @@
# Btree.m4
# One way to draw a binary tree using pic macros
gen_init(svg_font(sans-serif,11bp__))
-circlerad = 0.30
+sinclude(tst.dim)
+s_init(Btree)
+Btree: [
+circlerad = 0.45
define n { [C: circle fill_(0.9) $1
if "$2" != "" then {
@@ -29,5 +32,76 @@ define Vega { n("Vega") }
# Build the tree from the root
S: Sirius
+
+ command "</g>" # end font
+]
+Ttree: [
+# TtreeSVG.m4
+svg_font(sans-serif,10bp__)
+
+# `Node(no in row, head [location],
+# displacement of top of body (.n) wrt head,
+# body Node 1, body Node 2, ...) '
+define(`Node',`
+ Head`$1': `$2'
+ ifelse(`$3',,,` Body`$1': [
+ Loopover_(`v',`v; define(`m4ct',m4Lx)',shift(shift(shift($@))))
+ ] with .n at Head`$1' + `$3'
+ connect(`$1',m4ct)')')
+
+define(`connect',`Bot: move from Head$1.sw-(0,5bp__) to Head$1.se-(0,5bp__)
+for_(1,`$2',1,
+ `Top: move from Body$1.Head`'m4x.nw+(0,2bp__) \
+ to Body$1.Head`'m4x.ne+(0,2bp__)
+ Mov: move from Head$1 to Body$1.Head`'m4x
+ if Bot.len*Top.len*Mov.len > 0 then {
+ line from Intersect_(Mov,Top) to Intersect_(Mov,Bot)}')')
+
+ vsep = 0.75
+define(`txw',`wid `$1'mm__')dnl scaled by 14/12 for 14 pt type
+
+ Node(1,"svg_it(h(h(h(x`'svg_sub(1),x`'svg_sub(2))," \
+ + "h(x`'svg_sub(3),x`'svg_sub(4))),h(h(x`'svg_sub(5),x`'svg_sub(6))," \
+ + "h(x`'svg_sub(7),x`'svg_sub(8)))))" txw(70) ,
+ (0,-vsep),
+ Node(1,"svg_it(h(h(x`'svg_sub(1),x`'svg_sub(2)),h(x`'svg_sub(3)," \
+ + "x`'svg_sub(4))))" txw(32) ,
+ (0,-vsep),
+ Node(1,"svg_it(h(x`'svg_sub(1),x`'svg_sub(2)))" txw(14) ,
+ (0,-vsep),
+ Node(1,"svg_it(x`'svg_sub(1):=((A,pk`'svg_sub(A)),h`'svg_sub(1)))" \
+ txw(29) ),
+ Node(2,"svg_it(x`'svg_sub(2):=((B,pk`'svg_sub(B)),h`'svg_sub(2)))" \
+ txw(29) with .n at last "".ne+(0.2,-vsep*2/3))),
+ Node(2,"svg_it(h(x`'svg_sub(3),x`'svg_sub(4)))" txw(14) \
+ with .nw at Head1.ne+(Body1.wid/2+0.1,0),
+ (0,-vsep),
+ Node(1,"svg_it(x`'svg_sub(3):=" \
+ + "((A,pk`'svg_prime`'svg_sub(A,,,-0.5ex)),h`'svg_sub(3)))" \
+ txw(29)),
+ Node(2,"svg_it(x`'svg_sub(4):=((D,pk`'svg_sub(D)),h`'svg_sub(4)))" \
+ txw(29) with .n at last "".ne+(0.2,-vsep*2/3)))),
+ Node(2,"svg_it(h(h(x`'svg_sub(5),x`'svg_sub(6)),h(x`'svg_sub(7)," \
+ + "x`'svg_sub(8))))" txw(29) with .nw at Head1.ne+(Body1.wid/2,0),
+ (0,-vsep),
+ Node(1, "svg_it(h(x`'svg_sub(5),x`'svg_sub(6)))" txw(14) ,
+ (0,-vsep*5/4),
+ Node(1,"svg_it(x`'svg_sub(5):=((E,pk`'svg_sub(E)),h`'svg_sub(5)))" \
+ txw(29) ),
+ Node(2,"svg_it(x`'svg_sub(6):=((H,pk`'svg_sub(H)),h`'svg_sub(6)))" \
+ txw(29) with .n at last "".ne+(0.2,-vsep*2/3))),
+ Node(2,"svg_it(h(x`'svg_sub(7),x`'svg_sub(8)))" txw(14) \
+ with .nw at Head1.ne+(Body1.wid/2+0.1,0),
+ (0,-vsep*5/4),
+ Node(1,"svg_it(x`'svg_sub(7):=" \
+ + "((D,pk`'svg_prime`'svg_sub(D,,,-0.5ex)),h`'svg_sub(7)))" \
+ txw(29) ),
+ Node(2,"svg_it(x`'svg_sub(8):=((K,pk`'svg_sub(K)),h`'svg_sub(8)))" \
+ txw(29) with .n at last "".ne+(0.2,-vsep*2/3); move right 0.2)),
+ Node(3,"svg_it(h(x`'svg_sub(9)))" txw(8) \
+ at 0.5 between Head1 and Head2)))
+
+] with .w at last [].e+(-0.75,0)
+
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CctTableSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CctTableSVG.m4
index 3c79a32d6bc..e46bb97a769 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CctTableSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CctTableSVG.m4
@@ -5,74 +5,91 @@ textwid = 1.5
movewid = 2 pt__
hm = 2.1
vm = 0.28
+
+hm = 2.05
+vm = 0.28
{ {resistor ; move ; svgLink(NportSVG.svg,"`resistor'" ljust)}
move right_ hm
{resistor(,,Q) ; move ; "`resistor(,,Q) '" ljust}
move right_ hm
- {resistor(,,E) ; move ; "`resistor(,,E) = ebox'" ljust}
+ {resistor(,,E) ; move
+ "`resistor(,,E) = ebox'" ljust}
}
move down vm; right_
-{ {resistor(,,ES) ; move ;"`resistor(,,ES) '" ljust}
+{ {resistor(,,ES) ; move ; "`resistor(,,ES) '" ljust}
move right_ hm
- {resistor(,4,QR) ; move ;"`resistor(,4,QR) '" ljust}
+ {resistor(,,H) ; move ; "`resistor(,,H) '" ljust}
move right_ hm
- {resistor(,,H) ; move ;"`resistor(,,H) '" ljust}
+ {ebox(,,,0.5) ; move ; "`ebox(,,,0.5) '" ljust}
}
move down vm; right_
-{ {resistor(,,V) ; move ;"`resistor(,,V)'" ljust}
+{ {resistor(,,V) ; move ; "`resistor(,,V) '" ljust}
move right_ hm
- {ebox(,,,0.5) ; move ;"`ebox(,,,0.5)'" ljust}
+ {move down_ 0.05; right_
+ thermocouple ; move; "`thermocouple '" ljust; move up_ 0.05}
move right_ hm
- {ebox(,0.5,0.3) ; move ;"`ebox(,0.5,0.3)'" ljust}
+ {ebox(,0.5,0.3) ; move ; "`ebox(,0.5,0.3) '" ljust}
}
move down vm; right_
-{ {inductor ; move ;"`inductor'" ljust}
+{ {inductor ; move ; "`inductor '" ljust}
move right_ hm
- {inductor(,W); move ;"`inductor(,W)'" ljust}
+ {inductor(,W); move ; "`inductor(,W) '" ljust}
move right_ hm
- {inductor(,L); move ;"`inductor(,L)'" ljust}
+ {inductor(,L); move ; "`inductor(,L) '" ljust}
}
move down vm; right_
-{ {inductor(,,,M) ; move ;"`inductor(,,,M)'" ljust}
+{ {inductor(,,,M) ; move ; "`inductor(,,,M) '" ljust}
move right_ hm
- {inductor(,W,6,P); move ;"`inductor(,W,6,P)'" ljust}
+ {inductor(,W,6,P); move ; "`inductor(,W,6,P) '" ljust}
move right_ hm
- {ttmotor(,G) ; move ;"`ttmotor(,G)'" ljust}
+ {move right_ 0.2; ttmotor(,G) ; move ; "`ttmotor(,G) '" ljust}
}
move down vm; right_
-{ {capacitor ; move ;"`capacitor'" ljust}
+{ {capacitor ; move ; "`capacitor '" ljust}
move right_ hm
- {capacitor(,C); move ;"`capacitor(,C)'" ljust}
+ {capacitor(,C); move ; "`capacitor(,C) '" ljust}
move right_ hm
- {capacitor(,C+); move ;"`capacitor(,C+)'" ljust}
+ {capacitor(,C+); move ; "`capacitor(,C+) '" ljust}
}
move down vm; right_
-{ {capacitor(,P); move ;"`capacitor(,P)'" ljust}
+{ {capacitor(,P); move ; "`capacitor(,P) '" ljust}
move right_ hm
- {capacitor(,E); move ;"`capacitor(,E)'" ljust}
+ {capacitor(,E); move ; "`capacitor(,E) '" ljust}
move right_ hm
- {capacitor(,K); move ;"`capacitor(,K)'" ljust}
+ {capacitor(,K); move ; "`capacitor(,K) '" ljust}
}
move down 0.25; right_
-{ {capacitor(,M); move ;"`capacitor(,M)'" ljust}
+{ {capacitor(,M); move ; "`capacitor(,M) '" ljust}
move right_ hm
- {capacitor(,N); move ;"`capacitor(,N)'" ljust}
+ {capacitor(,N); move ; "`capacitor(,N) '" ljust}
move right_ hm
- {xtal ; move ;"`xtal'" ljust}
+ {xtal ; move ; "`xtal '" ljust}
}
move down 0.25; right_
-{ {memristor ; move;"`memristor'" ljust}
+{ {memristor ; move; "`memristor '" ljust}
move right_ hm
- {heater; move;"`heater'" ljust}
+ {heater; move; "`heater '" ljust}
move right_ hm
- {tline ; move;"`tline'" ljust}
+ {tline ; move; "`tline '" ljust}
}
move down 0.25; right_
-{ {gap ; move ;"`gap'" ljust}
+{ {move up_ 0.05; right_; gap ; move ; "`gap '" ljust}
+ move right_ hm
+ {gap(,,A) ; move ; "`gap(,,A) '" ljust}
move right_ hm
- {gap(,,A) ; move ;"`gap(,,A)'" ljust}
+ {arrowline ; move; "`arrowline '" ljust}
+}
+ move down 0.25; right_
+{ {lamp ; move; "`lamp '" ljust}
+ move right_ hm
+ {reed ; move ; "`reed '" ljust}
+ move right_ hm
+ {reed(,,,fill_(0.9),CR) ; move ; "`reed(,,,fill_(0.9),CR) '" ljust}
+}
+ move down 0.25; right_
+{ {pvcell ; move; "`pvcell '" ljust}
move right_ hm
- {arrowline ; move;"`arrowline'" ljust}
+ {arrester ; move ; "`arrester '" ljust}
}
command "</g>" # end font
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4
index 59860a2d1ea..67f89e5348c 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ConnectorsSVG.m4
@@ -16,7 +16,7 @@ svg_rot_init(ConnectorsSVG)
"Raspberry Pi 4 GPIO" at last [].GPIO.s below
HD: HDMI_micro with .nw at last [].ne+(0.25,0.5)
- "Micro" rjust at HD.Base.sw+(0,10bp__) "HDMI" rjust
+ "Micro" rjust at HD.Base.sw "HDMI" rjust
S: USB_C_Socket with .sw at (HD.e.x+0.25,RPI.s.y)
"USB-C Socket" at S.Base.s below
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FlowSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FlowSVG.m4
index d0ba1384930..f0f5b6df71b 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FlowSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FlowSVG.m4
@@ -1,142 +1,15 @@
-divert(-1)
- FlowchartDefs.m4
- `Some experimental flow-chart macros.
- In the following, every subchart is in
- [] brackets, with .N, .S, .E and .W
- internally defined. Follow this convention
- if you create compound constructs.
-
- Generally, the first argument is one
- or more strings; the second adjusts
- 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.'
-
-define(`FlowchartDefs_')
-
- `Default sizes:'
-define(`fboxwid',linewid*2)
-define(`fboxht',linewid*0.75)
-define(`farrowht',linewid*0.5)
-
- `Fbox( "text", wid expr ht expr,
- attributes ) The basic task box: arg1 may
- be 1 or more label strings. Attributes
- include box line and fill specs.
- To adjust the box size to the size of
- the typeset text, see the \boxdims macro
- in the manual. Example:
- Fbox("svg_it(x svg_symbol(&`#'60;) 1)",,
- shaded rgbstring(0.46,0.53,0.63))'
-define(`Fbox',`[ boxwid = fboxwid; boxht = fboxht
- Box: box `$2' ifelse(`$3',,`fill_(fillval)',`$3') `$1'
- N: Box.n; S:Box.s; E:Box.e; W: Box.w
- `$4']')
-
- `If-then
- Ftest( "text", wid expr ht expr, attributes )'
-define(`Ftest',`[boxwid = fboxwid*0.8; boxht = fboxht*1.4
- Box: box ifelse(`$2',,,`$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 then to last box.s then to last box.w then to last box.n \
- then to 0.5 between last box.n and last box.e \
- ifelse(`$3',,`fill_(fillval)',`$3')
- ifelse(`$1',,,`$1' at Box)
- `$4']')
-
- `case statement
- Fcase(wid expr ht expr,
- "Test string 1",task, ...,
- "Test string n",task)'
- `arg1 adjusts the size of the tests
- A task is a flow subchart with internal names .E and .S defined
- The test blocks are labeled Test1, Test2, ... and the tasks are
- labeled Task1, Task2, ... '
-define(`Fcase',`[ down; S: Here; sx = S.x
- Fcaseloop_(1,$@)
- ifelse(`$2',,`E:S; W:S; N:S',
- `E:(sx+linewid/2,Task1.E.y); W:Test1.W; N:Test1.N')
- Fcasearrow_(1,$@)
- arrow from E to (E,S) then to S ]')
-
- define(`Fcaseloop_',`ifelse(`$3',,,
- `Test`$1': Ftest(`$3',`$2') with .N at S
- Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,fboxht)/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)
- ifelse(`$5',,`line',`arrow') from Test`$1'.S to S
- sx = max(sx,Task`$1'.E.x)
- Fcaseloop_(incr($1),`$2',shift(shift(shift(shift($@)))))')')
- define(`Fcasearrow_',`ifelse(`$3',,,
- `arrow from Task`$1'.E to (E,Task`$1'.E)
- Fcasearrow_(incr($1),`$2',shift(shift(shift(shift($@)))))')')
-
- `while statement with explicit test
- Fwhiledo("test text", wid x ht y, attributes, task spec )
- The task structure is given label Task '
-define(`Fwhiledo',`[ down
- Test: Ftest(`$1',`$2',`$3')
- arrow right linewid/2 from Test.E
- Task: `$4' with .W at Here
- E: Task.E; W: Test.w; S: Test.S
- arrow up max(linewid/4,Test.n.y-Task.n.y+arrowht*1.5) \
- from Task.N then left Task.x-Test.x
- N: Here
- arrow to Test.n
- `$5']')
-
- `repeat statement with explicit test
- Frepeatuntil("test",wid x ht y,attributes, task spec )
- The task structure is given label Task '
-define(`Frepeatuntil',`[ N: Here
- Task: ifelse(`$4',,Here,`$4' with .N at N)
- W: Task.W
- arrow down linewid/3
- Test: Ftest(`$1',`$2',`$3')
- E: Task.E+(linewid/2+max(0,Test.e.x-Task.e.x),0)
- arrow from Test.e to (E,Test) then to E then to Task.E
- S: Test.S
- `$5']')
-
- `if-then-else
- Fifthenelse( "test", wid x ht y, attributes,
- left tasks, right tasks)
- The left task structure is given label Ltask and the right
- task structure is given label Rtask '
-define(`Fifthenelse',`[ Test: Ftest(`$1',`$2',`$3')
- N: Test.N
- Ltask: ifelse(`$4',,`Test.S; W:Test.W; LS:Ltask',
- `$4 with .ne at ((Test.W.x+Test.x)/2,Test.S.y)
- W: Ltask.W; LS:Ltask.S
- arrow from Test.W to (Ltask.N,Test.W) then to Ltask.N')
- Rtask: ifelse(`$5',,`Test.S; E:Test.E; RS:Rtask',
- `$5 with .nw at ((Test.E.x+Test.x)/2,Test.S.y)
- E: Rtask.E; RS: Rtask.S
- arrow from Test.E to (Rtask.N,Test.E) then to Rtask.N')
- S: (Test.x,min(LS.y,RS.y)-linewid/3)
- arrow from LS to (LS,S)
- arrow from RS to (RS,S)
- line to (LS,Here)
- `$6']')
-
-divert(0)dnl
.PS
-# Here is a test file exercising the above definitions
+# FlowSVG.m4
gen_init(svg_font(sans-serif,11bp__,2.5bp__))
+ifdef(`FlowchartDefs_',,`include(../FlowchartDefs.m4)')
-# Could use xcolor with option dvipsnames but define color here for portability
define(`Thistle',`rgbstring(0.85,0.75,0.85)')dnl
define(`RubineRed',`rgbstring(0.81,0,0.35)')dnl
define(`YellowGreen',`rgbstring(0.68,1,0.18)')dnl
define(`SeaGreen',`rgbstring(0.13,0.70,0.67)')dnl
define(`Goldenrod',`rgbstring(0.85,0.65,0.13)')dnl
+define(`Beaublue',`rgbstring(0.74,0.83,0.9)')dnl
+define(`Celadon',`rgbstring(0.67,0.88,0.69)')dnl
# Accented characters
define(`svg_ccedilla',`svg_symbol(&`#'231;)')dnl
@@ -145,9 +18,31 @@ define(`svg_atilde',`svg_symbol(&`#'227;)')dnl
linethick_(1.0)
arrowwid = 0.05
arrowht = 0.1
- fillval = 0.8
- down
-
+ fillval = 0.9
+ maxpsht = 20
+
+define(`shad',`shaded rgbstring(0.9,0.8,0.7)')
+define(`Below',`with .nw at last [].sw+(0,-0.25)')
+TL: Here
+Simple: [
+ Fbox("svg_tt(`Fbox')",,shad)
+ Ftest("svg_tt(``Ftest'')",,shad) Below
+ Fdata("svg_tt(``Fdata'')",,,shad) Below
+ Fprep("svg_tt(``Fprep'')",) Below
+ Fkeying("svg_tt(``Fkeying'')") Below
+ Fkeyboard("svg_tt(``Fkeyboard'')") Below
+ Fdocument("svg_tt(``Fdocument'')",,shaded rgbstring(0.9,0.8,0.7)) Below
+ Fdelay("svg_tt(``Fdelay'')",,shaded Beaublue) Below
+ Fdisplay("svg_tt(``Fdisplay'')",,shaded Celadon) Below
+ Fstored("svg_tt(``Fstored'')",,shaded Thistle) Below
+ Fconnect(,,shaded Thistle) Below
+ Fconnect("45",wid boxwid ht boxht:45,shaded Thistle) \
+ with .w at last [].e+(boxht/8,0)
+ "svg_tt(`Fconnect')" at last [].nw + (0,boxht/6)
+ ] with .nw at TL+(0.1,0); move from Simple.nw to TL
+
+#showbox_
+Complex: [
Case: Fcase(,
"Test 1",[Fbox("Task 1",, shaded Thistle); W:last [].W; N:last [].N
arrow down linewid/3 from last [].S
@@ -158,46 +53,42 @@ Case: Fcase(,
"Test 3",Fbox("Task 3",, shaded RubineRed)dnl
)
- "svg_it(.N)" at Case.N rjust above
- "svg_it(.S)" at Case.S rjust below
- "svg_it(.E)" at Case.E ljust
- "svg_it(.W)" at Case.W rjust
- "svg_it(Case statement)" below at Case.s+(0,-0.2)
- move to Case.nw+(-12bp__,10bp__)
+ "svg_it(.N)" at Case.N rjust above
+ "svg_it(.S)" at Case.S rjust below
+ "svg_it(.E)" at Case.E ljust
+ "svg_it(.W)" at Case.W rjust
+ "svg_tt(`Fcase')" below at Case.s #+(0,-0.1)
-Whiledo: Fwhiledo("svg_it(i svg_lt n)",,,Fbox("Task"),
- "T" above ljust at Test.E) \
+Whiledo: Fwhiledo("svg_it(i svg_lt n)",,,Fbox("Task"),"T" above ljust at Test.E) \
with .nw at Case.ne+(0.25,0)
"svg_it(.N)" at Whiledo.N rjust
"svg_it(.S)" at Whiledo.S rjust below
"svg_it(.E)" at Whiledo.E ljust
"svg_it(.W)" at Whiledo.W rjust
- "svg_it(While-do)" below at Whiledo.s+(0,-0.2)
+ "svg_tt(`Fwhiledo')" below at Whiledo.s
-Repeatuntil: Frepeatuntil("svg_it(n svg_geq 5)",,,Fbox("Task"),
- "T" at Test.E above ljust) with .nw at Whiledo.sw + (0.25,-1)
+Repeatuntil: Frepeatuntil("svg_it(n svg_gt 5)",,,Fbox("Task"),
+ "T" at Test.E above ljust) with .nw at Whiledo.sw + (0.25,-0.5)
"svg_it(.N)" at Repeatuntil.N rjust above
"svg_it(.S)" at Repeatuntil.S rjust below
"svg_it(.E)" at Repeatuntil.E ljust
"svg_it(.W)" at Repeatuntil.W rjust
- "svg_it(Repeat-until)" below at Repeatuntil.s+(0,-0.2)
+ "svg_tt(`Frepeatuntil')" below at Repeatuntil.se +(-0.0,0.2)
-Ifthenelse: Fifthenelse("svg_it(A`'svg_lt`'B)",,,
+Ifthenelse: Fifthenelse("svg_it(A svg_lt B)",,,
Fbox("False"),
Fbox("True",ht fboxht*1.2 wid fboxwid)dnl
- ) with .nw at Repeatuntil.sw +(0.5,-0.5)
+ ) with .nw at Repeatuntil.sw +(-0.5,-0.3)
- "svg_it(.N)" at Ifthenelse.N rjust above;
+ "svg_it(.N)" at Ifthenelse.N rjust above
"svg_it(.S)" at Ifthenelse.S below rjust
- "svg_it(.E)" at Ifthenelse.E ljust
+ "svg_it(.E)" wid 12bp__ at Ifthenelse.E ljust
"svg_it(.W)" at Ifthenelse.W rjust
- "svg_it(If-then-else)" at Ifthenelse.s+(0,-0.3) \
- "svg_it((the True and False tasks are optional))"
+ "svg_tt(`Fifthenelse')" below at Ifthenelse.s+(0,-0.15)
-# Compound statement:
-[ right
+Compound: [ right
ellipse shaded YellowGreen "Start"
arrow right linewid/2
@@ -212,18 +103,18 @@ Ifthenelse: Fifthenelse("svg_it(A`'svg_lt`'B)",,,
"T" at Test.E above ljust),
"T" at Test.E above ljust) with .N at Here
- A: arrow down 0.25 from last [].S ] with .nw at Case.sw + (-12bp__,-0.7)
+ A: arrow down 0.25 from last [].S ] with .nw at Case.sw + (-12bp__,-0.3)
+
+ "svg_it(Compound statements)" at last [].A.end+(0.1,0) ljust above
- "svg_it(Compound statement)" below at last [].A.end
+ ] with .nw at Simple.ne+(0.1,0)
Example: [ fillvalue = 0.8; awid = linewid/2; right_
Start: ellipse wid boxwid/2 ht boxwid/3 shaded "green"
arrow right_ awid
B1: Fbox("Planejamento")
- 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)
+ 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,
shaded YellowGreen,
@@ -241,14 +132,13 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_
arrow from B2.E to (RT.N,B2.E) then to RT.N
arrow from RT.W to (B2.S,RT.W) then to B2.S
arrow from RT.E to (B3.S,RT.E) then to B3.S
- B4: Fbox("Extra`'svg_ccedilla`'svg_atilde`'o") \
- with .S at B3.N+(0,awid)
+ B4: Fbox("Extra`'svg_ccedilla`'svg_atilde`'o") with .S at B3.N+(0,awid)
arrow from B3.N to B4.S
- arrow right_ awid from B4.E
+ arrow up_ awid from B4.N
B5: Fbox("Conclus`'svg_atilde`'o")
- 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 [].sw+(0,-fboxht)
+ 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)
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FourbarSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FourbarSVG.m4
new file mode 100644
index 00000000000..208e8178222
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/FourbarSVG.m4
@@ -0,0 +1,59 @@
+.PS
+# FourbarSVG.m4
+# https://tex.stackexchange.com/questions/563831/how-to-draw-four-bar-linkage-with-center-of-mass
+gen_init
+scale = 25.4
+
+ a = 18
+ b = 73
+ c = 47
+ d = 72
+ A0: Here
+ B0: A0+(d,0)
+ circlerad = 1
+
+define(`pivot',`[
+ C: circle
+ line down_ 4 from C+(2,0)
+ arc from last line.start to C+(-2,0) with .c at C
+ line down_ 4
+ B: line thick 1.6 right 7 with .c at (C,Here)
+ thinlines_
+ sep = 0.9
+ nhash = B.len/sep
+#for i=0 to nhash do { line down sep left sep from B.start+(i/nhash*B.len,0) }
+ for i=0 to nhash do { line down sep left sep from B.end-(i/nhash*B.len,0) }
+ thicklines_
+ ]')
+
+ pivot with .C at A0; "svg_it(A`'svg_sub(0))" at A0-(5,0)
+ circle dashed rad a at A0
+ pivot with .C at B0; "svg_it(B`'svg_sub(0))" at B0-(5,0)
+ "svg_it(d = A`'svg_sub(0)B`'svg_sub(0))" at 0.5<A0,B0>
+
+ B1: Cintersect(A0,a+b,B0,c)
+ B2: Cintersect(A0,b-a,B0,c)
+ arc dashed from B1 to B2 with .c at B0
+
+ A0B1: line thick 1.6 from A0 to B1 chop 2 chop
+ line thick 1.6 from B0 to B1 chop 2 chop "svg_it(c)" ljust
+ circle fill_(1) at B1; "svg_it(B`'svg_sub(1))" wid 3 at B1+(5,0)
+ A1: circle fill_(1) at LCintersect(A0B1,A0,a,R)
+ "svg_it(A`'svg_sub(1))" at A1+(5,0)
+
+ A2: b/(b-a) between B2 and A0; "svg_it(a)" at 0.4<A2,A0> above rjust
+ "svg_it(b)" at 0.4<A1,B1> above rjust
+ A2B2: line thick 1.6 from A2 to B2
+ line thick 1.6 from B0 to B2 chop 2 chop 0
+ circle fill_(1) at B2; "svg_it(B`'svg_sub(2))" at B2+(5,0)
+ circle fill_(1) at A2; "svg_it(A`'svg_sub(2))" at A2+(5,0)
+
+ thinlines_
+ line from B0+(3,0) right 4
+ ArcAngle(Here,B0,B1,5) ->; "svg_psi`'svg_sub(0)" at last arc.ne above ljust
+ ArcAngle(B1,B0,B2,8) ->; "svg_psi" at last arc.n+(-3,0) above
+ ArcAngle(A1,A0,B2,b*0.45) ->; "svg_theta" at last arc.start+(0,4)
+ line from A0+(3,0) right 8
+ ArcAngle(Here,A0,B1,9) -> ; "svg_theta`'svg_sub(0)" at last arc.start+(2,2)
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
new file mode 100644
index 00000000000..ae0a661012d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
@@ -0,0 +1,46 @@
+.PS
+# Geometry.m4
+gen_init
+ scale = 5/4
+
+ A: Here; "A" at A above
+ B: A+(-1,-3.5); "B" at B below rjust
+ C: B+(4.6,0); "C" at C below ljust
+ AB: line from A to B
+ BC: line from B to C
+ CA: line from C to A
+
+ PerpTo(A,BC,L); "L" at L below
+ AL: line from A to L; RightAngle(A,L,C)
+
+ angleLAC = atan2(C.x-L.x,A.y-L.y)
+ S: move from A to (sin(angleLAC/2),-cos(angleLAC/2))
+ AW: line from A to Intersect_(S,BC)
+ W: Here; "W" at W below rjust
+
+ PerpTo(C,AB,N); "N" at N above rjust
+ CN: line from C to N; RightAngle(C,N,B)
+
+ PerpTo(B,CA,M); "M" at M above
+ CM: line from B to M; RightAngle(B,M,C)
+
+ H: Intersect_(CN,AL); "H" at H +(4bp__,10bp__)
+
+ thinlines_
+ Equidist3(B,L,N,CC1,c1rad); C1: circle rad c1rad at CC1
+ Equidist3(B,W,N,CC2,c2rad); C2: circle rad c2rad at CC2
+ Equidist3(B,C,N,CC3,c3rad); C3: circle rad c3rad at CC3
+ Equidist3(W,C,M,CC4,c4rad); C4: circle rad c4rad at CC4
+ thicklines_
+
+ Z: LCintersect(AW,CC2,C2.rad); "Z" at Z+(-5bp__,-5bp__)
+ HZ: move from H to Z
+ Y: LCintersect(HZ,CC4,C4.rad,R); "Y" at Y above
+ X: LCintersect(HZ,CC2,C2.rad); "X" at X above rjust
+
+ Loopover_(`P',`dot(at P)',X,Y,Z)
+
+ line dashed from X to Y chop -linewid/2
+ RightAngle(A,Z,Y)
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/JackSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/JackSVG.m4
index ea14a04e597..6af8b6b3017 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/JackSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/JackSVG.m4
@@ -1,6 +1,6 @@
.PS
# `Jack.m4'
-cct_init(svg_font(sans-serif,11bp__))
+cct_init(svg_font(sans-serif,10bp__))
P: [
P1: plug
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/LyapSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/LyapSVG.m4
new file mode 100644
index 00000000000..6ed269a428a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/LyapSVG.m4
@@ -0,0 +1,159 @@
+.PS
+# Lyap.m4
+threeD_init
+scale = 1/1.2
+
+viewaz = 30
+viewel = 18
+setview(viewaz,viewel)
+
+Origin: project(0,0,0)
+# Components of view vector W
+w1 = view3D1
+w2 = view3D2
+w3 = view3D3
+# Shape factor of the ellipse on the xy plane
+q = Cos(40)
+
+# cost function
+h = 0.5
+c = 1
+# The projected ellipse is (x/q)^2 + y^2 = c.
+# The cost is v = c+h
+define(`vs',``$2'*q*cos(`$1'),`$2'*sin(`$1')')
+define(`vp',`vs(`$1',`$2'),0')
+define(`vx',`sum3D(vp(`$1',`$2'),0,0,h+(`$2')^2)')
+
+# The gradient of v is (2x/q, 2y, -1) and the line
+# separating front and back is W^T * grad(v) = 0
+# This line intersects the projected ellipse at
+# x1,y1 and x2,y2
+ ap = w2^2*q^2/w1^2+1
+ bp = -w2*w3*q^2/w1^2
+ cp = w3^2*q^2/4/w1^2-c
+ m = sqrt(bp^2-4*ap*cp)
+ y1 = (-bp+m)/ap/2 ; x1 = (w3-2*y1*w2)*q/2/w1
+ y2 = (-bp-m)/ap/2 ; x2 = (w3-2*y2*w2)*q/2/w1
+ t1 = atan2(y1,x1)
+ t2 = atan2(y2,x2)
+ theta1 = min(t1,t2)
+ theta2 = max(t1,t2)
+
+# tangent curve
+ nT = 11
+ for i = 0 to nT do {
+ y = y1 + (y2-y1)/nT*i
+ theta = atan2(y,(w3-2*y*w2)*q/2/w1)
+ r = y/sin(theta)
+ T[i]: project(vx(theta,r))
+ }
+
+# front and back parts of the top curve
+ n = 12
+ for i = 0 to n do {
+ theta = theta1 + (theta2-theta1)/n*i
+ F[i]: project(vx(theta,c))
+ Fp[i]: project(vp(theta,c))
+ }
+ for i = 0 to n do {
+ theta = theta2 + (theta1+twopi_-theta2)/n*i
+ B[i]: project(vx(theta,c))
+ Bp[i]: project(vp(theta,c))
+ }
+
+# trajectory
+rotations = 1.55
+nx = 7
+thetas = 75*dtor_
+thetaf = thetas - rotations*twopi_
+rx = c*0.9
+beta = exp(log(.5)/20)
+
+define(`defX',` rx = `$5' ; np = np-1
+ ts = `$1' ; tf = `$2'
+ for i = 0 to `$3' do {
+ tha = ts + (tf-ts)*i/(`$3')
+ for thx = tha to -twopi_ by twopi_ do {}
+ `$4'[i]: project(vx(thx,rx))
+ Xp[np]: project(vp(thx,rx))
+ np = np+1
+ rx = beta*rx
+ }')
+
+np = 1
+defX(thetas,theta1,nx,X1,rx)
+defX(theta1,theta2-twopi_,nx,X2,rx/beta)
+defX(theta2-twopi_,theta1-twopi_,nx,X3,rx/beta)
+defX(theta1-twopi_,thetaf,5,X4,rx/beta)
+
+# First draw the inside back
+# B is the back curve
+# T is the outline
+ifpstricks(`
+\psset{gradbegin=lightgray,gradend=darkgray,gradlines=1000}
+\pscustom[fillstyle=gradient,gradmidpoint=0.7]{
+ fitcurve(B,n)
+ for i = 0 to nT do {TT[i]: T[nT-i] }
+ fitcurve(TT,nT)
+\relax} ',
+` fitcurve(B,n)
+ for i = 0 to nT do {TT[i]: T[nT-i] }
+ fitcurve(TT,nT) ')
+
+# Centre axis
+thinlines_
+line from Origin to project(0,0,h)
+# F[0] is the leftmost point of the front curve
+line from F[0] to Fp[0]
+# F[n] is the rightmost point of the front curve
+line from F[n] to Fp[n]
+thicklines_
+
+# Now draw the outside front
+ifpstricks(`
+\newgray{gray1}{0.9}%
+\newgray{gray2}{0.4}%
+\psset{gradbegin=gray1,gradend=gray2,gradlines=1000}
+\pscustom[linewidth=0pt,fillstyle=gradient,gradmidpoint=0.99]{
+ fitcurve(F,n)
+ fitcurve(T,nT)
+\relax} ',
+` shade(1,fitcurve(F,n)
+ fitcurve(T,nT)) ')
+# T is the limit curve of visibility
+ fitcurve(T,nT)
+# F is the top front
+ fitcurve(F,n)
+# Front and back projections of the top on xy
+ fitcurve(Fp,n)
+ fitcurve(Bp,n)
+
+# The trajectory in pieces, to allow dashed parts
+ fitcurve(X1,nx)
+ fitcurve(X2,nx,dotted 0.025)
+ fitcurve(X3,nx)
+ fitcurve(X4,3,dotted 0.015)
+ arca(from X4[4] to X4[2],ccw,0.3,<-)
+
+# Projected trajectory
+ np = np-2
+ fitcurve(Xp,np-1)
+ arca(from Xp[np] to Xp[np-2],ccw,0.18,<-)
+ "svg_it(X(t))" at Xp[np]-(2bp__,0) ljust
+
+# Axes and vertical lines
+thinlines_
+ line from X1[0] to Xp[0]
+arrow from Origin to project(1.5,0,0)
+"svg_it(x)`'svg_sub(1)" rjust below
+arrow from Origin to project(0,1.5,0)
+"svg_it(x)`'svg_sub(2)" wid 10bp__ ljust
+line dashed from project(0,0,h) to F[n/2] chop 0 chop arrowht/4
+arrow from F[n/2] to project(0,0,2)
+"svg_it(v(X))" ljust
+
+"svg_it(0)" at Origin+(0,1 pt__) below
+"svg_Omega" at project(0,0.9*c,0) above
+"svg_it(v(X) = c)" at (project(vp(100*dtor_,c)))+(2bp__,0) above ljust
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4
index cececf42b5c..8fcff10ea18 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MCSVG.m4
@@ -1,5 +1,5 @@
.PS
-#MC.m4
+#MCSVG.m4
cct_init(svg_font(Times,11bp__))
textoffset = 3bp__
@@ -44,50 +44,52 @@ MC:[
]
Three: [
+ gapht = 4*dimen_
dv = dimen_*0.6
- dh = dimen_
+ dh = dimen_*5/6
define(`swfet',`mosfet(`$1',,dMEDSuBQPy)')
define(`swpair',`[ up_
BS: swfet(up_ dimen_); { "`$1'" at BS.D-(0,2bp__) rjust }
- L: line up_ 3*dimen_ from BS.D
+ L: line up_ gapht-2*dimen_ from BS.D
TS: swfet(up_ dimen_) with .S at Here; { "`$2'" at TS.S+(0,2bp__) rjust }
T: TS.D
B: BS.S
C: L.c
]')
- V1: gap(up_ 5*dimen_,1,A)
+ V1: gap(up_ gapht,1,A)
{ "svg_it(V)svg_sub(1)" wid 12bp__ at last arrow.c rjust }
- line right_ dh/2
+ line right_ dimen_/2
{ C1: capacitor(down_ to (Here,V1.start)); llabel(svg_it(C)svg_sub(1)) }
for_(1,3,1,`
- line right_ dh ifelse(m4x,1,,*5/4)
+ line right_ dimen_ ifelse(m4x,1,,*5/4)
{SP1`'m4x: swpair(svg_it(S`'svg_sub(1`'eval(m4x+3))),
svg_it(S`'svg_sub(1`'m4x))) with .T at Here
- dot(at last [].C + (0,(2-m4x)*dh))
- line right_ (3-m4x)*dh*5/4
+ dot(at last [].C + (0,(2-m4x)*dh))
+ line right_ (3-m4x)*dimen_*5/4+dimen_/4
inductor(right_ dimen_,L)
{sprintf("svg_it(L`'svg_sub(1&`#'%g;,70%))",64+m4x) at last [].n+(0,8bp__)}
- line down_ (2-m4x)*dimen_*2/3
+ line down_ (2-m4x)*dh*2/3
pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_')
- line down_ (2-m4x)*dimen_/3
+ line down_ (2-m4x)*dh/3
M: move right_ dimen_/8
- line up_ (2-m4x)*dimen_/3
+ line up_ (2-m4x)*dh/3
pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_')
- line up_ (2-m4x)*dimen_*2/3
+ line up_ (2-m4x)*dh*2/3
inductor(right_ dimen_,L)
{sprintf("svg_it(L`'svg_sub(2&`#'%g;,70%))",64+m4x) at last [].n+(0,8bp__)}
- line right_ dimen_/8+(m4x-1)*dh*5/4
+ line right_ dimen_/8+(m4x-1)*dh*5/4 + dimen_/4
dot
SP2`'m4x: swpair(svg_it(S`'svg_sub(2`'eval(m4x+3))),
- svg_it(S`'svg_sub(2`'m4x))) with .C at Here+(0,(m4x-2)*dh) }
+ svg_it(S`'svg_sub(2`'m4x))) \
+ with .C at Here+(0,(m4x-2)*dh) }
')
"svg_it(T)svg_sub(r)" at M.c+(0,dimen_*2/3)
line from V1.start to SP13.B
line from SP21.B to SP23.B+(dh*3/4,0)
{ C2: capacitor(up_ to (Here,V1.end)); llabel(,,svg_it(C`'svg_sub(2))) }
- line right_ dh/2
- gap(up_ 5*dimen_,1,A)
+ line right_ dimen_/2
+ gap(up_ gapht,1,A)
{ "svg_it(V`'svg_sub(2))" wid 12bp__ at last arrow.c ljust }
line to SP21.T chop dotrad_ chop 0
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
index 4471d513f47..4436cd1aa53 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
@@ -1,15 +1,18 @@
LIBDIR = $$HOME/lib
M4LIBS = svg.m4 SVGconfig.m4
M4LIBS = svg.m4
+M4 = m4
+# PDFCONVERT = pdf2svg
+PDFCONVERT = dvisvgm
# To process a single file, copy it to test.m4 and type "make tst"
# to produce tstSVG.html
DPIC = dpic
-#DPIC = $$HOME/dpic/build/p2c/ftp/dpic
-#DPIC = ../../../dpic/build/p2c/ftp/dpic
+#DPIC = $$HOME/dpic/pascal/p2c/ftp/dpic
+#DPIC = ../../../dpic/pascal/p2c/ftp/dpic
#DPIC = ../../../dpic/bison/dpic
-#DPIC = ../../../dpic/bdev/dpic
+#DPIC = ../../../dpic/bi*dev/dpic
# To test the Windows executable. Change these as needed for the operating
# system. NOTE: AntiqueClockSVG.m4 and Connectors.m4 use awk and sed which
@@ -17,7 +20,7 @@ DPIC = dpic
# M4LIBS = svg.m4 windows.m4
# DPIC = ../../../dpic/bison/distsrc/Windows/dpic
-.SUFFIXES: .pic .svg .m4
+.SUFFIXES: .pic .svg .m4 .xsvg
.pic.svg:
$(DPIC) -v $*.pic > $*.svg
grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz
@@ -25,6 +28,25 @@ DPIC = dpic
m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
$(DPIC) -v $*.pic > $*.svg
grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz
+.m4.xsvg:
+ touch F_$*.dim
+ $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic
+ $(DPIC) -g $*.pic >> $*.tex
+ echo "\documentclass[crop,tikz,multi=false]{standalone}" > F_$*.tex
+ echo "\usepackage{boxdims,siunitx,amssymb}" >> F_$*.tex
+ echo "\begin{document}" >> F_$*.tex
+ echo "\input $*.tex" >> F_$*.tex
+ echo "\end{document}" >> F_$*.tex
+ pdflatex --quiet F_$*
+ $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic
+ $(DPIC) -g $*.pic >> $*.tex
+ pdflatex --quiet F_$*
+ if test "$(PDFCONVERT)" = "pdf2svg" ; then \
+ pdf2svg F_$*.pdf $*.xsvg && cp $*.xsvg $*.svg ; \
+ else \
+ dvisvgm --pdf F_$*.pdf && mv F_$**.svg $*.svg ; cp $*.svg $*.xsvg ; \
+ fi
+ rm -f F_$**
CCTSVG = \
AdderSVG.svg AlogixSVG.svg ABlogixSVG.svg AmpTableSVG.svg AntennasSVG.svg \
@@ -35,16 +57,17 @@ CCTSVG = \
CountingSVG.svg CrossbarSVG.svg CrowSVG.svg CsourceSVG.svg \
DecoderSVG.svg DemultiplexerSVG.svg DiniSVG.svg DiodesSVG.svg DriveSVG.svg \
EmarrowsSVG.svg \
- FlowSVG.svg FontsSVG.svg FusesSVG.svg GrayCodeSVG.svg GroundsSVG.svg \
+ FlowSVG.svg FontsSVG.svg FusesSVG.svg \
+ GeometrySVG.svg GrayCodeSVG.svg GroundsSVG.svg \
HeadersSVG.svg HeathkitSVG.svg InclepsSVG.svg I2LSVG.svg JackSVG.svg \
- LogicSVG.svg LoglogSVG.svg \
+ LyapSVG.svg LogicSVG.svg LoglogSVG.svg \
MCSVG.svg MixerSVG.svg MotorControlSVG.svg MultiplexerSVG.svg \
NLGSVG.svg NPDTSVG.svg NportSVG.svg OpampSVG.svg OptoisoSVG.svg \
PconnSVG.svg PushPullSVG.svg QuantumSVG.svg \
RectifiersSVG.svg RelaySVG.svg RotboxSVG.svg\
SchottkySVG.svg ShiftRSVG.svg SierpinskiSVG.svg \
SixpoleSVG.svg SourcesSVG.svg SQUIDSVG.svg SwitchesSVG.svg \
- TTLnandSVG.svg TgateSVG.svg TtreeSVG.svg ThreeSVG.svg TimerSVG.svg \
+ TTLnandSVG.svg TgateSVG.svg ThreeSVG.svg \
TubediagsSVG.svg VariableSVG.svg WindingsSVG.svg XformSVG.svg \
controlSVG.svg cscSVG.svg diamondSVG.svg ex00SVG.svg \
ex01SVG.svg ex02SVG.svg ex03SVG.svg ex04SVG.svg ex05SVG.svg ex06SVG.svg \
@@ -53,10 +76,12 @@ CCTSVG = \
expSVG.svg fetSVG.svg graysurfSVG.svg lcctSVG.svg \
pwrsupplySVG.svg quickSVG.svg randomSVG.svg recycleSVG.svg relaycoilSVG.svg \
roseSVG.svg sfgSVG.svg shapesSVG.svg paletteSVG.svg \
- thyristorSVG.svg ujtSVG.svg wormSVG.svg XORSVG.svg Np.svg
+ thyristorSVG.svg ujtSVG.svg UNOSVG.svg wormSVG.svg XORSVG.svg Np.svg \
+ Y14-5SVG.svg
examplesSVG.html: examplesSVG.htmx
- make $(CCTSVG)
+ cp ../quick.m4 .
+ make $(CCTSVG) quick.xsvg
Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \
sed -e 's/Version XXX/Version '$$Version'/' examplesSVG.htmx \
| m4 > examplesSVG.html
@@ -112,7 +137,8 @@ Incleps.png:
clean:
@printf "\n svg clean:\n"
rm -f *.svg *.dim *.ps *log *.siz *.pic examplesSVG.html Incleps.png
- rm -f tstSVG.html copy_tmp__
+ rm -f tstSVG.html copy_tmp__ quick.m4 quick.xsvg
+ rm -f *.otf xx* *png *.pdf *.css *.xml quick.tex
@printf "\n"
clobber: clean
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/OpampSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/OpampSVG.m4
index 65ea9233b07..7137e428cef 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/OpampSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/OpampSVG.m4
@@ -29,7 +29,7 @@ cct_init(svg_font(sans-serif,11bp__))
"`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.75 at D.s-(0,0.25)
+ "`opamp(,,,,T)'" wid 0.85 at D.s-(0,0.25)
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4
index b0fdb65e803..43fb2d20ebe 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4
@@ -31,7 +31,7 @@ P1: [
C7: pconnex(U,J) with .w at last [].e+(0.25,0)
`"(U,J)"' at last [].s below
C8: pconnex(U,JF) with .w at last [].e+(0.25,0)
- `"(U,JF)"' wid 21bp__ at last [].s below
+ `"(U,JF)"' wid 28bp__ at last [].s below
]
P2: [
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNO.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNO.m4
new file mode 100644
index 00000000000..60689f15ec3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNO.m4
@@ -0,0 +1,265 @@
+.PS
+# UNOSVG.m4
+log_init
+include(../ics.m4)
+textoffset = 1.5bp__
+svg_font(sans-serif,9.0bp__,textoffset)
+
+divert(-1)
+
+ `Header([1|2][A],rows,wid,ht,type)
+ arg1: number of columns; A= type A
+ arg2: pins per column
+ arg3,4: custom wid, ht
+ arg5: eg fill_(0.9)'
+define(`Header',
+`[ define(`m4tp',ifinstr(`$1',A,A))define(`m4Hq',patsubst(`$1',A))dnl
+ define(`m4Hn',`ifelse(m4Hq,,1,m4Hq)')dnl
+ define(`m4Hm',`ifelse(`$2',,2,`$2')')dnl
+ define(`m4Hw',`ifelse(`$3',,`m4Hn*L_unit*3',`($3)')')dnl
+ define(`m4Hh',`ifelse(`$4',,`m4Hm*L_unit*3',`($4)')')dnl
+ Block: rotbox(m4Hw,m4Hh,`$5')
+ ifelse(`m4tp',A,`pushdef(`L_unit',(linewid/6))')
+ define(`m4Hct',1)dnl
+ for_(1,m4Hm,1,
+ `HeaderPin(Block.NW+vec_(L_unit*3/2,-(m4x-1/2)*m4Hh/m4Hm),
+ eval(m4Hct-1), P`'m4Hct,w) define(`m4Hct',incr(m4Hct))
+ ifelse(m4Hn,2,`HeaderPin(Block.NE+vec_(-L_unit*3/2,-(m4x-1/2)*m4Hh/m4Hm),
+ 1, P`'m4Hct,e) define(`m4Hct',incr(m4Hct))') ')
+ ifelse(`m4Hq',A,`popdef(`L_unit')')
+ `$6' ]')
+ `HeaderPin(location,type,Picname,
+ n|e|s|w,[length][;pinsize])
+ arg2: 0= square'
+define(`HeaderPin',
+ `ifinstr(`$5',;,
+ `stacksplit_(`m4Hdr',`$5',;)dnl
+ define(`m4Hps',ifelse(m4Hdr,,`L_unit',m4Hdr))popdef(`m4Hdr')dnl
+ define(`m4Hpl',ifelse(m4Hdr,,`lg_plen*L_unit',m4Hdr))popdef(`m4Hdr') ',
+ `define(`m4Hps',L_unit)dnl
+ define(`m4Hpl',`ifelse(`$5',,lg_plen*L_unit,`$5')')')dnl
+ ifelse(`$1',,,`move to `$1';')
+ ifelse(`$3',,,`$3':) line to ifelse(
+ `$4',n,`rvec_(0,m4Hpl)', `$4',e,`rvec_(m4Hpl,0)',
+ `$4',s,`rvec_(0,-m4Hpl)', `rvec_(-m4Hpl,0)')
+ ifelse(`$3',,,Pin`$3':) ifelse(ifelse(`$2',,0,`$2'),0,
+ `rotbox(m4Hps,m4Hps,fill_(1))',
+ `circle diam m4Hps fill_(1)') at last line.start ')
+
+define(`brdge',`eleminit_(`$1')
+ define(`m4h',ifelse(`$2',,`sourcerad_',`($2)/2'))dnl
+ { line to rvec_(rp_len/2-m4h/2,0)
+ move to rvec_(m4h/2,0)
+ for m4ng=75 to 255 by 180 do {{
+ m4fshade(0, arc cw from rvec_(Rect_(m4h/2,m4ng)) \
+ to rvec_(Rect_(m4h/2,-m4ng)) \
+ with .c at Here ) }}
+ line from rvec_(m4h/2,0) to rvec_(rp_len/2,0) }
+ { [box invis ht_ m4h wid_ m4h] at rvec_(rp_len/2,0) }
+ line to rvec_(rp_len,0) invis ')
+
+define(`ATMEGA16U2',`[
+ Chip: box wid 10*lg_pinsep ht 25*lg_pinsep
+ Loopover_(`x',
+ `Arightpin(patsubst(x,;,`,'))',
+ 6;PD0, 7;PD1, 8;PD2, 9;PD3, 10;PD4, 11;PD5, 12;PD6, 13;PD7,
+ 131;nul,
+ 5;PC2, 26;PC4, 25;PC5, 23;PC6, 22;PC7,
+ 132;nul,
+ 133;nul,
+ 14;PB0, 15;PB1, 16;PB2, 17;PB3, 18;PB4, 19;PB5, 20;PB6, 21;PB7)
+ Loopover_(`x',
+ `Aleftpin(patsubst(x,;,`,'))',
+ 33;PAD,
+ 100;nul,
+ 28;UGND, 29;D`'svg_it(+), 30;D`'svg_it(-), 31;UVCC, 27;UCAP,
+ 101;nul, 102;nul,
+ 3;GND, 4;VCC, 103;nul,
+ 104;nul,
+ 32;AVCC,
+ 105;nul, 106;nul,
+ 1;XTAL1,
+ 107;nul,
+ 2;XTAL2(PC0),
+ 108;nul, 109;nul)
+ lg_pin(Pin109+(0,lg_pinsep),RESET,Pin24,wN,24,pinlen)
+ ]')
+define(`Aleftpin',`move to Chip.sw+(0,m4Lx*lg_pinsep)
+ Pin`$1': ifelse(`$2',nul,Here,dnl
+ `line left pinlen "`$1'" above
+ "`$2'" ljust at last line.start')')
+define(`Arightpin',`move to Chip.se+(0,m4Lx*lg_pinsep)
+ Pin`$1': ifelse(`$2',nul,Here,dnl
+ `line right pinlen "`$1'" above
+ "`$2'" rjust at last line.start')')
+
+define(`ATMEGA328P',`[
+ Chip: box wid 10*lg_pinsep ht 23*lg_pinsep
+ Loopover_(`x',
+ `Arightpin(patsubst(x,;,`,'))',
+ 2;PD0, 3;PD1, 4;PD2, 5;PD3, 6;PD4, 11;PD5, 12;PD6, 13;PD7,
+ 100;nul,
+ 23;PC0, 24;PC1, 25;PC2, 26;PC3, 27;PC4, 28;PC5,
+ 101;nul,
+ 14;PB0, 15;PB1, 16;PB2, 17;PB3, 18;PB4, 19;PB5)
+ Loopover_(`x',
+ `Aleftpin(patsubst(x,;,`,'))',
+ 201;nul, 202;nul, 203;nul, 204;nul, 205;nul, 206;nul, 207;nul, 208;nul,
+ 209;nul,
+ 8;GND, 7;VCC,
+ 301;nul,
+ 22;AGND, 20;AVCC, 21;AREF,
+ 302;nul,
+ 9;XTAL1,
+ 303;nul,
+ 9;XTAL2,
+ 304;nul, 305;nul)
+ lg_pin(Pin305+(0,lg_pinsep),RESET,Pin1,wN,1,pinlen)
+ ]')
+
+divert(0)dnl
+
+ maxpswid = 20
+ maxpsht = 20
+
+ define(`pinlen',`30bp__')
+ define(`lg_pinsep',(1.2*lg_pinsep))
+ del = lg_pinsep
+
+ U3: ATMEGA16U2
+ `"ATMEGA16U2-MU(R)"' at U3.Chip.s below
+ `"U3"' at U3.Chip.nw ljust above
+ ZU4: ATMEGA328P with .Chip.nw at U3.Chip.sw+(0,-1)
+ `"ATMEGA328P-PU"' at ZU4.Chip.s below
+ `"ZU4"' at ZU4.Chip.nw ljust above
+
+ dot(at U3.Pin2.end)
+ R1: resistor(down_ 2*lg_pinsep,,E)
+ rlabel(,"R1" rjust "1M" rjust)
+ dot
+ dot(at R1.start-(2*del,0))
+ xtal(down_ 2*lg_pinsep)
+ rlabel(16,,MHz); dot
+ XT2: dot(at last line.start-(2*del,0)); { "XT2" at last [].n above }
+
+ Br1: brdge(from U3.Pin33.end to (XT2,U3.Pin33)); BRE: dot
+ line to (Here,U3.Pin28) then to U3.Pin28.end
+ {"UGND" at (Br1,Here) above}
+
+ XT1: dot(at XT2-(del,R1.len)); { "XT1" at last [].n above }
+ line from XT1 to U3.Pin1.end
+ line from U3.Pin2.end to (XT1,XT2)
+ C11: capacitor(left_ 3*del); rlabel(,C11); llabel(,22pF)
+ C9: capacitor(from XT1 to (Here,XT1)); {"C9" "22pF" at last [].s+(0,-11bp__)}
+ { line to C11.end }
+ dot
+ G1: ground(,,E); { "GND" at last line.c below }
+ line from XT1 down_ 3*del; continue to (G1,Here); dot(,,1)
+ {"XT3" at last [].n above}
+ dot(at Here+(0,-3/2*del),,1); {"XT4" at last [].n above}
+ { line to (XT2,Here) then to XT2 chop dotrad_ chop 0 }
+ USBVCC: dot(at Here+(0,-7/2*del),,1)
+ {"USBVCC" at last [].n-(3/2*del,0) above ljust}
+ { line to (Here,U3.Pin31) chop dotrad_ chop 0; continue to U3.Pin31.end }
+ dot(at Here+(2*del,0),,1); {"VUCAP" at last [].e+(0,-5bp__) ljust}
+ line to (Here,U3.Pin27) chop dotrad_ chop 0; dot
+ line from U3.Pin27.end to (G1.x-4.5*del,U3.Pin27.y)
+ C8: capacitor(down_ to (Here,Br1)); llabel(C8,,1`'svg_micro)
+ Bus1: dot
+
+ dot(at U3.Pin33.end)
+ move to U3.Pin3.end; line to (Here,U3.Chip.s)
+ G2: ground(,T,E); {"GND" at last line.c below }
+
+ dot(at U3.Pin32.end)
+ {line to U3.Pin4.end; dot}
+ line left del; ground(,,E,U); {"svg_it(+)5V" at last line.c above}
+
+ G3: ground(at (C8.x-del,G2.y),T,E); {"GND" at last line.c below }
+ capacitor(up_ to (Here,C8.start)); { llabel(100n,,C7) }
+ line to (Here,U3.Pin4) then to U3.Pin4.end
+
+ line from U3.Pin30.end to (G1.x-2*del,U3.Pin30.y); continue to (Here,U3.Pin1)
+ { "RD`'svg_it(-)" above rjust }; continue left_ 2*del
+ RN3A: resistor(left_ 3/2*dimen_,,E); rlabel(,22R RN3A)
+ Dm: line left_ 7*del
+
+USB: [ K: box invis wid dimen_/2 ht 5*lg_pinsep
+ "USB" rjust at K.e
+ line thick 1.5 from K.nw to K.ne then to K.se then to K.sw
+ Loopover_(`x',
+ `Pin`'m4Lx: K.ne-(0,m4Lx/5*K.ht)
+ "x" at Pin`'m4Lx ljust above',
+ 1 XUSB, 2 D`'svg_it(-), 3 D`'svg_it(+), 4 UGND)
+ P_1: K.sw; {"P$`1'" at P_1 below rjust}
+ P_2: K.s; {"P$`2'" at P_2 below ljust}
+ ] with .Pin2 at Here; "X2" at USB.ne above rjust
+
+ move to U3.Pin29.end
+ line to (G1.x-3*del,Here.y); continue to (Here,Dm-(0,lg_pinsep))
+ { "RD`'svg_it(+)" above rjust}
+ continue to (RN3A.start,Here)
+ RN3D: resistor(left_ 3/2*dimen_,,E); llabel(,22R RN3D)
+ line to USB.Pin3
+
+ dot(at RN3A.end); line to (Here,RN3D)
+ Z2: variable(`resistor(down_ to (Here,U3.Pin27),,E); rlabel(Z2)',NN)
+ dot(at RN3D.end-(2*del,0))
+ Z1: variable(`resistor(to (Here,U3.Pin27),,E); rlabel(Z1)',NN)
+ dot; line to (Z2,Here)
+ move up Z1.len/4 from last line.c; "CG0603MLC-05E" "X 2"
+
+ line down_ del from USB.P_1; continue to (USB.P_2,Here); dot
+ line from USB.P_2 to (USB.P_2,Z1.end) then to Z1.end
+ dot(at (USB.P_2,Here)+(3/2*del,0)); line to (Here,USBVCC)
+ dot(,,1); {"USHIELD" at last [].n+(4bp__,0) above}
+
+ L1: reversed(`inductor',down_ from Z1.end to (Z1,C8.end),W,,M)
+ rlabel(L1); llabel( BLM21); dot
+ { dot(at (Z2,Here)); line to (Here,U3.Pin28); dot(,,1)
+ "UGND" at last [].n above }
+ line from USB.Pin1 to (Z2,USB.Pin1) then up 2*del
+ XUSB: dot(,,1); {"XUSB" at last [].n above}
+ line from (Z1,USB.Pin3) to (Z1,XUSB);
+ DP: dot(,,1); {"D`'svg_it(+)" at last [].n above}
+ dot(at (DP,USB.Pin2)-(2*del,0)); line to (Here,XUSB)
+ DM: dot(,,1); "D`'svg_it(-)" at last [].n above
+ line from USB.Pin4 to (DM,USB.Pin4) then to (DM,BRE) then to BRE
+
+ dot(at (U3.Chip.w.x-3*lg_pinsep,U3.Pin24.y))
+ D3: diode(up_ 7*lg_pinsep); llabel(,,D3)
+ dot(at (D3.start-(2*del,0)))
+ RN1C: resistor(up_ D3.len,,E); llabel(,10K); llabel(RN1C); dot
+ line from D3.end to (Here.x-2*del,Here.y)
+ right_
+ ICSP1: Header(2A,3,4*del,3*lg_pinsep) with .P2.end at Here
+ "ICSP1" at last [].Block.nw above ljust
+ "3X2 M" at last [].Block.sw below ljust
+ for_(1,5,2,`"m4x" at ICSP1.P`'m4x.end above ljust')
+ for_(2,6,2,`"m4x" at ICSP1.P`'m4x.end above rjust')
+
+ dot(at ICSP1.P2.end+(del/2,0)); line up_ 2*del
+ G5: ground(,T,E); "svg_it(+)5V" above
+ ground(at (G5,ICSP1.P6),,E); {"GND" at last line.w below rjust}
+ {line to ICSP1.P6.end}
+ R2: dot(at ICSP1.P5.end-(lg_pinsep/2,0)); {line to ICSP1.P5.end}
+ { line to (Here,G5); dot(,,1); "RESET2" at last [].n above }
+ line to (R2,U3.Pin24) then to U3.Pin24.end
+ line from ICSP1.P4.end to (U3.Pin24.end,ICSP1.P4); dot
+ { line to (Here,G5); dot(,,1); "MOSI2" at last [].n above }
+ Turn: (U3.Pin21.end.x+4*lg_pinsep,Here.y)
+ line to (Turn,Here) then down Here.y-U3.Pin16.y then to U3.Pin16.end
+ line from ICSP1.P3.end to (R2.x-lg_pinsep,ICSP1.P3.y) \
+ then down R2.y-U3.Pin24.y
+ continue to (D3.x+2*del,Here.y) then up ICSP1.P4.y-Here.y-2*lg_pinsep
+ continue to (Turn.x-2*lg_pinsep,Here.y) then down Here.y-U3.Pin15.y \
+ then to U3.Pin15
+ move to ICSP1.P1.end; line left Here.x-R2.x+2*lg_pinsep; dot
+ { line to (Here,G5); dot(,,1); "MISO2" at last [].n above rjust }
+ line down Here.y-U3.Pin24.y-2*lg_pinsep
+ continue to (D3.x+del,Here.y) then up ICSP1.P4.y-Here.y-lg_pinsep
+ continue to (Turn.x-lg_pinsep,Here.y) then down Here.y-U3.Pin17.y \
+ then to U3.Pin17
+
+ command "</g>"
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNOSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNOSVG.m4
new file mode 100644
index 00000000000..8ae314f1afe
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNOSVG.m4
@@ -0,0 +1,577 @@
+.PS
+# UNOSVG.m4
+log_init
+include(../icsSVG.m4)
+textoffset = 1.5bp__
+svg_font(sans-serif,8.5bp__,textoffset)
+
+divert(-1)
+
+ `Header([A][1|2], rows, wid, ht,
+ boxspec, pinlen;pinsize)
+ arg1: A= type A; number of columns
+ arg2: pins per column
+ arg3,4: custom wid, ht
+ arg5: eg fill_(0.9)'
+define(`Header',
+`[ define(`m4tp',ifinstr(`$1',A,A))define(`m4Hq',patsubst(`$1',A))dnl
+ define(`m4Hn',`ifelse(m4Hq,,1,m4Hq)')dnl
+ define(`m4Hm',`ifelse(`$2',,2,`$2')')dnl
+ define(`m4Hw',`ifelse(`$3',,`m4Hn*L_unit*3',`($3)')')dnl
+ define(`m4Hh',`ifelse(`$4',,`m4Hm*L_unit*3',`($4)')')dnl
+ ifinstr(`$6',;,
+ `stacksplit_(`m4Jdr',`$6',;)dnl
+ define(`m4Jps',ifelse(m4Jdr,,`L_unit',m4Jdr))popdef(`m4Jdr')dnl
+ define(`m4Jpl',ifelse(m4Jdr,,`lg_plen*L_unit',m4Jdr))popdef(`m4Jdr') ',
+ `define(`m4Jps',L_unit)dnl
+ define(`m4Jpl',`ifelse(`$6',,lg_plen*L_unit,`$6')')')dnl
+ Block: rotbox(m4Hw,m4Hh,`$5')
+ ifelse(`m4tp',A,`pushdef(`L_unit',(linewid/6))')
+ define(`m4Hct',1)dnl
+ for_(1,m4Hm,1,
+ `HeaderPin(Block.NW+vec_(m4Jps*3/2,-(m4x-1/2)*m4Hh/m4Hm),
+ ifinstr(m4tp,A,1,eval(m4Hct-1)),
+ P`'m4Hct, w, (m4Jpl+m4Jps);m4Jps) define(`m4Hct',incr(m4Hct))
+ ifelse(m4Hn, 2, `HeaderPin(Block.NE+vec_(-m4Jps*3/2,-(m4x-1/2)*m4Hh/m4Hm),
+ 1, P`'m4Hct, e, (m4Jpl+m4Jps);m4Hps) define(`m4Hct',incr(m4Hct))') ')
+ ifelse(`m4Hq',A,`popdef(`L_unit')')
+ `$7' ]')
+ `HeaderPin(location, type, Picname, n|e|s|w,
+ [length][;pinsize])
+ arg2: 0= square'
+define(`HeaderPin',`
+ ifinstr(`$5',;,
+ `stacksplit_(`m4Hdr',`$5',;)dnl
+ define(`m4Hps',ifelse(m4Hdr,,`L_unit',m4Hdr))popdef(`m4Hdr')dnl
+ define(`m4Hpl',ifelse(m4Hdr,,`lg_plen*L_unit',m4Hdr))popdef(`m4Hdr') ',
+ `define(`m4Hps',L_unit)dnl
+ define(`m4Hpl',`ifelse(`$5',,lg_plen*L_unit,`$5')')')dnl
+ ifelse(`$1',,,`move to `$1';')
+ ifelse(`$3',,,`$3':) line to ifelse(
+ `$4',n,`rvec_(0,m4Hpl)', `$4',e,`rvec_(m4Hpl,0)',
+ `$4',s,`rvec_(0,-m4Hpl)', `rvec_(-m4Hpl,0)')
+ ifelse(`$3',,,Pin`$3':) ifelse(ifelse(`$2',,0,`$2'),0,
+ `rotbox(m4Hps,m4Hps,fill_(1))',
+ `circle diam m4Hps fill_(1)') at last line.start ')
+
+define(`brdge',`eleminit_(`$1')
+ define(`m4h',ifelse(`$2',,`sourcerad_',`($2)/2'))dnl
+ { line to rvec_(rp_len/2-m4h/2,0)
+ move to rvec_(m4h/2,0)
+ for m4ng=75 to 255 by 180 do {{
+ m4fshade(0, arc cw from rvec_(Rect_(m4h/2,m4ng)) \
+ to rvec_(Rect_(m4h/2,-m4ng)) \
+ with .c at Here ) }}
+ line from rvec_(m4h/2,0) to rvec_(rp_len/2,0) }
+ { [box invis ht_ m4h wid_ m4h] at rvec_(rp_len/2,0) }
+ line to rvec_(rp_len,0) invis ')
+
+define(`ATMEGA16U2',`[
+ Chip: box wid 10*lg_pinsep ht 25*lg_pinsep
+ Loopover_(`x',
+ `Arightpin(patsubst(x,;,`,'))',
+ 6;PD0, 7;PD1, 8;PD2, 9;PD3, 10;PD4, 11;PD5, 12;PD6, 13;PD7,
+ 131;nul,
+ 5;PC2, 26;PC4, 25;PC5, 23;PC6, 22;PC7,
+ 132;nul,
+ 133;nul,
+ 14;PB0, 15;PB1, 16;PB2, 17;PB3, 18;PB4, 19;PB5, 20;PB6, 21;PB7)
+ Loopover_(`x',
+ `Aleftpin(patsubst(x,;,`,'))',
+ 33;PAD,
+ 100;nul,
+ 28;UGND, 29;D`'svg_it(+), 30;D`'svg_it(-), 31;UVCC, 27;UCAP,
+ 101;nul, 102;nul,
+ 3;GND, 4;VCC, 103;nul,
+ 104;nul,
+ 32;AVCC,
+ 105;nul, 106;nul,
+ 1;XTAL1,
+ 107;nul,
+ 2;XTAL2(PC0),
+ 108;nul, 109;nul)
+ lg_pin(Pin109+(0,lg_pinsep),RESET,Pin24,wN,24,pinlen)
+ ]')
+define(`Aleftpin',`move to Chip.sw+(0,m4Lx*lg_pinsep)
+ Pin`$1': ifelse(`$2',nul,Here,dnl
+ `line left pinlen "`$1'" above
+ "`$2'" ljust at last line.start')')
+define(`Arightpin',`move to Chip.se+(0,m4Lx*lg_pinsep)
+ Pin`$1': ifelse(`$2',nul,Here,dnl
+ `line right pinlen "`$1'" above
+ "`$2'" rjust at last line.start')')
+
+define(`ATMEGA328P',`[
+ Chip: box wid 10*lg_pinsep ht 23*lg_pinsep
+ Loopover_(`x',
+ `Arightpin(patsubst(x,;,`,'))',
+ 2;PD0, 3;PD1, 4;PD2, 5;PD3, 6;PD4, 11;PD5, 12;PD6, 13;PD7,
+ 100;nul,
+ 23;PC0, 24;PC1, 25;PC2, 26;PC3, 27;PC4, 28;PC5,
+ 101;nul,
+ 14;PB0, 15;PB1, 16;PB2, 17;PB3, 18;PB4, 19;PB5)
+ Loopover_(`x',
+ `Aleftpin(patsubst(x,;,`,'))',
+ 201;nul, 202;nul, 203;nul, 204;nul, 205;nul, 206;nul, 207;nul, 208;nul,
+ 209;nul,
+ 8;GND, 7;VCC,
+ 301;nul,
+ 22;AGND, 20;AVCC, 21;AREF,
+ 302;nul,
+ 9;XTAL1,
+ 303;nul,
+ 10;XTAL2,
+ 304;nul, 305;nul)
+ lg_pin(Pin305+(0,lg_pinsep),RESET,Pin1,wN,1,pinlen)
+ ]')
+
+define(`rswitch',`dswitch(`$1',,WBoDCP)
+ DS: last line.start; DC: last line.c; DE: last line.end
+ DL: DC-vec_(dimen_/6,0); DR: DC+vec_(dimen_/6,0)
+ {{"1" at DL above rjust}; {"3" at DR above ljust}
+ { line from DL to DL-vec_(0,dimen_/6) chop dotrad_ chop 0
+ {"2" below rjust}
+ continue to DS-vec_(0,dimen_/6) then to DS; dot }
+ { line from DR to DR+vec_(0,-dimen_/6) chop dotrad_ chop 0
+ {"4" below ljust}
+ continue to DE+vec_(0,-dimen_/6) then to DE; dot }
+ line from DC+vec_(dimen_/10,-dimen_/6) to DC+vec_(-dimen_/10,-dimen_/6)
+ move to last line.c; line to rvec_(0,-dimen_/3) \
+ then to rvec_(-dimen_/3,-dimen_/3)
+ {"5" below}} ')
+
+divert(0)dnl
+
+ maxpswid = 20
+ maxpsht = 20
+
+ define(`pinlen',`30bp__')
+ define(`lg_pinsep',(1.2*lg_pinsep))
+ del = lg_pinsep
+ define(`pindiam',0.1)
+
+ define(`egnd',`ground(,,E); "GND" at last line.c below')
+
+ U3: ATMEGA16U2
+ `"ATMEGA16U2-MU(R)"' at U3.Chip.s below
+ `"U3"' at U3.Chip.nw ljust above
+ ZU4: ATMEGA328P with .Chip.nw at U3.Chip.sw+(-2.5,-10*del)
+ `"ATMEGA328P-PU"' at ZU4.Chip.s below
+ `"ZU4"' at ZU4.Chip.nw ljust above
+
+ dot(at U3.Pin2.end)
+ R1: resistor(down_ 2*lg_pinsep,,E)
+ rlabel(,"R1" rjust "1M" rjust)
+ dot
+ dot(at R1.start-(2*del,0))
+ xtal(down_ 2*lg_pinsep)
+ rlabel(16,,MHz); dot
+ XT2: dot(at last line.start-(2*del,0)); { "XT2" at last [].n above }
+
+ Br1: brdge(left_ from U3.Pin33.end to (XT2,U3.Pin33))
+ rlabel(1,,2); llabel(,GROUND)
+ BRE: dot
+ line to (Here,U3.Pin28) then to U3.Pin28.end
+ {"UGND" at (Br1,Here) above}
+
+ XT1: dot(at XT2-(del,R1.len)); { "XT1" at last [].n above }
+ line from XT1 to U3.Pin1.end
+ line from U3.Pin2.end to (XT1,XT2)
+ C11: capacitor(left_ 3*del); rlabel(,C11); llabel(,22`'pF)
+ C9: capacitor(from XT1 to (Here,XT1)); {"C9" "22`'pF" at last [].s+(0,-11bp__)}
+ { line to C11.end }
+ dot
+ G1: egnd
+ line from XT1 down_ 3*del; continue to (G1,Here); dot(,,1)
+ {"XT3" at last [].n above}
+ dot(at Here+(0,-3/2*del),,1); {"XT4" at last [].n above}
+ { line to (XT2,Here) then to XT2 chop dotrad_ chop 0 }
+ USBVCC: dot(at Here+(0,-7/2*del),,1)
+ {"USBVCC" at last [].n-(3/2*del,0) above ljust}
+ { line to (Here,U3.Pin31) chop dotrad_ chop 0; continue to U3.Pin31.end }
+ dot(at Here+(2*del,0),,1); {"VUCAP" at last [].e+(0,-5bp__) ljust}
+ line to (Here,U3.Pin27) chop dotrad_ chop 0; dot
+ line from U3.Pin27.end to (G1.x-4.5*del,U3.Pin27.y)
+ C8: capacitor(down_ to (Here,Br1)); llabel(C8,,1`'svg_micro)
+ Bus1: dot
+
+ dot(at U3.Pin33.end)
+ move to U3.Pin3.end; line to (Here,U3.Chip.s)
+ G2: ground(,T,E); {"GND" at last line.c below }
+
+ dot(at U3.Pin32.end)
+ {line to U3.Pin4.end; dot}
+ line left del; ground(,,E,U); {"svg_it(+)5 V" at last line.c above}
+
+ line from U3.Pin4.end left_ 2*del
+ capacitor(down_ 3*del); { llabel(C7,,100n) }
+ G3: ground(,T,E); {"GND" at last line.c below }
+
+ line from U3.Pin30.end to (G1.x-2*del,U3.Pin30.y); TD: Here
+ continue to (Here,U3.Pin32)
+ { "RD`'svg_it(-)" above rjust }; continue left_ 1.5*del
+ RN3A: resistor(left_ 3/2*dimen_,,E); rlabel(,22R RN3A)
+ Dm: line left_ 7*del
+
+USB: [ K: box invis wid dimen_/2 ht 5*lg_pinsep
+ "USB" rjust at K.e
+ line thick 1.5 from K.nw to K.ne then to K.se then to K.sw
+ Loopover_(`x',
+ `Pin`'m4Lx: K.ne-(0,m4Lx/5*K.ht)
+ "x" at Pin`'m4Lx ljust above',
+ 1 XUSB, 2 D`'svg_it(-), 3 D`'svg_it(+), 4 UGND)
+ P_1: K.sw; {"P$`1'" at P_1 below rjust}
+ P_2: K.s; {"P$`2'" at P_2 below ljust}
+ ] with .Pin2 at Here; "X2" at USB.ne above rjust
+
+ move to U3.Pin29.end
+ line to (TD.x-del,Here.y); continue to (Here,Dm-(0,lg_pinsep))
+ { "RD`'svg_it(+)" above rjust}
+ continue to (RN3A.start,Here)
+ RN3D: resistor(left_ 3/2*dimen_,,E); llabel(,22R RN3D)
+ line to USB.Pin3
+
+ dot(at RN3A.end); line to (Here,RN3D)
+ Z2: variable(`resistor(down_ to (Here,U3.Pin27),,E); rlabel(Z2)',NN)
+ dot(at RN3D.end-(2*del,0))
+ Z1: variable(`resistor(to (Here,U3.Pin27),,E); rlabel(Z1)',NN)
+ dot; line to (Z2,Here)
+ move up Z1.len/4 from last line.c; "CG0603MLC-05E" "X 2"
+
+ line down_ del from USB.P_1; continue to (USB.P_2,Here); dot
+ line from USB.P_2 to (USB.P_2,Z1.end) then to Z1.end
+ dot(at (USB.P_2,Here)+(3/2*del,0)); line to (Here,USBVCC)
+ dot(,,1); {"USHIELD" at last [].n+(4bp__,0) above}
+
+ L1: reversed(`inductor',down_ from Z1.end to (Z1,C8.end),W,,)
+ rlabel(,L1); llabel("svg_thinsp`'BLM21" ljust); dot
+ { dot(at (Z2,Here)); line to (Here,U3.Pin28); dot(,,1)
+ "UGND" at last [].n above }
+ line from USB.Pin1 to (Z2,USB.Pin1) then up 2*del
+ XUSB: dot(,,1); {"XUSB" at last [].n above}
+ line from (Z1,USB.Pin3) to (Z1,XUSB);
+ DP: dot(,,1); {"D`'svg_it(+)" at last [].n above}
+ dot(at (DP,USB.Pin2)-(2*del,0)); line to (Here,XUSB)
+ DM: dot(,,1); "D`'svg_it(-)" at last [].n above
+ line from USB.Pin4 to (DM,USB.Pin4) then to (DM,BRE) then to BRE
+
+ line from U3.Pin18.end right_ 3.5*del
+ JP2: Header(A2,2,4*del,2*lg_pinsep,,0.2;pindiam) with .P3.end at Here
+ "JP2" at JP2.Block.nw above ljust
+ "2X2M - NM" at JP2.s below
+ "1" at JP2.P3.end above ljust; "3" at JP2.P1.end above ljust
+ "2" at JP2.P4.end above rjust; "4" at JP2.P2.end above rjust
+ line from JP2.P1.end to (JP2.P1.end,U3.Pin19) then to U3.Pin19.end
+ dot(at JP2.P1.end); line up 3.5*del
+ TPPB5: dot(,,1); {"PB5" at last [].e ljust}
+ TPPB4: dot(at TPPB5-(del*3/2,0),,1); {"PB4" at last [].w rjust}
+ line to (Here,JP2.P3); dot
+ line from JP2.P2.end to (JP2.P2.end,TPPB4)
+ TPPB7: dot(,,1); {"PB7" at last [].w rjust}
+ line from JP2.P4.end right del*3/2; continue to (Here,TPPB4)
+ TPPB6: dot(,,1); {"PB6" at last [].n above}
+ line from U3.Pin20.end right del then up del; continue to (TPPB6,Here); dot
+ line from U3.Pin21.end up del; continue to (TPPB7,Here); dot
+
+ ICSP1: Header(A2,3,4*del,2.5*lg_pinsep,,0.2;pindiam) \
+ with .P1.end at (JP2.P1.end,U3.Pin14)
+ "ICSP1" at last [].Block.nw above ljust
+ "3X2 M" at last [].Block.sw below ljust
+ for_(1,5,2,`"m4x" at ICSP1.P`'m4x.end above ljust')
+ for_(2,6,2,`"m4x" at ICSP1.P`'m4x.end above rjust')
+ line from ICSP1.P1.end to (ICSP1.P1.end,U3.Pin17) then to U3.Pin17.end
+ line from ICSP1.P3.end left del; continue to (Here,U3.Pin15) \
+ then to U3.Pin15.end
+
+ dot(at U3.Pin24.end);
+ RN1C: resistor(up_ 5*lg_pinsep,,E); rlabel(,10K,RN1C); llabel(5,,3) dot
+# D3: diode(up_ 5*lg_pinsep); rlabel(,,D3); dot
+ line up_ 2*del; ground(,T,E,U); {"+5 V" at last line.w rjust}
+ dot(at U3.Pin24.end-(del,0));
+# RN1C: resistor(up_ D3.len,,E); llabel(,10K,RN1C)
+ D3: diode(up_ RN1C.len); llabel(,,D3)
+ line to (TPPB6.x+del,Here.y)
+ continue to (Here,ICSP1.P2.end) then to ICSP1.P2.end
+ line from ICSP1.P5.end down 2*del; continue to (TPPB6.x+2*del,Here.y)
+ TRESET2: Here
+ continue to (Here.x,D3.end.y+del) then to (RN1C.end.x-2.5*del,D3.end.y+del)
+ continue to (Here,U3.Pin24) then to U3.Pin24.end
+ G4: ground(at ICSP1.P6.end,,E); {"GND" at last line.c below }
+ line from ICSP1.P4.end right del then up U3.Pin16.y-ICSP1.P4.y \
+ then to U3.Pin16.end
+ dot(at ICSP1.P1.end); line left_ 2.5*del then down_ 5*del
+ MISO2: dot(,,1); {"MISO2" at last [].s below }
+ dot(at ICSP1.P3.end-(del,0)); line to (Here,MISO2)
+ SCK2: dot(,,1); {"SCK2" at last [].s below ljust }
+ dot(at TRESET2); line to (Here,SCK2)
+ RESET2: dot(,,1); {"RESET2" wid 36bp__ at last [].s below }
+ dot(at ICSP1.P4.end+(del,0)); line to (Here,RESET2)
+ MOSI2: dot(,,1); {"MOSI2" at last [].s-(del,0) below }
+
+ line right_ del from U3.Pin11.end then up_ del*3/2
+ TXLED: reversed(`diode',right_ elen_,LER)
+ rlabel(,YELLOW); llabel(TX); dot
+ {line up_ del; TPTXL: dot(,,1); "TXL" at last [].n above}
+ RN2C: resistor(right_ elen_,,E); llabel(,1 K RN2C); rlabel(6,,3); dot
+ line from U3.Pin10.end to (TXLED.start,U3.Pin10)
+ RXLED: reversed(`diode',to (TXLED.end,Here),LER)
+ rlabel(,YELLOW); llabel(RX); dot
+ {line up_ del; dot(,,1); "RXL" at last [].n above}
+ RN2B: resistor(right_ elen_,,E); llabel(,1 K RN2B); rlabel(7,,2)
+ line to (Here,TPTXL); ground(,T,E,U); "+5 V" at last line.c above
+
+# ZU4 connections
+ line left_ del*3/2 from ZU4.Pin7.end; dot
+ {line up_ del; G4: ground(,T,E,U); "+5 V" at last line.c above }
+ C6: capacitor(down dimen_); llabel(100n,,C6); dot
+ { dot(at ZU4.Pin8.end) }; dot(at (ZU4.Pin8.end,Here))
+ { G4: ground(at Here+(0,-del),,E); {"GND" at last line.c below }
+ line to ZU4.Pin22.end }
+ line left_ Here.x-C6.x + dimen_*5/4
+ C10: capacitor(up_ C6.len); llabel(100n,,C10); dot
+ { line to (Here,ZU4.Pin20) then to ZU4.Pin20.end }
+# L2: ebox(right_ to C6.start,,,0.2); rlabel(,L2); llabel(,100`'svg_micro`'H)
+ L2: inductor(right_ to C6.start,W); rlabel(,L2); llabel(,100`'svg_micro`'H)
+
+ line left 2*del from ZU4.Pin9.end; PE: dot
+ R2: resistor(up_ to (Here,ZU4.Pin10),,E); llabel(,R2); rlabel(,1 M); dot
+ dot(at Here-(del*4.0,0)); { "XTAL2" above ljust }
+ XTAL: xtal(down_ R2.len); llabel(16 MHz); dot; { "XTAL1" below ljust }
+ pushdef(`dimen_',dimen_/2)
+ capacitor(left_ del from 0.25 between XTAL.start and XTAL.end)
+ capacitor(left_ del from 0.75 between XTAL.start and XTAL.end)
+ popdef(`dimen_')
+ line up XTAL.len/2
+ line left del from last line.c then down del
+ G5: ground(,T,E); "GND" at last line.c below
+ line down_ del from XTAL.end; dot(,,1); "XT1" at last [].s below
+ line up del from XTAL.start; dot(,,1); "XT2" at last [].n above
+ line from XTAL.start to ZU4.Pin10.end
+ line from XTAL.end to ZU4.Pin9.end
+ line left 2*del from ZU4.Pin1.end; dot
+# dot(at ZU4.Pin1.end)
+ D2: diode(up_ dimen_); rlabel(,D2)
+ dot(at D2.start-(2.5*del,0))
+ RN1D: resistor(up_ D2.len,,E); rlabel(10 K,,RN1D); dot
+ { line to D2.end }
+ line up_ del; ground(,T,E,U); "+5 V" at last line.c above
+
+ line from ZU4.Pin1.end to (RN1D-(1.5*del,0),ZU4.Pin1) then up 7*del
+ continue to (ZU4.Chip.w,Here)+(del,0); BRB: dot
+ { line down_ 2*del; Br2: brdge(right_ dimen_)
+ llabel(1,,2); rlabel(,RESET_EN); line up_ 2*del; dot }
+ line right_ dimen_+del
+ C5: capacitor(right_ dimen_); llabel(,C5); rlabel(100n); dot
+ { RN2D: resistor(down_ dimen_,,E); rlabel(,1 K); llabel(,RN2D)
+ G6: ground(,T,E); "GND" at last line below }
+ { line up_ del; DTR: dot(,,1); "DTR" at last [].e ljust }
+ line from U3.Pin13.end right del/2; continue to (Here,U3.Chip.s) \
+ then left+2*del; continue to (Here,BRB) then to C5.end
+ TP2: Here; continue to C5.end
+
+ line up 3*del from BRB
+ TP1: dot #; line left BRB.x-RN1D.x
+ RESET: rswitch( right_ dimen_ from (USB.e,Here)+(del/2,0))
+ { "RESET" at RESET+(-del*1.7,1.0*del) above }
+ line left del from RESET.start then down del
+ G7: ground(,T,E); "GND" at last line.c below
+
+ ICSP: Header(A2,3,4*del,2.5*lg_pinsep,,0.2;pindiam) \
+ with .Block.sw at ZU4.Pin19.end+(2*del,del*3)
+ "ICSP" at ICSP.Block.nw above ljust
+ "3X2 M" at ICSP.Block.sw below ljust
+ for_(1,5,2,`"m4x" at ICSP.P`'m4x.end above ljust')
+ for_(2,6,2,`"m4x" at ICSP.P`'m4x.end above rjust')
+ dot(at ZU4.Pin19.end); line to (Here,ICSP.P3) then to ICSP.P3.end
+ line from ZU4.Pin18.end right del; dot
+ line to (Here,ICSP.P1) then to ICSP.P1.end
+ move to ICSP.P5.end; line to (ZU4.Pin19.end,Here)-(del,0);
+ continue to (Here,TP1); dot
+ line from ICSP.P2.end up_ del; ground(,T,E,U); "+5 V" at last line.c above
+ line from ICSP.P6.end down_ del; G9: ground(,T,E); "GND" at last line.c below
+ move to ICSP.P4.end; line right_ del then down Here.y - ZU4.Pin17.y; dot
+# move to ICSP.P4.end; line right_ del then down Here.y - G9.y + del
+# continue to (ICSP.P1.end.x+del,Here.y) then down_ Here.y-ZU4.Pin17.y; dot
+
+ line right_ from RESET.end to (U3.Chip.e+(12*del,0),TP1)
+ POWER: Header(A1,8,1.5*del,7*lg_pinsep,,0.2;pindiam) with .P3.end at Here
+ "POWER" wid 36bp__ at POWER.Block.nw above ljust
+ "8X1F-H8.5" at POWER.Block.sw below ljust
+ for_(1,8,1,`"m4x" at POWER.P`'m4x.end above ljust')
+ line from POWER.P2.end left del/2 then down POWER.P2.y-POWER.P5.y ; dot
+ line from POWER.P4.end left 2.5*del; "+3V3" above ljust
+ dot(at POWER.P3.end-(del*1.5,0)); line up 2*del
+ dot(,,1); "RESET" at last [].n above
+ line from POWER.P5.end left 3.5*del then up 4*del; ground(,T,E,U)
+ "+5 V" at last line.c above
+ line left del*2 from POWER.P8.end; "VIN" above ljust
+ line left del/2 from POWER.P7.end; dot
+ line from POWER.P6.end to (Here,POWER.P6.end) then to Here+(0,-2.5*del)
+ G10: ground(,T,E); "GND" at last line.c below
+
+ right_
+
+ IOH: Header(A1,10,1.5*del,10*lg_pinsep,,0.2;pindiam) \
+ with .P10.end at ZU4.Pin14.end + (del*15,0)
+ "IOH" at IOH.Block.nw above ljust
+ "10X1F-H8.5" at IOH.Block.se below ljust
+ for_(0,9,1,`
+ { "incr(m4x)" above ljust at IOH.P`'eval(10-m4x).end }
+ move to IOH.P`'eval(10-m4x).start-(pindiam/2+dotrad_/2,0)
+ ifelse(m4x,6,,`dot')
+ move to IOH.P`'eval(10-m4x).end
+ ifelse(eval(m4x<6),1,`line from ZU4.Pin`'eval(14+m4x).end to Here ')
+ ifelse(m4x,6,,` line right del*4; dot(,pindiam/2,1) ')
+ ifelse(eval(m4x<6),1,`"eval(8+m4x)" at last [].e ljust ')')
+ "SCL" at last [].e ljust
+ "SDA" at 3rd last [].e ljust
+ "AREF" at 5th last [].e ljust
+
+ AD: Header(A1,6,1.5*del,6*lg_pinsep,,0.2;pindiam) \
+ with .P6.end at (IOH.P10.end,ZU4.Pin23) #.end + (del*6,0)
+# with .P6.end at ZU4.Pin23.end + (del*6,0)
+ "AD" at AD.Block.nw above ljust
+ "6X1F-H8.5" at AD.Block.se below ljust
+ for_(0,5,1,`
+ dot(at AD.P`'eval(6-m4x).start-(pindiam/2+dotrad_/2,0))
+ line from ZU4.Pin`'eval(23+m4x).end \
+ to AD.P`'eval(6-m4x).end; {"incr(m4x)" above ljust}
+ line right del*4; dot(,pindiam/2,1)
+ "A`'m4x" at last [].e ljust ')
+
+ IOL: Header(A1,8,1.5*del,8*lg_pinsep,,0.2;pindiam) \
+ with .P8.end at (AD.P1.end,ZU4.Pin2)
+ "IOL" at IOL.Block.nw above ljust
+ "8X1F-H8.5" at IOL.Block.sw ljust below
+ for_(0,7,1,`
+ dot(at IOL.P`'eval(8-m4x).start-(pindiam/2+dotrad_/2,0))
+ line from ZU4.Pin`'eval(ifelse(eval(m4x<5),1,2,6)+m4x).end \
+ to IOL.P`'eval(8-m4x).end; {"incr(m4x)" above ljust}
+ line right del*4; dot(,pindiam/2,1)
+ "m4x" at last [].e ljust ')
+
+ line from ZU4.Pin21.end up RESET.y-ZU4.Pin21.y-del \
+ then right ICSP.P4.end.x-ZU4.Pin21.end.x + 2*del
+ continue to (Here,IOH.P3)+(0,del*3/2); dot
+ { C4: capacitor(down_ 3.0*del); llabel(C4,,100n)
+ { ground(,T,E); "GND" at last line.e ljust}
+ line from IOH.P4.end to (Here,IOH.P4); dot }
+ line right del*3/2; continue to (Here,IOH.P3) then to IOH.P3.end
+
+ line left del/2 from IOH.P2.end; continue to (Here,AD.P2); dot
+ line left del*3/2 from IOH.P1.end; continue to (Here,AD.P1); dot
+
+# line right_ del*2 from U3.Pin9.end then down_ 5.5*lg_pinsep; dot
+ line right_ del*2 from U3.Pin9.end then down_ 3.5*lg_pinsep; dot
+ { line right_ 2*del; dot(,,1); "RX" at last [].e ljust }
+ line to (Here,RESET)-(0,del)
+ RN4B: resistor(down_ dimen_,,E); llabel(7,"RN4B" ljust "1 K" ljust,2)
+ line down_ del then left_ Here.x - IOH.P9.end.x + del*2.5
+ continue to (Here,ZU4.Pin2); dot
+
+ line right_ del from U3.Pin8.end; dot
+ { line right_ 3*del; dot(,,1); "TX" at last [].e ljust }
+ line to (Here,RN4B.start)
+ RN4A: resistor(down_ dimen_,,E); rlabel(8,"RN4A" rjust "1 K" rjust,1)
+ line to (IOH.P9.end,Here)-(del*3.5,0); continue to (Here,ZU4.Pin3); dot
+
+Pwr: [
+ Vin: line right 2*del "VIN" above
+ RN1A: resistor(down_ dimen_*5/4,,E); rlabel(8, "RN1A" rjust "10 K" rjust ,1)
+ CMP: dot
+ RN1B: resistor(down_ dimen_*5/4,,E); rlabel(2, "RN1B" rjust "10 K" rjust ,7)
+ B12: ground(,T,E); "GND" at last line below
+
+ line right_ 2*del from CMP; dot
+ { line up_ 2*del; dot(,,1); "CMP" at last [].n above }
+ line right_ del
+ POA: opamp(,"+" ljust,"-" ljust) with .In1 at Here
+ "U5A" at last [].n; "1" at POA.Out above rjust
+ "3" at POA.In1 rjust above; "2" at POA.In2 rjust above
+ line left_ del from POA.In2 then down_ del; "+3V3" below
+ dot(at POA.Out); {line up_ 2*del; dot(,,1); "GATE" at last [].n above }
+ T1: mosfet(down_ dimen_*1.5,R,dMdPyEDSQdB,) with .G at Here
+ "T1" at T1 + (-dimen_/4,del*5/4)
+ "FDN340P" at T1 + (0,-del*5/4) rjust
+# "USBVCC" at T1.D rjust
+ dot(at T1.S); { line up_ 2*del; ground(,T,E,U); "+5 V" at last line above }
+ ] with .RN1B at (USB.e.x+del,RN1C.y-2*del)
+ dot(at XUSB+(0,-del/2))
+ F1: fuse(right_ to (Pwr.T1.D,Here)); { "500 mA" ljust }
+ { "MF-MSMF050-2" at last [].sw below ljust }
+ line to Pwr.T1.D
+
+ line from Pwr.T1.S right_ 2.5*lg_pinsep
+ { U2:box ht 3*lg_pinsep wid 5*lg_pinsep with .nw at Here+(0,lg_pinsep/2) }
+ {"1" above rjust}; {"IN" ljust}
+ "LP2985-33DBVR" at U2.s below
+ "U2" above ljust at U2.nw
+ "3" above rjust at U2.w; line left del from U2.w then up_ lg_pinsep; dot
+ "ON/OFF" at U2.w ljust
+ line right_ textht*0.66*3 from U2.w+(textht*0.66*5,textht)
+ U2P2: U2.w+(0,-lg_pinsep); "2" at U2P2 above rjust; "GND" at U2P2 ljust
+ line from U2P2 left del then down_ del
+ G15: ground(,T,E); "GND" at last line.c below
+ U2P5: (U2.e.x,U2.e.y+lg_pinsep)
+ "OUT" at U2P5 rjust; "5" at U2P5 above ljust
+ line from U2P5 right 2*del "+3V3" below; dot
+ { line up_ del; dot(,,1); "3V3" at last [].n above }
+ C3: capacitor(down_ to(Here,G15)); rlabel(,"C3" rjust "1`'svg_micro" rjust)
+ ground(,T,E); "GND" at last line.c below
+ "NC/FB" at (U2.e.x,U2P2.y) rjust
+
+ "SCK" above ljust at Pwr.Vin + (0,4*del)
+ line right_ 3*del
+ U5B: opamp(,"+" ljust, "-" ljust) with .In1 at Here
+ "5" at U5B.In1 above rjust; "6" at U5B.In2 above rjust
+ "U5B" at last [].n; "7" at U5B.Out above rjust
+ line from U5B.In2 left del then down del then right U5B.Out.x-U5B.In1.x+del
+ TD2: dot
+ dot(at U5B.Out); dot(at Here+(0,2*del),,1); "LCMD" at last [].e ljust
+ line down_ from last [].s to TD2
+ RN2A: resistor(right_ dimen_*5/4,,E); llabel(8,"1K",1); rlabel(,RN2A)
+ dot; {line up_ 2*del; dot(,,1); "LL" at last [].n above }
+ diode(right_ dimen_*5/4,LE); rlabel(,YELLOW)
+ line down_ dimen_/4; egnd
+
+ X1:box ht 3*lg_pinsep wid 5*lg_pinsep with .w at (U2.x,U5B.y+del)
+ "X1 DC21MMX" at X1.nw above ljust; "PWR SUPPLY" at X1.nw below ljust
+ X1P1: 1/3 between X1.sw and X1.se; "1" at X1P1 rjust below
+ X1P2: 2/3 between X1.sw and X1.se; "2" at X1P2 rjust below
+ line down_ del from X1P1; dot; { egnd }
+ line right X1.e.x+del - Here.x then up_ X1.e.y-Here.y then to X1.e
+ "3" above ljust at X1.e
+ line from X1P2 down del/2 then right X1.e.x+del*2 - X1P2.x \
+ then up X1.n.y - X1P2.y + del/2; dot
+ { line up_ 2*del; PWRIN: dot(,,1); "PWRIN" at last [].w rjust }
+ D1: diode(right_ dimen_); llabel(,D1); rlabel(,M7); dot
+ { PC1: capacitor(down_ dimen_,C); llabel(,"PC1" ljust "47`'svg_micro" ljust)
+ G16: egnd }
+ { line to (Here,PWRIN); dot(,,1); "VIN" at last [].e ljust }
+ line right 3*del; { "3" above rjust }
+ U1P1: Here
+ U1: box ht 3*lg_pinsep wid 4*lg_pinsep with .nw at Here+(0,lg_pinsep/2)
+ "IN" at U1P1 ljust; "OUT" at (U1.e,U1P1) rjust
+ "1" below rjust at U1.s
+ "U1" at U1.nw + (0,textht/dptextratio) above ljust \
+ "NCP1117ST50T3G" ljust
+ line from U1.s to (U1.s,G16); egnd
+ U1P4: (U1.e,U1P1); U1P2: U1P4+(0,-del)
+ { "4" at U1P4 above ljust }; { "2" at U1P2 above ljust };
+ line right_ 2*del from U1P4; dot;
+ line from U1P2 to (Here,U1P2); dot; { line to (Here,U1P4) }
+ { PC2: capacitor(down_ to (Here,G16),C)
+ llabel(,"PC2" ljust "47`'svg_micro" ljust); egnd }
+ line right_ del*3/2 from (Here,U1P4); dot
+ { line to (Here,PWRIN); ground(,T,E,U); "+5V" at last line.c above }
+ line right_ del*3/2; dot; { line to (Here,PC2.start)
+ C2: capacitor(down_ to (Here,G16),C)
+ llabel(,"C2" ljust "100`'svg_micro" ljust); egnd }
+ { line to (Here,PWRIN); dot(,,1); "5V" at last [].n above }
+ line right_ del*3/2 then to (Here.x+del*3/2,PWRIN.y); dot(,,1)
+ "5V1" at last [].n above
+
+
+
+ command "</g>"
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Xtest.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Xtest.m4
new file mode 100644
index 00000000000..67580438164
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Xtest.m4
@@ -0,0 +1,58 @@
+.PS
+# test.m4
+gen_init
+
+divert(-1)
+
+divert(0)dnl
+
+gs = 0.1
+gw = 3
+gh = 3
+define grid {($1*gs,$2*gs)}
+B: box invis wid gw+2 ht gh+2 with .c at (0,0)
+bix = gw/gs/2
+G:[
+C: 0,0
+for i=-bix to bix do { line wid 0.4 outlined "gray" from grid(-bix,i) right gw }
+for i=-bix to bix by 5 do { sprintf("%g",i) at grid(-bix,i) rjust }
+for j=-bix to bix do { line wid 0.4 outlined "gray" from grid(j,-bix) up gh }
+for j=-bix to bix by 5 do { sprintf("%g",j) at grid(j,-bix) below }
+
+ line from grid(-bix,0) right gw
+ line from grid(0,-bix) up gh
+] with .C at B
+
+textoffset = 0
+xwid = 0.71; svg_font(Times,72bp__)
+#xwid = 0.65; svg_font(sans-serif,72bp__)
+#xwid = 0.64; svg_font(Arial,1)
+#xwid = 0.64; svg_font(Helvetica,1)
+#xwid = 0.54; svg_font(Courier,1)
+#xwid = 0.67; svg_font(Cursive,1)
+#xwid = 0.64; svg_font(Verdana,1)
+#xwid = 0.70; svg_font(Georgia,1)
+#xwid = 0.70; svg_font(Palatino,1)
+#xwid = 0.70; svg_font(Garamond,1)
+#xwid = 0.70; svg_font(Bookman,1)
+##xwid = 0.70; svg_font(Comic Sans MS,1)
+#xwid = 0.55; svg_font(Trebuchet MS,1)
+#xwid = 0.78; svg_font(Arial Black,1)
+#xwid = 0.49; svg_font(Impact,1)
+[
+C: 0,0
+ "X" wid xwid at grid(0,0) above ljust ; showbox_(last "")
+ "X" wid xwid at grid(0,0) below ljust ; showbox_(last "")
+ "X" wid xwid at grid(0,0) above rjust ; showbox_(last "")
+ "X" wid xwid at grid(0,0) below rjust ; showbox_(last "")
+] with .C at G.C
+[
+ Q: box wid gw ht gh "X" ljust "Y" rjust "Z"
+ line from Q.n to Q.s; line from Q.w to Q.e
+] with .w at B.e
+
+ "X" wid xwid at G.n above; showbox_(last "")
+
+
+ command "</g>"
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4
new file mode 100644
index 00000000000..84cc6bcda63
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4
@@ -0,0 +1,173 @@
+.PS
+# ASME_Y14-5.m4
+# https://en.wikipedia.org/wiki/Geometric_dimensioning_and_tolerancing
+# See the ASME Y14.5 standard, Figure 6-30.
+scale = 100/3
+cct_init
+include(../ASME_Y14-5.m4)
+ifsvg(`svg_font(sans-serif,10bp__)',
+`textht = 10bp__*2/3
+ iflatex(`command "{\sf"')')
+# ASME Y14.5 specs:
+ arrowht = textht*0.8
+ arrowwid = textht*0.6
+ maxpswid = 12
+
+# Diameters
+ d1 = (20.13+20.00)/2
+ d2 = 31.7
+ d3 = 36
+ d4 = (40.60+40.45)/2
+ d5 = 57
+ d6 = 86
+ d7 = 100
+ d8 = 8.0
+ adj = 1.5
+
+Section: [
+ Orig: (0,0)
+ T0: (0,-d7/2)
+ T1: (6,-d5/2)
+ T2: (15.5,-d3/2)
+ T3: (22,-d3/2-adj)
+ T4: (32,-d2/2)
+ T5: (41.3,0)
+ T6: (9.5,-d4/2)
+# for_(0,5,1,`"m4x" at T`'m4x')
+# Hatching
+ H: hatchbox(invis ht d7 wid 41.3,2,thick 0.4,-45) with .w at Orig
+ box invis fill_(1) wid T5.x-T1.x ht T1.y-H.s.y with .se at H.se
+ box same with .ne at H.ne
+ box invis fill_(1) wid T3.x-T2.x ht T2.y-T1.y with .nw at T2
+ box same with .sw at (T2.x,-T2.y)
+ box invis fill_(1) wid T4.x-T3.x ht T3.y-T1.y with .nw at T3
+ box same with .sw at (T3.x,-T3.y)
+ box invis fill_(1) wid T5.x-T4.x ht T4.y-T1.y with .nw at T4
+ box same with .sw at (T4.x,-T4.y)
+# Section outline lower
+ line from (0,-d4/2) to T0 then right T1.x-T0.x then up 1
+ arcto(T1,(T2,T1),1)
+ line to (T2,T1) then up 1
+ arcto(T2,(T3,T2),1)
+ arcto((T3,T2),T3,0.5)
+ arcto(T3,(T4,T3),0.5)
+ arcto((T4,T3),T4,1)
+ arcto(T4,(T5,T4),1)
+ line to (T5,T4) then to (T5.x,-T4.y) then left 1
+# Section outline upper
+ line from (0,d4/2) to (0,-T0.y) then right T1.x-T0.x then down 1
+ arcto((T1.x,-T1.y),(T2.x,-T1.y),1)
+ line to (T2.x,-T1.y) then down 1
+ arcto((T2.x,-T2.y),(T3.x,-T2.y),1)
+ arcto((T3.x,-T2.y),(T3.x,-T3.y),0.5)
+ arcto((T3.x,-T3.y),(T4.x,-T3.y),0.5)
+ arcto((T4.x,-T3.y),(T4.x,-T4.y),1)
+ arcto((T4.x,-T4.y),(T5.x,-T4.y),1)
+ line to (T5.x,-T4.y)
+
+ box wid 6 ht d8 fill_(1) with .w at (0,d6/2)
+ box wid 6 ht d8 fill_(1) with .w at (0,-d6/2)
+ box invis wid T6.x ht d4 fill_(1) with .w at Orig
+ box wid T5.x-T6.x ht d1 fill_(1) with .e at T5
+
+ line from (Orig.x,-T6.y) to (Orig.x,T6.y)
+ arcto(T6,(T6,Orig),1)
+ arcto((T6.x,-T6.y),(0,-T6.y),1)
+ line to (0,-T6.y)
+
+define(`dialabel',
+`[tmpthick = linethick; linethick_(1)
+ [Y14_dia_]; [$1 wid ifelse(`$2',,textht,`$2')] with .w at last [].e+(0.5,0)
+ linethick_(tmpthick)]')
+
+thinlines_
+ dimension_(from (0,T6.y) to (0,-T6.y),40,dialabel("40.60" "40.45",12),textht*3)
+ line up 4 from AE_dimen_.end
+ Y14_frame(Y14_per_,Y14_dia_;"0";"(M)","A") with .sw at Here
+ Y14_frame("B") with .s at last [].n+(0,6)
+thicklines_(1)
+ datumarrow(from last [].s to 2nd last [].n)
+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 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
+ dimension_(from S_dimen_.end to S_dimen_.end+(T3.x,0),-9,
+ "21.9" "22.1",textht*4)
+ line from E_dimen_.start to T3 chop 0 chop 1
+ dimension_(from S_dimen_.end to S_dimen_.end+(T4.x,0),-9,
+ "31.9" "32.1",textht*4)
+ line from E_dimen_.start to (T4,T3) chop 0 chop 1
+ dimension_(from S_dimen_.end to S_dimen_.end+(T5.x,0),-9,
+ "41.2" "41.4",textht*4)
+ line from E_dimen_.start to (T5,T4) chop 0 chop 1
+ line from S_dimen_.start to T0 chop 0 chop 1
+ dimension_(from (0,d7/2) right T6.x,8,"9.6" "9.4",3*textht)
+ line from E_dimen_.start to (T6.x,d4/2) chop 0 chop 1
+ ctrline(from (-3,0) to T5+(3,0),T5.x/2)
+ ctrline(from (-3,d6/2) right T1.x+6)
+ ctrline(from (-3,-d6/2) right T1.x+6)
+ dimension_(from T5-(0,d1/2) to T5+(0,d1/2),-14,
+ dialabel("20.13" "20.00",4*textht),textht*3)
+ dimension_(from T5-(0,d2/2) to T5+(0,d2/2),-35,
+ dialabel("31.8" "31.6",3*textht),textht*3)
+ arrow <- from (T5.x+6,d1/2) by (Rect_(20,75)) then right 6
+ Y14_frame(Y14_cir_,"0.06" wid 3*textht,"A","B") with .w at Here
+ Y14_frame("C") with .n at last [].se+(-6,-8)
+thicklines_(1)
+ datumarrow(from last [].n up 8)
+thinlines_
+ arrow <- from (T5.x+6,-d2/2) by (Rect_(10,-75)) then right 4
+ Y14_frame(Y14_cir_,"0.1" wid textht*2,"C") with .w at Here
+ arrow <- from ((T3.x+T4.x)/2,d3/2+adj) by (Rect_(30,75)) then right 4
+ "M42 X 1.5 - 6g" wid 9*textht ljust
+ Y14_frame(Y14_pos_,Y14_dia_;"0.1" wid textht*2;"(M)","C";"(M)") \
+ with .nw at last "".sw+(0,-2)
+ line from (T2.x,-T1.y) up 25 chop 1 chop 0
+ Y14_frame(Y14_par_,"0.06" wid 3*textht,"A") with .sw at Here
+ Y14_frame(Y14_sur_," 0.1 " wid 3*textht,"A") with .sw at last [].nw
+ arrow <- from (0,-d6/2+10) left 13
+ Y14_frame(Y14_fla_,"0.02" wid 4*textht) with .e at Here
+ Y14_frame("A") with .n at last [].s+(0,-6)
+ datumarrow(from last [].n up 6)
+ ]
+
+Topview:[
+ C: circle diam d7
+ for i=0 to 7 do { circle diam d8 at C+(Rect_(d6/2,i/8*360)) }
+ C5: circle diam d5 at C
+ C4: circle diam d3+2*adj at C
+ C3: circle dashed diam d3 at C
+ C2: circle diam d2 at C
+ C1: circle diam d1 at C
+
+thinlines_
+ dimension_(from C.w-(0,10) to C.e-(0,10),-C.rad-15,
+ dialabel("100" "99",textht*3),textht*5)
+ dimension_(from C5.w-(0,5) to C5.e-(0,5),-C.rad-5,
+ dialabel("57.2" "56.8",textht*4),textht*5)
+ arrow <-> from C+(Rect_(d6/2,-120)) to C+(Rect_(d6/2,60))
+ line from last arrow.end to C+(Rect_(d7/2+6,60)) then right 4
+ dialabel("86.2" "85.8",textht*4) with .w at Here+(1,0)
+ ctrline(from (C.x-(d6-d7/2),C.y) to (C.x+(d6-d7/2),C.y))
+ ctrline(from (C.x,C.y-d6/2+d8/2) to (C.x,C.y+d6/2-d8/2))
+ for_(0,315,45,`ctrarcr(C,d6/2,(m4x-22.5)*dtor_,(m4x+22.5)*dtor_)
+ ctrline(from C+(Rect_(d6-d7/2,m4x)) to C+(Rect_(d7/2,m4x))) ')
+ arcdimension_(from C+(0,d7/2) to C+(Rect_(d7/2,135)) with .c at C,
+ 8,"8X 45`'iflatex(^\circ)" wid textht*3.5,15,1)
+ ifsvg("svg_deg" wid textht*2/3 with .w at last "".e)
+ move to C+(0,d6/2)
+ arrow <- from Here+(Rect_(8/2,75)) to Here+(Rect_(25,75)) then right_ 3
+ "8X" wid 2*textht ljust
+ linethick_(1); [Y14_dia_] with .w at last "".e+(1,0)
+ "7.9 - 8.1" wid 8*textht ljust
+ Y14_frame(Y14_pos_,Y14_dia_;"0.14" wid 3*textht;"(M)","A","C") \
+ with .nw at 2nd last "".sw+(0,-2)
+
+ ] with .C at Section.Orig+(4.5*scale,0)
+
+
+command iflatex(`"}"',ifsvg(`"</g>"'))
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4
index 3a20d90a182..b8787d15396 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex01SVG.m4
@@ -1,7 +1,56 @@
.PS
-# ex01.m4
+# TimerSVG.m4
cct_init(svg_font(sans-serif,10.5bp__))
+define(`ic555',`[Chip: box ht boxwid wid boxwid "555"
+ P7: "7" ljust at 1/6<Chip.sw,Chip.nw>
+ P6: "6" ljust at 1/2<Chip.sw,Chip.nw>
+ P2: "2" ljust at 5/6<Chip.sw,Chip.nw>
+ P4: "4" below at 1/3<Chip.nw,Chip.ne>
+ P8: "8" below at 2/3<Chip.nw,Chip.ne>
+ P3: "3" rjust at Chip.e
+ P1: "1" above at Chip.s
+ ]')
+
+Timer: [
+ define(`elen_',`linewid')
+Vs: dot
+ down_
+ variable(`resistor(,E); llabel(,svg_norm(1 M`'svg_ohm))');
+ resistor(,E); llabel(,svg_norm(100 k`'svg_ohm))
+ capacitor(,E); llabel(svg_norm(220 svg_micro`'F))
+Zero: dot
+
+ dot(at Vs+(elen_*4/3,0))
+ resistor(,E); llabel(,svg_norm(33 k`'svg_ohm))
+ line to (Here,Zero) chop 0 chop elen_
+C2: capacitor; llabel(svg_norm(0.1 svg_micro`'F))
+ dot
+
+IC1: ic555 with .P7 at C2.start + (elen_,0)
+ line from IC1.P4 to (IC1.P4,Vs); dot
+ line from IC1.P8 to (IC1.P8,Vs); dot
+ line from IC1.P1 to (IC1.P1,Zero); dot
+ line from IC1.P2 to (C2,IC1.P2); dot
+ crossover(from IC1.P7 to (Zero,IC1.P7),R,C2); dot
+ line from IC1.P6 left elen_/2 then down IC1.P6.y-IC1.P7.y; dot
+ line from IC1.P3 right elen_*2/3
+R: dot
+ line right_ elen_/3
+B: buzzer(,,C) with .In3 at Here
+ line from B.In1 to (R,B.In1)
+ reversed(`diode',to (Here,Vs),LE); "red" at last line.c+(elen_/2,0)
+ resistor(down_ elen_ from R,E); llabel(,svg_norm(470 svg_ohm))
+ diode(to (Here,Zero),LE); {"green" wid 0.4 at last line.c+(elen_*2/3,0)}
+ line to Zero chop 0 chop -elen_
+ line up_ (Vs.y-Here.y)/3
+ battery(up_ (Vs.y-Here.y)/3); rlabel(,,svg_norm(9 V))
+ switch(to (Here,Vs),,D)
+ line to (R,Vs)
+]
+Ex01: [
+# ex01.m4
+
linewid = linewid*1.5 # let's make the circuit elements bigger than usual
define(`elen_',linewid) # but not longer
@@ -10,11 +59,13 @@ define(`elen_',linewid) # but not longer
Vin: source(up_ elen_ + 2*del, V); llabel(,v`'svg_sub(s),)
switch(right_ elen_,,C); rlabel(,t = svg_norm(0),)
- resistor; llabel(,svg_norm(47 ohm),); b_current(i`'svg_sub(R),above rjust)
+ resistor; llabel(,svg_norm(47 ohm),); b_current()
+ { "svg_it(i`'svg_sub(R))" at last arrow.end+(0,3bp__) above rjust }
line right_ elen_/2 then down_ del
- parallel_(`inductor(,W); llabel(,"L" wid 0.15,); b_current(i`'svg_sub(L))',
+ P:parallel_(`L:inductor(,W); llabel(,"L" wid 0.15,); b_current()',
`capacitor(,C); rlabel(+,v`'svg_sub(C),-); llabel(,,C)')
+ { "svg_it(i`'svg_sub(L))" at P.E1.L.start+(2bp__,0) ljust below }
line to (Here,Vin.start) then to Vin.start
define(`meshcurrent',`[arc -> cw with .c at (0,0) \
@@ -23,6 +74,7 @@ Vin: source(up_ elen_ + 2*del, V); llabel(,v`'svg_sub(s),)
right_
meshcurrent(del,i`'svg_sub(2)) at last[].C
meshcurrent(2*del,i`'svg_sub(1)) at Vin.start + (4*del,3*del)
+ ] with .sw at Timer.se+(0.5,0)
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex05SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex05SVG.m4
index 0ca39bf4f54..52284a3e334 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex05SVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex05SVG.m4
@@ -1,21 +1,26 @@
.PS
-# ex05.m4
+# ex05SVG.m4
darrow_init
- fillval = 0.8 # environmental variable
+Kalman: [
+ fillval = 0.8
- dx = boxht/5 # diagram parameters wrt scaled env variables
+ boxht = 0.35
+ boxwid = 1.5*boxht
+ dx = boxht/5
circlerad = boxht*3/8
extlen=4*dx
indel = boxht/3
+ define(`dlthick',dlthick*3/4)
-COb: box fill_ "CO"
- { line right textht*0.5 from COb+(0,textht*0.5) }
+define(`overbar',`line right textht*0.8 \
+ with .c at last box.c + ((`$1')*textht,0.7*textht)')
+
+COb: box fill_ "CO"; overbar(0.5)
CO:box fill_ with .nw at last box.se+(dx,-dx) "CO"
CbOb: box fill_ with .nw at last box.se+(dx,-dx) "CO"
- { line right textht*1.0 with .c at CbOb+(-textht*0.1,textht*0.5) }
-CbO: box fill_ with .nw at last box.se+(dx,-dx) "CO"
- { line left textht*0.5 from CbO+(-textht*0.2,textht*0.5) }
+ overbar(-0.5); overbar(0.5)
+CbO: box fill_ with .nw at last box.se+(dx,-dx) "CO"; overbar(-0.5)
dline(from CbO.s down_ dx,,t,,!-)
dright
@@ -28,7 +33,7 @@ NE: (CbO.e,COb.n)+(dx,dx)
SB: shadebox(box wid NE.x-SW.x ht NE.y-SW.y with .sw at SW)
U: COb.w-(3*dx+extlen,0)
- {"svg_bf(u)" wid 0.1 rjust at U}
+ {"svg_it(U)" wid 0.1 rjust at U}
dline(from U right_ extlen+dx,,t,,|-)
TU: dtee(R)
{darrow(to COb.w,t)}
@@ -60,10 +65,51 @@ TU: dtee(R)
darrow(left_ from Sum.w to Dum.e)
dline(from Dum.w to (SB.w-(0.1,0),Dum)); darrow(to (U,Here))
- {"svg_bf(y)" rjust}
+ {"svg_it(Y)" rjust}
move left 0.23
circle at Sum
circle at Dum
+ ]
+Coxeter: [
+# Coxeter.m4
+
+ customlinethick = 1.5
+
+ linethick = customlinethick
+ define(`dotrad_',`(3/2*linethick pt__)')
+
+ Orig: (0,0)
+ for i=0 to 4 do { P[i]: dot(at (i*linewid,0)) }
+ line from Orig to P[4]
+ P[-1]: dot(at (Rect_(linewid, 120))); line to Orig
+ P[-2]: dot(at (Rect_(linewid,-120))); line to Orig
+
+ Pa: dot(at P[4]+(linewid,0)); "svg_it(a)" at last [].n above
+ arrow from P[4] to Pa chop linewid/4
+ Pd: dot(at Pa+(linewid,0)); "svg_it(d)" at last [].w rjust
+ Pe: dot(at Pd+(linewid,0)); "svg_it(e)" at last [].n above
+ Pf: dot(at Pe+(linewid,0)); "svg_it(f)" at last [].n above
+ Pb: dot(at Pd+(Rect_(linewid,120))); "svg_it(b)" at last [].w rjust
+ Pc: dot(at Pd+(Rect_(linewid,-120))); "svg_it(c)" at last [].w rjust
+ line from Pb to Pd then to Pc
+ line from Pd to Pf
+
+ 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
+ linethick_(customlinethick); popdef(`dfillcolor')')
+
+ customarc((linewid,-linewid/3), 25,155)
+ "svg_it(d)" at (linewid,linewid*2/3)
+ customarc((2*linewid,-linewid/3), 25,155)
+ "svg_it(e)" at (2*linewid,linewid*2/3)
+ customarc((3*linewid,-linewid/3), 25,155)
+ "svg_it(f)" at (3*linewid,linewid*2/3)
+ customarc(Orig,130,230); "svg_it(a)" at (Rect_(linewid,180))
+ customarc(Orig, 10,110); "svg_it(b)" at (Rect_(linewid, 60))
+ customarc(Orig,-110,-10); "svg_it(c)" at (Rect_(linewid,-60))
+ ] with .sw at Kalman.se+(15bp__,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx
index 825c1d5cf4e..8bec3482229 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx
@@ -5,29 +5,27 @@
<meta http-equiv="Content-Style-Type" content="text/css">
<!--meta http-equiv="Content-Script-Type" content="text/javascript"-->
<TITLE>SVG Examples: Circuit_macros Version XXX</TITLE>
+<meta name="keywords" content="HTML"
+content='Circuit elements, basic circuits, logic circuits and other diagrams,
+electric circuits, resistor, capacitor, inductor, diode, sources, amplifier,
+integrator, fuse, switch, antenna, opamp, transformer, relay, contact, jack,
+plug, FET, UJT, thyristor, bipolar transistor, nport, windings, timer,
+optical isolator, rectifier, bistable, oscillator, CMOS, MOSFET, power supply,
+NAND gate, controlled source, synchronous machine, digital circuit, signal-flow
+graph, latch, decoder, flipflop, full adder, logic diagram, crossbar switch,
+dimensioning, control system, graph, RGB colors, recursion, binary tree,
+flowcharts, picture overlay, ASME Y14.5' >
+
<style type="text/css">
-.svg{display:none}
-*>.svg{display:inline}
</style>
<link rel="shortcut icon" href="../Circuit_macros.ico" type="image/x-icon" />
</HEAD>
-<BODY>
-<H2>SVG Circuit_macros examples, Version XXX</H2>
-<hr>
+<!-- ---------------------------------------------------------------------
+define(`ifinstr',`ifelse(`$2',,`$1',index(`$1',`$2'),-1,
+ `ifinstr(shift(shift(shift($@))))',`$3')')
-<p>
- These diagrams are in .svg format.
- <A HREF="examples.pdf">Pdf</A>
- and
- <A HREF="examples.html">png</A>
- versions are also available.
- The PDF equivalent can be found in examples.pdf of the distribution.
-</p>
- <p>
- Click on the link to view the source of each diagram.
-</p>
-<hr>
+define(`m4tt',`<g style="font-family:monospace">')
define(`cfig',`
<p>
@@ -40,40 +38,62 @@ define(`cfig',`
<!--[if !IE]><!-->
<object data="$1.svg" sinclude($1.siz) type="image/svg+xml" class="img">
- </object> <!--<![endif]-->
+ </object> <![endif]-->
+
+<br><br>
+ifelse(`$2',,,`
+<a href="$1.txt" TYPE="text/plain" TARGET="_blank" alt="$1">$1.m4:</a>
+`$2' changecom(,)&`#'8194;changecom(`#')')
-<br>
-<a href="$1.txt" TYPE="text/plain" TARGET="_blank" alt="$1">$1.m4</a>
</p>
-<hr>')
+ifinstr(`$3',y,,`<hr>')')
-define(`m4tt',`<g style="font-family:monospace">')
+--------------------------------------------------------------------- -->
-<!--
-<embed pluginspage="http://www.adobe.com/svg/viewer/install/" />
--->
+<BODY>
+<table cellpadding="0" cellspacing="0" width="700px" border="0" align="center" >
+<tr>
+<td>
+<H2>SVG Circuit_macros examples, Version XXX</H2>
+<hr>
<p>
-These diagrams have been adapted from the Circuit_macros examples in
-order to test the <em>experimental</em> svg output of dpic.
-Generating the line art is relatively straightforward, but
-the labeling is not created by a text processor and therefore must be
-more basic. Some of these diagrams might benefit from a little more
-tweaking of fonts and labels.
+ This file shows diagrams in .svg format;
+ <A HREF="examples.html">png</A>
+ versions are also available.
+ The PDF equivalent can be found in examples.pdf of the distribution.
</p>
+
<p>
-These examples conform to the latest dpic, which has changed the
-treatment of text sizing. That is, "Text" ht y sets the true height
-of SVG text to y rather than the nominal height as previously.
+The diagrams shown below have been adapted from the Circuit_macros
+examples in order to test the svg output of dpic. Generating svg line
+art is straightforward, but TeX, LaTeX, and related word
+processors do not produce svg. Either less-sophisticated text formatting
+must be employed or an
+ <A HREF="https://en.wikibooks.org/wiki/LaTeX/Export_To_Other_Formats">
+ intermediate format</A>
+such as pdf can be
+produced, followed by an additional processing step to convert to svg.
+Two possibilities for the latter are
+ <A HREF="https://www.ctan.org/pkg/dvisvgm">dvisvgm</A>
+and
+ <A HREF="https://github.com/dawbarton/pdf2svg">pdf2svg</A> although
+there may be font-related issues for some diagrams.
+<br>
+Many circuit and similar diagrams intended for the web do not
+require sophisticated labels, however; the examples shown below might
+be representative.
</p>
<p>
+ Click on the link to view the source of each diagram.
+</p>
+<hr>
+<p>
There are a number of other issues:
<ul>
<li> Embedding .svg files in html documents with the &lt;embed&gt; or
&lt;object&gt; tag seems to be a perennial issue.
<li> This file has been tested mainly by using Firefox.
- Chrome also seems to work well with two issues detected to date:
- a difference handling color fills and text links in svg.
<li> The Adobe reader apparently requires a line of the form
<br> &lt;embed src="figure.svg" width="x" height="y" type="image/svg+xml"
/&gt;
@@ -86,11 +106,11 @@ There are a number of other issues:
otherwise this could be tedious.
<li> The default font face is not specified in all of these diagrams but is
inherited from the enclosing document, so the appearance of labels can
- differ depend on the browser. Some of these diagrams set the font at
+ differ depending on the browser. Some of these diagrams set the font at
the beginning of the diagram source.
<li> The &lt;svg tag may require modification
from the default used for this test. Dpic might be modified to
- allow the generation of custom headers but that has not yet been done.
+ allow the generation of custom headers but that has not been done.
<li> Diagrams such as these contain text labels
that have to be treated differently from the LaTeX-compatible versions.
Apparently there is no direct way to know the bounding box of arbitrary svg
@@ -103,7 +123,7 @@ There are a number of other issues:
Rather than patch the original source files for svg production, edited copies
have been used. The configuration file svg.m4 read by m4
prior to libcct.m4 contains the following macros defined for svg.
- Others should be defined to exercise some of the media capabilties of svg.
+ Others could be defined to exercise some of the media capabilties of svg.
They are subject to change:
<ul>
<li>
@@ -161,191 +181,511 @@ There are a number of other issues:
<li>m4tt svgLinkString</g> as above but for strings attached to objects
<li> Greek and other symbols:
-<table cellpadding="0" cellspacing="0" width="100%" >
-<table cellpadding="0" cellspacing="0" width="100%" >
+<!--
+ Reference:
+ https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
+ -->
+<hr width="100%" align="left">
+<table cellpadding="2" cellspacing="0" width="75%" >
<tr>
-<td width="8%"> m4tt svg_alpha</g> <td align="left"> changecom(,)&`#'945;changecom(`#')
-<td width="8%"> m4tt svg_beta</g> <td align="left"> changecom(,)&`#'946;changecom(`#')
-<td width="8%"> m4tt svg_Gamma</g> <td align="left"> changecom(,)&`#'915;changecom(`#')
-<td width="8%"> m4tt svg_gamma</g> <td align="left"> changecom(,)&`#'947;changecom(`#')
-<td width="8%"> m4tt svg_Delta</g> <td align="left"> changecom(,)&`#'916;changecom(`#')
-<td width="8%"> m4tt svg_delta</g> <td align="left"> changecom(,)&`#'948;changecom(`#')
+<td width="10%"> m4tt svg_alpha</g> <td align="left"> changecom(,)&`#'945;changecom(`#')
+<td width="10%"> m4tt svg_beta</g> <td align="left"> changecom(,)&`#'946;changecom(`#')
+<td width="10%"> m4tt svg_Gamma</g> <td align="left"> changecom(,)&`#'915;changecom(`#')
+<td width="10%"> m4tt svg_gamma</g> <td align="left"> changecom(,)&`#'947;changecom(`#')
+<td width="10%"> m4tt svg_Delta</g> <td align="left"> changecom(,)&`#'916;changecom(`#')
+<td width="10%"> m4tt svg_delta</g> <td align="left"> changecom(,)&`#'948;changecom(`#')
<td width="10%"> m4tt svg_epsilon</g> <td align="left"> changecom(,)&`#'949;changecom(`#')
-<td width="8%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#')
+<td width="10%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#')
+</tr>
<tr>
-<td width="8%"> m4tt svg_eta</g> <td align="left"> changecom(,)&`#'951;changecom(`#')
-<td width="8%"> m4tt svg_Theta</g> <td align="left"> changecom(,)&`#'920;changecom(`#')
-<td width="8%"> m4tt svg_theta</g> <td align="left"> changecom(,)&`#'952;changecom(`#')
-<td width="8%"> m4tt svg_iota</g> <td align="left"> changecom(,)&`#'953;changecom(`#')
-<td width="8%"> m4tt svg_kappa</g> <td align="left"> changecom(,)&`#'954;changecom(`#')
-<td width="8%"> m4tt svg_Lambda</g> <td align="left"> changecom(,)&`#'923;changecom(`#')
-<td width="8%"> m4tt svg_lambda</g> <td align="left"> changecom(,)&`#'955;changecom(`#')
-<td width="8%"> m4tt svg_mu</g> <td align="left"> changecom(,)&`#'956;changecom(`#')
+<td width="10%"> m4tt svg_eta</g> <td align="left"> changecom(,)&`#'951;changecom(`#')
+<td width="10%"> m4tt svg_Theta</g> <td align="left"> changecom(,)&`#'920;changecom(`#')
+<td width="10%"> m4tt svg_theta</g> <td align="left"> changecom(,)&`#'952;changecom(`#')
+<td width="10%"> m4tt svg_iota</g> <td align="left"> changecom(,)&`#'953;changecom(`#')
+<td width="10%"> m4tt svg_kappa</g> <td align="left"> changecom(,)&`#'954;changecom(`#')
+<td width="10%"> m4tt svg_Lambda</g> <td align="left"> changecom(,)&`#'923;changecom(`#')
+<td width="10%"> m4tt svg_lambda</g> <td align="left"> changecom(,)&`#'955;changecom(`#')
+<td width="10%"> m4tt svg_mu</g> <td align="left"> changecom(,)&`#'956;changecom(`#')
+</tr>
<tr>
-<td width="8%"> m4tt svg_nu</g> <td align="left"> changecom(,)&`#'957;changecom(`#')
-<td width="8%"> m4tt svg_Xi</g> <td align="left"> changecom(,)&`#'926;changecom(`#')
-<td width="8%"> m4tt svg_xi</g> <td align="left"> changecom(,)&`#'958;changecom(`#')
-<td width="8%"> m4tt svg_Pi</g> <td align="left"> changecom(,)&`#'928;changecom(`#')
-<td width="8%"> m4tt svg_pi</g> <td align="left"> changecom(,)&`#'960;changecom(`#')
-<td width="8%"> m4tt svg_rho</g> <td align="left"> changecom(,)&`#'961;changecom(`#')
-<td width="8%"> m4tt svg_Sigma</g> <td align="left"> changecom(,)&`#'931;changecom(`#')
-<td width="8%"> m4tt svg_sigma</g> <td align="left"> changecom(,)&`#'963;changecom(`#')
+<td width="10%"> m4tt svg_nu</g> <td align="left"> changecom(,)&`#'957;changecom(`#')
+<td width="10%"> m4tt svg_Xi</g> <td align="left"> changecom(,)&`#'926;changecom(`#')
+<td width="10%"> m4tt svg_xi</g> <td align="left"> changecom(,)&`#'958;changecom(`#')
+<td width="10%"> m4tt svg_Pi</g> <td align="left"> changecom(,)&`#'928;changecom(`#')
+<td width="10%"> m4tt svg_pi</g> <td align="left"> changecom(,)&`#'960;changecom(`#')
+<td width="10%"> m4tt svg_rho</g> <td align="left"> changecom(,)&`#'961;changecom(`#')
+<td width="10%"> m4tt svg_Sigma</g> <td align="left"> changecom(,)&`#'931;changecom(`#')
+<td width="10%"> m4tt svg_sigma</g> <td align="left"> changecom(,)&`#'963;changecom(`#')
+</tr>
<tr>
-<td width="8%"> m4tt svg_tau</g> <td align="left"> changecom(,)&`#'964;changecom(`#')
+<td width="10%"> m4tt svg_tau</g> <td align="left"> changecom(,)&`#'964;changecom(`#')
<td width="10%"> m4tt svg_upsilon</g> <td align="left"> changecom(,)&`#'965;changecom(`#')
-<td width="8%"> m4tt svg_Phi</g> <td align="left"> changecom(,)&`#'934;changecom(`#')
-<td width="8%"> m4tt svg_phi</g> <td align="left"> changecom(,)&`#'966;changecom(`#')
-<td width="8%"> m4tt svg_chi</g> <td align="left"> changecom(,)&`#'967;changecom(`#')
-<td width="8%"> m4tt svg_Psi</g> <td align="left"> changecom(,)&`#'936;changecom(`#')
-<td width="8%"> m4tt svg_psi</g> <td align="left"> changecom(,)&`#'968;changecom(`#')
-<td width="8%"> m4tt svg_Omega</g> <td align="left"> changecom(,)&`#'937;changecom(`#')
+<td width="10%"> m4tt svg_Phi</g> <td align="left"> changecom(,)&`#'934;changecom(`#')
+<td width="10%"> m4tt svg_phi</g> <td align="left"> changecom(,)&`#'966;changecom(`#')
+<td width="10%"> m4tt svg_chi</g> <td align="left"> changecom(,)&`#'967;changecom(`#')
+<td width="10%"> m4tt svg_Psi</g> <td align="left"> changecom(,)&`#'936;changecom(`#')
+<td width="10%"> m4tt svg_psi</g> <td align="left"> changecom(,)&`#'968;changecom(`#')
+<td width="10%"> m4tt svg_Omega</g> <td align="left"> changecom(,)&`#'937;changecom(`#')
+</tr>
<tr>
-<td width="8%"> m4tt svg_omega</g> <td align="left"> changecom(,)&`#'969;changecom(`#')
-<td width="8%"> m4tt svg_micro</g> <td align="left"> changecom(,)&`#'956;changecom(`#')
-<td width="8%"> m4tt svg_ohm</g> <td align="left"> changecom(,)&`#'937;changecom(`#')
-<td width="8%"> m4tt svg_lt</g> <td align="left"> changecom(,)&`#'60;changecom(`#')
-<td width="8%"> m4tt svg_gt</g> <td align="left"> changecom(,)&`#'62;changecom(`#')
-<td width="8%"> m4tt svg_leq</g> <td align="left"> changecom(,)&`#'8804;changecom(`#')
-<td width="8%"> m4tt svg_geq</g> <td align="left"> changecom(,)&`#'8805;changecom(`#')
-<td width="8%"> m4tt svg_prime</g> <td align="left"> changecom(,)&`#'8242;changecom(`#')
+<td width="10%"> m4tt svg_omega</g> <td align="left"> changecom(,)&`#'969;changecom(`#')
+<td width="10%"> m4tt svg_micro</g> <td align="left"> changecom(,)&`#'956;changecom(`#')
+<td width="10%"> m4tt svg_ohm</g> <td align="left"> changecom(,)&`#'937;changecom(`#')
+<td width="10%"> m4tt svg_lt</g> <td align="left"> changecom(,)&`#'60;changecom(`#')
+<td width="10%"> m4tt svg_gt</g> <td align="left"> changecom(,)&`#'62;changecom(`#')
+<td width="10%"> m4tt svg_leq</g> <td align="left"> changecom(,)&`#'8804;changecom(`#')
+<td width="10%"> m4tt svg_geq</g> <td align="left"> changecom(,)&`#'8805;changecom(`#')
+<td width="10%"> m4tt svg_prime</g> <td align="left"> changecom(,)&`#'8242;changecom(`#')
+</tr>
<tr>
-<td width="8%"> m4tt svg_backsl</g> <td align="left"> changecom(,)&`#'92;changecom(`#')
-<td width="8%"> m4tt svg_pound</g> <td align="left"> changecom(,)&`#'35;changecom(`#')
-<td width="8%"> m4tt svg_comma</g> <td align="left"> changecom(,)&`#'44;changecom(`#')
-<td width="8%"> m4tt svg_lparen</g> <td align="left"> changecom(,)&`#'40;changecom(`#')
-<td width="8%"> m4tt svg_rparen</g> <td align="left"> changecom(,)&`#'41;changecom(`#')
-<td width="8%"> m4tt svg_emsp</g> <td align="left"> |changecom(,)&`#'8195;changecom(`#')|
-<td width="8%"> m4tt svg_ensp</g> <td align="left"> |changecom(,)&`#'8194;changecom(`#')|
-<td width="8%"> m4tt svg_thinsp</g> <td align="left"> |changecom(,)&`#'8201;changecom(`#')|
+<td width="10%"> m4tt svg_backsl</g> <td align="left"> changecom(,)&`#'92;changecom(`#')
+<td width="10%"> m4tt svg_pound</g> <td align="left"> changecom(,)&`#'35;changecom(`#')
+<td width="10%"> m4tt svg_comma</g> <td align="left"> changecom(,)&`#'44;changecom(`#')
+<td width="10%"> m4tt svg_lparen</g> <td align="left"> changecom(,)&`#'40;changecom(`#')
+<td width="10%"> m4tt svg_rparen</g> <td align="left"> changecom(,)&`#'41;changecom(`#')
+<td width="10%"> m4tt svg_circ</g> <td align="left"> changecom(,)&`#'710;changecom(`#')
+<td width="10%"> m4tt svg_deg</g> <td align="left"> changecom(,)&`#'176;changecom(`#')
+</tr>
</table>
+<table cellpadding="2" cellspacing="0" width="75%" >
+<tr>
+<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(`#')|
+</tr>
+</table>
+<hr width="100%" align="left">
</ul>
<li> Inkscape: It may be efficient to define elements by macro and to
- place them using a WYSIWYG graphics editor. A draft page intended
+ place them using a wysiwyg graphics editor. A draft page intended
for Inkscape is included. A reasonable variety of elements is defined
but many more could be added and they should be customized for
- particular applications.
+ particular applications. Adjustments may also have to be made to
+ obtain the proper snap-to actions.
<li> Link experiments: Click on the resistor or source of quickSVG
to go to external
files in new windows. Click on "n-port" in NportSVG to replace the diagram
and then "back" to return.
- <li> Some of the assumptions used to create this draft may be naive. Comments
- are welcome.
+ <li> Some of the assumptions used to create this draft may be
+ na&`#'239;ve.
+ Comments are welcome.
</ul>
+
+<!--
+<embed pluginspage="http://www.adobe.com/svg/viewer/install/" />
+-->
+
+<hr>
+
+<table>
+<tr>
+<td width="50%">
+<table><tr>cfig(quickSVG,
+ SVG produced by dpic,y)
+<!-- <tr> SVG produced by dpic --> </table>
+<td>
+<table><tr>cfig(quick,
+ SVG produced from quick.pdf by dvisvgm,y)
+<!-- <tr> SVG produced from quick.pdf by dvisvgm --> </table>
+</table>
+
<hr>
-cfig(quickSVG)
-cfig(CctTableSVG)
-cfig(DiodesSVG)
-cfig(EmarrowsSVG)
-cfig(SourcesSVG)
-cfig(VariableSVG)
-cfig(AmpTableSVG)
-cfig(FusesSVG)
-cfig(SwitchesSVG)
-cfig(GroundsSVG)
-cfig(AntennasSVG)
-cfig(AudioSVG)
-cfig(OpampSVG)
-cfig(XformSVG)
-cfig(NPDTSVG)
-cfig(ContactSVG)
-cfig(ContactsSVG)
-cfig(relaycoilSVG)
-cfig(RelaySVG)
-cfig(JackSVG)
-cfig(ConnSVG)
-cfig(PconnSVG)
-cfig(HeadersSVG)
-cfig(ConnectorsSVG)
-cfig(fetSVG)
-cfig(ujtSVG)
-cfig(thyristorSVG)
-cfig(BipSVG)
-cfig(TgateSVG)
-cfig(NportSVG)
-cfig(NLGSVG)
-cfig(WindingsSVG)
-cfig(ex01SVG)
-cfig(TimerSVG)
-cfig(OptoisoSVG)
-cfig(MixerSVG)
-cfig(PushPullSVG)
-cfig(QuantumSVG)
-cfig(SQUIDSVG)
-cfig(SixpoleSVG)
-cfig(ex18SVG)
-cfig(MCSVG)
-cfig(ex10SVG)
-cfig(ThreeSVG)
-cfig(ex17SVG)
-cfig(ex02SVG)
-cfig(ex12SVG)
-cfig(pwrsupplySVG)
-cfig(TTLnandSVG)
-cfig(I2LSVG)
-cfig(SchottkySVG)
-cfig(ex11SVG)
-cfig(ex04SVG)
-cfig(CsourceSVG)
-cfig(DriveSVG)
-cfig(ex16SVG)
-cfig(ex03SVG)
-cfig(MotorControlSVG)
-cfig(RectifiersSVG)
-cfig(HeathkitSVG)
-cfig(lcctSVG)
-cfig(TubediagsSVG)
-cfig(sfgSVG)
-cfig(LogicSVG)
-cfig(ex08SVG)
-cfig(DecoderSVG)
-cfig(ex21SVG)
-cfig(MultiplexerSVG)
-cfig(DemultiplexerSVG)
-cfig(ShiftRSVG)
-cfig(AdderSVG)
-cfig(CanLogicSVG)
-cfig(AlogixSVG)
-cfig(ABlogixSVG)
-cfig(XORSVG)
-cfig(paletteSVG)
-cfig(ex00SVG)
-cfig(controlSVG)
-cfig(GrayCodeSVG)
-cfig(CrossbarSVG)
-cfig(ByteSVG)
-cfig(RotboxSVG)
-cfig(ex06SVG)
-cfig(ex09SVG)
-cfig(ex05SVG)
-cfig(LoglogSVG)
-cfig(randomSVG)
-cfig(expSVG)
-cfig(graysurfSVG)
-cfig(shapesSVG)
-cfig(AntiqueClockSVG)
-cfig(cscSVG)
-cfig(roseSVG)
-cfig(diamondSVG)
-cfig(wormSVG)
-cfig(ButtonsSVG)
-cfig(DiniSVG)
-cfig(SierpinskiSVG)
-cfig(recycleSVG)
-cfig(ex15SVG)
-cfig(CountingSVG)
-cfig(CrowSVG)
-cfig(FlowSVG)
+cfig(CctTableSVG,
+ Two-terminal elements, showing some variations)
+
+cfig(DiodesSVG,
+ Diodes: a m4tt`'K</g> in the second argument draws an open
+ arrowhead)
+
+cfig(EmarrowsSVG,
+ Radiation arrows)
+
+cfig(SourcesSVG,
+ Sources and source-like elements)
+
+cfig(VariableSVG,
+ Arrows and marks indicating variability)
+
+cfig(AmpTableSVG,
+ Macros m4tt`'amp`,' delay</g>`,' and m4tt`'integrator</g>)
+
+cfig(FusesSVG,
+ Macros m4tt`'fuse</g> and m4tt`'cbreaker</g>)
+
+cfig(SwitchesSVG,
+ The switch macros; m4tt`'switch(`,'`,'`,'L|B|D)</g> is a wrapper
+ for m4tt`'lswitch</g>`,' m4tt`'bswitch</g>`,' and m4tt`'dswitch</g>)
+
+cfig(GroundsSVG,
+ Ground symbols)
+
+cfig(AntennasSVG,
+ Antenna symbols)
+
+cfig(AudioSVG,
+ Audio elements)
+
+cfig(OpampSVG,
+ The opamp)
+
+cfig(XformSVG,
+ The transformer element`,' drawing direction down)
+
+cfig(NPDTSVG,
+ Double throw with the m4tt`'NPDT</g> macro)
+
+cfig(ContactSVG,
+ A non-exhaustive sampling of m4tt`'contact</g> macro variations)
+
+cfig(ContactsSVG,
+ The m4tt`'contacts</g> macro)
+
+cfig(relaycoilSVG,
+ The m4tt`'relaycoil</g> macro)
+
+cfig(RelaySVG,
+ Some variants of the m4tt`'relay</g> macro)
+
+cfig(JackSVG,
+ The m4tt`'jack</g> and m4tt`'plug</g> macros)
+
+cfig(ConnSVG,
+ The m4tt`'tstrip`,' ccoax`,' tconn</g>`,' and m4tt`'tbox</g> macros)
+
+cfig(PconnSVG,
+ The m4tt`'pconnex</g> macro)
+
+cfig(HeadersSVG,
+ The m4tt`'Header</g> macro)
+
+cfig(ConnectorsSVG,
+ Some connectors with simple geometry and lists of labels)
+
+cfig(fetSVG,
+ FETs`,' showing programmable components and example customizations)
+
+cfig(ujtSVG,
+ UJT examples)
+
+cfig(thyristorSVG,
+ Thyristor examples)
+
+cfig(BipSVG,
+ Bipolar transistors (drawing direction: up))
+
+cfig(TgateSVG,
+ The m4tt`'tgate</g> and m4tt`'ptrans</g> elements)
+
+cfig(NportSVG,
+ The m4tt`'nport</g> and m4tt`'nterm</g> macros)
+
+cfig(NLGSVG,
+ Some customizations of m4tt`'nport</g>)
+
+cfig(WindingsSVG,
+ The macro
+ m4tt`'winding(L|R`,'diam`,'pitch`,'turns`,'core wid`,'core color)</g>)
+
+cfig(ex01SVG,
+ Two simple labeled circuits)
+
+cfig(ex02SVG,
+ Elements at obtuse angles)
+
+cfig(OptoisoSVG,
+ Optical isolator: a circuit with right or left orientation)
+
+cfig(MixerSVG,
+ A balanced mixer`,' using m4tt`'mosfet</g> and a custom transformer)
+
+cfig(PushPullSVG,
+ A push-pull mixer`,' showing FETs with multiple gates)
+
+cfig(QuantumSVG,
+ A quantum circuit)
+
+cfig(SQUIDSVG,
+ Superconducting quantum interface device (drawing direction down))
+
+cfig(SixpoleSVG,
+ A six-pole filter)
+
+cfig(ex18SVG,
+ Precision half-wave rectifier and a tunnel diode circuit
+ (illustrating m4tt`'opamp`,' diode`,' resistor`,' ground`,'</g>
+ and labels))
+
+cfig(MCSVG,
+ A three-phase switched AC-AC converter and a DC-DC converter)
+
+cfig(ex10SVG,
+ Non-planar graph and bistable circuit
+ (illustrating the m4tt`'crossover</g> macro and colored elements))
+
+cfig(ThreeSVG,
+ Three-phase oscillator)
+
+cfig(ex17SVG,
+ A repetitive network created by Pic looping and
+ a skewed circuit used to test the macro m4tt`'parallel_</g>)
+
+cfig(ex12SVG,
+ A CMOS NAND gate`,' a test circuit`,' and an XMOSFET example)
+
+cfig(pwrsupplySVG,
+ An elementary power supply circuit with colored elements`,'
+ and a multiple-winding transformer with 3-phase rectifier)
+
+cfig(TTLnandSVG,
+ TTL NAND gate illustrating a transistor with multiple emitters)
+
+cfig(I2LSVG,
+ Gate circuit and equivalent embedded components
+ illustrating multiple collectors)
+
+cfig(SchottkySVG,
+ A 4-input NAND circuit illustrating the m4tt`'S</g> (Schottky)
+ option of m4tt`'bi_trans</g>)
+
+cfig(ex11SVG,
+ Transistor radio audio chain)
+
+cfig(ex04SVG,
+ Labels on non-manhattan elements)
+
+cfig(CsourceSVG,
+ Realization of a controlled source
+ (illustrating stacked element labels))
+
+cfig(DriveSVG,
+ Synchronous machine driven by variable-speed drive and rectifier)
+
+cfig(ex16SVG,
+ A rate 1/2 binary convolutional coder and its state diagram)
+
+cfig(ex03SVG,
+ Digital filter)
+
+cfig(MotorControlSVG,
+ Motor control connections)
+
+cfig(RectifiersSVG,
+ Rectifier circuits and waveforms)
+
+cfig(HeathkitSVG,
+ The power supply of a Heathkit AR-15 (Now`,' <i>that</i>
+ was a receiver!) with custom transformer and other elements`,'
+ drawn on a grid (partially shown) to aid in placement)
+
+cfig(lcctSVG,
+ A digital circuit of moderate size`,'
+ redrawn from M. P. Maclenan and G. M. Burns`,'
+ "An Approach to Drawing Circuit Diagrams for Text Books`,'"
+ Tugboat (12)1`,' March 1991`,' pp. 66-69)
+
+cfig(UNOSVG,
+ An Arduino UNO circuit adapted and redrawn)
+ <!--
+ m4tt`'https://content.arduino.cc/assets/UNO-TH_Rev3e_sch.pdf</g>
+ -->
+
+cfig(TubediagsSVG,
+ Electron-tube diagrams: a few bottom-view base diagrams`,'
+ a generic triode test circuit`,' and a 25-watt audio amplifier adapted
+ from F. Langford-Smith`,' <i>Radiotron Designers Handbook</i>`,' fourth
+ edition`,' Harrison`,' NJ: Radio Corporation of America`,' 1952)
+
+cfig(sfgSVG,
+ Signal-flow graphs)
+
+cfig(LogicSVG,
+ Basic logic gates)
+
+cfig(ex08SVG,
+ General-purpose latch: a small logic circuit)
+
+cfig(DecoderSVG,
+ Decoder logic`,' constructed using the m4tt`'for_</g> macro)
+
+cfig(ex21SVG,
+ Some flip-flops)
+
+cfig(MultiplexerSVG,
+ Multiplexer)
+
+cfig(DemultiplexerSVG,
+ Demultiplexer)
+
+cfig(ShiftRSVG,
+ A 5-bit shift register drawn using a custom flip-flop)
+
+cfig(AdderSVG,
+ A full adder and a cascade of n-bit adders)
+
+cfig(CanLogicSVG,
+ A way of automatically drawing two-layer logic diagrams)
+
+cfig(AlogixSVG,
+ The m4tt`'Autologix(`'<i>Boolean expression</i>;
+ <i>Boolean expression</i>... `,' <i>options</i>)</g>
+ macro automatically draws Boolean expressions in function notation.
+ The function tree is drawn`,' then a row or column of inputs`,' then
+ the connections. The default result is on the left`,'
+ a custom element at the top`,' and a tree of gates only is shown
+ on the right. THe lower examples illustrate the L`,' R`,' and V options.)
+
+cfig(ABlogixSVG,
+ The m4tt`'Autologix</g> macro can draw inputs on the left but
+ the added drawing complexity may require hand tuning with
+ second-argument options: m4tt`'L</g> puts the inputs on the left`,'
+ m4tt`'R reverses their order`,' m4tt`'V</g> scans the input arguments
+ in reverse order`,' and m4tt`'offset=</g>`'<i>value</i> displaces
+ the array of inputs)
+
+cfig(XORSVG,
+ Realizations of the XOR function using m4tt`'Autologix</g>)
+
+cfig(paletteSVG,
+ A draft palette of a few elements for Inkscape using
+ a 1 mm grid)
+
+cfig(ex00SVG,
+ Line diagrams)
+
+cfig(controlSVG,
+ Control-system block diagrams that do not require m4)
+
+cfig(GrayCodeSVG,
+ Gray code 10-bit encoder disk pattern)
+
+cfig(CrossbarSVG,
+ A crossbar switch)
+
+cfig(ByteSVG,
+ Elementary splines)
+
+cfig(RotboxSVG,
+ The macro
+ m4tt`'rotbox(<i>wid,ht,type,</i>[r|t=<i>val</i>])</g>
+ draws a box in the current direction)
+
+cfig(ex06SVG,
+ Crosshatching by m4tt`'for</g> loops)
+
+cfig(ex09SVG,
+ Illustrating the macro
+ m4tt`'dimension_(<i>linespec`,' offset`,' label`,' </i>
+ H|W|D|<i>blank width</i>`,' <i>tic offset</i>`,' <-|->)</g>.
+ A negative second argument implies an offset to the right of the
+ <i>linespec</i> direction. A <i>label</i> starting with
+ m4tt`'"</g> or
+ m4tt`'sprintf</g> is copied literally. If <i>label</i> is an
+ m4tt`'s_box(...)</g> then setting argument 4 to m4tt`'H</g>`,'
+ m4tt`'W</g>`,'
+ or m4tt`'D</g> tailors the blank width to the m4tt`'s_box</g> height`,'
+ width`,' or diagonal respectively; i.e.`,' m4tt`'W</g> is equivalent to
+ m4tt`'s_wd+textoffset*2</g>.
+ The macro m4tt`'arcdimension_</g> is similar but the first argument
+ specifies the arc to be dimensioned and the second argument is
+ the outward radial offset of the dimension arrow arc.)
+
+cfig(Y14-5SVG,
+ Dimensioning with tolerances according to ASME Y14.5)
+ Use of m4tt`'darrow</g> and m4tt`'Darc</g>)
+
+cfig(ex05SVG,
+ Use of m4tt`'darrow</g> and m4tt`'Darc</g>)
+
+cfig(LoglogSVG,
+ A graph drawn using the pic language)
+
+cfig(GeometrySVG,
+ A plane geometry example)
+
+cfig(LyapSVG,
+ Illustrating a Lyapunov function)
+
+cfig(randomSVG,
+ Testing random numbers)
+
+cfig(expSVG,
+ Test of m4tt`'project</g> and other m4tt`'lib3D</g>
+ macros`,' showing the projection of a solid onto
+ the <i>y1`,'z1</i> plane by sighting along the x1 axis.)
+
+cfig(graysurfSVG,
+ Plotting surfaces using gray scales. A sort algorithm
+ determines plotting order)
+
+cfig(shapesSVG,
+ Basic shapes)
+
+cfig(AntiqueClockSVG,
+ An antique clock face)
+
+cfig(cscSVG,
+ Conestoga Sailing Club (illustrating the filling of arbitrary
+ shapes))
+
+cfig(roseSVG,
+ Redrawn from a detail of the set design for the musical
+ <i>Dracula</i>`,' used for testing m4tt`'dpic</g>. This diagram
+ consumes much LaTeX main memory but can be produced
+ directly as pdf using m4tt`'dpic -d</g>`,'
+ as svg using m4tt`'dpic -g</g>`,'
+ or as postscript using m4tt`'dpic -r</g>
+ since no text formatting is required)
+
+cfig(diamondSVG,
+ Variations on M. Goossens`,' S. Rahtz`,' and F. Mittelbach`,'
+ <i>The LaTeX Graphics Companion</i>`,' Addison-Wesley 1997`,' pp. 57-58)
+
+cfig(wormSVG,
+ An exercise in calculating RGB colours)
+
+cfig(ButtonsSVG,
+ Shading in color)
+
+cfig(DiniSVG,
+ Dini surface and an icosahedron)
+
+cfig(SierpinskiSVG,
+ The Sierpinski triangle and a Cayley graph:
+ tests of pic macro recursion)
+
+cfig(recycleSVG,
+ Modest repetition and partial fill)
+
+cfig(ex15SVG,
+ Simple diagrams that are easily drawn by looping)
+
+cfig(CountingSVG,
+ An example of enumeration)
+
+cfig(CrowSVG,
+ Illustrating m4tt`'shadebox</g> and a custom crowfoot line
+ termination)
+
+cfig(FlowSVG,
+ A flowchart sampler)
<!-- <p>
More flow-chart examples? Try
<a href="https://buraphakit.sourceforge.io/EFI/EFI_2019_S2_W13.shtml"
TARGET="_blank">here.</a>
</p> -->
-cfig(BtreeSVG)
-cfig(TtreeSVG)
-cfig(InclepsSVG)
+
+cfig(BtreeSVG,
+ Binary trees)
+
+cfig(InclepsSVG,
+ Overlaying a figure with line graphics)
+
cfig(FontsSVG)
+</td>
+</tr>
+</table>
</BODY>
</HTML>
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4
index 2bad59ba93a..6128441fc8a 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m4
@@ -333,8 +333,8 @@ A:Gridbox( FlipFlop(D)
] with .nw at (0,0)
-"A draft palette of a few elements for Inkscape using a 1 mm grid" \
- ljust below at last [].sw
+#"A draft palette of a few elements for Inkscape using a 1 mm grid" \
+# ljust below at last [].sw
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/pwrsupplySVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/pwrsupplySVG.m4
index 843c6660b5e..37c7524070a 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/pwrsupplySVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/pwrsupplySVG.m4
@@ -1,42 +1,76 @@
.PS
-# Pwrsupply.m4
+# pwrsupply.m4
cct_init
ifdef(`m4pco',`resetrgb')
- linewid = linewid*1.2
- down_
-T:transformer
- line left_ elen_/4 from T.P1
- rgbdraw(0,0,255,fuse(left_ elen_/3,D))
- reversed(`switch')
- gap(down_ to (Here,T.P2))
- { fuse(right_ 2*dimen_/5 at last []) }
- line to T.P2
- blen = dimen_/2
-W: T.TS+(dimen_,0)
-N: W+(blen,blen)
-S: W+(blen,-blen)
-E: S+(blen,blen)
- diode(from W to N)
- diode(from S to E)
-G:gap(from E+(dimen_*4/3,0) down_ (E.y-S.y)*5/4); llabel("+" wid 0.1*scale,,-)
-C:capacitor(down_ G.start.y-G.end.y from 0.5 between E and G.start,C)
+Singlephase:[
+ linewid = linewid*1.2
+ down_
+ T:transformer
+ line left_ elen_/8 from T.P1
+ rgbdraw(0,0,1,fuse(left_ elen_/3,D))
+ reversed(`switch',left_ elen_*2/3)
+ gap(down_ to (Here,T.P2))
+ { fuse(right_ 2*dimen_/5 at last []) }
+ line to T.P2
+ blen = dimen_/2
+ W: T.TS+(dimen_/2,0)
+ N: W+(blen,blen)
+ S: W+(blen,-blen)
+ E: S+(blen,blen)
+ diode(from W to N)
+ diode(from S to E)
+ G: gap(from E+(dimen_,0) down_ (E.y-S.y)*5/4); llabel(+,,-)
+ C: capacitor(down_ G.start.y-G.end.y from 0.5 between E and G.start,C)
+
+ setrgb(255,0,0)
+ line from T.S1 to (T.S1,N); line to N
+ dot
+ diode(to E); dot
+ line from E to G.start; dot
+ dot(at C.start)
+ resetrgb
+
+ setrgb(0,255,0,,D)
+ dot(at C.end)
+ dot(at G.end)
+ ground
+ line to (W,Here); line to W; dot
+ diode(to S); dot
+ line to (T.S2,Here); line to T.S2
+ resetrgb
+ ]
-setrgb(255,0,0)
- line from T.S1 to (T.S1,N); line to N
- dot
- diode(to E); dot
- line from E to G.start; dot
- dot(at C.start)
-resetrgb
+Threephase: [
+L:[ loadht = 2*elen_
+ Load: ebox(down_ loadht,0.4,0.25); llabel(+,,-)
+ hsep = dimen_*3/4
+ for_(1,3,1,
+ `line left_ hsep; ifelse(m4x,3,,dot)
+ { diode(up_ loadht/3) ; line up_ loadht/3; diode(up_ loadht/3)
+ T`'m4x: ifelse(m4x,3,Here,dot)
+ line right hsep } ')
+ ]
-setrgb(0,255,0,,D)
- dot(at C.end)
- dot(at G.end)
- ground
- line to (W,Here); line to W; dot
- diode(to S); dot
- line to (T.S2,Here); line to T.S2
-resetrgb
+T:[
+ X1: transformer(down_ dimen_*2/3,,,,4)
+ X2: transformer(down_ dimen_*2/3,,,,4) with .P1 at X1.P2
+ X3: transformer(down_ dimen_*2/3,,,,4) with .P1 at X2.P2
+ line from X1.M4Core1.end to X3.M4Core1.start
+ line from X1.M4Core2.end to X3.M4Core2.start
+ for_(1,3,1,
+ `move to X`'m4x.P2 ; ifelse(m4x,3,,dot)
+ line left_ dimen_
+ P`'m4x: dot(,,1)')
+ line left_ dimen_/2 from X1.P1 then down X1.P1.y-P3.y; dot
+ B: X1.S2+(dimen_/2,0)
+ line from X1.S1 right B.x-X1.S2.x then down X1.S1.y-X3.S1.y then to X3.S1
+ line from X2.S1 to (B,X2.S1); dot
+ ] with .X2.S2 at L.w-(dimen_,0)
+
+ line from T.X1.S2 to (L.T3,T.X1.S2); dot
+ line from T.X2.S2 to (L.T2,T.X2.S2); dot
+ line from T.X3.S2 to (L.T1,T.X3.S2); dot
+] with .sw at Singlephase.se+(0.3,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/quickSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/quickSVG.m4
index 7b63ec6db75..3e77ad1694e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/quickSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/quickSVG.m4
@@ -5,16 +5,16 @@ elen = 0.75 # Variables are allowed; default units are inches
move right 0.4
Origin: Here # Position names are capitalized
svgLink(SourcesSVG.svg,source(up_ elen))
- llabel(-,v`'svg_sub(s),+)
- svgLink(CctTableSVG.svg,resistor(right_ elen)); rlabel(,R,)
+ llabel(-,svg_it(v`'svg_sub(s)),+)
+ svgLink(CctTableSVG.svg,resistor(right_ elen)); rlabel(,svg_it(R),)
dot
{ # Save current position and direction
capacitor(down_ to (Here,Origin)) #(Here,Origin) = (Here.x,Origin.y)
- rlabel(+,v,-); llabel(,,C)
+ rlabel(+,svg_it(v),-); llabel(,svg_it(C))
dot
} # Restore position and direction
line right_ elen*2/3
{move right 0.2}
- inductor(down_ Here.y-Origin.y); rlabel(,L,); b_current("i")
+ inductor(down_ Here.y-Origin.y); rlabel(,svg_it(L),); b_current("svg_it(i)")
line to Origin
.PE # Pic input ends
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/randomSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/randomSVG.m4
index e482d9f1e47..4ca2056d68f 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/randomSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/randomSVG.m4
@@ -6,6 +6,7 @@ NeedDpicTools
################################################################
# hscale(right length,nlabels,
# minlabel,maxlabel,[T][N])
+# arg5=T: top axis, N: nolabels
define(`hscale',`[ define(`hs_nl',`ifelse(`$2',,5,`$2')')
A: line `$1' ; Start: A.start; End: A.end
td = 1/(hs_nl-1)*A.len/5
@@ -24,6 +25,7 @@ NeedDpicTools
]')
# vscale(up length,nlabels,
# minlabel,maxlabel,[R][N] )
+# arg5=R: right axis, N: nolabels
define(`vscale',`[ define(`vs_nl',`ifelse(`$2',,5,`$2')')
A: line `$1' ; Start: A.start; End: A.end
td = 1/(vs_nl-1)*A.len/5
@@ -46,7 +48,7 @@ NeedDpicTools
################################################################
[
- n = 2000
+ n = 2000 # number of samples
stddev = 0.25
graphsize = 2
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx
index 6bb5ab2029e..d81a22927aa 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx
@@ -168,6 +168,9 @@ more basic.
<td width="8%"> m4tt svg_emsp</g> <td align="left"> |changecom(,)&`#'8195;changecom(`#')|
<td width="8%"> m4tt svg_ensp</g> <td align="left"> |changecom(,)&`#'8194;changecom(`#')|
<td width="8%"> m4tt svg_thinsp</g> <td align="left"> |changecom(,)&`#'8201;changecom(`#')|
+<tr>
+<td width="8%"> m4tt svg_circ</g> <td align="left"> |changecom(,)&`#'710;changecom(`#')|
+<td width="8%"> m4tt svg_deg</g> <td align="left"> |changecom(,)&`#'176;changecom(`#')|
</table>
</ul>