summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-10 20:45:43 +0000
committerKarl Berry <karl@freefriends.org>2020-05-10 20:45:43 +0000
commitbe9c569650668cf1f39d05db60ea78d27aed7a0c (patch)
treec70e303c8f179aa8aa043331e4b638edc69d12c0 /Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4
parent2a04d6a07cf1e11df5244f9fe92f9b7c6744c5c4 (diff)
circuit-macros
git-svn-id: svn://tug.org/texlive/trunk@55089 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m446
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4
index 6e4eb88ea0d..d76016c6e4b 100644
--- a/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4
@@ -2,6 +2,7 @@
# MC.m4
cct_init
+MC: [
dv = dimen_*0.6
dh = dimen_*0.4
backup = dimen_/6
@@ -32,4 +33,49 @@ cct_init
source(right_ dimen_,AC); llabel(sprintf("$v_{\char%g}$",64+i))
if i==2 then { Output: dot } else { line down (2-i)*dv }
}}
+]
+
+Three: [
+ dv = dimen_*0.6
+ dh = dimen_
+ define(`swfet',`mosfet(`$1',,dMEDSuBQPy)')
+ define(`swpair',`[ up_
+ BS: swfet(up_ dimen_); { "`$1'" at BS.D-(0,2bp__) rjust }
+ L: line up_ 3*dimen_ from BS.D
+ TS: swfet(up_ dimen_) with .S at Here; { "`$2'" at TS.S+(0,2bp__) rjust }
+ T: TS.D
+ B: BS.S
+ C: L.c
+ ]')
+
+ V1: gap(up_ 5*dimen_,1,A); { "$V_1$" at last arrow.c rjust }
+ line right_ dh/2
+ { C1: capacitor(down_ to (Here,V1.start)); llabel(C_1) }
+ for_(1,3,1,`
+ line right_ dh ifelse(m4x,1,,*5/4)
+ {SP1`'m4x: swpair(S1`'eval(m4x+3),S1`'m4x) with .T at Here
+ dot(at last [].C + (0,(2-m4x)*dh))
+ line right_ (3-m4x)*dh*5/4
+ inductor(right_ dimen_,L); llabel(,L_{1\char`'eval(64+m4x)})
+ line down_ (2-m4x)*dimen_*2/3
+ pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_')
+ line down_ (2-m4x)*dimen_/3
+ M: move right_ dimen_/8
+ line up_ (2-m4x)*dimen_/3
+ pushdef(`dimen_',dimen_*1.2) inductor(right_ dimen_*3/4) popdef(`dimen_')
+ line up_ (2-m4x)*dimen_*2/3
+ inductor(right_ dimen_,L); llabel(,L_{2\char`'eval(64+m4x)})
+ line right_ dimen_/8+(m4x-1)*dh*5/4
+ dot
+ SP2`'m4x: swpair(S2`'eval(m4x+3),S2`'m4x) with .C at Here+(0,(m4x-2)*dh) }
+ ')
+ "$T_r$" at M.c+(0,dimen_/2)
+ line from V1.start to SP13.B
+ line from SP21.B to SP23.B+(dh*3/4,0)
+ { C2: capacitor(up_ to (Here,V1.end)); llabel(,,C_2) }
+ line right_ dh/2
+ gap(up_ 5*dimen_,1,A); { "$V_2$" at last arrow.c ljust }
+ line to SP21.T chop dotrad_ chop 0
+
+] with .nw at MC.sw+(0,-0.2)
.PE