diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4 | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4 index fc6b5590db1..8607339a7b0 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Smithchart.m4 @@ -56,7 +56,7 @@ C: circle thick thk rad rar(0) at (0,0) line thick thk grayline(thkg) from C.w to C.e Rc(50): circle thick thk grayline(thkg) rad rar(50) at Rac(50) -Loopover_(`term',`RaArc1(patsubst(term,:,`,'))', +foreach_(`term',`RaArc1(patsubst(term,:,`,'))', 20:thn:50, 30 to 40 by 10:thn:50, 20:thk:20, @@ -86,7 +86,7 @@ Loopover_(`term',`RaArc1(patsubst(term,:,`,'))', 0.01 to 0.191 by 0.01:thn:0.2, 0.05 to 0.151 by 0.1:thk:0.2) -Loopover_(`term',`RaArc2(patsubst(term,:,`,'))', +foreach_(`term',`RaArc2(patsubst(term,:,`,'))', 0.05 to 0.451 by 0.1:thn:1:0.5, 0.02 to 0.181 by 0.02:thn:0.5:0.1) @@ -95,7 +95,7 @@ Xc(50): arct(thk) cw grayline(thkg) from C.e \ Xc(-50): arct(thk) grayline(thkg) from C.e \ to SGamma(0,-50) with .c at Xac(-50) -Loopover_(`term',`XaArc2(patsubst(term,:,`,'))', +foreach_(`term',`XaArc2(patsubst(term,:,`,'))', 10 to 20 by 10:thn:0:50, 7 to 9 by 2:thn:0:10, 2 to 18 by 2:thn:0:20, @@ -112,7 +112,7 @@ Loopover_(`term',`XaArc2(patsubst(term,:,`,'))', 0.2 to 0.81 by 0.2:thk:0:2, 0.1 to 0.91 by 0.2:thk:0:1) -Loopover_(`term',`XaArc2(patsubst(term,:,`,'))', +foreach_(`term',`XaArc2(patsubst(term,:,`,'))', 0.05 to 0.451 by 0.1:thn:0.5:1, 0.02 to 0.181 by 0.02:thn:0:0.5, 0.02 to 0.191 by 0.01:thn:0:0.2, dnl 0.02 should be 0.01 @@ -125,12 +125,12 @@ dnl these avoid TeX arithmetic overflow: dnl Internal labels start here textht = C.wid/120 # Horizontal axis -Loopover_(`t',`box wid textht ht textht*1.5 colored "white" \ +foreach_(`t',`box wid textht ht textht*1.5 colored "white" \ with .se at Rc(t).w+(-2bp__,2bp__) r_text(90,"t",at Rc(t).w+(-textht/3,textht*1.5))', 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9, 1,1.2,1.4,1.6,1.8, 2,3,4,5,10,20,50) # Xc=1 labels -Loopover_(`tt', +foreach_(`tt', `define(`m4ta',patsubst(tt,:.*))define(`m4vl',patsubst(tt,.*:))dnl X: SGamma(m4vl,1) M: move from Rc(m4vl) to X; ax = lin_ang(M)*rtod_-90 #; print ax @@ -139,7 +139,7 @@ Loopover_(`tt', r_text(-m4ta,m4vl,at X+(Rect_(textht*1.7,-(ax+30)))) ', 10:0.2, 19:0.4, 26:0.6, 32:0.8, 37:1) # right-side circumference -Loopover_(`tt', +foreach_(`tt', `define(`m4ta',patsubst(tt,:.*))define(`m4vl',patsubst(tt,.*:))dnl X: Xc(m4vl).start; ax = atan2(X.y,X.x)*rtod_ ; # print round_(ax) r_text(m4ta,m4vl,at X+(Rect_(textht*2,ax-120))) @@ -148,13 +148,13 @@ Loopover_(`tt', else { r_text(-m4ta,m4vl,at (X.x,-X.y)+(Rect_(textht*2,-ax+150))) } ', 6:20, 11:10, 23:5, 28:4, 37:3, 53:2, 58:1.8, 64:1.6, 71:1.4, 80:1.2, 90:1) # left-side circumference -Loopover_(`tt', +foreach_(`tt', `X: Xc(m4Lx*0.1).start; # print round_(atan2(X.y,X.x)*rtod_-180) r_text(-patsubst(tt,:,`,'),at X+(Rect_(textht*1.7,-m4Lx*11+40))) r_text( patsubst(tt,:,`,'),at (X.x,-X.y)+(Rect_(textht*2.1,m4Lx*11-30))) ', 11:0.1, 23:0.2, 33:0.3, 44:0.4, 53:0.5, 62:0.6, 70:0.7, 77:0.8, 84:0.9) # Ra=1 labels -Loopover_(`tt',`X: SGamma(1,m4Lx*0.2) +foreach_(`tt',`X: SGamma(1,m4Lx*0.2) M: move from Rac(1) to X; # print round_(lin_ang(M)*rtod_-180) r_text(-eval(m4Lx*11),ifelse(m4Lx,5,1,0.eval(m4Lx*2)), at X+(Rect_(textht*1.5,-m4Lx*11+40))) @@ -188,7 +188,7 @@ for_(20,170,10, r_text(eval( 90-m4x),-m4x,at A+(Rect_(A.rad+textht*1.2,-m4x))) ') r_text(90,180,at A-(A.rad+textht/2,0)) -Loopover_(`rca', +foreach_(`rca', `r_text(eval(90-(180-rca/10)),eval(m4Lx*5+5), at A+(Rect_(A.rad-textht*0.7,rca/10))) r_text(eval(-90+(180-rca/10)),eval(-m4Lx*5-5), @@ -199,16 +199,16 @@ Loopover_(`rca', # Internal labels setrgb(thng,thng,thkg) "RESISTANCE R/Zo OR CONDUCTANCE G/Yo" at C+SGamma(0.5,0)-(0,C.rad/40) - Loopover_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(87-m4Lx*86/100),Lttr, + foreach_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(87-m4Lx*86/100),Lttr, at W+(Rect_(W.rad+wltic/2+textht*0.5, 177-m4Lx*0.86))) ')', W,A,V,E,L,E,N,G,T,H,S,*,T,O,W,A,R,D,*,G,E,N,E,R,A,T,O,R) - Loopover_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(115-m4Lx*86/100),Lttr, + foreach_(`Lttr',`ifelse(Lttr,*,,`r_text(eval(115-m4Lx*86/100),Lttr, at W+(Rect_(W.rad-wltic/2-textht*1.0, 204-m4Lx*0.86))) ')', W,A,V,E,L,E,N,G,T,H,S,*,T,O,W,A,R,D,*,L,O,A,D) - Loopover_(`Lttr',`ifelse(Lttr,*,,`define(`xa','13-m4Lx*86/100`) + foreach_(`Lttr',`ifelse(Lttr,*,,`define(`xa','13-m4Lx*86/100`) r_text(eval(xa-90),Lttr,at A+(Rect_(A.rad+textht*0.7, xa))) ')', R,E,F,L,E,C,T,I,O,N,*,C,O,E,F,F,I,C,I,E,N,T,*,A,N,G,L,E) - Loopover_(`Lttr',`ifelse(Lttr,*,,`define(`xa','14-m4Lx*86/100`) + foreach_(`Lttr',`ifelse(Lttr,*,,`define(`xa','14-m4Lx*86/100`) r_text(eval(xa-90),Lttr,at A+(Rect_(A.rad-textht*0.7, xa))) ')', T,R,A,N,S,M,I,S,S,I,O,N,*,C,O,E,F,F,I,C,I,E,N,T,*,A,N,G,L,E) resetrgb |