summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-03 20:45:51 +0000
committerKarl Berry <karl@freefriends.org>2021-06-03 20:45:51 +0000
commit7807c4992c4e7e145ff8e17d503d3ece9244af04 (patch)
tree4af57c6281c4822994861d924f8f5fb5ddcb332b /Master/texmf-dist/doc/latex/circuit-macros/examples
parent2fcc4105c8d6cd91d42593b46e9b320c14169c47 (diff)
circuit_macros (3jun21)
git-svn-id: svn://tug.org/texlive/trunk@59444 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4149
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m455
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Ball.m440
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Buttons.m41
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Capacitors.m438
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m493
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Chips.m445
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m41
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m43
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m48
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m420
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Escher.m4185
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m411
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Geometry.m432
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Inductors.m447
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m430
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile250
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m436
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Planes.m48
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4 (renamed from Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4)5
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples4
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m430
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/control.m493
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/csc.m4172
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdfbin876504 -> 893291 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex21
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/exp.m494
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4183
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex47
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/graysurf.m458
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4112
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/lcct.m41
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf812
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.tfmbin776 -> 764 bytes
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/person.m45
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m47
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m422
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AlogixSVG.m46
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4156
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ArrowFnSVG.m459
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m48
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CapacitorsSVG.m438
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ChipsSVG.m444
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrossbarSVG.m454
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrullerSVG.m48
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m420
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EEPSVG.m4553
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EscherSVG.m4188
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4164
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GrayCodeSVG.m459
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/InductorsSVG.m447
-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/Makefile37
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MoreTableSVG.m441
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MultiplexerSVG.m41
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PlateSVG.m4173
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PushPullSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m434
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m47
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TTLnandSVG.m43
-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.m44
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/WindingsSVG.m42
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/controlSVG.m4217
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/cscSVG.m4175
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex21SVG.m45
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx64
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/expSVG.m494
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/fetSVG.m4208
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m458
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4193
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/paletteSVG.m412
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/roseSVG.m439
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m424
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/sldtestsSVG.m4104
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx6
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex15
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex33
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/tsttikz.tex19
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m473
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig60
84 files changed, 4057 insertions, 2200 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4
deleted file mode 100644
index 814824bee75..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4
+++ /dev/null
@@ -1,149 +0,0 @@
-.PS
-# AntiqueClock.m4
-gen_init
-NeedDpicTools
-
-# PSTricks or tikz only:
-ifelse(ifpstricks(T)`'ifpgf(T),T,`
-
-iflatex(`latexcommand({\sf)')
-
-# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals
-
-# `hms2deg(hr,min,sec) hr:min:sec to degrees
-# blank arg1: degrees for minute hand
-# blank arg1 and arg2: degrees for second hand'
-define(`hms2deg',`ifelse(`$1',,
- `ifelse(`$2',,
- `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)',
- `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')',
- `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl
- pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')')
-
-# `SecondHand(length,hr,min,sec)'
-define(`SecondHand',`[ shsf = (`$1')/3.2
- C: Here
- { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) }
- line thick 8*shsf to rvec_(`$1',0)
- ]')
-
-# `AntiqueMinuteHand(length,hr,min,sec)'
-define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84
- L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4'))))
- C: circle fill_(0) diam 0.47*mhsf at L.start
- move to C
- spline from rvec_(0,0.047*mhsf) \
- to rvec_(1.65*mhsf,0.11*mhsf) \
- then to rvec_(`$1',0.018*mhsf) \
- then to rvec_(`$1',-0.018*mhsf) \
- then to rvec_(1.65*mhsf,-0.11*mhsf) \
- then to rvec_(0,-0.047*mhsf) \
- shaded rgbstring(0,0,0)
- ]')
-
-# `AntiqueHourHand(length,hr,min,sec)'
-define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2
- L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4'))))
- C: circle fill_(0) diam 0.6*hhsf at L.start
- move to C
- v = 0.25*hhsf
- { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf }
- { C1: circle rad v at rvec_(1.25*hhsf,0) fill_(0) }
- d = `$1'-1.25*hhsf
- q = 1bp__*hhsf
- r1 = (d^2 + q^2 - v^2)/(v-q)/2
- h = r1+v
- shade(0,
- arc ccw from C1+vec_(d/h*v,(r1+q)/h*v) to \
- C1+vec_(d,q) rad r1 with .c at C1+vec_(d,r1+q)
- arc ccw from C1+vec_(d,-q) to C1+vec_(d/h*v,-(r1+q)/h*v) rad r1 \
- with .c at C1+vec_(d,-r1-q))
- ]')
-
-define(`AntiqueClock',`[ # h,m,s,diam
-# Clock size parameters:
- hour = ifelse(`$1',,3,`$1')
- minute = ifelse(`$2',,41,`$2')
- 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
- r4 = r3 - 0.35*skale
- r5 = r4 - 0.17*skale
- r6 = r5 - 0.63*skale
- r7 = r6 - 0.17*skale
- shadelinethick = 1.0
-
-C: circle thick 0.2 rad r1
-
-define shadeline {
- s = 1-($`'1)*2
- v = r*s
- h = sqrt(r^2-v^2)
- t = 1-abs(s)
- line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \
- thick shadelinethick outlined rgbstring(t,t,t)
- }
-
- r = r1 # Bezel outer
- nlines = int(2*r/(shadelinethick pt__)*1.1)
- cost = cosd(10); sint = sind(10);
- ShadeObject(shadeline,nlines, 0, 0,0,0, 0.5, 1,1,1, 1, 0,0,0 ) at C
-
- r = r2 # Bezel inner
- nlines = int(2*r/(shadelinethick pt__)*1.1)
- cost = cosd(-10); sint = sind(-10);
- ShadeObject(shadeline,nlines, 0, 0,0,0, 0.25, 0.8,0.8,0.8, 0.5, 1,1,1,
- 0.75, 0.8,0.8,0.8, 1, 0,0,0 ) at C
-
-# Clock face
-Face: circle thick 0 fill_(1) rad r3 at C
- circle rad r4 at C
- circle rad r5 at C
- circle rad r6 at C
- circle rad r7 at C
-
-# Text rotation for PSTricks or TikZ
- define(`rottext',
- `ifpstricks(`\rput[c]{%g}(0,0)',`ifpgf(`\pgftext[rotate=%g]',%g)')')
-# Outer numbers
- command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4)
- for mn = -15 to 15 by 5 do { sprintf("rottext{\outerfont %g}",\
- -mn/60*360,pmod(mn,60)) at C+(Rect_((r3+r4)/2,90-mn/60*360)) }
- for mn = 20 to 40 by 5 do { sprintf("rottext{\outerfont %g}",\
- 180-mn/60*360,mn) at C+(Rect_((r3+r4)/2,90-mn/60*360)) }
-# Outer tics
- for mn = 1 to 60 do { t = 90-mn/60*360
- line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) }
-
-# Inner numbers
- command sprintf("\font\innerfont=cmss12 at %4.2fin",r5-r6)
- Loopover_(`mx',`t = (m4Lx-4)/12*360;
- sprintf("rottext{\scalebox{0.7}[1.0]{\innerfont mx}}",-t) \
- at C+(Rect_((r5+r6)/2,90-t))', IX,X,XI,XII,I,II,III)
- Loopover_(`mx',`t = (m4Lx+3)/12*360;
- sprintf("rottext{\scalebox{0.7}[1.0]{\innerfont mx}}",-t+180) \
- at C+(Rect_((r5+r6)/2,90-t))', IV,V,VI,VII,VIII)
-
-# Inner tics
- for mn = 5 to 60 by 5 do { t = 90-mn/60*360
- line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) }
-
-# Hands
- AntiqueHourHand(r6,hour,minute,second) with .C at C
- AntiqueMinuteHand(r5,hour,minute,second) with .C at C
- SecondHand((r3+r4)/2,hour,minute,second) with .C at C
-
-# Center
- dot(at C,0.1/4*r1,1)
- ]')
-
- Clock1: AntiqueClock(,,,3)
-# Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0)
-
- iflatex(`latexcommand(})')
-
-',` "AntiqueClock.m4 requires pstricks or pgf" ')
-
-.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4
new file mode 100644
index 00000000000..68c6d9724e2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ArrowFn.m4
@@ -0,0 +1,55 @@
+.PS
+# ArrowFn.m4
+# https://tex.stackexchange.com/questions/581089/arrow-function-diagrams
+gen_init
+ brad = 0.04
+ bht = 0.4
+ bwid = 0.25
+define(`rbox',`box rad brad outlined "Orange"')
+
+B1: [
+ linethick = 1.2
+ arrowwid = 0.08
+ rbox wid 5*boxwid ht 3/2*boxwid
+ line from last box.w-(bht/4,0) "\Large $X$" above ljust
+T: Here
+ arrow up bwid right bwid then right bwid
+F: rbox ht bht "\Large $f$"
+ {"\Large $Y$" above ljust }
+ arrow down bwid right bwid from T then right boxwid + bwid*3/2
+G: rbox ht bht "\Large $g$"
+ {"\Large $Z$" above ljust }
+S: circle diam bht "\Large $+$" at (G.e.x+boxwid,(F.y+G.y)/2)
+ d = F.y-S.nw.y
+ arrow from F.e to S.nw+(-d,d) then to S.nw
+ arrow from G.e to S.sw+(-d,-d) then to S.sw
+ arrow right from S.e
+ ]
+[
+ bht = bht/2
+ sbwid = boxwid*3/4
+ bbwid = sbwid*5/4
+ dh = bht/2
+B1: rbox wid bbwid ht bbwid
+B2: rbox wid sbwid*3/2 ht bbwid at B1+(3/2*bbwid,0)
+B3: rbox wid bbwid ht bbwid at B2+(3/2*bbwid,0)
+B4: rbox wid sbwid*3/2 ht bbwid at B3+(3/2*bbwid,0)
+B5: rbox wid bbwid ht bbwid at B4+(3/2*bbwid,0)
+ F: rbox ht bht wid sbwid at B2.n-(0,bht*3/4) "$f$"
+BR: B2.s+(0,B2.n.y-F.y)
+ G: rbox ht bht wid sbwid at (B4,F) "$g$"
+ S: circle diam bht*3/2 at B5+(bht/2,0) "$+$"
+ arrow right from S.e
+ T: B1.w+(dh,0)
+B: rbox ht bbwid*5/4 wid boxwid*7.25 with .w at T-(sbwid*3/4,0)
+ { line from T left sbwid "$x$" above ljust }
+ arrow from T to (B1.e-(dh,0),F) then to F.w
+ arrow from F.e to (B3.w+(dh,0),F) then to (B3.e-(dh,0),BR)
+ continue to (B5.w+(dh,0),Here) then to S.sw
+ line thick 5 outlined "white" from B3.sw to B3.ne chop brad
+ arrow from T to (B1.e-(dh,0),BR) then to (B3.w+(dh,0),BR) \
+ then to (B3.e-(dh,0),G) then to G.w
+ arrow from G.e to (B5.w+(dh,0),G) then to S.nw
+ ] with .nw at B1.sw+(0,-0.2)
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Ball.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Ball.m4
index 8c022223eff..e551dff845c 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Ball.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Ball.m4
@@ -29,19 +29,19 @@ command "\small{"
ifpstricks(
`command "\pscustom[fillstyle=gradient,gradmidpoint=1.0,%"
command sprintf("gradbegin=gray,gradend=white,gradlines=%g]{",rectwid*200)')
- line from project(-rectht/2,-rectwid*1/3,0) \
- to project( rectht/2,-rectwid*1/3,0) \
- then to project( rectht/2, rectwid*2/3,0) \
- then to project(-rectht/2, rectwid*2/3,0) \
- then to project(-rectht/2,-rectwid*1/3,0)
+ line from Project(-rectht/2,-rectwid*1/3,0) \
+ to Project( rectht/2,-rectwid*1/3,0) \
+ then to Project( rectht/2, rectwid*2/3,0) \
+ then to Project(-rectht/2, rectwid*2/3,0) \
+ then to Project(-rectht/2,-rectwid*1/3,0)
ifpstricks(command "}%")
define(`C3D',`0,0,alpha') # Centre of the sphere
- C: project(C3D)
+ C: Project(C3D)
# Shaded sphere
ifelse(m4postprocessor,pstricks,
- `Highlight: project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0))))
+ `Highlight: Project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0))))
command "\pscustom[fillstyle=gradient,gradmidpoint=0.0,%"
command sprintf("gradbegin=gray,gradend=white,gradlines=%g,%%",alpha*200)
command "GradientCircle=true,GradientScale=1.5,%"
@@ -54,18 +54,18 @@ command "\small{"
C.x,C.y,alpha/2.54)',
`circle rad alpha at C fill_(1) ')
- S: "$S$" at project(0,0,0) rjust # The sphere bottom touch point
+ S: "$S$" at Project(0,0,0) rjust # The sphere bottom touch point
"$\alpha$" at 0.5<S,C> rjust
define(`N3D',`0,0,2*alpha') # North pole
- N: "N" at project(N3D) ljust above
+ N: "N" at Project(N3D) ljust above
phi = 65*dtor_
define(`Phat3D',`rot3Dz(phi,alpha*2.7,0,0)')
- Phat: "$\hat{P}$" at project(Phat3D) ljust
+ Phat: "$\hat{P}$" at Project(Phat3D) ljust
- X: project(rectht/2*0.8,0,0)
- Y: project(0,rectwid/2*0.8,0)
+ X: Project(rectht/2*0.8,0,0)
+ Y: Project(0,rectwid/2*0.8,0)
`define' linevis { # ratio # Visibility function for lines fom S to Xb
$2 = distance(($1 between S and Xb),C)-alpha }
@@ -84,8 +84,8 @@ thinlines_ # axes
arrow up alpha*0.5 chop 0.05 chop 0 ; "$z,\:\zeta$" above ljust
invisline(Phat)
line to Phat chop 0.05 chop 0
- arc ccw -> rad alpha from project(alpha/2,0,0) to \
- project(rot3Dz(phi,alpha/2,0,0))
+ arc ccw -> rad alpha from Project(alpha/2,0,0) to \
+ Project(rot3Dz(phi,alpha/2,0,0))
"$\phi$" below at 0.5 between last arc.start and last arc.end
# vector (ratio along (N to Phat))
@@ -94,7 +94,7 @@ define(`ray',`sum3D(N3D,sprod3D($1,diff3D(Phat3D,N3D)))')
$2 = length3D(diff3D(ray($1),C3D))-alpha }
bisect( rayvis, 1e-3, 1, 1e-8, p ) # Find P
- P: "$P$" at project(ray(p)) ljust above
+ P: "$P$" at Project(ray(p)) ljust above
thicklines_
line dashed from N to P chop 0 chop 0.05
@@ -108,11 +108,11 @@ thinlines_ # Draw the meridian
bisect( meridianvis, 0, pi_, 1e-8, y )
n = 0
for ang = y-pi_ to y by pi_/20 do {
- Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 }
fitcurve(Q,n-1)
n = 0
for ang = y to y+pi_ by pi_/20 do {
- Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 }
fitcurve(Q,n-1,dashed)
define(`equator',`rot3Dz($1,alpha,0,0)')
@@ -122,15 +122,15 @@ define(`equator',`rot3Dz($1,alpha,0,0)')
bisect( equatorvis, 0, pi_, 1e-8, y )
n = 0
for ang = y-pi_ to y by pi_/20 do {
- Q[n]: project(sum3D(C3D,equator(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 }
fitcurve(Q,n-1)
n = 0
for ang = y to y+pi_ by pi_/20 do {
- Q[n]: project(sum3D(C3D,equator(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 }
fitcurve(Q,n-1,dashed)
line dashed from C to P # beta
- line dashed from C to project(sum3D(C3D,equator(phi)))
+ line dashed from C to Project(sum3D(C3D,equator(phi)))
arc ccw -> from 0.6 along_(last line) to 0.6 between C and P
"$\beta$" above
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Buttons.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Buttons.m4
index 1eab236249b..e7e5b004dca 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Buttons.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Buttons.m4
@@ -3,6 +3,7 @@
gen_init
NeedDpicTools
+
divert(-1)
#################################################################
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Capacitors.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Capacitors.m4
new file mode 100644
index 00000000000..d2586f1b9b7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Capacitors.m4
@@ -0,0 +1,38 @@
+.PS
+# `Capacitors.m4'
+cct_init
+
+movewid = 2 pt__
+hm = 2.05
+vm = 0.28
+{ {capacitor ; move ;"`{\tt capacitor}'" ljust}
+ move right_ hm
+ {capacitor(,C); move ;"`{\tt capacitor(,C)}'" ljust}
+ move right_ hm
+ {capacitor(,C+); move ;"`{\tt capacitor(,C+)}'" ljust}
+}
+ move down vm; right_
+{ {capacitor(,P); move ;"`{\tt capacitor(,P)}'" ljust}
+ move right_ hm
+ {capacitor(,E); move ;"`{\tt capacitor(,E)}'" ljust}
+ move right_ hm
+ {capacitor(,K); move ;"`{\tt capacitor(,K)}'" ljust}
+}
+ move down 0.25; right_
+{ {capacitor(,M); move ;"`{\tt capacitor(,M)}'" ljust}
+ move right_ hm
+ {capacitor(,N); move ;"`{\tt capacitor(,N)}'" ljust}
+ move right_ hm
+ {xtal ; move ;"`{\tt xtal}'" ljust}
+}
+ move down 0.25; right_
+{ {capacitor(,dC); move ;"`{\tt capacitor(,dC)}'" ljust}
+ move right_ hm
+ {capacitor(,dF); move ;"`{\tt capacitor(,dF)}'" ljust}
+ move right_ hm
+ {variable(`capacitor',NN,-30,dimen_/3)
+ move ;`"{\tt variable(}`{\tt capacitor',}"' ljust \
+ `"{\enskip\tt NN,-30,dimen\_/3)}"' ljust
+ }
+}
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m4
deleted file mode 100644
index 443c398b46c..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m4
+++ /dev/null
@@ -1,93 +0,0 @@
-.PS
-# `CctTable.m4'
-cct_init
-
-movewid = 2 pt__
-hm = 2.05
-vm = 0.28
-{ {resistor ; move ;"`{\tt resistor}'" ljust}
- move right_ hm
- {resistor(,,Q) ; move ;"`\tt resistor(,{,}Q) '" ljust}
- move right_ hm
- {resistor(,,E) ; move
- "`\shortstack[l]{\tt resistor(,{,}E)\\ {\tt $\equiv$ ebox}}'" ljust}
-}
- move down vm; right_
-{ {resistor(,,ES) ; move ;"`\tt resistor(,{,}ES) '" ljust}
- move right_ hm
- {resistor(,,H) ; move ;"`\tt resistor(,{,}H) '" ljust}
- move right_ hm
- {ebox(,,,0.5) ; move ;"`{\tt ebox(,{,},0.5)}'" ljust}
-}
- move down vm; right_
-{ {resistor(,,V) ; move ;"`{\tt resistor(,{,}V)}'" ljust}
- move right_ hm
- {move down_ 0.05; right_
- thermocouple ; move;"`{\tt thermocouple}'" ljust; move up_ 0.05}
- move right_ hm
- {ebox(,0.5,0.3) ; move ;"`{\tt ebox(,0.5,0.3)}'" ljust}
-}
- move down vm; right_
-{ {inductor ; move ;"`{\tt inductor}'" ljust}
- move right_ hm
- {inductor(,W); move ;"`{\tt inductor(,W)}'" ljust}
- move right_ hm
- {inductor(,L); move ;"`{\tt inductor(,L)}'" ljust}
-}
- move down vm; right_
-{ {inductor(,,,M) ; move ;"`{\tt inductor(,{,},M)}'" ljust}
- move right_ hm
- {inductor(,W,6,P); move ;"`{\tt inductor(,W,6,P)}'" ljust}
- move right_ hm
- {move right_ 0.2; ttmotor(,G) ; move ;"`{\tt ttmotor(,G)}'" ljust}
-}
- move down vm; right_
-{ {capacitor ; move ;"`{\tt capacitor}'" ljust}
- move right_ hm
- {capacitor(,C); move ;"`{\tt capacitor(,C)}'" ljust}
- move right_ hm
- {capacitor(,C+); move ;"`{\tt capacitor(,C+)}'" ljust}
-}
- move down vm; right_
-{ {capacitor(,P); move ;"`{\tt capacitor(,P)}'" ljust}
- move right_ hm
- {capacitor(,E); move ;"`{\tt capacitor(,E)}'" ljust}
- move right_ hm
- {capacitor(,K); move ;"`{\tt capacitor(,K)}'" ljust}
-}
- move down 0.25; right_
-{ {capacitor(,M); move ;"`{\tt capacitor(,M)}'" ljust}
- move right_ hm
- {capacitor(,N); move ;"`{\tt capacitor(,N)}'" ljust}
- move right_ hm
- {xtal ; move ;"`{\tt xtal}'" ljust}
-}
- move down 0.25; right_
-{ {memristor ; move;"`{\tt memristor}'" ljust}
- move right_ hm
- {heater; move;"`{\tt heater}'" ljust}
- move right_ hm
- {tline ; move;"`{\tt tline}'" ljust}
-}
- move down 0.25; right_
-{ {move up_ 0.05; right_; gap ; move ;"`{\tt gap}'" ljust}
- move right_ hm
- {gap(,,A) ; move ;"`{\tt gap(,{,}A)}'" ljust}
- move right_ hm
- {arrowline ; move;"`{\tt arrowline}'" ljust}
-}
- move down 0.25; right_
-{ {lamp ; move;"`{\tt lamp}'" ljust}
- move right_ hm
- {reed ; move ;"`{\tt reed}'" ljust}
- move right_ hm
- {reed(,,,fill_(0.9),CR) ; move ; "`{\tt reed(,{,},fill\_(0.9),CR)}'" ljust}
-}
- move down 0.25; right_
-{ {pvcell ; move;"`{\tt pvcell}'" ljust}
- move right_ hm
- {arrester ; move ;"`{\tt arrester}'" ljust}
-}
-
-
-.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Chips.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Chips.m4
new file mode 100644
index 00000000000..f9e98bc0769
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Chips.m4
@@ -0,0 +1,45 @@
+.PS
+# Chips.m4
+log_init
+include(ics.m4)
+
+ command "{\sf"
+
+Chips: [
+ ic4017
+ {"\sf 4017" at last [].Chip.sw below ljust}
+ move
+ ic4510
+ {"\sf 4510" at last [].Chip.sw below ljust}
+ move
+ icVS1053
+ {"\sf VS1053" at last [].Chip.sw below ljust}
+
+ DIP_chip_outline with .sw at last [].se+(0.5,0)
+ { `"DIP\_chip\_outline"' at last [].s below }
+ ]
+
+DIPs: [
+ DIP0: DIP
+ DIP32: DIP(32,direct=R;bodywid=0.5*scale) with .sw at last [].se+(0.5,0)
+ DIP16: DIP(16,type=Q;pinwid=1bp__) with .sw at DIP32.se+(1.5,0)
+
+ thinlines_
+ { `"\tt DIP"' at DIP0.s - (0,10bp__) }
+ { arrow <- from DIP0.Pin1 up 0.2 ; `"\sl Pin1"' ljust at Here+(-0.05,0.1) }
+ { arrow <- from DIP0.c up 0.7 right 0.25; `"\sl Body"' ljust }
+ { arrow <- from DIP0.Pin8 up 0.25 right 0.2 ; `"\sl Pin8"' above ljust }
+
+ { `"\tt DIP(32,direct=R;bodywid=0.5*scale)"' ljust \
+ at DIP32.sw - (0,10bp__) }
+ { arrow <- right 0.2 from DIP32.Pin1; `"\sl Pin1"' ljust }
+ { spline <- right 0.2 then right 0.1 up 0.1 from DIP32.Pin32
+ `"\sl Pin32"' ljust }
+
+ { `"\tt DIP(16,type=Q;pinwid=1bp\_\_)"' at DIP16.sw - (0,10bp__) ljust }
+ thicklines_
+
+ ] with .nw at last [].sw+(0,-0.3)
+
+ command "}%"
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4
index 2e36626c5b7..2c5dfb76f32 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Chuck.m4
@@ -1,6 +1,6 @@
.PS
# Chuck.m4
-threeD_init s_init(Views) sinclude(tst.dim)
+gen_init s_init(Views) sinclude(tst.dim)
#
#################################################################
divert(-1)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4
index 1e5fd5781a6..7229f0afee8 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4
@@ -65,5 +65,4 @@ B: [
{ `"\tt tbox(V\_1,{,},<>)"' at last [].s below }
] with .nw at T.sw+(0,-0.2)
-
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4
index 64ed3e6854c..c9f8cd9019e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Connectors.m4
@@ -1,9 +1,10 @@
.PS
-# Connectors
+# Connectors.m4
log_init
include(ics.m4)
ifelse(ifpgf(T)`'ifpstricks(T)`'ifpsfrag(T),T,`command "{\small\sf"')
+
# ArduinoUno
Ar: ArduinoLeonardo #with .sw at last [].se+(0.25,0)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4
index dce4f3aa878..d2c215ae133 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Cruller.m4
@@ -52,10 +52,10 @@ thinlines_
rgbtohsv(0.6,0.4,0,h,s,v)
for i = 1 to n do {
tc = t[ix[i]]; sc = s[ix[i]]
- SE: (project(cruller(tc+dt/2,sc-ds/2)))
- SW: (project(cruller(tc-dt/2,sc-ds/2)))
- NW: (project(cruller(tc-dt/2,sc+ds/2)))
- NE: (project(cruller(tc+dt/2,sc+ds/2)))
+ SE: (Project(cruller(tc+dt/2,sc-ds/2)))
+ SW: (Project(cruller(tc-dt/2,sc-ds/2)))
+ NW: (Project(cruller(tc-dt/2,sc+ds/2)))
+ NE: (Project(cruller(tc+dt/2,sc+ds/2)))
f = ((dcosine3D(3,cruller(tc,sc))/2.25+1)/2)^2
hsvtorgb(h,(1-f)*s,1,r,g,b)
line outlined rgbstring(r,g,b) shaded rgbstring(r,g,b) ifpdf( invis ) \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4
index 5631a4822fb..1846917a4ae 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4
@@ -46,10 +46,10 @@ define(`Dini',
du = ur/ugrid/2
dv = vr/vgrid/2
for i=0 to n do {
- NE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]+dv))
- SE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]-dv))
- SW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]-dv))
- NW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]+dv))
+ NE: Project(Dini(ciu[ix[i]]+du,civ[ix[i]]+dv))
+ SE: Project(Dini(ciu[ix[i]]+du,civ[ix[i]]-dv))
+ SW: Project(Dini(ciu[ix[i]]-du,civ[ix[i]]-dv))
+ NW: Project(Dini(ciu[ix[i]]-du,civ[ix[i]]+dv))
f = (-cos(ciu[ix[i]])+1)/2
g = ( sin(ciu[ix[i]])+1)/2
line from NE to SE then to SW then to NW then to NE \
@@ -174,9 +174,9 @@ array2(h,m4inx,53,54,55,58,59,57)
}
for i=1 to n do {
for j=1 to 6 do { x[j]=h[ih[i],j] }
- line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3]))\
- for_(2,6,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
- to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0.95)
+ line from Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3]))\
+ for_(2,6,1,`to Project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
+ to Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0.95)
}
m = 0
for i=1 to 12 do { # Visible pentagons
@@ -185,9 +185,9 @@ array2(h,m4inx,53,54,55,58,59,57)
}
for i=1 to m do {
for j=1 to 5 do { x[j]=p[ip[i],j] }
- line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) \
- for_(2,5,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
- to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0)
+ line from Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) \
+ for_(2,5,1,`to Project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
+ to Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0)
}
] scaled 2.5 with .sw at last [].se+(1,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Escher.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Escher.m4
index 675fa2c00d5..f8bae7f728e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Escher.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Escher.m4
@@ -1,51 +1,161 @@
.PS
+# Escher.m4
+# https://tex.stackexchange.com/questions/129274/showcase-of-optical-illusions-made-with-tex-latex-luatex-context
threeD_init
+[
+ u=1/2.54 # unit size; could use scale for this
+
+ define(`treadcolor',`0.8,0.75,0.7')
+ define(`darkgrn',`.1,.1,0')
+ define(`lightgrn',`.7,.7,.6')
+
+ define(`northsteps',3)
+ define(`eaststeps',8)
+ define(`southsteps',7)
+ define(`weststeps',4)
+ define(`baselayers',10)
+ define(`eb',eval(baselayers+eaststeps))
+ define(`ebs',eval(eb+southsteps))
+ define(`under',7)
+
+ azimuth = -45 # view angles
+ elevation = 25
+ setview(azimuth,elevation,0)
+ # projected unit vectors
+ UX: Project(u,0,0)
+ UY: Project(0,-u,0)
+ UZ: Project(0,0,u)
+ # layer thickness in units of u
+ f= -(eaststeps*UX.y + southsteps*UY.y - weststeps*UX.y - northsteps*UY.y)/dnl
+ ((eaststeps+southsteps+weststeps+northsteps)*UZ.y)
+ # XY projection of 3D coords in units of u
+define proj {UX*($1)+UY*($2)+UZ*($3)}
+
+define tread {line from UY/2 \
+ to UY then to UY+UX then to UX then to (0,0) \
+ then to UY/2 shaded rgbstring(treadcolor) \
+ with .start at proj($1,$2,$3)+UY/2 }
+
+define wrect {line invis from (0,0) to UX*($4) \
+ then to UX*($4)+UZ*($5) \
+ then to UZ*($5) then to (0,0) with .start at proj($1,$2,$3) \
+ shaded rgbstring(r,g,b)}
+
+define srect {line invis from (0,0) to UY*($4) then to UY*($4)+UZ*($5) \
+ then to UZ*($5) then to (0,0) with .start at proj($1,$2,$3) \
+ shaded rgbstring(r,g,b) }
+ # color blending
+define(`blendwht',`between3D(`$1',`$2',`$3',`$4',1,1,1)')
+define makergb { r = $1; g = $2; b = $3 }
+define dorgb { gg = $2
+ if $1==0 then { makergb(blendwht(gg,lightgrn)) } \
+ else { makergb(blendwht(gg,darkgrn)) } }
+
+# East
+ for i=-under to baselayers do {
+ dorgb((i%2),0.2)
+ wrect(1,1,i*f,eaststeps-2,-f) }
+ for i=0 to eaststeps do {
+ dorgb((i%2),0.2)
+ wrect(i,1,(baselayers+i)*f,(eaststeps+1-i),-f)
+ tread(i,0,(baselayers+i)*f)
+ line from proj(i,1,(baselayers+i)*f) \
+ to proj(i,1,(baselayers-1+i)*f) }
+# South
+ for i=0 to eb do {
+ dorgb((i%2),0.4)
+ srect(eaststeps+1,0,i*f,southsteps+1,-f) }
+ for i=1 to southsteps do {
+ dorgb((i%2),0.4)
+ srect(eaststeps+1,i,(eb+i)*f,(southsteps+1-i),-f)
+ tread(eaststeps,i,(eb+i)*f)
+ line from proj(eaststeps+1,i,(eb+i)*f) \
+ to proj(eaststeps+1,i,(eb+i-1)*f) }
+# North
+ for i=-under to baselayers-northsteps-1 do {
+ dorgb((i%2),0.1)
+ srect(1,1,i*f,northsteps-1,-f) }
+ for i=1 to northsteps do {
+ dorgb((i%2),0.1)
+ srect(1,1,(baselayers-i)*f,i,-f)
+ wrect(0,1+i,(baselayers-i)*f,1,-f)
+ line from proj(0,1+i,(baselayers-i)*f) \
+ to proj(0,1+i,(baselayers-i-1)*f)
+ line from proj(1,1+i,(baselayers-i)*f) \
+ to proj(1,1+i,(baselayers-i-1)*f)
+ tread(0,i,(baselayers-i)*f) }
+# West
+ for i=0 to ebs do {
+ dorgb((i%2),0.4)
+ wrect(eaststeps+1,southsteps+1,i*f,-(weststeps+1),-f) }
+ for i=0 to weststeps-1 do {
+ dorgb((i%2),0.4)
+ wrect(eaststeps-i,southsteps+1,(ebs+i+1)*f,-(weststeps-i),-f,)
+ srect(eaststeps-i,southsteps,(ebs+i+1)*f,1,-f)
+ if i!=weststeps-1 then {
+ line from proj(eaststeps-i,southsteps,(ebs+i+1)*f) \
+ to proj(eaststeps-i,southsteps,(ebs+i)*f) }
+ line from proj(eaststeps-i,southsteps+1,(ebs+i+1)*f) \
+ to proj(eaststeps-i,southsteps+1,(ebs+i)*f)
+ tread(eaststeps-(i+1),southsteps,(ebs+i+1)*f) }
+# Corner lines
+ define(`dgreen',`outlined rgbstring(blendwht(0.2,darkgrn))')
+ line dgreen from proj(1,1,(baselayers-1)*f) to proj(1,1,-under*f)
+ line dgreen from proj(eaststeps+1,southsteps+1,ebs*f) \
+ to proj(eaststeps+1,southsteps+1,-f)
+ line dgreen from proj(0,northsteps+1,(baselayers-northsteps)*f) \
+ to last line.end-UX*(weststeps+1) then to last line.end \
+ then to proj(eaststeps+1,0,-f) then to proj(eaststeps+1,0,eb*f)
+ ]
+
+ifelse(1,1,`
+[
setview(-45,20)
bwid = 2.8
bh = 1.5
bdp = 1.8
bth = 0.3
- A: project(0,0,0)
- AA: A+(project(bth,bth,-bth))
- B: project(0,bwid,0)
- BB: B+(project(bth,-bth,-bth))
- C: project(bdp,bwid,0)
- D: project(bdp,0,0)
- E: project(0,0,-bh)
- F: project(bdp,0,-bh)
- G: project(bdp,bwid,-bh)
- H: B + (project(0,0,-bh))
+ A: Project(0,0,0)
+ AA: A+Project(bth,bth,-bth)
+ B: Project(0,bwid,0)
+ BB: B+Project(bth,-bth,-bth)
+ C: Project(bdp,bwid,0)
+ D: Project(bdp,0,0)
+ E: Project(0,0,-bh)
+ F: Project(bdp,0,-bh)
+ G: Project(bdp,bwid,-bh)
+ H: B + Project(0,0,-bh)
line from A to B then to C then to D then to A then to E then to F \
then to G then to H then to E
line from C to G
- line from A+(project(bth,bth,0)) to B+(project(bth,-bth,0)) \
- then to C+(project(-bth,-bth,0))
- L1: line to D+(project(-bth,bth,0))
- L2: line to A+(project(bth,bth,0))
- L4: line from E+(project(bth,bth,0)) to H+(project(bth,-bth,0))
- L3: line to C+(project(-bth,-bth,-bh))
- line to F+(project(-bth,bth,0)) then to A+(project(bth,bth,-bh))
-
- L5: line from D+(project(-bth,0,-bth)) to A+(project(bth,0,-bth))
- line to E+(project(bth,0,bth))
- L6: line to Here+(project(0,bwid-2*bth,0))
- L7: line from D+(project(0,bth,-bth)) to C+(project(0,-bth,-bth))
- line to G+(project(0,-bth,bth))
- L8: line to Here+(project(-bdp+2*bth,0,0))
- Tmp: line invis from L8.start+(project(-bth,0,0)) up bh
+ line from A+Project(bth,bth,0) to B+Project(bth,-bth,0) \
+ then to C+Project(-bth,-bth,0)
+ L1: line to D+Project(-bth,bth,0)
+ L2: line to A+Project(bth,bth,0)
+ L4: line from E+Project(bth,bth,0) to H+Project(bth,-bth,0)
+ L3: line to C+Project(-bth,-bth,-bh)
+ line to F+Project(-bth,bth,0) then to A+Project(bth,bth,-bh)
+
+ L5: line from D+Project(-bth,0,-bth) to A+Project(bth,0,-bth)
+ line to E+Project(bth,0,bth)
+ L6: line to Here+Project(0,bwid-2*bth,0)
+ L7: line from D+Project(0,bth,-bth) to C+Project(0,-bth,-bth)
+ line to G+Project(0,-bth,bth)
+ L8: line to Here+Project(-bdp+2*bth,0,0)
+ Tmp: line invis from L8.start+Project(-bth,0,0) up bh
line from Tmp.start to Intersect_(Tmp,L7)
Tmp: line invis from L8.end up bh
line from L8.end to Intersect_(Tmp,L7)
- line from Intersect_(Tmp,L1) to BB+(project(bth,0,0))
- Tmp: line invis to Here+(project(bdp,0,0))
+ line from Intersect_(Tmp,L1) to BB+Project(bth,0,0)
+ Tmp: line invis to Here+Project(bdp,0,0)
line from Tmp.start to Intersect_(Tmp,L1)
Tmp: line invis from H up bh
line from H to Intersect_(Tmp,L7)
- line from Intersect_(Tmp,L1) to B+(project(bth,-bth,0))
+ line from Intersect_(Tmp,L1) to B+Project(bth,-bth,0)
- Tmp: line invis from AA to AA+(project(0,bwid,0))
+ Tmp: line invis from AA to AA+Project(0,bwid,0)
Tmp2: line invis up bh from L6.end
line from Intersect_(Tmp,L2) to Intersect_(Tmp2,Tmp) \
then to Intersect_(Tmp2,L1)
@@ -56,22 +166,23 @@ threeD_init
Tmp: line invis down bh from D
line from D to Intersect_(Tmp,L6)
- line from Intersect_(Tmp,L4) to F+(project(-bth,bth,0))
+ line from Intersect_(Tmp,L4) to F+Project(-bth,bth,0)
- Tmp: line invis from L5.start to L5.start+(project(0,0,-bh))
- move to E+(project(0,2*bth,0))
- Tmp2: line invis to Here+(project(bdp,0,0))
+ Tmp: line invis from L5.start to L5.start+Project(0,0,-bh)
+ move to E+Project(0,2*bth,0)
+ Tmp2: line invis to Here+Project(bdp,0,0)
line from L5.start to Intersect_(Tmp,L6)
line from Intersect_(Tmp,L4) to Intersect_(Tmp,Tmp2) \
then to Intersect_(Tmp2,L4)
- Tmp: line invis from L7.start to L7.start+(project(0,0,-(bh-bth)))
+ Tmp: line invis from L7.start to L7.start+Project(0,0,-(bh-bth))
line from L7.start to Intersect_(Tmp,L6)
- move to G+(project(-2*bth,0,0))
- Tmp2: line invis to Here+(project(0,-bwid,0))
+ move to G+Project(-2*bth,0,0)
+ Tmp2: line invis to Here+Project(0,-bwid,0)
line from Intersect_(Tmp2,L3) to Intersect_(Tmp,Tmp2)
line from Intersect_(Tmp,L4) to Intersect_(Tmp2,Tmp)
-
+] with .sw at last [].se+(0.2,0)
+')
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4
index 34058d91474..5186cb2f5c1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Euro.m4
@@ -1,13 +1,5 @@
-% Euro symbol; process this file as follows:
-% m4 Euro.m4 > Euro.pic; dpic -p Euro.pic > Euro.tex ; latex Euro; dvips Euro
-\documentclass{article}
-\usepackage{pstricks}
-\usepackage{boxdims,xcolor}
-\pagestyle{empty}
-\thispagestyle{empty}
-\begin{document}
-\noindent\vspace{2ex}
.PS
+#Euro.m4
include(pstricks.m4)
gen_init
divert(-1)
@@ -135,4 +127,3 @@ move
euro_symbol(ht=72bp__*2; aspect=1.0; slant=15)
.PE
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Geometry.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Geometry.m4
index ae0a661012d..0cbf4bb4992 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Geometry.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Geometry.m4
@@ -1,11 +1,11 @@
.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
+Fig1: [ ls = 2/3 # local scale
+ A: Here; "A" at A above
+ B: A+(-1*ls,-3.5*ls); "B" at B below rjust
+ C: B+(4.6*ls,0); "C" at C below ljust
AB: line from A to B
BC: line from B to C
CA: line from C to A
@@ -42,5 +42,29 @@ gen_init
line dashed from X to Y chop -linewid/2
RightAngle(A,Z,Y)
+ ]
+
+Fig2: [ ls = 3/4 # local scale
+# https://tex.stackexchange.com/questions/593272/drawing-complex-geometry
+ P: dot(at Here); "P" at P.s below
+ N: dot(at P+(3.5*ls,1.5*ls)); "N" at N.se ljust below
+ O: dot(at (N,P)); "O" at O.s below
+ R: dot(at 1/3 between O and P);"R" at R.s below
+ M: dot(at (R,N)); "M" at M.se ljust below
+ Q: dot(at (M.x,M.y+distance(M,N)/distance(N,O)*distance(P,O)));"Q" at Q.e ljust
+ line from P to Q then to N then to O
+ B: line to P chop -0.3
+ line from M to N
+ Pu: line from R to Q chop 0 chop -0.3
+ H: line from P to N chop 0 chop -0.3
+ X: dot(at Intersect_(Pu,H)); "X" at X.se ljust below
+ thinlines_
+ RightAngle(Q,M,N)
+ RightAngle(Q,N,H.end)
+ RightAngle(N,O,B.start)
+ ArcAngle(N,P,Q,0.4); "$\beta$" at last arc.ne above ljust
+ ArcAngle(O,P,N,0.5); "$\alpha$" at last arc.start+(5bp__,8bp__)
+ ArcAngle(R,Q,N,0.5); "$\alpha$" at last arc.start+(8bp__,-5bp__)
+ ] with .w at Fig1.e+(-0.4,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4
index 4127c8287e2..2cc23290a1c 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4
@@ -29,9 +29,9 @@ define(`dimen_',dimen_*4/5)
# Grid
ifdpic(`linethick_(0.4)',`linethick_(0)')
for i=0 to picwid/g do { line color "lightgray" up picht from (i*g,0) }
- for i=0 to picwid/g by 10 do { sprintf("%g",i) at (i*g,0) below }
+ for i=0 to picwid/g by 10 do { sprintf(tsf(%g),i) at (i*g,0) below }
for i=0 to picht/g do { line color "lightgray" right picwid from (0,i*g) }
- for i=0 to picht/g by 10 do { sprintf("%g",i) at (0, i*g) rjust }
+ for i=0 to picht/g by 10 do { sprintf(tsf(%g),i) at (0, i*g) rjust }
linethick_(0.8)
ifdpic(`
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Inductors.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Inductors.m4
new file mode 100644
index 00000000000..f250a81135b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Inductors.m4
@@ -0,0 +1,47 @@
+.PS
+# inductors.m4
+cct_init
+iflatex(command "{\tt")
+
+movewid = 2 pt__
+hm = 2.05
+vm = 0.4
+{ {I: inductor ; move ;"`{inductor}'" ljust}
+ move right_ hm
+ {inductor(,W); move ;"`{inductor(,W)}'" ljust}
+ move right_ hm
+ {inductor(,L); move ;"`{inductor(,L)}'" ljust}
+}
+
+ move down vm; right_
+{ {inductor(,,3,M) ; move ;"`{...(,,3,M)}'" ljust}
+ move right_ hm
+ {inductor(,W,6,P1); variable; move
+ "`...(,W,6,P1);'" ljust "`variable'" ljust}
+ move right_ hm
+ {inductor(,L,9,K); move ;"`{...(,L,9,K)}'" ljust}
+}
+
+ move down vm; right_
+{ {inductor(,,,M3); addtaps(-,1/2,-dimen_/6); move; `"...(,{,},M3)"' ljust
+ {`"addtaps(-,1/2,-dimen\_/6)"' ljust at (I.start,last ""+(0,-0.2)) }
+ }
+ move right_ hm
+ {ebox(,,,0) ; move ;"`{ebox(,{,},0)}'" ljust}
+ move right_ hm -10bp__
+ {TI: tapped(`ebox(,,,0)',-,1/4,-dimen_/6,3/4,-dimen_/6) ; move ;
+ "`tapped(\char96{}ebox(,{,},0)\char39,'" ljust at Here+(10bp__,-5bp__) \
+ "-,1/4,-dimen\_/6," ljust "3/4,-dimen\_/6)" ljust
+ "\sl Tap1" at TI.Tap1 rjust below
+ "\sl Tap2" at TI.Tap2 ljust below }
+}
+
+ move down vm*5/4; right_
+{ {shielded(`inductor(,,,M)') ; move
+ `"shielded("' ljust `"\char96inductor(,{,},M)\char39)"' ljust
+ move to (3rd last line.start,Here)
+ shielded(`ebox(,,,0)',R) ; move; `"shielded(`ebox(,{,},0)',R)"' ljust }
+}
+
+iflatex(command "}")
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4
index a1b40a8ad03..4bce1b1d378 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Lyap.m4
@@ -7,7 +7,7 @@ viewaz = 30
viewel = 18
setview(viewaz,viewel)
-Origin: project(0,0,0)
+Origin: Project(0,0,0)
# Components of view vector W
w1 = view3D1
w2 = view3D2
@@ -45,20 +45,20 @@ define(`vx',`sum3D(vp(`$1',`$2'),0,0,h+(`$2')^2)')
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))
+ 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))
+ 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))
+ B[i]: Project(vx(theta,c))
+ Bp[i]: Project(vp(theta,c))
}
# trajectory
@@ -74,8 +74,8 @@ define(`defX',` rx = `$5' ; np = np-1
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))
+ `$4'[i]: Project(vx(thx,rx))
+ Xp[np]: Project(vp(thx,rx))
np = np+1
rx = beta*rx
}')
@@ -102,7 +102,7 @@ ifpstricks(`
# Centre axis
thinlines_
-line from Origin to project(0,0,h)
+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
@@ -144,16 +144,16 @@ ifpstricks(`
# Axes and vertical lines
thinlines_
line from X1[0] to Xp[0]
-arrow from Origin to project(1.5,0,0)
+arrow from Origin to Project(1.5,0,0)
"$x_1$" rjust below
-arrow from Origin to project(0,1.5,0)
+arrow from Origin to Project(0,1.5,0)
"$x_2$" 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)
+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)
"$v(X)$" ljust
"`${0}$'" at Origin+(0,1 pt__) below
-"$\Omega$" at project(0,0.9*c,0) above
-"`$v(X) = c$'" at (project(vp(100*dtor_,c)))+(2bp__,0) above ljust
+"$\Omega$" at Project(0,0.9*c,0) above
+"`$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/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile
index cd0500c40c5..4dc00e86f76 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile
@@ -27,50 +27,52 @@
LIBDIR = ..
# The dpic processor:
-PIC = dpic -p
-#PIC = $$HOME/dpic/build/p2c/ftp/dpic -p
-#PIC = $$HOME/dpic/pa*dev/p2c/ftp/dpic -p
-#PIC = $$HOME/dpic/bison/dpic -p
-#PIC = $$HOME/dpic/bi*v/dpic -p
+PIC = dpic
+#PIC = $$HOME/dpic/bisondev/dpic
+#PIC = $$HOME/dpic/bison/dpic
+#PIC = $$HOME/dpic/pascaldev/test/dpic
+#PIC = $$HOME/dpic/pascal/test/dpic
-CONFIGFILE = pstricks.m4
+#MODE = -p
+MODE = -g
-# Testing the mingw version of dpic:
-#PIC = $$HOME/dpic/bison/distsrc/Windows/dpic -p
-#CUSTOM=windows.m4
+#CONF = pstricks.m4
+CONF = pgf.m4
# Uncomment for gpic. Use gpic or pic as applicable on your machine:
-# PIC = gpic -t
-# PIC = pic -t
-# CONFIGFILE = gpic.m4
+# PIC = gpic
+# PIC = pic
+# MODE = -t
+# CONF = gpic.m4
# Convert options
EPSOPTS =
PNGOPTS = -quiet -density 400 -scale 25% -alpha Remove
-# M4 = m4 -B32000
# M4 = m4 -I $(LIBDIR)
# If environment variable M4PATH has been set to the installation directory:
M4 = m4
-#########################################################################
-
DOC = examples
PICS = \
ABlogix.tex Adder.tex Alogix.tex AmpTable.tex Antennas.tex \
- AntiqueClock.tex Audio.tex Bip.tex Btree.tex Buttons.tex Byte.tex \
- CanLogic.tex CctTable.tex Conn.tex Connectors.tex \
+ Audio.tex Bip.tex Btree.tex Buttons.tex Byte.tex \
+ Capacitors.tex CanLogic.tex Chips.tex Conn.tex Connectors.tex \
Contacts.tex Contact.tex control.tex Counting.tex Crossbar.tex Crow.tex \
csc.tex Csource.tex Decoder.tex \
Demultiplexer.tex diamond.tex Dini.tex Diodes.tex Drive.tex Emarrows.tex \
ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex ex08.tex \
ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex ex16.tex ex17.tex ex18.tex \
ex21.tex exp.tex fet.tex Flow.tex Fuses.tex GrayCode.tex graysurf.tex \
- Grounds.tex Headers.tex Heathkit.tex I2L.tex Incleps.tex Jack.tex \
- lcct.tex Lyap.tex Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex \
- Multiplexer.tex NLG.tex NPDT.tex Nport.tex Opamp.tex Optoiso.tex \
- Pconn.tex PushPull.tex pwrsupply.tex Quantum.tex quick.tex random.tex \
- Rectifiers.tex recycle.tex relaycoil.tex Relay.tex rose.tex Rotbox.tex \
+ Grounds.tex Headers.tex Heathkit.tex \
+ I2L.tex Incleps.tex Inductors.tex Jack.tex \
+ lcct.tex Lyap.tex Logic.tex Loglog.tex MC.tex Mixer.tex MoreTable.tex \
+ MotorControl.tex Multiplexer.tex \
+ NLG.tex NPDT.tex Nport.tex Opamp.tex Optoiso.tex \
+ Pconn.tex Plate.tex PushPull.tex pwrsupply.tex \
+ Quantum.tex quick.tex \
+ random.tex Rectifiers.tex recycle.tex relaycoil.tex Relay.tex \
+ Resistors.tex rose.tex Rotbox.tex \
Schottky.tex sfg.tex shapes.tex ShiftR.tex Sierpinski.tex Sixpole.tex \
Sources.tex SQUID.tex Switches.tex \
Tgate.tex Three.tex thyristor.tex \
@@ -80,20 +82,26 @@ PICS = \
# Files that have to be processed twice:
BOXDIMS = ex09.tex Crow.tex Incleps.tex Lyap.tex Loglog.tex Opamp.tex \
random.tex Ttree.tex Windings.tex
-BOXPICS = ex09.pic Crow.pic Incleps.pic Lyap.pic Loglog.pic Opamp.pic \
- random.pic Ttree.pic Windings.pic
-DVIPSOPTS = -Ppdf -G0 -t letter
+#########################################################################
+
DVIPSOPTS = -G0 -t letter
-M4LIBS = $(CONFIGFILE) $(CUSTOM)
DIMFILE = $(DOC).dim
BS = tr '|' '\134'
# Might be needed (change latex commands to $(LTX) )
# LTX = latex --shell-escape
+LTX = pdflatex --shell-escape
+
+PDFLTXSRC=printf "|documentclass[11pt]{standalone}\n\
+|usepackage{times,boxdims,siunitx,amssymb,tikz,geometry}\n\
+|geometry{paperwidth=15in,paperheight=14in,margin=1in}\n\
+|pagestyle{empty}|thispagestyle{empty}\n\
+|begin{document}|noindent|input{"$*".tex}|end{document}\n" | $(BS)
LTXFILE=printf "|documentclass[11pt]{article}\n\
-|usepackage{times,pstricks,boxdims,graphicx,pst-grad,pst-slpe}\n\
+|usepackage[dvipsnames]{xcolor}\n\
+|usepackage{times,boxdims,graphicx,pstricks}\n\
|usepackage{siunitx}\n\
|setlength{|textwidth}{28cm}|setlength{|textheight}{28cm}\n\
|setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\
@@ -101,107 +109,90 @@ LTXFILE=printf "|documentclass[11pt]{article}\n\
|pagestyle{empty}|thispagestyle{empty}\n\
|newbox|graph\n\
|begin{document}\n\
-|noindent|input{"$*".tex}\n\
+|noindent|input{"$*".tex}|box|graph\n\
|end{document}\n" | $(BS)
.SUFFIXES: .ps .dvi .tex .m4 .pic .eps .png .pdf .svg .tif .gif
-.dvi.ps:
- dvips $(DVIPSOPTS) $* -o $*.ps
- chmod 644 $*.ps
-.m4.tex:
- @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim
- $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' \
- | $(PIC) > $*.tex
-# $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' > $*.pic
-# $(PIC) $*.pic > $*.tex
-# grep Production dpic.log >> newp.txt
.m4.pic:
- @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi
- $(M4) $(M4LIBS) $(DIMFILE) $*.m4 > $*.pic
+ @touch $(DIMFILE) F_$*.dim
+ $(M4) $(CONF) $(DIMFILE) F_$*.dim $*.m4 > $*.pic
+.m4.tex:
+ @touch $(DIMFILE) F_$*.dim
+ $(M4) $(CONF) $(DIMFILE) F_$*.dim $*.m4 | $(PIC) $(MODE) > $*.tex
.m4.dvi:
- @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim
- $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' \
- | $(PIC) > $*.tex
- $(LTXFILE) > F_$*.tex
+ @touch $(DIMFILE) F_$*.dim
+ $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex
+ @$(LTXFILE) > F_$*.tex
latex --quiet F_$*
- touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex
+ touch F_$*.dim $(DIMFILE)
+ $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex
latex --quiet F_$*
- touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex
+ mv F_$*.dvi $*.dvi
+ rm -f F_*
+.dvi.ps:
+ dvips $(DVIPSOPTS) $* -o $*.ps
+ chmod 644 $*.ps
+.m4.ps:
+ @touch $(DIMFILE) F_$*.dim
+ $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex
+ @$(LTXFILE) > F_$*.tex
latex --quiet F_$*
+ dvips $(DVIPSOPTS) F_$* -o $*.ps
+ chmod 644 $*.ps
+ rm -f F_*
.m4.eps:
- @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim
- $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' \
- | $(PIC) > $*.tex
- $(LTXFILE) > F_$*.tex
+ @touch $(DIMFILE) F_$*.dim
+ $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex
+ @$(LTXFILE) > F_$*.tex
latex --quiet F_$*
- touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex
- latex --quiet F_$*
- touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make $*.tex
+ $(M4) pstricks.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -p > $*.tex
latex --quiet F_$*
dvips F_$* -T128cm,28cm -o $*.ps
-# dvips -Ppdf F_$* -T128cm,28cm -o $*.ps
# Recent changes to PSTricks(?) have clashed with the use of TeXtoEPS
# so use ps2epsi
ps2epsi $*.ps $*.epsi
sed -e '/%%Pages:/d' -e '/BeginPreview/,$$d' $*.epsi \
| tr '\015' '\012' > $*.eps
sed -e '1,/EndPreview/d' $*.epsi >> $*.eps
-.m4.ps:
- make $*.tex && mv $*.tex test.tex; latex tst
- rm -f test.tex $*.pic
- if test -f tst.dim ; then cp tst.dim F_$*.dim ; fi
- make $*.tex && mv $*.tex test.tex; latex tst
- dvips $(DVIPSOPTS) tst -o $*.ps
- chmod 644 $*.ps
-#.m4.svg:
-# make $*.eps
-# convert $(EPSOPTS) $*.eps $*.svg
+ rm -f F_*
+.m4.pdf:
+ @touch $(DIMFILE) F_$*.dim
+ $(M4) pgf.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -g > $*.tex
+ @$(PDFLTXSRC) > F_$*.tex
+ pdflatex --quiet F_$*
+ $(M4) pgf.m4 $(DIMFILE) F_$*.dim $*.m4 | $(PIC) -g > $*.tex
+ pdflatex --quiet F_$*
+ mv F_$*.pdf $*.pdf
+ rm -f F_*
.m4.png:
- make $*.eps
- convert $(PNGOPTS) $*.eps $*.png
+ make $*.pdf
+ convert $(PNGOPTS) $*.pdf $*.png
@if test -f $*.png.0 ; then mv $*.png.0 $*.png ; fi
+ rm $*.pdf
.m4.gif:
- make $*.ps
- convert $(GIFOPTS) $*.ps $*.gif
-# @if test -f $*.png.0 ; then mv $*.png.0 $*.png ; fi
+ make $*.pdf
+ convert $(GIFOPTS) $*.pdf $*.gif
+ rm $*.pdf
.m4.tif:
- make $*.eps
- convert $(EPSOPTS) $*.eps $*.tif
+ make $*.pdf
+ convert $(EPSOPTS) $*.pdf $*.tif
@if test -f $*.tif.0 ; then mv $*.tif.0 $*.tif ; fi
-.m4.pdf:
- touch F_$*.dim
- $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic
- $(PIC) -g $*.pic > test.tex
- sed -e '/^\\usepackage.*graphicx/s/^.*$$/\\usepackage{tikz}/' \
- -e '/pstricks/d' tst.tex > F_$*.tex
- pdflatex --quiet F_$*
- $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic
- $(PIC) -g $*.pic > test.tex
- pdflatex --quiet F_$*
- mv F_$*.pdf $*.pdf
+ rm $*.pdf
.m4.svg:
- touch F_$*.dim
- $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic
- $(PIC) -g $*.pic > test.tex
- sed -e '/^\\usepackage.*graphicx/s/^.*$$/\\usepackage{tikz}/' \
- -e '/pstricks/d' tst.tex > F_$*.tex
- pdflatex --quiet F_$*
- $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic
- $(PIC) -g $*.pic > test.tex
- pdflatex --quiet F_$*
- mv F_$*.pdf $*.pdf
- pdf2svg $*.pdf $*.svg
- rm -f $*.pdf $*.pic F_$**
+ make $*.pdf
+ dvisvgm --pdf $*.pdf $*.svg
+ rm $*.pdf
+
#########################################################################
-$(DOC).pdf: clean pdfmode $(DOC).frp
+$(DOC).pdf: clean pdfmode $(DOC).tex files.tex header.tex
touch $(DOC).dim
- rm -f $(BOXDIMS) $(BOXPICS)
- make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics
+ make CONF=pgf.m4 MODE=-g DIMFILE=$(DOC).dim pics
+ cp $(LIBDIR)/doc/Version.tex .
pdflatex $(DOC)
- rm -f $(BOXDIMS) $(BOXPICS)
- make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics
+ rm -f $(BOXDIMS) ${BOXDIMS:%.tex=%.pic} $(DOC).pdf
+ make CONF=pgf.m4 MODE=-g DIMFILE=$(DOC).dim $(BOXDIMS)
pdflatex $(DOC)
optpdf $(DOC).pdf
@@ -216,47 +207,48 @@ psmode:
pdfmode:
printf "|usepackage{tikz}\n" | $(BS) > mode.tex
-$(DOC).dvi: $(DOC).frs
+$(DOC).dvi: $(DOC).tex files.tex header.tex psmode
touch $(DOC).dim
- for file in $(BOXDIMS) ; do rm -f $$file.tex $$file.pic ; done
- make PIC="$(PIC)" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics
- latex $(DOC)
- for file in $(BOXDIMS) ; do rm -f $$file.tex $$file.pic ; done
- make PIC="$(PIC)" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics
- latex $(DOC)
-
-$(DOC).frs: $(DOC).tex files.tex header.tex psmode
- make PIC="$(PIC) -p" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics
+ make CONF=pstricks.m4 MODE=-p DIMFILE=$(DOC).dim pics
cp $(LIBDIR)/doc/Version.tex .
latex $(DOC)
- rm -f $(DOC).dvi
- touch $(DOC).frs
-
-$(DOC).frp: $(DOC).tex files.tex header.tex pdfmode
- make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics
- cp $(LIBDIR)/doc/Version.tex .
- pdflatex $(DOC)
- rm -f $(DOC).pdf
- touch $(DOC).frp
+ rm -f $(BOXDIMS) ${BOXDIMS:%.tex=%.pic} $(DOC).dvi
+ make CONF=pstricks.m4 MODE=-p DIMFILE=$(DOC).dim $(BOXDIMS)
+ latex $(DOC)
tst:
- make test.tex; latex tst; rm -f test.tex test.pic
- make DIMFILE=tst.dim test.tex; latex tst
+ @$(LTXFILE) | sed -e 's/{\.tex}/{test.tex}/' > tst.tex
+ make CONF=pstricks.m4 PIC=dpic MODE=-p test.tex; latex --quiet tst
+ rm -f test.tex test.pic
+ make CONF=pstricks.m4 PIC=dpic MODE=-p test.tex; latex --quiet tst
dvips $(DVIPSOPTS) tst -o tst.ps
-tst1: test.tex tst.tex
- latex tst
+tst1:
+ @$(LTXFILE) | sed -e 's/{\.tex}/{test.tex}/' > tst.tex
+ make CONF=pstricks.m4 PIC=dpic MODE=-p test.tex; latex --quiet tst
dvips $(DVIPSOPTS) tst -o tst.ps
-gtst:
- touch test.m4; make PIC="gpic -t" CONFIGFILE="" tst
+tikz:
+ @$(LTXFILE) | sed -e 's/{\.tex}/{test.tex}/' -e 's/pstricks/tikz/' > tst.tex
+ make CONF=pgf.m4 PIC=dpic MODE=-g test.tex; latex --quiet tst
+ dvips $(DVIPSOPTS) tst -o tst.ps
-gtst1:
- touch test.m4; make PIC="gpic -t" CONFIGFILE="" tst1
+gpic:
+ @$(LTXFILE) | sed -e 's/{\.tex}/{test.tex}/' > tst.tex
+ rm -f test.tex test.pic
+ make CONF=gpic.m4 PIC=pic MODE=-t test.tex; latex --quiet tst
+ dvips $(DVIPSOPTS) tst -o tst.ps
echopics:
@echo $(PICS)
+testall:
+ (cd mf; make)
+ (cd mpost; make)
+ (cd psfrag; make)
+ (cd svg; make)
+ (cd xfig; make)
+
clobber: clean
rm -f *.ps
-@for dir in mf mpost pdflatex xfig psfrag svg dev test; \
@@ -270,16 +262,16 @@ clobber: clean
for file in `ls *.tex` ; do \
nm=`echo $$file | sed -e "s/\(.*\)\.tex/\1/"` ; \
if test -s $$nm.m4 ; then rm -f $$nm.pic $$nm.tex ; fi ; done
- @if test -f distmakefile ; then make -f distmakefile clobber ; fi
+# @if test -f distmakefile ; then make -f distmakefile clobber ; fi
clean:
@printf "\n examples clean:\n"
rm -f core boxdims.tar.gz pics
rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.tif *.epsi eps *-mfpic* *.svg
rm -f fig*.tex $(PICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig
- rm -f *.dim *.bak *.frs *.frp $(RPICS) rotate.ps tst.ps *.bbl *-pics.ps
+ rm -f *.dim *.bak rotate.ps tst.ps *.bbl *-pics.ps
rm -f *.tfm *[0-9]pk *.png *.1 *.gif
rm -f F_* Version.tex *stackdump *.ico
rm -rf distfile distfile.tar.gz mode.tex
@printf "\n"
- @if test -f distmakefile ; then make -f distmakefile clean ; fi
+# @if test -f distmakefile ; then make -f distmakefile clean ; fi
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4
new file mode 100644
index 00000000000..bfc41113c17
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/MoreTable.m4
@@ -0,0 +1,36 @@
+.PS
+# MoreTable.m4
+cct_init
+
+movewid = 2 pt__
+hm = 2.05
+vm = 0.28
+{ {memristor ; move;"`{\tt memristor}'" ljust}
+ move right_ hm
+ {heater; move;"`{\tt heater}'" ljust}
+ move right_ hm
+ {tline ; move;"`{\tt tline}'" ljust}
+}
+ move down 0.25; right_
+{ {pvcell ; move;"`{\tt pvcell}'" ljust}
+ move right_ hm
+ {reed ; move ;"`{\tt reed}'" ljust}
+ move right_ hm
+ {reed(,,,fill_(0.9),CR) ; move ; "`{\tt reed(,{,},fill\_(0.9),CR)}'" ljust}
+}
+ move down 0.25; right_
+{ {gap ; move ;"`{\tt gap}'" ljust}
+ move right_ hm
+ {gap(,,A) ; move ;"`{\tt gap(,{,}A)}'" ljust}
+ move right_ hm
+ {arrowline ; move;"`{\tt arrowline}'" ljust}
+}
+ move down 0.25; right_
+{ move down 0.10; right; {lamp ; move;"`{\tt lamp}'" ljust}
+ move right_ hm
+ {thermocouple ; move;"`{\tt thermocouple}'" ljust }
+# move up 0.10 right_ hm
+# {arrester ; move ;"`{\tt arrester}'" ljust}
+}
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4
index c49bacbc7ca..ef85d279353 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Orbits.m4
@@ -10,7 +10,7 @@ NeedDpicTools
define(`orbitpos',
`rot3Dx((`$2')*dtor_,rot3Dz((`$1')*dtor_,rot3Dy(-(`$4')*dtor_,`$3',0,0)))')
-define(`PO',`B.C+(project(orbitpos(orbitlong,orbitlat,orbitrad,`$1')))')
+define(`PO',`B.C+(Project(orbitpos(orbitlong,orbitlat,orbitrad,`$1')))')
define vis { X: PO($1)
if (distance(X,B.C)>crad) || \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Planes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Planes.m4
index 726af31c567..b9d0579c691 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Planes.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Planes.m4
@@ -77,10 +77,10 @@ ifelse(1,1,`
# Recover the 4th corner and draw
define(`drawfacet',`
- NW_facet: project(xyz(($1)*3))
- NE_facet: project(xyz(($1)*3+1))
- SE_facet: project(xyz(($1)*3+2))
- SW_facet: project(x[($1)*3+2],y[($1)*3],z[($1)*3])
+ NW_facet: Project(xyz(($1)*3))
+ NE_facet: Project(xyz(($1)*3+1))
+ SE_facet: Project(xyz(($1)*3+2))
+ SW_facet: Project(x[($1)*3+2],y[($1)*3],z[($1)*3])
shd = 1-($2)^4
line from SW_facet to SE_facet then to NE_facet \
then to NW_facet then to SW_facet shaded rgbstring(shd,shd,shd)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4
index 84cc6bcda63..0700f072a02 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Y14-5SVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Plate.m4
@@ -1,10 +1,11 @@
.PS
+# Plate.m4
# 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)
+include(ASME_Y14-5.m4)
ifsvg(`svg_font(sans-serif,10bp__)',
`textht = 10bp__*2/3
iflatex(`command "{\sf"')')
@@ -156,7 +157,7 @@ thinlines_
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)
+ 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
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples b/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples
index 5561e4d3fc1..c74c92c274e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/README-examples
@@ -31,7 +31,7 @@ the boxdim macro is being used. If you only need to process once, type
To use tikz and pdflatex to produce test.pdf, type "make test.pdf" as above.
To test and debug a single diagram in a different directory, copy Makefile
-and tst.tex to where you want to work, adjust the definition of LIBDIR
+to where you want to work, adjust the definition of LIBDIR
in Makefile if environment variable M4PATH has not been defined, and type
one of the above commands.
@@ -40,7 +40,7 @@ To use PSTricks instead, type "make clean; make examples.ps".
To process the diagrams using TikZ PGF for processing either by LaTeX or
PDFlatex, type "make" or "make examplespgf.ps" in the pgf subdirectory.
-There are often several methods of producing similar graphical results,
+There are often several methods for producing similar graphical results,
particularly of text labels. Some of the diagrams in this directory are
slightly more complicated than required for Tikz or PSTricks in order
that they will work with other postprocessors. Dpic output that does
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4
new file mode 100644
index 00000000000..6e79c919668
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Resistors.m4
@@ -0,0 +1,30 @@
+.PS
+# Resistors.m4
+cct_init
+
+movewid = 2 pt__
+hm = 2.05
+vm = 0.28
+{ {resistor ; move ;"`{\tt resistor}'" ljust}
+ move right_ hm
+ {resistor(,,Q) ; move ;"`\tt resistor(,{,}Q) '" ljust}
+ move right_ hm
+ {resistor(,,E) ; move
+ "`\shortstack[l]{\tt resistor(,{,}E)\\ {\tt $\equiv$ ebox}}'" ljust}
+}
+ move down vm; right_
+{ {resistor(,,ES) ; move ;"`\tt resistor(,{,}ES) '" ljust}
+ move right_ hm
+ {resistor(,,H) ; move ;"`\tt resistor(,{,}H) '" ljust}
+ move right_ hm
+ {ebox(,,,0.5) ; move ;"`{\tt ebox(,{,},0.5)}'" ljust}
+}
+ move down vm; right_
+{ {resistor(,,V) ; move ;"`{\tt resistor(,{,}V)}'" ljust}
+ move right_ hm
+ {ebox(,0.5,0.3) ; move ;"`{\tt ebox(,0.5,0.3)}'" ljust}
+ move right_ hm+4bp__
+ {resistor(,,B) ; move movewid-4bp__ ;"`{\tt resistor(,,B)}'" ljust}
+}
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/control.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/control.m4
index 62d92291acd..400b8873ac9 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/control.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/control.m4
@@ -30,6 +30,81 @@ S1: circle
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+# https://tex.stackexchange.com/questions/575592/how-to-create-a-controls-system-diagram
+Observer: [
+ define(`thickarrow',`arrow thick 3 wid 7bp__')
+ define(`thickline',`line thick 3')
+ fillval = 0.6
+ boxwid = 0.3
+ boxht = 0.4
+ circlerad = 0.1
+ {"$r$" above ljust}
+R: arrow
+S: circle fill
+ {"$-$" below ljust at S.s; "$+$" above rjust at S.w+(2bp__,0)}
+{ OLP: box invis fill 0.9 wid 3.1 ht 1.4 with .nw at Here+(0.3,boxht*5/4)
+ "\sf plant" at OLP.nw below ljust }
+U: arrow right 0.4
+ {"$u$" at last arrow+(2bp__,0) above }
+Bp: box fill "$B$"
+ thickarrow right 0.4
+Sp: circle fill
+ {"$\;+$" below ljust at Sp.s; "$+$" above rjust at Sp.w+(2bp__,2bp__)}
+ thickarrow right 0.4
+ {"`$\dot{\mathbf x}$'" at last arrow + (0,7bp__)}
+Ip: box fill "$I/s$"
+ thickarrow right 1
+ {"$\mathbf x$" at last arrow + (0,7bp__) }
+Cp: box fill "$C$"
+# print Cp.e.x - Bp.w.x + 0.2
+ thickline right 0.4
+Yp: thickarrow
+ {"$\mathbf y$" at last arrow + (0,7bp__) }
+Ap: box fill "$A$" with .n at Ip.s+(0,-boxht/2)
+ thickarrow <- from Ap.e right 0.4 then up Ip.y-Ap.y
+ thickarrow from Ap.w to (Sp,Ap) then to Sp.s
+# print OLP.n.y-Ap.s.y+0.1
+#
+K: box fill "$K$" at Ap + (0,-boxht*3/2)
+ arrow from K.w to (S,K) then to S.s
+ {OBS: box invis fill 0.9 wid 4.3 ht 1.8 with .nw at (S.w,K.s)-(0.1,0.1)
+ "\sf observer" at OBS.sw ljust above }
+Io: box fill "$I/s$" at K + (0,-boxht*3/2)
+ thickarrow <- from Io.w left 0.4
+ {"`$\dot{\hat{\mathbf x}}$'" at last arrow + (0,7bp__)}
+Sxo: circle fill
+ {"$\;+$" below ljust at Sxo.s; "$+$" above rjust at Sxo.w+(2bp__,2bp__)}
+ thickarrow <- left 0.4
+SLo: circle fill
+ {"$\;+$" below ljust at SLo.s; "$+$" above rjust at SLo.w+(2bp__,2bp__)}
+ thickarrow <- left 0.4
+Bo: box fill "$B$"
+ arrow from 1/4 between U.start and U.end up boxht \
+ then left 2*boxht then down Bp.y-Bo.y+boxht then to Bo.w
+Ao: box fill "$A$" with .n at Io.s+(0,-boxht/2)
+ thickline from Io.e right 0.4
+ {thickarrow <-> from K.e to (Here,K.e) then to (Here,Ao) then to Ao.e
+ thickarrow from Ao.w to (Sxo,Ao.w) then to Sxo.s }
+Xhat: Here
+Co: box fill "$C$" at (Cp,Here)
+ thickarrow right 0.4
+ {"$\hat{\mathbf y}$" at last arrow + (0,7bp__) }
+ { thickarrow from Xhat to Co.w }
+ {"$\hat{\mathbf x}$" at last arrow + (0,7bp__) }
+Syo: circle fill
+ {"$\;+$" above ljust at Syo.n; "$-$" below rjust at Syo.w+(2bp__,-2bp__)}
+ thickarrow <- from Syo.n to (Syo,Cp)
+Lo: box fill "$L$" with .n at Ao.s+(0,-boxht/2)
+# print Io.n.y+0.1 - (Lo.s.y-0.1)
+ thickarrow from Syo.s down Syo.s.y-Lo.y then to Lo.e
+ thickarrow from Lo.w to (SLo,Lo.w) then to SLo.s
+] with .nw at last [].sw+(0,-0.3)
+ "(b) Single-input plant with feedback from a full-order observer" \
+ below ljust at Observer.sw+(0,-5pt__)
+
+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+
+ifelse(0,1,`
Observer: [ {"$r$" above ljust}
arrow
S: circle
@@ -53,13 +128,14 @@ Plant: box wid boxwid*3/2 ht boxht*5/4 \
move to last arrow.c
line to (Here, 1/4<Obs.se,Obs.ne>)
arrow to (Obs.e,Here)
-] with .nw at PID.sw+(0,-0.5)
- "(b) Output feedback with a full-order observer" below ljust \
- at Observer.sw+(0,-5pt__)
+] with .nw at last [].sw+(0,-0.5)
+')
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+ifelse(1,1,`
Multiblock: [
+boxht = 0.4
boxwid = boxht
circlerad = boxht*0.4
@@ -95,8 +171,9 @@ Rf: doublebox(R_2,R_3) at ((S1.x+T.x)/2,T.y-boxht*3/2)
arrow from T to (T,Rf) then to Rf.e
arrow from Rf.w to (S1,Rf) then to S1.s
"$n_2$" at S1.s+(0,-boxht/2) ljust
-] with .nw at Observer.sw + (0,-0.5)
+] with .nw at Observer.sw + (0,-0.3)
"(c) A multiblock example" below ljust at Multiblock.sw+(0,-5pt__)
+')
# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
@@ -128,15 +205,15 @@ G: box "plant" "$G$"
"$-$" at Here + (-0.15,-0.1)
arrow <- down from R.s
"$W$ control input" at Here - (0,0.1)
-
UL:R.nw +(-boxht/2,boxht/2)
UR:(D.e,UL) + (0.1,0)
line dashed from UL to UR then to (UR,G.s+(0,-boxht*3/2))
line dashed to (Gh.w,Here) "Controller" above
line dashed to (Here,Gh.s+(0,-boxht/2))
line dashed to (UL,Here) then to UL
-] with .nw at Multiblock.sw + (0,-0.5)
- "(d) Nonlinear feedforward (for performance) and small-signal feedback (for stability)" \
- below ljust at Nonlinear.sw+(0,-5pt__)
+] with .nw at last [].sw + (0,-0.2)
+ "(d) Nonlinear feedforward (for performance) and small-signal feedback
+ (for stability)" below ljust at Nonlinear.sw+(0,-5pt__)
+#print PID.n.y - Nonlinear.s.y
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/csc.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/csc.m4
index 6fc3be88ba8..69b8d20c3c1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/csc.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/csc.m4
@@ -1,12 +1,15 @@
-ifelse(ifpstricks(T)`'ifmpost(T)`'ifpostscript(T)`'ifpgf(T),,
- `PSTricks, MetaPost, PGF, or Postscript required for this diagram',`dnl
-.PS 3.5
+.PS
+#.PS 3.5
# csc.m4
gen_init
+NeedDpicTools
+ifelse(ifpstricks(T)`'ifmpost(T)`'ifpostscript(T)`'ifpgf(T),,
+ `PSTricks, MetaPost, PGF, or Postscript required for this diagram',`
-circlerad=1.91
-hubrad=0.10
-s=0.5
+skale = 3.5/3.97*0.9955
+circlerad=1.91*skale
+hubrad=0.10*skale
+s=0.5*skale
define(`midnight',`0.1, 0.1, 0.44')
define(`white',`1, 1, 1')
@@ -18,7 +21,7 @@ define(`lwid',1)
define(`coord',`(s*(`$1'),s*(`$2'))')
# Circle and spokes
-# [
+CSC: [
rgbdraw(midnight,
linethick=`0.'eval(lwid*15)/(1pt__)
{circle with .c at Here
@@ -72,5 +75,156 @@ rgbdraw(midnight,
line to coord(-2.2,-2.05) then to coord(2.1,-1.75)
spline to coord(-1,-2.08) then to coord(0.55,-1.77)
)
-# ] with .sw at 1,1
-.PE')
+ ]
+')
+# PSTricks or tikz only:
+ifelse(ifpstricks(T)`'ifpgf(T),T,`
+Clock: [
+#.PS
+# AntiqueClock.m4
+#gen_init
+#NeedDpicTools
+
+iflatex(`latexcommand({\sf)')
+
+# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals
+
+# `hms2deg(hr,min,sec) hr:min:sec to degrees
+# blank arg1: degrees for minute hand
+# blank arg1 and arg2: degrees for second hand'
+define(`hms2deg',`ifelse(`$1',,
+ `ifelse(`$2',,
+ `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)',
+ `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')',
+ `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl
+ pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')')
+
+# `SecondHand(length,hr,min,sec)'
+define(`SecondHand',`[ shsf = (`$1')/3.2
+ C: Here
+ { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) }
+ line thick 8*shsf to rvec_(`$1',0)
+ ]')
+
+# `AntiqueMinuteHand(length,hr,min,sec)'
+define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84
+ L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4'))))
+ C: circle fill_(0) diam 0.47*mhsf at L.start
+ move to C
+ spline from rvec_(0,0.047*mhsf) \
+ to rvec_(1.65*mhsf,0.11*mhsf) \
+ then to rvec_(`$1',0.018*mhsf) \
+ then to rvec_(`$1',-0.018*mhsf) \
+ then to rvec_(1.65*mhsf,-0.11*mhsf) \
+ then to rvec_(0,-0.047*mhsf) \
+ shaded rgbstring(0,0,0)
+ ]')
+
+# `AntiqueHourHand(length,hr,min,sec)'
+define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2
+ L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4'))))
+ C: circle fill_(0) diam 0.6*hhsf at L.start
+ move to C
+ v = 0.25*hhsf
+ { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf }
+ { C1: circle rad v at rvec_(1.25*hhsf,0) fill_(0) }
+ d = `$1'-1.25*hhsf
+ q = 1bp__*hhsf
+ r1 = (d^2 + q^2 - v^2)/(v-q)/2
+ h = r1+v
+ shade(0,
+ arc ccw from C1+vec_(d/h*v,(r1+q)/h*v) to \
+ C1+vec_(d,q) rad r1 with .c at C1+vec_(d,r1+q)
+ arc ccw from C1+vec_(d,-q) to C1+vec_(d/h*v,-(r1+q)/h*v) rad r1 \
+ with .c at C1+vec_(d,-r1-q))
+ ]')
+
+define(`AntiqueClock',`[ # h,m,s,diam
+# Clock size parameters:
+ hour = ifelse(`$1',,3,`$1')
+ minute = ifelse(`$2',,41,`$2')
+ 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
+ r4 = r3 - 0.35*skale
+ r5 = r4 - 0.17*skale
+ r6 = r5 - 0.63*skale
+ r7 = r6 - 0.17*skale
+ shadelinethick = 1.0
+
+C: circle thick 0.2 rad r1
+
+define shadeline {
+ s = 1-($`'1)*2
+ v = r*s
+ h = sqrt(r^2-v^2)
+ t = 1-abs(s)
+ line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \
+ thick shadelinethick outlined rgbstring(t,t,t)
+ }
+
+ r = r1 # Bezel outer
+ nlines = int(2*r/(shadelinethick pt__)*1.1)
+ cost = cosd(10); sint = sind(10);
+ ShadeObject(shadeline,nlines, 0, 0,0,0, 0.5, 1,1,1, 1, 0,0,0 ) at C
+
+ r = r2 # Bezel inner
+ nlines = int(2*r/(shadelinethick pt__)*1.1)
+ cost = cosd(-10); sint = sind(-10);
+ ShadeObject(shadeline,nlines, 0, 0,0,0, 0.25, 0.8,0.8,0.8, 0.5, 1,1,1,
+ 0.75, 0.8,0.8,0.8, 1, 0,0,0 ) at C
+
+# Clock face
+Face: circle thick 0 fill_(1) rad r3 at C
+ circle rad r4 at C
+ circle rad r5 at C
+ circle rad r6 at C
+ circle rad r7 at C
+
+# Text rotation for PSTricks or TikZ
+ define(`rottext',
+ `ifpstricks(`\rput[c]{%g}(0,0)',`ifpgf(`\pgftext[rotate=%g]',%g)')')
+# Outer numbers
+ command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4)
+ for mn = -15 to 15 by 5 do { sprintf("rottext{\outerfont %g}",\
+ -mn/60*360,pmod(mn,60)) at C+(Rect_((r3+r4)/2,90-mn/60*360)) }
+ for mn = 20 to 40 by 5 do { sprintf("rottext{\outerfont %g}",\
+ 180-mn/60*360,mn) at C+(Rect_((r3+r4)/2,90-mn/60*360)) }
+# Outer tics
+ for mn = 1 to 60 do { t = 90-mn/60*360
+ line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) }
+
+# Inner numbers
+ command sprintf("\font\innerfont=cmss12 at %4.2fin",r5-r6)
+ Loopover_(`mx',`t = (m4Lx-4)/12*360;
+ sprintf("rottext{\scalebox{0.7}[1.0]{\innerfont mx}}",-t) \
+ at C+(Rect_((r5+r6)/2,90-t))', IX,X,XI,XII,I,II,III)
+ Loopover_(`mx',`t = (m4Lx+3)/12*360;
+ sprintf("rottext{\scalebox{0.7}[1.0]{\innerfont mx}}",-t+180) \
+ at C+(Rect_((r5+r6)/2,90-t))', IV,V,VI,VII,VIII)
+
+# Inner tics
+ for mn = 5 to 60 by 5 do { t = 90-mn/60*360
+ line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) }
+
+# Hands
+ AntiqueHourHand(r6,hour,minute,second) with .C at C
+ AntiqueMinuteHand(r5,hour,minute,second) with .C at C
+ SecondHand((r3+r4)/2,hour,minute,second) with .C at C
+
+# Center
+ dot(at C,0.1/4*r1,1)
+ ]')
+
+ Clock1: AntiqueClock(,,,3.5)
+# Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0)
+
+ iflatex(`latexcommand(}%)')
+
+
+#.PE
+ ] with .sw at last [].se+(0.25,0)
+',` "AntiqueClock.m4 requires pstricks or pgf" ')
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf
index e658c456a03..300ab4abed0 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex
index 720e78861fc..2b252a4e186 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex
@@ -2,7 +2,6 @@
\documentclass[11pt]{article}
\usepackage{times}
-%\usepackage{pstricks,pst-grad}
\input mode
\usepackage{rotating}
\usepackage{graphicx}
@@ -22,24 +21,22 @@
\hfill\break
This is a collection of diagrams the author has had occasion to produce
- using m4 circuit macros and others, and gpic or dpic. In some cases
- there are other or better m4 or pic constructs for producing the
- same drawings, but the source-file names are shown for reference.
- Most of the examples can be processed using either dpic~-p, dpic~-g,
- or gpic~-t, but the possibility of other postprocessing has meant that
+ using m4 circuit macros and others, and dpic or gpic. In some cases
+ there are other or better m4 or pic constructs for producing the same
+ drawings, but names of the actual source-files are shown for reference.
+ Some of the later examples test the boundaries of what can be done
+ when employing a ``little language'' like pic. Most of the examples
+ can be processed using either dpic~-p, dpic~-g, or, with exceptions,
+ gpic~-t, but the possibility of other postprocessing has meant that
sometimes the source is slightly more complicated than it would be if
- only one workflow had been assumed. Some of the examples require dpic.
- The most simplicity and elegance is achieved by sticking to one pic
- interpreter and one postprocessor.
+ only one workflow had been assumed. The most simplicity and elegance
+ is achieved by sticking to one pic interpreter and one postprocessor.
This document duplicates a few diagrams from the manual
Circuit\_macros.pdf. There are also a few files in the
examples directory that are not included in this document. To process
{\sl file}.m4, for example, type "make {\sl file}.pdf."
-% Some of the boundaries of what macros and the pic language can do are
-% tested toward the end of the following examples.
-
\input files
\endinput
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/exp.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/exp.m4
index c518eb9bcfe..abcde1c751d 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/exp.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/exp.m4
@@ -32,37 +32,37 @@ arad = 0.6*g
define(`D3',`0.3*g,0.6*g,0.9*g')
# fixed coordinate frame
-O: project(O3)
-X: project(X0)
-Y: project(Y0)
+O: Project(O3)
+X: Project(X0)
+Y: Project(Y0)
Fector(X0,Z0) with .Origin at O ; "$x_0$" at X rjust
Fector(Y0,Z0) with .Origin at O ; "$y_0$" at Y ljust below
- Fector(Z0,Y0) with .Origin at O ; "`$z_0$'" at project(Z0) above
+ Fector(Z0,Y0) with .Origin at O ; "`$z_0$'" at Project(Z0) above
define(`R01',`rot3Dz(pazim,rot3Dy(-pelev,$1,$2,$3))')
define(`R10',`rot3Dy(pelev,rot3Dz(-pazim,$1,$2,$3))')
thinlines_ ; psset_(linecolor=gray)
- line from O to project(rot3Dz(pazim,axlen,0,0))
+ line from O to Project(rot3Dz(pazim,axlen,0,0))
psset_(linecolor=black)
- arc -> ccw from project(arad,0,0) to project(rot3Dz(pazim,arad,0,0)) rad arad
+ arc -> ccw from Project(arad,0,0) to Project(rot3Dz(pazim,arad,0,0)) rad arad
"$\theta$" below
up_
- arc -> cw from project(rot3Dz(pazim,arad,0,0)) \
- to project(R01(arad,0,0)) rad arad
- "$\phi$" rjust at project(rot3Dz(pazim,rot3Dy(-pelev/2,arad,0,0)))
- arc -> from project(0,arad,0) to project(R01(0,arad,0)) rad arad
+ arc -> cw from Project(rot3Dz(pazim,arad,0,0)) \
+ to Project(R01(arad,0,0)) rad arad
+ "$\phi$" rjust at Project(rot3Dz(pazim,rot3Dy(-pelev/2,arad,0,0)))
+ arc -> from Project(0,arad,0) to Project(R01(0,arad,0)) rad arad
"$\theta$" above
right_
- arc -> cw from project(0,0,arad/2) to project(R01(0,0,arad/2)) rad arad/2
+ arc -> cw from Project(0,0,arad/2) to Project(R01(0,0,arad/2)) rad arad/2
"$\phi$" ljust at Here+(-1pt__,-3pt__)
Fector(R01(X0),R01(Z0)) with .Origin at O ;
- "$x_1$" above rjust at project(R01(X0))
+ "$x_1$" above rjust at Project(R01(X0))
Fector(R01(Y0),R01(Z0)) with .Origin at O ;
- "$y_1$" ljust at project(R01(Y0))
+ "$y_1$" ljust at Project(R01(Y0))
Fector(R01(Z0),R01(Y0)) with .Origin at O ;
- "$z_1$" above at project(R01(Z0))
+ "$z_1$" above at Project(R01(Z0))
thicklines_
# box object dimension
@@ -72,23 +72,23 @@ h = 0.20*g
# box object corners
define(`B0',`D3')
-define(`B1',`sum3D(D3,d,0,0)') PB1: project(B1)
-define(`B2',`sum3D(D3,d,b,0)') PB2: project(B2)
-define(`B3',`sum3D(D3,0,b,0)') PB3: project(B3)
-define(`B4',`sum3D(D3,0,0,h)') PB4: project(B4)
-define(`B5',`sum3D(D3,d,0,h)') PB5: project(B5)
-define(`B6',`sum3D(D3,d,b,h)') PB6: project(B6)
-define(`B7',`sum3D(D3,0,b,h)') PB7: project(B7)
+define(`B1',`sum3D(D3,d,0,0)') PB1: Project(B1)
+define(`B2',`sum3D(D3,d,b,0)') PB2: Project(B2)
+define(`B3',`sum3D(D3,0,b,0)') PB3: Project(B3)
+define(`B4',`sum3D(D3,0,0,h)') PB4: Project(B4)
+define(`B5',`sum3D(D3,d,0,h)') PB5: Project(B5)
+define(`B6',`sum3D(D3,d,b,h)') PB6: Project(B6)
+define(`B7',`sum3D(D3,0,b,h)') PB7: Project(B7)
# projected corners
-P0:project(R01(0,dcosine3D(2,R10(B0)),dcosine3D(3,R10(B0))))
-P1:project(R01(0,dcosine3D(2,R10(B1)),dcosine3D(3,R10(B1))))
-P2:project(R01(0,dcosine3D(2,R10(B2)),dcosine3D(3,R10(B2))))
-P3:project(R01(0,dcosine3D(2,R10(B3)),dcosine3D(3,R10(B3))))
-P4:project(R01(0,dcosine3D(2,R10(B4)),dcosine3D(3,R10(B4))))
-P5:project(R01(0,dcosine3D(2,R10(B5)),dcosine3D(3,R10(B5))))
-P6:project(R01(0,dcosine3D(2,R10(B6)),dcosine3D(3,R10(B6))))
-P7:project(R01(0,dcosine3D(2,R10(B7)),dcosine3D(3,R10(B7))))
+P0:Project(R01(0,dcosine3D(2,R10(B0)),dcosine3D(3,R10(B0))))
+P1:Project(R01(0,dcosine3D(2,R10(B1)),dcosine3D(3,R10(B1))))
+P2:Project(R01(0,dcosine3D(2,R10(B2)),dcosine3D(3,R10(B2))))
+P3:Project(R01(0,dcosine3D(2,R10(B3)),dcosine3D(3,R10(B3))))
+P4:Project(R01(0,dcosine3D(2,R10(B4)),dcosine3D(3,R10(B4))))
+P5:Project(R01(0,dcosine3D(2,R10(B5)),dcosine3D(3,R10(B5))))
+P6:Project(R01(0,dcosine3D(2,R10(B6)),dcosine3D(3,R10(B6))))
+P7:Project(R01(0,dcosine3D(2,R10(B7)),dcosine3D(3,R10(B7))))
thinlines_
line from PB1 to P1
line from PB2 to P2
@@ -134,24 +134,24 @@ thicklines_
alpha = rectht/3
# # Rectangle
- NW: project(-rectht/2,-rectwid*0.25,0)
- SW: project( rectht/2,-rectwid*0.25,0)
- SE: project( rectht/2, rectwid*0.75,0)
- NE: project(-rectht/2, rectwid*0.75,0)
+ NW: Project(-rectht/2,-rectwid*0.25,0)
+ SW: Project( rectht/2,-rectwid*0.25,0)
+ SE: Project( rectht/2, rectwid*0.75,0)
+ NE: Project(-rectht/2, rectwid*0.75,0)
ShadedPolygon(NW:NE:SE:SW,,-90,
0,0.25,0.25,0.25,
1,1,1,1) with .Start at NW
define(`C3D',`0,0,alpha') # Centre of the sphere
- C: project(C3D)
+ C: Project(C3D)
# # Shaded sphere using PSTricks or tikz:
# # this is black magic but PSTricks
# # seems to give more control
# ifpstricks(
# `Highlight: \
-# project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0))))
+# Project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0))))
# command "\pscustom[fillstyle=gradient,gradmidpoint=0.0,%"
# command sprintf("gradbegin=gray,gradend=white,gradlines=%g,%%",alpha*200)
# command "GradientCircle=true,GradientScale=1.5,%"
@@ -174,15 +174,15 @@ thicklines_
"$\alpha$" at 0.5<S,C> ljust
define(`N3D',`0,0,2*alpha') # North pole
- N: project(N3D)
+ N: Project(N3D)
"$N$" at N+(0,3pt__) ljust
phi = 65*dtor_
define(`Phat3D',`rot3Dz(phi,alpha*3,0,0)')
- Phat: "$\hat{P}$" at project(Phat3D) ljust
+ Phat: "$\hat{P}$" at Project(Phat3D) ljust
- X: project(rectht/2*0.8,0,0)
- Y: project(0,rectwid/2*0.8,0)
+ X: Project(rectht/2*0.8,0,0)
+ Y: Project(0,rectwid/2*0.8,0)
`define' linevis { # ratio # Visibility function for lines fom S to Tmp
Tlv: $1 between S and Tmp
@@ -202,8 +202,8 @@ thinlines_ # axes
arrow up alpha*0.5 chop 0.05 chop 0 ; "$z$" above
invisline(Phat)
line to Phat chop 0.05 chop 0
- arc ccw -> rad alpha from project(alpha/2,0,0) to \
- project(rot3Dz(phi,alpha/2,0,0))
+ arc ccw -> rad alpha from Project(alpha/2,0,0) to \
+ Project(rot3Dz(phi,alpha/2,0,0))
"$\phi$" below at 0.5 between last arc.start and last arc.end
# vector (ratio along (N to Phat))
@@ -212,7 +212,7 @@ define(`ray',`sum3D(N3D,sprod3D($1,diff3D(Phat3D,N3D)))')
$2 = length3D(diff3D(ray($1),C3D))-alpha }
findroot(rayvis, 1e-3, 1, 1e-8, p) # Find P
- P: "$P$" at project(ray(p)) ljust above
+ P: "$P$" at Project(ray(p)) ljust above
thicklines_
line dashed from N to P chop 0 chop 0.05
@@ -226,11 +226,11 @@ thinlines_ # Draw the meridian
findroot(meridianvis, 0, pi_, 1e-8, y)
n = 0
for ang = y-pi_ to y by pi_/20 do {
- Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 }
fitcurve(Q,n-1)
n = 0
for ang = y to y+pi_ by pi_/20 do {
- Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 }
fitcurve(Q,n-1,dashed)
define(`equator',`rot3Dz($1,alpha,0,0)')
@@ -240,15 +240,15 @@ define(`equator',`rot3Dz($1,alpha,0,0)')
findroot(equatorvis, 0, pi_, 1e-8, y)
n = 0
for ang = y-pi_ to y by pi_/20 do {
- Q[n]: project(sum3D(C3D,equator(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 }
fitcurve(Q,n-1)
n = 0
for ang = y to y+pi_ by pi_/20 do {
- Q[n]: project(sum3D(C3D,equator(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 }
fitcurve(Q,n-1,dashed)
line dashed from C to P # beta
- line dashed from C to project(sum3D(C3D,equator(phi)))
+ line dashed from C to Project(sum3D(C3D,equator(phi)))
arc ccw -> from 0.6 along_(last line) to 0.6 between C and P
"$\beta$" ljust at last arc.e+(0,2pt__)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4
index 08498ef83d8..9cbd0809ce3 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4
@@ -2,10 +2,8 @@
# `fet.m4'
cct_init
-dwn = 0.9
-dwn = 1.0
-rgt = 0.9
textht = 0.1
+define(`rmove',0.75)
dnl `IRF4905(linespec,R)'
define(`IRF4905',
@@ -18,74 +16,84 @@ define(`IRF4905',
G: Q.G
circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')
-define(`rmove',0.75)
-define(`dir_',`right_')
-
-Orig: Here
-dir_
- { move left 0.2 }
- {J: j_fet(right_ dimen_,,,E)
- "{\tt j\_fet(right\_ dimen\_,{,},E)}" wid 1.75 \
- with .nw at last [].sw+(0.0,-0.25)
- "$G$" at last [].G rjust above
- "$S$" at last [].S rjust
- "$D$" at last [].D ljust
- }
-
- move right_ 0.9; dir_
- {j_fet(,,P,)
- "{\tt j\_fet(,{,}P,)}" at last [].s+(0,-0.05) below
- "$G$" at last [].G rjust
- "$S$" at last [].S rjust
- "$D$" at last [].D ljust
- }
-
- move right_ 0.9; dir_
- {e_fet(,R,,)
- "{\tt e\_fet(,R,{,})}" at last [].s+(0,-0.05) below
- "$G$" at last [].G rjust
- "$S$" at last [].S rjust
- "$D$" at last [].D ljust
- }
-
- {move down_ dwn; dir_
- e_fet(,,P)
- "{\tt e\_fet(,{,}P)}" at last [].s+(0.1,-0.2) below}
-
- move right_ 0.9; dir_
- {d_fet(,,,)
- "{\tt d\_fet(,{,},)}" at last [].s+(0,-0.05) below}
-
- {move down_ dwn; dir_
- d_fet(,,P)
- "{\tt d\_fet(,{,}P)}" at last [].s+(0,-0.05) below}
-
- move right_ 0.9; dir_
- {e_fet(,,,S)
- "{\tt e\_fet(,{,},S)}" at last [].s+(0,-0.05) below}
-
- {move down_ dwn; dir_
- e_fet(,,P,S)
- "{\tt e\_fet(,{,}P,S)}" at last [].s+(0,-0.2) below}
-
- move right_ 0.9; dir_
- {d_fet(,,,S)
- "{\tt d\_fet(,{,},S)}" at last [].s+(0,-0.2) below}
-
- {move down_ dwn; dir_
- d_fet(,,P,S)
- "{\tt d\_fet(,{,}P,S)}" at last [].s+(0,-0.05) below}
-
- move right_ 0.9; dir_
- {c_fet(,,,)
- "{\tt `c\_fet'(,{,},)}" at last [].s+(0,-0.05) below}
-
- {move down_ dwn; dir_
- c_fet(,,P)
- "{\tt `c\_fet'(,{,}P)}" at last [].s+(0,-0.2) below}
+Row1: [ J: j_fet
+ { "{\tt j\_fet}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: j_fet(right_ dimen_,,P,E) with .w at J.e+(0.5,0)
+ { "{\tt j\_fet(right\_}" "{\tt dimen\_,{,}P,E)}" at J.s+(0,-13bp__) below
+ "$G$" at J.G rjust above
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: e_fet with .w at J.e+(0.5,0)
+ { "{\tt $\;$ e\_fet}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: e_fet(,,P) with .w at J.e+(0.6,0)
+ { "{\tt $\;$ e\_fet(,{,}P)}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: e_fet(,,P,S) with .w at J.e+(0.7,0)
+ { "{\tt $\;$ e\_fet(,{,}P,S)}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: c_fet with .w at J.e+(0.6,0)
+ { "{\tt $\;$ c\_fet}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: c_fet(,,P) with .w at J.e+(0.6,0)
+ { "{\tt $\;$ c\_fet(,{,}P)}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ ]
+
+Row2: [
+ J: d_fet
+ { "{\tt d\_fet}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: d_fet(,,P) with .w at J.e+(0.5,0)
+ { "{\tt d\_fet(,{,}P)}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: d_fet(,,P,S) with .w at J.e+(0.7,0)
+ { "{\tt d\_fet(,{,}P,S)}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: g_fet with .w at J.e+(0.6,0)
+ { "{\tt g\_fet}" at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ J: g_fet(up_ dimen_,,P) with .w at J.e+(0.6,0)
+ { "{\tt `g\_fet'(up\_$\;\;$}" at last [].s below
+ "{\tt dimen\_,{,}P)}" at last [].s + (0,-12bp__) below
+ "{\sl G}" at last [].G rjust
+ "{\sl S}" at last [].S + (0,2bp__) ljust
+ "{\sl D}" at last [].D + (0,2bp__) ljust below }
+ right_
+ M1: mosfet(,,dBSDFQM1,E) with .w at J.e+(0.5,0)
+ "$G0$" at M1.G0 above rjust
+ "$G1$" at M1.G1 above ljust
+ {"\tt `mosfet'(,{,}dBSDFQM1,E)" wid 1.45 \
+ with .nw at last [].sw+(0,-0.2) }
+ M2: mosfet(,,dBSDFQuM1) with .nw at M1.ne+(0.5,0)
+ "$G0$" at M2.G0 above ljust
+ "$G1$" at M2.G1 above rjust
+ {"\tt ...(,{,}dBSDFQuM1)" wid 1.25 \
+ with .n at last [].s+(0,-0.05) }
+ ] with .nw at Row1.sw+(0,-0.1)
-move down 1; right_
- [
+Row3: [
linewid = linewid*1.2
Q1: mosfet(,,dGSDF,)
@@ -132,8 +140,22 @@ move down 1; right_
"$D$" at last [].D ljust
"$B$" at last [].B below
}
-
- move right_ rmove
+ move right_
+ J: Fe_fet #(right_ dimen_)
+ {`"{\tt $\;$ Fe\_fet}"' at J.s+(0,-0.05) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ move right_
+ J: Fe_fet(,,TEDQSuB)
+ {`"{\tt $\;$ Fe\_fet(,,TEDSQuB)}"' at J.s+(0,-0.15) below
+ "$G$" at J.G rjust
+ "$S$" at J.S rjust
+ "$D$" at J.D ljust }
+ ] with .nw at last [].sw
+
+Row4: [
+ {move left 0.5}
Q5: mosfet(,,ZSDFdT,)
{"\tt `$\ldots$'(,{,}ZSDFdT,)" at last [].s+(0,-0.05) below
thinlines_
@@ -144,8 +166,7 @@ move down 1; right_
arrow <- down .08 right .24 from (Q5.G.x,Q5.G.y-0.02)
"\tt dT" ljust
thicklines_ }
-
- move right_ rmove
+ move right_ 0.8
up_
Q6: IRF4905 with .c at Here
{`"\tt IRF4905"' at Q6.s+(0,-0.15) below
@@ -153,18 +174,6 @@ move down 1; right_
"$D$" at Q6.D ljust above
"$S$" at Q6.S ljust below
}
- ] with .nw at J.sw+(0,-1.35) #Orig+(-0.26,-1.2)
-
- right_
- M1: mosfet(,,dBSDFQM1,E) with .nw at J.nw+(0,-dwn)
- "$G0$" at M1.G0 above rjust
- "$G1$" at M1.G1 above ljust
- {"\tt `mosfet'(,{,}dBSDFQM1,E)" wid 1.45 \
- with .nw at last [].sw+(0,-0.23) }
- M2: mosfet(,,dBSDFQuM1) with .nw at M1.ne+(0.5,0)
- "$G0$" at M2.G0 above ljust
- "$G1$" at M2.G1 above rjust
- {"\tt ...(,{,}dBSDFQuM1)" wid 1.25 \
- with .n at last [].s+(0,-0.05) }
+ ] with .nw at last [].sw
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex
index f320c34f9c2..a33d0dc50d5 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex
@@ -7,9 +7,21 @@
}
\bfig{
- \centerline{{\small\getpic{CctTable}}}
- \caption{Two-terminal elements, showing some variations
- \src{CctTable.m4}.}
+ \centerline{{\small\getpic{Resistors}}}
+ \caption{Resistors, showing some variations
+ \src{Resistors.m4}.}
+ }
+
+\bfig{
+ \centerline{{\small\getpic{Capacitors}}}
+ \caption{Capacitors, showing some variations
+ \src{Capacitors.m4}.}
+ }
+
+\bfig{
+ \centerline{{\small\getpic{Inductors}}}
+ \caption{Inductors, showing some variations
+ \src{Inductors.m4}.}
}
\bfig{
@@ -47,6 +59,11 @@
\caption{Macros {\tt fuse} and {\tt cbreaker}
\src{Fuses.m4}.}
}
+\bfig{
+ \centerline{\getpic{MoreTable}}
+ \caption{Additional two-terminal elements
+ \src{MoreTable.m4}.}
+ }
\bfig{
\centerline{\getpic{Grounds}}
@@ -146,6 +163,12 @@
}
\bfig{
+ \centerline{\getpic{Chips}}
+ \caption{IC package outlines
+ \src{Chips.m4}.}
+ }
+
+\bfig{
\centerline{\getpic{fet}}
\caption{FETs, showing programmable components and example customizations
\src{fet.m4}.}
@@ -484,7 +507,7 @@
\bfig{
\centerline{\getpic{control}}
- \caption{Control-system block diagrams that do not require m4
+ \caption{Control-system block diagrams
\src{control.m4}.}
}
@@ -539,6 +562,12 @@
}
\bfig{
+ \centerline{\getpic{Plate}}
+ \caption{Dimensioning with tolerances
+ \src{Plate.m4}.}
+ }
+
+\bfig{
\centerline{\getpic{ex05}}
\caption{Use of {\tt darrow}
\src{ex05.m4}.}
@@ -570,6 +599,7 @@
determines plotting order
\src{graysurf.m4}.}
}
+\clearpage
\bfig{
\centerline{\getpic{shapes}}
@@ -578,12 +608,6 @@
}
\bfig{
- \centerline{\getpic{AntiqueClock}}
- \caption{An antique clock face
- \src{AntiqueClock.m4}.}
- }
-
-\bfig{
\centerline{\getpic{Lyap}}
\caption{Illustrating a Lyapunov function
\src{Lyap.m4}.}
@@ -592,7 +616,7 @@
\bfig{
\centerline{\getpic{csc}}
\caption{Conestoga Sailing Club (illustrating the filling of arbitrary
- shapes)
+ shapes) and an antique clock face with shading and rotated text
\src{csc.m4}.}
}
@@ -632,6 +656,7 @@
\caption{Dini surface and an icosahedron
\src{Dini.m4}.}
}
+\clearpage
\bfig{
\centerline{\getpic{Sierpinski}}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/graysurf.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/graysurf.m4
index 22372697b2f..9be043b8496 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/graysurf.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/graysurf.m4
@@ -25,9 +25,9 @@ Surface:[
Orig: (0,0)
linethick_(1.2)
- arrow from Orig to 1.2 <Orig,(project(xmax,0,0))> ; "$x$" below
- arrow from Orig to 1.2 <Orig,(project(0,ymax,0))> ; "$y$" ljust
- arrow from Orig to 1.2 <Orig,(project(0,0,zmax))> ; "$z$" rjust
+ arrow from Orig to 1.2 <Orig,(Project(xmax,0,0))> ; "$x$" below
+ arrow from Orig to 1.2 <Orig,(Project(0,ymax,0))> ; "$y$" ljust
+ arrow from Orig to 1.2 <Orig,(Project(0,0,zmax))> ; "$z$" rjust
linethick_(0)
for i = 0 to nx-1 do {
@@ -36,10 +36,10 @@ Surface:[
y = ymax*j/ny
fnxy = fn(x,y)
shade((fnmax+fnxy)/fnmax/2,
- line from (project(x,y,fnxy)) to (project(x,(y+dy),`fn(x,(y+dy))'))\
- then to (project((x+dx),(y+dy),`fn((x+dx),(y+dy))'))\
- then to (project((x+dx),y,`fn((x+dx),y)'))\
- then to (project(x,y,fnxy))
+ line from (Project(x,y,fnxy)) to (Project(x,(y+dy),`fn(x,(y+dy))'))\
+ then to (Project((x+dx),(y+dy),`fn((x+dx),(y+dy))'))\
+ then to (Project((x+dx),y,`fn((x+dx),y)'))\
+ then to (Project(x,y,fnxy))
) } }
] #with .w at last [].e+(-0.2,0)
@@ -63,8 +63,8 @@ define(`tvisible',
`dot3D(View3D, rot3Dz((`$1')*dtor_,rot3Dy((`$2')*dtor_,1,0,0)))')
Orig: (0,0)
-X: arrow from Orig to (project(tradius+sradius*4,0,0)); "x" rjust
-Y: arrow from Orig to (project(0,tradius+sradius*2,0)); "y" ljust
+X: arrow from Orig to (Project(tradius+sradius*4,0,0)); "x" rjust
+Y: arrow from Orig to (Project(0,tradius+sradius*2,0)); "y" ljust
dt = 10 # major angle degrees per facet
ds = 10 # minor angle degrees per facet
@@ -87,10 +87,10 @@ Y: arrow from Orig to (project(0,tradius+sradius*2,0)); "y" ljust
thinlines_
for i = 1 to n do {
tc = t[ix[i]]; sc = s[ix[i]]
- SE: (project(torus(tc+dt/2,sc-ds/2)))
- SW: (project(torus(tc-dt/2,sc-ds/2)))
- NW: (project(torus(tc-dt/2,sc+ds/2)))
- NE: (project(torus(tc+dt/2,sc+ds/2)))
+ SE: (Project(torus(tc+dt/2,sc-ds/2)))
+ SW: (Project(torus(tc-dt/2,sc-ds/2)))
+ NW: (Project(torus(tc-dt/2,sc+ds/2)))
+ NE: (Project(torus(tc+dt/2,sc+ds/2)))
f = ((dcosine3D(3,torus(tc,sc))/sradius+1)/2)^2
g = min(f,0.9)
setrgb(g,g,g)
@@ -102,10 +102,10 @@ thinlines_
}
thicklines_
- arrow from Orig to (project(0,0,tradius*1.4)); "z" above
- dashline(from Orig to (project(torus(0,0))),,,,G)
+ arrow from Orig to (Project(0,0,tradius*1.4)); "z" above
+ dashline(from Orig to (Project(torus(0,0))),,,,G)
arrow to X.end
- dashline(from Orig to (project(torus(90,0))),,,,G)
+ dashline(from Orig to (Project(torus(90,0))),,,,G)
arrow to Y.end
] with .sw at last [].se+(0.2,0)
@@ -130,11 +130,11 @@ Hat: [
dy = 0.05
Orig: (0,0)
-X: arrow from Orig to (project(maxy*1.2,0,0)); "x" rjust
-Y: arrow from Orig to (project(0,maxy*1.2,0)); "y" ljust
-Xv: (project(1,0,0))
-Yv: (project(0,1,0))
-Zv: (project(0,0,1))
+X: arrow from Orig to (Project(maxy*1.2,0,0)); "x" rjust
+Y: arrow from Orig to (Project(0,maxy*1.2,0)); "y" ljust
+Xv: (Project(1,0,0))
+Yv: (Project(0,1,0))
+Zv: (Project(0,0,1))
# create the arrays and sort
n = 0
for t = dang/2 to 360.1 by dang do {
@@ -150,14 +150,14 @@ Zv: (project(0,0,1))
dpquicksort(d,1,n,ix)
# draw the facets
ellipse wid maxy*2 ht maxy*2*sind(elevation) \
- with .c at (project(0,0,(maxy^2-1)^2)+linethick bp__/2)
+ with .c at (Project(0,0,(maxy^2-1)^2)+(0,linethick bp__/2))
thinlines_
for i = 1 to n do {
tc = t[ix[i]]; yc = y[ix[i]]
- SE: (project(hat(tc+dang/2,yc-dy/2)))
- SW: (project(hat(tc-dang/2,yc-dy/2)))
- NW: (project(hat(tc-dang/2,yc+dy/2)))
- NE: (project(hat(tc+dang/2,yc+dy/2)))
+ SE: (Project(hat(tc+dang/2,yc-dy/2)))
+ SW: (Project(hat(tc-dang/2,yc-dy/2)))
+ NW: (Project(hat(tc-dang/2,yc+dy/2)))
+ NE: (Project(hat(tc+dang/2,yc+dy/2)))
f = abs(yc^2-1)
line invis fill f from SE to SW then to NW then to NE then to SE
}
@@ -168,21 +168,21 @@ nr = -1
for i=1 to mm do { y = i/(mm+3)
findroot(edge,(azimuth+2),(azimuth+180-2),1e-8,t)
nr +=1
- R[mm+nr]: (project(hat(t,y)))
+ R[mm+nr]: (Project(hat(t,y)))
R[mm-1-nr]: (-R[mm+nr].x,R[mm+nr].y)
}
fitcurve(R,mm*2-1)
# Z axis
thicklines_
-Z: arrow from Zv to (project(0,0,1.2)); "z" ljust
+Z: arrow from Zv to (Project(0,0,1.2)); "z" ljust
line dashed from Orig to Zv chop 0 chop dashwid/2
line dashed from Orig to Xv
line dashed from Orig to Yv
# Partial rim
ellipsearc(maxy*2,maxy*2*sind(elevation),-pi_*1.4,pi_/3) \
- with .C at (project(0,0,(maxy^2-1)^2)+linethick bp__/2)
+ with .C at (Project(0,0,(maxy^2-1)^2)+(0,linethick bp__/2))
] scaled 1.25 with .s at 1st [].ne+(0,-0.75)
] scaled 0.85
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4
index c07cb61ea28..bf702d7c44f 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ics.m4
@@ -1,16 +1,6 @@
divert(-1)
- Macros defining some integrated circuits and connectors
-
- `DIP_chip_outline( pin count, wid )'
-define(`DIP_chip_outline',
- `[ define(`m4chgw',`ifelse(`$2',,(18*L_unit),`$2')')dnl
- Chip: box invis wid m4chgw ht lg_pinsep*eval((`$1')/2+1)
- arcd(last box.n, lg_pinsep/2, 180, 360)
- { line to last box.ne chop -linewid bp__/2 }
- { line from last arc.start to last box.nw chop -linewid bp__/2 }
- line from last box.nw to last box.sw then to last box.se then to last box.ne
- `$3']')
+ Macros defining some integrated circuits and connectors for LaTeX
`A sequence of pins along the east or west side of a chip:
lg_pinseq(initial pin no, final pin no,
@@ -20,6 +10,8 @@ define(`lg_pinseq',`for_($1,$2,1,
`lg_pin( Chip.s`$3'+(0,($4+m4x)*lg_pinsep),
$6`'m4x,Pin`'eval($5`'m4x),`$3'`$7',eval($5`'m4x))') ')
+define(`ic_tiny',`iflatex(`\hbox{\tiny `$1'}',ifsvg(`svg_small(`$1')',`$1'))')
+define(`ic_tilde',`iflatex(`{\raisebox{-0.5ex}{\char126}}',~)')
define(`ic6116',`[ Chip: box wid_ lg_chipwd ht_ 15*lg_pinsep
lg_pin(Chip.sw_+(0,lg_pinsep),GND,Pin12,w,12)
@@ -27,7 +19,7 @@ define(`ic6116',`[ Chip: box wid_ lg_chipwd ht_ 15*lg_pinsep
lg_pinseq(0,2,w,4,9+,D)
lg_pinseq(3,7,w,4,10+,D)
lg_pin(Chip.sw_+(0,13*lg_pinsep),R/lg_bartxt(W),Pin21,w,21)
- lg_pin(Chip.sw_+(0,14*lg_pinsep),V\hbox{\tiny CC},Pin24,w,24)
+ lg_pin(Chip.sw_+(0,14*lg_pinsep),V`'ic_tiny(CC),Pin24,w,24)
lg_pin(Chip.se_+(0,lg_pinsep),lg_bartxt(OE),Pin20,eN,20)
lg_pinseq(0,7,e,3,8-,A)
lg_pinseq(8,9,e,3,31-,A)
@@ -35,8 +27,8 @@ define(`ic6116',`[ Chip: box wid_ lg_chipwd ht_ 15*lg_pinsep
`$1']')
define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
- lg_pin(Chip.sw_+(0,lg_pinsep),V\hbox{\tiny SS},Pin21,w,21)
- lg_pin(Chip.sw_+(0,2*lg_pinsep),V\hbox{\tiny SS},Pin1,w,1)
+ lg_pin(Chip.sw_+(0,lg_pinsep),V`'ic_tiny(SS),Pin21,w,21)
+ lg_pin(Chip.sw_+(0,2*lg_pinsep),V`'ic_tiny(SS),Pin1,w,1)
lg_pin(Chip.sw_+(0,4*lg_pinsep),R/lg_bartxt(W),Pin34,w,34)
lg_pinseq(0,7,w,6,33-,D)
lg_pin(Chip.sw_+(0,15*lg_pinsep),lg_bartxt(RESET),Pin40,wN,40)
@@ -44,19 +36,19 @@ define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
lg_pin(Chip.sw_+(0,19*lg_pinsep),lg_bartxt(NMI),Pin6,wN,6)
lg_pin(Chip.sw_+(0,21*lg_pinsep),RDY,Pin2,w,2)
lg_pin(Chip.sw_+(0,22*lg_pinsep),SO,Pin38,w,38)
- lg_pin(Chip.sw_+(0,23*lg_pinsep),V\hbox{\tiny CC},Pin8,w,8)
- lg_pin(Chip.se_+(0,lg_pinsep),{\large$\phi$}\hbox{\tiny 1}(in),Pin39,e,39)
+ lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'ic_tiny(CC),Pin8,w,8)
+ lg_pin(Chip.se_+(0,lg_pinsep),CK`'ic_tiny(1)(in),Pin39,e,39)
lg_pin(Chip.se_+(0,4*lg_pinsep),
- {\large$\phi$}\hbox{\tiny 2}(out),Pin37,e,37)
+ CK`'ic_tiny(2)(out),Pin37,e,37)
lg_pinseq(0,11,e,6,9+,A)
lg_pinseq(12,15,e,6,10+,A)
lg_pin(Chip.se+(0,23*lg_pinsep),lg_bartxt(IRQ),Pin4,eN,4)
`$1']')
define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
- lg_pin(Chip.sw_+(0,lg_pinsep),V\hbox{\tiny SS},Pin1,w,1)
+ lg_pin(Chip.sw_+(0,lg_pinsep),V`'ic_tiny(SS),Pin1,w,1)
lg_pin(Chip.sw_+(0,3*lg_pinsep),CS1,Pin24,w,24)
- lg_pin(Chip.sw_+(0,4*lg_pinsep),{\large$\phi$},Pin25,w,25)
+ lg_pin(Chip.sw_+(0,4*lg_pinsep),CK,Pin25,w,25)
lg_pin(Chip.sw_+(0,5*lg_pinsep),lg_bartxt(CS2),Pin23,wN,23)
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)
@@ -65,7 +57,7 @@ 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),R/lg_bartxt(W),Pin22,w,22)
lg_pin(Chip.sw_+(0,22*lg_pinsep),lg_bartxt(IRQ),Pin21,wN,21)
- lg_pin(Chip.sw_+(0,23*lg_pinsep),V\hbox{\tiny CC},Pin20,w,20)
+ lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'ic_tiny(CC),Pin20,w,20)
lg_pinseq(0,7,e,1,10+,PB)
lg_pinseq(1,2,e,8,17+,CB)
lg_pinseq(0,7,e,12,2+,PA)
@@ -81,12 +73,12 @@ define(`ic74LS138',`[ Chip: box wid_ lg_chipwd ht_ 11*lg_pinsep
lg_pin(Chip.sw_+(0,6*lg_pinsep),B,Pin2,w,2)
lg_pin(Chip.sw_+(0,7*lg_pinsep),C,Pin3,w,3)
lg_pin(Chip.sw_+(0,9*lg_pinsep),G1,Pin6,w,6)
- lg_pin(Chip.sw_+(0,10*lg_pinsep),V\hbox{\tiny CC},Pin16,w,16)
+ lg_pin(Chip.sw_+(0,10*lg_pinsep),V`'ic_tiny(CC),Pin16,w,16)
lg_pinseq(0,6,e,2,15-,Y,n)
lg_pin(Chip.se_+(0,9*lg_pinsep),Y7,Pin7,eN,7)
`$1']')
-define(`ic4017',`[ Chip: chip_gen(16)
+define(`ic4017',`[ Chip: DIP_chip_outline(16)
Loopover_(`x',
`lg_pin(Chip.nw-(0,lg_pinsep*m4Lx),x,Pin`'m4Lx,w,m4Lx)',
PL, Q3, I3, I0, CLE, Q0, TC, GND)
@@ -95,7 +87,7 @@ define(`ic4017',`[ Chip: chip_gen(16)
MR, U/D, Q1, I1, I2, Q2, CLK, Vcc)
`$1']')
-define(`ic4510',`[ Chip: chip_gen(16)
+define(`ic4510',`[ Chip: DIP_chip_outline(16)
Loopover_(`x',
`lg_pin(Chip.nw-(0,lg_pinsep*m4Lx),x,Pin`'m4Lx,w,m4Lx)',
PL, Q3, I3, I0, CLE, Q0, TC, GND)
@@ -104,13 +96,13 @@ define(`ic4510',`[ Chip: chip_gen(16)
MR, U/D, Q1, I1, I2, Q2, CLK, Vcc)
`$1']')
-define(`icVS1053',`[ Chip: chip_gen(32)
+define(`icVS1053',`[ Chip: DIP_chip_outline(32)
Loopover_(`x',
`lg_pin(Chip.nw-(0,lg_pinsep*m4Lx),x,Pin`'m4Lx,w,m4Lx)',
LOUT,ROUT,GBUF,AGND,AGND,DREG,Vcc,3V3,GND,MISO,MOSI,sclk,RST,CS,DCS,DCS)
Loopover_(`x',
`lg_pin(Chip.se+(0,lg_pinsep*m4Lx),x,Pin`'eval(m4Lx+16),e,eval(m4Lx+16))',
- SDCD,RX,TX,7,6,5,4,3,2,1,0,GND,3V3,AGND,MIC-,MIC+)
+ SDCD,RX,TX,7,6,5,4,3,2,1,0,GND,3V3,AGND,MIC`$-$',MIC`$+$')
`$1']')
`ArduinoUno( wid,ht,pinlen )'
@@ -125,14 +117,14 @@ define(`ArduinoUno',`[
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,
+ IOREF, RESET,$+${3}V3,$+${5}V, 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, \char126 D11, \char126 D10, \char126 D9, D8,
- nul, D7, \char126 D6, \char126 D5, D4, \char126 D3, D2, TX D1, RX D0)
+ SCL, SDA, AREF, GND, D13, D12, ic_tilde`'D11, ic_tilde`'D10, ic_tilde`'D9, D8,
+ nul, D7, ic_tilde`'D6, ic_tilde`'D5, D4, ic_tilde`'D3, D2, TX D1, RX D0)
#
`$4'] ')
@@ -148,15 +140,15 @@ define(`ArduinoLeonardo',`[
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,
+ IOREF, RESET,$+${3}V3,$+${5}V, 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,
- \char126 D13, D12, \char126 D11, \char126 D10, \char126 D9, D8,
- nul, D7, \char126 D6, \char126 D5, D4, \char126 D3, D2, TX D1, RX D0)
+ ic_tilde`'D13, D12, ic_tilde`'D11, ic_tilde`'D10, ic_tilde`'D9, D8,
+ nul, D7, ic_tilde`'D6, ic_tilde`'D5, D4, ic_tilde`'D3, D2, TX D1, RX D0)
#
`$4'] ')
@@ -221,12 +213,14 @@ define(`USB_C_Socket',`[
`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)
+ 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)
+ GND, TX1`$+$', TX1`$-$', VBUS, CC1, D`$+$', D`$-$', SBU1, VBUS, RX2`$-$',
+ RX2`$+$', GND)
#
`$4']')
@@ -245,8 +239,9 @@ define(`HDMI_micro',`[
`Pin`'m4Lx: line left_ plen from Base.nw-(0,m4bwid/3+m4Lx*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)
+ HPD, UTILITY, D2`$+$', D2\_SH, D2`$-$', D1`$+$', D1\_SH, D1`$-$',
+ D0`$+$', D0\_SH, D0`$-$', CLK`$+$', CLK\_SH, CLK`$-$',
+ CEC, GND, SCL, SDA,$+${5}V)
line from Base.nw+(m4bwid*2/3-lg_pinsep,0) up plen
r_text(21) at last line.c+(-5bp__,0)
r_text(SH2) at last line.start + (0,-10bp__)
@@ -262,4 +257,51 @@ define(`HDMI_micro',`[
#
`$4']')
+ `DIP_chip_outline( pin count, wid )'
+define(`DIP_chip_outline',
+ `[ define(`m4pinct',`ifelse(`$1',,16,`$1')')dnl
+ define(`m4chgw',`ifelse(`$2',,(18*L_unit),`$2')')dnl
+ Chip: box invis wid m4chgw ht lg_pinsep*eval((m4pinct)/2+1)
+ arcd(Chip.n, lg_pinsep/2, 180, 360)
+ { line to Chip.ne chop -linewid bp__/2 }
+ { line from last arc.start to Chip.nw chop -linewid bp__/2 }
+ line from Chip.nw to Chip.sw then to Chip.se then to Chip.ne
+ `$3']')
+
+ `DIP( pin count, attributes)
+ Dual in-line package
+ attributes=semicolon-separated list of optional terms:
+ bodywid=expr; (default 0.25 = 5*L_unit )
+ bodylen=expr; (default pin count/2 x pinpitch)
+ pinpitch=expr; (default 0.1)
+ pinwid=expr; (default 0.06)
+ pinlen=expr; (default 0.05)
+ direct=U|D|L|R;(default U for up)
+ type=I|Q; (default I for uniform-length pins;
+ Q: staggered) '
+define(`DIP',`[ pinct= ifelse(`$1',,8,`$1')
+ setkeys_(`$2',
+ bodywid: 5*L_unit;
+ bodylen: m4pinpitch*int(pinct/2+0.5);
+ pinpitch:2*L_unit;
+ pinwid: 1.2*L_unit;
+ pinlen: L_unit;
+ direct:U:N;
+ type:I:N)
+ setdir_(m4direct,U)
+ Body: box ht_ m4bodywid wid_ m4bodylen
+ arcs = ifelse(m4dir,right,90,m4dir,up,180,m4dir,left,270,0)
+ arcd(Body.e_, 0.1/2, arcs,arcs+180)
+ np2 = int(pinct/2+0.5)
+ define(`m4bxht',`m4pinlen ifelse(m4type,Q,`*(1+(i%%2))')')dnl
+ for i=0 to np2-1 do {
+ exec sprintf("Pin%g: box ht_ m4bxht wid_ m4pinwid \
+ with .s_ at (i+0.5)/np2 between Body.ne_ and Body.nw_",i+1) }
+ for i=np2+1 to pinct do {
+ exec sprintf("Pin%g: box ht_ m4bxht wid_ m4pinwid \
+ with .n_ at (i-np2-0.5)/(pinct-np2) between Body.sw_ and Body.se_",i) }
+ `$3'; resetdir_
+ popdef(`m4bodywid',`m4bodylen',`m4pinpitch',`m4pinwid',`m4pinlen',`m4direct',
+ `m4type') ]'))
+
divert(0)dnl
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/lcct.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/lcct.m4
index 8fe244d7966..dc3f2cd8909 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/lcct.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/lcct.m4
@@ -3,6 +3,7 @@
log_init
include(ics.m4)
iflatex(`ifpsfrag(,`latexcommand({\sf)')')
+maxpswid = 10
define(`dimen_',0.5)
define(`elen_',dimen_)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf
index e523a753e2c..dd0dcdfd11a 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf
@@ -1,5 +1,5 @@
% cct.mf, generated by Mfpic, v1.10 2012/12/03,
-% from TeX source "font" on 2021/01/03 at 16:42
+% from TeX source "font" on 2021/06/02 at 22:43
numeric mfpicversion; mfpicversion := 110;
if unknown mode: mode := localfont; fi
if unknown mag: mag := 1000/1000; fi
@@ -81,69 +81,69 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(0.024933,0));
+(0.020249,0));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.024933,0),0.002767);
+circle ((0.020249,0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.070249,0.021131),-155,-410,0.05);
+arcplr ((0.065564,0.021131),-155,-410,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.102388,-0.017171),0.002767);
+circle ((0.097703,-0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.134527,0.021131),-130,-410,0.05);
+arcplr ((0.129843,0.021131),-130,-410,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.166667,-0.017171),0.002767);
+circle ((0.161982,-0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.198806,0.021131),-130,-410,0.05);
+arcplr ((0.194121,0.021131),-130,-410,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.230945,-0.017171),0.002767);
+circle ((0.226261,-0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.263085,0.021131),-130,-385,0.05);
+arcplr ((0.2584,0.021131),-130,-385,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.3084,0),0.002767);
+circle ((0.303716,0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((0.3084,0),
-(0.333333,0));
+((0.303716,0),
+(0.323964,0));
endmfpic; % (3) line 59 in the TeX source.
%------------------------------------------
@@ -163,69 +163,69 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(0,-0.024933));
+(0,-0.020249));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0,-0.024933),0.002767);
+circle ((0,-0.020249),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.070249),115,-140,0.05);
+arcplr ((0.021131,-0.065564),115,-140,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.017171,-0.102388),0.002767);
+circle ((-0.017171,-0.097703),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.134527),140,-140,0.05);
+arcplr ((0.021131,-0.129843),140,-140,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.017171,-0.166667),0.002767);
+circle ((-0.017171,-0.161982),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.198806),140,-140,0.05);
+arcplr ((0.021131,-0.194121),140,-140,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.017171,-0.230945),0.002767);
+circle ((-0.017171,-0.226261),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((0.021131,-0.263085),140,-115,0.05);
+arcplr ((0.021131,-0.2584),140,-115,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0,-0.3084),0.002767);
+circle ((0,-0.303716),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((0,-0.3084),
-(0,-0.333333));
+((0,-0.303716),
+(0,-0.323964));
endmfpic; % (4) line 77 in the TeX source.
%------------------------------------------
@@ -245,69 +245,69 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(-0.024933,0));
+(-0.020249,0));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.024933,0),0.002767);
+circle ((-0.020249,0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.070249,-0.021131),25,-230,0.05);
+arcplr ((-0.065564,-0.021131),25,-230,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.102388,0.017171),0.002767);
+circle ((-0.097703,0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.134527,-0.021131),50,-230,0.05);
+arcplr ((-0.129843,-0.021131),50,-230,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.166667,0.017171),0.002767);
+circle ((-0.161982,0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.198806,-0.021131),50,-230,0.05);
+arcplr ((-0.194121,-0.021131),50,-230,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.230945,0.017171),0.002767);
+circle ((-0.226261,0.017171),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.263085,-0.021131),50,-205,0.05);
+arcplr ((-0.2584,-0.021131),50,-205,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0.3084,-0),0.002767);
+circle ((-0.303716,-0),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((-0.3084,-0),
-(-0.333333,-0));
+((-0.303716,-0),
+(-0.323964,-0));
endmfpic; % (5) line 95 in the TeX source.
%------------------------------------------
@@ -327,69 +327,69 @@ store (curpath)
drawn
polyline (false)
((0,0),
-(0,0.024933));
+(0,0.020249));
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0,0.024933),0.002767);
+circle ((0,0.020249),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.070249),-65,-320,0.05);
+arcplr ((-0.021131,0.065564),-65,-320,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.017171,0.102388),0.002767);
+circle ((0.017171,0.097703),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.134527),-40,-320,0.05);
+arcplr ((-0.021131,0.129843),-40,-320,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.017171,0.166667),0.002767);
+circle ((0.017171,0.161982),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.198806),-40,-320,0.05);
+arcplr ((-0.021131,0.194121),-40,-320,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((0.017171,0.230945),0.002767);
+circle ((0.017171,0.226261),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
-arcplr ((-0.021131,0.263085),-40,-295,0.05);
+arcplr ((-0.021131,0.2584),-40,-295,0.05);
resizedrawpen (0.4bp);
store (curpath)
drawn
-circle ((-0,0.3084),0.002767);
+circle ((-0,0.303716),0.002767);
resizedrawpen (0.8bp);
store (curpath)
drawn
polyline (false)
-((-0,0.3084),
-(-0,0.333333));
+((-0,0.303716),
+(-0,0.323964));
endmfpic; % (6) line 113 in the TeX source.
%------------------------------------------
@@ -398,52 +398,28 @@ endmfpic; % (6) line 113 in the TeX source.
%----------------------------<7>
unitlen := 1.0pt#;
xscale := 72; yscale := 72;
-bounds (-0.146418, 0.333333, 0, 0.123214);
+bounds (0, 0.333333, 0, 0);
beginmfpic(7); % line 114 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
-store (curpath)
-drawn
-polyline (false)
-((-0.146418,0.091964),
-(0.146418,0.091964));
-
-store (curpath)
-drawn
-polyline (false)
-((-0.146418,0.123214),
-(0.146418,0.123214));
-
-endmfpic; % (7) line 122 in the TeX source.
+endmfpic; % (7) line 118 in the TeX source.
%------------------------------------------
%----------------------------<8>
unitlen := 1.0pt#;
xscale := 72; yscale := 72;
-bounds (-0.123214, 0, -0.146418, 0.333333);
+bounds (0, 0, 0, 0.333333);
-beginmfpic(8); % line 123 in the TeX source.
+beginmfpic(8); % line 119 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
-store (curpath)
-drawn
-polyline (false)
-((-0.091964,-0.146418),
-(-0.091964,0.146418));
-
-store (curpath)
-drawn
-polyline (false)
-((-0.123214,-0.146418),
-(-0.123214,0.146418));
-
-endmfpic; % (8) line 131 in the TeX source.
+endmfpic; % (8) line 123 in the TeX source.
%------------------------------------------
@@ -452,7 +428,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0, 0.03125);
-beginmfpic(9); % line 132 in the TeX source.
+beginmfpic(9); % line 124 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -485,7 +461,7 @@ polyline (false)
((0.291667,0),
(0.333333,0));
-endmfpic; % (9) line 144 in the TeX source.
+endmfpic; % (9) line 136 in the TeX source.
%------------------------------------------
@@ -494,7 +470,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0, 0.03125, -0.333333, 0);
-beginmfpic(10); % line 145 in the TeX source.
+beginmfpic(10); % line 137 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -511,23 +487,23 @@ arcplr ((0,-0.072917),90,-90,0.03125);
store (curpath)
drawn
-arcplr ((-0,-0.135417),90,-90,0.03125);
+arcplr ((0,-0.135417),90,-90,0.03125);
store (curpath)
drawn
-arcplr ((-0,-0.197917),90,-90,0.03125);
+arcplr ((0,-0.197917),90,-90,0.03125);
store (curpath)
drawn
-arcplr ((-0,-0.260417),90,-90,0.03125);
+arcplr ((0,-0.260417),90,-90,0.03125);
store (curpath)
drawn
polyline (false)
-((-0,-0.291667),
-(-0,-0.333333));
+((0,-0.291667),
+(0,-0.333333));
-endmfpic; % (10) line 157 in the TeX source.
+endmfpic; % (10) line 149 in the TeX source.
%------------------------------------------
@@ -536,7 +512,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.03125, 0);
-beginmfpic(11); % line 158 in the TeX source.
+beginmfpic(11); % line 150 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -549,7 +525,7 @@ polyline (false)
store (curpath)
drawn
-arcplr ((-0.072917,0),-0,-180,0.03125);
+arcplr ((-0.072917,0),0,-180,0.03125);
store (curpath)
drawn
@@ -569,7 +545,7 @@ polyline (false)
((-0.291667,0),
(-0.333333,0));
-endmfpic; % (11) line 170 in the TeX source.
+endmfpic; % (11) line 162 in the TeX source.
%------------------------------------------
@@ -578,7 +554,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.03125, 0, 0, 0.333333);
-beginmfpic(12); % line 171 in the TeX source.
+beginmfpic(12); % line 163 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -599,19 +575,19 @@ arcplr ((0,0.135417),-90,-270,0.03125);
store (curpath)
drawn
-arcplr ((-0,0.197917),-90,-270,0.03125);
+arcplr ((0,0.197917),-90,-270,0.03125);
store (curpath)
drawn
-arcplr ((-0,0.260417),-90,-270,0.03125);
+arcplr ((0,0.260417),-90,-270,0.03125);
store (curpath)
drawn
polyline (false)
-((-0,0.291667),
-(-0,0.333333));
+((0,0.291667),
+(0,0.333333));
-endmfpic; % (12) line 183 in the TeX source.
+endmfpic; % (12) line 175 in the TeX source.
%------------------------------------------
@@ -620,7 +596,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.03125, 0, 0, 0.333333);
-beginmfpic(13); % line 184 in the TeX source.
+beginmfpic(13); % line 176 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -641,71 +617,47 @@ arcplr ((0,0.135417),-90,-270,0.03125);
store (curpath)
drawn
-arcplr ((-0,0.197917),-90,-270,0.03125);
+arcplr ((0,0.197917),-90,-270,0.03125);
store (curpath)
drawn
-arcplr ((-0,0.260417),-90,-270,0.03125);
+arcplr ((0,0.260417),-90,-270,0.03125);
store (curpath)
drawn
polyline (false)
-((-0,0.291667),
-(-0,0.333333));
+((0,0.291667),
+(0,0.333333));
-endmfpic; % (13) line 196 in the TeX source.
+endmfpic; % (13) line 188 in the TeX source.
%------------------------------------------
%----------------------------<14>
unitlen := 1.0pt#;
xscale := 72; yscale := 72;
-bounds (-0.125, 0.333333, 0, 0.083333);
+bounds (0, 0.333333, 0, 0);
-beginmfpic(14); % line 197 in the TeX source.
+beginmfpic(14); % line 189 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
-store (curpath)
-drawn
-polyline (false)
-((-0.125,0.052083),
-(0.125,0.052083));
-
-store (curpath)
-drawn
-polyline (false)
-((-0.125,0.083333),
-(0.125,0.083333));
-
-endmfpic; % (14) line 205 in the TeX source.
+endmfpic; % (14) line 193 in the TeX source.
%------------------------------------------
%----------------------------<15>
unitlen := 1.0pt#;
xscale := 72; yscale := 72;
-bounds (-0.083333, 0, -0.125, 0.333333);
+bounds (0, 0, 0, 0.333333);
-beginmfpic(15); % line 206 in the TeX source.
+beginmfpic(15); % line 194 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
-store (curpath)
-drawn
-polyline (false)
-((-0.052083,-0.125),
-(-0.052083,0.125));
-
-store (curpath)
-drawn
-polyline (false)
-((-0.083333,-0.125),
-(-0.083333,0.125));
-
-endmfpic; % (15) line 214 in the TeX source.
+endmfpic; % (15) line 198 in the TeX source.
%------------------------------------------
@@ -714,7 +666,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.0625, 0.0625);
-beginmfpic(16); % line 215 in the TeX source.
+beginmfpic(16); % line 199 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -741,7 +693,7 @@ polyline (false)
((0.17492,0),
(0.333333,0));
-endmfpic; % (16) line 226 in the TeX source.
+endmfpic; % (16) line 210 in the TeX source.
%------------------------------------------
@@ -750,7 +702,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.0625, 0.0625, -0.333333, 0);
-beginmfpic(17); % line 227 in the TeX source.
+beginmfpic(17); % line 211 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -777,7 +729,7 @@ polyline (false)
((0,-0.17492),
(0,-0.333333));
-endmfpic; % (17) line 238 in the TeX source.
+endmfpic; % (17) line 222 in the TeX source.
%------------------------------------------
@@ -786,7 +738,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.0625, 0.0625);
-beginmfpic(18); % line 239 in the TeX source.
+beginmfpic(18); % line 223 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -813,7 +765,7 @@ polyline (false)
((-0.17492,0),
(-0.333333,0));
-endmfpic; % (18) line 250 in the TeX source.
+endmfpic; % (18) line 234 in the TeX source.
%------------------------------------------
@@ -822,7 +774,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.0625, 0.0625, 0, 0.333333);
-beginmfpic(19); % line 251 in the TeX source.
+beginmfpic(19); % line 235 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -849,7 +801,7 @@ polyline (false)
((0,0.17492),
(0,0.333333));
-endmfpic; % (19) line 262 in the TeX source.
+endmfpic; % (19) line 246 in the TeX source.
%------------------------------------------
@@ -858,7 +810,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.083333, 0.083333);
-beginmfpic(20); % line 263 in the TeX source.
+beginmfpic(20); % line 247 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -887,7 +839,7 @@ polyline (false)
((0.191667,0),
(0.333333,0));
-endmfpic; % (20) line 275 in the TeX source.
+endmfpic; % (20) line 259 in the TeX source.
%------------------------------------------
@@ -896,7 +848,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.083333, 0.083333, 0, 0.333333);
-beginmfpic(21); % line 276 in the TeX source.
+beginmfpic(21); % line 260 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -925,7 +877,7 @@ polyline (false)
((0,0.191667),
(0,0.333333));
-endmfpic; % (21) line 288 in the TeX source.
+endmfpic; % (21) line 272 in the TeX source.
%------------------------------------------
@@ -934,7 +886,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.051253, 0.051253);
-beginmfpic(22); % line 289 in the TeX source.
+beginmfpic(22); % line 273 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -945,9 +897,11 @@ polyline (false)
((0,0),
(0.130582,0));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((0.130582,0),
@@ -956,6 +910,17 @@ polyline (false)
(0.130582,-0.041667),
(0.130582,0));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((0.130582,0),
+(0.130582,0.041667),
+(0.197216,0),
+(0.130582,-0.041667),
+(0.130582,0));
+
store (curpath)
drawn
polyline (false)
@@ -968,7 +933,7 @@ polyline (false)
((0.202751,0),
(0.333333,0));
-endmfpic; % (22) line 305 in the TeX source.
+endmfpic; % (22) line 294 in the TeX source.
%------------------------------------------
@@ -977,7 +942,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.051253, 0.051253, -0.333333, 0);
-beginmfpic(23); % line 306 in the TeX source.
+beginmfpic(23); % line 295 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -988,9 +953,11 @@ polyline (false)
((0,0),
(0,-0.130582));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((0,-0.130582),
@@ -999,6 +966,17 @@ polyline (false)
(-0.041667,-0.130582),
(0,-0.130582));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((0,-0.130582),
+(0.041667,-0.130582),
+(0,-0.197216),
+(-0.041667,-0.130582),
+(0,-0.130582));
+
store (curpath)
drawn
polyline (false)
@@ -1011,7 +989,7 @@ polyline (false)
((0,-0.202751),
(0,-0.333333));
-endmfpic; % (23) line 322 in the TeX source.
+endmfpic; % (23) line 316 in the TeX source.
%------------------------------------------
@@ -1020,7 +998,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.051253, 0.051253);
-beginmfpic(24); % line 323 in the TeX source.
+beginmfpic(24); % line 317 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1031,9 +1009,11 @@ polyline (false)
((0,0),
(-0.130582,0));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((-0.130582,0),
@@ -1042,6 +1022,17 @@ polyline (false)
(-0.130582,0.041667),
(-0.130582,0));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((-0.130582,0),
+(-0.130582,-0.041667),
+(-0.197216,0),
+(-0.130582,0.041667),
+(-0.130582,0));
+
store (curpath)
drawn
polyline (false)
@@ -1054,7 +1045,7 @@ polyline (false)
((-0.202751,0),
(-0.333333,0));
-endmfpic; % (24) line 339 in the TeX source.
+endmfpic; % (24) line 338 in the TeX source.
%------------------------------------------
@@ -1063,7 +1054,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.051253, 0.051253, 0, 0.333333);
-beginmfpic(25); % line 340 in the TeX source.
+beginmfpic(25); % line 339 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1074,9 +1065,11 @@ polyline (false)
((0,0),
(0,0.130582));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((0,0.130582),
@@ -1085,6 +1078,17 @@ polyline (false)
(0.041667,0.130582),
(0,0.130582));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((0,0.130582),
+(-0.041667,0.130582),
+(0,0.197216),
+(0.041667,0.130582),
+(0,0.130582));
+
store (curpath)
drawn
polyline (false)
@@ -1097,7 +1101,7 @@ polyline (false)
((0,0.202751),
(0,0.333333));
-endmfpic; % (25) line 356 in the TeX source.
+endmfpic; % (25) line 360 in the TeX source.
%------------------------------------------
@@ -1106,7 +1110,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.051253, 0.051253);
-beginmfpic(26); % line 357 in the TeX source.
+beginmfpic(26); % line 361 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1117,9 +1121,11 @@ polyline (false)
((0,0),
(0.130582,0));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((0.130582,0),
@@ -1128,6 +1134,17 @@ polyline (false)
(0.130582,-0.041667),
(0.130582,0));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((0.130582,0),
+(0.130582,0.041667),
+(0.197216,0),
+(0.130582,-0.041667),
+(0.130582,0));
+
store (curpath)
drawn
polyline (false)
@@ -1142,7 +1159,7 @@ polyline (false)
((0.202751,0),
(0.333333,0));
-endmfpic; % (26) line 375 in the TeX source.
+endmfpic; % (26) line 384 in the TeX source.
%------------------------------------------
@@ -1151,7 +1168,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.051253, 0.051253, -0.333333, 0);
-beginmfpic(27); % line 376 in the TeX source.
+beginmfpic(27); % line 385 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1162,9 +1179,11 @@ polyline (false)
((0,0),
(0,-0.130582));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((0,-0.130582),
@@ -1173,6 +1192,17 @@ polyline (false)
(-0.041667,-0.130582),
(0,-0.130582));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((0,-0.130582),
+(0.041667,-0.130582),
+(0,-0.197216),
+(-0.041667,-0.130582),
+(0,-0.130582));
+
store (curpath)
drawn
polyline (false)
@@ -1187,7 +1217,7 @@ polyline (false)
((0,-0.202751),
(0,-0.333333));
-endmfpic; % (27) line 394 in the TeX source.
+endmfpic; % (27) line 408 in the TeX source.
%------------------------------------------
@@ -1196,7 +1226,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.051253, 0.051253);
-beginmfpic(28); % line 395 in the TeX source.
+beginmfpic(28); % line 409 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1207,9 +1237,11 @@ polyline (false)
((0,0),
(-0.130582,0));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((-0.130582,0),
@@ -1218,6 +1250,17 @@ polyline (false)
(-0.130582,0.041667),
(-0.130582,0));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((-0.130582,0),
+(-0.130582,-0.041667),
+(-0.197216,0),
+(-0.130582,0.041667),
+(-0.130582,0));
+
store (curpath)
drawn
polyline (false)
@@ -1232,7 +1275,7 @@ polyline (false)
((-0.202751,0),
(-0.333333,0));
-endmfpic; % (28) line 413 in the TeX source.
+endmfpic; % (28) line 432 in the TeX source.
%------------------------------------------
@@ -1241,7 +1284,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.051253, 0.051253, 0, 0.333333);
-beginmfpic(29); % line 414 in the TeX source.
+beginmfpic(29); % line 433 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1252,9 +1295,11 @@ polyline (false)
((0,0),
(0,0.130582));
+resizedrawpen (0bp);
+
store (curpath)
-filled
drawn
+filled
lclosed
polyline (false)
((0,0.130582),
@@ -1263,6 +1308,17 @@ polyline (false)
(0.041667,0.130582),
(0,0.130582));
+resizedrawpen (0.8bp);
+
+store (curpath)
+drawn
+polyline (false)
+((0,0.130582),
+(-0.041667,0.130582),
+(0,0.197216),
+(0.041667,0.130582),
+(0,0.130582));
+
store (curpath)
drawn
polyline (false)
@@ -1277,7 +1333,7 @@ polyline (false)
((0,0.202751),
(0,0.333333));
-endmfpic; % (29) line 432 in the TeX source.
+endmfpic; % (29) line 456 in the TeX source.
%------------------------------------------
@@ -1286,7 +1342,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.036084, 0.333333, -0.051253, 0.051253);
-beginmfpic(30); % line 433 in the TeX source.
+beginmfpic(30); % line 457 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1297,7 +1353,7 @@ polyline (false)
((-0.036084,-0.045718),
(-0.036084,0.045718));
-endmfpic; % (30) line 439 in the TeX source.
+endmfpic; % (30) line 463 in the TeX source.
%------------------------------------------
@@ -1306,7 +1362,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.051253, 0.051253, -0.333333, 0.036084);
-beginmfpic(31); % line 440 in the TeX source.
+beginmfpic(31); % line 464 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1317,7 +1373,7 @@ polyline (false)
((-0.045718,0.036084),
(0.045718,0.036084));
-endmfpic; % (31) line 446 in the TeX source.
+endmfpic; % (31) line 470 in the TeX source.
%------------------------------------------
@@ -1326,7 +1382,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.0625, 0.0625);
-beginmfpic(32); % line 447 in the TeX source.
+beginmfpic(32); % line 471 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1365,7 +1421,7 @@ polyline (false)
((0.208333,0),
(0.333333,0));
-endmfpic; % (32) line 465 in the TeX source.
+endmfpic; % (32) line 489 in the TeX source.
%------------------------------------------
@@ -1374,7 +1430,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.0625, 0.0625, -0.333333, 0);
-beginmfpic(33); % line 466 in the TeX source.
+beginmfpic(33); % line 490 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1413,7 +1469,7 @@ polyline (false)
((0,-0.208333),
(0,-0.333333));
-endmfpic; % (33) line 484 in the TeX source.
+endmfpic; % (33) line 508 in the TeX source.
%------------------------------------------
@@ -1422,7 +1478,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.125, 0.125);
-beginmfpic(34); % line 485 in the TeX source.
+beginmfpic(34); % line 509 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1443,7 +1499,7 @@ polyline (false)
((0.291667,0),
(0.333333,0));
-endmfpic; % (34) line 494 in the TeX source.
+endmfpic; % (34) line 518 in the TeX source.
%------------------------------------------
@@ -1452,7 +1508,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.125, 0, 0.333333);
-beginmfpic(35); % line 495 in the TeX source.
+beginmfpic(35); % line 519 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1473,7 +1529,7 @@ polyline (false)
((0,0.291667),
(0,0.333333));
-endmfpic; % (35) line 504 in the TeX source.
+endmfpic; % (35) line 528 in the TeX source.
%------------------------------------------
@@ -1482,7 +1538,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.083333, 0.083333, -0.041667, 0.041667);
-beginmfpic(36); % line 505 in the TeX source.
+beginmfpic(36); % line 529 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1495,7 +1551,7 @@ store (curpath)
drawn
arcplr ((0.041667,0),180,360,0.041667);
-endmfpic; % (36) line 511 in the TeX source.
+endmfpic; % (36) line 535 in the TeX source.
%------------------------------------------
@@ -1504,7 +1560,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.15, 0.15);
-beginmfpic(37); % line 512 in the TeX source.
+beginmfpic(37); % line 536 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1530,7 +1586,7 @@ polyline (false)
((0.316667,0),
(0.333333,0));
-endmfpic; % (37) line 525 in the TeX source.
+endmfpic; % (37) line 549 in the TeX source.
%------------------------------------------
@@ -1539,7 +1595,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, 0, 0.333333);
-beginmfpic(38); % line 526 in the TeX source.
+beginmfpic(38); % line 550 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1565,7 +1621,7 @@ polyline (false)
((0,0.316667),
(0,0.333333));
-endmfpic; % (38) line 539 in the TeX source.
+endmfpic; % (38) line 563 in the TeX source.
%------------------------------------------
@@ -1574,7 +1630,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.1875, -0.025, 0.025);
-beginmfpic(39); % line 540 in the TeX source.
+beginmfpic(39); % line 564 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1596,7 +1652,7 @@ polyline (false)
((0,0),
(0.164594,0));
-endmfpic; % (39) line 548 in the TeX source.
+endmfpic; % (39) line 572 in the TeX source.
%------------------------------------------
@@ -1605,7 +1661,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.025, 0.025, -0.1875, 0);
-beginmfpic(40); % line 549 in the TeX source.
+beginmfpic(40); % line 573 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1627,7 +1683,7 @@ polyline (false)
((0,0),
(0,-0.164594));
-endmfpic; % (40) line 557 in the TeX source.
+endmfpic; % (40) line 581 in the TeX source.
%------------------------------------------
@@ -1636,7 +1692,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1875, 0, -0.025, 0.025);
-beginmfpic(41); % line 558 in the TeX source.
+beginmfpic(41); % line 582 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1658,7 +1714,7 @@ polyline (false)
((0,0),
(-0.164594,0));
-endmfpic; % (41) line 566 in the TeX source.
+endmfpic; % (41) line 590 in the TeX source.
%------------------------------------------
@@ -1667,7 +1723,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.025, 0.025, 0, 0.1875);
-beginmfpic(42); % line 567 in the TeX source.
+beginmfpic(42); % line 591 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1689,7 +1745,7 @@ polyline (false)
((0,0),
(0,0.164594));
-endmfpic; % (42) line 575 in the TeX source.
+endmfpic; % (42) line 599 in the TeX source.
%------------------------------------------
@@ -1698,7 +1754,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.132583, 0, 0.132583);
-beginmfpic(43); % line 576 in the TeX source.
+beginmfpic(43); % line 600 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1720,7 +1776,7 @@ polyline (false)
((0,0),
(0.116385,0.116385));
-endmfpic; % (43) line 584 in the TeX source.
+endmfpic; % (43) line 608 in the TeX source.
%------------------------------------------
@@ -1729,7 +1785,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.132583, 0, 0, 0.132583);
-beginmfpic(44); % line 585 in the TeX source.
+beginmfpic(44); % line 609 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1751,7 +1807,7 @@ polyline (false)
((0,0),
(-0.116385,0.116385));
-endmfpic; % (44) line 593 in the TeX source.
+endmfpic; % (44) line 617 in the TeX source.
%------------------------------------------
@@ -1760,7 +1816,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.132583, 0, -0.132583, 0);
-beginmfpic(45); % line 594 in the TeX source.
+beginmfpic(45); % line 618 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1782,7 +1838,7 @@ polyline (false)
((0,0),
(-0.116385,-0.116385));
-endmfpic; % (45) line 602 in the TeX source.
+endmfpic; % (45) line 626 in the TeX source.
%------------------------------------------
@@ -1791,7 +1847,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.132583, -0.132583, 0);
-beginmfpic(46); % line 603 in the TeX source.
+beginmfpic(46); % line 627 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1813,7 +1869,7 @@ polyline (false)
((0,0),
(0.116385,-0.116385));
-endmfpic; % (46) line 611 in the TeX source.
+endmfpic; % (46) line 635 in the TeX source.
%------------------------------------------
@@ -1822,7 +1878,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.125, 0.125);
-beginmfpic(47); % line 612 in the TeX source.
+beginmfpic(47); % line 636 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1851,7 +1907,7 @@ polyline (false)
((0.1875,0),
(0.333333,0));
-endmfpic; % (47) line 624 in the TeX source.
+endmfpic; % (47) line 648 in the TeX source.
%------------------------------------------
@@ -1860,7 +1916,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.125, -0.333333, 0);
-beginmfpic(48); % line 625 in the TeX source.
+beginmfpic(48); % line 649 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1889,7 +1945,7 @@ polyline (false)
((0,-0.1875),
(0,-0.333333));
-endmfpic; % (48) line 637 in the TeX source.
+endmfpic; % (48) line 661 in the TeX source.
%------------------------------------------
@@ -1898,7 +1954,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.125, 0.125);
-beginmfpic(49); % line 638 in the TeX source.
+beginmfpic(49); % line 662 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1927,7 +1983,7 @@ polyline (false)
((-0.1875,0),
(-0.333333,0));
-endmfpic; % (49) line 650 in the TeX source.
+endmfpic; % (49) line 674 in the TeX source.
%------------------------------------------
@@ -1936,7 +1992,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.125, 0, 0.333333);
-beginmfpic(50); % line 651 in the TeX source.
+beginmfpic(50); % line 675 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -1965,7 +2021,7 @@ polyline (false)
((0,0.1875),
(0,0.333333));
-endmfpic; % (50) line 663 in the TeX source.
+endmfpic; % (50) line 687 in the TeX source.
%------------------------------------------
@@ -1974,7 +2030,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.125, 0.125);
-beginmfpic(51); % line 664 in the TeX source.
+beginmfpic(51); % line 688 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2027,7 +2083,7 @@ polyline (false)
((0.270833,0),
(0.333333,0));
-endmfpic; % (51) line 684 in the TeX source.
+endmfpic; % (51) line 708 in the TeX source.
%------------------------------------------
@@ -2036,7 +2092,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.125, -0.333333, 0);
-beginmfpic(52); % line 685 in the TeX source.
+beginmfpic(52); % line 709 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2089,7 +2145,7 @@ polyline (false)
((0,-0.270833),
(0,-0.333333));
-endmfpic; % (52) line 705 in the TeX source.
+endmfpic; % (52) line 729 in the TeX source.
%------------------------------------------
@@ -2098,7 +2154,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.125, 0.125);
-beginmfpic(53); % line 706 in the TeX source.
+beginmfpic(53); % line 730 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2151,7 +2207,7 @@ polyline (false)
((-0.270833,0),
(-0.333333,0));
-endmfpic; % (53) line 726 in the TeX source.
+endmfpic; % (53) line 750 in the TeX source.
%------------------------------------------
@@ -2160,7 +2216,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.125, 0, 0.333333);
-beginmfpic(54); % line 727 in the TeX source.
+beginmfpic(54); % line 751 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2213,7 +2269,7 @@ polyline (false)
((0,0.270833),
(0,0.333333));
-endmfpic; % (54) line 747 in the TeX source.
+endmfpic; % (54) line 771 in the TeX source.
%------------------------------------------
@@ -2222,7 +2278,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.05, 0.05);
-beginmfpic(55); % line 748 in the TeX source.
+beginmfpic(55); % line 772 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2249,7 +2305,7 @@ polyline (false)
((0.291667,0),
(0.333333,0));
-endmfpic; % (55) line 762 in the TeX source.
+endmfpic; % (55) line 786 in the TeX source.
%------------------------------------------
@@ -2258,7 +2314,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.05, 0.05, 0, 0.333333);
-beginmfpic(56); % line 763 in the TeX source.
+beginmfpic(56); % line 787 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2285,7 +2341,7 @@ polyline (false)
((0,0.291667),
(0,0.333333));
-endmfpic; % (56) line 777 in the TeX source.
+endmfpic; % (56) line 801 in the TeX source.
%------------------------------------------
@@ -2294,7 +2350,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.021706, 0.125);
-beginmfpic(57); % line 778 in the TeX source.
+beginmfpic(57); % line 802 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2317,7 +2373,7 @@ polyline (false)
((0.25,0),
(0.333333,0));
-endmfpic; % (57) line 788 in the TeX source.
+endmfpic; % (57) line 812 in the TeX source.
%------------------------------------------
@@ -2326,7 +2382,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.021706, 0.125, -0.333333, 0);
-beginmfpic(58); % line 789 in the TeX source.
+beginmfpic(58); % line 813 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2349,7 +2405,7 @@ polyline (false)
((0,-0.25),
(0,-0.333333));
-endmfpic; % (58) line 799 in the TeX source.
+endmfpic; % (58) line 823 in the TeX source.
%------------------------------------------
@@ -2358,7 +2414,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.125, 0.021706);
-beginmfpic(59); % line 800 in the TeX source.
+beginmfpic(59); % line 824 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2381,7 +2437,7 @@ polyline (false)
((-0.25,0),
(-0.333333,0));
-endmfpic; % (59) line 810 in the TeX source.
+endmfpic; % (59) line 834 in the TeX source.
%------------------------------------------
@@ -2390,7 +2446,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.021706, 0, 0.333333);
-beginmfpic(60); % line 811 in the TeX source.
+beginmfpic(60); % line 835 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2413,7 +2469,7 @@ polyline (false)
((0,0.25),
(0,0.333333));
-endmfpic; % (60) line 821 in the TeX source.
+endmfpic; % (60) line 845 in the TeX source.
%------------------------------------------
@@ -2422,7 +2478,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.021706, 0.125);
-beginmfpic(61); % line 822 in the TeX source.
+beginmfpic(61); % line 846 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2469,7 +2525,7 @@ polyline (false)
((0.25,0),
(0.333333,0));
-endmfpic; % (61) line 837 in the TeX source.
+endmfpic; % (61) line 861 in the TeX source.
%------------------------------------------
@@ -2478,7 +2534,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.021706, 0.125, -0.333333, 0);
-beginmfpic(62); % line 838 in the TeX source.
+beginmfpic(62); % line 862 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2525,7 +2581,7 @@ polyline (false)
((0,-0.25),
(0,-0.333333));
-endmfpic; % (62) line 853 in the TeX source.
+endmfpic; % (62) line 877 in the TeX source.
%------------------------------------------
@@ -2534,7 +2590,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.125, 0.021706);
-beginmfpic(63); % line 854 in the TeX source.
+beginmfpic(63); % line 878 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2581,7 +2637,7 @@ polyline (false)
((-0.25,0),
(-0.333333,0));
-endmfpic; % (63) line 869 in the TeX source.
+endmfpic; % (63) line 893 in the TeX source.
%------------------------------------------
@@ -2590,7 +2646,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.021706, 0, 0.333333);
-beginmfpic(64); % line 870 in the TeX source.
+beginmfpic(64); % line 894 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2637,7 +2693,7 @@ polyline (false)
((0,0.25),
(0,0.333333));
-endmfpic; % (64) line 885 in the TeX source.
+endmfpic; % (64) line 909 in the TeX source.
%------------------------------------------
@@ -2646,7 +2702,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.032352, 0.125);
-beginmfpic(65); % line 886 in the TeX source.
+beginmfpic(65); % line 910 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2693,7 +2749,7 @@ polyline (false)
((0.25,0),
(0.333333,0));
-endmfpic; % (65) line 901 in the TeX source.
+endmfpic; % (65) line 925 in the TeX source.
%------------------------------------------
@@ -2702,7 +2758,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.032352, 0.125, -0.333333, 0);
-beginmfpic(66); % line 902 in the TeX source.
+beginmfpic(66); % line 926 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2749,7 +2805,7 @@ polyline (false)
((0,-0.25),
(0,-0.333333));
-endmfpic; % (66) line 917 in the TeX source.
+endmfpic; % (66) line 941 in the TeX source.
%------------------------------------------
@@ -2758,7 +2814,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.125, 0.032352);
-beginmfpic(67); % line 918 in the TeX source.
+beginmfpic(67); % line 942 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2805,7 +2861,7 @@ polyline (false)
((-0.25,0),
(-0.333333,0));
-endmfpic; % (67) line 933 in the TeX source.
+endmfpic; % (67) line 957 in the TeX source.
%------------------------------------------
@@ -2814,7 +2870,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.125, 0.032352, 0, 0.333333);
-beginmfpic(68); % line 934 in the TeX source.
+beginmfpic(68); % line 958 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2861,7 +2917,7 @@ polyline (false)
((0,0.25),
(0,0.333333));
-endmfpic; % (68) line 949 in the TeX source.
+endmfpic; % (68) line 973 in the TeX source.
%------------------------------------------
@@ -2870,7 +2926,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.625, -0.25, 0.25);
-beginmfpic(69); % line 950 in the TeX source.
+beginmfpic(69); % line 974 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2890,7 +2946,7 @@ polyline (false)
(0.5625,0),
(0.625,0));
-endmfpic; % (69) line 961 in the TeX source.
+endmfpic; % (69) line 985 in the TeX source.
%------------------------------------------
@@ -2899,7 +2955,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.25, 0.25, -0.625, 0);
-beginmfpic(70); % line 962 in the TeX source.
+beginmfpic(70); % line 986 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2919,7 +2975,7 @@ polyline (false)
(0,-0.5625),
(0,-0.625));
-endmfpic; % (70) line 973 in the TeX source.
+endmfpic; % (70) line 997 in the TeX source.
%------------------------------------------
@@ -2928,7 +2984,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.625, 0, -0.25, 0.25);
-beginmfpic(71); % line 974 in the TeX source.
+beginmfpic(71); % line 998 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2948,7 +3004,7 @@ polyline (false)
(-0.5625,0),
(-0.625,0));
-endmfpic; % (71) line 985 in the TeX source.
+endmfpic; % (71) line 1009 in the TeX source.
%------------------------------------------
@@ -2957,7 +3013,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.25, 0.25, 0, 0.625);
-beginmfpic(72); % line 986 in the TeX source.
+beginmfpic(72); % line 1010 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -2977,7 +3033,7 @@ polyline (false)
(0,0.5625),
(0,0.625));
-endmfpic; % (72) line 997 in the TeX source.
+endmfpic; % (72) line 1021 in the TeX source.
%------------------------------------------
@@ -2986,7 +3042,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.333333, -0.175, 0.175);
-beginmfpic(73); % line 998 in the TeX source.
+beginmfpic(73); % line 1022 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3015,7 +3071,7 @@ polyline (false)
((0.3125,0),
(0.333333,0));
-endmfpic; % (73) line 1011 in the TeX source.
+endmfpic; % (73) line 1035 in the TeX source.
%------------------------------------------
@@ -3024,7 +3080,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, -0.333333, 0);
-beginmfpic(74); % line 1012 in the TeX source.
+beginmfpic(74); % line 1036 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3053,7 +3109,7 @@ polyline (false)
((0,-0.3125),
(0,-0.333333));
-endmfpic; % (74) line 1025 in the TeX source.
+endmfpic; % (74) line 1049 in the TeX source.
%------------------------------------------
@@ -3062,7 +3118,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.333333, 0, -0.175, 0.175);
-beginmfpic(75); % line 1026 in the TeX source.
+beginmfpic(75); % line 1050 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3091,7 +3147,7 @@ polyline (false)
((-0.3125,0),
(-0.333333,0));
-endmfpic; % (75) line 1039 in the TeX source.
+endmfpic; % (75) line 1063 in the TeX source.
%------------------------------------------
@@ -3100,7 +3156,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.333333);
-beginmfpic(76); % line 1040 in the TeX source.
+beginmfpic(76); % line 1064 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3129,7 +3185,7 @@ polyline (false)
((0,0.3125),
(0,0.333333));
-endmfpic; % (76) line 1053 in the TeX source.
+endmfpic; % (76) line 1077 in the TeX source.
%------------------------------------------
@@ -3138,7 +3194,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.083333, 0.083333, -0.0625, 0);
-beginmfpic(77); % line 1054 in the TeX source.
+beginmfpic(77); % line 1078 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3161,7 +3217,7 @@ polyline (false)
((0.035714,-0.0625),
(-0.035714,-0.0625));
-endmfpic; % (77) line 1064 in the TeX source.
+endmfpic; % (77) line 1088 in the TeX source.
%------------------------------------------
@@ -3170,7 +3226,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.083333, 0.083333, -0.1875, 0);
-beginmfpic(78); % line 1065 in the TeX source.
+beginmfpic(78); % line 1089 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3199,7 +3255,7 @@ polyline (false)
((0.035714,-0.1875),
(-0.035714,-0.1875));
-endmfpic; % (78) line 1077 in the TeX source.
+endmfpic; % (78) line 1101 in the TeX source.
%------------------------------------------
@@ -3208,7 +3264,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.104167, 0.104167, -0.333333, -0);
-beginmfpic(79); % line 1078 in the TeX source.
+beginmfpic(79); % line 1102 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3281,16 +3337,16 @@ polyline (false)
((0.104167,-0.041667),
(0.104167,0));
-endmfpic; % (79) line 1102 in the TeX source.
+endmfpic; % (79) line 1126 in the TeX source.
%------------------------------------------
%----------------------------<80>
unitlen := 1.0pt#;
xscale := 72; yscale := 72;
-bounds (-0, 0.333333, -0.104167, 0.104167);
+bounds (0, 0.333333, -0.104167, 0.104167);
-beginmfpic(80); % line 1103 in the TeX source.
+beginmfpic(80); % line 1127 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3343,7 +3399,7 @@ polyline (false)
store (curpath)
drawn
-arcplr ((0.260417,0.104167),0,-180,0.03125);
+arcplr ((0.260417,0.104167),-0,-180,0.03125);
store (curpath)
drawn
@@ -3363,7 +3419,7 @@ polyline (false)
((0.041667,0.104167),
(0,0.104167));
-endmfpic; % (80) line 1127 in the TeX source.
+endmfpic; % (80) line 1151 in the TeX source.
%------------------------------------------
@@ -3372,7 +3428,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(81); % line 1128 in the TeX source.
+beginmfpic(81); % line 1152 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3418,7 +3474,7 @@ polyline (false)
((0.1625,0.3),
(-0.0375,0.21));
-endmfpic; % (81) line 1144 in the TeX source.
+endmfpic; % (81) line 1168 in the TeX source.
%------------------------------------------
@@ -3427,7 +3483,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.3, 0, -0.1625, 0.1625);
-beginmfpic(82); % line 1145 in the TeX source.
+beginmfpic(82); % line 1169 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3473,7 +3529,7 @@ polyline (false)
((-0.3,0.1625),
(-0.21,-0.0375));
-endmfpic; % (82) line 1161 in the TeX source.
+endmfpic; % (82) line 1185 in the TeX source.
%------------------------------------------
@@ -3482,7 +3538,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(83); % line 1162 in the TeX source.
+beginmfpic(83); % line 1186 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3528,7 +3584,7 @@ polyline (false)
((-0.1625,0.3),
(0.0375,0.21));
-endmfpic; % (83) line 1178 in the TeX source.
+endmfpic; % (83) line 1202 in the TeX source.
%------------------------------------------
@@ -3537,7 +3593,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.3, -0.1625, 0.1625);
-beginmfpic(84); % line 1179 in the TeX source.
+beginmfpic(84); % line 1203 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3583,7 +3639,7 @@ polyline (false)
((0.3,0.1625),
(0.21,-0.0375));
-endmfpic; % (84) line 1195 in the TeX source.
+endmfpic; % (84) line 1219 in the TeX source.
%------------------------------------------
@@ -3592,7 +3648,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(85); % line 1196 in the TeX source.
+beginmfpic(85); % line 1220 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3638,7 +3694,7 @@ polyline (false)
((0.1625,0.3),
(-0.0375,0.21));
-endmfpic; % (85) line 1212 in the TeX source.
+endmfpic; % (85) line 1236 in the TeX source.
%------------------------------------------
@@ -3647,7 +3703,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.3, 0, -0.1625, 0.1625);
-beginmfpic(86); % line 1213 in the TeX source.
+beginmfpic(86); % line 1237 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3693,7 +3749,7 @@ polyline (false)
((-0.3,0.1625),
(-0.21,-0.0375));
-endmfpic; % (86) line 1229 in the TeX source.
+endmfpic; % (86) line 1253 in the TeX source.
%------------------------------------------
@@ -3702,7 +3758,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1625, 0.1625, 0, 0.3);
-beginmfpic(87); % line 1230 in the TeX source.
+beginmfpic(87); % line 1254 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3748,7 +3804,7 @@ polyline (false)
((-0.1625,0.3),
(0.0375,0.21));
-endmfpic; % (87) line 1246 in the TeX source.
+endmfpic; % (87) line 1270 in the TeX source.
%------------------------------------------
@@ -3757,7 +3813,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.3, -0.1625, 0.1625);
-beginmfpic(88); % line 1247 in the TeX source.
+beginmfpic(88); % line 1271 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3803,7 +3859,7 @@ polyline (false)
((0.3,0.1625),
(0.21,-0.0375));
-endmfpic; % (88) line 1263 in the TeX source.
+endmfpic; % (88) line 1287 in the TeX source.
%------------------------------------------
@@ -3812,7 +3868,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.4, -0.2, 0.2);
-beginmfpic(89); % line 1264 in the TeX source.
+beginmfpic(89); % line 1288 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3821,7 +3877,7 @@ store (curpath)
drawn
circle ((0.2,0),0.2);
-endmfpic; % (89) line 1269 in the TeX source.
+endmfpic; % (89) line 1293 in the TeX source.
%------------------------------------------
@@ -3830,7 +3886,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(90); % line 1270 in the TeX source.
+beginmfpic(90); % line 1294 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3870,7 +3926,7 @@ polyline (false)
((0.175,0.027778),
(0,0.027778));
-endmfpic; % (90) line 1284 in the TeX source.
+endmfpic; % (90) line 1308 in the TeX source.
%------------------------------------------
@@ -3879,7 +3935,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(91); % line 1285 in the TeX source.
+beginmfpic(91); % line 1309 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3919,7 +3975,7 @@ polyline (false)
((-0.175,0.027778),
(0,0.027778));
-endmfpic; % (91) line 1299 in the TeX source.
+endmfpic; % (91) line 1323 in the TeX source.
%------------------------------------------
@@ -3928,7 +3984,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(92); % line 1300 in the TeX source.
+beginmfpic(92); % line 1324 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -3974,7 +4030,7 @@ polyline (false)
((0.175,0.027778),
(0,0.027778));
-endmfpic; % (92) line 1316 in the TeX source.
+endmfpic; % (92) line 1340 in the TeX source.
%------------------------------------------
@@ -3983,7 +4039,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.252778);
-beginmfpic(93); % line 1317 in the TeX source.
+beginmfpic(93); % line 1341 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4029,7 +4085,7 @@ polyline (false)
((-0.175,0.027778),
(0,0.027778));
-endmfpic; % (93) line 1333 in the TeX source.
+endmfpic; % (93) line 1357 in the TeX source.
%------------------------------------------
@@ -4038,7 +4094,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(94); % line 1334 in the TeX source.
+beginmfpic(94); % line 1358 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4111,7 +4167,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (94) line 1361 in the TeX source.
+endmfpic; % (94) line 1385 in the TeX source.
%------------------------------------------
@@ -4120,7 +4176,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(95); % line 1362 in the TeX source.
+beginmfpic(95); % line 1386 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4193,7 +4249,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (95) line 1389 in the TeX source.
+endmfpic; % (95) line 1413 in the TeX source.
%------------------------------------------
@@ -4202,7 +4258,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(96); % line 1390 in the TeX source.
+beginmfpic(96); % line 1414 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4275,7 +4331,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (96) line 1417 in the TeX source.
+endmfpic; % (96) line 1441 in the TeX source.
%------------------------------------------
@@ -4284,7 +4340,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(97); % line 1418 in the TeX source.
+beginmfpic(97); % line 1442 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4357,7 +4413,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (97) line 1445 in the TeX source.
+endmfpic; % (97) line 1469 in the TeX source.
%------------------------------------------
@@ -4366,7 +4422,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(98); % line 1446 in the TeX source.
+beginmfpic(98); % line 1470 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4427,7 +4483,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (98) line 1469 in the TeX source.
+endmfpic; % (98) line 1493 in the TeX source.
%------------------------------------------
@@ -4436,7 +4492,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(99); % line 1470 in the TeX source.
+beginmfpic(99); % line 1494 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4497,7 +4553,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (99) line 1493 in the TeX source.
+endmfpic; % (99) line 1517 in the TeX source.
%------------------------------------------
@@ -4506,7 +4562,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(100); % line 1494 in the TeX source.
+beginmfpic(100); % line 1518 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4567,7 +4623,7 @@ polyline (false)
((0.175,0.025),
(0,0.025));
-endmfpic; % (100) line 1517 in the TeX source.
+endmfpic; % (100) line 1541 in the TeX source.
%------------------------------------------
@@ -4576,7 +4632,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0.175, 0, 0.25);
-beginmfpic(101); % line 1518 in the TeX source.
+beginmfpic(101); % line 1542 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4637,7 +4693,7 @@ polyline (false)
((-0.175,0.025),
(0,0.025));
-endmfpic; % (101) line 1541 in the TeX source.
+endmfpic; % (101) line 1565 in the TeX source.
%------------------------------------------
@@ -4646,7 +4702,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.35, -0.15, 0.15);
-beginmfpic(102); % line 1542 in the TeX source.
+beginmfpic(102); % line 1566 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4663,7 +4719,7 @@ store (curpath)
drawn
arcplr ((0.2,0),90,-90,0.15);
-endmfpic; % (102) line 1551 in the TeX source.
+endmfpic; % (102) line 1575 in the TeX source.
%------------------------------------------
@@ -4672,7 +4728,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, -0.35, 0);
-beginmfpic(103); % line 1552 in the TeX source.
+beginmfpic(103); % line 1576 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4689,7 +4745,7 @@ store (curpath)
drawn
arcplr ((0,-0.2),0,-180,0.15);
-endmfpic; % (103) line 1561 in the TeX source.
+endmfpic; % (103) line 1585 in the TeX source.
%------------------------------------------
@@ -4698,7 +4754,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.35, 0, -0.15, 0.15);
-beginmfpic(104); % line 1562 in the TeX source.
+beginmfpic(104); % line 1586 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4715,7 +4771,7 @@ store (curpath)
drawn
arcplr ((-0.2,0),-90,-270,0.15);
-endmfpic; % (104) line 1571 in the TeX source.
+endmfpic; % (104) line 1595 in the TeX source.
%------------------------------------------
@@ -4724,7 +4780,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, 0, 0.35);
-beginmfpic(105); % line 1572 in the TeX source.
+beginmfpic(105); % line 1596 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4741,7 +4797,7 @@ store (curpath)
drawn
arcplr ((0,0.2),-180,-360,0.15);
-endmfpic; % (105) line 1581 in the TeX source.
+endmfpic; % (105) line 1605 in the TeX source.
%------------------------------------------
@@ -4750,7 +4806,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.355556, -0.151089, 0.151089);
-beginmfpic(106); % line 1582 in the TeX source.
+beginmfpic(106); % line 1606 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4779,7 +4835,7 @@ store (curpath)
drawn
arcplr ((0.122222,0.105392),-90,-24.529547,0.256481);
-endmfpic; % (106) line 1593 in the TeX source.
+endmfpic; % (106) line 1617 in the TeX source.
%------------------------------------------
@@ -4788,7 +4844,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.355556, -0);
-beginmfpic(107); % line 1594 in the TeX source.
+beginmfpic(107); % line 1618 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4817,7 +4873,7 @@ store (curpath)
drawn
arcplr ((0.105392,-0.122222),180,245.470453,0.256481);
-endmfpic; % (107) line 1605 in the TeX source.
+endmfpic; % (107) line 1629 in the TeX source.
%------------------------------------------
@@ -4826,7 +4882,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.355556, -0, -0.151089, 0.151089);
-beginmfpic(108); % line 1606 in the TeX source.
+beginmfpic(108); % line 1630 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4855,7 +4911,7 @@ store (curpath)
drawn
arcplr ((-0.122222,-0.105392),90,155.470453,0.256481);
-endmfpic; % (108) line 1617 in the TeX source.
+endmfpic; % (108) line 1641 in the TeX source.
%------------------------------------------
@@ -4864,7 +4920,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.355556);
-beginmfpic(109); % line 1618 in the TeX source.
+beginmfpic(109); % line 1642 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4893,7 +4949,7 @@ store (curpath)
drawn
arcplr ((-0.105392,0.122222),0,65.470453,0.256481);
-endmfpic; % (109) line 1629 in the TeX source.
+endmfpic; % (109) line 1653 in the TeX source.
%------------------------------------------
@@ -4902,7 +4958,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.175, -0.1, 0.1);
-beginmfpic(110); % line 1630 in the TeX source.
+beginmfpic(110); % line 1654 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4915,7 +4971,7 @@ polyline (false)
(0,0.1),
(0.175,0));
-endmfpic; % (110) line 1638 in the TeX source.
+endmfpic; % (110) line 1662 in the TeX source.
%------------------------------------------
@@ -4924,7 +4980,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, -0.175, 0);
-beginmfpic(111); % line 1639 in the TeX source.
+beginmfpic(111); % line 1663 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4937,7 +4993,7 @@ polyline (false)
(0.1,0),
(0,-0.175));
-endmfpic; % (111) line 1647 in the TeX source.
+endmfpic; % (111) line 1671 in the TeX source.
%------------------------------------------
@@ -4946,7 +5002,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.175, 0, -0.1, 0.1);
-beginmfpic(112); % line 1648 in the TeX source.
+beginmfpic(112); % line 1672 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4959,7 +5015,7 @@ polyline (false)
(0,-0.1),
(-0.175,0));
-endmfpic; % (112) line 1656 in the TeX source.
+endmfpic; % (112) line 1680 in the TeX source.
%------------------------------------------
@@ -4968,7 +5024,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, 0, 0.175);
-beginmfpic(113); % line 1657 in the TeX source.
+beginmfpic(113); % line 1681 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -4981,7 +5037,7 @@ polyline (false)
(-0.1,0),
(0,0.175));
-endmfpic; % (113) line 1665 in the TeX source.
+endmfpic; % (113) line 1689 in the TeX source.
%------------------------------------------
@@ -4990,7 +5046,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.425, -0.15, 0.15);
-beginmfpic(114); % line 1666 in the TeX source.
+beginmfpic(114); % line 1690 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5011,7 +5067,7 @@ store (curpath)
drawn
circle ((0.3875,0),0.0375);
-endmfpic; % (114) line 1676 in the TeX source.
+endmfpic; % (114) line 1700 in the TeX source.
%------------------------------------------
@@ -5020,7 +5076,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, -0.425, 0);
-beginmfpic(115); % line 1677 in the TeX source.
+beginmfpic(115); % line 1701 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5041,7 +5097,7 @@ store (curpath)
drawn
circle ((0,-0.3875),0.0375);
-endmfpic; % (115) line 1687 in the TeX source.
+endmfpic; % (115) line 1711 in the TeX source.
%------------------------------------------
@@ -5050,7 +5106,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.425, 0, -0.15, 0.15);
-beginmfpic(116); % line 1688 in the TeX source.
+beginmfpic(116); % line 1712 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5071,7 +5127,7 @@ store (curpath)
drawn
circle ((-0.3875,0),0.0375);
-endmfpic; % (116) line 1698 in the TeX source.
+endmfpic; % (116) line 1722 in the TeX source.
%------------------------------------------
@@ -5080,7 +5136,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.15, 0.15, 0, 0.425);
-beginmfpic(117); % line 1699 in the TeX source.
+beginmfpic(117); % line 1723 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5101,7 +5157,7 @@ store (curpath)
drawn
circle ((0,0.3875),0.0375);
-endmfpic; % (117) line 1709 in the TeX source.
+endmfpic; % (117) line 1733 in the TeX source.
%------------------------------------------
@@ -5110,7 +5166,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.430556, -0.151089, 0.151089);
-beginmfpic(118); % line 1710 in the TeX source.
+beginmfpic(118); % line 1734 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5143,7 +5199,7 @@ store (curpath)
drawn
circle ((0.393056,-0.001089),0.0375);
-endmfpic; % (118) line 1722 in the TeX source.
+endmfpic; % (118) line 1746 in the TeX source.
%------------------------------------------
@@ -5152,7 +5208,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.430556, -0);
-beginmfpic(119); % line 1723 in the TeX source.
+beginmfpic(119); % line 1747 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5185,7 +5241,7 @@ store (curpath)
drawn
circle ((-0.001089,-0.393056),0.0375);
-endmfpic; % (119) line 1735 in the TeX source.
+endmfpic; % (119) line 1759 in the TeX source.
%------------------------------------------
@@ -5194,7 +5250,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.430556, -0, -0.151089, 0.151089);
-beginmfpic(120); % line 1736 in the TeX source.
+beginmfpic(120); % line 1760 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5227,7 +5283,7 @@ store (curpath)
drawn
circle ((-0.393056,0.001089),0.0375);
-endmfpic; % (120) line 1748 in the TeX source.
+endmfpic; % (120) line 1772 in the TeX source.
%------------------------------------------
@@ -5236,7 +5292,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.430556);
-beginmfpic(121); % line 1749 in the TeX source.
+beginmfpic(121); % line 1773 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5269,7 +5325,7 @@ store (curpath)
drawn
circle ((0.001089,0.393056),0.0375);
-endmfpic; % (121) line 1761 in the TeX source.
+endmfpic; % (121) line 1785 in the TeX source.
%------------------------------------------
@@ -5278,7 +5334,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.4, -0.151089, 0.151089);
-beginmfpic(122); % line 1762 in the TeX source.
+beginmfpic(122); % line 1786 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5311,7 +5367,7 @@ store (curpath)
drawn
arcplr ((0.166667,0.105392),-90,-24.529547,0.256481);
-endmfpic; % (122) line 1774 in the TeX source.
+endmfpic; % (122) line 1798 in the TeX source.
%------------------------------------------
@@ -5320,7 +5376,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.4, 0);
-beginmfpic(123); % line 1775 in the TeX source.
+beginmfpic(123); % line 1799 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5353,7 +5409,7 @@ store (curpath)
drawn
arcplr ((0.105392,-0.166667),180,245.470453,0.256481);
-endmfpic; % (123) line 1787 in the TeX source.
+endmfpic; % (123) line 1811 in the TeX source.
%------------------------------------------
@@ -5362,7 +5418,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.4, -0, -0.151089, 0.151089);
-beginmfpic(124); % line 1788 in the TeX source.
+beginmfpic(124); % line 1812 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5395,7 +5451,7 @@ store (curpath)
drawn
arcplr ((-0.166667,-0.105392),90,155.470453,0.256481);
-endmfpic; % (124) line 1800 in the TeX source.
+endmfpic; % (124) line 1824 in the TeX source.
%------------------------------------------
@@ -5404,7 +5460,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.4);
-beginmfpic(125); % line 1801 in the TeX source.
+beginmfpic(125); % line 1825 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5437,7 +5493,7 @@ store (curpath)
drawn
arcplr ((-0.105392,0.166667),0,65.470453,0.256481);
-endmfpic; % (125) line 1813 in the TeX source.
+endmfpic; % (125) line 1837 in the TeX source.
%------------------------------------------
@@ -5446,7 +5502,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.475, -0.151089, 0.151089);
-beginmfpic(126); % line 1814 in the TeX source.
+beginmfpic(126); % line 1838 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5483,7 +5539,7 @@ store (curpath)
drawn
circle ((0.4375,-0.001089),0.0375);
-endmfpic; % (126) line 1827 in the TeX source.
+endmfpic; % (126) line 1851 in the TeX source.
%------------------------------------------
@@ -5492,7 +5548,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, -0.475, 0);
-beginmfpic(127); % line 1828 in the TeX source.
+beginmfpic(127); % line 1852 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5529,7 +5585,7 @@ store (curpath)
drawn
circle ((-0.001089,-0.4375),0.0375);
-endmfpic; % (127) line 1841 in the TeX source.
+endmfpic; % (127) line 1865 in the TeX source.
%------------------------------------------
@@ -5538,7 +5594,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.475, -0, -0.151089, 0.151089);
-beginmfpic(128); % line 1842 in the TeX source.
+beginmfpic(128); % line 1866 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5575,7 +5631,7 @@ store (curpath)
drawn
circle ((-0.4375,0.001089),0.0375);
-endmfpic; % (128) line 1855 in the TeX source.
+endmfpic; % (128) line 1879 in the TeX source.
%------------------------------------------
@@ -5584,7 +5640,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.151089, 0.151089, 0, 0.475);
-beginmfpic(129); % line 1856 in the TeX source.
+beginmfpic(129); % line 1880 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5621,7 +5677,7 @@ store (curpath)
drawn
circle ((0.001089,0.4375),0.0375);
-endmfpic; % (129) line 1869 in the TeX source.
+endmfpic; % (129) line 1893 in the TeX source.
%------------------------------------------
@@ -5630,7 +5686,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (0, 0.25, -0.1, 0.1);
-beginmfpic(130); % line 1870 in the TeX source.
+beginmfpic(130); % line 1894 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5647,7 +5703,7 @@ store (curpath)
drawn
circle ((0.2125,0),0.0375);
-endmfpic; % (130) line 1879 in the TeX source.
+endmfpic; % (130) line 1903 in the TeX source.
%------------------------------------------
@@ -5656,7 +5712,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, -0.25, 0);
-beginmfpic(131); % line 1880 in the TeX source.
+beginmfpic(131); % line 1904 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5673,7 +5729,7 @@ store (curpath)
drawn
circle ((0,-0.2125),0.0375);
-endmfpic; % (131) line 1889 in the TeX source.
+endmfpic; % (131) line 1913 in the TeX source.
%------------------------------------------
@@ -5682,7 +5738,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.25, 0, -0.1, 0.1);
-beginmfpic(132); % line 1890 in the TeX source.
+beginmfpic(132); % line 1914 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5699,7 +5755,7 @@ store (curpath)
drawn
circle ((-0.2125,0),0.0375);
-endmfpic; % (132) line 1899 in the TeX source.
+endmfpic; % (132) line 1923 in the TeX source.
%------------------------------------------
@@ -5708,7 +5764,7 @@ unitlen := 1.0pt#;
xscale := 72; yscale := 72;
bounds (-0.1, 0.1, 0, 0.25);
-beginmfpic(133); % line 1900 in the TeX source.
+beginmfpic(133); % line 1924 in the TeX source.
resizedrawpen (0.8bp);
setcolor (drawcolor) black;
@@ -5725,7 +5781,7 @@ store (curpath)
drawn
circle ((0,0.2125),0.0375);
-endmfpic; % (133) line 1909 in the TeX source.
+endmfpic; % (133) line 1933 in the TeX source.
%------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.tfm b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.tfm
index 142e6cd003f..a26fea7161e 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.tfm
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.tfm
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4
index c0033d63fe6..5f5a9cb8bd5 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/person.m4
@@ -30,12 +30,17 @@ define(`person',`[ setkey_(`$1',height,linewid)
divert(0)dnl
linewid = 3*linewid
+ movewid = 0.2
setrgb(0.54,0.81,0.94,babyblue)
person(fill="babyblue")
+ move
person(width=linewid*3/4;fill="babyblue")
+ move
person(width=linewid;fill="babyblue")
+ move
person
+ move
resetrgb
person(height=1;fill="gray")
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4
index b3273794cd0..7966a32294b 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4
@@ -3,7 +3,7 @@
cct_init
spc = dimen_/3
-{ relaycoil; S: "\tt re{}laycoil" at last [].s+(0,-20bp__)
+{ relaycoil; S: `"\tt relaycoil"' at last [].s+(0,-16bp__)
{ "\sl V1" wid 10bp__ at last [].V1 rjust
"\sl V2" at last [].V2 ljust }
K: relaycoil(NX) with .nw at last [].ne+(spc*4,0); "\tt (NX)" at (last [],S)
@@ -20,10 +20,12 @@ cct_init
{ "\sl V1" at last [].V1 rjust; "\sl V2" at last [].V2 rjust }
relaycoil(BXSR) with .nw at last [].ne+(spc*2,0); "\tt (BXSR)" at (last [],S)
{ "\sl V1" at last [].V1 ljust; "\sl V2" at last [].V2 ljust }
- relaycoil(SR) with .nw at last [].ne+(spc*4,0); "\tt (SR)" at (last [],S)
+ relaycoil(SR) with .nw at last [].ne+(spc*3,0); "\tt (SR)" at (last [],S)
relaycoil(SO) with .nw at last [].ne+(spc,0); "\tt (SO)" at (last [],S)
relaycoil(SOR) with .nw at last [].ne+(spc,0); "\tt (SOR)" at (last [],S)
+ relaycoil(PC) with .nw at last [].ne+(spc,0); "\tt (PC)" at (last [],S)
}
+ spc = dimen_/4
{
move down_ 3/4; right_
relaycoil(HS); S: "\tt (HS)" at last [].s+(0,-12bp__)
@@ -35,6 +37,7 @@ cct_init
relaycoil(RH) with .nw at last [].ne+(spc,0); "\tt (RH)" at (last [],S)
relaycoil(TH) with .nw at last [].ne+(spc,0); "\tt (TH)" at (last [],S)
relaycoil(EL) with .nw at last [].ne+(spc,0); "\tt (EL)" at (last [],S)
+ relaycoil(MR) with .sw at last [].se+(spc,0); "\tt (MR)" at (last [],S)
}
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4
index 3555057447d..749e09896d4 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/shapes.m4
@@ -18,14 +18,14 @@ define(`cylinder3D',`[ Start: (0,0)
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
cs = dot3D(View3D,M4CL)/lenc
- End: (project(M4CL))
+ End: (Project(M4CL))
az = atan2(ydispl,xdispl)
ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
CL: line invis from Start to End; C: CL.c
nls = int(twopi_*radc/lthick)
define(`M4PP',`rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))')dnl
for i=0 to nls-1 do { if dot3D(View3D,M4PP) > 0 then {
- P: (project(M4PP))
+ P: (Project(M4PP))
ql = sqrta(dot3D(Light3D,M4PP)/radc)
line from P to End+P outlined rgbstring(ql,ql,ql) `$5' } }
Perp: (vperp(CL,radc))
@@ -52,7 +52,7 @@ define(`cone3D',`[ Start: (0,0)
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
- End: (project(M4CL))
+ End: (Project(M4CL))
cs = dot3D(View3D,M4CL)/lenc
az = atan2(ydispl,xdispl)
ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
@@ -64,7 +64,7 @@ define(`cone3D',`[ Start: (0,0)
rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,radc,0,lenc)))) > 0 then {
ql = sqrta(dot3D(Light3D,
rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,radc,0,lenc))))/lt)
- P: (project(rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))))
+ P: (Project(rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))))
line from P to End outlined rgbstring(ql,ql,ql) `$5'
if !b then { WB: P; b = 1 }
} else { if b then { BW: P; b = 0 } } }
@@ -121,7 +121,7 @@ define(`prism3D',`[ Start: (0,0)
widp = ifelse(`$4',,(linewid/5),`$4')
htp = ifelse(`$5',,(linewid/10),`$5')
rotp = ifelse(`$6',,0,`$6')
- End: (project(xdispl,ydispl,zdispl)); C: 0.5 between Start and End
+ End: (Project(xdispl,ydispl,zdispl)); C: 0.5 between Start and End
lenp = length3D(xdispl,ydispl,zdispl)
az = atan2(ydispl,xdispl); ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
wp2 = widp/2; hp2 = htp/2
@@ -148,10 +148,10 @@ define(`PFacet',`cross3D(diff3D(`$2'x,`$2'y,`$2'z,`$1'x,`$1'y,`$1'z),
diff3D(`$3'x,`$3'y,`$3'z,`$2'x,`$2'y,`$2'z))')
if dot3D(View3D,PFacet) > 0 then {
fFacet = sqrta(dot3D(Light3D,PFacet)/length3D(PFacet))
- P1: (project(`$1'x,`$1'y,`$1'z))
- P2: (project(`$2'x,`$2'y,`$2'z))
- P3: (project(`$3'x,`$3'y,`$3'z))
- P4: (project(`$4'x,`$4'y,`$4'z))
+ P1: (Project(`$1'x,`$1'y,`$1'z))
+ P2: (Project(`$2'x,`$2'y,`$2'z))
+ P3: (Project(`$3'x,`$3'y,`$3'z))
+ P4: (Project(`$4'x,`$4'y,`$4'z))
line fill_(fFacet) invis from P1 to P2 then to P3 then to P4 then to P1
line from P1 to P2; round
line to P3; round
@@ -170,7 +170,7 @@ setview(azimuth,elev)
Arrow3D(0,1,0) with .Start at Orig; "y" ljust at last [].End
Arrow3D(0,0,1.2) with .Start at Orig; "z" above at last [].End
setlight(0,0,0)
- cylinder3D(1,1,1,0.6) with .Start at (project(0.5,0.5,0.5))
+ cylinder3D(1,1,1,0.6) with .Start at (Project(0.5,0.5,0.5))
]
Ball: shadedball(0.5) with .nw at last [].ne+(-0.25,0)
[
@@ -180,7 +180,7 @@ setview(azimuth,elev)
for i=0 to n do {
r = i/n*(thmax-thmin)+thmin
prism3D(rot3Dz(r,rot3Dy(pi_/4,len,0,0)),0.2,0.1) \
- with .Start at (project(rot3Dz(r,rot3Dy(pi_/4,len*0.5,0,0)))) }
+ with .Start at (Project(rot3Dz(r,rot3Dy(pi_/4,len*0.5,0,0)))) }
] with .nw at last [].ne
[
setlight(0,0)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AlogixSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AlogixSVG.m4
index 58cac40f0cb..03362739039 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AlogixSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AlogixSVG.m4
@@ -21,9 +21,9 @@ A: Autologix(
B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N) \
with .sw at A.e+(1.3,-0.5)
"svg_it(Out)" at B.Out above ljust
- "svg_tt(`Autologix(')" wid 68bp__ with .w at B.sw+(0,-0.15)
- "svg_tt(`Or(And(B,Not(C)),And(Not(A),B,C)),N)')" \
- wid 262bp__ with .w at last "".w+(0.2,-0.18)
+ "svg_tt(`Autologix(Or(And(B,Not(C)),')" wid 165bp__ \
+ with .w at B.sw+(-0.6,-0.15)
+ "svg_tt(`And(Not(A),B,C)),N)')" wid 122bp__ with .w at last "".w+(1.1,-0.18)
for_(1,4,1,`"svg_it(B.In`'m4x)" at B.In`'m4x rjust')
"svg_it(B.In5)" at B.In5+(0,-1.5bp__) rjust
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4
deleted file mode 100644
index 63c169d3e24..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4
+++ /dev/null
@@ -1,156 +0,0 @@
-.PS
-# AntiqueClockSVG.m4
-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
-
-svg_rot_init(AntiqueClockSVG)
-
-# `hms2deg(hr,min,sec) hr:min:sec to degrees
-# blank arg1: degrees for minute hand
-# blank arg1 and arg2: degrees for second hand'
-define(`hms2deg',`ifelse(`$1',,
- `ifelse(`$2',,
- `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)',
- `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')',
- `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl
- pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')')
-
-# `SecondHand(length,hr,min,sec)'
-define(`SecondHand',`[ shsf = (`$1')/3.2
- C: Here
- { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) }
- line thick 8*shsf to rvec_(`$1',0)
- ]')
-
-# `AntiqueMinuteHand(length,hr,min,sec)'
-define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84
- L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4'))))
- C: circle fill_(0) diam 0.47*mhsf at L.start
- move to C
- spline from rvec_(0,0.047*mhsf) \
- to rvec_(1.65*mhsf,0.11*mhsf) \
- then to rvec_(`$1',0.018*mhsf) \
- then to rvec_(`$1',-0.018*mhsf) \
- then to rvec_(1.65*mhsf,-0.11*mhsf) \
- then to rvec_(0,-0.047*mhsf) \
- shaded rgbstring(0,0,0)
- ]')
-
-# `AntiqueHourHand(length,hr,min,sec)'
-define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2
- L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4'))))
- C: circle fill_(0) diam 0.6*hhsf at L.start
- move to C
- v = 0.25*hhsf
- { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf }
- C1: rvec_(1.25*hhsf,0)
- d = `$1'-1.25*hhsf
- q = 1bp__*hhsf
- r1 = (d^2 + q^2 - v^2)/(v-q)/2
- tang = atan2((r1+q),d)
- for i=0 to 3 do {
- X[i]: C1+vec_(rect_(v, pi_+i/3*( tang-pi_)))
- Y[i]: C1+vec_(rect_(v,-pi_+i/3*(-tang+pi_)))
- }
- n = 3
- for i=1 to 4 do { aa = -pi_+tang + i/4*(pi_/2-tang)
- XX: (d,r1+q)+(rect_(r1,aa))
- n+=1;
- X[n]: C1+vec_(XX.x, XX.y)
- Y[n]: C1+vec_(XX.x,-XX.y)
- }
- m = n
- for i= 0 to m do { n+=1; X[n]: Y[m-i] }
- fitcurve(X,n,shaded rgbstring(0,0,0))
- ]')
-
-define(`AntiqueClock',`[ # h,m,s,diam
-# Clock size parameters:
- hour = ifelse(`$1',,3,`$1')
- minute = ifelse(`$2',,41,`$2')
- 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
- r4 = r3 - 0.35*skale
- r5 = r4 - 0.17*skale
- r6 = r5 - 0.63*skale
- r7 = r6 - 0.17*skale
- shadelinethick = 1.0
-
-C: circle thick 0.2 rad r1
-
-define shadeline {
- s = 1-($`'1)*2
- v = r*s
- h = sqrt(r^2-v^2)
- t = 1-abs(s)
- line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \
- thick shadelinethick outlined rgbstring(t,t,t)
- }
-
- r = r1 # Bezel outer
- nlines = int(2*r/(shadelinethick pt__)*1.1)
- cost = cosd(10); sint = sind(10);
- ShadeObject(shadeline,nlines, 0, 0,0,0, 0.5, 1,1,1, 1, 0,0,0 ) at C
-
- r = r2 # Bezel inner
- nlines = int(2*r/(shadelinethick pt__)*1.1)
- cost = cosd(-10); sint = sind(-10);
- ShadeObject(shadeline,nlines, 0, 0,0,0, 0.25, 0.8,0.8,0.8, 0.5, 1,1,1,
- 0.75, 0.8,0.8,0.8, 1, 0,0,0 ) at C
-
-# Clock face
-Face: circle thick 0 fill_(1) rad r3 at C
- circle rad r4 at C
- circle rad r5 at C
- circle rad r6 at C
- circle rad r7 at C
-# Ad hoc shift of rotated SVG text
- define adj { (-cosd($`'1)*textht*0.5*sign(180-($`'1)),\
- (0.25+0.25*cosd(2*($`'1)))*textht) }
-# Outer numbers
- 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))
- }
- 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))
- }
-# Outer tics
- for mn = 1 to 60 do { t = 90-mn/60*360
- line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) }
-
-# Inner numbers
- textht = (r5-r6)*0.6
- Loopover_(`mx',`tt = 90-(m4Lx-4)/12*360
- R: (Rect_((r5+r6)/2,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(tt-270, "mx" at C+R+adj(tt)) ',
- IV,V,VI,VII,VIII)
-
-# Inner tics
- for mn = 5 to 60 by 5 do { t = 90-mn/60*360
- line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) }
-
-# Hands
- AntiqueHourHand(r6,hour,minute,second) with .C at C
- AntiqueMinuteHand(r5,hour,minute,second) with .C at C
- SecondHand((r3+r4)/2,hour,minute,second) with .C at C
-
-# Center
- dot(at C,0.1/4*r1,1)
- ]')
-
- Clock1: AntiqueClock(,,,3.5)
-# Clock2: AntiqueClock(4,48,07,2) at Clock1.e+(1.5,0)
-
- command "</g>" # end font
-.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ArrowFnSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ArrowFnSVG.m4
new file mode 100644
index 00000000000..b72914b7285
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ArrowFnSVG.m4
@@ -0,0 +1,59 @@
+.PS
+# ArrowFnSVG.m4
+# https://tex.stackexchange.com/questions/581089/arrow-function-diagrams
+gen_init
+ brad = 0.04
+ bht = 0.4
+ bwid = 0.25
+define(`rbox',`box rad brad outlined "Orange"')
+
+B1: [
+ svg_font(Times,14bp__)
+ linethick = 1.2
+ arrowwid = 0.08
+ rbox wid 5*boxwid ht 3/2*boxwid
+ line from last box.w-(bht/4,0) "svg_it(X)" above ljust
+T: Here
+ arrow up bwid right bwid then right bwid
+F: rbox ht bht "svg_it(f)"
+ {"svg_it(Y)" above ljust }
+ arrow down bwid right bwid from T then right boxwid + bwid*3/2
+G: rbox ht bht "svg_it(g)"
+ {"svg_it(Z)" above ljust }
+S: circle diam bht "svg_it(+)" at (G.e.x+boxwid,(F.y+G.y)/2)
+ d = F.y-S.nw.y
+ arrow from F.e to S.nw+(-d,d) then to S.nw
+ arrow from G.e to S.sw+(-d,-d) then to S.sw
+ arrow right from S.e
+ command "</g>" # end font
+ ]
+[
+ svg_font(Times,11bp__)
+ bht = bht/2
+ sbwid = boxwid*3/4
+ bbwid = sbwid*5/4
+ dh = bht/2
+B1: rbox wid bbwid ht bbwid
+B2: rbox wid sbwid*3/2 ht bbwid at B1+(3/2*bbwid,0)
+B3: rbox wid bbwid ht bbwid at B2+(3/2*bbwid,0)
+B4: rbox wid sbwid*3/2 ht bbwid at B3+(3/2*bbwid,0)
+B5: rbox wid bbwid ht bbwid at B4+(3/2*bbwid,0)
+ F: rbox ht bht wid sbwid at B2.n-(0,bht*3/4) "svg_it(f)"
+BR: B2.s+(0,B2.n.y-F.y)
+ G: rbox ht bht wid sbwid at (B4,F) "svg_it(g)"
+ S: circle diam bht*3/2 at B5+(bht/2,0) "svg_it(+)"
+ arrow right from S.e
+ T: B1.w+(dh,0)
+B: rbox ht bbwid*5/4 wid boxwid*7.25 with .w at T-(sbwid*3/4,0)
+ { line from T left sbwid "svg_it(x)" above ljust }
+ arrow from T to (B1.e-(dh,0),F) then to F.w
+ arrow from F.e to (B3.w+(dh,0),F) then to (B3.e-(dh,0),BR)
+ continue to (B5.w+(dh,0),Here) then to S.sw
+ line thick 5 outlined "white" from B3.sw to B3.ne chop brad
+ arrow from T to (B1.e-(dh,0),BR) then to (B3.w+(dh,0),BR) \
+ then to (B3.e-(dh,0),G) then to G.w
+ arrow from G.e to (B5.w+(dh,0),G) then to S.nw
+ command "</g>" # end font
+ ] with .nw at B1.sw+(0,-0.2)
+
+.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 158b475b7b9..e025572a0ac 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
@@ -4,8 +4,9 @@
gen_init(svg_font(sans-serif,11bp__))
sinclude(tst.dim)
s_init(Btree)
+maxpswid = 12
Btree: [
-circlerad = 0.45
+circlerad = 0.35
define n { [C: circle fill_(0.9) $1
if "$2" != "" then {
@@ -97,11 +98,12 @@ define(`txw',`wid `$1'mm__')dnl scaled by 14/12 for 14 pt type
+ "((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)),
+ 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)
+] with .w at last [].e+(-1,0)
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CapacitorsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CapacitorsSVG.m4
new file mode 100644
index 00000000000..1942860d373
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CapacitorsSVG.m4
@@ -0,0 +1,38 @@
+.PS
+# `Capacitors.m4'
+cct_init(svg_font(sans-serif,11pt__))
+textwid = 1.5
+movewid = 2 pt__
+hm = 2.1
+vm = 0.28
+
+hm = 2.05
+vm = 0.28
+{ {capacitor ; move ; "`capacitor '" ljust}
+ move right_ hm
+ {capacitor(,C); move ; "`capacitor(,C) '" ljust}
+ move right_ hm
+ {capacitor(,C+); move ; "`capacitor(,C+) '" ljust}
+}
+ move down vm; right_
+{ {capacitor(,P); move ; "`capacitor(,P) '" ljust}
+ move right_ hm
+ {capacitor(,E); move ; "`capacitor(,E) '" ljust}
+ move right_ hm
+ {capacitor(,K); move ; "`capacitor(,K) '" ljust}
+}
+ move down 0.25; right_
+{ {capacitor(,M); move ; "`capacitor(,M) '" ljust}
+ move right_ hm
+ {capacitor(,N); move ; "`capacitor(,N) '" ljust}
+ move right_ hm
+ {xtal ; move ; "`xtal '" ljust}
+}
+ move down 0.25; right_
+{ {capacitor(,dC); move ;"`capacitor(,dC) '" ljust}
+ move right_ hm
+ {capacitor(,dF); move ;"`capacitor(,dF) '" ljust}
+}
+
+ command "</g>" # end font
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ChipsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ChipsSVG.m4
new file mode 100644
index 00000000000..3d9ccb1edc4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ChipsSVG.m4
@@ -0,0 +1,44 @@
+.PS
+# ChipsSVG.m4
+log_init
+include(icsSVG.m4)
+svg_font(sans-serif,8.5bp__)
+
+Chips: [
+ ic4017
+ {"4017" at last [].Chip.sw below ljust}
+ move
+ ic4510
+ {"4510" at last [].Chip.sw below ljust}
+ move
+ icVS1053
+ {"VS1053" at last [].Chip.sw below ljust}
+
+ DIP_chip_outline with .sw at last [].se+(0.5,0)
+ { `"DIP_chip_outline"' at last [].s below }
+ ]
+
+DIPs: [
+ DIP0: DIP
+ DIP32: DIP(32,direct=R;bodywid=0.5*scale) with .sw at last [].se+(0.5,0)
+ DIP16: DIP(16,type=Q;pinwid=1bp__) with .sw at DIP32.se+(1.5,0)
+
+ thinlines_
+ { "svg_tt(`DIP')" at DIP0.s - (0,10bp__) }
+ { arrow <- from DIP0.Pin1 up 0.2; "svg_it(`Pin1')" ljust at Here+(-0.05,0.1) }
+ { arrow <- from DIP0.c up 0.7 right 0.25; "svg_it(`Body')" ljust }
+ { arrow <- from DIP0.Pin8 up 0.25 right 0.2 ; "svg_it(`Pin8')" above ljust }
+
+ { "svg_tt(`DIP(32,direct=R;bodywid=0.5*scale)')" ljust \
+ at DIP32.sw - (0,10bp__) }
+ { arrow <- right 0.2 from DIP32.Pin1; "svg_it(`Pin1')" ljust }
+ { spline <- right 0.2 then right 0.1 up 0.1 from DIP32.Pin32
+ "svg_it(`Pin32')" ljust }
+
+ { "svg_tt(`DIP(16,type=Q;pinwid=1bp__)')" at DIP16.sw - (0,10bp__) ljust }
+ thicklines_
+
+ ] with .nw at last [].sw+(0,-0.3)
+
+ command "</g>"
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrossbarSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrossbarSVG.m4
deleted file mode 100644
index 12bb2d72c31..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrossbarSVG.m4
+++ /dev/null
@@ -1,54 +0,0 @@
-.PS
-# Crossbar switch
-gen_init(svg_font(sans-serif,11bp__))
- circlerad = 0.12
- boxwid = 0.18
- boxht = 0.18
- rathick = 1.5
- rawd = rathick*4 bp__
- raht = rawd*2
- boxdist = boxwid*1.8
-
-`define bcoord {($2,-($1))*boxdist}'
-`define redarrow { arrow ht raht wid rawd thick rathick color "red" }'
-
-`define cbx {'
- thinlines_
- n = $+ - 1
- for i=0 to n do {
- line color "blue" from bcoord(i,0) to bcoord(i,n)
- line color "blue" from bcoord(0,i) to bcoord(n,i)
- C[i]: circle invis at bcoord(i,-1.5)
- }
- for i=0 to n do {
- exec sprintf("col = $%g",i+1)
- redarrow from C[i].e right 1.25*boxwid
- redarrow from C[i].w+(-boxwid,0) right raht
- for j=0 to n do {
- B: box color "blue" shaded "yellow" at bcoord(i,j)
- if j==col then {
- line color "blue" from B.s to B.e
- line thick rathick color "red" from C[i].e to B.w \
- then to B.n then to (B.x,C[0].y+(2+j*2/3)*boxht)
- continue to (C[j].x-(2+j*2/3)*boxht,Here.y)
- continue to (Here,C[j]) then to C[j].w
- } \
- else {
- line color "blue" from B.n to B.s
- line color "blue" from B.w to B.e
- }
- }
- }
- thicklines_
- for i=0 to n do {
- circle thick 1.5 outlined "blue" shaded "yellow" at C[i] \
- sprintf("ifpostscript(,ifsvg(,\large))%g",i)
- }
- }
-
-[
- cbx(3,6,0,5,2,7,1,4)
- ] at 4,4
-
- command "</g>" # end font
-.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrullerSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrullerSVG.m4
index f4630aff06e..7f8173b52a4 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrullerSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrullerSVG.m4
@@ -52,10 +52,10 @@ thinlines_
rgbtohsv(0.6,0.4,0,h,s,v)
for i = 1 to n do {
tc = t[ix[i]]; sc = s[ix[i]]
- SE: (project(cruller(tc+dt/2,sc-ds/2)))
- SW: (project(cruller(tc-dt/2,sc-ds/2)))
- NW: (project(cruller(tc-dt/2,sc+ds/2)))
- NE: (project(cruller(tc+dt/2,sc+ds/2)))
+ SE: Project(cruller(tc+dt/2,sc-ds/2))
+ SW: Project(cruller(tc-dt/2,sc-ds/2))
+ NW: Project(cruller(tc-dt/2,sc+ds/2))
+ NE: Project(cruller(tc+dt/2,sc+ds/2))
f = ((dcosine3D(3,cruller(tc,sc))/2.25+1)/2)^2
hsvtorgb(h,(1-f)*s,1,r,g,b)
line outlined rgbstring(r,g,b) shaded rgbstring(r,g,b) ifpdf( invis ) \
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4
index 5631a4822fb..1846917a4ae 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4
@@ -46,10 +46,10 @@ define(`Dini',
du = ur/ugrid/2
dv = vr/vgrid/2
for i=0 to n do {
- NE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]+dv))
- SE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]-dv))
- SW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]-dv))
- NW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]+dv))
+ NE: Project(Dini(ciu[ix[i]]+du,civ[ix[i]]+dv))
+ SE: Project(Dini(ciu[ix[i]]+du,civ[ix[i]]-dv))
+ SW: Project(Dini(ciu[ix[i]]-du,civ[ix[i]]-dv))
+ NW: Project(Dini(ciu[ix[i]]-du,civ[ix[i]]+dv))
f = (-cos(ciu[ix[i]])+1)/2
g = ( sin(ciu[ix[i]])+1)/2
line from NE to SE then to SW then to NW then to NE \
@@ -174,9 +174,9 @@ array2(h,m4inx,53,54,55,58,59,57)
}
for i=1 to n do {
for j=1 to 6 do { x[j]=h[ih[i],j] }
- line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3]))\
- for_(2,6,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
- to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0.95)
+ line from Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3]))\
+ for_(2,6,1,`to Project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
+ to Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0.95)
}
m = 0
for i=1 to 12 do { # Visible pentagons
@@ -185,9 +185,9 @@ array2(h,m4inx,53,54,55,58,59,57)
}
for i=1 to m do {
for j=1 to 5 do { x[j]=p[ip[i],j] }
- line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) \
- for_(2,5,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
- to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0)
+ line from Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) \
+ for_(2,5,1,`to Project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\
+ to Project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0)
}
] scaled 2.5 with .sw at last [].se+(1,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EEPSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EEPSVG.m4
new file mode 100644
index 00000000000..4f928f927d6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EEPSVG.m4
@@ -0,0 +1,553 @@
+.PS
+# EEPSVG.m4
+# https://electrical-engineering-portal.com/single-line-diagrams-symbols-drawings-analysis
+
+cct_init
+divert(-1)
+
+# This section defines *DRAFT* SLD elements with or without attached
+# circuit breakers. Many other elements applicable to SLD drawings are
+# already in libcct.m4. The contributions and suggestions of Benjamin
+# Vilmann are acknowledged with thanks.
+
+# 1-terminal SLD elements:
+# Argument 1 is normally the linespec of the stem to set the element direction
+# and length. See also: PtoL defined below.
+# For a 0-length stem (which has undefined direction):
+# arg1 can also be U, D, L, R (for up, down, left, right),
+# or a number to set the direction in degrees, optionally followed by
+# `at position' to set the position (Here by default).
+# Zero-length stem examples: sl_box(U), sl_box(45 at Here+(1,0))
+# Argument 2 contains semicolon (;)-separated key-value attributes
+# of the element head as applicable: e.g., name=Name; text="text"; lgth=expr
+# A non-blank argument 3 is C for a default closed breaker in the stem, O for
+# an open breaker, or key-value pairs to specify breaker details.
+# The element body (head) can be named. It is overlaid with or contained in
+# a [] block.
+
+# 2-terminal SLD elements:
+# These obey the normal Circuit_macro two-terminal conventions.
+# They can be labelled using rlabel() or llabel() as well as directly.
+# Argument 2 contains key-value pairs to customize the element body,
+# e.g., name=Name; text="text"; wdth=expr; ...
+# Nonblank arguments 3 and 4 put a breaker in the input and output respectively.
+
+# Attached breakers:
+# Nonblank arguments 3 and 4 of the two-terminal elements and argument 3 of
+# the 1-terminal elements specify a breaker in the input, output, and stem
+# respectivlely. An O creates a default-size open breaker, and C a closed
+# breaker, otherwise the argument contains key-value pairs to specify the
+# details of the box; e.g., box=dotted 2bp__ shaded "green"
+
+# The SLD current transformer macro sl_ct is composite, within a [] block.
+# Internal labels L (for inductor) and terminals Ts, Tc, and Te are defined.
+
+define(`sldlib_')
+ifdef(`libcct_',,`include(libcct.m4)divert(-1)')
+
+# Default size parameters. These can be redefined in a diagram.
+
+define(`brksiz_',`dimen_*3/16') # Default inline box breaker size
+define(`drosiz_',`dimen_/4') # Default sl_drawout (chevron) size
+
+# One-terminal elements ###################################################
+
+ `sl_disk( stem linespec, keys, breaker )
+ keys: name=Name;
+ text="text";
+ diam=expr;
+ circle=circle attributes; eg diam expr'
+ `default breaker name Bd'
+define(`sl_disk',
+ `sl_eleminit_(`$1')
+ setkeys_(`$2',`name::N; circle::N; text::N; diam:dimen_*2/3')dnl
+ ifelse(`$3',,
+ `ifelse(m4name,,,m4name:) circle diam m4diam \
+ at last line.end + vec_(m4diam/2,0) m4circle m4text
+ [ box invis wid_ m4diam ht_ m4diam ] at last circle
+ line from last line.end to last line.start',
+ `m4br_one(`sl_disk',`$1',`$2',m4brk_(`$3',Bd))') ')
+
+ `sl_box( stem linespec, keys, breaker )
+ keys: name=Name; lgth=expr; wdth=expr;
+ text="text";
+ box= box attributes; (e.g. shade "red")'
+ `default breaker name Bb'
+define(`sl_box',
+ `sl_eleminit_(`$1')
+ setkeys_(`$2',`name::N; wdth:dimen_*2/3; lgth:dimen_*2/3; box::N; text::N')dnl
+ ifelse(`$3',,
+ `line from last line.end to last line.start
+ { ifelse(m4name,,,m4name:) [S:Here; lbox(m4lgth,m4wdth,m4box)] \
+ with .S at last line.start }
+ ifelse(m4text,,,`{m4text at last []}')',
+ `m4br_one(`sl_box',`$1',`$2',m4brk_(`$3',Bb))') ')
+
+ `sl_grid( stem linespec, keys, breaker )
+ keys: name=Name; lgth=expr; wdth=expr;'
+ `default breaker name Bgr'
+define(`sl_grid',
+ `sl_eleminit_(`$1')
+ setkeys_(`$2',`name::N; wdth:dimen_*4/5; lgth:dimen_*2/3; box::N; text::N')dnl
+ ifelse(`$3',,
+ `line from last line.end to last line.start
+ { ifelse(m4name,,,m4name:) [S:Here
+ { ifelse(m4name,,,m4name:) lbox(m4lgth,m4wdth) }
+ { line to rvec_(m4lgth/2, m4wdth/2)
+ line to rvec_(m4lgth/2,-m4wdth/2)
+ line to rvec_(-m4lgth/2,-m4wdth/2)
+ line to rvec_(-m4wdth/2, m4wdth/2) }
+ { line from rvec_(0,m4wdth/2) to rvec_(m4lgth,-m4wdth/2) }
+ line from rvec_(0,-m4wdth/2) to rvec_(m4lgth,m4wdth/2)
+ ] with .S at last line.start } ',
+ `m4br_one(`sl_grid',`$1',`$2',m4brk_(`$3',Bgr))') ')
+
+ `sl_load( stem linespec, keys, breaker )
+ keys: name=Name; lgth=expr; wdth=expr;
+ head= arrowhead attributes;'
+ `default breaker name Bl'
+define(`sl_load',
+ `sl_eleminit_(`$1')
+ setkeys_(`$2',`name::N; wdth:dimen_*0.32; lgth:dimen_*0.45; head::N')dnl
+ ifelse(`$3',,
+ `line from last line.end to last line.start
+ { ifelse(m4name,,,m4name:) [S:Here; line to rvec_(0,m4wdth/2) \
+ then to rvec_(m4lgth,0) then to rvec_(0,-m4wdth/2) \
+ then to Here m4head ] with .S at last line.start } ',
+ `m4br_one(`sl_load',`$1',`$2',m4brk_(`$3',Bl))') ')
+
+ `sl_meterbox( stem linespec, keys, breaker )
+ keys: sl_box attributes'
+ `default breaker name Bm'
+define(`sl_meterbox',
+ `sl_eleminit_(`$1')
+ setkeys_(`$2',`name::N; wdth:dimen_*2/3; lgth:dimen_*2/3; box::N; text::N')dnl
+ ifelse(`$3',,
+ `line from last line.end to last line.start
+ {ifelse(m4name,,,m4name:) [S:Here;
+ { B: rotbox( m4lgth, m4wdth, m4box ) with .W at S }
+ a = rp_ang*rtod_
+ if (abs(a-90) < 45) || (abs(a-180) < 45) || (abs(a+180) < 45) then {
+ C: rvec_(m4lgth*2/5,0)
+ line from rvec_(m4lgth*4/5,m4wdth/2) to rvec_(m4lgth*4/5,-m4wdth/2) } \
+ else { C: rvec_(m4lgth*3/5,0)
+ line from rvec_(m4lgth/5,m4wdth/2) to rvec_(m4lgth/5,-m4wdth/2) }
+ ifelse(m4text,,,`m4text at C')
+ ] with .S at last line.start}',
+ `m4br_one(`sl_meterbox',`$1',`$2',m4brk_(`$3',Bm))') ')
+
+ `sl_generator( stem linespec, keys, breaker )'
+ `default breaker name Bd'
+define(`sl_generator',`sl_disk($@)
+ { ACsymbol(at last circle,,,R)
+ m4lcd = last circle.diam
+ [ box invis wid_ m4lcd ht_ m4lcd ] at last circle } ')
+
+ `sl_syncmeter( stem linespec, keys, breaker )'
+ `default breaker name Bd'
+define(`sl_syncmeter',`sl_disk($@)
+ { Syncsymb(at last circle)
+ m4lcd = last circle.diam
+ [ box invis wid_ m4lcd ht_ m4lcd ] at last circle } ')
+
+ `sl_lamp( stem linespec, keys, breaker )'
+ `default breaker name Bd'
+define(`sl_lamp',`sl_disk($@)
+ { line from last circle.ne to last circle.sw
+ line from last circle.nw to last circle.se
+ m4lcd = last circle.diam
+ [ box invis wid_ m4lcd ht_ m4lcd ] at last circle } ')
+
+# One-terminal utilities ##################################################
+
+ `Syncsymb(at position, rad)
+ Symbol for sync meter'
+define(`Syncsymb',`[ define(`m4ssrad',`ifelse(`$2',,(dimen_/4),`($2)')')dnl
+ Origin: Here
+ {arc <-> ht arrowht/2 wid arrowwid*2/3 \
+ from Rect_(m4ssrad,30) to Rect_(m4ssrad,150) with .c at Here}
+ line from (0,m4ssrad) to (0,-m4ssrad/2)
+ `$3' ] with .Origin ifelse(`$1',,`at Here',`$1')')
+
+ `m4br_one( `name', stem linespec, body keys,
+ breaker keys )'
+ `Draw the breaker in the stem then the element'
+define(`m4br_one',
+ `M4_S: last line.start
+ setkey_(`$4',lgth,brksiz_)dnl
+ line from M4_S to last line.end+vec_(-(m4lgth)*5/2,0)
+ sl_breaker(to rvec_(m4lgth,0),`$4')
+ $1(to rvec_((m4lgth)*3/2,0),`$3')
+ move to M4_S ')
+
+ `sl_eleminit_(linespec or (for zero length)
+ U|D|L|R|number [at location])'
+define(`sl_eleminit_',
+ `ifelse(regexp(`$1',^ *[UDLR0123456789]),-1,
+ `eleminit_(`$1',dimen_)',
+ `pushdef(`M4pos',`ifinstr(`$1',` at ',`patsubst(`$1',^.* at *)')')dnl
+ ifelse(M4pos,,,`move to M4pos;') setdir_(patsubst(`$1',` at.*'))
+ line invis from Here to Here popdef(`M4pos')')')
+
+# Two-terminal elements ###################################################
+
+ `sl_transformer(linespec,keys,
+ input breaker keys, output breaker keys)
+ keys:
+ type=I|S
+ (type=I) scale=expr; (default 1.5)
+ cycles=n; (default 4)
+ (type=S) body=shaded "color";
+ name=Body name;
+ (breaker default names BrI, BrO)'
+define(`sl_transformer',
+ `setkeys_(`$2',name::N; type:I:N; cycles:4:N; body::N; scale:1.5:; )dnl
+ ifelse(`$3'`$4',,
+ `ifinstr(m4type,S,
+ `source(`$1',G,,,m4body)',
+ `eleminit_(`$1'); m4atmp = rp_ang; m4slen = rp_len
+ define(`m4swd',`dimen_*3/16*m4scale')dnl
+ { line to rvec_((m4slen-m4swd)/2,0)
+ {ifelse(m4name,,SL_box,m4name): [ linewid = linewid*m4scale
+ {L1: inductor(to vec_(0,-m4cycles*dimen_/8),,m4cycles)}
+ {point_(m4atmp)
+ L2: inductor(from vec_(dimen_*3/16,-m4cycles*dimen_/8) \
+ to vec_(dimen_*3/16,0),,m4cycles)}
+ C2: last line.c; point_(m4atmp) ] with .L1.c at Here}
+ line from rvec_(m4swd,0) to rvec_((m4slen+m4swd)/2,0) }
+ line invis to rvec_(rp_len,0)') ',
+ `m4br_two(`sl_transformer',`$1',`$2',m4brk_(`$3',BrI),m4brk_(`$4',BrO),
+ ifelse(`$3',,,I)`'ifelse(`$4',,,O))') ')
+
+ `Two-terminal box'
+ `sl_ttbox(linespec,keys,breaker keys,breaker keys)
+ keys= lgth=expr; wdth=expr; box=attributes;
+ supp=additional rotbox commands; name=Body name;
+ text="text";
+ (breaker default names BrI, BrO)'
+define(`sl_ttbox',
+ `setkeys_(`$2',`lgth:dimen_*3/4; wdth:dimen_*3/4;
+ name::N; box::N; text::N; supp::N')dnl
+ ifelse(`$3'`$4',,
+ `eleminit_(`$1')
+ {line to rvec_((rp_len-m4lgth)/2,0)
+ {ifelse(m4name,,,m4name:)rotbox(m4lgth,m4wdth,m4box,,m4supp) \
+ with .W at Here }
+ {ifelse(m4text,,,`{m4text at rvec_(m4lgth/2,0)}') }
+ line from rvec_(m4lgth,0) to rvec_((rp_len+m4lgth)/2,0)}
+ line invis to rvec_(rp_len,0) ',
+ `m4br_two(`sl_ttbox',`$1',`$2',m4brk_(`$3',BrI),m4brk_(`$4',BrO),
+ ifelse(`$3',,,I)`'ifelse(`$4',,,O))') ')
+
+define(`m4brk_',`ifelse(`$1',,,
+ `ifelse(`$1',C,,`$1',O,box=fill 0,`$1')`'ifelse(`$2',,,;name=`$2')')')
+
+ `sl_rectifier(ttbox args)'
+define(`sl_rectifier',
+ `sl_ttbox(`$@')
+ { line from last [].Line.ne to last [].Line.sw
+ AC: ACsymbol(at last [].C+(-m4lgth/6, m4wdth/4),,,R)
+ DC: DCsymbol(at 2nd last [].C+( m4lgth/6,-m4wdth/4),,,R) } ')
+
+ `sl_inverter(ttbox args)'
+define(`sl_inverter',
+ `sl_ttbox(`$@')
+ { line from last [].Line.ne to last [].Line.sw
+ DC: DCsymbol(at last [].C+(-m4lgth/6, m4wdth/4),,,R)
+ AC: ACsymbol(at 2nd last [].C+( m4lgth/6,-m4wdth/4),,,R) } ')
+
+ `sl_breaker(linespec, type=[A|C][D]; ttbox keys)
+ C is for curved breaker
+ D is for sl_drawout'
+define(`sl_breaker',
+ `setkeys_(`$2',`lgth:brksiz_; wdth:brksiz_; name::N; type::N')dnl
+ ifinstr(m4type,C,
+ `ifinstr(m4type,D,
+ `m4ch_two(`cbreaker',`$1')',
+ `ifelse(m4name,,,m4name:) cbreaker(`$1')')',
+ `ifinstr(m4type,D,
+ `m4ch_two(`sl_ttbox',`$1',lgth=m4lgth;wdth=m4wdth;`$2';name=Br)',
+ `sl_ttbox(`$1',lgth=m4lgth;wdth=m4wdth;`$2')') ') ')
+
+ `sl_reactor(linespec,keys,breaker keys,breaker keys)
+ keys=
+ diam=expr,
+ (Default breaker names BrI and BrO)'
+define(`sl_reactor',
+ `setkeys_(`$2',`diam:sourcerad_*4/3; type::N')dnl
+ ifelse(`$3'`$4',,
+ `eleminit_(`$1')
+ { line to rvec_(rp_len/2,0) then to rvec_(rp_len/2,-m4diam/2); round
+ arc rad m4diam/2 cw from Here to rvec_(m4diam/2,m4diam/2) \
+ with .c at rvec_(0,m4diam/2); round
+ line to rvec_(rp_len/2-m4diam/2,0) }
+ {[ box invis ht m4diam wid m4diam ] at rvec_(rp_len/2,0)}
+ line invis to rvec_(rp_len,0) ',
+ `m4br_two(`sl_reactor', `$1', lgth=m4diam*2;`$2',
+ m4brk_(`$3',BrI),m4brk_(`$4',BrO),ifelse(`$3',,,I)`'ifelse(`$4',,,O))')')
+
+ `sl_busbar( linespec, nports, keys )
+ Labels P1, P2 ... Pnports are defined on the line.
+ keys: line=line attributes;
+ port=D; (dotted ports)
+ The bus extends beyond the first and last points
+ by dimen_/5 which can be redefined as
+ line=chop -(expr)'
+define(`sl_busbar',
+ `define(`m4npoints',`ifelse(`$2',,2,`$2')')dnl
+ setkeys_(`$3',`line:thick 1.6 chop -dimen_/5:N; port::N')dnl
+ [ tmp_ang = rp_ang
+ eleminit_(`$1',(m4npoints-1)*dimen_)
+ Start: last line.start; End: last line.end
+ for_(1,m4npoints,1,
+ `P`'m4x: (m4x-1)/(m4npoints-1) between Start and End dnl
+ ifinstr(m4port,D,` ;dot(at P`'m4x)')')
+ Line: line from Start to End m4line
+ Start: last line.start; End: last line.end
+ point_(tmp_ang) ] ')
+
+ `sl_drawout(linespec, keys, R)
+ Drawout (i.e. plugin) chevron element;
+ keys: type=T; (truncated leads)
+ lgth=expr; (body size)
+ wdth=expr;
+ name=Name; (body name)
+ line= line attributes (e.g. thick 2)
+ arg3=R reverse direction'
+define(`sl_drawout',
+ `setkeys_(`$2',`lgth:drosiz_; wdth:drosiz_; type::N; name::N; line::N')dnl
+ eleminit_(`$1',ifelse(m4type,T,m4lgth))
+ ifelse(`$3',R,`{M4ds: Here; move to last line.end; rp_ang = rp_ang+pi_')
+ {line to rvec_(rp_len/2,0)
+ ifelse(m4name,,,m4name:) [
+ S: Here; {line from rvec_(-m4lgth/2,m4wdth/2) to Here then
+ to rvec_(-m4lgth/2,-m4wdth/2) m4line }
+ E: rvec_(m4lgth/2,0); line from rvec_(0,m4wdth/2) to E then
+ to rvec_(0,-m4wdth/2) m4line ] with .S at Here
+ ifelse(m4type,T,,
+ line from last [].E to last [].E+vec_((rp_len-m4lgth)/2,0))}
+ ifelse(`$3',R,`rp_ang = rp_ang-pi_; move to M4ds}')
+ line invis to rvec_(rp_len,0) ')
+
+# Two-terminal utilities ##################################################
+
+ `Breakers in the input and output lines:'
+ `m4br_two(`2-term element macroname in quotes',
+ linespec, body keys,
+ input breaker keys,
+ output breaker keys,
+ I|O|IO)'
+ `(Default breaker names are BrI and BrO)'
+define(`m4br_two',
+ `define(`m4il',`ifinstr(`$6',I,`setkey_(`$4',lgth,brksiz_) m4lgth',0)')dnl
+ define(`m4ol',`ifinstr(`$6',O,`setkey_(`$5',lgth,brksiz_) m4lgth',0)')dnl
+ define(`m4bl',`setkey_(`$3',lgth,dimen_*4/3) m4lgth')dnl
+ eleminit_(`$2',dimen_*3)
+ M4start: Here; M4end: last line.end
+ M4cc: last line.c+vec_(((m4il*3/2)-(m4ol*3/2)),0)
+ M4ii: M4cc+vec_(-min((m4bl/2+m4il/2),distance(M4start,M4cc)-m4il),0)
+ line from M4start to ifinstr(`$6',I,
+ `M4ii+vec_(-m4il,0); sl_breaker(to M4ii,`$4';name=BrI)',M4ii)
+ M4oi: M4cc+vec_(min((m4bl/2+m4ol/2),distance(M4end,M4cc)-m4ol),0)
+ $1(from M4ii to M4oi,`$3')
+ ifinstr(`$6',O,`sl_breaker(to M4oi+vec_(m4ol,0),`$5';name=BrO)')
+ line to M4end
+ line invis from M4start to M4end ')
+
+ `Chevrons in the input and output lines:'
+ `m4ch_two(`2-term element macroname in quotes',
+ linespec, body keys,
+ input breaker keys,
+ output breaker keys,
+ I|O|IO)'
+define(`m4ch_two',
+ `define(`m4bl',`setkey_(`$3',lgth,dimen_*3/8) m4lgth')dnl
+ eleminit_(`$2',dimen_*3)
+ M4start: Here; M4end: last line.end
+ M4elem: $1(to rvec_(m4bl+2*drosiz_,0) with .c at last line.c,`$3')
+ sl_drawout(from last line.start-vec_(drosiz_,0) to last line.start,type=T,R)
+ line from last line.start to M4start
+ sl_drawout(from M4elem.end to M4elem.end+vec_(drosiz_,0),type=T)
+ line to M4end
+ line invis from M4start to M4end')
+
+# Composite elements ###################################################
+
+ `sl_ct( at position, stem length, U|D|L|R|expr,
+ scale=expr) (default scale is 1.5)'
+define(`sl_ct',
+ `[ setdir_(`$3'); setkey_(`$4',scale,1.5); linewid = linewid*m4scale
+ L: inductor(to vec_(2*dimen_/8,0),,2)
+ stemlen = ifelse(`$2',,dimen_/5,`$2')
+ line from L.start to L.start+vec_(0,-stemlen)
+ Ts: Here
+ line from L.end to L.end+vec_(0,-stemlen)
+ Te: Here
+ line from L.c to L.c+vec_(0,-stemlen)
+ Tc: Here
+ resetdir_ ] with .L.c at ifelse(`$1',,Here,patsubst(`$1',^ *at *)) ')
+
+# #######################################################################
+
+divert(0)dnl
+
+
+ u = dimen_
+
+ svg_font(sans-serif,9.0bp__,textoffset)
+
+define(`ctb',`[CT: sl_ct(,,`$1')
+ L: line up_ u/2 with .c at CT.L.c
+ BU: sl_breaker( up_ u*2/3,box=fill_(0))
+ BR: sl_breaker( right_ ifelse(`$1',U,,-)u*3/4 \
+ from CT.ifelse(`$1',U,Te,Ts),box=fill_(0))]')
+
+define(`tsbx',`sl_ttbox(`$1',`$2';lgth=u*0.4;wdth=u/2;text="TS")')
+define(`lcdiam',u*0.85)
+define(`lcirc',`[C: circle diam lcdiam ifelse(`$1',,,`$1')
+ line right C.diam*3/4 with .c at C
+ ifelse(`$2',,,`$2' at C.ne above )
+ ifelse(`$3',,,`$3' at C.se below )
+ ]')
+
+define(`Svee',`[S: Here; line from (sqrt(3),1)*(`$1') to S \
+ then to (sqrt(3),-1)*(`$1')]')
+
+Box1: [
+ V: line down_ u
+ {`"13.8 kV 3 ph + GND 60 Hz"' at V.start rjust}
+ { ellipse wid u/6 ht u/10 at Here+(0,u/3)
+ line right_ u/2 from last ellipse.e
+ ellipse wid u*4/3 ht u/2 "M1-00" }
+ AT: open_arrow(ToPos(,U,u), u/3*sqrt(3)/2, u/3)
+ dot(at 2nd last line.start)
+ { line left_ u then up_ u/3 ht u/10 wid u/10; dot }
+ line down_ u
+ { line up_ u/2 from last line.end+(-u/6,u/8)
+ sl_disk( left_ u/2 from last line.c,diam=u/3;name=L ); move to L.c
+ for_(45,315,90,`{line to L.c+(Rect_(L.diam,m4x)) chop u/5 chop 0}') }
+ T: dot
+ { sl_transformer(right_ 2*u,cycles=2;name=Tr1)
+ {"14400:120` 'V" at last [].n above}
+ { Svee(u/7) with .ne at Tr1.sw+(-u/15,-u/15)
+ Svee(u/7) with .nw at Tr1.se+( u/15,-u/15); ground(at last [].S) }
+ dot; fuse(right_ u,C)
+ line to (Here,1st ellipse)
+ MB: box wid 3/4*u ht 3/4*u with .sw at Here+(-u/8,0)
+ circle diam 5/8*u at last box "M" }
+ line down u/2
+ CT1: ctb(U) with .BU.end at Here
+ {"500:5" rjust at CT1.CT.w }
+ { Svee(u/7) with .S at CT1.CT.Ts+( u/4,0); ground(at last [].S) }
+ line from MB.se+(-u/8,0) down_ MB.s.y-CT1.BR.y then to CT1.BR.end
+ line from CT1.L.start down_ 3/4*u
+ T2: dot
+ { line left_ u from T2; sl_drawout(,type=T,R); fuse(left_ u,C)
+ sl_transformer(left_ u/2,cycles=2;name=Tr2)
+ {"14400:120` 'V" at last [].n above}
+ {Ysymbol(with .ne at Tr2.sw+(u/8,0),type=G;size=u/6)}
+ {Ysymbol(with .nw at Tr2.se+(u/15,0),type=G;size=u/6)}
+ fuse(left_ u,C); sl_drawout(,type=T)
+ TS1: tsbx(left_ u*3/4) }
+ CT2: ctb(U) with .BU.end at Here
+ {"800:5" rjust at CT2.CT.w }
+ {Ysymbol(at CT2.CT.Ts+(u/2,-u/8),type=G;size=u/5)}
+ sl_breaker(up_ 2.0*u with .end at CT2.L.start,
+ lgth=u*0.75;wdth=u*0.8;name=M1;type=D)
+ {`"52-M1" "1200 A"' at M1}
+ CT3: ctb(D) with .BU.end at last line.start
+ {"800:5" ljust at CT3.CT.e }
+ BT3: CT3.BR.end
+ {Ysymbol(at CT3.CT.Te+(-u/2,-u/8),type=G;size=u/5)}
+ CT4: ctb(D) with .BU.end at CT3.L.start
+ {"600:5 MR" ljust at CT4.CT.e }
+ {Ysymbol(at CT4.CT.Te+(-u/2,-u/8),type=G;size=u/5)}
+ line from CT4.L.start down_ u; dot;
+ { line left_ u then up_ u/3 ht u/10 wid u/10; dot }
+ AB: arrow down_ u*2/3 ht u/3*sqrt(3)/2 wid u/3
+ tsbx(left_ u from CT3.BR.end,text="SB")
+ line to (TS1.start,Here)
+ tsbx(left_ u*3/4); line left_ u/2+lcdiam/2 then up_ u/5
+ CEDR3: lcirc("59" "M1","(3)") with .C.s at Here
+ Q: line left_ u*3/4 from CEDR3.C.w
+ { line left_ u/8 from Q.c+(u/8,CEDR3.C.rad) \
+ then down_ CEDR3.C.diam then right_ u/8 }
+ CEDR4: lcirc("22" "M1","(1)") with .C.e at Here
+ { arrow right_ 3/2*u from CEDR3.C.e
+ lcirc("86" "M1","(1)") with .C.w at Here
+ arrow right_ u from last [].C.e
+ "TRIP M1" ljust above "TRIP S1" ljust }
+ { CEDR1: lcirc("59" "M1",,"(3)") with .C.w at (Q.c,T2)
+ { line from TS1.end to CEDR1.C.e }
+ CEDR2: lcirc("22" "M1",,"(3)")
+ arrow up u*2/3 from (CEDR2.e.x,CEDR2.n.y+u/3)
+ "TRIP S1" above; "TRIP M1" at last "".n above
+ move to last arrow.start
+ line from CEDR2.n to (CEDR2,Here) then to (CEDR1,Here) then to CEDR1.n
+ }
+ EDR5000: box wid TS1.end.x-CEDR4.C.w.x-u/8 ht last arrow.y-CEDR4.C.s.y+u/2 \
+ with .n at last arrow "EDR-5000-M1"
+ M2: box wid u*1.1 ht u*0.85 at (TS1,CT4.BR) "PXM6000" "METER"
+ { line from M2.e to CT4.BR.end }
+ line from M2.w left_ u*3/4
+ BT: dot
+ line to (EDR5000.w,Here)+(-u/5,0); Lft: Here
+ continue to (Here,CEDR2.C) then to CEDR2.C.w
+ Head: line down_ u*3/4 from AB.end
+ { ellipse wid u/6 ht u/10 at Here+(0,u/3)
+ line left_ u/2 from last ellipse.w
+ ellipse wid u*4/3 ht u/2 "M1-00" }
+ { line right_ u*3/4 then down_ u/8;
+ {line right_ u/10 with .c at Here}
+ {line right_ u/10 with .c at Here+(0,-u/8)}
+ pushdef(`dimen_',u/2) ground(at last line.c) popdef(`dimen_') }
+ { line down_ u/8 from Here+(u/2,0)
+ { pushdef(`dimen_',u/2) ground(at Here+(0,-u/8)) popdef(`dimen_') }
+ pushdef(`dotrad_',dotrad_/2) gap(down_ u/8,1) popdef(`dotrad_') }
+ BB: arrow <- down_ u/2 ht u/3*sqrt(3)/2 wid u/3
+ sl_transformer(down_ u,name=Tr3)
+ { CUR2: lcirc("21" "T1",,"(1)") with .C.c at Tr3.e+(u,0)
+ CUR3: lcirc("49" "T1",,"(1)") with .C.w at CUR2.C.e
+ CUR1: lcirc("21" "T1","(1)") with .C.c at CUR2.C.c+(Rect_(CUR2.C.diam,60))
+ }
+ line from BT to (BT.x,AB.y+u/10); X: Here; corner
+ CT5: ctb(U) with .BU.end at Tr3.L2.end
+ {"600:5" ljust below at CT5.CT.e }
+ corner(,at CT5.CT.Ts); ground
+ line from CT5.BR.end to (CUR3.C.e,CT5.BR.end)+(u/6,0)
+ continue to (Here,X)
+ tsbx(up_ u*4/3)
+ CUR5: lcirc("51G" "T1","(1)") with .C.s at Here
+ CUR6: lcirc("87" "T1","(1)") with .C.c at CUR5.C.c+(2*u,0)
+ arrow up_ u*2/3 from CUR5.C.n
+ CUR4: lcirc("86" "T1","(1)") with .C.s at Here
+ arrow up_ u*2/3 from CUR4.C.n
+ arrow <- from CUR4.C.w left CUR4.C.w.x-CUR1.C.x; corner
+ J2: line to CUR1.C.n
+ arrow from CUR6.C.w left_ u/3 then up_ CUR4.C.y-CUR6.C.y then to CUR4.C.e
+ tsbx(up_ u from CUR6.C.n)
+ line to (Here,CT2.BR) then to CT2.BR.end
+ crossover(from X to (CUR5,X)-(u*2/3,0),L,AB,J2); corner
+ tsbx(up_ u*4/3); dot
+ ETR5000: box wid CUR6.C.e.x-CUR1.C.x + u/5 ht CUR5.C.diam+u/2 \
+ with .nw at (CUR1.C.n.x-u/8,CUR5.C.n.y+u/6)
+ {" ETR-5000-T1" wid 72bp__ at ETR5000.s above }
+ AL: arrow from Tr3.L2.c down_ u ht u/3*sqrt(3)/2 wid u/3; BX: Here
+ { line down_ u*2/3 from Here+( u/12,0) }
+ { line down_ u*2/3 from Here+(-u/12,0) }
+ { line down_ u*2/3; Bbot: Here }
+ { ellipse wid u/6 ht u/10 at Here+(0,-u/6)
+ line left_ u/2 from last ellipse.e
+ ellipse wid u*2 ht u/2 `"2000 A BUSWAY"' }
+ line from (CUR6,Bbot) to (CUR6,X); tsbx(to CUR6.C.s)
+ Outer: box ht AT.end.y-AB.end.y wid ETR5000.e.x-Lft.x + u/3 \
+ with .nw at (Lft.x-u/6,AT.end.y)
+ `"USG-1A"' ljust \
+ `"13.8 KV 1200 A"' ljust \
+ `"50 kA SYM S.C."' ljust \
+ `"(15 kV - 95 kV BIL RATED)"' ljust at Outer.nw+(0,-u*2/3)
+ ]
+
+ command "</g>"
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EscherSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EscherSVG.m4
new file mode 100644
index 00000000000..191123754e6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/EscherSVG.m4
@@ -0,0 +1,188 @@
+.PS
+# EscherSVG.m4
+# https://tex.stackexchange.com/questions/129274/showcase-of-optical-illusions-made-with-tex-latex-luatex-context
+threeD_init
+[
+ u=1/2.54 # unit size; could use scale for this
+
+ define(`treadcolor',`0.8,0.75,0.7')
+ define(`darkgrn',`.1,.1,0')
+ define(`lightgrn',`.7,.7,.6')
+
+ define(`northsteps',3)
+ define(`eaststeps',8)
+ define(`southsteps',7)
+ define(`weststeps',4)
+ define(`baselayers',10)
+ define(`eb',eval(baselayers+eaststeps))
+ define(`ebs',eval(eb+southsteps))
+ define(`under',7)
+
+ azimuth = -45 # view angles
+ elevation = 25
+ setview(azimuth,elevation,0)
+ # projected unit vectors
+ UX: Project(u,0,0)
+ UY: Project(0,-u,0)
+ UZ: Project(0,0,u)
+ # layer thickness in units of u
+ f= -(eaststeps*UX.y + southsteps*UY.y - weststeps*UX.y - northsteps*UY.y)/dnl
+ ((eaststeps+southsteps+weststeps+northsteps)*UZ.y)
+ # XY projection of 3D coords in units of u
+define proj {UX*($1)+UY*($2)+UZ*($3)}
+
+define tread {line from UY/2 \
+ to UY then to UY+UX then to UX then to (0,0) \
+ then to UY/2 shaded rgbstring(treadcolor) \
+ with .start at proj($1,$2,$3)+UY/2 }
+
+define wrect {line invis from (0,0) to UX*($4) \
+ then to UX*($4)+UZ*($5) \
+ then to UZ*($5) then to (0,0) with .start at proj($1,$2,$3) \
+ shaded rgbstring(r,g,b)}
+
+define srect {line invis from (0,0) to UY*($4) then to UY*($4)+UZ*($5) \
+ then to UZ*($5) then to (0,0) with .start at proj($1,$2,$3) \
+ shaded rgbstring(r,g,b) }
+ # color blending
+define(`blendwht',`between3D(`$1',`$2',`$3',`$4',1,1,1)')
+define makergb { r = $1; g = $2; b = $3 }
+define dorgb { gg = $2
+ if $1==0 then { makergb(blendwht(gg,lightgrn)) } \
+ else { makergb(blendwht(gg,darkgrn)) } }
+
+# East
+ for i=-under to baselayers do {
+ dorgb((i%2),0.2)
+ wrect(1,1,i*f,eaststeps-2,-f) }
+ for i=0 to eaststeps do {
+ dorgb((i%2),0.2)
+ wrect(i,1,(baselayers+i)*f,(eaststeps+1-i),-f)
+ tread(i,0,(baselayers+i)*f)
+ line from proj(i,1,(baselayers+i)*f) \
+ to proj(i,1,(baselayers-1+i)*f) }
+# South
+ for i=0 to eb do {
+ dorgb((i%2),0.4)
+ srect(eaststeps+1,0,i*f,southsteps+1,-f) }
+ for i=1 to southsteps do {
+ dorgb((i%2),0.4)
+ srect(eaststeps+1,i,(eb+i)*f,(southsteps+1-i),-f)
+ tread(eaststeps,i,(eb+i)*f)
+ line from proj(eaststeps+1,i,(eb+i)*f) \
+ to proj(eaststeps+1,i,(eb+i-1)*f) }
+# North
+ for i=-under to baselayers-northsteps-1 do {
+ dorgb((i%2),0.1)
+ srect(1,1,i*f,northsteps-1,-f) }
+ for i=1 to northsteps do {
+ dorgb((i%2),0.1)
+ srect(1,1,(baselayers-i)*f,i,-f)
+ wrect(0,1+i,(baselayers-i)*f,1,-f)
+ line from proj(0,1+i,(baselayers-i)*f) \
+ to proj(0,1+i,(baselayers-i-1)*f)
+ line from proj(1,1+i,(baselayers-i)*f) \
+ to proj(1,1+i,(baselayers-i-1)*f)
+ tread(0,i,(baselayers-i)*f) }
+# West
+ for i=0 to ebs do {
+ dorgb((i%2),0.4)
+ wrect(eaststeps+1,southsteps+1,i*f,-(weststeps+1),-f) }
+ for i=0 to weststeps-1 do {
+ dorgb((i%2),0.4)
+ wrect(eaststeps-i,southsteps+1,(ebs+i+1)*f,-(weststeps-i),-f,)
+ srect(eaststeps-i,southsteps,(ebs+i+1)*f,1,-f)
+ if i!=weststeps-1 then {
+ line from proj(eaststeps-i,southsteps,(ebs+i+1)*f) \
+ to proj(eaststeps-i,southsteps,(ebs+i)*f) }
+ line from proj(eaststeps-i,southsteps+1,(ebs+i+1)*f) \
+ to proj(eaststeps-i,southsteps+1,(ebs+i)*f)
+ tread(eaststeps-(i+1),southsteps,(ebs+i+1)*f) }
+# Corner lines
+ define(`dgreen',`outlined rgbstring(blendwht(0.2,darkgrn))')
+ line dgreen from proj(1,1,(baselayers-1)*f) to proj(1,1,-under*f)
+ line dgreen from proj(eaststeps+1,southsteps+1,ebs*f) \
+ to proj(eaststeps+1,southsteps+1,-f)
+ line dgreen from proj(0,northsteps+1,(baselayers-northsteps)*f) \
+ to last line.end-UX*(weststeps+1) then to last line.end \
+ then to proj(eaststeps+1,0,-f) then to proj(eaststeps+1,0,eb*f)
+ ]
+
+ifelse(1,1,`
+[
+ setview(-45,20)
+ bwid = 2.8
+ bh = 1.5
+ bdp = 1.8
+ bth = 0.3
+ A: Project(0,0,0)
+ AA: A+Project(bth,bth,-bth)
+ B: Project(0,bwid,0)
+ BB: B+Project(bth,-bth,-bth)
+ C: Project(bdp,bwid,0)
+ D: Project(bdp,0,0)
+ E: Project(0,0,-bh)
+ F: Project(bdp,0,-bh)
+ G: Project(bdp,bwid,-bh)
+ H: B + Project(0,0,-bh)
+
+ line from A to B then to C then to D then to A then to E then to F \
+ then to G then to H then to E
+ line from C to G
+ line from A+Project(bth,bth,0) to B+Project(bth,-bth,0) \
+ then to C+Project(-bth,-bth,0)
+ L1: line to D+Project(-bth,bth,0)
+ L2: line to A+Project(bth,bth,0)
+ L4: line from E+Project(bth,bth,0) to H+Project(bth,-bth,0)
+ L3: line to C+Project(-bth,-bth,-bh)
+ line to F+Project(-bth,bth,0) then to A+Project(bth,bth,-bh)
+
+ L5: line from D+Project(-bth,0,-bth) to A+Project(bth,0,-bth)
+ line to E+Project(bth,0,bth)
+ L6: line to Here+Project(0,bwid-2*bth,0)
+ L7: line from D+Project(0,bth,-bth) to C+Project(0,-bth,-bth)
+ line to G+Project(0,-bth,bth)
+ L8: line to Here+Project(-bdp+2*bth,0,0)
+ Tmp: line invis from L8.start+Project(-bth,0,0) up bh
+ line from Tmp.start to Intersect_(Tmp,L7)
+ Tmp: line invis from L8.end up bh
+ line from L8.end to Intersect_(Tmp,L7)
+ line from Intersect_(Tmp,L1) to BB+Project(bth,0,0)
+ Tmp: line invis to Here+Project(bdp,0,0)
+ line from Tmp.start to Intersect_(Tmp,L1)
+
+ Tmp: line invis from H up bh
+ line from H to Intersect_(Tmp,L7)
+ line from Intersect_(Tmp,L1) to B+Project(bth,-bth,0)
+
+ Tmp: line invis from AA to AA+Project(0,bwid,0)
+ Tmp2: line invis up bh from L6.end
+ line from Intersect_(Tmp,L2) to Intersect_(Tmp2,Tmp) \
+ then to Intersect_(Tmp2,L1)
+ line from L6.end to Intersect_(Tmp2,L7)
+
+ Tmp: line invis down bh from AA
+ line from Intersect_(Tmp,L6) to Intersect_(Tmp,L5)
+
+ Tmp: line invis down bh from D
+ line from D to Intersect_(Tmp,L6)
+ line from Intersect_(Tmp,L4) to F+Project(-bth,bth,0)
+
+ Tmp: line invis from L5.start to L5.start+Project(0,0,-bh)
+ move to E+Project(0,2*bth,0)
+ Tmp2: line invis to Here+Project(bdp,0,0)
+ line from L5.start to Intersect_(Tmp,L6)
+ line from Intersect_(Tmp,L4) to Intersect_(Tmp,Tmp2) \
+ then to Intersect_(Tmp2,L4)
+
+ Tmp: line invis from L7.start to L7.start+Project(0,0,-(bh-bth))
+ line from L7.start to Intersect_(Tmp,L6)
+
+ move to G+Project(-2*bth,0,0)
+ Tmp2: line invis to Here+Project(0,-bwid,0)
+ line from Intersect_(Tmp2,L3) to Intersect_(Tmp,Tmp2)
+ line from Intersect_(Tmp,L4) to Intersect_(Tmp2,Tmp)
+
+] with .sw at last [].se+(0.2,0)
+')
+.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
index ae0a661012d..bb6ff0bd2a7 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GeometrySVG.m4
@@ -3,6 +3,8 @@
gen_init
scale = 5/4
+G: [
+
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
@@ -42,5 +44,167 @@ gen_init
line dashed from X to Y chop -linewid/2
RightAngle(A,Z,Y)
+ ] scaled 0.8
+Lyap: [
+#.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
+ ] scaled 1.5 with .sw at last [].se+(0.5,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GrayCodeSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GrayCodeSVG.m4
index 8d11969049f..b878e63d8ef 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GrayCodeSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/GrayCodeSVG.m4
@@ -2,6 +2,7 @@
# Gray_code.m4
gen_init
+GrayCode: [
outer = 4
inner = 0.75
nbits = 10
@@ -17,4 +18,62 @@ C: circle diam outer
arcd(C,outer/2-(bit-0.5)*lthk,startang,endang) thick lthk/(1bp__)
}
}
+ ]
+Crossbar: [
+#.PS
+# Crossbar switch
+#gen_init
+ svg_font(sans-serif,11bp__)
+ circlerad = 0.12
+ boxwid = 0.18
+ boxht = 0.18
+ rathick = 1.5
+ rawd = rathick*4 bp__
+ raht = rawd*2
+ boxdist = boxwid*1.8
+
+`define bcoord {($2,-($1))*boxdist}'
+`define redarrow { arrow ht raht wid rawd thick rathick color "red" }'
+
+`define cbx {'
+ thinlines_
+ n = $+ - 1
+ for i=0 to n do {
+ line color "blue" from bcoord(i,0) to bcoord(i,n)
+ line color "blue" from bcoord(0,i) to bcoord(n,i)
+ C[i]: circle invis at bcoord(i,-1.5)
+ }
+ for i=0 to n do {
+ exec sprintf("col = $%g",i+1)
+ redarrow from C[i].e right 1.25*boxwid
+ redarrow from C[i].w+(-boxwid,0) right raht
+ for j=0 to n do {
+ B: box color "blue" shaded "yellow" at bcoord(i,j)
+ if j==col then {
+ line color "blue" from B.s to B.e
+ line thick rathick color "red" from C[i].e to B.w \
+ then to B.n then to (B.x,C[0].y+(2+j*2/3)*boxht)
+ continue to (C[j].x-(2+j*2/3)*boxht,Here.y)
+ continue to (Here,C[j]) then to C[j].w
+ } \
+ else {
+ line color "blue" from B.n to B.s
+ line color "blue" from B.w to B.e
+ }
+ }
+ }
+ thicklines_
+ for i=0 to n do {
+ circle thick 1.5 outlined "blue" shaded "yellow" at C[i] \
+ sprintf("ifpostscript(,ifsvg(,\large))%g",i)
+ }
+ }
+
+[
+ cbx(3,6,0,5,2,7,1,4)
+ ] at 4,4
+
+ command "</g>" # end font
+#.PE
+ ] with .w at last [].e+(0.25,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/InductorsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/InductorsSVG.m4
new file mode 100644
index 00000000000..9c9e1476dbf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/InductorsSVG.m4
@@ -0,0 +1,47 @@
+.PS
+# `Inductors.m4'
+cct_init(svg_font(sans-serif,10pt__))
+textwid = 1.5
+movewid = 2 pt__
+hm = 2.1
+vm = 0.28
+
+hm = 2.05
+vm = 0.28
+{ {inductor ; move ; "`inductor '" ljust}
+ move right_ hm
+ {inductor(,W); move ; "`inductor(,W) '" ljust}
+ move right_ hm
+ {inductor(,L); move ; "`inductor(,L) '" ljust}
+}
+ move down vm; right_
+{ {inductor(,,3,M) ; move ;"`...(,,3,M) '" ljust}
+ move right_ hm
+ {inductor(,W,6,P1); variable; move; "`...(,W,6,P1); variable'" ljust}
+ move right_ hm+5bp__
+ {inductor(,L,9,K); move ;"`...(,L,9,K) '" ljust}
+}
+
+ move down vm; right_
+{ {I:inductor(,,,M3); addtaps(-,1/2,-dimen_/6); move; `"...(,,,M3)"' ljust
+ {`"addtaps(-,1/2,-dimen_/6)"' ljust at (I.start,last ""+(0,-textht*3/2)) }
+ }
+ move right_ hm
+ {ebox(,,,0) ; move ;"`ebox(,,,0) '" ljust}
+ move right_ hm -10bp__
+ {TI: tapped(`ebox(,,,0)',-,1/4,-dimen_/6,3/4,-dimen_/6) ; move ;
+ "`tapped(`ebox(,,,0)','" ljust at Here+(10bp__,-5bp__) \
+ "-,1/4,-dimen_/6," ljust "3/4,-dimen_/6)" ljust
+ "svg_it(Tap1)" at TI.Tap1 rjust below
+ "svg_it(Tap2)" at TI.Tap2 ljust below }
+}
+
+ move down vm*3/2; right_
+{ {shielded(`inductor(,,,M)') ; move
+ `"shielded(`inductor(,,,M)')"' ljust
+ move to (3rd last line.start,Here)
+ shielded(`ebox(,,,0)',R) ; move; `"shielded(`ebox(,,,0)',R)"' ljust }
+}
+
+ command "</g>" # end font
+.PE
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
deleted file mode 100644
index 6ed269a428a..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/LyapSVG.m4
+++ /dev/null
@@ -1,159 +0,0 @@
-.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/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
index 4436cd1aa53..1826a94d7a0 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile
@@ -15,7 +15,7 @@ DPIC = 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
+# system. NOTE: cscSVG.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
@@ -50,21 +50,23 @@ DPIC = dpic
CCTSVG = \
AdderSVG.svg AlogixSVG.svg ABlogixSVG.svg AmpTableSVG.svg AntennasSVG.svg \
- AntiqueClockSVG.svg \ AudioSVG.svg \
+ AudioSVG.svg \
BipSVG.svg BtreeSVG.svg ByteSVG.svg ButtonsSVG.svg \
- CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg ConnectorsSVG.svg \
+ CanLogicSVG.svg CapacitorsSVG.svg ChipsSVG.svg ConnSVG.svg ConnectorsSVG.svg \
ContactSVG.svg ContactsSVG.svg \
- CountingSVG.svg CrossbarSVG.svg CrowSVG.svg CsourceSVG.svg \
+ CountingSVG.svg CrowSVG.svg CsourceSVG.svg \
DecoderSVG.svg DemultiplexerSVG.svg DiniSVG.svg DiodesSVG.svg DriveSVG.svg \
- EmarrowsSVG.svg \
+ EEPSVG.svg EmarrowsSVG.svg \
FlowSVG.svg FontsSVG.svg FusesSVG.svg \
GeometrySVG.svg GrayCodeSVG.svg GroundsSVG.svg \
- HeadersSVG.svg HeathkitSVG.svg InclepsSVG.svg I2LSVG.svg JackSVG.svg \
- LyapSVG.svg LogicSVG.svg LoglogSVG.svg \
- MCSVG.svg MixerSVG.svg MotorControlSVG.svg MultiplexerSVG.svg \
+ HeadersSVG.svg HeathkitSVG.svg \
+ InclepsSVG.svg InductorsSVG.svg I2LSVG.svg JackSVG.svg \
+ LogicSVG.svg LoglogSVG.svg \
+ MCSVG.svg MixerSVG.svg MoreTableSVG.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\
+ PconnSVG.svg PlateSVG.svg PushPullSVG.svg QuantumSVG.svg \
+ RectifiersSVG.svg RelaySVG.svg ResistorsSVG.svg RotboxSVG.svg\
SchottkySVG.svg ShiftRSVG.svg SierpinskiSVG.svg \
SixpoleSVG.svg SourcesSVG.svg SQUIDSVG.svg SwitchesSVG.svg \
TTLnandSVG.svg TgateSVG.svg ThreeSVG.svg \
@@ -76,8 +78,7 @@ 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 UNOSVG.svg wormSVG.svg XORSVG.svg Np.svg \
- Y14-5SVG.svg
+ thyristorSVG.svg ujtSVG.svg UNOSVG.svg wormSVG.svg XORSVG.svg Np.svg
examplesSVG.html: examplesSVG.htmx
cp ../quick.m4 .
@@ -89,7 +90,7 @@ examplesSVG.html: examplesSVG.htmx
SED = sed -e '/^\%/d'
TEST = test
tst:
- if test -f test.pic; then printf "\n\nUsage: make clean tst\n\n"; exit 1; fi
+ @if test -f test.pic; then printf "\n\nUsage: make clean tst\n\n"; exit 1;fi
m4 $(M4LIBS) test.m4 | $(SED) > test.pic
$(DPIC) -v $(TEST).pic > $(TEST).svg
m4 $(M4LIBS) $(TEST).m4 | $(SED) > $(TEST).pic
@@ -112,20 +113,14 @@ tstSVG.html: tstSVG.htmx $(TEST).svg
xst: Incleps.png
-AntiqueClockSVG.svg ConnectorsSVG.svg:
+# necessary because of rotated text:
+ConnectorsSVG.svg cscSVG.svg test.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
- $(DPIC) -v AntiqueClockSVG.pic > AntiqueClockSVG.svg
- grep '<\!-- width' AntiqueClockSVG.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > AntiqueClockSVG.siz
-
InclepsSVG.svg: InclepsSVG.m4
m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic
$(DPIC) -v $*.pic > $*.svg
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MoreTableSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MoreTableSVG.m4
new file mode 100644
index 00000000000..e06efb5d5e4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MoreTableSVG.m4
@@ -0,0 +1,41 @@
+.PS
+# MoreTableSVG.m4
+cct_init(svg_font(sans-serif,11pt__))
+textwid = 1.5
+movewid = 2 pt__
+hm = 2.1
+vm = 0.28
+
+hm = 2.05
+vm = 0.28
+
+{ {memristor ; move;"`memristor '" ljust}
+ move right_ hm
+ {heater; move;"`heater '" ljust}
+ move right_ hm
+ {tline ; move;"`tline '" ljust}
+}
+ move down 0.25; right_
+{ {pvcell ; move;"`pvcell '" 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_
+{ {gap ; move ;"`gap '" ljust}
+ move right_ hm
+ {gap(,,A) ; move ;"`gap(,,A) '" ljust}
+ move right_ hm
+ {arrowline ; move;"`arrowline '" ljust}
+}
+ move down 0.25; right_
+{ move down 0.10; right; {lamp ; move;"`lamp '" ljust}
+ move right_ hm
+ {thermocouple ; move;"`thermocouple '" ljust }
+# move up 0.10 right_ hm
+# {arrester ; move ;"`arrester '" ljust}
+}
+
+ command "</g>" # end font
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MultiplexerSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MultiplexerSVG.m4
index aba528b33bf..1cd5605d6ff 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MultiplexerSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/MultiplexerSVG.m4
@@ -17,7 +17,6 @@ log_init
"svg_it(Sel)" at last [].Sel.end ljust above
left_; Mux(4,,LNOE) with .c at last [].c+(0.9,0)
- { line right 8bp__ at last [] . 1nd last ""+(-10bp__,4bp__) }
"`left_; Mux'(4,,LNOE)" at last [].s +(0,-20bp__)
"svg_it(In0)" at last [].In0.end above
"svg_it(NOE)" at last [].NOE.end +(4bp__,0) below
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PlateSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PlateSVG.m4
new file mode 100644
index 00000000000..e54235ebc5a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PlateSVG.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,9.5bp__)',
+`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/PushPullSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PushPullSVG.m4
index 775b9de966c..c3610fdaf67 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PushPullSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PushPullSVG.m4
@@ -1,6 +1,6 @@
.PS
# `PushPullSVG.m4'
-cct_init(svg_font(sans-serif,10bp__,1bp__))
+cct_init(svg_font(sans-serif,9bp__,1bp__))
linewid = 1.2*linewid
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4
new file mode 100644
index 00000000000..4fb0be47f00
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ResistorsSVG.m4
@@ -0,0 +1,34 @@
+.PS
+# `ResistorsSVG.m4'
+cct_init(svg_font(sans-serif,11pt__))
+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)'" ljust " svg_equiv `ebox'" ljust}
+}
+ move down vm; right_
+{ {resistor(,,ES) ; move ; "`resistor(,,ES) '" ljust}
+ move right_ hm
+ {resistor(,,H) ; move ; "`resistor(,,H) '" ljust}
+ move right_ hm
+ {ebox(,,,0.5) ; move ; "`ebox(,,,0.5) '" ljust}
+}
+ move down vm; right_
+{ {resistor(,,V) ; move ; "`resistor(,,V) '" ljust}
+ move right_ hm
+ {ebox(,0.5,0.3) ; move ;"`ebox(,0.5,0.3) '" ljust}
+ move right_ hm+4bp__
+ {resistor(,,B) ; move movewid-4bp__ ; "`resistor(,,B) '" ljust}
+}
+
+ command "</g>" # end font
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4
index 9a0b56d523f..de8e13843e5 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4
@@ -6,9 +6,7 @@ textoffset = textht/6
define(`lg_plen',3)
define(`customFF',`FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,,
- :S;NE:CK;:R, N:PR, :Q;;ifelse(`$1',1,:Q), N:CLR,,
- ifelse(`$1',1,
- line right textht with .end at 2nd last ""+(-textoffset,0.4*textht)))')
+ :S;NE:CK;:R, N:PR, :Q;;ifelse(`$1',1,:svg_ol(Q)), N:CLR,,)')
F0: customFF(1)
@@ -21,8 +19,7 @@ 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" wid 33bp__ at NCLR.start rjust
- line left last "".wid with .c at last "".n+(0,1.5bp__)
+ "svg_ol(CLEAR)" wid 33bp__ at NCLR.start rjust
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/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TTLnandSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TTLnandSVG.m4
index e1d7d4dae14..7b270778665 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TTLnandSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/TTLnandSVG.m4
@@ -48,8 +48,7 @@ Vcc:dot; "+5 svg_norm(V)" ljust at last [].e
line right (N.y-S.y)/2+dimen_/2 from Q3.C
Z: dot
lw = 1.05
- "svg_it(Z = X1 . X2 . X3)" wid lw ljust
- line left lw*0.73 from last "".ne+(0,2*textoffset)
+ "svg_it(Z = svg_ol(X1 . X2 . X3))" wid lw ljust
command "</g>" # end font
.PE
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
deleted file mode 100644
index 60689f15ec3..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNO.m4
+++ /dev/null
@@ -1,265 +0,0 @@
-.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
index 8ae314f1afe..8c1ba332487 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNOSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/UNOSVG.m4
@@ -507,8 +507,8 @@ Pwr: [
"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)
+ "ON/svg_ol(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
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/WindingsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/WindingsSVG.m4
index 0ead17d87f0..e4faa89b5c1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/WindingsSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/WindingsSVG.m4
@@ -1,6 +1,6 @@
.PS
# Windings.m4
-cct_init(svg_font(sans-serif,11bp__))
+cct_init(svg_font(sans-serif,10bp__))
textoffset = 3bp__
define(`vlight',`rgbstring(0.9,0.9,0.9)')
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/controlSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/controlSVG.m4
index 53db5c6312a..ab2eea7efc8 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/controlSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/controlSVG.m4
@@ -1,97 +1,224 @@
.PS
-# control.m4
-#.PS 5i
-cct_init(svg_font(sans-serif,11bp__))
+# controlSVG.m4
+gen_init(svg_font(Times,11bp__))
linewid = linewid*0.8
- circlerad = 0.35/2
+ circlerad = 0.25/2
bw = boxwid/2
bh = boxht/2
+ maxpsht = 15
+
+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+
PID: [
{"svg_it(r(s))" above ljust}
arrow
S1: circle
line right "svg_it(e(s))" above
- { arrow right ; box ht bh wid bw "svg_it(K`'svg_sub(p))"
+ { arrow right ; box ht bh wid bw "svg_it(K)svg_sub(p)"
arrow right linewid-circlerad ; S2: circle }
- { line up linewid ; arrow right ; box ht bh wid bw "svg_it(K`'svg_sub(D) s)"
+ { line up linewid ; arrow right ; box ht bh wid bw "svg_it(K)svg_sub(D)s"
line to (S2,Here) ; arrow to S2.n }
- { line down linewid ; arrow right
- box ht bh wid bw "svg_it(K`'svg_sub(I) /s)"
+ { line down linewid ; arrow right ; box ht bh wid bw "svg_it(K)svg_sub(I)/s"
line to (S2,Here) ; arrow to S2.s }
arrow right from S2.e "svg_it(u(s))" above
box "svg_it(G(s))"
arrow right ; "svg_it(y(s))" above rjust at Here+(0,2pt__)
line down boxht*3/2 from last arrow.c then left last arrow.c.x-S1.x
arrow to S1.s
- "-" below rjust
- ]
- "(a) PID control" below ljust at PID.sw+(0,-5pt__)
+ "svg_it(-)" rjust at Here+(-2bp__,-2bp__)
+]
+ "(a) svg_it(PID) control" below ljust at PID.sw+(0,-5pt__)
+
+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+
+# https://tex.stackexchange.com/questions/575592/how-to-create-a-controls-system-diagram
+Observer: [
+ define(`thickarrow',`arrow thick 3 wid 7bp__')
+ define(`thickline',`line thick 3')
+ fillval = 0.6
+ boxwid = 0.3
+ boxht = 0.4
+ circlerad = 0.1
+ {"svg_it(r)" above ljust}
+R: arrow
+S: circle fill
+ {"svg_thinsp`'svg_it(-)" below ljust at S.s
+ "svg_it(+)" above rjust at S.w+(2bp__,0)}
+{ PLT: box invis fill 0.9 wid 3.1 ht 1.2 with .nw at Here+(0.3,boxht*3/4)
+ "svg_it(Plant)" at PLT.sw above ljust }
+U: arrow right 0.4
+ {"svg_it(u)" at last arrow+(2bp__,0) above }
+Bp: box fill "svg_it(B)"
+ thickarrow right 0.4
+Sp: circle fill
+ {"svg_thinsp`'svg_it(+)" below ljust at Sp.s
+ "+" above rjust at Sp.w+(2bp__,2bp__)}
+ thickarrow right 0.4
+ {"svg_bf(x)" at last arrow + (0,7bp__); "." at last "".n +(0,textoffset)}
+Ip: box fill "svg_it(I/s)"
+ thickarrow right 1
+ {"svg_bf(x)" at last arrow + (0,7bp__) }
+Cp: box fill "svg_it(C)"
+# print Cp.e.x - Bp.w.x + 0.2
+ thickline right 0.4
+Yp: thickarrow
+ {"svg_bf(y)" at last arrow + (0,7bp__) }
+Ap: box fill "svg_it(A)" with .n at Ip.s+(0,-boxht/2)
+ thickarrow <- from Ap.e right 0.4 then up Ip.y-Ap.y
+ thickarrow from Ap.w to (Sp,Ap) then to Sp.s
+# print PLT.n.y-Ap.s.y+0.1
+#
+K: box fill "svg_it(K)" at Ap + (0,-boxht*3/2)
+ arrow from K.w to (S,K) then to S.s
+ {OBS: box invis fill 0.9 wid 4.3 ht 1.8 with .nw at (S.w,K.s)-(0.1,0.1)
+ "svg_it(Observer)" at OBS.sw ljust above }
+Io: box fill "svg_it(I/s)" at K + (0,-boxht*3/2)
+ thickarrow <- from Io.w left 0.4
+ {"svg_bf(x)" at last arrow + (0,7bp__); "svg_circ" at last ""
+ "." at last "".n above}
+Sxo: circle fill
+ {"svg_thinsp`'svg_it(+)" below ljust at Sxo.s
+ "svg_it(+)" above rjust at Sxo.w+(2bp__,2bp__)}
+ thickarrow <- left 0.4
+SLo: circle fill
+ {"svg_thinsp`'svg_it(+)" below ljust at SLo.s
+ "svg_it(+)" above rjust at SLo.w+(2bp__,2bp__)}
+ thickarrow <- left 0.4
+Bo: box fill "svg_it(B)"
+ arrow from 1/4 between U.start and U.end up boxht*3/4 \
+ then left 2*boxht then down Bp.y-Bo.y+boxht*3/4 then to Bo.w
+Ao: box fill "svg_it(A)" with .n at Io.s+(0,-boxht/2)
+ thickline from Io.e right 0.4
+ {thickarrow <-> from K.e to (Here,K.e) then to (Here,Ao) then to Ao.e
+ thickarrow from Ao.w to (Sxo,Ao.w) then to Sxo.s }
+Xhat: Here
+Co: box fill "svg_it(C)" at (Cp,Here)
+ thickarrow right 0.4
+ {"svg_bf(y)" at last arrow + (0,7bp__); "svg_circ" at last ""}
+ { thickarrow from Xhat to Co.w }
+ {"svg_it(x)" at last arrow + (0,7bp__); "svg_circ" at last "" }
+Syo: circle fill
+ {"svg_it(+)" above ljust at Syo.n
+ "svg_it(-)" above rjust at Syo.w+(2bp__,2bp__)}
+ thickarrow <- from Syo.n to (Syo,Cp)
+Lo: box fill "svg_it(L)" with .n at Ao.s+(0,-boxht/2)
+# print Io.n.y+0.1 - (Lo.s.y-0.1)
+ thickarrow from Syo.s down Syo.s.y-Lo.y then to Lo.e
+ thickarrow from Lo.w to (SLo,Lo.w) then to SLo.s
+ ] with .nw at last [].sw+(0,-0.5)
-Obs: [ {"svg_it(r)" above ljust}
+Eqns: [ {"svg_it(r)" above ljust}
+ ex = textht*2/3
+ define(`DDt',`svg_frac(svg_it(d):1*ex,svg_it(dt):2*ex)')
arrow
S: circle
- "-" below rjust at S.s
+ "svg_it(-)" below rjust at S.s
arrow <- down linewid/2 from S.s
box ht bh wid bw "svg_it(K)"
arrow <- down linewid/2
- line right linewid "svg_it(z)" above
-Obs:box wid linewid*5.5 ht boxht*5/4 "svg_it(dz/dt = (A - LC) z + B u + L y)"
- "Observer" above ljust at Obs.sw
+ line right linewid
+ {"svg_hat(svg_bf(x))" at last line.c above }
+Obs:box wid linewid*5 ht boxht*5/4
+ [ DDt; "svg_hat(svg_bf(x)) svg_it(= (A-LC)) svg_hat(svg_bf(x))
+ svg_it(+ Bu + L)svg_bf(y)" wid 1.5 ljust ] at Obs
+ "svg_it(Observer)" above ljust at Obs.sw
arrow <- right linewid/2 from 3/4<Obs.se,Obs.ne>
line to (Here,S)
{"svg_it(u)" above at Here+(linewid/2,0)}
arrow from S.e to Here+(linewid,0)
-Plant: box wid boxwid*1.7 ht boxht*5/4 \
- "svg_it(dx/dt = Ax + Bu)" "svg_it(y = Cx)"
- "Plant" above ljust at Plant.sw
+Plant: box wid boxwid*3/2 ht boxht*5/4
+ [ DDt; "svg_bf(x) svg_it(= A) svg_bf(x) svg_it(+ Bu)" wid 0.8 ljust
+ "svg_bf(y) svg_it( = C) svg_bf(x)" wid 0.6 ljust \
+ at last "".w + (0,-textht*2) ] at Plant+(0,0.05)
+ "svg_it(Plant)" above ljust at Plant.sw
arrow right from Plant.e
"svg_it(y)" above rjust at Here+(0,2pt__)
move to last arrow.c
line to (Here, 1/4<Obs.se,Obs.ne>)
arrow to (Obs.e,Here)
- ] with .nw at PID.sw+(0,-0.5)
- "(b) Output feedback with a full-order observer" below ljust \
- at Obs.sw+(0,-5pt__)
+ ] with .nw at last [].sw+(0,-0.1)
+ "(b) Plant with feedback from a full-order observer" \
+ below ljust at Eqns.sw+(0,-5pt__)
+
+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+
+Multiblock: [
+boxht = 0.4
+boxwid = boxht
+
+define summer { circle
+ {line from last circle.nw to last circle.se
+ line from last circle.sw to last circle.ne
+ "svg_it($1)" at 0.6 between last circle and last circle.n
+ "svg_it($2)" at 0.6 between last circle and last circle.s
+ "svg_it($3)" at 0.6 between last circle and last circle.e
+ "svg_it($4)" at 0.6 between last circle and last circle.w }
+}
-NL: [boxwid = boxwid*1.8
- boxht = boxht*3/2
+ arrow "svg_it(E`'svg_sub(1))" above
+S1: summer(,-,,+)
+ linewid = boxwid/2
+ arrow "svg_epsilon" above
+ [box "svg_it(H)svg_sub(1)"; arrow; box "svg_it(H)svg_sub(2)"]
+ arrow
+S2: summer(-,,,+)
+ arrow
+T: [box "svg_it(H)svg_sub(3)"; arrow; box "svg_it(H)svg_sub(4)"]
+ line
+Y: Here
+ arrow
+ "svg_it(S)svg_sub(1)" above
+R1: box "svg_it(R)svg_sub(1)" at (T.x,T.y+boxht*3/2)
+ arrow from Y to (Y,R1) then to R1.e
+ arrow from R1.w to (S2,R1) then to S2.n
+ "svg_it(n)svg_sub(1)" ljust at S2.n+(0,boxht/2)
+ left
+Rf: [box "svg_it(R)svg_sub(2)"; arrow; box "svg_it(R)svg_sub(3)"] \
+ at ((S1.x+T.x)/2,T.y-boxht*3/2)
+ arrow from T to (T,Rf) then to Rf.e
+ arrow from Rf.w to (S1,Rf) then to S1.s
+ "svg_it(n)svg_sub(2)" at S1.s+(0,-boxht/2) ljust
+] with .nw at Eqns.sw + (0,-0.3)
+ "(c) A multiblock example" below ljust at Multiblock.sw+(0,-5pt__)
+
+# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #
+
+Nonlinear: [boxwid = boxwid*3/2; boxht = boxht*3/2
thicklines_
- scale = scale*0.8
- circlerad = 0.3/2
-R: box wid boxwid*5/4 "reference" "svg_it(R)"
- arrow right linewid*4/3 "svg_it(y`'svg_sub(c ref))" above
-Gh: box wid boxwid*5/4 "\"inverse\"" "of svg_it(G)"
- arrow from Gh.s down "svg_it(y`'svg_sub(m ref))" ljust
+ boxwid = boxwid*0.6
+ boxht = boxht/2
+R: box "reference" "svg_it(R)"
+ arrow right linewid*4/3
+ {"svg_it(y)svg_sub(c)[ref]" at last arrow+(0,textht/3) above }
+Gh: box "\"i`'nverse\"" "of svg_it(G)"
+ arrow from Gh.s down "svg_it(y)svg_sub(m)[ref]" ljust
E: circle
arrow from E.e right "svg_it(e)" above
- box wid boxwid*5/4 "stabilizer" "svg_it(K)"
- arrow "svg_it(du)" above
+ box "stabilizer" "svg_it(K)"
+ arrow "svg_delta`'u" above
D: circle
- line from Gh.e to (D,Gh.e) "svg_it(u`'svg_sub(ref))" above
+ line from Gh.e to (D,Gh.e) "svg_it(u)[ref]" above
arrow to D.n
arrow from D.e right "svg_it(u)" above
G: box "plant" "svg_it(G)"
- arrow <- from G.n up boxht/2
- "disturbance svg_it(z)" above
- arrow right from G.e + (0,boxht/4)
- "svg_it(y`'svg_sub(c))" ljust
- arrow right from G.e + (0,-boxht/4)
- "svg_it(y`'svg_sub(m))" ljust
+ arrow <- from G.n up boxht/2; "disturbance svg_it(z)" above
+ arrow right from G.e + (0,boxht/4); "svg_it(y)svg_sub(c)" wid 0.2 ljust
+ arrow right from G.e + (0,-boxht/4); "svg_it(y)svg_sub(m)" ljust
move to last arrow.c
arrow down Here.y-G.s.y+boxht*2/3 then left Here.x-E.x then to E.s
- "svg_it(-)" at Here + (-0.15,-0.1)
+ "svg_it(-)" rjust below
arrow <- down from R.s
"svg_it(W) control input" at Here - (0,0.1)
-
UL:R.nw +(-boxht/2,boxht/2)
UR:(D.e,UL) + (0.1,0)
line dashed from UL to UR then to (UR,G.s+(0,-boxht*3/2))
line dashed to (Gh.w,Here) "Controller" above
line dashed to (Here,Gh.s+(0,-boxht/2))
line dashed to (UL,Here) then to UL
- ] with .nw at Obs.sw + (0,-0.5)
- "(c) Nonlinear feedforward (for performance) and small-signal feedback
- (for stability)" wid Obs.wid+0.4 below ljust at NL.sw+(0,-5pt__)
+] with .nw at last [].sw + (0,-0.3)
+ "(d) Nonlinear feedforward (for performance) and small-signal feedback
+ (for stability)" below ljust at Nonlinear.sw+(0,-5pt__)
- command "</g>" # end font
+#print PID.n.y - Nonlinear.s.y
+command "</g>"
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/cscSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/cscSVG.m4
index 375881b4711..afc633403fb 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/cscSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/cscSVG.m4
@@ -1,10 +1,12 @@
-.PS 3.5
+.PS
+#.PS 3.5
# csc.m4
gen_init
-circlerad=1.91*scale
-hubrad=0.10
-s=0.5
+skale = 3.5/3.97*0.9955
+circlerad=1.91*skale
+hubrad=0.10*skale
+s=0.5*skale
define(`midnight',`26,26,112')
define(`white',`255,255,255')
@@ -16,7 +18,7 @@ define(`lwid',1)
define(`coord',`(s*(`$1'),s*(`$2'))')
# Circle and spokes
-# [
+CSC: [
rgbdraw(midnight,
linethick=`0.'eval(lwid*15)/(1pt__)
{circle with .c at Here
@@ -74,6 +76,167 @@ resetrgb
resetrgb
linethick=`0.'eval(lwid*15)/(1pt__)
-# ] with .sw at 1,1
+ ]
+Clock: [
+#.PS
+# AntiqueClockSVG.m4
+#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
+
+#svg_rot_init(AntiqueClockSVG)
+#svg_rot_init(test)
+svg_rot_init(cscSVG)
+
+# `hms2deg(hr,min,sec) hr:min:sec to degrees
+# blank arg1: degrees for minute hand
+# blank arg1 and arg2: degrees for second hand'
+define(`hms2deg',`ifelse(`$1',,
+ `ifelse(`$2',,
+ `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)',
+ `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')',
+ `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl
+ pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')')
+
+# `SecondHand(length,hr,min,sec)'
+define(`SecondHand',`[ shsf = (`$1')/3.2
+ C: Here
+ { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) }
+ line thick 8*shsf to rvec_(`$1',0)
+ ]')
+
+# `AntiqueMinuteHand(length,hr,min,sec)'
+define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84
+ L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4'))))
+ C: circle fill_(0) diam 0.47*mhsf at L.start
+ move to C
+ spline from rvec_(0,0.047*mhsf) \
+ to rvec_(1.65*mhsf,0.11*mhsf) \
+ then to rvec_(`$1',0.018*mhsf) \
+ then to rvec_(`$1',-0.018*mhsf) \
+ then to rvec_(1.65*mhsf,-0.11*mhsf) \
+ then to rvec_(0,-0.047*mhsf) \
+ shaded rgbstring(0,0,0)
+ ]')
+
+# `AntiqueHourHand(length,hr,min,sec)'
+define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2
+ L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4'))))
+ C: circle fill_(0) diam 0.6*hhsf at L.start
+ move to C
+ v = 0.25*hhsf
+ { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf }
+ C1: rvec_(1.25*hhsf,0)
+ d = `$1'-1.25*hhsf
+ q = 1bp__*hhsf
+ r1 = (d^2 + q^2 - v^2)/(v-q)/2
+ tang = atan2((r1+q),d)
+ for i=0 to 3 do {
+ X[i]: C1+vec_(rect_(v, pi_+i/3*( tang-pi_)))
+ Y[i]: C1+vec_(rect_(v,-pi_+i/3*(-tang+pi_)))
+ }
+ n = 3
+ for i=1 to 4 do { aa = -pi_+tang + i/4*(pi_/2-tang)
+ XX: (d,r1+q)+(rect_(r1,aa))
+ n+=1;
+ X[n]: C1+vec_(XX.x, XX.y)
+ Y[n]: C1+vec_(XX.x,-XX.y)
+ }
+ m = n
+ for i= 0 to m do { n+=1; X[n]: Y[m-i] }
+ fitcurve(X,n,shaded rgbstring(0,0,0))
+ ]')
+
+define(`AntiqueClock',`[ # h,m,s,diam
+# Clock size parameters:
+ hour = ifelse(`$1',,3,`$1')
+ minute = ifelse(`$2',,41,`$2')
+ 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
+ r4 = r3 - 0.35*skale
+ r5 = r4 - 0.17*skale
+ r6 = r5 - 0.63*skale
+ r7 = r6 - 0.17*skale
+ shadelinethick = 1.0
+
+C: circle thick 0.2 rad r1
+
+define shadeline {
+ s = 1-($`'1)*2
+ v = r*s
+ h = sqrt(r^2-v^2)
+ t = 1-abs(s)
+ line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \
+ thick shadelinethick outlined rgbstring(t,t,t)
+ }
+
+ r = r1 # Bezel outer
+ nlines = int(2*r/(shadelinethick pt__)*1.1)
+ cost = cosd(10); sint = sind(10);
+ ShadeObject(shadeline,nlines, 0, 0,0,0, 0.5, 1,1,1, 1, 0,0,0 ) at C
+
+ r = r2 # Bezel inner
+ nlines = int(2*r/(shadelinethick pt__)*1.1)
+ cost = cosd(-10); sint = sind(-10);
+ ShadeObject(shadeline,nlines, 0, 0,0,0, 0.25, 0.8,0.8,0.8, 0.5, 1,1,1,
+ 0.75, 0.8,0.8,0.8, 1, 0,0,0 ) at C
+
+# Clock face
+Face: circle thick 0 fill_(1) rad r3 at C
+ circle rad r4 at C
+ circle rad r5 at C
+ circle rad r6 at C
+ circle rad r7 at C
+# Ad hoc shift of rotated SVG text
+ define adj { (-cosd($`'1)*textht*0.5*sign(180-($`'1)),\
+ (0.25+0.25*cosd(2*($`'1)))*textht) }
+# Outer numbers
+ 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))
+ }
+ 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))
+ }
+# Outer tics
+ for mn = 1 to 60 do { t = 90-mn/60*360
+ line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) }
+
+# Inner numbers
+ textht = (r5-r6)*0.6
+ Loopover_(`mx',`tt = 90-(m4Lx-4)/12*360
+ R: (Rect_((r5+r6)/2,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(tt-270, "mx" at C+R+adj(tt)) ',
+ IV,V,VI,VII,VIII)
+
+# Inner tics
+ for mn = 5 to 60 by 5 do { t = 90-mn/60*360
+ line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) }
+
+# Hands
+ AntiqueHourHand(r6,hour,minute,second) with .C at C
+ AntiqueMinuteHand(r5,hour,minute,second) with .C at C
+ SecondHand((r3+r4)/2,hour,minute,second) with .C at C
+
+# Center
+ dot(at C,0.1/4*r1,1)
+ ]')
+
+ Clock1: AntiqueClock(,,,3.5)
+# Clock2: AntiqueClock(4,48,07,2) at Clock1.e+(1.5,0)
+
+ command "</g>" # end font
+#.PE
+ ] with .sw at last [].se+(0.25,0)
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex21SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex21SVG.m4
index 785c13361e7..b9aa8ac18d7 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex21SVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex21SVG.m4
@@ -7,13 +7,9 @@ ddy = 1.8*dy
textht = textht*0.9
D: FlipFlop(D)
- line right 5bp__ at last [] . 1nd last ""+(-7bp__,4bp__)
T: FlipFlop(T) with .Chip.sw at last [].se + (0.4,0)
- line right 5bp__ at last [] . 1nd last ""+(-7bp__,4bp__)
RS: FlipFlop(RS) with .Chip.sw at last [].se + (0.4,0)
- line right 5bp__ at last [] . 1nd last ""+(-7bp__,4bp__)
JK: FlipFlop(JK) with .Chip.sw at last [].se + (0.4,0)
- line right 5bp__ at last [] . 2nd last ""+(-7bp__,4bp__)
`"FlipFlop(JK)"' at JK.s below
`"FlipFlop(RS)"' at (RS.s,JK.s) below
`"FlipFlop(T)"' at (T.s,JK.s) below
@@ -21,7 +17,6 @@ JK: FlipFlop(JK) with .Chip.sw at last [].se + (0.4,0)
# Test 3: synchronous 3-bit counter
define(`counterFF',``$1':FlipFlop(JK) `$2'
- line right 5bp__ at last [] . 2nd last ""+(-7bp__,4bp__)
"`$1'" at `$1'.Chip.sw-(3bp__,0) below ljust
"1" at `$1'.PinCLR.end above
"1" at `$1'.PinPR.end below')
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 8bec3482229..22ab9f9c428 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
@@ -154,6 +154,7 @@ There are a number of other issues:
e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g>
<li>m4tt svg_it(</g>text`'m4tt)</g>: for italics
<li>m4tt svg_tt(</g>text`'m4tt)</g>: for monospace (courier)
+ <li>m4tt svg_sf(</g>text`'m4tt)</g>: sans-serif (Helvetica)
<li>m4tt svg_norm(</g>text`'m4tt)</g>: for normal text
<li>m4tt svg_bf(</g>text`'m4tt)</g>: for bold face
<li>m4tt svg_small(</g>text, percent`'m4tt)</g>:
@@ -162,8 +163,13 @@ There are a number of other issues:
for setting larger or smaller text size, default 100
<li>m4tt svg_sub(</g>text, size percent, y displ, x displ`'m4tt)</g>:
subscript
+ <li>m4tt svg_ul(</g>text`'m4tt)</g>: underlined text
+ <li>m4tt svg_ol(</g>text`'m4tt)</g>: overlined text
<li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>:
superscript
+ <li>m4tt svg_hat(</g>character`'m4tt)</g>: circumflex-accented character
+ <li>m4tt svg_frac(</g>numerator[:wid], denominator[:wid]`'m4tt)</g>:
+ basic fraction, wid in drawing units
<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
@@ -184,6 +190,8 @@ There are a number of other issues:
<!--
Reference:
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
+ and
+ https://www.toptal.com/designers/htmlarrows/math/
-->
<hr width="100%" align="left">
<table cellpadding="2" cellspacing="0" width="75%" >
@@ -292,8 +300,17 @@ There are a number of other issues:
<hr>
-cfig(CctTableSVG,
- Two-terminal elements, showing some variations)
+cfig(ResistorsSVG,
+ Resistors, showing some variations)
+
+cfig(CapacitorsSVG,
+ Capacitors)
+
+cfig(InductorsSVG,
+ Inductors)
+
+cfig(MoreTableSVG,
+ Some other two-terminal elements)
cfig(DiodesSVG,
Diodes: a m4tt`'K</g> in the second argument draws an open
@@ -361,7 +378,11 @@ cfig(HeadersSVG,
The m4tt`'Header</g> macro)
cfig(ConnectorsSVG,
- Some connectors with simple geometry and lists of labels)
+ Some integrated circuits and connectors with simple geometry
+ and lists of labels)
+
+cfig(ChipsSVG,
+ IC outlines)
cfig(fetSVG,
FETs`,' showing programmable components and example customizations)
@@ -547,6 +568,10 @@ cfig(ABlogixSVG,
cfig(XORSVG,
Realizations of the XOR function using m4tt`'Autologix</g>)
+cfig(EEPSVG,
+ Part of a single-line diagram of a power distribution system
+ using draft elements)
+
cfig(paletteSVG,
A draft palette of a few elements for Inkscape using
a 1 mm grid)
@@ -555,13 +580,14 @@ cfig(ex00SVG,
Line diagrams)
cfig(controlSVG,
- Control-system block diagrams that do not require m4)
+ Control-system block diagrams)
cfig(GrayCodeSVG,
- Gray code 10-bit encoder disk pattern)
+ Gray code 10-bit encoder disk pattern`,'
+ and a crossbar switch)
-cfig(CrossbarSVG,
- A crossbar switch)
+#cfig(CrossbarSVG,
+# A crossbar switch)
cfig(ByteSVG,
Elementary splines)
@@ -591,7 +617,7 @@ cfig(ex09SVG,
specifies the arc to be dimensioned and the second argument is
the outward radial offset of the dimension arrow arc.)
-cfig(Y14-5SVG,
+cfig(PlateSVG,
Dimensioning with tolerances according to ASME Y14.5)
Use of m4tt`'darrow</g> and m4tt`'Darc</g>)
@@ -602,10 +628,10 @@ cfig(LoglogSVG,
A graph drawn using the pic language)
cfig(GeometrySVG,
- A plane geometry example)
+ A plane geometry example`,' and an illustration of a Lyapunov function)
-cfig(LyapSVG,
- Illustrating a Lyapunov function)
+#cfig(LyapSVG,
+# Illustrating a Lyapunov function)
cfig(randomSVG,
Testing random numbers)
@@ -622,21 +648,23 @@ cfig(graysurfSVG,
cfig(shapesSVG,
Basic shapes)
-cfig(AntiqueClockSVG,
- An antique clock face)
+#fig(AntiqueClockSVG,
+# An antique clock face)
cfig(cscSVG,
- Conestoga Sailing Club (illustrating the filling of arbitrary
- shapes))
+ Conestoga Sailing Club (illustrating the filling of arbitrary shapes)`,'
+ and an antique clock face with shading and rotated text)
cfig(roseSVG,
- Redrawn from a detail of the set design for the musical
- <i>Dracula</i>`,' used for testing m4tt`'dpic</g>. This diagram
+ A window redrawn from a detail of the set design for the musical
+ <i>Dracula</i>`,' used for testing m4tt`'dpic</g>`,'
+ and an experimental halftone. 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)
+ since no text formatting is required. The right object
+ adjusts the size of dots to produce a halftone effect)
cfig(diamondSVG,
Variations on M. Goossens`,' S. Rahtz`,' and F. Mittelbach`,'
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/expSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/expSVG.m4
index deff7bae074..27209b094e1 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/expSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/expSVG.m4
@@ -76,37 +76,37 @@ arad = 0.6*g
define(`D3',`0.3*g,0.6*g,0.9*g')
# fixed coordinate frame
-O: project(O3)
-X: project(X0)
-Y: project(Y0)
+O: Project(O3)
+X: Project(X0)
+Y: Project(Y0)
Fector(X0,Z0) with .Origin at O ; "svg_it(x`'svg_sub(0))" at X rjust
Fector(Y0,Z0) with .Origin at O ; "svg_it(y`'svg_sub(0))" at Y ljust below
- Fector(Z0,Y0) with .Origin at O ; "svg_it(z`'svg_sub(0))" at project(Z0) above
+ Fector(Z0,Y0) with .Origin at O ; "svg_it(z`'svg_sub(0))" at Project(Z0) above
define(`R01',`rot3Dz(pazim,rot3Dy(-pelev,$1,$2,$3))')
define(`R10',`rot3Dy(pelev,rot3Dz(-pazim,$1,$2,$3))')
thinlines_ ; psset_(linecolor=gray)
- line from O to project(rot3Dz(pazim,axlen,0,0))
+ line from O to Project(rot3Dz(pazim,axlen,0,0))
psset_(linecolor=black)
- arc -> ccw from project(arad,0,0) to project(rot3Dz(pazim,arad,0,0)) rad arad
+ arc -> ccw from Project(arad,0,0) to Project(rot3Dz(pazim,arad,0,0)) rad arad
"svg_theta" below
up_
- arc -> cw from project(rot3Dz(pazim,arad,0,0)) \
- to project(R01(arad,0,0)) rad arad
- "svg_phi" rjust at project(rot3Dz(pazim,rot3Dy(-pelev/2,arad,0,0)))
- arc -> from project(0,arad,0) to project(R01(0,arad,0)) rad arad
+ arc -> cw from Project(rot3Dz(pazim,arad,0,0)) \
+ to Project(R01(arad,0,0)) rad arad
+ "svg_phi" rjust at Project(rot3Dz(pazim,rot3Dy(-pelev/2,arad,0,0)))
+ arc -> from Project(0,arad,0) to Project(R01(0,arad,0)) rad arad
"svg_theta" above
right_
- arc -> cw from project(0,0,arad/2) to project(R01(0,0,arad/2)) rad arad/2
+ arc -> cw from Project(0,0,arad/2) to Project(R01(0,0,arad/2)) rad arad/2
"svg_phi" ljust at Here+(-1pt__,-3pt__)
Fector(R01(X0),R01(Z0)) with .Origin at O ;
- "svg_it(x`'svg_sub(1))" above rjust at project(R01(X0))
+ "svg_it(x`'svg_sub(1))" above rjust at Project(R01(X0))
Fector(R01(Y0),R01(Z0)) with .Origin at O ;
- "svg_it(y`'svg_sub(1))" ljust at project(R01(Y0))
+ "svg_it(y`'svg_sub(1))" ljust at Project(R01(Y0))
Fector(R01(Z0),R01(Y0)) with .Origin at O ;
- "svg_it(z`'svg_sub(1))" above at project(R01(Z0))
+ "svg_it(z`'svg_sub(1))" above at Project(R01(Z0))
thicklines_
# box object dimension
@@ -116,23 +116,23 @@ h = 0.20*g
# box object corners
define(`B0',`D3')
-define(`B1',`sum3D(D3,d,0,0)') PB1: project(B1)
-define(`B2',`sum3D(D3,d,b,0)') PB2: project(B2)
-define(`B3',`sum3D(D3,0,b,0)') PB3: project(B3)
-define(`B4',`sum3D(D3,0,0,h)') PB4: project(B4)
-define(`B5',`sum3D(D3,d,0,h)') PB5: project(B5)
-define(`B6',`sum3D(D3,d,b,h)') PB6: project(B6)
-define(`B7',`sum3D(D3,0,b,h)') PB7: project(B7)
+define(`B1',`sum3D(D3,d,0,0)') PB1: Project(B1)
+define(`B2',`sum3D(D3,d,b,0)') PB2: Project(B2)
+define(`B3',`sum3D(D3,0,b,0)') PB3: Project(B3)
+define(`B4',`sum3D(D3,0,0,h)') PB4: Project(B4)
+define(`B5',`sum3D(D3,d,0,h)') PB5: Project(B5)
+define(`B6',`sum3D(D3,d,b,h)') PB6: Project(B6)
+define(`B7',`sum3D(D3,0,b,h)') PB7: Project(B7)
# projected corners
-P0:project(R01(0,dcosine3D(2,R10(B0)),dcosine3D(3,R10(B0))))
-P1:project(R01(0,dcosine3D(2,R10(B1)),dcosine3D(3,R10(B1))))
-P2:project(R01(0,dcosine3D(2,R10(B2)),dcosine3D(3,R10(B2))))
-P3:project(R01(0,dcosine3D(2,R10(B3)),dcosine3D(3,R10(B3))))
-P4:project(R01(0,dcosine3D(2,R10(B4)),dcosine3D(3,R10(B4))))
-P5:project(R01(0,dcosine3D(2,R10(B5)),dcosine3D(3,R10(B5))))
-P6:project(R01(0,dcosine3D(2,R10(B6)),dcosine3D(3,R10(B6))))
-P7:project(R01(0,dcosine3D(2,R10(B7)),dcosine3D(3,R10(B7))))
+P0:Project(R01(0,dcosine3D(2,R10(B0)),dcosine3D(3,R10(B0))))
+P1:Project(R01(0,dcosine3D(2,R10(B1)),dcosine3D(3,R10(B1))))
+P2:Project(R01(0,dcosine3D(2,R10(B2)),dcosine3D(3,R10(B2))))
+P3:Project(R01(0,dcosine3D(2,R10(B3)),dcosine3D(3,R10(B3))))
+P4:Project(R01(0,dcosine3D(2,R10(B4)),dcosine3D(3,R10(B4))))
+P5:Project(R01(0,dcosine3D(2,R10(B5)),dcosine3D(3,R10(B5))))
+P6:Project(R01(0,dcosine3D(2,R10(B6)),dcosine3D(3,R10(B6))))
+P7:Project(R01(0,dcosine3D(2,R10(B7)),dcosine3D(3,R10(B7))))
thinlines_
line from PB1 to P1
line from PB2 to P2
@@ -178,24 +178,24 @@ thicklines_
alpha = rectht/3
# # Rectangle
- NW: project(-rectht/2,-rectwid*0.25,0)
- SW: project( rectht/2,-rectwid*0.25,0)
- SE: project( rectht/2, rectwid*0.75,0)
- NE: project(-rectht/2, rectwid*0.75,0)
+ NW: Project(-rectht/2,-rectwid*0.25,0)
+ SW: Project( rectht/2,-rectwid*0.25,0)
+ SE: Project( rectht/2, rectwid*0.75,0)
+ NE: Project(-rectht/2, rectwid*0.75,0)
shadedpolygon(NW:NE:SE:SW,,-90,
0,0.25,0.25,0.25,
1,1,1,1) with .Start at NW
define(`C3D',`0,0,alpha') # Centre of the sphere
- C: project(C3D)
+ C: Project(C3D)
# # Shaded sphere using PSTricks or tikz:
# # this is black magic but PSTricks
# # seems to give more control
# ifpstricks(
# `Highlight: \
-# project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0))))
+# Project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0))))
# command "\pscustom[fillstyle=gradient,gradmidpoint=0.0,%"
# command sprintf("gradbegin=gray,gradend=white,gradlines=%g,%%",alpha*200)
# command "GradientCircle=true,GradientScale=1.5,%"
@@ -218,16 +218,16 @@ thicklines_
"svg_alpha" at 0.5<S,C> ljust
define(`N3D',`0,0,2*alpha') # North pole
- N: project(N3D)
+ N: Project(N3D)
"svg_it(N)" at N+(0,3pt__) ljust
phi = 65*dtor_
define(`Phat3D',`rot3Dz(phi,alpha*3,0,0)')
- Phat: "svg_it(P)" at project(Phat3D) ljust
+ Phat: "svg_it(P)" at Project(Phat3D) ljust
"svg_symbol(&`#'94;)" at last "".n ljust
- X: project(rectht/2*0.8,0,0)
- Y: project(0,rectwid/2*0.8,0)
+ X: Project(rectht/2*0.8,0,0)
+ Y: Project(0,rectwid/2*0.8,0)
`define' linevis { # ratio # Visibility function for lines fom S to Tmp
Tlv: $1 between S and Tmp
@@ -247,8 +247,8 @@ thinlines_ # axes
arrow up alpha*0.5 chop 0.05 chop 0 ; "svg_it(z)" above
invisline(Phat)
line to Phat chop 0.05 chop 0
- arc ccw -> rad alpha from project(alpha/2,0,0) to \
- project(rot3Dz(phi,alpha/2,0,0))
+ arc ccw -> rad alpha from Project(alpha/2,0,0) to \
+ Project(rot3Dz(phi,alpha/2,0,0))
"svg_phi" below at 0.5 between last arc.start and last arc.end
# vector (ratio along (N to Phat))
@@ -257,7 +257,7 @@ define(`ray',`sum3D(N3D,sprod3D($1,diff3D(Phat3D,N3D)))')
$2 = length3D(diff3D(ray($1),C3D))-alpha }
findroot(rayvis, 1e-3, 1, 1e-8, p) # Find P
- P: "svg_it(P)" at project(ray(p)) ljust above
+ P: "svg_it(P)" at Project(ray(p)) ljust above
thicklines_
line dashed from N to P chop 0 chop 0.05
@@ -271,11 +271,11 @@ thinlines_ # Draw the meridian
findroot(meridianvis, 0, pi_, 1e-8, y)
n = 0
for ang = y-pi_ to y by pi_/20 do {
- Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 }
fitcurve(Q,n-1)
n = 0
for ang = y to y+pi_ by pi_/20 do {
- Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 }
fitcurve(Q,n-1,dashed)
define(`equator',`rot3Dz($1,alpha,0,0)')
@@ -285,15 +285,15 @@ define(`equator',`rot3Dz($1,alpha,0,0)')
findroot(equatorvis, 0, pi_, 1e-8, y)
n = 0
for ang = y-pi_ to y by pi_/20 do {
- Q[n]: project(sum3D(C3D,equator(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 }
fitcurve(Q,n-1)
n = 0
for ang = y to y+pi_ by pi_/20 do {
- Q[n]: project(sum3D(C3D,equator(ang))); n+=1 }
+ Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 }
fitcurve(Q,n-1,dashed)
line dashed from C to P # beta
- line dashed from C to project(sum3D(C3D,equator(phi)))
+ line dashed from C to Project(sum3D(C3D,equator(phi)))
arc ccw -> from 0.6 along_(last line) to 0.6 between C and P
"svg_beta" ljust at last arc.e+(0,2pt__)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/fetSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/fetSVG.m4
index 2393513219a..8495eb9e947 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/fetSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/fetSVG.m4
@@ -1,13 +1,14 @@
.PS
# `fetSVG.m4'
cct_init(svg_font(Times,11bp__))
-dwn = 0.8
-rgt = 0.9
+
+textht = 0.1
+define(`rmove',0.75)
dnl `IRF4905(linespec,R)'
define(`IRF4905',
`[ ifelse(`$1',,,`eleminit_(`$1')')
- Q: mosfet(,`$2',LdPzEDSQdB,) ifelse(`$1',,`
+ Q: mosfet(,`$2',dMdPzEDSQdB,) ifelse(`$1',,`
S: Q.tr_xy(-4,-2); line from Q.tr_xy(-2,-2) to S
D: Q.tr_xy( 4,-2); line from Q.tr_xy(2,-2) to D',
`with .Diode.c at last line.c
@@ -15,138 +16,153 @@ define(`IRF4905',
G: Q.G
circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')
-define(`rmove',0.75)
-define(`dir_',`right_')
-
-dir_
- {j_fet(right_ dimen_,,,E)
- `"j_fet(right_ dimen_,,,E)"' wid 1.5 at last [].s+(0.0,-0.05) below
- "G" at last [].G rjust above
- "S" at last [].S rjust
- "D" at last [].D ljust
- }
-
- {move down_ dwn; dir_
- j_fet(,,P,)
- `"j_fet(,,P,)"' at last [].s+(0,-0.05) below
- "G" at last [].G rjust
- "S" at last [].S rjust
- "D" at last [].D ljust
- }
-
- move right_ 1.35; dir_
- {e_fet(,R,,)
- `"e_fet(,R,,)"' at last [].s+(0,-0.2) below
- "G" at last [].G rjust
- "S" at last [].S rjust
- "D" at last [].D ljust
- }
-
- {move down_ dwn; dir_
- e_fet(,,P,)
- `"e_fet(,,P,)"' at last [].s+(0,-0.05) below}
-
- move right_ 1; dir_
- {d_fet(,,,)
- `"d_fet(,,,)"' at last [].s+(0,-0.05) below}
-
- {move down_ dwn; dir_
- d_fet(,,P,)
- `"d_fet(,,P,)"' at last [].s+(0,-0.05) below}
-
- move right_ 1; dir_
- {e_fet(,,,S)
- `"e_fet(,,,S)"' at last [].s+(0,-0.05) below}
-
- {move down_ dwn; dir_
- e_fet(,,P,S)
- `"e_fet(,,P,S)"' at last [].s+(0,-0.05) below}
-
- move right_ 1; dir_
- {d_fet(,,,S)
- `"d_fet(,,,S)"' at last [].s+(0,-0.05) below}
-
- {move down_ dwn; dir_
- d_fet(,,P,S)
- `"d_fet(,,P,S)"' at last [].s+(0,-0.05) below}
-right_
-{ [
- c_fet(,,,)
- `"c_fet(,,,)"' at last [].s+(0,-0.05) below
- move right rgt from last [].e
- c_fet(,,P)
- `"c_fet(,,P)"' at last [].s+(0,-0.05) below
- ] with .n at 5th last [].s+(0,-0.3)
- }
-move down 1; right_
-[
+{move left 20bp__}
+Row1: [ J: j_fet
+ { "svg_tt(`j_fet')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: j_fet(right_ dimen_,,P,E) with .w at J.e+(0.5,0)
+ { "svg_tt(`j_fet(right_')" at J.s+(0,-4bp__) below "svg_tt(`dimen_,,P,E)')"
+ "svg_it(G)" at J.G rjust above
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: e_fet with .w at J.e+(0.5,0)
+ { "svg_tt(` e_fet')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: e_fet(,,P) with .w at J.e+(0.6,0)
+ { "svg_tt(` e_fet(,,P)')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: e_fet(,,P,S) with .w at J.e+(0.8,0)
+ { "svg_tt(` e_fet(,,P,S)')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: c_fet with .w at J.e+(0.7,0)
+ { "svg_tt(` c_fet')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: c_fet(,,P) with .w at J.e+(0.7,0)
+ { "svg_tt(` c_fet(,,P)')" wid 72bp__ at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ ]
+
+Row2: [
+ J: d_fet
+ { "svg_tt(`d_fet')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: d_fet(,,P) with .w at J.e+(0.5,0)
+ { "svg_tt(`d_fet(,,P)')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: d_fet(,,P,S) with .w at J.e+(0.8,0)
+ { "svg_tt(`d_fet(,,P,S)')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: g_fet with .w at J.e+(0.6,0)
+ { "svg_tt(`g_fet')" at J.s+(0,-0.05) below
+ "svg_it(G)" at J.G rjust
+ "svg_it(S)" at J.S rjust
+ "svg_it(D)" at J.D ljust }
+ J: g_fet(up_ dimen_,,P) with .w at J.e+(0.6,0)
+ { "svg_tt(`g_fet(up_')" at last [].s below
+ "svg_tt(` dimen_,,P)')" at last [].s + (0,-12bp__) below
+ "svg_it(G)" at last [].G rjust
+ "svg_it(S)" at last [].S + (0,2bp__) ljust
+ "svg_it(D)" at last [].D + (0,2bp__) ljust below }
+ right_
+ M1: mosfet(,,dBSDFQM1,E) with .w at J.e+(0.6,0)
+ "svg_it(G0)" at M1.G0 above rjust
+ "svg_it(G1)" at M1.G1 above ljust
+ {"svg_tt(`mosfet(,,dBSDFQM1,E)')" wid 1.45 \
+ with .nw at last [].sw+(0,-0.2) }
+ M2: mosfet(,,dBSDFQuM1) with .nw at M1.ne+(0.6,0)
+ "svg_it(G0)" at M2.G0 above ljust
+ "svg_it(G1)" at M2.G1 above rjust
+ {"svg_tt(`...(,,dBSDFQuM1')" wid 1.25 \
+ with .n at last [].s+(0,-0.05) }
+ ] with .nw at Row1.sw+(0,-10bp__) # Row2
+
+Row3: [
linewid = linewid*1.2
Q1: mosfet(,,dGSDF,)
- { "`mosfet'(,,dGSDF,)" at last [].s+(0,-0.1) below wid 1.3
+ {"svg_tt(`mosfet(,,dGSDF,)')" wid 1.25 \
+ with .nw at last [].sw+(-0.2,-0.05)
thinlines_
arrow <- down .05 left .15 from (Q1.G.x,Q1.G.y-0.05)
- "dG" rjust
+ "svg_tt(dG)" rjust
arrow <- down .10 left .30 from Q1.Channel.start+(.15,0)
- "F" rjust
+ "svg_tt(F)" rjust
arrow <- down .05 left .15 from (Q1.S.x,Q1.S.y+0.05)
- "S" rjust
+ "svg_tt(S)" rjust
arrow <- down .05 right .15 from (Q1.D.x,Q1.D.y+0.05)
- "D" ljust
+ "svg_tt(D)" ljust
thicklines_ }
move right_ rmove
Q2: mosfet(,,uHSDF,)
- {"`...'(,,uHSDF,)" at last [].s+(0,-0.15) below
+ {"svg_tt(`...(,,uHSDF,)')" at last [].s+(0,-0.2) below
thinlines_
arrow <- down .05 left .15 from (Q2.G.x,Q2.G.y-0.05)
- "uH" rjust
+ "svg_tt(uH)" rjust
thicklines_ }
move right_ rmove
- Q3: mosfet(,,LEDSQuB,)
- {"`...'(,,LEDSQuB,)" at last [].s+(0,-0.15) below
+ Q3: mosfet(,,dMEDSQuB,)
+ {"svg_tt(`...(,,dMEDSQuB,)')" at last [].s+(0,-0.05) below
thinlines_
arrow <- down .05 left .15 from (Q3.G.x,Q3.G.y-0.05)
- "L" rjust
+ "svg_tt(dM)" rjust
arrow <- down .13 left .30 from Q3.Channel.start+(.12,0)
- "E" rjust
+ "svg_tt(E)" rjust
arrow <- down .05 left .10 from Q3.S+(.06,0)
- "Q" rjust
+ "svg_tt(Q)" rjust
arrow <- down .08 right .24 from (Q3.B.x,Q3.B.y+0.175)
- "uB" ljust
+ "svg_tt(uB)" ljust
thicklines_ }
move right_ rmove
- Q4: mosfet(,,LEDSuB)
- {`"...(,,LEDSuB)"' at last [].s+(0,-0.15) below
- "G" at last [].G rjust
- "S" at last [].S rjust
- "D" at last [].D ljust
- "B" at last [].B below
+ Q4: mosfet(,,uMEDSuB)
+ {"svg_tt(`...(,,uMEDSuB,)')" at last [].s+(0,-0.2) below
+ "svg_it(G)" at last [].G rjust
+ "svg_it(S)" at last [].S rjust
+ "svg_it(D)" at last [].D ljust
+ "svg_it(B)" at last [].B below
}
move right_ rmove
Q5: mosfet(,,ZSDFdT,)
- {"`...'(,,ZSDFdT,)" at last [].s+(0,-0.05) below
+ {"svg_tt(`...(,,ZSDFdT)')" at last [].s+(0,-0.05) below
thinlines_
arrow <- down .08 left .08 from (Q5.S.x,Q5.S.y+0.12)
- "Z" rjust
+ "svg_tt(Z)" rjust
arrow from last arrow.end to Q5.Channel.c+(0.05,0)
arrow from last arrow.start to (Q5.D.x,Q5.D.y+.05)
arrow <- down .08 right .24 from (Q5.G.x,Q5.G.y-0.02)
- "dT" ljust
+ "svg_tt(dT)" ljust
thicklines_ }
- move right_ rmove
+ move right_ rmove+0.1
up_
Q6: IRF4905 with .c at Here
- {`"IRF4905"' at Q6.s+(0,-0.15) below
- "G" at Q6.G rjust
- "D" wid 0.1 at Q6.D ljust above
- "S" at Q6.S ljust below
+ {"svg_tt(`IRF4905')" at Q6.s+(0,-0.15) below
+ "svg_it(G)" at Q6.G rjust
+ "svg_it(D)" at Q6.D ljust above
+ "svg_it(S)" at Q6.S ljust below
}
- ] with .n at last [].s+(0,-.2)
+ ] with .nw at Row2.sw + (0,-10bp__)
command "</g>" # end font
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4
index 13c91aabc05..a42709b96e7 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/graysurfSVG.m4
@@ -25,9 +25,9 @@ Surface:[
Orig: (0,0)
linethick_(1.2)
- arrow from Orig to 1.2 <Orig,(project(xmax,0,0))> ; "svg_it(x)" wid 0.08 below
- arrow from Orig to 1.2 <Orig,(project(0,ymax,0))> ; "svg_it(y)" ljust
- arrow from Orig to 1.2 <Orig,(project(0,0,zmax))> ; "svg_it(z)" rjust
+ arrow from Orig to 1.2 <Orig,Project(xmax,0,0)> ; "svg_it(x)" wid 0.08 below
+ arrow from Orig to 1.2 <Orig,Project(0,ymax,0)> ; "svg_it(y)" ljust
+ arrow from Orig to 1.2 <Orig,Project(0,0,zmax)> ; "svg_it(z)" rjust
linethick_(0)
for i = 0 to nx-1 do {
@@ -36,10 +36,10 @@ Surface:[
y = ymax*j/ny
fnxy = fn(x,y)
shade((fnmax+fnxy)/fnmax/2,
- line from (project(x,y,fnxy)) to (project(x,(y+dy),`fn(x,(y+dy))'))\
- then to (project((x+dx),(y+dy),`fn((x+dx),(y+dy))'))\
- then to (project((x+dx),y,`fn((x+dx),y)'))\
- then to (project(x,y,fnxy))
+ line from Project(x,y,fnxy) to Project(x,(y+dy),`fn(x,(y+dy))')\
+ then to Project((x+dx),(y+dy),`fn((x+dx),(y+dy))')\
+ then to Project((x+dx),y,`fn((x+dx),y)')\
+ then to Project(x,y,fnxy)
) } }
] with .w at last [].e+(-0.2,0)
@@ -63,8 +63,8 @@ define(`tvisible',`dot3D(view3D1,view3D2,view3D3,
rot3Dz((`$1')*dtor_,rot3Dy((`$2')*dtor_,1,0,0)))')
Orig: (0,0)
-X: arrow from Orig to (project(tradius+sradius*4,0,0)); "x" rjust
-Y: arrow from Orig to (project(0,tradius+sradius*2,0)); "y" below wid 4bp__
+X: arrow from Orig to Project(tradius+sradius*4,0,0); "x" rjust
+Y: arrow from Orig to Project(0,tradius+sradius*2,0); "y" below wid 4bp__
dt = 10 # major angle degrees per facet
ds = 10 # minor angle degrees per facet
@@ -87,10 +87,10 @@ Y: arrow from Orig to (project(0,tradius+sradius*2,0)); "y" below wid 4bp__
thinlines_
for i = 1 to n do {
tc = t[ix[i]]; sc = s[ix[i]]
- SE: (project(torus(tc+dt/2,sc-ds/2)))
- SW: (project(torus(tc-dt/2,sc-ds/2)))
- NW: (project(torus(tc-dt/2,sc+ds/2)))
- NE: (project(torus(tc+dt/2,sc+ds/2)))
+ SE: Project(torus(tc+dt/2,sc-ds/2))
+ SW: Project(torus(tc-dt/2,sc-ds/2))
+ NW: Project(torus(tc-dt/2,sc+ds/2))
+ NE: Project(torus(tc+dt/2,sc+ds/2))
f = ((dcosine3D(3,torus(tc,sc))/sradius+1)/2)^2
g = min(f,0.9)
setrgb(g,g,g)
@@ -103,10 +103,10 @@ thinlines_
}
thicklines_
- arrow from Orig to (project(0,0,tradius*1.4)); "z" above
- dashline(from Orig to (project(torus(0,0))),,,,G)
+ arrow from Orig to Project(0,0,tradius*1.4); "z" above
+ dashline(from Orig to Project(torus(0,0)),,,,G)
arrow to X.end
- dashline(from Orig to (project(torus(90,0))),,,,G)
+ dashline(from Orig to Project(torus(90,0)),,,,G)
arrow to Y.end
] with .sw at last [].se+(0.2,0)
@@ -131,11 +131,11 @@ Hat: [
dy = 0.05
Orig: (0,0)
-X: arrow from Orig to (project(maxy*1.2,0,0)); "x" rjust
-Y: arrow from Orig to (project(0,maxy*1.2,0)); "y" ljust
-Xv: (project(1,0,0))
-Yv: (project(0,1,0))
-Zv: (project(0,0,1))
+X: arrow from Orig to Project(maxy*1.2,0,0); "x" rjust
+Y: arrow from Orig to Project(0,maxy*1.2,0); "y" ljust
+Xv: Project(1,0,0)
+Yv: Project(0,1,0)
+Zv: Project(0,0,1)
# create the arrays and sort
n = 0
for t = dang/2 to 360.1 by dang do {
@@ -151,14 +151,14 @@ Zv: (project(0,0,1))
dpquicksort(d,1,n,ix)
# draw the facets
ellipse wid maxy*2 ht maxy*2*sind(elevation) \
- with .c at (project(0,0,(maxy^2-1)^2)+linethick bp__/2)
+ with .c at Project(0,0,(maxy^2-1)^2)+(0,linethick bp__/2)
thinlines_
for i = 1 to n do {
tc = t[ix[i]]; yc = y[ix[i]]
- SE: (project(hat(tc+dang/2,yc-dy/2)))
- SW: (project(hat(tc-dang/2,yc-dy/2)))
- NW: (project(hat(tc-dang/2,yc+dy/2)))
- NE: (project(hat(tc+dang/2,yc+dy/2)))
+ SE: Project(hat(tc+dang/2,yc-dy/2))
+ SW: Project(hat(tc-dang/2,yc-dy/2))
+ NW: Project(hat(tc-dang/2,yc+dy/2))
+ NE: Project(hat(tc+dang/2,yc+dy/2))
f = abs(yc^2-1)
line invis fill f from SE to SW then to NW then to NE then to SE
}
@@ -169,21 +169,21 @@ nr = -1
for i=1 to mm do { y = i/(mm+3)
findroot(edge,(azimuth+2),(azimuth+180-2),1e-8,t)
nr +=1
- R[mm+nr]: (project(hat(t,y)))
+ R[mm+nr]: Project(hat(t,y))
R[mm-1-nr]: (-R[mm+nr].x,R[mm+nr].y)
}
fitcurve(R,mm*2-1)
# Z axis
thicklines_
-Z: arrow from Zv to (project(0,0,1.2)); "z" ljust
+Z: arrow from Zv to Project(0,0,1.2); "z" ljust
line dashed from Orig to Zv chop 0 chop dashwid/2
line dashed from Orig to Xv
line dashed from Orig to Yv
# Partial rim
ellipsearc(maxy*2,maxy*2*sind(elevation),-pi_*1.4,pi_/3) \
- with .C at (project(0,0,(maxy^2-1)^2)+linethick bp__/2)
+ with .C at Project(0,0,(maxy^2-1)^2)+(0,linethick bp__/2)
] scaled 1.25 with .s at 2nd [].ne+(0,-0.75)
] scaled 0.85
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4
index 0733bbef646..8a3c99b66f6 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/icsSVG.m4
@@ -1,110 +1,108 @@
divert(-1)
- 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__) }')
+ Macros defining some integrated circuits and connectors for SVG
`A sequence of pins along the east or west side of a chip:
- lg_pinseq(initial pin no,final pin no,
- e|w,initial offset,pinnum_root,Labelroot,[not])'
+ lg_pinseq(initial pin no, final pin no,
+ e|w, initial offset, pinnum_root, Labelroot, [N])'
+ `e.g., lg_pinseq(1,8,w)'
define(`lg_pinseq',`for_($1,$2,1,
`lg_pin( Chip.s`$3'+(0,eval($4+m4x)*lg_pinsep),
$6`'m4x,Pin`'eval($5`'m4x),`$3'`$7',eval($5`'m4x))') ')
+define(`ic_tiny',`iflatex(`\hbox{\tiny `$1'}',ifsvg(`svg_small(`$1')',`$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; overbar_
-
+ lg_pin(Chip.sw_+(0,2*lg_pinsep),lg_bartxt(CS),Pin18,wN,18)
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+(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; overbar_
-
+ lg_pin(Chip.sw_+(0,13*lg_pinsep),R/lg_bartxt(W),Pin21,w,21)
+ lg_pin(Chip.sw_+(0,14*lg_pinsep),V`'ic_tiny(CC),Pin24,w,24)
+ lg_pin(Chip.se_+(0,lg_pinsep),lg_bartxt(OE),Pin20,eN,20)
lg_pinseq(0,7,e,3,8-,A)
lg_pinseq(8,9,e,3,31-,A)
lg_pin(Chip.se_+(0,13*lg_pinsep),A10,Pin19,e,19)
`$1']')
define(`ic6502',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
- lg_pin(Chip.sw_+(0,lg_pinsep),V`'svg_small(SS,75),Pin21,w,21)
- 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+(0,1bp__) }
-
+ lg_pin(Chip.sw_+(0,lg_pinsep),V`'ic_tiny(SS),Pin21,w,21)
+ lg_pin(Chip.sw_+(0,2*lg_pinsep),V`'ic_tiny(SS),Pin1,w,1)
+ lg_pin(Chip.sw_+(0,4*lg_pinsep),R/lg_bartxt(W),Pin34,w,34)
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; overbar_
-
+ lg_pin(Chip.sw_+(0,15*lg_pinsep),lg_bartxt(RESET),Pin40,wN,40)
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; overbar_
-
+ lg_pin(Chip.sw_+(0,19*lg_pinsep),lg_bartxt(NMI),Pin6,wN,6)
lg_pin(Chip.sw_+(0,21*lg_pinsep),RDY,Pin2,w,2)
lg_pin(Chip.sw_+(0,22*lg_pinsep),SO,Pin38,w,38)
- lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'svg_small(CC,75),Pin8,w,8)
- lg_pin(Chip.se_+(0,lg_pinsep),CK`'svg_small(1,75)(in),Pin39,e,39)
- lg_pin(Chip.se_+(0,4*lg_pinsep),CK`'svg_small(2,75)(out),Pin37,e,37)
+ lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'ic_tiny(CC),Pin8,w,8)
+ lg_pin(Chip.se_+(0,lg_pinsep),CK`'ic_tiny(1)(in),Pin39,e,39)
+ lg_pin(Chip.se_+(0,4*lg_pinsep), CK`'ic_tiny(2)(out),Pin37,e,37)
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; overbar_
+ lg_pin(Chip.se+(0,23*lg_pinsep),lg_bartxt(IRQ),Pin4,eN,4)
`$1']')
define(`ic6522',`[ Chip: box wid_ lg_chipwd ht_ 24*lg_pinsep
- lg_pin(Chip.sw_+(0,lg_pinsep),V`'svg_small(SS,75),Pin1,w,1)
+ lg_pin(Chip.sw_+(0,lg_pinsep),V`'ic_tiny(SS),Pin1,w,1)
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; overbar_
-
+ lg_pin(Chip.sw_+(0,5*lg_pinsep),lg_bartxt(CS2),Pin23,wN,23)
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)
lg_pin(Chip.sw_+(0,9*lg_pinsep),RS2(A2),Pin36,w,36)
lg_pin(Chip.sw_+(0,10*lg_pinsep),RS3(A3),Pin35,w,35)
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+(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; overbar_
-
- lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'svg_small(CC,75),Pin20,w,20)
+ lg_pin(Chip.sw_+(0,21*lg_pinsep),R/lg_bartxt(W),Pin22,w,22)
+ lg_pin(Chip.sw_+(0,22*lg_pinsep),lg_bartxt(IRQ),Pin21,wN,21)
+ lg_pin(Chip.sw_+(0,23*lg_pinsep),V`'ic_tiny(CC),Pin20,w,20)
lg_pinseq(0,7,e,1,10+,PB)
lg_pinseq(1,2,e,8,17+,CB)
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; overbar_
-
+ lg_pin(Chip.se_+(0,23*lg_pinsep),lg_bartxt(RESET),Pin34,eN,34)
`$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; 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; overbar_
-
+ lg_pin(Chip.sw_+(0,2*lg_pinsep),lg_bartxt(G2a),Pin4,wN,4)
+ lg_pin(Chip.sw_+(0,3*lg_pinsep),lg_bartxt(G2b),Pin5,wN,5)
lg_pin(Chip.sw_+(0,5*lg_pinsep),A,Pin1,w,1)
lg_pin(Chip.sw_+(0,6*lg_pinsep),B,Pin2,w,2)
lg_pin(Chip.sw_+(0,7*lg_pinsep),C,Pin3,w,3)
lg_pin(Chip.sw_+(0,9*lg_pinsep),G1,Pin6,w,6)
- lg_pin(Chip.sw_+(0,10*lg_pinsep),V`'svg_small(CC,75),Pin16,w,16)
+ lg_pin(Chip.sw_+(0,10*lg_pinsep),V`'ic_tiny(CC),Pin16,w,16)
lg_pinseq(0,6,e,2,15-,Y,n)
lg_pin(Chip.se_+(0,9*lg_pinsep),Y7,Pin7,eN,7)
`$1']')
+define(`ic4017',`[ Chip: DIP_chip_outline(16)
+ Loopover_(`x',
+ `lg_pin(Chip.nw-(0,lg_pinsep*m4Lx),x,Pin`'m4Lx,w,m4Lx)',
+ PL, Q3, I3, I0, CLE, Q0, TC, GND)
+ Loopover_(`x',
+ `lg_pin(Chip.se+(0,lg_pinsep*m4Lx),x,Pin`'eval(m4Lx+8),e,eval(m4Lx+8))',
+ MR, U/D, Q1, I1, I2, Q2, CLK, Vcc)
+ `$1']')
+
+define(`ic4510',`[ Chip: DIP_chip_outline(16)
+ Loopover_(`x',
+ `lg_pin(Chip.nw-(0,lg_pinsep*m4Lx),x,Pin`'m4Lx,w,m4Lx)',
+ PL, Q3, I3, I0, CLE, Q0, TC, GND)
+ Loopover_(`x',
+ `lg_pin(Chip.se+(0,lg_pinsep*m4Lx),x,Pin`'eval(m4Lx+8),e,eval(m4Lx+8))',
+ MR, U/D, Q1, I1, I2, Q2, CLK, Vcc)
+ `$1']')
+
+define(`icVS1053',`[ Chip: DIP_chip_outline(32)
+ Loopover_(`x',
+ `lg_pin(Chip.nw-(0,lg_pinsep*m4Lx),x,Pin`'m4Lx,w,m4Lx)',
+ LOUT,ROUT,GBUF,AGND,AGND,DREG,Vcc,3V3,GND,MISO,MOSI,sclk,RST,CS,DCS,DCS)
+ Loopover_(`x',
+ `lg_pin(Chip.se+(0,lg_pinsep*m4Lx),x,Pin`'eval(m4Lx+16),e,eval(m4Lx+16))',
+ SDCD,RX,TX,7,6,5,4,3,2,1,0,GND,3V3,AGND,MIC`'svg_it(-),MIC`'svg_it(+))
+ `$1']')
+
`ArduinoUno( wid,ht,pinlen )'
define(`ArduinoUno',`[
define(`m4bwid',`ifelse(`$1',,`24*L_unit',`$1')')dnl
@@ -118,7 +116,7 @@ define(`ArduinoUno',`[
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,
+ IOREF, RESET,svg_it(+)3V3,svg_it(+)5V, GND, GND, VIN,
nul, A0, A1, A2, A3, A4, A5)
#
Loopover_(`x',`ifelse(x,nul,,
@@ -141,7 +139,7 @@ define(`ArduinoLeonardo',`[
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,
+ IOREF, RESET,svg_it(+)3V3,svg_it(+)5V, GND, GND, VIN,
nul, A0, A1, A2, A3, A4, A5)
#
Loopover_(`x',`ifelse(x,nul,,
@@ -155,8 +153,8 @@ Loopover_(`x',`ifelse(x,nul,,
`RPi( wid,ht,pinlen )'
define(`RPi',`[
- define(`m4bwid',`ifelse(`$1',,`34*L_unit',`$1')')dnl
- define(`m4bht',`ifelse(`$2',,`21*lg_pinsep',`$2')')dnl
+ 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')
@@ -171,9 +169,11 @@ 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,
+ 17;GPIO_GEN0, 27;GPIO_GEN2,
+ 22;GPIO_GEN3,
;3V3,
- 10;SPI_MOSI, 9;SPI_MISO, 11;SPI_SCLK,
+ 10;SPI_MOSI, 9;SPI_MISO,
+ 11;SPI_SCLK,
;GND,
;ID_SD,
5;, 6;, 13;, 19;, 26;,
@@ -193,7 +193,8 @@ Loopover_(`x',`ifelse(x,nul,,`A_RightGPIO(m4Lx,patsubst(x,;,`,'))')',
;GND,
23;GPIO_GEN4, 24;GPIO_GEN5,
;GND,
- 25;GPIO_GEN6, 8;SPI_CEO_N, 7;SPI_CE1_N,
+ 25;GPIO_GEN6, 8;SPI_CEO_N,
+ 7;SPI_CE1_N,
;ID_SC,
;GND,
12;,
@@ -214,12 +215,14 @@ define(`USB_C_Socket',`[
`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)
+ GND, RX1`'svg_it(+), RX1`'svg_it(-), VBUS, SBU2, D`'svg_it(-),
+ D`'svg_it(+), CC2, VBUS, TX2`'svg_it(-), TX2`'svg_it(+), 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)
+ GND, TX1`'svg_it(+), TX1`'svg_it(-), VBUS, CC1, D`'svg_it(+),
+ D`'svg_it(-), SBU1, VBUS, RX2`'svg_it(-), RX2`'svg_it(+), GND)
#
`$4']')
@@ -238,11 +241,13 @@ define(`HDMI_micro',`[
`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
+ HPD, UTILITY, D2`'svg_it(+), D2_SH, D2`'svg_it(-),
+ D1`'svg_it(+), D1_SH, D1`'svg_it(-),D0`'svg_it(+), D0_SH,
+ D0`'svg_it(-), CLK`'svg_it(+), CLK_SH, CLK`'svg_it(-),
+ CEC, GND, SCL, SDA,svg_it(+)5V)
+L1: 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__))
+ svg_rot(90,"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__))
@@ -255,4 +260,52 @@ define(`HDMI_micro',`[
#
`$4']')
+ `DIP_chip_outline( pin count, wid )'
+define(`DIP_chip_outline',
+ `[ define(`m4pinct',`ifelse(`$1',,16,`$1')')dnl
+ define(`m4chgw',`ifelse(`$2',,(18*L_unit),`$2')')dnl
+ Chip: box invis wid m4chgw ht lg_pinsep*eval((m4pinct)/2+1)
+ arcd(last box.n, lg_pinsep/2, 180, 360)
+ { line to last box.ne chop -linewid bp__/2 }
+ { line from last arc.start to last box.nw chop -linewid bp__/2 }
+ line from last box.nw to last box.sw then to last box.se then to last box.ne
+ `$3']')
+
+ `DIP( pin count, attributes)
+ Dual in-line package
+ attributes=semicolon-separated list of optional terms:
+ bodywid=expr; (default 0.25 = 5*L_unit )
+ bodylen=expr; (default pin count/2 x pinpitch)
+ pinpitch=expr; (default 0.1)
+ pinwid=expr; (default 0.06)
+ pinlen=expr; (default 0.05)
+ direct=U|D|L|R;(default U for up)
+ type=I|Q; (default I for uniform-length pins;
+ Q: staggered) '
+define(`DIP',`[ pinct= ifelse(`$1',,8,`$1')
+ Loopover_(`Z',`setkey_(`$2',patsubst(Z,:.*),patsubst(Z,.*:))',
+ bodywid: 5*L_unit,
+ bodylen: m4pinpitch*int(pinct/2+0.5),
+ pinpitch:2*L_unit,
+ pinwid: 1.2*L_unit,
+ pinlen: L_unit)
+ Loopover_(`Z',`setkey_(`$2',patsubst(Z,:.*),patsubst(Z,.*:),N)',
+ direct:U,
+ type:I)
+ setdir_(m4direct,U)
+ Body: box ht_ m4bodywid wid_ m4bodylen
+ arcs = ifelse(m4dir,right,90,m4dir,up,180,m4dir,left,270,0)
+ arcd(Body.e_, 0.1/2, arcs,arcs+180)
+ np2 = int(pinct/2+0.5)
+ define(`m4bxht',`m4pinlen ifelse(m4type,Q,`*(1+(i%%2))')')dnl
+ for i=0 to np2-1 do {
+ exec sprintf("Pin%g: box ht_ m4bxht wid_ m4pinwid \
+ with .s_ at (i+0.5)/np2 between Body.ne_ and Body.nw_",i+1) }
+ for i=np2+1 to pinct do {
+ exec sprintf("Pin%g: box ht_ m4bxht wid_ m4pinwid \
+ with .n_ at (i-np2-0.5)/(pinct-np2) between Body.sw_ and Body.se_",i) }
+ `$3'; resetdir_
+ popdef(`m4bodywid',`m4bodylen',`m4pinpitch',`m4pinwid',`m4pinlen',`m4direct',
+ `m4type') ]'))
+
divert(0)dnl
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 6128441fc8a..4c5a40f0387 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
@@ -322,14 +322,10 @@ A:Gridbox( speaker ) Below(A)
Gridbox( nport ) Right
Gridbox( nterm ) Right
-A:Gridbox( FlipFlop(D)
- { line right 5bp__ at last [] . 1nd last ""+(-7bp__,4bp__) } ) Below(A)
- Gridbox( FlipFlop(T)
- { line right 5bp__ at last [] . 1nd last ""+(-7bp__,4bp__) } ) Right
- Gridbox( FlipFlop(RS)
- { line right 5bp__ at last [] . 1nd last ""+(-7bp__,4bp__) } ) Right
- Gridbox( FlipFlop(JK)
- { line right 5bp__ at last [] . 2nd last ""+(-7bp__,4bp__) } ) Right
+A:Gridbox( FlipFlop(D) ) Below(A)
+ Gridbox( FlipFlop(T) ) Right
+ Gridbox( FlipFlop(RS)) Right
+ Gridbox( FlipFlop(JK)) Right
] with .nw at (0,0)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/roseSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/roseSVG.m4
index b386d9aea57..32c5dfdbc57 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/roseSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/roseSVG.m4
@@ -1,12 +1,13 @@
.PS
-# rose.m4
+# roseSVG.m4
gen_init
ifelse(
ifpstricks(T)`'ifmpost(T)`'ifpostscript(T)`'ifpdf(T)`'ifpgf(T)`'ifsvg(T),,
`This diagram is for PSTricks, postscript, PDF, MetaPost, or SVG',
`
-scale = 1.2
+scale = 1.25
+Rose: [
define(`gold_',`1,0.84,0')
define(`rose',`point_(`$2'); CC: (vec_(`$1',0)); rrad = `$3'
@@ -127,5 +128,39 @@ C: (0,0)
box wid tmp ht tmp at C
] with .sw at 1,1
+] # Rose
+
+Halftone: [
+#.PS
+# SpiralHalftoneSVG.m4
+# https://tex.stackexchange.com/questions/584455/how-to-draw-this-spiral-made-of-circles-in-latex
+# gen_init
+
+ r = 133/255; g = 196/255; b = 100/255
+ skale = 2/3*scale
+ skale = 2.49/4.25
+
+ holerad = 1*skale
+ outerrad = 4.25*skale
+
+ define grcirc {circle diam $1 colored rgbstring(r,g,b)}
+
+ npts = 200
+ outercdiam = (outerrad/npts)*twopi_
+ angoffset = -5*pi_/4
+ da = twopi_/npts*10/3
+ radc = outerrad
+ for x = 0 to 1 do {
+ cdiam = outercdiam*radc/outerrad
+ for i=0 to npts-1 do { ang = i/npts*twopi_
+ grcirc(cdiam*abs(ang-pi_)/pi_) at rect_(radc,ang+angoffset) }
+ angoffset += da
+ radc -= cdiam*2/3
+ if radc < holerad then { x = 1 } else { x = 0 }
+ }
+
+#.PE
+ ] with .sw at Rose.se+(0.2,0)
+
')
.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4
index 08962e9f856..b0b66fa0bb6 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/shapesSVG.m4
@@ -1,5 +1,5 @@
.PS
-# shapes.m4
+# shapesSVG.m4
threeD_init
divert(-1)
@@ -18,14 +18,14 @@ define(`cylinder3D',`[ Start: (0,0)
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
cs = dot3D(View3D,M4CL)/lenc
- End: (project(M4CL))
+ End: Project(M4CL)
az = atan2(ydispl,xdispl)
ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
CL: line invis from Start to End; C: CL.c
nls = int(twopi_*radc/lthick)
define(`M4PP',`rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))')dnl
for i=0 to nls-1 do { if dot3D(View3D,M4PP) > 0 then {
- P: (project(M4PP))
+ P: Project(M4PP)
ql = sqrta(dot3D(Light3D,M4PP)/radc)
line from P to End+P outlined rgbstring(ql,ql,ql) `$5' } }
Perp: (vperp(CL,radc))
@@ -48,7 +48,7 @@ define(`cone3D',`[ Start: (0,0)
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
- End: (project(M4CL))
+ End: Project(M4CL)
cs = dot3D(View3D,M4CL)/lenc
az = atan2(ydispl,xdispl)
ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
@@ -60,7 +60,7 @@ define(`cone3D',`[ Start: (0,0)
rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,radc,0,lenc)))) > 0 then {
ql = sqrta(dot3D(Light3D,
rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,radc,0,lenc))))/lt)
- P: (project(rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))))
+ P: Project(rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc))))
line from P to End outlined rgbstring(ql,ql,ql) `$5'
if !b then { WB: P; b = 1 }
} else { if b then { BW: P; b = 0 } } }
@@ -116,7 +116,7 @@ define(`prism3D',`[ Start: (0,0)
widp = ifelse(`$4',,(linewid/5),`$4')
htp = ifelse(`$5',,(linewid/10),`$5')
rotp = ifelse(`$6',,0,`$6')
- End: (project(xdispl,ydispl,zdispl)); C: 0.5 between Start and End
+ End: Project(xdispl,ydispl,zdispl); C: 0.5 between Start and End
lenp = length3D(xdispl,ydispl,zdispl)
az = atan2(ydispl,xdispl); ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
wp2 = widp/2; hp2 = htp/2
@@ -143,10 +143,10 @@ define(`PFacet',`cross3D(diff3D(`$2'x,`$2'y,`$2'z,`$1'x,`$1'y,`$1'z),
diff3D(`$3'x,`$3'y,`$3'z,`$2'x,`$2'y,`$2'z))')
if dot3D(View3D,PFacet) > 0 then {
fFacet = sqrta(dot3D(Light3D,PFacet)/length3D(PFacet))
- P1: (project(`$1'x,`$1'y,`$1'z))
- P2: (project(`$2'x,`$2'y,`$2'z))
- P3: (project(`$3'x,`$3'y,`$3'z))
- P4: (project(`$4'x,`$4'y,`$4'z))
+ P1: Project(`$1'x,`$1'y,`$1'z)
+ P2: Project(`$2'x,`$2'y,`$2'z)
+ P3: Project(`$3'x,`$3'y,`$3'z)
+ P4: Project(`$4'x,`$4'y,`$4'z)
line fill_(fFacet) invis from P1 to P2 then to P3 then to P4 then to P1
line from P1 to P2; round
line to P3; round
@@ -165,7 +165,7 @@ setview(azimuth,elev)
Arrow3D(0,1,0) with .Start at Orig; "y" ljust at last [].End
Arrow3D(0,0,1.2) with .Start at Orig; "z" above at last [].End
setlight(0,0,0)
- cylinder3D(1,1,1,0.6) with .Start at (project(0.5,0.5,0.5))
+ cylinder3D(1,1,1,0.6) with .Start at Project(0.5,0.5,0.5)
]
Ball: shadedball(0.5) with .nw at last [].ne+(-0.25,0)
[
@@ -175,7 +175,7 @@ setview(azimuth,elev)
for i=0 to n do {
r = i/n*(thmax-thmin)+thmin
prism3D(rot3Dz(r,rot3Dy(pi_/4,len,0,0)),0.2,0.1) \
- with .Start at (project(rot3Dz(r,rot3Dy(pi_/4,len*0.5,0,0)))) }
+ with .Start at Project(rot3Dz(r,rot3Dy(pi_/4,len*0.5,0,0))) }
] with .nw at last [].ne
[
setlight(0,0)
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/sldtestsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/sldtestsSVG.m4
new file mode 100644
index 00000000000..658af488d66
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/sldtestsSVG.m4
@@ -0,0 +1,104 @@
+.PS
+# slddiagsSVG.m4
+cct_init(svg_font(sans-serif,10bp__))
+include(../test/sld/SLD.m4)
+
+divert(-1)
+
+divert(0)dnl
+
+Pic1: [
+define(`TRFDY',
+ `sl_transformer(down_ elen_ `$1',type=S)
+ { Deltasymbol(at last [].M1); Ysymbol(at 2nd last [].M2,,D) } ')
+
+ T: dot
+ switch(up_ elen_); {"Public supply" above}
+ Bus1: sl_busbar(right_ 5*dimen_,6,port=D) with .c at T
+ {"svg_small(20 kV)" at Bus1.Start above ljust}
+ S1: switch(from Bus1.P1-(0,elen_) up_ elen_)
+ S2: switch(from Bus1.P2-(0,elen_) up_ elen_)
+ TRF1: TRFDY(from Bus1.P3); arrow down_ dimen_/3
+ TRF2: TRFDY(from Bus1.P4); arrow down_ dimen_/3
+ TRF3: TRFDY(from Bus1.P5); arrow down_ dimen_/3
+ S3: switch(from Bus1.P6-(0,elen_) up_ elen_)
+ Bus2: sl_busbar(right_ 1.5*dimen_,3,port=D) with .c at Bus1.P1+(0,-dimen_*3)
+ {"svg_small(20 kV)" at Bus2.Start above ljust}
+ {"svg_small(1.25 MVA)" at Bus2.P2 below}
+ S4: switch(from Bus2.P2 to S1.start)
+ TRF4: TRFDY(from Bus2.P1)
+ S4: switch(from Bus2.P3+(0,-elen_) to Bus2.P3)
+]
+
+Pic3: [
+# https://tex.stackexchange.com/questions/597643/draw-a-power-system-network
+ B1: sl_busbar(up_ dimen_*4/3,3)
+ sl_transformer(right_ 2*dimen_ from last [].P2,
+ type=S;body=shaded "lightgray"); variable(,,,dimen_*3/2)
+ B2: sl_busbar(up_ dimen_*4/3,3)
+ { line left_ dimen_/2 from B2.P1
+ C1: capacitor(down_ dimen_/2); ground(,T) }
+ line right_ dimen_/2
+ { line to (Here,C1.start); C2: capacitor(to (Here,C1.end)); ground(,T) }
+ ebox(right_ 3.5*dimen_, 2.5*dimen_, dimen_/5, 0.75)
+ { line to (Here,C1.start); C3: capacitor(to (Here,C1.end)); ground(,T) }
+ line right_ dimen_/2
+ B3: sl_busbar(up_ dimen_*4.5,6)
+ line right_ dimen_*3/4 from B3.P1; box wid dimen_*3 ht dimen_*.6 \
+ shaded "Goldenrod" "Static Load"
+ line right_ dimen_*3/4 from B3.P2; box wid dimen_*3 ht dimen_*.6 \
+ shaded rgbstring(0.99*0.8, 0.74*0.8, 0.71*0.8) "Electronic Load"
+ sl_disk(at B3.P3,,R,
+ text="A/C";circle=shaded ```rgbstring(.2,.8,.2)''';diam=dimen_*3/4)
+ sl_disk(at B3.P4,,R,
+ text="M";circle=shaded ```rgbstring(.21,.47,.86)''';diam=dimen_*3/4)
+ sl_disk(at B3.P5,,R,
+ text="M";circle=shaded ```rgbstring(.2,.6,.8)''';diam=dimen_*3/4)
+ sl_disk(at B3.P6,,R,
+ text="M";circle=shaded ```rgbstring(.2,.63,.8)''';diam=dimen_*3/4)
+ sl_disk(at 1/2 between B3.P1 and B3.P2,,L,
+ text="svg_small(DER_A)";\
+ circle=shaded ```rgbstring(0.78,0.36,0.3)''';diam=dimen_*3/4)
+] with .nw at last [].sw + (100bp__,120bp__)
+
+Pic2: [
+define(`shadedb',`shaded "CornflowerBlue"')
+Loopover_(`LR', # loop to take advantage of symmetry
+ `define(`lrdir',ifelse(LR,L,`right_',`left_'))dnl
+ LR`'side: [
+ sl_generator(,dimen_,LR,type=B;name=G1;circle=shadedb,box=shadedb)
+ T1: sl_transformer(lrdir dimen_*3/2)
+ Bus1: sl_busbar(up_ dimen_*3/2,3,) with .P2 at Here
+ Br1: sl_breaker(from Bus1.P3 lrdir elen_,box=shadedb)
+ line lrdir dimen_
+ Br2: sl_breaker(from Bus1.P1 lrdir elen_,box=shadedb)
+ Br3: sl_breaker(down_ dimen_,box=shadedb)
+ Bus2: sl_busbar(lrdir dimen_,3) with .P2 at Here
+ T2: sl_transformer(down_ dimen_ from Bus2.P2,name=X2)
+ sl_disk(,dimen_/2,D,type=B;text="SM";name=SM1;circle=shadedb,box=shadedb)
+ ground(at last circle.s,dimen_/2)
+ ]',
+ L,R)
+ "Bus 1" at Lside.Bus1.top above
+ "Bus 2" at Rside.Bus1.top above
+ "Bus 3" at Lside.Bus2.w above
+ "Bus 4" at Rside.Bus2.e above
+ "TL`'svg_sub(1) 50 km 69 kV" at 1/2 between Lside.Br1 and Rside.Br1 above
+ "TL`'svg_sub(2) 30 km" ljust "69 kV" ljust at Lside.Br2.end + (-18bp__,12bp__)
+ "TL`'svg_sub(2) 20 km" ljust "69 kV" ljust at Rside.Br2.end + (-18bp__,12bp__)
+ "G`'svg_sub(1) 50 MVA" ljust "13.8 kV" ljust at Lside.G1.w+(0,-28bp__)
+ "G`'svg_sub(2) 30 MVA" ljust "13.8 kV" ljust at Rside.G1.w+(0,-28bp__)
+ "T`'svg_sub(1) 50 MVA" ljust "13.8/69 kV svg_Delta/Y" ljust \
+ at Lside.T1.start+(0,-33bp__)
+ "T`'svg_sub(2) 30 MVA" ljust "69/13.8 kV Y/svg_Delta" ljust \
+ at Rside.T1.end+(5bp__,-33bp__)
+ "T`'svg_sub(3) 50 MVA" rjust "13.8/69 kV Y/svg_Delta" rjust \
+ at Lside.X2.w+(-4bp__,0)
+ "T`'svg_sub(4) 20 MVA" ljust "69/6.9 kV Y/svg_Delta" ljust \
+ at Rside.X2.e+(4bp__,0)
+ "SM`'svg_sub(1) 30 MVA" rjust "13.8 kV" rjust at Lside.SM1.w+(-4bp__,0)
+ "SM`'svg_sub(2) 20 MVA" ljust "6.9 kV" ljust at Rside.SM1.e+( 4bp__,0)
+] with .nw at (Pic1.w,last [].sw + (0,-15bp__))
+
+command "</g>"
+.PE
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 d81a22927aa..65425998fc8 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
@@ -86,6 +86,7 @@ more basic.
e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g>
<li>m4tt svg_it(</g>text`'m4tt)</g>: for italics
<li>m4tt svg_tt(</g>text`'m4tt)</g>: for monospace (courier)
+ <li>m4tt svg_sf(</g>text`'m4tt)</g>: sans-serif (Helvetica)
<li>m4tt svg_norm(</g>text`'m4tt)</g>: for normal text
<li>m4tt svg_bf(</g>text`'m4tt)</g>: for bold face
<li>m4tt svg_small(</g>text, percent`'m4tt)</g>:
@@ -96,6 +97,11 @@ more basic.
subscript
<li>m4tt svg_sup(</g>text, size percent, y displ, x displ`'m4tt)</g>:
superscript
+ <li>m4tt svg_ul(</g>text`'m4tt)</g>: underlined text
+ <li>m4tt svg_ol(</g>text`'m4tt)</g>: overlined text
+ <li>m4tt svg_hat(</g>character`'m4tt)</g>: circumflex-accented character
+ <li>m4tt svg_frac(</g>numerator[:wid], denominator[:wid]`'m4tt)</g>:
+ basic fraction, wid in drawing units
<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
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex
deleted file mode 100644
index fc3f4c17dc2..00000000000
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex
+++ /dev/null
@@ -1,15 +0,0 @@
-\documentclass[11pt]{article}
-\usepackage{tikz}
-\usepackage{siunitx}
-\usepackage[T1]{fontenc}
-\usepackage{boxdims}
-\addtolength{\textwidth}{2cm}
-\addtolength{\textheight}{3cm}
-\setlength{\oddsidemargin}{0pt}
-\setlength{\evensidemargin}{0pt}
-\setlength{\hoffset}{-0.5in}
-\pagestyle{empty}
-\thispagestyle{empty}
-\begin{document}
- \noindent\vspace{2ex}\input{test.tex}
-\end{document}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex
index c4549a16314..029dcc31fae 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex
@@ -1,23 +1,12 @@
\documentclass[11pt]{article}
-% Custimize your packages here:
-\usepackage[dvips]{graphicx}
-\usepackage{pstricks,pst-slpe,pst-grad}
-\usepackage{boxdims}
-\usepackage{upgreek}
-\usepackage{siunitx}
-\usepackage{amssymb}
-%
-%\addtolength{\textwidth}{2cm}
-\addtolength{\textwidth}{10cm} % for Tubediags.ps
-%\addtolength{\textheight}{3cm}
-\addtolength{\textheight}{10cm} % for Tubediags.ps
-\setlength{\oddsidemargin}{0pt}
-\setlength{\evensidemargin}{0pt}
-\setlength{\hoffset}{-0.5in}
-\newbox\graph
-\pagestyle{empty}
-\thispagestyle{empty}
-%
-\begin{document}
- \noindent\vspace{2ex}\input{test.tex}\box\graph
-\end{document}
+ \usepackage[dvipsnames]{xcolor}
+ \usepackage{times,boxdims,graphicx,pstricks}
+ \usepackage{siunitx}
+ \setlength{\textwidth}{28cm}\setlength{\textheight}{28cm}
+ \setlength{\oddsidemargin}{0pt}\setlength{\evensidemargin}{0pt}
+ \setlength{\hoffset}{-1cm}
+ \pagestyle{empty}\thispagestyle{empty}
+ \newbox\graph
+ \begin{document}
+ \noindent\input{test.tex}\box\graph
+ \end{document}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/tsttikz.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/tsttikz.tex
new file mode 100644
index 00000000000..00e327c4544
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/tsttikz.tex
@@ -0,0 +1,19 @@
+\documentclass[11pt]{standalone}
+% Custimize your packages here:
+\usepackage{graphicx}
+%\usepackage{pstricks,pst-slpe,pst-grad}
+\usepackage{tikz}
+\usepackage{boxdims}
+\usepackage{upgreek}
+\usepackage{siunitx}
+\usepackage{amssymb}
+\usepackage{geometry}
+% for Heathkit.m4:
+\geometry{paperwidth=15in,paperheight=14in,margin=1in}
+\newbox\graph
+\pagestyle{empty}
+\thispagestyle{empty}
+%
+\begin{document}
+ \noindent\vspace{2ex}\input{test.tex}\box\graph
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4
new file mode 100644
index 00000000000..84946382587
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/venus.m4
@@ -0,0 +1,73 @@
+.PS
+# venus.m4
+# https://tex.stackexchange.com/questions/576423/a-more-precise-dance-of-planets-with-metapost-and-tikz
+# https://tex.stackexchange.com/questions/575986/dance-of-venus-and-variations-in-tikz-pgf
+
+gen_init
+NeedDpicTools
+maxpsht = 20
+
+thinlines_
+
+define(`venus',
+`setkeys_(`$1',
+ outerlength:4;
+ innerlength:2.8933;
+ outerrate:8;
+ innerrate:13;
+ maxtimes:2880;
+ increment:2;
+ changephase:0 )
+ sizefactor = 165/200
+ nmaxtimes = 360*m4outerrate
+ for x=0 to nmaxtimes by m4increment do {
+ if "$2" != "" then { hue = \
+ abs(sind(360*x/nmaxtimes*abs(m4innerrate-m4outerrate)+m4changephase-60))
+ hsvtorgb(hue*360,1,1,r,g,b)
+ line from (Rect_(m4outerlength,x))*sizefactor \
+ to (Rect_(m4innerlength,x/m4outerrate*m4innerrate))*sizefactor \
+ outlined rgbstring(r,g,b) } \
+ else {
+ line from (Rect_(m4outerlength,x))*sizefactor \
+ to (Rect_(m4innerlength,x/m4outerrate*m4innerrate))*sizefactor
+ }
+ } ')
+
+AA:[
+ sizefactor = 1/2.54
+ define(`venusA',`[
+ setkeys_(`$1',
+ iterations:270;
+ outerdistance:5.41;
+ innerdistance:7.48;
+ outerperiod:123;
+ innerperiod:200;
+ step:5)
+ for x=0 to m4iterations by m4step do {
+ line from (Rect_(m4outerdistance,x))*sizefactor \
+ to (Rect_(m4innerdistance,x/m4outerperiod*m4innerperiod))*sizefactor \
+ outlined "gray"
+ }
+ ]')
+
+# 3 columns, 5 rows
+ sizefactor /= 3
+ Orig:(0,0)
+ for i=1 to 5 do {
+ iteri = 180 + (i-1)*540
+ for j=1 to 3 do {
+ if (i==1) && (j==1) then { iter = 270 } \
+ else { iter = iteri + (j-1)*180 }
+ V[i,j]: venusA(iterations=iter) with .sw at Orig
+ sprintf("%g",iter) at last [] #colored rgbstring(1,0,0)
+ Orig: V[i,j].se
+ }
+ Orig: V[i,1].sw-(0,V[i,1].ht)
+ }
+ ]
+
+BB:[
+ venus(outerrate=8;innerrate=17;increment=2;innerlength=3.5;changephase=60,T)
+ ] with .nw at AA.sw+(0,-0.5)
+
+.PE
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig b/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig
index 255d8170c1d..081aef74719 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig
@@ -6,7 +6,7 @@ Letter
100.00
Single
-2
-# dpic version 2021.01.01 option -x for Fig 3.2
+# dpic version 2021.05.15 option -x for Fig 3.2
1200 2
6 0 0 3975 5025
6 0 0 3975 5025
@@ -17,33 +17,37 @@ Single
-6
6 375 75 600 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 525 675 525 545
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 545 3 3 528 545 528 545
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 491 525 545 441 478 546 452
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 452 3 3 549 452 549 452
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 414 546 452 440 414 546 375
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 375 3 3 549 375 549 375
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 336 546 375 440 336 546 298
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 298 3 3 549 298 549 298
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 259 546 298 441 272 525 205
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 205 3 3 528 205 528 205
+ 525 675 525 551
+6 440 205 549 556
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 551 3 3 528 551 528 551
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 496 525 551 441 483 546 458
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 458 3 3 549 458 549 458
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 419 546 458 440 419 546 381
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 381 3 3 549 381 549 381
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 342 546 381 440 342 546 303
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 546 303 3 3 549 303 549 303
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 500 265 546 303 441 278 525 211
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 525 211 3 3 528 211 528 211
+-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 525 205 525 75
+ 525 211 525 86
-6
6 750 75 975 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 900 675 900 545
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 545 3 3 903 545 903 545
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 491 900 545 816 478 921 452
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 452 3 3 924 452 924 452
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 414 921 452 815 414 921 375
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 375 3 3 924 375 924 375
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 336 921 375 815 336 921 298
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 298 3 3 924 298 924 298
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 259 921 298 816 272 900 205
-1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 205 3 3 903 205 903 205
+ 900 675 900 551
+6 815 205 924 556
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 551 3 3 903 551 903 551
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 496 900 551 816 483 921 458
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 458 3 3 924 458 924 458
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 419 921 458 815 419 921 381
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 381 3 3 924 381 924 381
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 342 921 381 815 342 921 303
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 921 303 3 3 924 303 924 303
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 875 265 921 303 816 278 900 211
+1 3 0 0 0 -1 0 -1 -1 0 1 0.0 900 211 3 3 903 211 903 211
+-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
- 900 205 900 75
+ 900 211 900 86
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
790 551 790 199
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
@@ -52,20 +56,24 @@ Single
6 1125 75 1200 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
1200 675 1200 525
-5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1200 488 1200 525 1163 488 1200 450
+6 1162 225 1200 525
+5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1200 488 1200 525 1162 488 1200 450
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1200 413 1200 450 1163 413 1200 375
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1200 338 1200 375 1163 338 1200 300
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1200 263 1200 300 1163 263 1200 225
+-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
1200 225 1200 75
-6
6 1350 75 1500 675
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
1500 675 1500 525
+6 1463 225 1500 525
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1500 488 1500 525 1463 488 1500 450
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1500 413 1500 450 1463 413 1500 375
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1500 338 1500 375 1463 338 1500 300
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 1500 263 1500 300 1463 263 1500 225
+-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
1500 225 1500 75
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
@@ -293,10 +301,12 @@ Single
6 2400 1575 2700 2025
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
2400 1575 2400 1620
+6 2400 1620 2445 1980
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2400 1665 2400 1620 2445 1665 2400 1710
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2400 1755 2400 1710 2445 1755 2400 1800
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2400 1845 2400 1800 2445 1845 2400 1890
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2400 1935 2400 1890 2445 1935 2400 1980
+-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
2400 1980 2400 2025
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
@@ -305,10 +315,12 @@ Single
2595 1620 2595 1980
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
2700 2025 2700 1980
+6 2655 1620 2700 1980
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2700 1935 2700 1980 2655 1935 2700 1890
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2700 1845 2700 1890 2655 1845 2700 1800
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2700 1755 2700 1800 2655 1755 2700 1710
5 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 2700 1665 2700 1710 2655 1665 2700 1620
+-6
2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2
2700 1620 2700 1575
-6