summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/svg
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-05-02 03:03:34 +0000
committerNorbert Preining <norbert@preining.info>2020-05-02 03:03:34 +0000
commit8626a9c3cb5dc8d02d779d5b5b1e3933d5626f43 (patch)
tree3cf05fd2ad850b994dafdcf497738d48a29634ca /graphics/circuit_macros/examples/svg
parent7039906aa6676b98933cd099d1cb038f1644c18f (diff)
CTAN sync 202005020303
Diffstat (limited to 'graphics/circuit_macros/examples/svg')
-rw-r--r--graphics/circuit_macros/examples/svg/AntiqueClockSVG.m416
-rw-r--r--graphics/circuit_macros/examples/svg/AudioSVG.m430
-rw-r--r--graphics/circuit_macros/examples/svg/Banking.m459
-rw-r--r--graphics/circuit_macros/examples/svg/ButtonsSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/ConnSVG.m416
-rw-r--r--graphics/circuit_macros/examples/svg/ConnectorsSVG.m430
-rw-r--r--graphics/circuit_macros/examples/svg/CsourceSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/FontsSVG.m413
-rw-r--r--graphics/circuit_macros/examples/svg/FusesSVG.m412
-rw-r--r--graphics/circuit_macros/examples/svg/GroundsSVG.m418
-rw-r--r--graphics/circuit_macros/examples/svg/HeadersSVG.m46
-rw-r--r--graphics/circuit_macros/examples/svg/MCSVG.m453
-rw-r--r--graphics/circuit_macros/examples/svg/Makefile31
-rw-r--r--graphics/circuit_macros/examples/svg/MixerSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/PconnSVG.m428
-rw-r--r--graphics/circuit_macros/examples/svg/RectifiersSVG.m419
-rw-r--r--graphics/circuit_macros/examples/svg/SVGconfig.m416
-rw-r--r--graphics/circuit_macros/examples/svg/ShiftRSVG.m44
-rw-r--r--graphics/circuit_macros/examples/svg/SourcesSVG.m47
-rw-r--r--graphics/circuit_macros/examples/svg/SwitchesSVG.m49
-rw-r--r--graphics/circuit_macros/examples/svg/TimerSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/TubediagsSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/VariableSVG.m433
-rw-r--r--graphics/circuit_macros/examples/svg/ex01SVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/ex09SVG.m444
-rw-r--r--graphics/circuit_macros/examples/svg/examplesSVG.htmx173
-rw-r--r--graphics/circuit_macros/examples/svg/graysurfSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/icsSVG.m4189
-rw-r--r--graphics/circuit_macros/examples/svg/lcctSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/paletteSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/recycleSVG.m42
-rw-r--r--graphics/circuit_macros/examples/svg/tstSVG.htmx162
-rw-r--r--graphics/circuit_macros/examples/svg/windows.m412
33 files changed, 593 insertions, 407 deletions
diff --git a/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4 b/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
index 0848a53cbe..63c169d3e2 100644
--- a/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
+++ b/graphics/circuit_macros/examples/svg/AntiqueClockSVG.m4
@@ -4,9 +4,7 @@ gen_init(svg_font(font-family="sans-serif" font-stretch="condensed"))
# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals
-# `Initialize rotated text. Any unrotated text must
-# appear after the rotated text.'
-svgrot_init(AntiqueClockSVG)
+svg_rot_init(AntiqueClockSVG)
# `hms2deg(hr,min,sec) hr:min:sec to degrees
# blank arg1: degrees for minute hand
@@ -74,8 +72,8 @@ define(`AntiqueClock',`[ # h,m,s,diam
second = ifelse(`$3',,51,`$3')
# outer radius
ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4')
- r2 = r1-0.5*skale
- r3 = r2-0.14*skale
+ r2 = r1 - 0.5*skale
+ r3 = r2 - 0.14*skale
r4 = r3 - 0.35*skale
r5 = r4 - 0.17*skale
r6 = r5 - 0.63*skale
@@ -117,11 +115,11 @@ Face: circle thick 0 fill_(1) rad r3 at C
textht = (r3-r4)*0.6
for mn = -15 to 15 by 5 do { t = 90-mn/60*360
R:(Rect_((r3+r4)/2,t))
- svg_rot(mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t))
+ svg_rot(-mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t))
}
for mn = 20 to 40 by 5 do { t = 450-mn/60*360
R: (Rect_((r3+r4)/2,t))
- svg_rot(-180+mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t))
+ svg_rot(180-mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t))
}
# Outer tics
for mn = 1 to 60 do { t = 90-mn/60*360
@@ -131,11 +129,11 @@ Face: circle thick 0 fill_(1) rad r3 at C
textht = (r5-r6)*0.6
Loopover_(`mx',`tt = 90-(m4Lx-4)/12*360
R: (Rect_((r5+r6)/2,tt))
- svg_rot(90-tt, "mx" at C+R+adj(tt)) ',
+ svg_rot(tt-90, "mx" at C+R+adj(tt)) ',
IX,X,XI,XII,I,II,III)
Loopover_(`mx',`tt = 360-m4Lx*30
R: (Rect_((r5+r6)/2,tt))
- svg_rot(270-tt, "mx" at C+R+adj(tt)) ',
+ svg_rot(tt-270, "mx" at C+R+adj(tt)) ',
IV,V,VI,VII,VIII)
# Inner tics
diff --git a/graphics/circuit_macros/examples/svg/AudioSVG.m4 b/graphics/circuit_macros/examples/svg/AudioSVG.m4
index 116f155e58..709fdf4c25 100644
--- a/graphics/circuit_macros/examples/svg/AudioSVG.m4
+++ b/graphics/circuit_macros/examples/svg/AudioSVG.m4
@@ -1,5 +1,5 @@
.PS
-# `Audio.m4'
+# `AudioSVG.m4'
cct_init(svg_font(sans-serif,11bp__,2bp__))
define(`In123',`
@@ -44,14 +44,6 @@ L:[
thicklines_
] with .sw at last [].se+(0.35,0)
[
- M: microphone
- `"microphone"' at M.s+(0,-0.2) below
- In123(M)
- thinlines_
- arrow <- from M.Circle.n up 0.15 ; "svg_it(Circle)" above
- thicklines_
- ] with .sw at last [].se+(0.4,0)
-[
Z: buzzer
`"buzzer"' at Z.s+(0,-0.2) below
In123(Z)
@@ -69,6 +61,24 @@ R:[
"svg_it(Face)" wid 0.5 at Here above
thicklines_
] with .sw at last [].se+(0.4,0)
+[
+ M: microphone
+ `"microphone"' wid 60bp__ at M.s+(0,-0.2) below
+ In123(M)
+ thinlines_
+ arrow <- from M.Circle.n up 0.15 ; "svg_it(Circle)" above
+ thicklines_
+ ] with .sw at last [].se+(0.4,0)
+[
+ M: microphone(A)
+ "`microphone(A)'" at M.s+(0,-0.2) #below
+ thinlines_
+ arrow <- from M.Head.e+(0,0.05) right 0.2; "svg_it(Head)" wid 40bp__ ljust
+ spline 0.5 <- from M.Head.b down 0.05 right 0.1 then right 0.1
+ "svg_it(Head.b)" ljust
+ arrow <- from M.Stand.s right 0.2; "svg_it(Stand.s)" ljust
+ thicklines_
+ ] with .n at last [].s+(0,-0.2)
[[
E: earphone
`"earphone"' at E.s+(0,-0.2) below
@@ -87,7 +97,7 @@ R:[
"svg_it(C)" at E.C
thicklines_
] with .sw at last [].se+(0.4,0)
-] with .n at (0.5 between L and R,L.s)+(0,-0.2)
+] with .n at (0.5 between L and R,L.s)+(0.5,-0.2)
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/Banking.m4 b/graphics/circuit_macros/examples/svg/Banking.m4
deleted file mode 100644
index 630326f867..0000000000
--- a/graphics/circuit_macros/examples/svg/Banking.m4
+++ /dev/null
@@ -1,59 +0,0 @@
-.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/graphics/circuit_macros/examples/svg/ButtonsSVG.m4 b/graphics/circuit_macros/examples/svg/ButtonsSVG.m4
index b9e9c12e69..79c9463639 100644
--- a/graphics/circuit_macros/examples/svg/ButtonsSVG.m4
+++ b/graphics/circuit_macros/examples/svg/ButtonsSVG.m4
@@ -1,7 +1,7 @@
.PS
# ButtonsSVG.m4
gen_init(svg_font(sans-serif,11bp__))
-copy "HOMELIB_/dpictools.pic"
+NeedDpicTools
divert(-1)
#################################################################
diff --git a/graphics/circuit_macros/examples/svg/ConnSVG.m4 b/graphics/circuit_macros/examples/svg/ConnSVG.m4
index 9d828ee48f..7344baeb23 100644
--- a/graphics/circuit_macros/examples/svg/ConnSVG.m4
+++ b/graphics/circuit_macros/examples/svg/ConnSVG.m4
@@ -1,6 +1,6 @@
.PS
# `ConnSVG.m4'
-cct_init(svg_font(sans-serif,11.5bp__))
+cct_init(svg_font(sans-serif,10.5bp__))
T:[
S1: tstrip(U)
@@ -55,13 +55,13 @@ Y: [
] with .sw at (C.e.x-0.3,T.s.y)
B: [
- tbox(V`'svg_sub(2))
- `"tbox(V`'svg_sub(2))"' wid 105bp__ with .nw at last [].sw+(0,-4bp__)
- [ left_;
- tbox(V`'svg_sub(1)) ] with .nw at last [].sw+(0,-0.25)
- `"left_"' at last [].sw +(0,-0.2) ljust `"tbox(V`'svg_sub(1))"' wid 100bp__ \
- ljust
-] with .nw at Y.ne+(0.2,0)
+ tbox(V`'svg_sub(1))
+ { `"tbox'(V`'svg_sub(1))" wid 47bp__ with .nw at last [].sw+(0,-4bp__) }
+ tbox(V`'svg_sub(2),,,<) with .sw at last [].se+(0.75,0)
+ { `"tbox'(V`'svg_sub(2)`,,,&#x3C;)"' at last [].s below }
+ tbox(V`'svg_sub(3),,,<>) with .sw at last [].se+(0.75,0)
+ { `"tbox'(V`'svg_sub(3)`,,,&#x3C;&#x3E;)"' at last [].s below }
+] with .nw at T.sw+(0,-0.2)
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/ConnectorsSVG.m4 b/graphics/circuit_macros/examples/svg/ConnectorsSVG.m4
new file mode 100644
index 0000000000..59860a2d1e
--- /dev/null
+++ b/graphics/circuit_macros/examples/svg/ConnectorsSVG.m4
@@ -0,0 +1,30 @@
+.PS
+# ConnectorsSVG.m4
+log_init
+include(icsSVG.m4)
+
+svg_font(sans-serif,8.5bp__)
+#vg_rot_init(test)
+svg_rot_init(ConnectorsSVG)
+
+# ArduinoUno
+# "Arduino Uno Rev 3" at last [].Connector.s below
+ Ar: ArduinoLeonardo #with .sw at last [].se+(0.25,0)
+ "Arduino Leonardo" at last [].Connector.s below
+
+ RPI: RPi with .sw at last [].se+(0.25,0)
+ "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
+
+ S: USB_C_Socket with .sw at (HD.e.x+0.25,RPI.s.y)
+ "USB-C Socket" at S.Base.s below
+ "B12" at S.B12.end above ljust
+ "B1" at S.B1.end above ljust
+ "A1" at S.A1.end above rjust
+ "A12" at S.A12.end above rjust
+
+ command "</g>"
+
+.PE
diff --git a/graphics/circuit_macros/examples/svg/CsourceSVG.m4 b/graphics/circuit_macros/examples/svg/CsourceSVG.m4
index e194f01f8c..c95aaff3d4 100644
--- a/graphics/circuit_macros/examples/svg/CsourceSVG.m4
+++ b/graphics/circuit_macros/examples/svg/CsourceSVG.m4
@@ -4,7 +4,7 @@ cct_init(svg_font(sans-serif,11bp__,2bp__))
# The default line separation is a bit small if the top line contains
# subscripts, so we space stacked lines explicitly:
-define(`stbelow',`at last ""-(0,textht*1.3)')
+define(`stbelow',`at last ""-(0,textht*1.5)')
define(`loffset',`+(textoffset,0)')
define(`roffset',`-(textoffset,0)')
diff --git a/graphics/circuit_macros/examples/svg/FontsSVG.m4 b/graphics/circuit_macros/examples/svg/FontsSVG.m4
index 856014836b..57dcd431a5 100644
--- a/graphics/circuit_macros/examples/svg/FontsSVG.m4
+++ b/graphics/circuit_macros/examples/svg/FontsSVG.m4
@@ -3,10 +3,13 @@
gen_init
textht = 0.2
-define(`ft',`{ svg_font(`$1',`$2',`$3',"`$1'")}; move down 0.5; right_')
+define(`ft',`{ svg_font(`$1',`$2',`$3',"`$1'" ljust)
+ move to (B.w+(2.5,0),Here)
+ svg_font(`$1',`$2',`$3',"ABCDEFG abcdefg" ljust)}
+ move down 0.5; right_')
-B: box wid 4 ht 7
- move to B.nw+(2,-0.5)
+B: box wid 5.5 ht 7
+ move to B.nw+(0.5,-0.5)
ft(Arial)
ft(Helvetica)
@@ -23,6 +26,6 @@ B: box wid 4 ht 7
ft(Arial Black)
ft(Impact)
- textht = 0.1
- "These may be vewer-dependent" above ljust at B.sw
+ textht = 0.12
+ "These may be viewer-dependent" above ljust at B.sw
.PE
diff --git a/graphics/circuit_macros/examples/svg/FusesSVG.m4 b/graphics/circuit_macros/examples/svg/FusesSVG.m4
index a4617e6221..a421c45b57 100644
--- a/graphics/circuit_macros/examples/svg/FusesSVG.m4
+++ b/graphics/circuit_macros/examples/svg/FusesSVG.m4
@@ -14,11 +14,10 @@ movewid = 0.25
move
fuse(,S) ; {"`fuse(,S)'" at last line.c+(0,-0.2)}
move
- fuse(,HB) ; {"`fuse(,HB)'" at last line.c+(0,-0.2)}
+ fuse(,SB) ; {"`fuse(,SB)'" at last line.c+(0,-0.2)}
}
move down; right_
- fuse(,HC,0.5,0.3) ; {"`(,HC,0.5,0.3)'" ljust at last line.start+(0,-0.25)}
- move
+ {
cbreaker; {"`cbreaker'" at last line.c+(0,-0.25)}
move
cbreaker(,R); {"`cbreaker(,R)'" at last line.c+(0,-0.25)}
@@ -28,6 +27,13 @@ movewid = 0.25
cbreaker(,,T); {"`...(,,T)'" at last line.c+(0,-0.25)}
move
cbreaker(,,TS); {"`...(,,TS)'" at last line.c+(0,-0.25)}
+ }
+ move down; right_
+ {
+ fuse(,HB) ; {"`fuse(,HB)'" at last line.c+(0,-0.2)}
+ move
+ fuse(,HC,0.5,0.3) ; {"`(,HC,0.5,0.3)'" ljust at last line.start+(0,-0.25)}
+ }
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/GroundsSVG.m4 b/graphics/circuit_macros/examples/svg/GroundsSVG.m4
index 7c4d741d0e..c1a9589f2d 100644
--- a/graphics/circuit_macros/examples/svg/GroundsSVG.m4
+++ b/graphics/circuit_macros/examples/svg/GroundsSVG.m4
@@ -8,15 +8,17 @@ Ground: ground
GT: ground(,T)
move right sep
GF: ground(,,F)
+sep = 0.55
move right sep
GE: ground(,,E)
move right sep
-B: Here+(0,-0.5) ; {
- "`ground'" wid 36bp__ at (Ground,B)
- "`ground'(,T)" at (GT,B)+(0,12bp__)
+B: Here+(0,-0.5)
+D: B+(0,11bp__)
+ { "`ground'" wid 36bp__ at (Ground,B)
+ "`ground'(,T)" at (GT,B)+(0,11bp__)
"(,,F)" at (GF,B)
- "(,,E)" at (GE,B)}
+ "(,,E)" at (GE,D)}
GS: ground(,,S)
@@ -28,13 +30,17 @@ GQ: ground(,,Q)
GL: ground(,,L)
move right sep
GP: ground(,,P)
+ move right sep
+GPA: ground(,T,PA)
C: Here+(0,-0.5)
+E: C+(0,11bp__)
"(,,S)" at (GS,C)
- "(,,S,90)" at (GS90,C)
+ "(,,S,90)" at (GS90,E)
"(,,Q)" at (GQ,C)
- "(,,L)" at (GL,C)
+ "(,,L)" at (GL,E)
"(,,P)" at (GP,C)
+ "(,T,PA)" wid 32bp__ at (GPA,E)
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/HeadersSVG.m4 b/graphics/circuit_macros/examples/svg/HeadersSVG.m4
index c222f18650..15e4cda70b 100644
--- a/graphics/circuit_macros/examples/svg/HeadersSVG.m4
+++ b/graphics/circuit_macros/examples/svg/HeadersSVG.m4
@@ -5,7 +5,11 @@ log_init(svg_font(sans-serif,10bp__))
Header
{"svg_it(P1)" wid 15bp__ at last [].P1 rjust
`"Header"' wid 45bp__ at last [].s+(0,-10pt__)
- "svg_it(P2)" at last [].P2 rjust}
+ "svg_it(P2)" at last [].P2 rjust
+ thinlines_
+ arrow <- from last [].Block.ne-(0,0.1) up 0.15 right 0.15
+ "svg_it(Block)" ljust
+ thicklines_ }
Header(2,3,8mm__,10mm__) with .nw at last [].ne+(0.75,-0.05)
{"svg_it(P1)" at last [].P1 rjust
diff --git a/graphics/circuit_macros/examples/svg/MCSVG.m4 b/graphics/circuit_macros/examples/svg/MCSVG.m4
index ef1d215809..cececf42b5 100644
--- a/graphics/circuit_macros/examples/svg/MCSVG.m4
+++ b/graphics/circuit_macros/examples/svg/MCSVG.m4
@@ -3,6 +3,7 @@
cct_init(svg_font(Times,11bp__))
textoffset = 3bp__
+MC:[
dv = dimen_*0.6
dh = dimen_*0.4
backup = dimen_/6
@@ -40,5 +41,57 @@ textoffset = 3bp__
llabel(sprintf("svg_it(v`'svg_sub(&``#''%g;,66%))",64+i))
if i==2 then { Output: dot } else { line down (2-i)*dv }
}}
+]
+
+Three: [
+ dv = dimen_*0.6
+ dh = dimen_
+ 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
+ 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)
+ { "svg_it(V)svg_sub(1)" wid 12bp__ at last arrow.c rjust }
+ line right_ dh/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)
+ {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
+ 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
+ pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_')
+ line down_ (2-m4x)*dimen_/3
+ M: move right_ dimen_/8
+ line up_ (2-m4x)*dimen_/3
+ pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_')
+ line up_ (2-m4x)*dimen_*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
+ 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(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)
+ { "svg_it(V`'svg_sub(2))" wid 12bp__ at last arrow.c ljust }
+ line to SP21.T chop dotrad_ chop 0
+
+] with .nw at MC.sw+(0,-0.2)
+
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/Makefile b/graphics/circuit_macros/examples/svg/Makefile
index 5ee232a5ea..4471d513f4 100644
--- a/graphics/circuit_macros/examples/svg/Makefile
+++ b/graphics/circuit_macros/examples/svg/Makefile
@@ -1,14 +1,21 @@
LIBDIR = $$HOME/lib
M4LIBS = svg.m4 SVGconfig.m4
+M4LIBS = svg.m4
# To process a single file, copy it to test.m4 and type "make tst"
# to produce tstSVG.html
DPIC = dpic
-#DPIC = $$HOME/dpic/bu*/p2c/ftp/dpic
-#DPIC = $$HOME/dpic/bu*/test/dpic
-#DPIC = $$HOME/dpic/dev/p2c/ftp/dpic
+#DPIC = $$HOME/dpic/build/p2c/ftp/dpic
+#DPIC = ../../../dpic/build/p2c/ftp/dpic
#DPIC = ../../../dpic/bison/dpic
+#DPIC = ../../../dpic/bdev/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
+# do not work at present with the Windows version.
+# M4LIBS = svg.m4 windows.m4
+# DPIC = ../../../dpic/bison/distsrc/Windows/dpic
.SUFFIXES: .pic .svg .m4
.pic.svg:
@@ -23,8 +30,9 @@ CCTSVG = \
AdderSVG.svg AlogixSVG.svg ABlogixSVG.svg AmpTableSVG.svg AntennasSVG.svg \
AntiqueClockSVG.svg \ AudioSVG.svg \
BipSVG.svg BtreeSVG.svg ByteSVG.svg ButtonsSVG.svg \
- CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg ContactSVG.svg ContactsSVG.svg \
- CountingSVG.svg CrossbarSVG.svg CrowSVG.svg CrullerSVG.svg CsourceSVG.svg \
+ CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg ConnectorsSVG.svg \
+ ContactSVG.svg ContactsSVG.svg \
+ 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 \
@@ -68,6 +76,7 @@ tst:
test.pic:
if test -f test.pic ; then echo "Usage: make clean tst" ; fi
m4 $(M4LIBS) test.m4 | $(SED) > test.pic
+ m4 $(M4LIBS) test.m4 | $(SED) > test.pic
tstSVG.html: tstSVG.htmx $(TEST).svg
Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \
@@ -78,7 +87,14 @@ tstSVG.html: tstSVG.htmx $(TEST).svg
xst: Incleps.png
-AntiqueClockSVG.svg:
+AntiqueClockSVG.svg ConnectorsSVG.svg:
+ m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
+ $(DPIC) -v $*.pic > $*.svg
+ m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
+ $(DPIC) -v $*.pic > $*.svg
+ grep '<\!-- width' $*.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > $*.siz
+
+xntiqueClockSVG.svg:
m4 $(M4LIBS) AntiqueClockSVG.m4 | sed -e '/^\%/d' > AntiqueClockSVG.pic
$(DPIC) -v AntiqueClockSVG.pic > AntiqueClockSVG.svg
m4 $(M4LIBS) AntiqueClockSVG.m4 | sed -e '/^\%/d' > AntiqueClockSVG.pic
@@ -96,8 +112,9 @@ Incleps.png:
clean:
@printf "\n svg clean:\n"
rm -f *.svg *.dim *.ps *log *.siz *.pic examplesSVG.html Incleps.png
- rm -f tstSVG.html
+ rm -f tstSVG.html copy_tmp__
@printf "\n"
clobber: clean
+ (cd dev; make clobber)
rm -f test.m4
diff --git a/graphics/circuit_macros/examples/svg/MixerSVG.m4 b/graphics/circuit_macros/examples/svg/MixerSVG.m4
index aa778337b3..1712e017ed 100644
--- a/graphics/circuit_macros/examples/svg/MixerSVG.m4
+++ b/graphics/circuit_macros/examples/svg/MixerSVG.m4
@@ -1,7 +1,7 @@
.PS
#`MixerSVG.m4
# Showing VMOS mosfet and custom transformer'
-cct_init(svg_font(sans-serif,11bp__,1bp__))
+cct_init(svg_font(sans-serif,10.5bp__,1bp__))
define(`dimen_',0.6)
define(`elen_',0.75)
diff --git a/graphics/circuit_macros/examples/svg/PconnSVG.m4 b/graphics/circuit_macros/examples/svg/PconnSVG.m4
index 348a619317..b0fdb65e80 100644
--- a/graphics/circuit_macros/examples/svg/PconnSVG.m4
+++ b/graphics/circuit_macros/examples/svg/PconnSVG.m4
@@ -19,27 +19,23 @@ P1: [
arrow from G.w to C1.G.e
arrow from G.e to C2.G.w
`"(,AF)"' at last [].s below
- C03: pconnex(,AC) with .w at C2.e+(0.2,0)
+ C03: pconnex(,AC) with .w at C2.e+(0.25,0)
`"(,AC)"' at last [].s below
C3: pconnex(,ACF) with .w at last [].e+(0.2,0)
`"(,ACF)"' at last [].s below
- C5: pconnex(U,D) with .w at last [].e+(0.2,0)
+ C5: pconnex(U,D) with .w at last [].e+(0.25,0)
`"(U,D)"' at last [].s below
- C6: pconnex(U,DF) with .w at last [].e+(0.2,0)
+ C6: pconnex(U,DF) with .w at last [].e+(0.25,0)
`"(U,DF)"' at last [].s below
- C7: pconnex(U,J) with .w at last [].e+(0.2,0)
+ 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.2,0)
+ C8: pconnex(U,JF) with .w at last [].e+(0.25,0)
`"(U,JF)"' wid 21bp__ at last [].s below
]
P2: [
- C4: pconnex(,P)
- `"(,P)"' at last [].s below
- C11: pconnex(,PF) with .w at last [].e+(0.2,0)
- `"(,PF)"' at C11.s below
- C9: pconnex(,G) with .w at C11.e+(0.2,0)
+ C9: pconnex(,G)
`"(,G)"' at last [].s below
C91: pconnex(,GF) with .w at last [].e+(0.2,0)
`"(,GF)"' at last [].s below
@@ -47,7 +43,17 @@ P2: [
`"(L,GF)"' at last [].s below
C10: pconnex(,GC) with .w at last [].e + (0.2,0)
`"(,GC)"' at last [].s below
-] with .nw at P1.C1.sw + (0,-0.25)
+ C12: pconnex(,GCF) with .w at last [].e + (0.2,0)
+ `"(,GCF)"' at last [].s below
+] with .nw at P1.C1.sw + (0,-0.35)
+
+P3:[
+ C4: pconnex(,P)
+ `"(,P)"' at last [].s below
+ C11: pconnex(,PF) with .w at last [].e+(0.2,0)
+ `"(,PF)"' at C11.s below
+] with .nw at P2.C9.sw + (0,-0.35)
+
command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/RectifiersSVG.m4 b/graphics/circuit_macros/examples/svg/RectifiersSVG.m4
index 3329094082..c6473744eb 100644
--- a/graphics/circuit_macros/examples/svg/RectifiersSVG.m4
+++ b/graphics/circuit_macros/examples/svg/RectifiersSVG.m4
@@ -60,20 +60,21 @@ Threephase: [ linethick_(1)
]
Cct3:[
- No: dot; {"N`'svg_sub(o)" below rjust }
- { inductor(to Here+(Rect_(dimen_,60)),W); E2: "e`'svg_sub(2)" ljust }
- { inductor(to Here+(Rect_(dimen_,-60)),W); E3: "e`'svg_sub(3)" ljust }
- { inductor(from No-(dimen_,0) to No,W)
- E1: "e`'svg_sub(1)" above at last line.start }
+ No: dot; {"N`'svg_sub(o)" at last [].s below rjust }
+ { inductor(to Here+(Rect_(dimen_,60)),W); E2: Here; "e`'svg_sub(2)" ljust }
+ { inductor(to Here+(Rect_(dimen_,-60)),W); E3: Here; "e`'svg_sub(3)" ljust }
+ { inductor(from No-(dimen_,0) to No,W); E1: last line.start
+ "e`'svg_sub(1)" at E1 above }
D3: diode(down_ from E3); b_current(i`'svg_sub(3),rjust)
llabel(,,D`'svg_sub(3))
- line from E1 to (E1,D3.start)
+ line from E1 to (E1.x,D3.start.y+dimen_/3) then right_ (E3.x+E1.x)/2-E1.x \
+ then down_ dimen_/3
D1: diode(down_); b_current(i`'svg_sub(1),rjust); llabel(,,D`'svg_sub(1))
line from E2 left E2.x-E1.x+dimen_/3 then down E2.y-E3.y \
- then to 0.5 between D1.start and D3.start
+ then to 2 between D3.start and D1.start
D2: diode(down_); b_current(i`'svg_sub(2),rjust); llabel(,,D`'svg_sub(2))
- { line from D1.end to D3.end }
- dot
+ { line from D2.end to D3.end }
+ dot(at D1.end)
arrowline(down elen_/2); rlabel(,i`'svg_sub(L))
resistor(right_ elen_); rlabel(+,e`'svg_sub(L),-); llabel(,R)
line to (Here,No) then to No
diff --git a/graphics/circuit_macros/examples/svg/SVGconfig.m4 b/graphics/circuit_macros/examples/svg/SVGconfig.m4
index 372a93937b..e8aa1fa3ec 100644
--- a/graphics/circuit_macros/examples/svg/SVGconfig.m4
+++ b/graphics/circuit_macros/examples/svg/SVGconfig.m4
@@ -50,21 +50,9 @@ define(`SIdefaults',`
')
define(`local_init',`
+`#' local init begin
scaledefaults(1.1)
+`#' local init end
')
-# If the variable dptextratio is not found you don't have
-# dpic version 2018.05.15 or later. In that case, change
-# dptextratio to 1 in the following (or delete *dptextrario ).
-define(`svg_font',`
-command "<g patsubst(ifelse(`$1',,,
-index(`$1',font),0,`$1',
-index(`$1',style),0,`$1',
-style="font-family:`$1'")
-,",\\")>"
- ifelse(`$2',,,`textht=(`$2')*dptextratio')
- ifelse(`$3',,,`textoffset=`$3'')
- `$4'
- ifelse(`$4',,,`command "</g>"')')
-
divert(0)dnl
diff --git a/graphics/circuit_macros/examples/svg/ShiftRSVG.m4 b/graphics/circuit_macros/examples/svg/ShiftRSVG.m4
index 022f4ced9f..9a0b56d523 100644
--- a/graphics/circuit_macros/examples/svg/ShiftRSVG.m4
+++ b/graphics/circuit_macros/examples/svg/ShiftRSVG.m4
@@ -21,8 +21,8 @@ define(`customFF',`FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,,
line from T to (T,F0.W3) then to F0.W3.end
NCLR: NOT_gate(right T.x-Serial.x from (Serial,F0.S1.end),N)
- "CLEAR" at NCLR.start rjust
- line left textht*5 from last ""+(-textoffset,0.8*textht)
+ "CLEAR" wid 33bp__ at NCLR.start rjust
+ line left last "".wid with .c at last "".n+(0,1.5bp__)
CLK: NOT_gate(right T.x-Serial.x from NCLR.start+(0,-BUF_ht*3/2*L_unit))
"CLOCK" at CLK.start rjust
diff --git a/graphics/circuit_macros/examples/svg/SourcesSVG.m4 b/graphics/circuit_macros/examples/svg/SourcesSVG.m4
index 8096317a5d..2a611fe681 100644
--- a/graphics/circuit_macros/examples/svg/SourcesSVG.m4
+++ b/graphics/circuit_macros/examples/svg/SourcesSVG.m4
@@ -15,7 +15,8 @@ define(`NL',`; move down $1; right_')
{source(,X) ; move ; "`source(,X)'" ljust} NL
{source(,F) ; move ; "`source(,F)'" ljust} NL
{source(,G) ; move ; "`source(,G)'" ljust} NL
- {source(,Q) ; move ; "`source(,Q)'" ljust}
+ {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3)
+ {proximity ; move ; "`proximity" ljust "= consource(,P)'" ljust}
}
move right_ 2.0
{
@@ -27,8 +28,8 @@ define(`NL',`; move down $1; right_')
{source(,S) ; move ; "`source(,S)'" ljust} NL
{source(,T) ; move ; "`source(,T)'" ljust} NL
{source(,L) ; move ; "`source(,L)'" ljust} NL
- {source(,B) ; move ; "`source(,B)'" ljust} NL(moveht*0.8)
- {nullator ; move ; "`nullator'" ljust} NL(moveht*0.6)
+ {source(,B) ; move ; "`source(,B)'" ljust} NL
+ {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8)
{norator ; move ; "`norator'" ljust}
}
move right_ 2.0
diff --git a/graphics/circuit_macros/examples/svg/SwitchesSVG.m4 b/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
index 04fc2f52c5..95c9f2b2ca 100644
--- a/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
+++ b/graphics/circuit_macros/examples/svg/SwitchesSVG.m4
@@ -101,6 +101,15 @@ movewid = 0.25
dswitch(,,WBRHH); {"svg_tt(`(,,WBRHH)')" at (last [],S)}
}
# Row 7
+ move down moveht*5/4; right_; {
+ move down 2bp__; right_
+ dswitch(,,WBPr); {S: "svg_tt(`(,,WBPr)')" at last [].s+(0,-10bp__)}
+ move right_
+ dswitch(,,WBPrT); {S: "svg_tt(`(,,WBPrT)')" at last [].s+(0,-10bp__)}
+ move down_ 6bp__ then right_
+ dswitch(,,WBPrM); {S: "svg_tt(`(,,WBPrM)')" at last [].s+(0,-10bp__)}
+ }
+# Row 8
move down; right_; {
dswitch(,,WBMMR); {S: "svg_tt(`(,,WBMMR)')" at last [].s+(0,-10bp__)}
move right_
diff --git a/graphics/circuit_macros/examples/svg/TimerSVG.m4 b/graphics/circuit_macros/examples/svg/TimerSVG.m4
index dcdb2cc477..d1a0c2ffa1 100644
--- a/graphics/circuit_macros/examples/svg/TimerSVG.m4
+++ b/graphics/circuit_macros/examples/svg/TimerSVG.m4
@@ -1,6 +1,6 @@
.PS
# TimerSVG.m4
-cct_init(svg_font(sans-serif,11bp__,1bp__))
+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>
diff --git a/graphics/circuit_macros/examples/svg/TubediagsSVG.m4 b/graphics/circuit_macros/examples/svg/TubediagsSVG.m4
index cfc87b0a6a..6409325558 100644
--- a/graphics/circuit_macros/examples/svg/TubediagsSVG.m4
+++ b/graphics/circuit_macros/examples/svg/TubediagsSVG.m4
@@ -1,7 +1,7 @@
.PS
# TubediagsSVG.m4
-cct_init(svg_font(sans-serif,11bp__,2bp__))
+cct_init(svg_font(sans-serif,10bp__,2bp__))
include(../tubedefs.m4)
# Some base diagrams
diff --git a/graphics/circuit_macros/examples/svg/VariableSVG.m4 b/graphics/circuit_macros/examples/svg/VariableSVG.m4
index 642b81466a..ccab653936 100644
--- a/graphics/circuit_macros/examples/svg/VariableSVG.m4
+++ b/graphics/circuit_macros/examples/svg/VariableSVG.m4
@@ -1,36 +1,29 @@
.PS
-# `Variable.m4'
-cct_init(svg_font(sans-serif,11bp__))
+# `VariableSVG.m4'
+cct_init
-define(`elen_',dimen_)
-down_
-[ { variable(`capacitor') }
- move right; down_
- { variable(`resistor',uN) }
- move right; down_
- { variable(`capacitor(,C)') }
- move right; down_
- { variable(`inductor') }
- move right; down_
- { variable(`inductor(,W)') }
+define(`elen_',dimen_); down_
+[ { variable(`resistor',A) }; {"svg_tt(A)" at last line.end below}; move right
+ { variable(`resistor',N) }; {"svg_tt(N)" at last line.end below}; move right
+ { variable(`resistor',uN) }; {"svg_tt(uN)" at last line.end below}; move right
+ { variable(`resistor',NN) }; {"svg_tt(uN)" at last line.end below}; move right
+ { variable(`resistor',uNN) }; {"svg_tt(uNN)" at last line.end below}
]
[
skp = 0.4
hskip = linewid*0.5
cskip = hskip
Orig: Here
- { move right cskip
- move right elen_; move up 0.15 then down 0.15 then right_ hskip
- line invis right_ elen_ "C"; move right_ hskip
- line invis right_ elen_ "S" }
+ { move right cskip+elen_+hskip
+ line invis right_ elen_ "svg_tt(C)"; move right_ hskip
+ { move up_ 0.25 }
+ line invis right_ elen_ "svg_tt(S)" }
Loopover_(`char',
`move down skp ifelse(char,A,*0.5)
- { line invis right_ cskip "char"
+ { line invis right_ cskip "svg_tt(char)"
variable(`capacitor(,C)',char); move right_ hskip
variable(`capacitor(,C)',char`'C); move right_ hskip
variable(`capacitor(,C)',char`'S) }',
A,P,L,N)
] with .w at last [].e+(0.4,0)
-
- command "</g>" # end font
.PE
diff --git a/graphics/circuit_macros/examples/svg/ex01SVG.m4 b/graphics/circuit_macros/examples/svg/ex01SVG.m4
index 535bdec795..3a20d90a18 100644
--- a/graphics/circuit_macros/examples/svg/ex01SVG.m4
+++ b/graphics/circuit_macros/examples/svg/ex01SVG.m4
@@ -1,6 +1,6 @@
.PS
# ex01.m4
-cct_init(svg_font(sans-serif,11bp__))
+cct_init(svg_font(sans-serif,10.5bp__))
linewid = linewid*1.5 # let's make the circuit elements bigger than usual
define(`elen_',linewid) # but not longer
diff --git a/graphics/circuit_macros/examples/svg/ex09SVG.m4 b/graphics/circuit_macros/examples/svg/ex09SVG.m4
index 507245235e..b267c68ea0 100644
--- a/graphics/circuit_macros/examples/svg/ex09SVG.m4
+++ b/graphics/circuit_macros/examples/svg/ex09SVG.m4
@@ -65,7 +65,7 @@ define(`bdot',
move right 0.8
# Upper left diagram
- spacer
+ spacer
# Lower left diagram
[ define(`lwid',`29bp__')
@@ -76,18 +76,21 @@ Ctr: 0.5 between A and B
L: move left 0.85*sk from A
linethick_(1)
- dimension_(from A to B,0.5*sk,label,lwid,0.1*sk)
- "`dimension_(from A to B,0.5,label,29bp__,0.1)'" wid 90 \
- with .w at (L.end,A +(0,-9))
+ dimension_(from A to B,0.5*sk,svg_it(label),lwid,0.1*sk)
+ "`dimension_(from A to B,0.5,label,29bp__,0.1)'" wid 70 \
+ with .w at (L.end.x+2,A.y-10)
+ move down_ 4 from last ""
thinlines_
- arrow from A to B chop 0.05*sk "linespec" below
- dimension_(up_ 0.5*sk from A,0.2*sk,"offset" rjust,,,->)
- dimension_(up_ 0.1*sk from B,-0.2*sk," tic offset" ljust)
- dimension_(up_ 0.1*sk from B+(0,0.5*sk),-0.2*sk," tic offset" ljust)
+ arrow from A to B chop 0.05*sk "svg_it(linespec)" below
+ dimension_(up_ 0.5*sk from A,0.2*sk,"svg_it(offset)" rjust,,,->)
+ dimension_(up_ 0.1*sk from B,-0.2*sk," svg_it(tic offset)" ljust)
+ dimension_(up_ 0.1*sk from B+(0,0.5*sk),-0.2*sk,
+ " svg_it(tic offset)" ljust)
dimension_(from Ctr+(-lwid/2,0.5*sk) right lwid,0.2*sk,
- "blank width" above)
-] with .nw at last [].sw+(0,-0.7*sk)
+ "svg_it(blank width)" above)
+] with .nw at last [].sw+(0,-0.4*sk)
+#showbox_
# Upper right diagram
[ A: bdot(at (0,0),A, above rjust)
@@ -104,23 +107,22 @@ T: C+(-0.45*sk,-0.5*sk)
dimension_(from C to D chop dotrad_,,svg_it(T`'svg_sub(15)),15bp__)
arcdimension_(from C to D with .c at 0.5 between A and B,12bp__,
svg_it(C) to svg_it(D),34bp__)
-Q: C+(-9,-9)
+Q: C+(-9,-15)
`define' leftparagraph { [ baselineskip = textht*1.5; { move right $1 }
for i = 2 to $+ do {
move to Here+(0,-baselineskip)
- exec sprintf("{ `\"$%g \"' ljust }; ",i) } ] }
-
-define(`svg_comma',`svg_symbol(&`#'44;)')
-leftparagraph(5.7*scale; baselineskip = 1.5*textht,
- `dimension_(from A to B,0.3,svg_it(AB),20bp__)',
- `dimension_(from C to B,,svg_it(X),16bp__)',
- `dimension_(from C to A,0.3,svg_it(CA),14bp__,,->)',
- `dimension_(from D to B,-0.3,"svg_it(DB)" ljust)',
- `dimension_(from C to D chop dotrad_,,svg_it(T`'svg_sub(15)),15bp__)',
+ exec sprintf("{ `\"$%g \"' wid 4.5*scale ljust }; ",i) } ] }
+
+leftparagraph(1.7*scale; baselineskip = 1.5*textht,
+ `dimension_(from A to B,0.3,AB,20bp__)',
+ `dimension_(from C to B,,X,16bp__)',
+ `dimension_(from C to A,0.3,CA,14bp__,,->)',
+ `dimension_(from D to B,-0.3,"DB" ljust)',
+ `dimension_(from C to D chop dotrad_,,T`'svg_sub(15),15bp__)',
`arcdimension_'svg_symbol(&`#'40;)`from C to D with .c at 0.5 \
between A and B'svg_comma`12bp__'svg_comma,
- svg_ensp `svg_it(C) to svg_it(D)'svg_comma`34bp__'svg_symbol(&`#'41;)
+ svg_ensp `C to D'svg_comma`34bp__'svg_symbol(&`#'41;)
) with .nw at Q
] with .nw at 1st [].ne+(1.7*sk,0)
diff --git a/graphics/circuit_macros/examples/svg/examplesSVG.htmx b/graphics/circuit_macros/examples/svg/examplesSVG.htmx
index 91bc93f48e..825c1d5cf4 100644
--- a/graphics/circuit_macros/examples/svg/examplesSVG.htmx
+++ b/graphics/circuit_macros/examples/svg/examplesSVG.htmx
@@ -107,16 +107,29 @@ There are a number of other issues:
They are subject to change:
<ul>
<li>
- m4tt`'svg_font(</g>font-face,height,textoffset,dpic commands`'m4tt)</g>:
- Change font face, size, and dpic textoffset parameter.
+ m4tt`'svg_font(</g>font-face,nominal size[:dptextratio],textoffset,
+ dpic commands`'m4tt)</g>:
+ Change font face, size, textratio and dpic textoffset parameters.
+ Change font face and dpic m4tt`'textht</g>, m4tt`'dptextratio</g>,
+ and m4tt`'textoffset</g> parameters.
If arg4 is blank, the font is changed and
requires m4tt`'command "&lt;/g&gt;"</g> to cancel the font change.
+ <br>
+ Note:
+ Nominal height = text height in drawing units; actual height =
+ nominal ht x m4tt`'dptextratio</g>.
+ <br>
Examples: <br>
m4tt`'svg_font(Times)</g><br>
+ m4tt`'svg_font(Times,14bp__)</g><br>
+ m4tt`'svg_font(sans-serif,14bp__:0.71)</g><br>
m4tt`'svg_font(Times,11bp__,1bp__,"text" at A)</g><br>
m4tt`'svg_font(font-family="Times")</g><br>
m4tt`'svg_font(font-family="Times" font-style="italic")</g><br>
m4tt`'svg_font(style="font-family:Times; font-style:italic")</g>
+ <li>m4tt svgfontratio(</g>font name`'m4tt)</g>;
+ Reasonable m4tt`'dptextratio</g> value for common fonts, used
+ by m4tt`'svg_font</g>.
<li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>;
e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g>
<li>m4tt svg_it(</g>text`'m4tt)</g>: for italics
@@ -131,6 +144,13 @@ There are a number of other issues:
subscript
<li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>:
superscript
+ <li>m4tt svg_rot(</g>degrees, "text" [at position]`'m4tt)</g>:
+ Rotate text degrees (default 90) ccw.
+ Requires m4tt`'svg_rot_init(</g>filename`'m4tt)</g> and the source
+ must be processed twice.
+ <li>m4tt svg_rot_init(</g>filename`'m4tt)</g>:
+ filename is the basename of the output of
+ m4tt`'dpic -v filename.pic > filename.svg`'m4tt
<li>m4tt svg_symbol(</g>text`'m4tt)</g>: allow quoted pound sign in text,
e.g., m4tt`'svg_symbol(10&&#96;&#35;&#39;176;)</g> produces 10&#176;
<li>m4tt svgLink(</g>URL, drawing object, m4tt[B])</g>:
@@ -140,103 +160,63 @@ There are a number of other issues:
arg 3 = B)
<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%" >
<tr>
-<td width="7%"> m4tt svg_alpha</g>
- <td align="left"> changecom(,)&`#'945;changecom(`#')
-<td width="7%"> m4tt svg_beta</g>
- <td align="left"> changecom(,)&`#'946;changecom(`#')
-<td width="7%"> m4tt svg_chi</g>
- <td align="left"> changecom(,)&`#'967;changecom(`#')
-<td width="7%"> m4tt svg_comma</g>
- <td align="left"> changecom(,)&`#'44;changecom(`#')
-<td width="7%"> m4tt svg_Delta</g>
- <td align="left"> changecom(,)&`#'916;changecom(`#')
-<td width="7%"> m4tt svg_delta</g>
- <td align="left"> changecom(,)&`#'948;changecom(`#')
-<td width="7%"> m4tt svg_epsilon</g>
- <td align="left"> changecom(,)&`#'949;changecom(`#')
-<td width="7%"> m4tt svg_eta</g>
- <td align="left"> changecom(,)&`#'951;changecom(`#')
+<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_epsilon</g> <td align="left"> changecom(,)&`#'949;changecom(`#')
+<td width="8%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#')
<tr>
-<td width="7%"> m4tt svg_Gamma</g>
- <td align="left"> changecom(,)&`#'915;changecom(`#')
-<td width="7%"> m4tt svg_gamma</g>
- <td align="left"> changecom(,)&`#'947;changecom(`#')
-<td width="7%"> m4tt svg_iota</g>
- <td align="left"> changecom(,)&`#'953;changecom(`#')
-<td width="7%"> m4tt svg_kappa</g>
- <td align="left"> changecom(,)&`#'954;changecom(`#')
-<td width="7%"> m4tt svg_Lambda</g>
- <td align="left"> changecom(,)&`#'923;changecom(`#')
-<td width="7%"> m4tt svg_lambda</g>
- <td align="left"> changecom(,)&`#'955;changecom(`#')
-<td width="7%"> m4tt svg_micro</g>
- <td align="left"> changecom(,)&`#'956;changecom(`#')
-<td width="7%"> m4tt svg_mu</g>
- <td align="left"> changecom(,)&`#'956;changecom(`#')
+<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(`#')
<tr>
-<td width="7%"> m4tt svg_nu</g>
- <td align="left"> changecom(,)&`#'957;changecom(`#')
-<td width="7%"> m4tt svg_ohm</g>
- <td align="left"> changecom(,)&`#'937;changecom(`#')
-<td width="7%"> m4tt svg_Omega</g>
- <td align="left"> changecom(,)&`#'937;changecom(`#')
-<td width="7%"> m4tt svg_omega</g>
- <td align="left"> changecom(,)&`#'969;changecom(`#')
-<td width="7%"> m4tt svg_Phi</g>
- <td align="left"> changecom(,)&`#'934;changecom(`#')
-<td width="7%"> m4tt svg_phi</g>
- <td align="left"> changecom(,)&`#'966;changecom(`#')
-<td width="7%"> m4tt svg_Pi</g>
- <td align="left"> changecom(,)&`#'928;changecom(`#')
-<td width="7%"> m4tt svg_pi</g>
- <td align="left"> changecom(,)&`#'960;changecom(`#')
+<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(`#')
<tr>
-<td width="7%"> m4tt svg_Psi</g>
- <td align="left"> changecom(,)&`#'936;changecom(`#')
-<td width="7%"> m4tt svg_psi</g>
- <td align="left"> changecom(,)&`#'968;changecom(`#')
-<td width="7%"> m4tt svg_rho</g>
- <td align="left"> changecom(,)&`#'961;changecom(`#')
-<td width="7%"> m4tt svg_Sigma</g>
- <td align="left"> changecom(,)&`#'931;changecom(`#')
-<td width="7%"> m4tt svg_sigma</g>
- <td align="left"> changecom(,)&`#'963;changecom(`#')
-<td width="7%"> m4tt svg_tau</g>
- <td align="left"> changecom(,)&`#'964;changecom(`#')
-<td width="7%"> m4tt svg_Theta</g>
- <td align="left"> changecom(,)&`#'920;changecom(`#')
-<td width="7%"> m4tt svg_theta</g>
- <td align="left"> changecom(,)&`#'952;changecom(`#')
+<td width="8%"> 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(`#')
<tr>
-<td width="7%"> m4tt svg_upsilon</g>
- <td align="left"> changecom(,)&`#'965;changecom(`#')
-<td width="7%"> m4tt svg_Xi</g>
- <td align="left"> changecom(,)&`#'926;changecom(`#')
-<td width="7%"> m4tt svg_xi</g>
- <td align="left"> changecom(,)&`#'958;changecom(`#')
-<td width="7%"> m4tt svg_zeta</g>
- <td align="left"> changecom(,)&`#'950;changecom(`#')
-<td width="7%"> m4tt svg_lt</g>
- <td align="left"> changecom(,)&`#'60;changecom(`#')
-<td width="7%"> m4tt svg_gt</g>
- <td align="left"> changecom(,)&`#'62;changecom(`#')
-<td width="7%"> m4tt svg_leq</g>
- <td align="left"> changecom(,)&`#'8804;changecom(`#')
-<td width="7%"> m4tt svg_geq</g>
- <td align="left"> changecom(,)&`#'8805;changecom(`#')
+<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(`#')
<tr>
-<td width="7%"> m4tt svg_prime</g>
- <td align="left"> changecom(,)&`#'8242;changecom(`#')
-<td width="7%"> m4tt svg_ensp</g>
- <td align="left"> |changecom(,)&`#'8194;changecom(`#')|
-<td width="7%"> m4tt svg_emsp</g>
- <td align="left"> |changecom(,)&`#'8195;changecom(`#')|
-<td width="7%"> m4tt svg_thinsp</g>
- <td align="left"> |changecom(,)&`#'8201;changecom(`#')|
-<td width="7%"> m4tt svg_backsl</g>
- <td align="left"> changecom(,)&`#'92;changecom(`#')
+<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(`#')|
</table>
</ul>
@@ -277,6 +257,7 @@ cfig(JackSVG)
cfig(ConnSVG)
cfig(PconnSVG)
cfig(HeadersSVG)
+cfig(ConnectorsSVG)
cfig(fetSVG)
cfig(ujtSVG)
cfig(thyristorSVG)
@@ -285,7 +266,7 @@ cfig(TgateSVG)
cfig(NportSVG)
cfig(NLGSVG)
cfig(WindingsSVG)
-cfig(ex01.m4)
+cfig(ex01SVG)
cfig(TimerSVG)
cfig(OptoisoSVG)
cfig(MixerSVG)
@@ -328,6 +309,7 @@ cfig(CanLogicSVG)
cfig(AlogixSVG)
cfig(ABlogixSVG)
cfig(XORSVG)
+cfig(paletteSVG)
cfig(ex00SVG)
cfig(controlSVG)
cfig(GrayCodeSVG)
@@ -355,6 +337,11 @@ cfig(ex15SVG)
cfig(CountingSVG)
cfig(CrowSVG)
cfig(FlowSVG)
+ <!-- <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)
diff --git a/graphics/circuit_macros/examples/svg/graysurfSVG.m4 b/graphics/circuit_macros/examples/svg/graysurfSVG.m4
index 5427b62afc..13c91aabc0 100644
--- a/graphics/circuit_macros/examples/svg/graysurfSVG.m4
+++ b/graphics/circuit_macros/examples/svg/graysurfSVG.m4
@@ -1,7 +1,7 @@
.PS
# graysurfSVG.m4
threeD_init
-copy "HOMELIB_/dpictools.pic"
+NeedDpicTools
Overall: [
[]
diff --git a/graphics/circuit_macros/examples/svg/icsSVG.m4 b/graphics/circuit_macros/examples/svg/icsSVG.m4
index 9a1f40634a..0733bbef64 100644
--- a/graphics/circuit_macros/examples/svg/icsSVG.m4
+++ b/graphics/circuit_macros/examples/svg/icsSVG.m4
@@ -1,9 +1,10 @@
divert(-1)
- Macros defining some integrated circuits
+ Macros defining some integrated circuits and connectors
define(`lg_pinsep',3*L_unit) logic pin separation in logic units
define(`lg_chipwd',18*L_unit) default chip width
+define(`overbar_',`{ line right last "".wid with .c at last "".n+(0,1bp__) }')
`A sequence of pins along the east or west side of a chip:
lg_pinseq(initial pin no,final pin no,
@@ -15,19 +16,17 @@ define(`lg_pinseq',`for_($1,$2,1,
define(`ic6116',`[ Chip: box wid_ lg_chipwd ht_ 15*lg_pinsep
lg_pin(Chip.sw_+(0,lg_pinsep),GND,Pin12,w,12)
lg_pin(Chip.sw_+(0,2*lg_pinsep),,Pin18,wN,18)
- "svg_small(CS,75)" wid textht*1.5 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(CS,75)" wid textht*1.5 at (Chip.w,last line) ljust; overbar_
lg_pinseq(0,2,w,4,9+,D)
lg_pinseq(3,7,w,4,10+,D)
lg_pin(Chip.sw_+(0,13*lg_pinsep),,Pin21,w,21)
"svg_small(R/W,75)" wid textht*2.0 at (Chip.w,last line) ljust
- { line right last "".wid/2 from last "".n+(2,0)*textoffset }
+ { line right last "".wid/2 from last "".n+(0,1bp__) }
lg_pin(Chip.sw_+(0,14*lg_pinsep),V`'svg_small(CC,75),Pin24,w,24)
lg_pin(Chip.se_+(0,lg_pinsep),,Pin20,eN,20)
- "svg_small(OE,75)" wid textht*1.5 at (Chip.e,last line) rjust
- { line left last "".wid from last "".ne+(-1,0)*textoffset }
+ "svg_small(OE,75)" wid textht*1.5 at (Chip.e,last line) rjust; overbar_
lg_pinseq(0,7,e,3,8-,A)
lg_pinseq(8,9,e,3,31-,A)
@@ -39,17 +38,15 @@ define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
lg_pin(Chip.sw_+(0,2*lg_pinsep),V`'svg_small(SS,75),Pin1,w,1)
lg_pin(Chip.sw_+(0,4*lg_pinsep),,Pin34,w,34)
"svg_small(R/W,75)" wid textht*2.0 at (Chip.w,last line) ljust
- { line right last "".wid/2 from last "".n+(2,0)*textoffset }
+ { line right last "".wid/2 from last "".n+(0,1bp__) }
lg_pinseq(0,7,w,6,33-,D)
lg_pin(Chip.sw_+(0,15*lg_pinsep),,Pin40,wN,40)
- "svg_small(RESET,75)" wid textht*3.8 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(RESET,75)" wid textht*3.8 at (Chip.w,last line) ljust; overbar_
lg_pin(Chip.sw_+(0,17*lg_pinsep),SYNC,Pin7,w,7)
lg_pin(Chip.sw_+(0,19*lg_pinsep),,Pin6,wN,6)
- "svg_small(NMI,75)" wid textht*2.1 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(NMI,75)" wid textht*2.1 at (Chip.w,last line) ljust; overbar_
lg_pin(Chip.sw_+(0,21*lg_pinsep),RDY,Pin2,w,2)
lg_pin(Chip.sw_+(0,22*lg_pinsep),SO,Pin38,w,38)
@@ -59,8 +56,7 @@ define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
lg_pinseq(0,11,e,6,9+,A)
lg_pinseq(12,15,e,6,10+,A)
lg_pin(Chip.se+(0,23*lg_pinsep),,Pin4,eN,4)
- "svg_small(IRQ,75)" wid textht*2.0 at (Chip.e,last line) rjust
- { line left last "".wid from last "".ne+(-1,0)*textoffset }
+ "svg_small(IRQ,75)" wid textht*2.0 at (Chip.e,last line) rjust; overbar_
`$1']')
define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
@@ -68,8 +64,7 @@ define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
lg_pin(Chip.sw_+(0,3*lg_pinsep),CS1,Pin24,w,24)
lg_pin(Chip.sw_+(0,4*lg_pinsep),CK,Pin25,w,25)
lg_pin(Chip.sw_+(0,5*lg_pinsep),,Pin23,wN,23)
- "svg_small(CS2,75)" wid textht*2.2 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(CS2,75)" wid textht*2.2 at (Chip.w,last line) ljust; overbar_
lg_pin(Chip.sw_+(0,7*lg_pinsep),RS0(A0),Pin38,w,38)
lg_pin(Chip.sw_+(0,8*lg_pinsep),RS1(A1),Pin37,w,37)
@@ -78,11 +73,10 @@ define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
lg_pinseq(0,7,w,12,33-,D)
lg_pin(Chip.sw_+(0,21*lg_pinsep),,Pin22,w,22)
"svg_small(R/W,75)" wid textht*2.0 at (Chip.w,last line) ljust
- { line right last "".wid/2 from last "".n+(2,0)*textoffset }
+ { line right last "".wid/2 from last "".n+(0,1bp__) }
lg_pin(Chip.sw_+(0,22*lg_pinsep),,Pin21,wN,21)
- "svg_small(IRQ,75)" wid textht*2.0 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(IRQ,75)" wid textht*2.0 at (Chip.w,last line) ljust; overbar_
lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'svg_small(CC,75),Pin20,w,20)
lg_pinseq(0,7,e,1,10+,PB)
@@ -90,20 +84,17 @@ define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
lg_pinseq(0,7,e,12,2+,PA)
lg_pinseq(1,2,e,19,41-,CA)
lg_pin(Chip.se_+(0,23*lg_pinsep),,Pin34,eN,34)
- "svg_small(RESET,75)" wid textht*3.8 at (Chip.e,last line) rjust
- { line left last "".wid from last "".ne+(-1,0)*textoffset }
+ "svg_small(RESET,75)" wid textht*3.8 at (Chip.e,last line) rjust; overbar_
`$1']')
define(`ic74LS138',`[ Chip: box wid_ lg_chipwd ht_ 11*lg_pinsep
lg_pin(Chip.sw_+(0,lg_pinsep),GND,Pin8,w,8)
lg_pin(Chip.sw_+(0,2*lg_pinsep),,Pin4,wN,4)
- "svg_small(G2a,75)" wid textht*2.0 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(G2a,75)" wid textht*2.0 at (Chip.w,last line) ljust; overbar_
lg_pin(Chip.sw_+(0,3*lg_pinsep),,Pin5,wN,5)
- "svg_small(G2b,75)" wid textht*2.0 at (Chip.w,last line) ljust
- { line right last "".wid from last "".nw+(1,0)*textoffset }
+ "svg_small(G2b,75)" wid textht*2.0 at (Chip.w,last line) ljust; overbar_
lg_pin(Chip.sw_+(0,5*lg_pinsep),A,Pin1,w,1)
lg_pin(Chip.sw_+(0,6*lg_pinsep),B,Pin2,w,2)
@@ -114,4 +105,154 @@ define(`ic74LS138',`[ Chip: box wid_ lg_chipwd ht_ 11*lg_pinsep
lg_pin(Chip.se_+(0,9*lg_pinsep),Y7,Pin7,eN,7)
`$1']')
+ `ArduinoUno( wid,ht,pinlen )'
+define(`ArduinoUno',`[
+ define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl
+ define(`m4bht',`ifelse(`$2',,`20*lg_pinsep',`$2')')dnl
+#
+
+ Connector: box wid m4bwid ht m4bht
+#
+ plen = ifelse(`$4',,`2*L_unit',`$4')
+#
+Loopover_(`x',`ifelse(x,nul,,
+ `Pin`'eval(5+m4Lx): line left_ plen from Connector.nw-(0,(5+m4Lx)*lg_pinsep)
+ { "x" ljust at last line.start }')',
+ IOREF, RESET,`+`'3V3',`+`'5V', GND, GND, VIN,
+ nul, A0, A1, A2, A3, A4, A5)
+#
+Loopover_(`x',`ifelse(x,nul,,
+ `Pin`'eval(22-m4Lx): line right_ plen from Connector.ne-(0,m4Lx*lg_pinsep)
+ { "x" rjust at last line.start }')',
+ SCL, SDA, AREF, GND, D13, D12, ~D11, ~D10, ~D9, D8,
+ nul, D7, ~D6, ~D5, D4, ~D3, D2, TX D1, RX D0)
+#
+ `$4'] ')
+
+ `ArduinoLeonardo( wid,ht,pinlen )'
+define(`ArduinoLeonardo',`[
+ define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl
+ define(`m4bht',`ifelse(`$2',,`20*lg_pinsep',`$2')')dnl
+#
+ Connector: box wid m4bwid ht m4bht
+#
+ plen = ifelse(`$4',,`2*L_unit',`$4')
+#
+Loopover_(`x',`ifelse(x,nul,,
+ `Pin`'eval(5+m4Lx): line left_ plen from Connector.nw-(0,(5+m4Lx)*lg_pinsep)
+ { "x" ljust at last line.start }')',
+ IOREF, RESET,`+`'3V3',`+`'5V', GND, GND, VIN,
+ nul, A0, A1, A2, A3, A4, A5)
+#
+Loopover_(`x',`ifelse(x,nul,,
+ `Pin`'eval(22-m4Lx): line right_ plen from Connector.ne-(0,m4Lx*lg_pinsep)
+ { "x" rjust at last line.start }')',
+ SCL, SDA, AREF, GND,
+ ~D13, D12, ~D11, ~D10, ~D9, D8,
+ nul, D7, ~D6, ~D5, D4, ~D3, D2, TX D1, RX D0)
+#
+ `$4'] ')
+
+ `RPi( wid,ht,pinlen )'
+define(`RPi',`[
+ define(`m4bwid',`ifelse(`$1',,`34*L_unit',`$1')')dnl
+ define(`m4bht',`ifelse(`$2',,`21*lg_pinsep',`$2')')dnl
+#
+ GPIO: box wid m4bwid ht m4bht
+ plen = ifelse(`$4',,`6*L_unit',`$4')
+#
+define A_LeftGPIO {
+ exec sprintf("Pin%g: line left_ plen from GPIO.nw-(0,%g)",\
+ 2*(`$'1)-1,(`$'1)*lg_pinsep)
+ { "`$'3" ljust at last line.start }
+ "`$'2" at last line.c above }
+#
+Loopover_(`x',`ifelse(x,nul,,`A_LeftGPIO(m4Lx,patsubst(x,;,`,'))')',
+ ;3V3,
+ 2;SDA1, 3;SCL1, 4;GPIO_GCLK,
+ ;GND,
+ 17;GPIO_GEN0, 27;GPIO_GEN2, 22;GPIO_GEN3,
+ ;3V3,
+ 10;SPI_MOSI, 9;SPI_MISO, 11;SPI_SCLK,
+ ;GND,
+ ;ID_SD,
+ 5;, 6;, 13;, 19;, 26;,
+ ;GND )
+#
+define A_RightGPIO {
+ exec sprintf("Pin%g: line right_ plen from GPIO.ne-(0,%g)",\
+ 2*(`$'1),(`$'1)*lg_pinsep)
+ { "`$'3" rjust at last line.start }
+ "`$'2" at last line.c above }
+#
+Loopover_(`x',`ifelse(x,nul,,`A_RightGPIO(m4Lx,patsubst(x,;,`,'))')',
+ ;5V,
+ ;5V,
+ ;GND,
+ 14;TXD0, 15;RXD0, 18;GPIO_GEN1,
+ ;GND,
+ 23;GPIO_GEN4, 24;GPIO_GEN5,
+ ;GND,
+ 25;GPIO_GEN6, 8;SPI_CEO_N, 7;SPI_CE1_N,
+ ;ID_SC,
+ ;GND,
+ 12;,
+ ;GND,
+ 16;, 20;, 21; )
+#
+ `$4'] ')
+
+ `USB_C_Socket( wid, ht, pinlen )'
+define(`USB_C_Socket',`[
+ define(`m4bwid',`ifelse(`$1',,`18*L_unit',`$1')')dnl
+ define(`m4bht',`ifelse(`$2',,`14*lg_pinsep',`$2')')dnl
+#
+ Base: box wid m4bwid ht m4bht rad 5/3*lg_pinsep
+ plen = ifelse(`$4',,`6*L_unit',`$4')
+#
+ Loopover_(`x',
+ `B`'eval(13-m4Lx): dnl
+ line left_ plen from Base.n-(m4bwid/2,(m4Lx+0.5)*lg_pinsep)
+ {"x" ljust at last line.start}',
+ GND, RX1+, RX1-, VBUS, SBU2, D-, D+, CC2, VBUS, TX2-, TX2+, GND)
+#
+ Loopover_(`x',
+ `A`'m4Lx: line right_ plen from Base.n+(m4bwid/2,-(m4Lx+0.5)*lg_pinsep)
+ {"x" rjust at last line.start}',
+ GND, TX1+, TX1-, VBUS, CC1, D+, D-, SBU1, VBUS, RX2-, RX2+, GND)
+#
+ `$4']')
+
+ `HDMI_micro( wid, ht, pinlen )'
+define(`HDMI_micro',`[
+ define(`m4bwid',`ifelse(`$1',,`16*L_unit',`$1')')dnl
+ define(`m4bht',`ifelse(`$2',,`19*lg_pinsep+m4bwid*2/3',`$2')')dnl
+#
+ Base:[line up m4bht/2 then right m4bwid*2/3 \
+ then right m4bwid/3 down m4bwid/3 \
+ then down m4bht-2*m4bwid/3 then down m4bwid/3 left m4bwid/3 \
+ then left m4bwid*2/3 then to Here]
+ plen = ifelse(`$4',,`6*L_unit',`$4')
+#
+ Loopover_(`x',
+ `Pin`'m4Lx: line left_ plen from Base.nw-(0,m4bwid/3+(m4Lx-1/2)*lg_pinsep)
+ {"x" ljust at last line.start}
+ "m4Lx" at last line.c above',
+ HPD, UTILITY, D2+, D2_SH, D2-, D1+, D1_SH, D1-, D0+, D0_SH,
+ D0-, CLK+, CLK_SH, CLK-, CEC, GND, SCL, SDA, +5V)
+ line from Base.nw+(m4bwid*2/3-lg_pinsep,0) up plen
+ svg_rot(90,"21" at last line.c +(-2bp__,0))
+ svg_rot(90,sprintf("SH2") at last line.start + (4bp__,-8bp__))
+ line from Base.nw+(m4bwid*2/3-2*lg_pinsep,0) up plen
+ svg_rot(90,"20" at last line.c+(-2bp__,0))
+ svg_rot(90,"SH1" at last line.start + (4bp__,-8bp__))
+ line from Base.sw+(m4bwid*2/3-lg_pinsep,0) down plen
+ svg_rot(90,"23" at last line.c+(-2bp__,0))
+ svg_rot(90,"SH4" at last line.start + (4bp__,14bp__))
+ line from Base.sw+(m4bwid*2/3-2*lg_pinsep,0) down plen
+ svg_rot(90,"22" at last line.c+(-2bp__,0))
+ svg_rot(90,"SH3" at last line.start + (4bp__,14bp__))
+#
+ `$4']')
+
divert(0)dnl
diff --git a/graphics/circuit_macros/examples/svg/lcctSVG.m4 b/graphics/circuit_macros/examples/svg/lcctSVG.m4
index 9994b32309..ba25e60172 100644
--- a/graphics/circuit_macros/examples/svg/lcctSVG.m4
+++ b/graphics/circuit_macros/examples/svg/lcctSVG.m4
@@ -1,7 +1,7 @@
.PS
# lcctSVG.m4
maxpswid = 10
-log_init(svg_font(sans-serif,11bp__,1bp__))
+log_init(svg_font(sans-serif,11bp__,2bp__))
include(icsSVG.m4)
textht = textht * 0.9
diff --git a/graphics/circuit_macros/examples/svg/paletteSVG.m4 b/graphics/circuit_macros/examples/svg/paletteSVG.m4
index 2a26afdb99..2bad59ba93 100644
--- a/graphics/circuit_macros/examples/svg/paletteSVG.m4
+++ b/graphics/circuit_macros/examples/svg/paletteSVG.m4
@@ -333,7 +333,7 @@ A:Gridbox( FlipFlop(D)
] with .nw at (0,0)
-"A draft palette of elements for Inkscape using a 1 mm grid" \
+"A draft palette of a few elements for Inkscape using a 1 mm grid" \
ljust below at last [].sw
command "</g>" # end font
diff --git a/graphics/circuit_macros/examples/svg/recycleSVG.m4 b/graphics/circuit_macros/examples/svg/recycleSVG.m4
index d6246cc9ab..135f31414e 100644
--- a/graphics/circuit_macros/examples/svg/recycleSVG.m4
+++ b/graphics/circuit_macros/examples/svg/recycleSVG.m4
@@ -1,7 +1,7 @@
.PS
# recycle.m4
gen_init
-copy "HOMELIB_`'dpictools.pic"
+NeedDpicTools
[
# Gradient fill and clipping are simply
# done with PStricks or Tikz but the other
diff --git a/graphics/circuit_macros/examples/svg/tstSVG.htmx b/graphics/circuit_macros/examples/svg/tstSVG.htmx
index f15d09b7c7..6bb5ab2029 100644
--- a/graphics/circuit_macros/examples/svg/tstSVG.htmx
+++ b/graphics/circuit_macros/examples/svg/tstSVG.htmx
@@ -60,16 +60,28 @@ more basic.
<ul>
<ul>
<li>
- m4tt`'svg_font(</g>font-face,height,textoffset,dpic commands`'m4tt)</g>:
- Change font face, size, and dpic textoffset parameter.
+ m4tt`'svg_font(</g>font-face,nominal size[:dptextratio],textoffset,
+ dpic commands`'m4tt)</g>:
+ Change font face and dpic m4tt`'textht</g>, m4tt`'dptextratio</g>,
+ and m4tt`'textoffset</g> parameters.
If arg4 is blank, the font is changed and
requires m4tt`'command "&lt;/g&gt;"</g> to cancel the font change.
+ <br>
+ Note:
+ Nominal height = text height in drawing units; actual height =
+ nominal ht x m4tt`'dptextratio</g>.
+ <br>
Examples: <br>
m4tt`'svg_font(Times)</g><br>
+ m4tt`'svg_font(Times,14bp__)</g><br>
+ m4tt`'svg_font(sans-serif,14bp__:0.71)</g><br>
m4tt`'svg_font(Times,11bp__,1bp__,"text" at A)</g><br>
m4tt`'svg_font(font-family="Times")</g><br>
m4tt`'svg_font(font-family="Times" font-style="italic")</g><br>
m4tt`'svg_font(style="font-family:Times; font-style:italic")</g>
+ <li>m4tt svgfontratio(</g>font name`'m4tt)</g>;
+ Reasonable m4tt`'dptextratio</g> value for common fonts, used
+ by m4tt`'svg_font</g>.
<li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>;
e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g>
<li>m4tt svg_it(</g>text`'m4tt)</g>: for italics
@@ -84,6 +96,13 @@ more basic.
subscript
<li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>:
superscript
+ <li>m4tt svg_rot(</g>degrees, "text" [at position]`'m4tt)</g>:
+ Rotate text degrees (default 90) ccw.
+ Requires m4tt`'svg_rot_init(</g>filename`'m4tt)</g> and the source
+ must be processed twice.
+ <li>m4tt svg_rot_init(</g>filename`'m4tt)</g>:
+ filename is the basename of the output of
+ m4tt`'dpic -v filename.pic > filename.svg`'m4tt
<li>m4tt svg_symbol(</g>text`'m4tt)</g>: allow quoted pound sign in text,
e.g., m4tt`'svg_symbol(10&&#96;&#35;&#39;176;)</g> produces 10&#176;
<li>m4tt svgLink(</g>URL, drawing object, m4tt[B])</g>:
@@ -96,102 +115,61 @@ more basic.
<table cellpadding="0" cellspacing="0" width="100%" >
<tr>
-<td width="7%"> m4tt svg_alpha</g>
- <td align="left"> changecom(,)&`#'945;changecom(`#')
-<td width="7%"> m4tt svg_beta</g>
- <td align="left"> changecom(,)&`#'946;changecom(`#')
-<td width="7%"> m4tt svg_chi</g>
- <td align="left"> changecom(,)&`#'967;changecom(`#')
-<td width="7%"> m4tt svg_comma</g>
- <td align="left"> changecom(,)&`#'44;changecom(`#')
-<td width="7%"> m4tt svg_Delta</g>
- <td align="left"> changecom(,)&`#'916;changecom(`#')
-<td width="7%"> m4tt svg_delta</g>
- <td align="left"> changecom(,)&`#'948;changecom(`#')
-<td width="7%"> m4tt svg_epsilon</g>
- <td align="left"> changecom(,)&`#'949;changecom(`#')
-<td width="7%"> m4tt svg_eta</g>
- <td align="left"> changecom(,)&`#'951;changecom(`#')
+<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_epsilon</g> <td align="left"> changecom(,)&`#'949;changecom(`#')
+<td width="8%"> m4tt svg_zeta</g> <td align="left"> changecom(,)&`#'950;changecom(`#')
<tr>
-<td width="7%"> m4tt svg_Gamma</g>
- <td align="left"> changecom(,)&`#'915;changecom(`#')
-<td width="7%"> m4tt svg_gamma</g>
- <td align="left"> changecom(,)&`#'947;changecom(`#')
-<td width="7%"> m4tt svg_iota</g>
- <td align="left"> changecom(,)&`#'953;changecom(`#')
-<td width="7%"> m4tt svg_kappa</g>
- <td align="left"> changecom(,)&`#'954;changecom(`#')
-<td width="7%"> m4tt svg_Lambda</g>
- <td align="left"> changecom(,)&`#'923;changecom(`#')
-<td width="7%"> m4tt svg_lambda</g>
- <td align="left"> changecom(,)&`#'955;changecom(`#')
-<td width="7%"> m4tt svg_micro</g>
- <td align="left"> changecom(,)&`#'956;changecom(`#')
-<td width="7%"> m4tt svg_mu</g>
- <td align="left"> changecom(,)&`#'956;changecom(`#')
+<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(`#')
<tr>
-<td width="7%"> m4tt svg_nu</g>
- <td align="left"> changecom(,)&`#'957;changecom(`#')
-<td width="7%"> m4tt svg_ohm</g>
- <td align="left"> changecom(,)&`#'937;changecom(`#')
-<td width="7%"> m4tt svg_Omega</g>
- <td align="left"> changecom(,)&`#'937;changecom(`#')
-<td width="7%"> m4tt svg_omega</g>
- <td align="left"> changecom(,)&`#'969;changecom(`#')
-<td width="7%"> m4tt svg_Phi</g>
- <td align="left"> changecom(,)&`#'934;changecom(`#')
-<td width="7%"> m4tt svg_phi</g>
- <td align="left"> changecom(,)&`#'966;changecom(`#')
-<td width="7%"> m4tt svg_Pi</g>
- <td align="left"> changecom(,)&`#'928;changecom(`#')
-<td width="7%"> m4tt svg_pi</g>
- <td align="left"> changecom(,)&`#'960;changecom(`#')
+<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(`#')
<tr>
-<td width="7%"> m4tt svg_Psi</g>
- <td align="left"> changecom(,)&`#'936;changecom(`#')
-<td width="7%"> m4tt svg_psi</g>
- <td align="left"> changecom(,)&`#'968;changecom(`#')
-<td width="7%"> m4tt svg_rho</g>
- <td align="left"> changecom(,)&`#'961;changecom(`#')
-<td width="7%"> m4tt svg_Sigma</g>
- <td align="left"> changecom(,)&`#'931;changecom(`#')
-<td width="7%"> m4tt svg_sigma</g>
- <td align="left"> changecom(,)&`#'963;changecom(`#')
-<td width="7%"> m4tt svg_tau</g>
- <td align="left"> changecom(,)&`#'964;changecom(`#')
-<td width="7%"> m4tt svg_Theta</g>
- <td align="left"> changecom(,)&`#'920;changecom(`#')
-<td width="7%"> m4tt svg_theta</g>
- <td align="left"> changecom(,)&`#'952;changecom(`#')
+<td width="8%"> 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(`#')
<tr>
-<td width="7%"> m4tt svg_upsilon</g>
- <td align="left"> changecom(,)&`#'965;changecom(`#')
-<td width="7%"> m4tt svg_Xi</g>
- <td align="left"> changecom(,)&`#'926;changecom(`#')
-<td width="7%"> m4tt svg_xi</g>
- <td align="left"> changecom(,)&`#'958;changecom(`#')
-<td width="7%"> m4tt svg_zeta</g>
- <td align="left"> changecom(,)&`#'950;changecom(`#')
-<td width="7%"> m4tt svg_lt</g>
- <td align="left"> changecom(,)&`#'60;changecom(`#')
-<td width="7%"> m4tt svg_gt</g>
- <td align="left"> changecom(,)&`#'62;changecom(`#')
-<td width="7%"> m4tt svg_leq</g>
- <td align="left"> changecom(,)&`#'8804;changecom(`#')
-<td width="7%"> m4tt svg_geq</g>
- <td align="left"> changecom(,)&`#'8805;changecom(`#')
+<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(`#')
<tr>
-<td width="7%"> m4tt svg_prime</g>
- <td align="left"> changecom(,)&`#'8242;changecom(`#')
-<td width="7%"> m4tt svg_ensp</g>
- <td align="left"> |changecom(,)&`#'8194;changecom(`#')|
-<td width="7%"> m4tt svg_emsp</g>
- <td align="left"> |changecom(,)&`#'8195;changecom(`#')|
-<td width="7%"> m4tt svg_thinsp</g>
- <td align="left"> |changecom(,)&`#'8201;changecom(`#')|
-<td width="7%"> m4tt svg_backsl</g>
- <td align="left"> changecom(,)&`#'92;changecom(`#')
+<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(`#')|
</table>
+
</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
diff --git a/graphics/circuit_macros/examples/svg/windows.m4 b/graphics/circuit_macros/examples/svg/windows.m4
new file mode 100644
index 0000000000..bc4527f36e
--- /dev/null
+++ b/graphics/circuit_macros/examples/svg/windows.m4
@@ -0,0 +1,12 @@
+divert(-1)
+# windows.m4
+# This file is used if the CUSTOM=windows.m4 function is turned on in Makefile
+define(`windows_')
+
+# To makd NeedDpicTools work,
+# change the absolute Windows path to your installation directory:
+
+define(`NeedDpicTools',`if "dpictools" != "1" then {
+ copy "D:\Dwight\lib\dpictools.pic" } define(`dfitcurve__') ')
+
+divert(0)dnl