diff options
author | Norbert Preining <norbert@preining.info> | 2024-01-02 03:04:28 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-01-02 03:04:28 +0000 |
commit | 6b10e9901a24325e837f0fdc2cbce8f43f18ccff (patch) | |
tree | 3c9f999691258a32058bf6b3e8353eadeda85f9b /graphics/circuit_macros/examples | |
parent | 094e5f512c4ea5981db967dd89c47363a603529b (diff) |
CTAN sync 202401020304
Diffstat (limited to 'graphics/circuit_macros/examples')
54 files changed, 774 insertions, 521 deletions
diff --git a/graphics/circuit_macros/examples/Alogix.m4 b/graphics/circuit_macros/examples/Alogix.m4 index 4e5abd837c..f77a159875 100644 --- a/graphics/circuit_macros/examples/Alogix.m4 +++ b/graphics/circuit_macros/examples/Alogix.m4 @@ -18,12 +18,13 @@ A: Autologix( # Draw a tree of gates only. The ~ has been # replaced by NOT gates. -B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N) \ +definergbcolor(lightblue,0.72,0.72,0.9) +B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N,shaded "lightblue") \ with .sw at A.e+(1.3,-0.5) "{\sl Out}" at B.Out above ljust `"\shortstack[l]{\tt B: Autologix( \\ \tt \ - Or(And(B,Not(C)),And(Not(A),B,C)),N)}"' \ - wid 242pt__ ht 20pt__ at B.s+(0,-0.2) + Or(And(B,Not(C)),And(Not(A),B,C)),N,\\ \tt \ + shaded \"lightblue\")}"' wid 242pt__ ht 20pt__ at B.s+(0,-0.3) for_(1,4,1,`"{\sf\small\sl B.In`'m4x}" at B.In`'m4x rjust') "{\sf\small\sl B.In5}" at B.In5+(0,-1.5bp__) rjust diff --git a/graphics/circuit_macros/examples/AmpTable.m4 b/graphics/circuit_macros/examples/AmpTable.m4 index c94f682cbc..023533c634 100644 --- a/graphics/circuit_macros/examples/AmpTable.m4 +++ b/graphics/circuit_macros/examples/AmpTable.m4 @@ -5,18 +5,19 @@ movewid = 2pt__ { {amp ; move ; "{\tt `amp'}" ljust} move down 0.4; right_ - {amp(,0.3) ; move ; "{\tt `amp'(,0.3)}" ljust} + {amp(,0.3) ; move ; "\tt `amp'(,0.3)" ljust} } move right_ 2.0 -{ {delay ; move ; "{\tt `delay'}" ljust} +{ {delay(,,fill_(0.9)) ; move ; + "`\tt\shortstack[l]{delay(,{,}\\ fill\_(0.9))}'" ljust} move down 0.4; right_ {delay(,0.2) ; move ; "{\tt `delay'(,0.2)}" ljust} } move right_ 2.0 -{ {integrator ; move ; "{\tt `integrator'}" ljust} +{ {integrator ; move ; "\tt `integrator'" ljust} move down 0.5; right_ - {integrator(,0.3) ; move ; "{\tt `integrator'(,0.3)}" wid 82pt__ ljust} + {integrator(,0.3) ; move ; "\tt `integrator'(,0.3)" wid 82pt__ ljust} } .PE diff --git a/graphics/circuit_macros/examples/Arresters.m4 b/graphics/circuit_macros/examples/Arresters.m4 index 25dd8a8e33..8c11c19eae 100644 --- a/graphics/circuit_macros/examples/Arresters.m4 +++ b/graphics/circuit_macros/examples/Arresters.m4 @@ -54,11 +54,12 @@ R2: [ [ arrester(,E) {`"\tt \ldots(,E)"' at last line.c+(0,-0.25)} - move sep - A: arrester(,DE) - {`"\tt \ldots(,DE)"' at last [].s+(0,-0.1)} + move up_ 0.1 then right_ sep + A: arrester(,DE,,,fill_(0.95)) + {`"\tt \ldots(,DE,{,},"' wid 61bp__ at A.A+(-0.1,-0.40) ljust \ + `"\tt fill\_(0.95))"' ljust } Dlabels - move sep*3 + move down_ 0.1 then right_ sep*3 A: arrester(,DS) {`"\tt \ldots(,DS)"' at last [].s+(0,-0.1)} Dlabels diff --git a/graphics/circuit_macros/examples/Dini.m4 b/graphics/circuit_macros/examples/Dini.m4 index 1846917a4a..85bf0d30c7 100644 --- a/graphics/circuit_macros/examples/Dini.m4 +++ b/graphics/circuit_macros/examples/Dini.m4 @@ -3,6 +3,7 @@ # This diagram can be produced using, e.g. # m4 pdf.m4 Dini.m4 | dpic -d > Dini.pdf +# https://tex.stackexchange.com/questions/516734/plot-dinis-surface threeD_init NeedDpicTools scale = 1.5 diff --git a/graphics/circuit_macros/examples/EVplugs.m4 b/graphics/circuit_macros/examples/EVplugs.m4 index 6fefd07048..d3e40c8dd2 100644 --- a/graphics/circuit_macros/examples/EVplugs.m4 +++ b/graphics/circuit_macros/examples/EVplugs.m4 @@ -1,6 +1,9 @@ .PS # EVplugs.m4 # https://en.wikipedia.org/wiki/CHAdeMO +# https://en.wikipedia.org/wiki/North_American_Charging_Standard +# https://tesla-cdn.thron.com/static/HXVNIC_North_American_Charging_Standard_Technical_Specification_TS-0023666_HFTPKZ.pdf?xseo=&response-content-disposition=inline%3Bfilename%3D%22North-American-Charging-Standard-Technical-Specification-TS-0023666.pdf%22 + gen_init divert(-1) @@ -60,7 +63,6 @@ define(`EV_J3068',`[ pushkeys_(`$1', Arc: arc thick m4thick from NW to NE with .c at C m4BG ifelse(`$2',,, `shaded rgbstring(patsubst(`$2',:,`,')) line invis from NE to Ac+(0,m4diamLNP/2) \ - then to Ac+(0,m4diamLNP/2) \ then to NW+(1,-1)/sqrt(2)*m4diamLNP/2 + (0,m4diamLNP/2) \ then to NW then to NE shaded rgbstring(patsubst(`$2',:,`,'))') arc thick m4thick to Ac+(0,m4diamLNP/2) with .c at Ac m4BG @@ -146,17 +148,86 @@ define(`EV_CHAdeMO',`[ pushdef(`m4sk',33/140/pEVskale) pushkeys_(`$1', S: circle diam idiam thick m4inthick with .s at C.s+(0,m4thick bp__/2) m4S E: circle diam idiam thick m4inthick at Cintersect(N,N.diam,S,S.diam) m4DCminus W: circle diam idiam thick m4inthick at Cintersect(S,S.diam,N,N.diam) m4DCplus - Loopover_(`Z', + foreach_(`Z', `line thick m4inthick up Z.diam*0.6 right Z.diam*0.6 with .c at Z line thick m4inthick up Z.diam*0.6 left Z.diam*0.6 with .c at Z',N,S) - Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \ + foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \ at N+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',FG,NC,DCP,SS1) - Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \ + foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \ at S+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',PP,CL,SS2,CH) `$3' popdef(`m4sk',`m4wdth',`m4thick',`m4inthick',`m4BG', `m4DCplus',`m4DCminus',`m4N',`m4S', `m4FG',`m4NC',`m4SS1',`m4DCP',`m4PP',`m4CL',`m4CH',`m4SS2') ]') + `EV_NAC(keys) + NAC (Tesla) charging plug in a [] block + keys: wdth=expr; # plug width + diamL=expr; # diam of L1, L2 + BG=background attributes; # shaded "gray" + L1=attributes; # L1 attributes ... + L1inner=attributes; # inner circle... + L2=attributes; # L2 attributes ... + L2inner=attributes; # inner circle... + inner=attributes; # central object + Gnd=attributes; + Gndinner=attributes; + PP=attributes; + CP=attributes; ' +define(`EV_NAC',`[ pushkeys_(`$1', `wdth:1.6; diamL:m4wdth*0.28; BG::N; + L1::N; L1inner::N; L2::N; L2inner::N; Gndinner::N; inner::N; + Gnd::N; PP::N; CP::N; ') + sN = 1/pEVskale*m4wdth/1.6 # drawing coord scale factor + tt = 8.5/160*m4wdth; # outer width + rt = (4^2+43^2)/(2*4)/4*sN; rb = (23^2+56.5^2)/(2*23)/4*sN # arc radii + Ct: (0,0.83*m4wdth-rt); Cb: (0,rb) # arc centres + ra = rb*0.45; ri = ra/4 # radii + NAC_fillet(Ct,-rt,Cb,-rb,ra,NW,Wt,Wb) # draw outer boundary + NE: (-NW.x,NW.y); Eb: (-Wb.x,Wb.y); Et: (-Wt.x,Wt.y) + m = 9; n = 0; P[n]: (0,0) + NAC_arc(m,Cb,rb,-pi_/2,langle(Cb,Eb)) + NAC_arc(m,NE,ra,langle(NE,Eb),langle(NE,Et)) + NAC_arc(m,Ct,rt,langle(Ct,Et),pi_/2) + fitcurve(P,n,shaded "lightgray" m4BG,-n) + pushdef(`m4EVs',`shaded graystring(1)')dnl # inner circles + L1: circle diam m4diamL at ( 21.5/2,23.75)*sN m4EVs m4L1 + inLt = L1.rad/4/(1bp__) + L1i: circle thick inLt rad L1.rad-(inLt+L1.thick)/2 bp__ outlined "yellow" \ + at L1 m4L1inner + L2: circle diam m4diamL at (-21.5/2,23.75)*sN m4EVs m4L2 + L2i: circle thick inLt rad L2.rad-(inLt+L2.thick)/2 bp__ outlined "yellow" \ + at L2 m4L2inner + Gnd: circle diam m4wdth/7 at (0,L1.y-15.92*sN) m4EVs m4Gnd + Gndi: circle thick Gnd.rad/4/(1bp__) rad Gnd.rad-(Gnd.rad/4/(1bp__)+ \ + Gnd.thick)/2 bp__ outlined "green" at Gnd m4Gndinner + PP: circle diam Gnd.diam/2 at (-17/2*sN,L1.y-16.52*sN) m4EVs m4PP + CP: circle diam Gnd.diam/2 at ( 17/2*sN,L1.y-16.52*sN) m4EVs m4CP + rs = (15^2+50^2)/(2*15)/4*sN; Cs: (0,0.3*m4wdth-rs) # inner tri-shape + m = 9; n = 0; P[0]: Ct+(0,rt-tt) + NAC_fillet(L2,L2.rad+tt,Ct,-(rt-tt),ri,FW,Fb,Ft) + NAC_fillet(Cb,-(rb-tt),L2,L2.rad+tt,ri,GW,Gt,Gb) + NAC_fillet(Cs,rs,Cb,-(rb-tt),ri,SW,St,Sb) + NAC_arc(3,Ct,rt-tt,pi_/2,langle(Ct,Ft)) + NAC_arc(m,FW,ri,langle(FW,Ft),NAC_ang(FW,Fb)) + NAC_arc(m,L2,L2.rad+tt,langle(L2,Fb),langle(L2,Gb)) + NAC_arc(m,GW,ri,NAC_ang(GW,Gb),NAC_ang(GW,Gt)) + NAC_arc(m,Cb,rb-tt,NAC_ang(Cb,Gt),NAC_ang(Cb,Sb)) + NAC_arc(m,SW,ri,NAC_ang(SW,Sb),NAC_ang(SW,St)) + NAC_arc(m,Cs,rs,langle(Cs,St),pi_/2) + fitcurve(P,n,fill_(1) m4inner,-n) + popdef(`m4EVs',`m4CP',`m4PP',`m4Gnd',`m4inner', + `m4L2',`m4L2inner',`m4L1',`m4L1inner',`m4Gndinner', + `m4BG',`m4diamL',`m4wdth') `$2' ]') + define(`NAC_fillet', #( C1, r1, C2, r2, frad, Cf, T1, T2 ) + ``$6': Cintersect(`$1',(abs(`$2')+sign(`$2')*(`$5')), + `$3',(abs(`$4')+sign(`$4')*(`$5'))) + `$7': LCintersect(,`$6',`$5',ifelse(index(`$2',-),0,R),`$1',`$6') + `$8': LCintersect(,`$6',`$5',ifelse(index(`$4',-),0,R),`$3',`$6')') + define(`NAC_arc', #( m, C, rad, a0, af ) + `m4a0 = `$4'; m4af = `$5'; for i=1 to `$1' do { n+=1 + P[n]: `$2'+(rect_(`$3',(1-i/`$1')*m4a0+i/`$1'*m4af)) + P[-n]: (-P[n].x,P[n].y) }') + define(`NAC_ang',`pmod(langle(`$1',`$2'),twopi_)') + divert(0)dnl ifsvg(svg_font(sans-serif,6bp__)) @@ -188,21 +259,31 @@ P4: EV_CCS2(L1="L1";L2="L2";L3="L3";N="N";PE="PE",0.85:0.85:0.85, DCplus="DC+";DCminus="DC-") with .w at P3.e+(P1.wid/5,0) "EVsmall(PP)" at P4.J.PP EVk "EVsmall(CP)" at P4.J.CP EVk + P5: EV_CHAdeMO( BG=outlined "blue" fill_(0.8); DCplus=shaded "red" "DC+"; DCminus=shaded "red" "DC-"; - Loopover_(`L',`L=fill_(1);',N,S) + foreach_(`L',`L=fill_(1);',N,S) FG=shaded "green"; - Loopover_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \ + foreach_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \ with .w at P4.e+(P4.w.x-P3.e.x,0) - Loopover_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2) -# + foreach_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2) + +P6: EV_NAC(wdth=1) with .w at P5.e+(P5.wid/5,0) + foreach_(`L',`"EVtxt(`L'm4Lx)" at P6.L',L1,L2) +thinlines_ + arrow <- from P6.Gnd.s down P6.ht/5; "EVtxt(Gnd)" below + arrow <- from P6.PP.sw down P6.ht/8 left P6.ht/8; "EVtxt(`PP')" rjust + arrow <- from P6.CP.se down P6.ht/8 right P6.ht/8; "EVtxt(`CP')" ljust +thicklines_ + "EVtxt(`EV_CCS2')" at P4.s+(0,-10bp__) + "EVtxt(`EV_NAC')" at (P6,last "") + "EVtxt(`EV_CHAdeMO')" at (P5,last "") "EVtxt(`EV_CCS1')" at (P3,last "") "EVtxt(`EV_J3068')" at (P2,last "") "EVtxt(`EV_J1772')" at (P1,last "") - "EVtxt(`EV_CHAdeMO')" at (P5,last "") - ] # with .nw at last [].sw+(0,-0.2) + ] iflatex(command "}%") ifsvg(command "</g>") diff --git a/graphics/circuit_macros/examples/Flow.m4 b/graphics/circuit_macros/examples/Flow.m4 index 7c514050f0..d91a5eef31 100644 --- a/graphics/circuit_macros/examples/Flow.m4 +++ b/graphics/circuit_macros/examples/Flow.m4 @@ -45,7 +45,7 @@ Case: Fcase(, arrow down linewid/3 from last [].S Fbox("Task 1.5",, shaded Thistle) with .N at Here E:last [].E; S:last [].S], - "Test 2",Fbox("Task 2" "is bigger", wid fboxwid*1.2 ht fboxht*3/2, \ + "Test 2",Fbox("Task 2" "is bigger", wid flowboxwid*1.2 ht flowboxht*3/2, \ shaded SeaGreen), "Test 3",Fbox("Task 3",, shaded RubineRed)dnl ) @@ -70,7 +70,7 @@ Repeatuntil: Frepeatuntil("$n \geq 5$",,,Fbox("Task"), Ifthenelse: Fifthenelse("$A<B$",,, Fbox("False"), - Fbox("True",ht fboxht*1.2 wid fboxwid)dnl + Fbox("True",ht flowboxht*1.2 wid flowboxwid)dnl ) with .nw at Repeatuntil.sw +(-0.5,-0.3) "\sl .N" at Ifthenelse.N rjust above; "\sl .S" at Ifthenelse.S below rjust @@ -106,7 +106,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_ B2: Fbox(`"Execu\c{c}\~ao"') with .W at B1.E+(awid*3,0) B3: Fbox(`"Sele\c{c}\~ao"') with .W at B2.E+(awid*3,0) LT: Ftest(`"Avalia\c{c}\~ao do" "Planejamento"', - wid fboxwid*1.5 ht fboxht*2.0, + wid flowboxwid*1.5 ht flowboxht*2.0, shaded YellowGreen, "Correto" at Box.e above ljust; "Incompleto" at Box.w above rjust) with .S at 0.5 between B1.ne and B2.nw @@ -114,7 +114,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_ arrow from LT.W to (B1.N,LT.W) then to B1.N arrow from LT.E to (B2.N,LT.E) then to B2.N RT: Ftest(`"Avalia\c{c}\~ao da" "Execu\c{c}\~ao"', - wid fboxwid*1.5 ht fboxht*2.0, + wid flowboxwid*1.5 ht flowboxht*2.0, shaded YellowGreen, "Correto" at Box.e below ljust; "Incompleto" at Box.w below rjust) with .N at 0.5 between B2.se and B3.sw @@ -129,6 +129,6 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_ arrow up_ awid from B5.N ellipse wid boxwid/2 ht boxwid/3 shaded "red" # at (B5.S,Start) # arrow down_ awid from B5.S to last ellipse.n -] with .nw at last [].Compound.sw+(0,2.5*fboxht) +] with .nw at last [].Compound.sw+(0,2.5*flowboxht) .PE diff --git a/graphics/circuit_macros/examples/FlowchartDefs.m4def b/graphics/circuit_macros/examples/FlowchartDefs.m4def index fc3dfca6a0..a57d483c4c 100644 --- a/graphics/circuit_macros/examples/FlowchartDefs.m4def +++ b/graphics/circuit_macros/examples/FlowchartDefs.m4def @@ -1,7 +1,9 @@ divert(-1) - Google flowchart display symbol - FlowchartDefs.m4 - `Some experimental flow-chart macros. + FlowchartDefs.m4def + Google: flowchart display symbols + `Some flow-chart macros with minimal + decoration. + In the following, every block (subchart) is in [] brackets, with .N, .S, .E and .W internally defined. Follow this convention @@ -12,18 +14,14 @@ divert(-1) the size, and the third can be used to add color, dashed lines, labels, or other embellishements. Default is - grey fill if arg3 is blank. - - These macros have been renamed from earlier - versions because of slight differences of - arguments.' + grey fill if arg3 is blank.' define(`FlowchartDefs_') `Default sizes:' -define(`fboxwid',linewid*2) -define(`fboxht',linewid*0.75) -define(`farrowht',linewid*0.5) +define(`flowboxwid',linewid*2) +define(`flowboxht',linewid*0.75) +define(`flowarrowht',linewid*0.5) `Fbox( "text", wid expr ht expr, attributes ) The basic task box: arg1 may be 1 or more @@ -33,13 +31,13 @@ define(`farrowht',linewid*0.5) the \boxdims macro in the manual. Example: Fbox("$x < 1$",, shaded rgbstring(0.46,0.53,0.63))' -define(`Fbox',`[ boxwid = fboxwid; boxht = fboxht +define(`Fbox',`[ boxwid = flowboxwid; boxht = flowboxht Box: box `$2' ifelse(`$3',,`fill_(fillval)',`$3') `$1' N: Box.n; S:Box.s; E:Box.e; W: Box.w `$4']') `Fdelay("text",wid expr ht expr,attributes)' -define(`Fdelay',`[ boxwid = fboxwid; boxht = fboxht +define(`Fdelay',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2' N: Box.n; S: Box.s; E: Box.e; W: Box.w arc from Box.se-(Box.ht/2,0) to Box.ne-(Box.ht/2,0) \ @@ -49,7 +47,7 @@ define(`Fdelay',`[ boxwid = fboxwid; boxht = fboxht `$4']') `Fdisplay("text",wid expr ht expr,attributes)' -define(`Fdisplay',`[ boxwid = fboxwid; boxht = fboxht +define(`Fdisplay',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2' N: Box.n; S: Box.s; E: Box.e; W: Box.w NE: Box.ne-(Box.ht/4,0); SE: (NE,Box.s) @@ -66,7 +64,7 @@ define(`Fdisplay',`[ boxwid = fboxwid; boxht = fboxht `$4']') `Fstored("text",wid expr ht expr,attributes)' -define(`Fstored',`[ boxwid = fboxwid; boxht = fboxht +define(`Fstored',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2' r = Box.ht*7/8; d = r - sqrt(r^2-(Box.ht/2)^2) N: Box.n; S: Box.s; E: Box.e-(d,0); W: Box.w @@ -82,7 +80,7 @@ define(`Fstored',`[ boxwid = fboxwid; boxht = fboxht `Fconnect("text", wid expr ht expr[:U|D|L|R|angle], attributes)' -define(`Fconnect',`[ boxht = fboxht; boxwid = boxht +define(`Fconnect',`[ boxht = flowboxht; boxwid = boxht define(`m4wh',`m4Leftstr(`$2')')dnl define(`m4wid',`patsubst(patsubst(m4wh, ht .*),^wid ,)')dnl ifelse(m4wid,,`define(`m4wid',boxwid)')dnl @@ -101,9 +99,9 @@ define(`Fconnect',`[ boxht = fboxht; boxwid = boxht `Fdata("text",wid expr ht expr, xslant,attributes)' -define(`Fdata',`[ boxwid = fboxwid; boxht = fboxht +define(`Fdata',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2' - xs = ifelse(`$3',,fboxht/6,`($3)/2') + xs = ifelse(`$3',,flowboxht/6,`($3)/2') NE: Box.ne+(xs,0); SE: Box.se-(xs,0) NW: Box.nw+(xs,0); SW: Box.sw-(xs,0) N: Box.n; E: Box.e; S: Box.s; W: Box.w @@ -113,17 +111,17 @@ define(`Fdata',`[ boxwid = fboxwid; boxht = fboxht `$5']') `Fprep("text",wid expr ht expr,attributes)' -define(`Fprep',`[ boxwid = fboxwid; boxht = fboxht +define(`Fprep',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2' - NE: Box.ne-(fboxht/4,0); E: Box.e; SE: (NE,Box.s); N: Box.n - NW: Box.nw+(fboxht/4,0); W: Box.w; SW: (NW,Box.s); S: Box.s + NE: Box.ne-(flowboxht/4,0); E: Box.e; SE: (NE,Box.s); N: Box.n + NW: Box.nw+(flowboxht/4,0); W: Box.w; SW: (NW,Box.s); S: Box.s line from N to NE to E to SE to SW to W to NW to N \ ifelse(`$3',,`fill_(fillval)',`$3') ifelse(`$1',,,`$1' at Box) `$4']') `Fkeyboard("text",wid expr ht expr,attributes)' -define(`Fkeyboard',`[ boxwid = fboxwid; boxht = fboxht +define(`Fkeyboard',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2' NW: Box.nw-(0,min(Box.ht/4,Box.wid/16)); W: Box.w; SW: Box.sw; S: Box.s NE: Box.ne+(0,min(Box.ht/4,Box.wid/16)); E: Box.e; SE: Box.se; N: 0.5 between NW and NE @@ -132,7 +130,7 @@ define(`Fkeyboard',`[ boxwid = fboxwid; boxht = fboxht `$4']') `Fdocument("text",wid expr ht expr,attributes)' -define(`Fdocument',`[ boxwid = fboxwid; boxht = fboxht +define(`Fdocument',`[ boxwid = flowboxwid; boxht = flowboxht Box: box invis `$2'; Q: move from Box.sw to Box.se NE: Box.ne; E: Box.e; SE: Box.se-(0,Box.ht/4); N: Box.n NW: Box.nw; W: Box.w; SW: Box.sw-(0,Box.ht/4); S: Box.s-(0,Box.ht/4) @@ -144,7 +142,7 @@ define(`Fdocument',`[ boxwid = fboxwid; boxht = fboxht `$4']') `Fkeying("text",wid expr ht expr,attributes)' -define(`Fkeying',`[ boxwid = fboxwid; boxht = fboxht +define(`Fkeying',`[ boxwid = flowboxwid; boxht = flowboxht Box: box `$2' invis hsq = (Box.wid/2)^2-(Box.ht/2)^2 if hsq > 0 then { d = Box.wid/2-sqrt(hsq) } else { d = 0 } @@ -161,7 +159,7 @@ define(`Fkeying',`[ boxwid = fboxwid; boxht = fboxht `If-then Ftest( "text", wid expr ht expr, attributes )' -define(`Ftest',`[boxwid = fboxwid*0.8; boxht = fboxht*1.4 +define(`Ftest',`[boxwid = flowboxwid*0.8; boxht = flowboxht*1.4 Box: box `$2' invis N: Box.n; S: Box.s; E: Box.e; W: Box.w line from 0.5 between last box.n and last box.e to last box.e to last box.s \ @@ -191,7 +189,7 @@ define(`Fcase',`[ down; S: Here; sx = S.x define(`Fcaseloop_',`ifelse(`$3',,, `Test`$1': Ftest(patsubst(`$3',":.*,"),`$2', ifinstr(`$3',":,`patsubst(`$3',.*":,)')) with .N at S - Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,fboxht)/2) + Task`$1': `$4' with .nw at Test`$1'.E+(linewid/2,min(Test`$1'.ht,flowboxht)/2) arrow right linewid/4 from Test`$1'.E \ then down Test`$1'.E.y-Task`$1'.W.y then to Task`$1'.W S: (Test`$1'.S.x,min(Test`$1'.S.y,Task`$1'.S.y)-linewid/3) diff --git a/graphics/circuit_macros/examples/Fuses.m4 b/graphics/circuit_macros/examples/Fuses.m4 index 2a01cfa3f2..68629f407d 100644 --- a/graphics/circuit_macros/examples/Fuses.m4 +++ b/graphics/circuit_macros/examples/Fuses.m4 @@ -5,44 +5,46 @@ cct_init movewid = 0.25 { - fuse ; {"`{\tt fuse}'" at last line.c+(0,-0.2)} + fuse ; {"`\tt fuse'" at last line.c+(0,-0.2)} move - fuse(,D) ; {"`{\tt fuse(,D)}'" at last line.c+(0,-0.2)} + fuse(,D) ; {"`\tt fuse(,D)'" at last line.c+(0,-0.2)} move - fuse(,B) ; {"`{\tt fuse(,B)}'" at last line.c+(0,-0.2)} + fuse(,B) ; {"`\tt fuse(,B)'" at last line.c+(0,-0.2)} move - fuse(,C) ; {"`{\tt fuse(,C)}'" at last line.c+(0,-0.2)} + fuse(,C) ; {"`\tt fuse(,C)'" at last line.c+(0,-0.2)} move - fuse(,S) ; {"`{\tt fuse(,S)}'" at last line.c+(0,-0.2)} + fuse(,S,,,fill_(0.9)) + {"`\tt\shortstack[l]{fuse(,S,{,},\\fill\_(0.9))}'" \ + at last line.c+(0,-0.2)} move - fuse(,SB) ; {"`{\tt fuse(,SB)}'" at last line.c+(0,-0.2)} + fuse(,SB) ; {"`\tt fuse(,SB)'" at last line.c+(0,-0.2)} } move down; right_ { - fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)} + cbreaker; {"`\tt cbreaker'" at last line.c+(0,-0.25)} move - fuse(,HC,0.5,0.3) ; {"`{\tt $\ldots$(,HC,0.5,0.3)}'" at last line.c+(0,-0.27)} + cbreaker(,R); {"`\tt cbreaker(,R)'" at last line.c+(0,-0.25)} move - cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.2)} + cbreaker(,,D); {"`\tt $\ldots$(,{,}D)'" at last line.c+(0,-0.25)} move - cbreaker(,R,D); {"`{\tt $\ldots$(,R,D)}'" at last line.c+(0,-0.2)} + cbreaker(,,T); {"`\tt $\ldots$(,{,}T)'" at last line.c+(0,-0.25)} move - cbreaker(,,T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.2)} - move - cbreaker(,,TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.2) } + cbreaker(,,TS); {"`\tt $\ldots$(,{,}TS)'" at last line.c+(0,-0.25) } } move down; right_ { - jumper ; {"`{\tt jumper}'" at last line.c+(0,-0.2) } + fuse(,HB) ; {"`\tt fuse(,HB)'" at last line.c+(0,-0.2)} move - jumper(,CJBED) ; {"`{\tt $\ldots$(,CJBED)}'" at last line.c+(0,-0.2) } + fuse(,HC,0.5,0.3) ; {"`\tt $\ldots$(,HC,0.5,0.3)'" at last line.c+(0,-0.27)} move - jumper(,body=outlined "gray" shaded "gray";) - {"`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" wid 172bp__ \ - with .w at (last line.start, last "") - "`\tt \hphantom{$\ldots$(,body=}shaded \"gray\";)'" \ - at last "".sw+(0,-10bp__) ljust } + jumper ; {"`\tt jumper'" at last line.c+(0,-0.2) } move + jumper(,CJBED) ; {"`\tt $\ldots$(,CJBED)'" at last line.c+(0,-0.2) } + move + jumper(,body=outlined "gray" shaded "gray";) + "`\tt $\ldots$(,body=outlined \"gray\" \textbackslash'" \ + at last line.start+(0,-20bp__) ljust \ + "`\tt \hphantom{body=}shaded \"gray\";)'" ljust } .PE diff --git a/graphics/circuit_macros/examples/Makefile b/graphics/circuit_macros/examples/Makefile index f3444395af..252fe33fe9 100644 --- a/graphics/circuit_macros/examples/Makefile +++ b/graphics/circuit_macros/examples/Makefile @@ -99,6 +99,7 @@ BS = tr '|' '\134' LTX = pdflatex --shell-escape PDFLTXSRC=printf "|documentclass[11pt]{standalone}\n\ +|usepackage[dvipsnames]{xcolor}\n\ |usepackage{times,boxdims,siunitx,amssymb,tikz,geometry}\n\ |geometry{paperwidth=15in,paperheight=14in,margin=1in}\n\ |pagestyle{empty}|thispagestyle{empty}\n\ diff --git a/graphics/circuit_macros/examples/MoreTable.m4 b/graphics/circuit_macros/examples/MoreTable.m4 index 3d90b71eb4..cc198c198b 100644 --- a/graphics/circuit_macros/examples/MoreTable.m4 +++ b/graphics/circuit_macros/examples/MoreTable.m4 @@ -2,26 +2,33 @@ # heater.m4 cct_init -Heater: [ - movewid = 2 pt__ - hm = 2.05 - right_ +Heater:[ { - {lamp ; move; "`{\tt lamp}'" ljust} + {E: lamp(,,shaded "yellow") + "`\tt\shortstack[l]{lamp(,{,}\\\;shaded \"yellow\")}'" ljust below \ + at E.start -(textoffset,0) } move right_ 1.5 - {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust} + {E: lamp(,T) + "`\tt lamp(,T)'" ljust below at E.start -(textoffset,0)} + move right_ 1.0 + {E: thermocouple + "`\tt thermocouple'" ljust below at E.start -(textoffset,0)} move right_ 1.25 - {thermocouple ; move;" `{\tt thermocouple}'" ljust } - move right_ hm - {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust } + {E: thermocouple(,,,T) + "`\tt thermocouple(,{,},T)'" ljust below at E.start -(textoffset,0) } } - move down 0.4; right_ +move down 0.5; right_ { - {heater; move;"`{\tt heater}'" ljust} - move right_ hm - {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust} - move right_ hm+0.4 - {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust} + definergbcolor(lightred,0.8,0.16,0.16) + {E: heater(,,,,shaded "lightred") + "`\tt\shortstack[l]{heater(,{,},{,}\\ \;shaded \"'lightred`\")}'" ljust below \ + at (E.start-(textoffset,0),last [].sw)} + move right_ 1.5 + {E: heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust below \ + at E.start -(textoffset,0) } + move right_ 1.5 + {E: heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust below \ + at E.start -(textoffset,0) } } ] @@ -40,8 +47,8 @@ vm = 0.28 #} # move down 0.25; right_ { {memristor ; move;"`{\tt memristor}'" ljust} - move right_ hm - {heater; move;"`{\tt heater}'" ljust} +# move right_ hm +# {heater; move;"`{\tt heater}'" ljust} move right_ hm {tline ; move;"`{\tt tline}'" ljust} } @@ -65,5 +72,5 @@ vm = 0.28 {xtal(,type=R;outerdiam=0.2) ; move ;"`{\tt xtal(,type=R)}'" ljust} } -] with .nw at Heater.sw+(0,-0.2) +] with .nw at Heater.sw+(0,-0.3) .PE diff --git a/graphics/circuit_macros/examples/Opamp.m4 b/graphics/circuit_macros/examples/Opamp.m4 index 5bdb8ac208..207c0c8785 100644 --- a/graphics/circuit_macros/examples/Opamp.m4 +++ b/graphics/circuit_macros/examples/Opamp.m4 @@ -2,44 +2,44 @@ # Opamp.m4 sinclude(FOpamp.dim) sinclude(Circuit_macros.dim) +sinclude(tst.dim) s_init(Opamp) cct_init - - A: opamp + A: opamp(,,,\;body=shaded "yellow") thinlines_ - s_box(`\tt opam{}p') at A.s-(0,0.35) - s_box(\tt Out) below at A.Out + s_box(`\tt\shortstack[l]{opam{}p(,{,},\\body=shaded \"`yellow'\")}') \ + at A.s-(0,0.35) + s_box(\sl Out) below at A.Out spline <- from A.In1 left 0.1 then up 0.1 left 0.1 - s_box(\tt In1) rjust above + s_box(\sl In1) rjust above spline <- from A.In2 left 0.1 then down 0.1 left 0.1 - s_box(\tt In2) rjust below + s_box(\sl In2) rjust below arrow <- up 0.1 right 0.1 from A.N - s_box(\tt N) ljust above + s_box(\sl N) ljust above arrow <- up 0.1 right 0.1 from A.E1 - s_box(\tt E1) ljust above + s_box(\sl E1) ljust above arrow <- up 0.1 right 0.1 from A.E - s_box(\tt E) ljust above + s_box(\sl E) ljust above arrow <- down 0.1 right 0.1 from A.E2 - s_box(\tt E2) ljust below + s_box(\sl E2) ljust below arrow <- down 0.1 right 0.1 from A.S - s_box(\tt S) ljust below + s_box(\sl S) ljust below arrow <- left 0.2 from A.W - s_box(\tt W) rjust + s_box(\sl W) rjust thicklines_ - Point_(15) - B: opamp(,,,,PR) with .sw at A.se+(0.65,0) + Point_(90) + B: opamp(,,,,PR) with .sw at A.se+(1,0) thinlines_ - s_box(`\tt Point\_(15); opam{}p(,{,},{,}PR)') at B.s-(0,0.20) - spline <- right arrowht up arrowht from B.V1 then right 0.1 - s_box(\tt V1) ljust + s_box(`\tt\shortstack[l]{Point\_(90);\\opam{}p(,{,},{,}PR)}') \ + at B.s-(0,0.20) + spline <- left arrowht down arrowht from B.V1 then left 0.1 + s_box(\sl V1) rjust spline <- right arrowht down arrowht from B.V2 then right 0.1 - s_box(\tt V2) ljust + s_box(\sl V2) ljust thicklines_ - Point_(90) - C: opamp with .sw at B.se+(1.05,0) - s_box(`\tt Point\_(90); opam{}p') at C.s-(0,0.35) right_ - D: opamp(,,,,T) with .sw at C.se+(0.65,0) - s_box(`\tt opam{}p(,{,},{,}T)') at D.s-(0,0.20) + D: opamp(,,,body=shaded "orange",T) with .sw at B.se+(0.95,0) + s_box(`\tt\shortstack[l]{opam{}p(,{,},\\body=shaded \"`orange'\"\\,T)}') \ + at D.s+(0.2,-0.25) .PE diff --git a/graphics/circuit_macros/examples/Plate.m4 b/graphics/circuit_macros/examples/Plate.m4 index b3a08a2439..a13c09d2ae 100644 --- a/graphics/circuit_macros/examples/Plate.m4 +++ b/graphics/circuit_macros/examples/Plate.m4 @@ -93,7 +93,7 @@ thicklines_(1) 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 T0 to T0+(T1.x,0),-8,"6.1" "5.9",textht*3) 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 diff --git a/graphics/circuit_macros/examples/Resistors.m4 b/graphics/circuit_macros/examples/Resistors.m4 index 960897afc0..5e96f95822 100644 --- a/graphics/circuit_macros/examples/Resistors.m4 +++ b/graphics/circuit_macros/examples/Resistors.m4 @@ -19,7 +19,7 @@ vm = 0.28 {resistor(,,AC) ; move ;"`{\tt resistor(,{,}AC)}'" ljust} } move down vm; right_ -{ {resistor(,,B) ; move ;"`{\tt resistor(,{,}B)}'" ljust} +{ {resistor(,5,B) ; move ;"`{\tt resistor(,5,B)}'" ljust} move right_ hm {resistor(,,E) ; move "`\shortstack[l]{\tt resistor(,{,}E)\\ {\tt $\equiv$ ebox}}'" ljust} diff --git a/graphics/circuit_macros/examples/Rotbox.m4 b/graphics/circuit_macros/examples/Rotbox.m4 index 4480b8d8bd..77fd899542 100644 --- a/graphics/circuit_macros/examples/Rotbox.m4 +++ b/graphics/circuit_macros/examples/Rotbox.m4 @@ -6,13 +6,12 @@ gen_init rotbox(boxwid/2,,thick 2) Point_(30) rotbox(,,shaded "yellow" outlined "blue" thick 3,r=0.1) \ - at last []+vec_(boxwid,0) + at last [].se+vec_(boxwid,0) "r=0.1" at last [] move to last [].ne Point_(0) - [[]; for_(2,8,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0) - sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].ne+(0.1,0) - [[]; for_(10,16,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0) - sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].sw+(0,-0.1) + [[]; for_(2,16,2, `rotbox(,,dashed,t=m4x/10) with .nw at \ + ifelse(m4x,10,`2nd [].sw+(0,-0.1)',`last [].ne+(boxwid*0.1,0)') + sprintf("t=%g",m4x/10) at last []') ] with .sw at last [].se+(0.1,0) .PE diff --git a/graphics/circuit_macros/examples/Sources.m4 b/graphics/circuit_macros/examples/Sources.m4 index 53c732b75d..8c4f9634db 100644 --- a/graphics/circuit_macros/examples/Sources.m4 +++ b/graphics/circuit_macros/examples/Sources.m4 @@ -1,9 +1,6 @@ .PS # `Sources.m4' cct_init -divert(-1) - -divert(0)dnl iflatex(`ifpsfrag(,`latexcommand({\sf)') ') @@ -11,49 +8,57 @@ movewid = 2pt__ moveht = 0.275 define(`NL',`; move down $1; right_') { - {source ; move ; "`source'" ljust} NL - {source(,I) ; move ; "`source(,I)'" ljust} NL - {source(,i) ; move ; "`source(,i)'" ljust} NL - {source(,ii) ; move ; "`source(,ii)'" ljust} NL - {source(,V) ; move ; "`source(,V)'" ljust} NL - {source(,v) ; move ; "`source(,v)'" ljust} NL - {source(,SC) ; move ; "`source(,SC)'" ljust} NL - {source(,AC); move ; "`source(,AC)'" ljust} NL - {source(,X) ; move ; "`source(,X)'" ljust} NL - {source(,F) ; move ; "`source(,F)'" ljust} NL - {source(,G) ; move ; "`source(,G)'" ljust} NL - {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3) - {proximity ; move ; "`\shortstack[l]{proximity\\ = consource(,P)}'" ljust} + {source ; move ; "`\tt source'" ljust} NL + {source(,I) ; move ; "`\tt source(,I)'" ljust} NL + {C:source(,i) ; move ; "`\tt source(,i)'" ljust} NL + {D:source(,ti) ; move ; "`\tt source(,ti)'" ljust} NL + {source(,ii) ; move ; "`\tt source(,ii)'" ljust} NL + {source(,V) ; move ; "`\tt source(,V)'" ljust} NL + {source(,v) ; move ; "`\tt source(,v)'" ljust} NL + {source(,tv) ; move ; "`\tt source(,tv)'" ljust} NL + {source(,SC) ; move ; "`\tt source(,SC)'" ljust} NL + {source(,AC); move ; "`\tt source(,AC)'" ljust} NL + {source(,X) ; move ; "`\tt source(,X)'" ljust} NL + {source(,F) ; move ; "`\tt source(,F)'" ljust} NL + {source(,G) ; move ; "`\tt source(,G)'" ljust} NL + {source(,Q) ; move ; "`\tt source(,Q)'" ljust} NL #(0.3) } move right_ 2.0 { - {source(,,0.4) ; move ; "`source(,{,}0.4)'" ljust} NL(0.35) - {source(,P) ; move ; "`source(,P)'" ljust} NL - {source(,U) ; move ; "`source(,U)'" ljust} NL - {source(,H) ; move ; "`source(,H)'" ljust} NL - {source(,R) ; move ; "`source(,R)'" ljust} NL - {source(,S) ; move ; "`source(,S)'" ljust} NL - {source(,SCr) ; move ; "`source(,SCr)'" ljust} NL - {source(,T) ; move ; "`source(,T)'" ljust} NL - {source(,L) ; move ; "`source(,L)'" ljust} NL - {source(,B) ; move ; "`source(,B)'" ljust} NL - {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8) - {norator ; move ; "`norator'" ljust} +# {source(,,0.4) ; move ; "`\tt source(,{,}0.4)'" ljust} NL(0.35) + {source(,,0.4,,shaded "yellow") ; move ; + "`\tt\shortstack[l]{source(,{,}0.4,{,}\\ shaded \"yellow\")}'" ljust} NL(0.35) +# {source(,P) ; move ; "`\tt source(,P)'" ljust} NL + {source(,P,,,fill_(0.9)) ; move ; + "`\tt\shortstack[l]{source(,P,{,},\\ fill\_(0.9))}'" ljust} NL + {source(,U) ; move ; "`\tt source(,U)'" ljust} NL + {source(,H) ; move ; "`\tt source(,H)'" ljust} NL + {source(,R) ; move ; "`\tt source(,R)'" ljust} NL + {source(,S) ; move ; "`\tt source(,S)'" ljust} NL + {source(,SCr) ; move ; "`\tt source(,SCr)'" ljust} NL + {source(,T) ; move ; "`\tt source(,T)'" ljust} NL + {source(,L) ; move ; "`\tt source(,L)'" ljust} NL + {source(,B) ; move ; "`\tt source(,B)'" ljust} NL + {nullator ; move ; "`\tt nullator'" ljust} NL(moveht*0.8) + {norator ; move ; "`\tt norator'" ljust} NL(moveht*0.9) + {ttmotor(,G) ; move ; "`\tt ttmotor(,G)'" ljust} NL(moveht*1.1) + {proximity ; move ; "`\tt \shortstack[l]{proximity\\ = consource(,P)}'" ljust} } move right_ 2.0 - {source(,N) ; move ; "`source(,N)'" ljust} NL - {source(,"\rm mA");move; "`source(,\"mA\")'" ljust} NL(0.31) -# {source(,"mA");move; "`source(,'" ljust \ -# "`\enskip \"mA\")'" ljust} NL(0.31) - {consource ; move ; "`consource'" ljust} NL(0.32) - {consource(,I) ; move ; "`consource(,I)'" ljust} NL(0.32) - {consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32) - {source(,SE) ; move ; "`source(,SE)'" ljust} NL - {consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32) - {consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3) - {battery ; move ; "`battery'" ljust} NL(0.3) - {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35) - {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust} + {source(,N) ; move ; "`\tt source(,N)'" ljust} NL + {source(,"\rm mA");move; "`\tt source(,\"mA\")'" ljust} NL(0.31) +# {source(,"mA");move; "`\tt source(,'" ljust \ +# "`\tt \enskip \"mA\")'" ljust} NL(0.31) + {consource ; move ; "`\tt consource'" ljust} NL(0.32) + {consource(,I) ; move ; "`\tt consource(,I)'" ljust} NL(0.32) + {consource(,i) ; move ; "`\tt consource(,i)'" ljust} NL(0.32) + {consource(,ti) ; move ; "`\tt consource(,ti)'" ljust} NL(0.32) + {source(,SE) ; move ; "`\tt source(,SE)'" ljust} NL + {consource(,V) ; move ; "`\tt consource(,V)'" ljust} NL(0.32) + {consource(,v) ; move ; "`\tt consource(,v)'" ljust} NL(0.3) + {consource(,tv) ; move ; "`\tt consource(,tv)'" ljust} NL(0.3) + {battery ; move ; "`\tt battery'" ljust} NL(0.3) + {battery(,3,R) ; move ; "`\tt battery(,3,R)'" ljust} #NL(0.35) iflatex(`ifpsfrag(,`latexcommand(})')') .PE diff --git a/graphics/circuit_macros/examples/Switches.m4 b/graphics/circuit_macros/examples/Switches.m4 index 3e599a39ef..0b2d00d0e0 100644 --- a/graphics/circuit_macros/examples/Switches.m4 +++ b/graphics/circuit_macros/examples/Switches.m4 @@ -61,7 +61,7 @@ movewid = 0.25 move down 0.4; right_; { dswitch(,,WBCb); {"\tt (,{,}WBCb)" at last [].s Below} move right_ - dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" at last [].s Below} + dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" wid 50bp__ at last [].s Below} move right_ dswitch(,,WBcDI); {"\tt (,{,}WBcDI)" at last [].s Below} thinlines_ @@ -129,17 +129,17 @@ movewid = 0.25 move down_ 6bp__ then right_ dswitch(,,WBPrM); {"\tt (,{,}WBPrM)" at last [].s Below} move right_ - dswitch(,,WBDIGX,text=W); #{"\tt (,{,}WBDIGX,W)" at last [].s Below} + dswitch(,,WBDIGX,text=W) {"\tt (,{,}WBDIGX," ljust at last line.start+(0,-15bp__) \ "\tt text=W)" ljust} move right_ - dswitch(,,WBDIGC,text=M) + dswitch(,,WBDIGC,circle="M") {"\tt (,{,}WBDIGC," ljust at last line.start+(0,-15bp__) \ - "\tt text=M)" ljust} + "\tt circle=\"M\")" ljust} move right_ - dswitch(,,WBcDIGC,text=M) # + dswitch(,,WBcDIGC,circle="M") {"\tt (,{,}WBcDIGC," ljust at last line.start+(0,-15bp__) \ - "\tt text=M)" ljust} + "\tt circle=\"M\")" ljust} } .PE diff --git a/graphics/circuit_macros/examples/Three.m4 b/graphics/circuit_macros/examples/Three.m4 index aace5031ac..fb42359b06 100644 --- a/graphics/circuit_macros/examples/Three.m4 +++ b/graphics/circuit_macros/examples/Three.m4 @@ -2,15 +2,12 @@ # Three.m4: three-phase oscillator cct_init +definergbcolor(Dandelion,0.825,0.825,0) define(`section',`[ I: Here resistor(right elen_*0.75); llabel(,R/2) T: dot line down dimen_/2 then right_ dimen_/4 - Amp: opamp(,,,,, - rgbfill(0.9,0.6,0.1,line to N then to E then to S then to Here) - "{\scriptsize$-$}" at In1 ljust - "{\scriptsize$+$}" at In2 ljust - ) with .In1 at Here + Amp: opamp(,,,body=shaded "Dandelion") with .In1 at Here line left dimen_/4 from Amp.In2 then down dimen_/4; G: ground resistor(from T to (Amp.Out,T)); llabel(,R) O: dot diff --git a/graphics/circuit_macros/examples/Tubediags.m4 b/graphics/circuit_macros/examples/Tubediags.m4 index eb402755c7..6a4f425235 100644 --- a/graphics/circuit_macros/examples/Tubediags.m4 +++ b/graphics/circuit_macros/examples/Tubediags.m4 @@ -334,8 +334,8 @@ Pwr: [ dot(at PXform.ST3); line right_ dimen_/4; dot dot(at PXform.ST1); line right_ dimen_/4 then down_ dimen_*3/2; ground(,T) line from PXform.S2.end right_ dimen_*2.5 then up_ dimen_/4 - Rect2: V_5V4G with .F1.sw at Here; "5V4G" at Rect2.n+(0,dimen_/2) - Rect1: V_5V4G with .e at Rect2.w-(dimen_/2,0); "5V4G" at Rect1.n+(0,dimen_/2) + Rect2: V_5U4G with .F1.sw at Here; "5U4G" at Rect2.n+(0,dimen_/2) + Rect1: V_5U4G with .e at Rect2.w-(dimen_/2,0); "5U4G" at Rect1.n+(0,dimen_/2) move to Rect1.F1.sw; line to (Here,PXform.S2.end); dot move to Rect1.F1.se; line to (Here,PXform.S2.start); dot move to Rect2.F1.se; line to (Here,PXform.S2.start) diff --git a/graphics/circuit_macros/examples/UNO.m4 b/graphics/circuit_macros/examples/UNO.m4 index dab914ac80..6338c307c0 100644 --- a/graphics/circuit_macros/examples/UNO.m4 +++ b/graphics/circuit_macros/examples/UNO.m4 @@ -80,7 +80,7 @@ define(`ATMEGA16U2',`[ 107;nul, 2;XTAL2(PC0), 108;nul, 109;nul) - lg_pin(Pin109+(0,lg_pinsep),RESET,Pin24,wN,24,pinlen) + lg_pin(Pin109+(0,lg_pinsep),ifpostscript(,\tiny\sf) RESET,Pin24,wN,24,pinlen) ]') define(`Aleftpin',`move to Chip.sw+(0,m4Lx*lg_pinsep) Pin`$1': ifelse(`$2',nul,Here,dnl @@ -112,7 +112,7 @@ define(`ATMEGA328P',`[ 303;nul, 10;XTAL2, 304;nul, 305;nul) - lg_pin(Pin305+(0,lg_pinsep),RESET,Pin1,wN,1,pinlen) + lg_pin(Pin305+(0,lg_pinsep),ifpostscript(,\tiny\sf) RESET,Pin1,wN,1,pinlen) ]') define(`rswitch',`dswitch(`$1',,WBoDCP) diff --git a/graphics/circuit_macros/examples/control.m4 b/graphics/circuit_macros/examples/control.m4 index 9da5c4a7fc..5ff0b7a91a 100644 --- a/graphics/circuit_macros/examples/control.m4 +++ b/graphics/circuit_macros/examples/control.m4 @@ -133,7 +133,6 @@ Plant: box wid boxwid*3/2 ht boxht*5/4 \ # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # -ifelse(1,1,` ifelse(0,1,` Multiblock: [ boxht = 0.4 @@ -173,11 +172,6 @@ Rf: doublebox(R_2,R_3) at ((S1.x+T.x)/2,T.y-boxht*5/4) 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.3) -') -ifelse(1,1,` -Attitude: [ -] with .nw at Observer.sw + (0,-0.3) -') "(c) A multiblock example" below ljust at last [].sw+(0,-3pt__) ') @@ -217,7 +211,7 @@ UR:(D.e,UL) + (0.1,0) 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 last [].sw + (0,-0.2) +] with .nw at last [].sw + (0,-0.25) "(d) Nonlinear feedforward (for performance) and small-signal feedback (for stability)" below ljust at Nonlinear.sw+(0,-5pt__) diff --git a/graphics/circuit_macros/examples/dpv/AlogixDPV.m4 b/graphics/circuit_macros/examples/dpv/AlogixDPV.m4 index 68bcf53ced..c09a8a8fb8 100644 --- a/graphics/circuit_macros/examples/dpv/AlogixDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/AlogixDPV.m4 @@ -18,12 +18,14 @@ A: Autologix( # Draw a tree of gates only. The ~ has been # replaced by NOT gates. -B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N) \ +B: Autologix(Or(And(B,Not(C)),And(Not(A),B,C)),N, shaded "lightblue" ) \ with .sw at A.e+(1.3,-0.5) "svg_it(Out)" at B.Out above ljust "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) + "svg_tt(`And(Not(A),B,C)),N,')" wid 122bp__ with .w at last "".w+(1.1,-0.18) + "svg_tt(`shaded \"lightblue\")')" wid 120bp__ \ + with .w at last "".w+(0,-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/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4 b/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4 index f1d368106a..45a684ef09 100644 --- a/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/ArrestersDPV.m4 @@ -51,14 +51,16 @@ R2: [ arrow <- from A.B up 0.1 right 0.1; "svg_it(B)" ljust arrow <- from A.G up 0.05 right 0.15; "svg_it(G)" ljust thicklines_ }') + sep = 0.35 [ arrester(,E) {"svg_tt(...(,E))" at last line.c+(0,-0.25)} - move sep - A: arrester(,DE) - {"svg_tt(...(,DE))" at last [].s+(0,-0.1)} + move up_ 0.1 then right_ sep + A: arrester(,DE,,,fill_(0.95)) + {"svg_tt(...svg_lparen,DE,,,)" wid 61bp__ at A.A+(-0.1,-0.4) ljust \ + "svg_tt(fill`'svg_fsize(_,65)`'svg_lparen`0.95'svg_rparen`'svg_rparen)" ljust} Dlabels - move sep*3 + move down_ 0.1 then right_ sep*3 A: arrester(,DS) {"svg_tt(...(,DS))" at last [].s+(0,-0.1)} Dlabels diff --git a/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4 b/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4 index 54530a1bfa..d3e40c8dd2 100644 --- a/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/EVplugsDPV.m4 @@ -1,6 +1,9 @@ .PS -# EV_lugs.m4 +# EVplugs.m4 # https://en.wikipedia.org/wiki/CHAdeMO +# https://en.wikipedia.org/wiki/North_American_Charging_Standard +# https://tesla-cdn.thron.com/static/HXVNIC_North_American_Charging_Standard_Technical_Specification_TS-0023666_HFTPKZ.pdf?xseo=&response-content-disposition=inline%3Bfilename%3D%22North-American-Charging-Standard-Technical-Specification-TS-0023666.pdf%22 + gen_init divert(-1) @@ -60,7 +63,6 @@ define(`EV_J3068',`[ pushkeys_(`$1', Arc: arc thick m4thick from NW to NE with .c at C m4BG ifelse(`$2',,, `shaded rgbstring(patsubst(`$2',:,`,')) line invis from NE to Ac+(0,m4diamLNP/2) \ - then to Ac+(0,m4diamLNP/2) \ then to NW+(1,-1)/sqrt(2)*m4diamLNP/2 + (0,m4diamLNP/2) \ then to NW then to NE shaded rgbstring(patsubst(`$2',:,`,'))') arc thick m4thick to Ac+(0,m4diamLNP/2) with .c at Ac m4BG @@ -146,17 +148,86 @@ define(`EV_CHAdeMO',`[ pushdef(`m4sk',33/140/pEVskale) pushkeys_(`$1', S: circle diam idiam thick m4inthick with .s at C.s+(0,m4thick bp__/2) m4S E: circle diam idiam thick m4inthick at Cintersect(N,N.diam,S,S.diam) m4DCminus W: circle diam idiam thick m4inthick at Cintersect(S,S.diam,N,N.diam) m4DCplus - Loopover_(`Z', + foreach_(`Z', `line thick m4inthick up Z.diam*0.6 right Z.diam*0.6 with .c at Z line thick m4inthick up Z.diam*0.6 left Z.diam*0.6 with .c at Z',N,S) - Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \ + foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \ at N+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',FG,NC,DCP,SS1) - Loopover_(`L',`L: circle diam idiam/4 thick linethick/2 \ + foreach_(`L',`L: circle diam idiam/4 thick linethick/2 \ at S+(Rect_(idiam/4,90*m4Lx)) m4xpand(m4`'L)',PP,CL,SS2,CH) `$3' popdef(`m4sk',`m4wdth',`m4thick',`m4inthick',`m4BG', `m4DCplus',`m4DCminus',`m4N',`m4S', `m4FG',`m4NC',`m4SS1',`m4DCP',`m4PP',`m4CL',`m4CH',`m4SS2') ]') + `EV_NAC(keys) + NAC (Tesla) charging plug in a [] block + keys: wdth=expr; # plug width + diamL=expr; # diam of L1, L2 + BG=background attributes; # shaded "gray" + L1=attributes; # L1 attributes ... + L1inner=attributes; # inner circle... + L2=attributes; # L2 attributes ... + L2inner=attributes; # inner circle... + inner=attributes; # central object + Gnd=attributes; + Gndinner=attributes; + PP=attributes; + CP=attributes; ' +define(`EV_NAC',`[ pushkeys_(`$1', `wdth:1.6; diamL:m4wdth*0.28; BG::N; + L1::N; L1inner::N; L2::N; L2inner::N; Gndinner::N; inner::N; + Gnd::N; PP::N; CP::N; ') + sN = 1/pEVskale*m4wdth/1.6 # drawing coord scale factor + tt = 8.5/160*m4wdth; # outer width + rt = (4^2+43^2)/(2*4)/4*sN; rb = (23^2+56.5^2)/(2*23)/4*sN # arc radii + Ct: (0,0.83*m4wdth-rt); Cb: (0,rb) # arc centres + ra = rb*0.45; ri = ra/4 # radii + NAC_fillet(Ct,-rt,Cb,-rb,ra,NW,Wt,Wb) # draw outer boundary + NE: (-NW.x,NW.y); Eb: (-Wb.x,Wb.y); Et: (-Wt.x,Wt.y) + m = 9; n = 0; P[n]: (0,0) + NAC_arc(m,Cb,rb,-pi_/2,langle(Cb,Eb)) + NAC_arc(m,NE,ra,langle(NE,Eb),langle(NE,Et)) + NAC_arc(m,Ct,rt,langle(Ct,Et),pi_/2) + fitcurve(P,n,shaded "lightgray" m4BG,-n) + pushdef(`m4EVs',`shaded graystring(1)')dnl # inner circles + L1: circle diam m4diamL at ( 21.5/2,23.75)*sN m4EVs m4L1 + inLt = L1.rad/4/(1bp__) + L1i: circle thick inLt rad L1.rad-(inLt+L1.thick)/2 bp__ outlined "yellow" \ + at L1 m4L1inner + L2: circle diam m4diamL at (-21.5/2,23.75)*sN m4EVs m4L2 + L2i: circle thick inLt rad L2.rad-(inLt+L2.thick)/2 bp__ outlined "yellow" \ + at L2 m4L2inner + Gnd: circle diam m4wdth/7 at (0,L1.y-15.92*sN) m4EVs m4Gnd + Gndi: circle thick Gnd.rad/4/(1bp__) rad Gnd.rad-(Gnd.rad/4/(1bp__)+ \ + Gnd.thick)/2 bp__ outlined "green" at Gnd m4Gndinner + PP: circle diam Gnd.diam/2 at (-17/2*sN,L1.y-16.52*sN) m4EVs m4PP + CP: circle diam Gnd.diam/2 at ( 17/2*sN,L1.y-16.52*sN) m4EVs m4CP + rs = (15^2+50^2)/(2*15)/4*sN; Cs: (0,0.3*m4wdth-rs) # inner tri-shape + m = 9; n = 0; P[0]: Ct+(0,rt-tt) + NAC_fillet(L2,L2.rad+tt,Ct,-(rt-tt),ri,FW,Fb,Ft) + NAC_fillet(Cb,-(rb-tt),L2,L2.rad+tt,ri,GW,Gt,Gb) + NAC_fillet(Cs,rs,Cb,-(rb-tt),ri,SW,St,Sb) + NAC_arc(3,Ct,rt-tt,pi_/2,langle(Ct,Ft)) + NAC_arc(m,FW,ri,langle(FW,Ft),NAC_ang(FW,Fb)) + NAC_arc(m,L2,L2.rad+tt,langle(L2,Fb),langle(L2,Gb)) + NAC_arc(m,GW,ri,NAC_ang(GW,Gb),NAC_ang(GW,Gt)) + NAC_arc(m,Cb,rb-tt,NAC_ang(Cb,Gt),NAC_ang(Cb,Sb)) + NAC_arc(m,SW,ri,NAC_ang(SW,Sb),NAC_ang(SW,St)) + NAC_arc(m,Cs,rs,langle(Cs,St),pi_/2) + fitcurve(P,n,fill_(1) m4inner,-n) + popdef(`m4EVs',`m4CP',`m4PP',`m4Gnd',`m4inner', + `m4L2',`m4L2inner',`m4L1',`m4L1inner',`m4Gndinner', + `m4BG',`m4diamL',`m4wdth') `$2' ]') + define(`NAC_fillet', #( C1, r1, C2, r2, frad, Cf, T1, T2 ) + ``$6': Cintersect(`$1',(abs(`$2')+sign(`$2')*(`$5')), + `$3',(abs(`$4')+sign(`$4')*(`$5'))) + `$7': LCintersect(,`$6',`$5',ifelse(index(`$2',-),0,R),`$1',`$6') + `$8': LCintersect(,`$6',`$5',ifelse(index(`$4',-),0,R),`$3',`$6')') + define(`NAC_arc', #( m, C, rad, a0, af ) + `m4a0 = `$4'; m4af = `$5'; for i=1 to `$1' do { n+=1 + P[n]: `$2'+(rect_(`$3',(1-i/`$1')*m4a0+i/`$1'*m4af)) + P[-n]: (-P[n].x,P[n].y) }') + define(`NAC_ang',`pmod(langle(`$1',`$2'),twopi_)') + divert(0)dnl ifsvg(svg_font(sans-serif,6bp__)) @@ -188,22 +259,31 @@ P4: EV_CCS2(L1="L1";L2="L2";L3="L3";N="N";PE="PE",0.85:0.85:0.85, DCplus="DC+";DCminus="DC-") with .w at P3.e+(P1.wid/5,0) "EVsmall(PP)" at P4.J.PP EVk "EVsmall(CP)" at P4.J.CP EVk + P5: EV_CHAdeMO( BG=outlined "blue" fill_(0.8); DCplus=shaded "red" "DC+"; DCminus=shaded "red" "DC-"; - Loopover_(`L',`L=fill_(1);',N,S) + foreach_(`L',`L=fill_(1);',N,S) FG=shaded "green"; - Loopover_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \ + foreach_(`L',`L=shaded "orange";',SS1,DCP,NC,PP,CH,SS2,CL)) \ with .w at P4.e+(P4.w.x-P3.e.x,0) - Loopover_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2) -# - ifsvg(move from P5.e right 0.2) + foreach_(`L',`"EVsmall(L)" at P5.L EVk',FG,NC,DCP,SS1,PP,CL,CH,SS2) + +P6: EV_NAC(wdth=1) with .w at P5.e+(P5.wid/5,0) + foreach_(`L',`"EVtxt(`L'm4Lx)" at P6.L',L1,L2) +thinlines_ + arrow <- from P6.Gnd.s down P6.ht/5; "EVtxt(Gnd)" below + arrow <- from P6.PP.sw down P6.ht/8 left P6.ht/8; "EVtxt(`PP')" rjust + arrow <- from P6.CP.se down P6.ht/8 right P6.ht/8; "EVtxt(`CP')" ljust +thicklines_ + "EVtxt(`EV_CCS2')" at P4.s+(0,-10bp__) + "EVtxt(`EV_NAC')" at (P6,last "") + "EVtxt(`EV_CHAdeMO')" at (P5,last "") "EVtxt(`EV_CCS1')" at (P3,last "") "EVtxt(`EV_J3068')" at (P2,last "") "EVtxt(`EV_J1772')" at (P1,last "") - "EVtxt(`EV_CHAdeMO')" at (P5,last "") - ] # with .nw at last [].sw+(0,-0.2) + ] iflatex(command "}%") ifsvg(command "</g>") diff --git a/graphics/circuit_macros/examples/dpv/FlowDPV.m4 b/graphics/circuit_macros/examples/dpv/FlowDPV.m4 index 70fc877618..4903564842 100644 --- a/graphics/circuit_macros/examples/dpv/FlowDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/FlowDPV.m4 @@ -48,7 +48,7 @@ Case: Fcase(, arrow down linewid/3 from last [].S Fbox("Task 1.5",, shaded Thistle) with .N at Here E:last [].E; S:last [].S], - "Test 2",Fbox("Task 2" "is bigger", wid fboxwid*1.2 ht fboxht*3/2, \ + "Test 2",Fbox("Task 2" "is bigger", wid flowboxwid*1.2 ht flowboxht*3/2, \ shaded SeaGreen), "Test 3",Fbox("Task 3",, shaded RubineRed)dnl ) @@ -79,7 +79,7 @@ Repeatuntil: Frepeatuntil("svg_it(n svg_gt 5)",,,Fbox("Task"), Ifthenelse: Fifthenelse("svg_it(A svg_lt B)",,, Fbox("False"), - Fbox("True",ht fboxht*1.2 wid fboxwid)dnl + Fbox("True",ht flowboxht*1.2 wid flowboxwid)dnl ) with .nw at Repeatuntil.sw +(-0.5,-0.3) "svg_it(.N)" at Ifthenelse.N rjust above @@ -116,7 +116,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_ B2: Fbox("Execu`'svg_ccedilla`'svg_atilde`'o") with .W at B1.E+(awid*3,0) B3: Fbox("Sele`'svg_ccedilla`'svg_atilde`'o") with .W at B2.E+(awid*3,0) LT: Ftest("Avalia`'svg_ccedilla`'svg_atilde`'o do" "Planejamento", - wid fboxwid*1.5 ht fboxht*2.0, + wid flowboxwid*1.5 ht flowboxht*2.0, shaded YellowGreen, "Correto" at Box.e above ljust; "Incompleto" at Box.w above rjust) with .S at 0.5 between B1.ne and B2.nw @@ -125,7 +125,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_ arrow from LT.E to (B2.N,LT.E) then to B2.N RT: Ftest("Avalia`'svg_ccedilla`'svg_atilde`'o da" \ "Execu`'svg_ccedilla`'svg_atilde`'o", - wid fboxwid*1.5 ht fboxht*2.0, + wid flowboxwid*1.5 ht flowboxht*2.0, shaded YellowGreen, "Correto" at Box.e below ljust; "Incompleto" at Box.w below rjust) with .N at 0.5 between B2.se and B3.sw @@ -138,7 +138,7 @@ Example: [ fillvalue = 0.8; awid = linewid/2; right_ B5: Fbox("Conclus`'svg_atilde`'o") arrow up_ awid from B5.N ellipse wid boxwid/2 ht boxwid/3 shaded "red" -] with .nw at last [].Compound.sw+(0,2.5*fboxht) +] with .nw at last [].Compound.sw+(0,2.5*flowboxht) command "</g>" # end font .PE diff --git a/graphics/circuit_macros/examples/dpv/FusesDPV.m4 b/graphics/circuit_macros/examples/dpv/FusesDPV.m4 index 008a5cdc92..254ed891c6 100644 --- a/graphics/circuit_macros/examples/dpv/FusesDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/FusesDPV.m4 @@ -13,7 +13,9 @@ movewid = 0.25 move fuse(,C) ; {"`fuse(,C)'" at last line.c+(0,-0.2)} move - fuse(,S) ; {"`fuse(,S)'" at last line.c+(0,-0.2)} + fuse(,S,,,fill_(0.9)) + {"`fuse(,S,,,'" ljust at last [].sw+(-2bp__,-0.17) \ + "`fill_(0.9))'" ljust} move fuse(,SB) ; {"`fuse(,SB)'" at last line.c+(0,-0.2)} } diff --git a/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4 b/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4 index d21555a241..1da12d0718 100644 --- a/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/MoreTableDPV.m4 @@ -7,7 +7,8 @@ Heater: [ hm = 2.05 right_ { - {lamp ; move; "`lamp'" ljust} + {lamp(,,shaded "yellow") ; move; "" "`lamp(,,'" ljust \ + "`shaded \"yellow\")'" ljust} move right_ 1.5 {lamp(,T) ; move;"`lamp(,T)'" ljust} move right_ 1.25 @@ -17,7 +18,8 @@ Heater: [ } move down 0.4; right_ { - {heater; move;"`heater'" ljust} + {heater(,,,,shaded "orangered"); move; "" "`heater(,,,,'" ljust \ + "`shaded \"orangered\")'" ljust} move right_ hm {heater(,,,,E); move;"`heater(,,,,E)'" ljust} move right_ hm+0.4 @@ -35,8 +37,8 @@ More: [ vm = 0.28 { {memristor ; move;"`memristor '" ljust} - move right_ hm - {heater; move;"`heater '" ljust} +# move right_ hm +# {heater; move;"`heater '" ljust} move right_ hm {tline ; move;"`tline '" ljust} } diff --git a/graphics/circuit_macros/examples/dpv/OpampDPV.m4 b/graphics/circuit_macros/examples/dpv/OpampDPV.m4 index 7137e428ce..6d77f535cb 100644 --- a/graphics/circuit_macros/examples/dpv/OpampDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/OpampDPV.m4 @@ -1,35 +1,43 @@ .PS -# Opamp.m4 +# OpampDPV.m4 cct_init(svg_font(sans-serif,11bp__)) - A: opamp + A: opamp(,,, body=shaded "yellow") thinlines_ - "`opamp'" at A.s-(0,0.25) - "Out" below at A.Out + `"opamp(,,,"' wid 0.65 ljust at A.sw-(0.4,0.4) \ + `"body=shaded \"yellow\")"' ljust + `"Out"' below at A.Out spline <- from A.In1 left 0.1 then up 0.1 left 0.1 - "In1" wid 0.25 rjust above + `"In1"' wid 0.25 rjust above spline <- from A.In2 left 0.1 then down 0.1 left 0.1 - "In2" rjust below + `"In2"' rjust below + arrow <- up 0.1 right 0.1 from A.N + `"N"' ljust above arrow <- up 0.1 right 0.1 from A.E1 - "E1" ljust above + `"E1"' ljust above + arrow <- up 0.1 right 0.1 from A.E + `"E"' ljust above arrow <- down 0.1 right 0.1 from A.E2 - "E2" ljust below + `"E2"' ljust below + arrow <- down 0.1 right 0.1 from A.S + `"S"' ljust below + arrow <- left 0.2 from A.W + `"W"' rjust thicklines_ - Point_(15) - B: opamp(,,,,PR) with .sw at A.se+(0.65,0) + Point_(90) + B: opamp(,,,,PR) with .sw at A.se+(0.75,0) thinlines_ - "`Point_(15); opamp(,,,,PR)'" at B.s-(0,0.25) - spline <- right arrowht up arrowht from B.V1 then right 0.1 - "V1" ljust + `"Point_(90);"' ljust at B.sw-(0,0.2) \ + `"opamp(,,,,PR)"' ljust + spline <- left arrowht down arrowht from B.V1 then left 0.1 + `"V1"' rjust spline <- right arrowht down arrowht from B.V2 then right 0.1 - "V2" ljust + `"V2"' ljust thicklines_ - Point_(90) - C: opamp with .sw at B.se+(1.05,0) - "`Point_(90); opamp'" at C.s-(0,0.25) right_ - D: opamp(,,,,T) with .sw at C.se+(0.65,0) - "`opamp(,,,,T)'" wid 0.85 at D.s-(0,0.25) + C: opamp(,,,body=shaded "orange",T) with .sw at B.se+(0.75,0) + `"opamp(,,,"' wid 0.85 ljust at C.sw+(0,-0.25) \ + `"body=shaded \"orange\",T)"' wid 1.75 ljust - command "</g>" # end font + command `"</g>"' # end font .PE diff --git a/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4 b/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4 index 419371702b..e9f54c3399 100644 --- a/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/ResistorsDPV.m4 @@ -25,7 +25,7 @@ vm = 0.28 } move down vm; right_ { - {resistor(,,B) ; move ; "`resistor(,,B) '" ljust} + {resistor(,5,B) ; move ; "`resistor(,5,B) '" ljust} move right_ hm {resistor(,,E) ; move "`resistor(,,E)'" ljust " svg_equiv `ebox'" ljust} diff --git a/graphics/circuit_macros/examples/dpv/RotboxDPV.m4 b/graphics/circuit_macros/examples/dpv/RotboxDPV.m4 index fba198a669..c64971f048 100644 --- a/graphics/circuit_macros/examples/dpv/RotboxDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/RotboxDPV.m4 @@ -8,14 +8,12 @@ gen_init rotbox(boxwid/2,,thick 2) Point_(30) rotbox(,,shaded "yellow" outlined "blue" thick 3,r=0.1) \ - at last []+vec_(boxwid,0) + at last [].se+vec_(boxwid,0) "r=0.1" at last [] - move to last [].ne Point_(0) - [[]; for_(2,8,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0) - sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].ne+(0.1,0) - [[]; for_(10,16,2, `rotbox(,,dashed,t=m4x/10) at last []+vec_(boxwid*1.1,0) - sprintf("t=%g",m4x/10) at last [] ') ] with .nw at last [].sw+(0,-0.1) + [[]; for_(2,16,2, `rotbox(,,dashed,t=m4x/10) with .nw at \ + ifelse(m4x,10,`2nd [].sw+(0,-0.1)',`last [].ne+(boxwid*0.1,0)') + sprintf("t=%g",m4x/10) at last []') ] with .sw at last [].se+(0.1,0) ] .PE diff --git a/graphics/circuit_macros/examples/dpv/SourcesDPV.m4 b/graphics/circuit_macros/examples/dpv/SourcesDPV.m4 index 6c09030183..ac6769e6ef 100644 --- a/graphics/circuit_macros/examples/dpv/SourcesDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/SourcesDPV.m4 @@ -9,20 +9,25 @@ define(`NL',`; move down $1; right_') {source ; move ; "`source'" ljust} NL {source(,I) ; move ; "`source(,I)'" ljust} NL {source(,i) ; move ; "`source(,i)'" ljust} NL + {source(,ti) ; move ; "`source(,ti)'" ljust} NL {source(,i) ; move ; "`source(,ii)'" ljust} NL {source(,V) ; move ; "`source(,V)'" ljust} NL {source(,v) ; move ; "`source(,v)'" ljust} NL + {source(,tv) ; move ; "`source(,tv)'" ljust} NL {source(,AC); move ; "`source(,AC)'" ljust} NL {source(,X) ; move ; "`source(,X)'" ljust} NL {source(,F) ; move ; "`source(,F)'" ljust} NL {source(,G) ; move ; "`source(,G)'" ljust} NL - {source(,Q) ; move ; "`source(,Q)'" ljust} NL(0.3) - {proximity ; move ; "`proximity" ljust "= consource(,P)'" ljust} + {source(,Q) ; move ; "`source(,Q)'" ljust} } move right_ 2.0 { - {source(,,0.4) ; move ; "`source(,,0.4)'" ljust} NL(0.35) - {source(,P) ; move ; "`source(,P)'" ljust} NL +# {source(,,0.4) ; move ; "`source(,,0.4)'" ljust} NL(0.35) + {source(,,0.4,,shaded "yellow") ; move ; + "`source(,,0.4,," ljust "shaded \"yellow\")'" ljust} NL(0.35) +# {source(,P) ; move ; "`source(,P)'" ljust} NL + {source(,P,,,fill_(0.9)) ; move ; + "`source(,P,,," ljust "fill_(0.9))'" ljust} NL {source(,U) ; move ; "`source(,U)'" ljust} NL {source(,H) ; move ; "`source(,H)'" ljust} NL {source(,R) ; move ; "`source(,R)'" ljust} NL @@ -31,7 +36,9 @@ define(`NL',`; move down $1; right_') {source(,L) ; move ; "`source(,L)'" ljust} NL {source(,B) ; move ; "`source(,B)'" ljust} NL {nullator ; move ; "`nullator'" ljust} NL(moveht*0.8) - {norator ; move ; "`norator'" ljust} + {norator ; move ; "`norator'" ljust} NL(moveht*0.9) + {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust} NL(moveht*1.1) + {proximity ; move ; "`proximity" ljust "= consource(,P)'" ljust} } move right_ 2.0 {source(,N) ; move ; "`source(,N)'" ljust} NL @@ -40,11 +47,12 @@ define(`NL',`; move down $1; right_') {consource ; move ; "`consource'" ljust } NL(0.32) {consource(,I) ; move ; "`consource(,I)'" ljust} NL(0.32) {consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32) + {consource(,ti) ; move ; "`consource(,ti)'" ljust} NL(0.32) {consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32) {consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3) + {consource(,tv) ; move ; "`consource(,tv)'" ljust} NL(0.3) {battery ; move ; "`battery'" ljust} NL(0.3) {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} NL(0.35) - {ttmotor(,G) ; move ; "`ttmotor(,G)'" ljust} command "</g>" # end font .PE diff --git a/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4 b/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4 index eb55f57c19..47b8edbea9 100644 --- a/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/SwitchesDPV.m4 @@ -132,17 +132,17 @@ movewid = 0.25 move down_ 6bp__ then right_ dswitch(,,WBPrM); {"svg_tt(`(,,WBPrM)')" at last [].s Below} move right_ - dswitch(,,WBDIGX,text=W); #{"svg_tt(`(,,WBDIGX,W)')" at last [].s Below} + dswitch(,,WBDIGX,text=W) {"svg_tt(`(,,WBDIGX,')" ljust at last line.start+(0,-15bp__) \ "svg_tt(`text=W)')" ljust} move right_ - dswitch(,,WBDIGC,text=M) + dswitch(,,WBDIGC,circle="M") {"svg_tt(`(,,WBDIGC,')" ljust at last line.start+(0,-15bp__) \ - "svg_tt(`text=M)')" ljust} + "svg_tt(`circle=\"M\")')" ljust} move right_ - dswitch(,,WBcDIGC,text=M) # + dswitch(,,WBcDIGC,circle="M") {"svg_tt(`(,,WBcDIGC,')" ljust at last line.start+(0,-15bp__) \ - "svg_tt(`text=M)')" ljust} + "svg_tt(`circle=\"M\")')" ljust} } command "</g>')" # end font diff --git a/graphics/circuit_macros/examples/dpv/ThreeDPV.m4 b/graphics/circuit_macros/examples/dpv/ThreeDPV.m4 index 7f2311d0ea..0234a81252 100644 --- a/graphics/circuit_macros/examples/dpv/ThreeDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/ThreeDPV.m4 @@ -6,11 +6,7 @@ define(`section',`[ I: Here resistor(right elen_*0.75); llabel(,R/2) T: dot line down dimen_/2 then right_ dimen_/4 - Amp: opamp(,,,,,{ - rgbfill(0.9*255,0.6*255,0.1*255,line to N then to E then to S then to Here) - "-" at In1 ljust - "+" at In2 ljust } - ) with .In1 at Here + Amp: opamp(,,,body=shaded "goldenrod") with .In1 at Here line left dimen_/4 from Amp.In2 then down dimen_/4; G: ground(,,) resistor(from T to (Amp.Out,T)); llabel(,R) O: dot diff --git a/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4 b/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4 index 03a7f451f2..a91c65e576 100644 --- a/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/TubediagsDPV.m4 @@ -330,8 +330,8 @@ Pwr: [ dot(at PXform.ST3); line right_ dimen_/4; dot dot(at PXform.ST1); line right_ dimen_/4 then down_ dimen_*3/2; ground(,T) line from PXform.S2.end right_ dimen_*2.5 then up_ dimen_/4 - Rect2: V_5V4G with .F1.sw at Here; "5V4G" at Rect2.n+(0,dimen_/2) - Rect1: V_5V4G with .e at Rect2.w-(dimen_/2,0); "5V4G" at Rect1.n+(0,dimen_/2) + Rect2: V_5U4G with .F1.sw at Here; "5U4G" at Rect2.n+(0,dimen_/2) + Rect1: V_5U4G with .e at Rect2.w-(dimen_/2,0); "5U4G" at Rect1.n+(0,dimen_/2) move to Rect1.F1.sw; line to (Here,PXform.S2.end); dot move to Rect1.F1.se; line to (Here,PXform.S2.start); dot move to Rect2.F1.se; line to (Here,PXform.S2.start) diff --git a/graphics/circuit_macros/examples/dpv/ex05DPV.m4 b/graphics/circuit_macros/examples/dpv/ex05DPV.m4 index e44542dc3d..ac82c8f861 100644 --- a/graphics/circuit_macros/examples/dpv/ex05DPV.m4 +++ b/graphics/circuit_macros/examples/dpv/ex05DPV.m4 @@ -97,8 +97,8 @@ Coxeter: [ define(`customarc', `pushdef(`dfillcolor',`0.7,0.7,0.7') linethick_(0.4); dnl - Darc(`$1',linewid, (`$2')*dtor_, (`$3')*dtor_, - thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->)dnl + Darc(,centre=`$1';rad=linewid;startdeg= (`$2');enddeg=(`$3'); + thick=linewid/6; wid=linewid*0.3; ht=linewid/6; ends=<->) linethick_(customlinethick); popdef(`dfillcolor')') customarc((linewid,-linewid/3), 25,155) @@ -112,4 +112,9 @@ Coxeter: [ customarc(Orig,-110,-10); "svg_it(c)" at (Rect_(linewid,-60)) ] with .sw at Kalman.se+(15bp__,0) +[ + linethick = 5 + Darrow(right_ Coxeter.wid, + thick=0.3;wid=0.55;ht=0.55;ends=<->; innershade=(0,1,1);outline=(0,0,1)) + ] with .sw at Coxeter.nw+(0,0.3) .PE diff --git a/graphics/circuit_macros/examples/dpv/examplesDPV.htmx b/graphics/circuit_macros/examples/dpv/examplesDPV.htmx index 84fb877209..52f7b939b8 100644 --- a/graphics/circuit_macros/examples/dpv/examplesDPV.htmx +++ b/graphics/circuit_macros/examples/dpv/examplesDPV.htmx @@ -338,7 +338,7 @@ cfig(AmpTableDPV, Macros m4tt`'amp`,' delay</g>`,' and m4tt`'integrator</g>) cfig(FusesDPV, - Macros m4tt`'fuse</g> and m4tt`'cbreaker</g>) + Macros m4tt`'fuse</g>`,' m4tt`'cbreaker</g>`,' and m4tt`'breaker</g>) cfig(ArrestersDPV, The m4tt`'arrester</g> macro) diff --git a/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx b/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx index e46725b0d7..a52445d744 100644 --- a/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx +++ b/graphics/circuit_macros/examples/dpv/examplesDPVs.htmx @@ -335,7 +335,7 @@ cfig(AmpTableDPV, Macros m4tt`'amp`,' delay</g>`,' and m4tt`'integrator</g>) cfig(FusesDPV, - Macros m4tt`'fuse</g> and m4tt`'cbreaker</g>) + Macros m4tt`'fuse</g>`,' m4tt`'cbreaker</g>`,' and m4tt`'jumper</g>) cfig(MoreTableDPV, Additional two-terminal elements) diff --git a/graphics/circuit_macros/examples/dpv/sfgDPV.m4 b/graphics/circuit_macros/examples/dpv/sfgDPV.m4 index a516b3fb97..a64a0c6c00 100644 --- a/graphics/circuit_macros/examples/dpv/sfgDPV.m4 +++ b/graphics/circuit_macros/examples/dpv/sfgDPV.m4 @@ -4,11 +4,12 @@ gen_init(svg_font(Times,11bp__)) sfg_init( blen=1.2 ) # default edge length textht = textht*0.9 +define(`celadon',`0.67,0.88,0.69')dnl # Graph 1 move right 0.15 T:[ - Ft: sfgnode(,f(t),sfgbelow) + Ft: sfgnode(,f(t),sfgbelow,shaded "red") sfgline(,1/K) Y1: sfgnode(,y`'svg_sub(1),sfgbelow rjust) sfgline(,K/M) @@ -18,12 +19,13 @@ T:[ DY2: sfgnode(,y`'svg_sub(2) = x`'svg_sub(2),sfgbelow ljust) {"." at DY2 +(2,-1)*textoffset} sfgline(,1/s) - Y2: sfgnode(,y`'svg_sub(2) = x`'svg_sub(1),sfgbelow ljust) + Y2: sfgnode(,y`'svg_sub(2) = x`'svg_sub(1),sfgbelow ljust, + shaded rgbstring(celadon)) sf = 1 - sfgarc(from DY2 to DDY2,-B/M,below,,sf) - sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf) - sfgarc(from Y2 to Y1,1,sfgabove,,sf) + sfgarc(from DY2 to DDY2,-B/M,below,,sf,outlined "gray") + sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf,outlined "gray") + sfgarc(from Y2 to Y1,1,sfgabove,,sf,outlined "gray") ] # Graph 2 @@ -46,7 +48,9 @@ B: [ G3: [ # change node spacing and increase node size sfg_wid = 0.85; sfg_rad = 0.35/2 - for_(1,4,1,`N`'m4x: sfgnode(,m4x,,fill_(0.9)) + NeedDpicTools + cmyktorgb(96,0,0,0,r,g,b) + for_(1,4,1,`N`'m4x: ColoredV(circle,(r,g,b),rad sfg_rad "m4x") sfgself(at N`'m4x,-90,P`'svg_sub(m4x),,cw) ifelse(m4x,4,,`sfgline(,G`'svg_sub(m4x),sfgbelow)') ') sfgarc(from N2 to N1,F`'svg_sub(2),sfgabove,ccw,) @@ -99,15 +103,17 @@ G4: [sfg_init( blen=2;rad=0.25/2 ) # change node spacing and size # https://tex.stackexchange.com/questions/637455/tikz-how-to-set-exact-position-of-node G5: [sfg_init( blen=1.75;rad=0.25/2 ) # change node spacing and size - Dstar: sfgnode(,* ) - D0: sfgnode(at Dstar+(2,0),svg_small(<>)svg_sub(0) ) + Dstar: sfgnode(,*,,shaded rgbstring(celadon)) + D0: sfgnode(at Dstar+(2,0),svg_small(<>)svg_sub(0),, + shaded rgbstring(celadon) ) sfgline(, - svg_it(1-r`'svg_sub(`x-1,x')-q`'svg_sup(i)svg_sub(x-1`,'x,,,-0.8ex)),,->) - Ddots: sfgnode(,... ) - sfgline(,svg_it(1-r`'svg_sub(x-4`,'x)-q`'svg_sup(i)svg_sub(x-4`,'x,,,-0.8ex)), + svg_it(1-r`'svg_sub(`x-1`'svg_comma`'x')-q`'svg_sup(i)svg_sub(x-1`'svg_comma`'x,,,-0.8ex)),,->) + Ddots: sfgnode(,...,,shaded rgbstring(celadon) ) + sfgline(,svg_it(1-r`'svg_sub(x-4`'svg_comma`'x)-q`'svg_sup(i)svg_sub(x-4`'svg_comma`'x,,,-0.8ex)), ,->) - D5: sfgnode(,svg_small(<>)svg_sub(5) ) - DD: sfgnode(at D0+(0,-1.0),svg_symbol(&``#''8224;) ) + D5: sfgnode(,svg_small(<>)svg_sub(5),,shaded rgbstring(celadon) ) + DD: sfgnode(at D0+(0,-1.0),svg_symbol(&``#''8224;),, + shaded rgbstring(celadon) ) sfgself(at Dstar,L,,,,0.5) "svg_it(1-i`'svg_sub(x)-q`'svg_sub(x)svg_sup(a,,,-0.8ex))" wid 45bp__ \ at Dstar + (-0.3,0.25) @@ -115,13 +121,13 @@ G5: [sfg_init( blen=1.75;rad=0.25/2 ) # change node spacing and size sfgself(at D5,R,,,,0.5) "svg_it(1-q`'svg_sub(x)svg_sup(i,,,-0.8ex)-r`'svg_sub(x))" wid 47bp__ \ at D5 + (0.3,0.25) - sfgarc(from D0 to Dstar ->,svg_it(r`'svg_sub(x`,'x)),below_,ccw) + sfgarc(from D0 to Dstar ->,svg_it(r`'svg_sub(x`'svg_comma`'x)),below_,ccw) sfgarc(from Dstar to D0 ->,svg_it(i`'svg_sub(x)),above_,ccw) sfgarc(from Dstar to DD ->,svg_it(q`'svg_sub(x)svg_sup(a,,,-0.8ex)), above_ ljust_,ccw) - sfgline(from D0 to DD,svg_it(q`'svg_sup(i)svg_sub(x`,'x,,,-0.8ex)),ljust,->) - sfgarc(from Ddots to Dstar,svg_it(r`'svg_sub(j`,'x)),below_,ccw,,->) - sfgarc(from Ddots to DD ->,svg_it(q`'svg_sup(i)svg_sub(x-j`,'x)), + sfgline(from D0 to DD,svg_it(q`'svg_sup(i)svg_sub(x`'svg_comma`'x,,,-0.8ex)),ljust,->) + sfgarc(from Ddots to Dstar,svg_it(r`'svg_sub(j`'svg_comma`'x)),below_,ccw,,->) + sfgarc(from Ddots to DD ->,svg_it(q`'svg_sup(i)svg_sub(x-j`'svg_comma`'x)), above_ rjust_,) sfgarc(from D5 to Dstar ->,svg_it(r`'svg_sub(x)),below_,ccw) sfgarc(from D5 to DD ->,svg_it(q`'svg_sup(i)svg_sub(x,,,-0.8ex)), diff --git a/graphics/circuit_macros/examples/dpv/tstDPV.htmx b/graphics/circuit_macros/examples/dpv/tstDPV.htmx index 3859f9f30f..44c899f722 100644 --- a/graphics/circuit_macros/examples/dpv/tstDPV.htmx +++ b/graphics/circuit_macros/examples/dpv/tstDPV.htmx @@ -261,6 +261,9 @@ There are other issues: <td width="8%"> m4tt svg_emsp</g> <td width="50px" align="left"> |changecom(,)&`#'8195;changecom(`#')| <td width="8%"> m4tt svg_ensp</g> <td width="50px" align="left"> |changecom(,)&`#'8194;changecom(`#')| <td width="8%"> m4tt svg_thinsp</g> <td width="50px" align="left"> |changecom(,)&`#'8201;changecom(`#')| +<td width="10%"> m4tt svg_equiv</g> <td align="left"> changecom(,)&`#'8801;changecom(`#') +<td width="10%"> m4tt svg_tilde</g> <td align="left"> changecom(,)&`#'126;changecom(`#') +<td width="10%"> m4tt svg_uscore</g> <td align="left"> changecom(,)&`#'95;changecom(`#') </tr> </table> diff --git a/graphics/circuit_macros/examples/ex05.m4 b/graphics/circuit_macros/examples/ex05.m4 index 07a5c27fa9..aac16ad831 100644 --- a/graphics/circuit_macros/examples/ex05.m4 +++ b/graphics/circuit_macros/examples/ex05.m4 @@ -114,6 +114,11 @@ Coxeter: [ customarc(Orig,-110,-10); "$c$" at (Rect_(linewid,-60)) ] with .sw at Kalman.se+(15bp__,0) +[ + linethick = 5 + Darrow(right_ Coxeter.wid, + thick=0.3;wid=0.55;ht=0.55;ends=<->; innershade=(0,1,1);outline=(0,0,1)) + ] with .sw at Coxeter.nw+(0,0.3) ',` "This diagram requires LaTex" ') .PE diff --git a/graphics/circuit_macros/examples/examples.pdf b/graphics/circuit_macros/examples/examples.pdf Binary files differindex 1b001ac9ad..c89e3360f3 100644 --- a/graphics/circuit_macros/examples/examples.pdf +++ b/graphics/circuit_macros/examples/examples.pdf diff --git a/graphics/circuit_macros/examples/examples.tex b/graphics/circuit_macros/examples/examples.tex index 8d3af1327c..110720cd6a 100644 --- a/graphics/circuit_macros/examples/examples.tex +++ b/graphics/circuit_macros/examples/examples.tex @@ -1,11 +1,11 @@ % PSTricks examples.tex \documentclass[11pt]{article} +\usepackage[dvipsnames]{xcolor} \usepackage{times} \input mode \usepackage{rotating} \usepackage{graphicx} -\usepackage{xcolor} \usepackage{boxdims} %\usepackage{upgreek} \usepackage{siunitx} @@ -33,6 +33,10 @@ only one workflow had been assumed. The most simplicity and elegance is achieved by sticking to one pic interpreter and one postprocessor. + Color and other embellishments are not included in the standards + documents for circuit elements but examples of their use to call + attention to particular elements are included. + 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 @@ -40,38 +44,3 @@ \input files \endinput - -Other examples currently: -Ball.m4 -birds.m4 -Blogix.m4 -brace.m4 -Ccurve.m4 -chaos.m4 -Chuck.m4 -clock.m4 -Cruller.m4 -debug2.m4 -Escher.m4 -Euro.m4 -Floor.m4 -Geometry.m4 -IC10107.m4 -keyval.m4 -Koch.m4 -Metamodel.m4 -OpAmpFilter.m4 -Orbits.m4 -person.m4 -Planes.m4 -PPA.m4 -Resolver.m4 -rotatetext.m4 -rotellipse.m4 -Shaky.m4 -snake.m4 -SPM.m4 -squiggle.m4 -Wheat.m4 -Zcos.m4 - diff --git a/graphics/circuit_macros/examples/extras/ClassDAmp.m4 b/graphics/circuit_macros/examples/extras/ClassDAmp.m4 new file mode 100644 index 0000000000..b8e845cf06 --- /dev/null +++ b/graphics/circuit_macros/examples/extras/ClassDAmp.m4 @@ -0,0 +1,66 @@ +.PS +# ClassDAmp.m4 +# Adapted and redrawn from Maxim Engineering Journal Vol. Fifty-Nine: +# https://pdfserv.maximintegrated.com/en/ej/EJ59.pdf +log_init + +define(`String',`[ +Q1: mosfet(down_ dimen_*5/4,R,TFSDdPyQdB) + dot(at Q1.S) + { line up_ dimen_/4 + dot(,,1); "ifsvg(`svg_it(V)svg_sub(DD)',`$V_{\hbox{\scriptsize DD}}$')" \ + at last [].n+(0,0.05) above } + line left_ dimen_*2/3 +SW: switch(left_ dimen_,`$1',D); ifelse(`$1',,`rlabel(,SW1)',`llabel(,SW2)') +Q2: mosfet(up_ dimen_*5/4,,TFSDPyQuB) with .D at Q1.D + ground(at Q2.S,T,S) +Out: dot(at Q1.D) + line from Q1.G to Q2.G chop -lthick/2 + G: dot(at last line.c) + dot(at (SW.end,Here)); { line to SW.end } + line from G left_ dimen_*2.5 +Rc: resistor(left_ dimen_) +T: dot; right_ + Comp: opamp(,,,,ifelse(`$1',R,,R)) with .Out at Here + [line left_ dimen_/12 then down_ dimen_/4 then left_ dimen_/12] \ + with .e at Comp.C + ]') + +S1: String +S2: String(R) with .Q1.S at S1.Q2.D+(0,-2*elen_) +I1: line left_ dimen_/2 from S1.Comp.In1 + sinusoid(dimen_/4,twopi_/(dimen_/2),-pi_/2,0,dimen_/2) \ + with .Start at I1.end-(textoffset,0) +I2: line left_ dimen_/2 from S2.Comp.In2 + sinusoid(dimen_/4,twopi_/(dimen_/2),pi_/2,0,dimen_/2) \ + with .Start at I2.end-(textoffset,0) + line from S1.Comp.In2 left I1.len + continue to (Here,S2.Comp.In1) then to S2.Comp.In1 + dot(at 1/2 between I1.end and I2.end) + line left_ dimen_/2; move left_ textoffset then down_ dimen_/4 + line up dimen_/2 then down dimen_/2 left_ dimen_/4 \ + for_(1,3,1,`then up dimen_/2 then down dimen_/2 left_ dimen_/4 \') + + right_ +N: NOR_gate with .Out at (1/2 between S1.Rc.start and S2.Rc.start) + line from S1.T to (S1.T,N.In1) then to N.In1 + line from S2.T to (S2.T,N.In2) then to N.In2 +NO: dot(at N.Out+(dimen_/12,0)) + resistor(right_ dimen_ from N.Out) + rlabel(,iflatex(R_{\hbox{\scriptsize On}},ifsvg(svg_it(R)`'svg_sub(On)))) + dot + { line up_ dimen_/2; diode(to (NO,Here),Z); line to NO } + { capacitor(down_ dimen_); ground(,T,S) + llabel(,iflatex(C_{\hbox{\scriptsize On}},ifsvg(svg_it(R)`'svg_sub(On)))) } + line dashed to (S1.SW,Here) + arrow <-> dashed from S1.SW to S2.SW chop dimen_/4 + + line right_ dimen_ from S1.Out "Out-" above + line down_ (Here.y-S2.Out.y)/2-dimen_; ifsvg({move right_ 3*textht}) + inductor(down_ dimen_) + llabel(,iflatex(L_{\hbox{\scriptsize E}},ifsvg(L`'svg_sub(E)))) + resistor(down_ dimen_) + llabel(,iflatex(R_{\hbox{\scriptsize E}},ifsvg(R`'svg_sub(E)))) + line to (Here,S2.Out) then to S2.Out "Out+" above + +.PE diff --git a/graphics/circuit_macros/examples/extras/Flow2.m4 b/graphics/circuit_macros/examples/extras/Flow2.m4 index 6f8e2affbf..f806a74636 100644 --- a/graphics/circuit_macros/examples/extras/Flow2.m4 +++ b/graphics/circuit_macros/examples/extras/Flow2.m4 @@ -5,8 +5,8 @@ sinclude(../FlowchartDefs.m4def) down_ smallsep = boxht/3 - testw = fboxwid*7/4 - testh = fboxht*9/4 + testw = flowboxwid*7/4 + testh = flowboxht*9/4 Start: Fbox("Start",,rad boxht/8 shaded "red!30") arrow down_ smallsep "False" ljust Input: Fdata(`"Input: $f(), a, b, \epsilon$"',wid boxwid*5/4,, diff --git a/graphics/circuit_macros/examples/fet.m4 b/graphics/circuit_macros/examples/fet.m4 index 9cbd0809ce..2e67e80802 100644 --- a/graphics/circuit_macros/examples/fet.m4 +++ b/graphics/circuit_macros/examples/fet.m4 @@ -151,7 +151,11 @@ Row3: [ {`"{\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 } + "$D$" at J.D ljust + thinlines_ + arrow <- down .05 left .18 from (J.G.x,J.G.y-0.1) + "\tt T" rjust + thicklines_ } ] with .nw at last [].sw Row4: [ diff --git a/graphics/circuit_macros/examples/files.tex b/graphics/circuit_macros/examples/files.tex index 333eeb6825..37bff79b12 100644 --- a/graphics/circuit_macros/examples/files.tex +++ b/graphics/circuit_macros/examples/files.tex @@ -57,7 +57,7 @@ \bfig{ \centerline{\getpic{Fuses}} - \caption{Macros {\tt fuse} and {\tt cbreaker} + \caption{Macros {\tt fuse,} {\tt cbreaker,} and {\tt jumper} \src{Fuses.m4}.} } @@ -417,11 +417,11 @@ } \end{sidewaysfigure} %}% \end{landscape} -\bfig{ +\ifpostscript\else\bfig{ \centerline{\getpic{UNO}} \caption{An Arduino UNO circuit adapted and redrawn \src{UNO.m4}.} - } + }\fi \bfig{ \centerline{\getpic{Tubediags}} @@ -542,6 +542,7 @@ \bfig{ \centerline{\getpic{GrayCode}} \caption{Gray code 10-bit encoder disk pattern and a crossbar switch + illustrating the power of looping and branching \src{GrayCode.m4}.} } @@ -567,9 +568,10 @@ \ifmpost\else\ifpostscript\else\bfig{ \centerline{\getpic{shadowed}} - \caption{The macro + \caption{Embellishments: the top row illustrates {\tt shadowed(box|circle|ellipse|line,[at {\sl position}],{\sl keys})} - shadowed object + and the second row + {\tt ColoredV(box|circle|ellipse,({\sl r,g,b})|(({\sl colorseq})),{\sl attributes})} \src{shadowed.m4}.} }\fi\fi @@ -591,11 +593,11 @@ \src{Loglog.m4}.} } -\ifmpost\else\bfig{ +\ifmpost\else\ifpostscript\else\bfig{ \centerline{\getpic{Smithchart}} \caption{A Smith chart \src{Smithlchart.m4}.} - }\fi + }\fi\fi \bfig{ \centerline{\getpic{ex09}} @@ -787,13 +789,13 @@ \caption{Overlaying a figure with line graphics %ignore% \src{Incleps.m4}.} } -\else\ifpostscript% Postscript with psfrag (.eps.gz not allowed) -ifpostscript(,\bfig{% +\else\ifpostscript\else% Postscript with psfrag (.eps.gz not allowed) +\bfig{% \centerline{\boxdims{InclA}{%ignore% \includegraphics[width=3in]{Incl.eps}}% \hspace*{-3in}\includegraphics{Incleps.eps}}% \caption{Overlaying a figure with line graphics %ignore% - \src{Incleps.m4}.}}) + \src{Incleps.m4}.}} \fi\fi\fi\fi\fi \fi % ifmpost diff --git a/graphics/circuit_macros/examples/heater.m4 b/graphics/circuit_macros/examples/heater.m4 deleted file mode 100644 index d3f0f8ee33..0000000000 --- a/graphics/circuit_macros/examples/heater.m4 +++ /dev/null @@ -1,26 +0,0 @@ -.PS -# heater.m4 -cct_init - -movewid = 2 pt__ -hm = 2.05 -right_ -{ - {lamp ; move; "`{\tt lamp}'" ljust} - move right_ 1.5 - {lamp(,T) ; move;"`{\tt lamp(,T)}'" ljust} - move right_ 1.25 - {thermocouple ; move;" `{\tt thermocouple}'" ljust } - move right_ hm - {thermocouple(,,,T) ; move; "`{\tt thermocouple(,{,},T)}'" ljust } - } -move down 0.25; right_ -{ - {heater; move;"`{\tt heater}'" ljust} - move right_ hm - {heater(,,,,E); move;"`{\tt heater(,{,},{,}E)}'" ljust} - move right_ hm+0.4 - {heater(,,,,ET); move;"`{\tt heater(,{,},{,}ET)}'" ljust} - } - -.PE diff --git a/graphics/circuit_macros/examples/mf/Makefile b/graphics/circuit_macros/examples/mf/Makefile index 1386a927d6..b36f8c8900 100644 --- a/graphics/circuit_macros/examples/mf/Makefile +++ b/graphics/circuit_macros/examples/mf/Makefile @@ -1,5 +1,4 @@ # Type "make" or "make testfont.ps" -# To test an individual diagram, type "make DOC=file clean file.ps" LIBDIR = $$HOME/lib M4MACROS = mfpic.m4 diff --git a/graphics/circuit_macros/examples/mf/cct.mf b/graphics/circuit_macros/examples/mf/cct.mf index a511d1f0d9..fc30c9dbad 100644 --- a/graphics/circuit_macros/examples/mf/cct.mf +++ b/graphics/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 2023/09/11 at 22:43 +% from TeX source "font" on 2024/01/01 at 16:59 numeric mfpicversion; mfpicversion := 110; if unknown mode: mode := localfont; fi if unknown mag: mag := 1000/1000; fi @@ -2943,10 +2943,15 @@ polyline (false) ((0.5625,0), (0.0625,0.25), (0.0625,-0.25), -(0.5625,0), +(0.5625,0)); + +store (curpath) +drawn +polyline (false) +((0.5625,0), (0.625,0)); -endmfpic; % (69) line 985 in the TeX source. +endmfpic; % (69) line 986 in the TeX source. %------------------------------------------ @@ -2955,7 +2960,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.25, 0.25, -0.625, 0); -beginmfpic(70); % line 986 in the TeX source. +beginmfpic(70); % line 987 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -2972,10 +2977,15 @@ polyline (false) ((0,-0.5625), (0.25,-0.0625), (-0.25,-0.0625), -(0,-0.5625), +(0,-0.5625)); + +store (curpath) +drawn +polyline (false) +((0,-0.5625), (0,-0.625)); -endmfpic; % (70) line 997 in the TeX source. +endmfpic; % (70) line 999 in the TeX source. %------------------------------------------ @@ -2984,7 +2994,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.625, 0, -0.25, 0.25); -beginmfpic(71); % line 998 in the TeX source. +beginmfpic(71); % line 1000 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3001,10 +3011,15 @@ polyline (false) ((-0.5625,0), (-0.0625,-0.25), (-0.0625,0.25), -(-0.5625,0), +(-0.5625,0)); + +store (curpath) +drawn +polyline (false) +((-0.5625,0), (-0.625,0)); -endmfpic; % (71) line 1009 in the TeX source. +endmfpic; % (71) line 1012 in the TeX source. %------------------------------------------ @@ -3013,7 +3028,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.25, 0.25, 0, 0.625); -beginmfpic(72); % line 1010 in the TeX source. +beginmfpic(72); % line 1013 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3030,10 +3045,15 @@ polyline (false) ((0,0.5625), (-0.25,0.0625), (0.25,0.0625), -(0,0.5625), +(0,0.5625)); + +store (curpath) +drawn +polyline (false) +((0,0.5625), (0,0.625)); -endmfpic; % (72) line 1021 in the TeX source. +endmfpic; % (72) line 1025 in the TeX source. %------------------------------------------ @@ -3042,7 +3062,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.333333, -0.175, 0.175); -beginmfpic(73); % line 1022 in the TeX source. +beginmfpic(73); % line 1026 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3071,7 +3091,7 @@ polyline (false) ((0.3125,0), (0.333333,0)); -endmfpic; % (73) line 1035 in the TeX source. +endmfpic; % (73) line 1039 in the TeX source. %------------------------------------------ @@ -3080,7 +3100,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, -0.333333, 0); -beginmfpic(74); % line 1036 in the TeX source. +beginmfpic(74); % line 1040 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3109,7 +3129,7 @@ polyline (false) ((0,-0.3125), (0,-0.333333)); -endmfpic; % (74) line 1049 in the TeX source. +endmfpic; % (74) line 1053 in the TeX source. %------------------------------------------ @@ -3118,7 +3138,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.333333, 0, -0.175, 0.175); -beginmfpic(75); % line 1050 in the TeX source. +beginmfpic(75); % line 1054 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3147,7 +3167,7 @@ polyline (false) ((-0.3125,0), (-0.333333,0)); -endmfpic; % (75) line 1063 in the TeX source. +endmfpic; % (75) line 1067 in the TeX source. %------------------------------------------ @@ -3156,7 +3176,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.333333); -beginmfpic(76); % line 1064 in the TeX source. +beginmfpic(76); % line 1068 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3185,7 +3205,7 @@ polyline (false) ((0,0.3125), (0,0.333333)); -endmfpic; % (76) line 1077 in the TeX source. +endmfpic; % (76) line 1081 in the TeX source. %------------------------------------------ @@ -3194,7 +3214,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.083333, 0.083333, -0.0625, 0); -beginmfpic(77); % line 1078 in the TeX source. +beginmfpic(77); % line 1082 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3217,7 +3237,7 @@ polyline (false) ((0.035714,-0.0625), (-0.035714,-0.0625)); -endmfpic; % (77) line 1088 in the TeX source. +endmfpic; % (77) line 1092 in the TeX source. %------------------------------------------ @@ -3226,7 +3246,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.083333, 0.083333, -0.1875, 0); -beginmfpic(78); % line 1089 in the TeX source. +beginmfpic(78); % line 1093 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3255,7 +3275,7 @@ polyline (false) ((0.035714,-0.1875), (-0.035714,-0.1875)); -endmfpic; % (78) line 1101 in the TeX source. +endmfpic; % (78) line 1105 in the TeX source. %------------------------------------------ @@ -3264,7 +3284,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.104167, 0.104167, -0.333333, 0); -beginmfpic(79); % line 1102 in the TeX source. +beginmfpic(79); % line 1106 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3337,7 +3357,7 @@ polyline (false) ((0.104167,-0.041667), (0.104167,0)); -endmfpic; % (79) line 1126 in the TeX source. +endmfpic; % (79) line 1130 in the TeX source. %------------------------------------------ @@ -3346,7 +3366,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.333333, -0.104167, 0.104167); -beginmfpic(80); % line 1127 in the TeX source. +beginmfpic(80); % line 1131 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3419,7 +3439,7 @@ polyline (false) ((0.041667,0.104167), (0,0.104167)); -endmfpic; % (80) line 1151 in the TeX source. +endmfpic; % (80) line 1155 in the TeX source. %------------------------------------------ @@ -3428,7 +3448,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1625, 0.1625, 0, 0.3); -beginmfpic(81); % line 1152 in the TeX source. +beginmfpic(81); % line 1156 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3474,7 +3494,7 @@ polyline (false) ((0.1625,0.3), (-0.0375,0.21)); -endmfpic; % (81) line 1168 in the TeX source. +endmfpic; % (81) line 1172 in the TeX source. %------------------------------------------ @@ -3483,7 +3503,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.3, 0, -0.1625, 0.1625); -beginmfpic(82); % line 1169 in the TeX source. +beginmfpic(82); % line 1173 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3529,7 +3549,7 @@ polyline (false) ((-0.3,0.1625), (-0.21,-0.0375)); -endmfpic; % (82) line 1185 in the TeX source. +endmfpic; % (82) line 1189 in the TeX source. %------------------------------------------ @@ -3538,7 +3558,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1625, 0.1625, 0, 0.3); -beginmfpic(83); % line 1186 in the TeX source. +beginmfpic(83); % line 1190 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3584,7 +3604,7 @@ polyline (false) ((-0.1625,0.3), (0.0375,0.21)); -endmfpic; % (83) line 1202 in the TeX source. +endmfpic; % (83) line 1206 in the TeX source. %------------------------------------------ @@ -3593,7 +3613,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.3, -0.1625, 0.1625); -beginmfpic(84); % line 1203 in the TeX source. +beginmfpic(84); % line 1207 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3639,7 +3659,7 @@ polyline (false) ((0.3,0.1625), (0.21,-0.0375)); -endmfpic; % (84) line 1219 in the TeX source. +endmfpic; % (84) line 1223 in the TeX source. %------------------------------------------ @@ -3648,7 +3668,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1625, 0.1625, 0, 0.3); -beginmfpic(85); % line 1220 in the TeX source. +beginmfpic(85); % line 1224 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3694,7 +3714,7 @@ polyline (false) ((0.1625,0.3), (-0.0375,0.21)); -endmfpic; % (85) line 1236 in the TeX source. +endmfpic; % (85) line 1240 in the TeX source. %------------------------------------------ @@ -3703,7 +3723,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.3, 0, -0.1625, 0.1625); -beginmfpic(86); % line 1237 in the TeX source. +beginmfpic(86); % line 1241 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3749,7 +3769,7 @@ polyline (false) ((-0.3,0.1625), (-0.21,-0.0375)); -endmfpic; % (86) line 1253 in the TeX source. +endmfpic; % (86) line 1257 in the TeX source. %------------------------------------------ @@ -3758,7 +3778,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1625, 0.1625, 0, 0.3); -beginmfpic(87); % line 1254 in the TeX source. +beginmfpic(87); % line 1258 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3804,7 +3824,7 @@ polyline (false) ((-0.1625,0.3), (0.0375,0.21)); -endmfpic; % (87) line 1270 in the TeX source. +endmfpic; % (87) line 1274 in the TeX source. %------------------------------------------ @@ -3813,7 +3833,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.3, -0.1625, 0.1625); -beginmfpic(88); % line 1271 in the TeX source. +beginmfpic(88); % line 1275 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3859,7 +3879,7 @@ polyline (false) ((0.3,0.1625), (0.21,-0.0375)); -endmfpic; % (88) line 1287 in the TeX source. +endmfpic; % (88) line 1291 in the TeX source. %------------------------------------------ @@ -3868,7 +3888,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.4, -0.2, 0.2); -beginmfpic(89); % line 1288 in the TeX source. +beginmfpic(89); % line 1292 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3877,7 +3897,7 @@ store (curpath) drawn circle ((0.2,0),0.2); -endmfpic; % (89) line 1293 in the TeX source. +endmfpic; % (89) line 1297 in the TeX source. %------------------------------------------ @@ -3886,7 +3906,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.252778); -beginmfpic(90); % line 1294 in the TeX source. +beginmfpic(90); % line 1298 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3926,7 +3946,7 @@ polyline (false) ((0.175,0.027778), (0,0.027778)); -endmfpic; % (90) line 1308 in the TeX source. +endmfpic; % (90) line 1312 in the TeX source. %------------------------------------------ @@ -3935,7 +3955,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.252778); -beginmfpic(91); % line 1309 in the TeX source. +beginmfpic(91); % line 1313 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -3975,7 +3995,7 @@ polyline (false) ((-0.175,0.027778), (0,0.027778)); -endmfpic; % (91) line 1323 in the TeX source. +endmfpic; % (91) line 1327 in the TeX source. %------------------------------------------ @@ -3984,7 +4004,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.252778); -beginmfpic(92); % line 1324 in the TeX source. +beginmfpic(92); % line 1328 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4030,7 +4050,7 @@ polyline (false) ((0.175,0.027778), (0,0.027778)); -endmfpic; % (92) line 1340 in the TeX source. +endmfpic; % (92) line 1344 in the TeX source. %------------------------------------------ @@ -4039,7 +4059,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.252778); -beginmfpic(93); % line 1341 in the TeX source. +beginmfpic(93); % line 1345 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4085,7 +4105,7 @@ polyline (false) ((-0.175,0.027778), (0,0.027778)); -endmfpic; % (93) line 1357 in the TeX source. +endmfpic; % (93) line 1361 in the TeX source. %------------------------------------------ @@ -4094,7 +4114,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(94); % line 1358 in the TeX source. +beginmfpic(94); % line 1362 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4167,7 +4187,7 @@ polyline (false) ((0.175,0.025), (0,0.025)); -endmfpic; % (94) line 1385 in the TeX source. +endmfpic; % (94) line 1389 in the TeX source. %------------------------------------------ @@ -4176,7 +4196,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(95); % line 1386 in the TeX source. +beginmfpic(95); % line 1390 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4249,7 +4269,7 @@ polyline (false) ((-0.175,0.025), (0,0.025)); -endmfpic; % (95) line 1413 in the TeX source. +endmfpic; % (95) line 1417 in the TeX source. %------------------------------------------ @@ -4258,7 +4278,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(96); % line 1414 in the TeX source. +beginmfpic(96); % line 1418 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4331,7 +4351,7 @@ polyline (false) ((0.175,0.025), (0,0.025)); -endmfpic; % (96) line 1441 in the TeX source. +endmfpic; % (96) line 1445 in the TeX source. %------------------------------------------ @@ -4340,7 +4360,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(97); % line 1442 in the TeX source. +beginmfpic(97); % line 1446 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4413,7 +4433,7 @@ polyline (false) ((-0.175,0.025), (0,0.025)); -endmfpic; % (97) line 1469 in the TeX source. +endmfpic; % (97) line 1473 in the TeX source. %------------------------------------------ @@ -4422,7 +4442,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(98); % line 1470 in the TeX source. +beginmfpic(98); % line 1474 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4483,7 +4503,7 @@ polyline (false) ((0.175,0.025), (0,0.025)); -endmfpic; % (98) line 1493 in the TeX source. +endmfpic; % (98) line 1497 in the TeX source. %------------------------------------------ @@ -4492,7 +4512,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(99); % line 1494 in the TeX source. +beginmfpic(99); % line 1498 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4553,7 +4573,7 @@ polyline (false) ((-0.175,0.025), (0,0.025)); -endmfpic; % (99) line 1517 in the TeX source. +endmfpic; % (99) line 1521 in the TeX source. %------------------------------------------ @@ -4562,7 +4582,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(100); % line 1518 in the TeX source. +beginmfpic(100); % line 1522 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4623,7 +4643,7 @@ polyline (false) ((0.175,0.025), (0,0.025)); -endmfpic; % (100) line 1541 in the TeX source. +endmfpic; % (100) line 1545 in the TeX source. %------------------------------------------ @@ -4632,7 +4652,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0.175, 0, 0.25); -beginmfpic(101); % line 1542 in the TeX source. +beginmfpic(101); % line 1546 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4693,7 +4713,7 @@ polyline (false) ((-0.175,0.025), (0,0.025)); -endmfpic; % (101) line 1565 in the TeX source. +endmfpic; % (101) line 1569 in the TeX source. %------------------------------------------ @@ -4702,7 +4722,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.35, -0.15, 0.15); -beginmfpic(102); % line 1566 in the TeX source. +beginmfpic(102); % line 1570 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4719,7 +4739,7 @@ store (curpath) drawn arcplr ((0.2,0),90,-90,0.15); -endmfpic; % (102) line 1575 in the TeX source. +endmfpic; % (102) line 1579 in the TeX source. %------------------------------------------ @@ -4728,7 +4748,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.15, 0.15, -0.35, 0); -beginmfpic(103); % line 1576 in the TeX source. +beginmfpic(103); % line 1580 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4745,7 +4765,7 @@ store (curpath) drawn arcplr ((0,-0.2),0,-180,0.15); -endmfpic; % (103) line 1585 in the TeX source. +endmfpic; % (103) line 1589 in the TeX source. %------------------------------------------ @@ -4754,7 +4774,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.35, 0, -0.15, 0.15); -beginmfpic(104); % line 1586 in the TeX source. +beginmfpic(104); % line 1590 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4771,7 +4791,7 @@ store (curpath) drawn arcplr ((-0.2,0),-90,-270,0.15); -endmfpic; % (104) line 1595 in the TeX source. +endmfpic; % (104) line 1599 in the TeX source. %------------------------------------------ @@ -4780,7 +4800,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.15, 0.15, 0, 0.35); -beginmfpic(105); % line 1596 in the TeX source. +beginmfpic(105); % line 1600 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4797,7 +4817,7 @@ store (curpath) drawn arcplr ((0,0.2),-180,-360,0.15); -endmfpic; % (105) line 1605 in the TeX source. +endmfpic; % (105) line 1609 in the TeX source. %------------------------------------------ @@ -4806,7 +4826,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.355556, -0.151089, 0.151089); -beginmfpic(106); % line 1606 in the TeX source. +beginmfpic(106); % line 1610 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4835,7 +4855,7 @@ store (curpath) drawn arcplr ((0.122222,0.105392),-90,-24.529547,0.256481); -endmfpic; % (106) line 1617 in the TeX source. +endmfpic; % (106) line 1621 in the TeX source. %------------------------------------------ @@ -4844,7 +4864,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, -0.355556, 0); -beginmfpic(107); % line 1618 in the TeX source. +beginmfpic(107); % line 1622 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4873,7 +4893,7 @@ store (curpath) drawn arcplr ((0.105392,-0.122222),180,245.470453,0.256481); -endmfpic; % (107) line 1629 in the TeX source. +endmfpic; % (107) line 1633 in the TeX source. %------------------------------------------ @@ -4882,7 +4902,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.355556, 0, -0.151089, 0.151089); -beginmfpic(108); % line 1630 in the TeX source. +beginmfpic(108); % line 1634 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4911,7 +4931,7 @@ store (curpath) drawn arcplr ((-0.122222,-0.105392),90,155.470453,0.256481); -endmfpic; % (108) line 1641 in the TeX source. +endmfpic; % (108) line 1645 in the TeX source. %------------------------------------------ @@ -4920,7 +4940,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, 0, 0.355556); -beginmfpic(109); % line 1642 in the TeX source. +beginmfpic(109); % line 1646 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4949,7 +4969,7 @@ store (curpath) drawn arcplr ((-0.105392,0.122222),0,65.470453,0.256481); -endmfpic; % (109) line 1653 in the TeX source. +endmfpic; % (109) line 1657 in the TeX source. %------------------------------------------ @@ -4958,7 +4978,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.175, -0.1, 0.1); -beginmfpic(110); % line 1654 in the TeX source. +beginmfpic(110); % line 1658 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4971,7 +4991,7 @@ polyline (false) (0,0.1), (0.175,0)); -endmfpic; % (110) line 1662 in the TeX source. +endmfpic; % (110) line 1666 in the TeX source. %------------------------------------------ @@ -4980,7 +5000,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1, 0.1, -0.175, 0); -beginmfpic(111); % line 1663 in the TeX source. +beginmfpic(111); % line 1667 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -4993,7 +5013,7 @@ polyline (false) (0.1,0), (0,-0.175)); -endmfpic; % (111) line 1671 in the TeX source. +endmfpic; % (111) line 1675 in the TeX source. %------------------------------------------ @@ -5002,7 +5022,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.175, 0, -0.1, 0.1); -beginmfpic(112); % line 1672 in the TeX source. +beginmfpic(112); % line 1676 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5015,7 +5035,7 @@ polyline (false) (0,-0.1), (-0.175,0)); -endmfpic; % (112) line 1680 in the TeX source. +endmfpic; % (112) line 1684 in the TeX source. %------------------------------------------ @@ -5024,7 +5044,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1, 0.1, 0, 0.175); -beginmfpic(113); % line 1681 in the TeX source. +beginmfpic(113); % line 1685 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5037,7 +5057,7 @@ polyline (false) (-0.1,0), (0,0.175)); -endmfpic; % (113) line 1689 in the TeX source. +endmfpic; % (113) line 1693 in the TeX source. %------------------------------------------ @@ -5046,7 +5066,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.425, -0.15, 0.15); -beginmfpic(114); % line 1690 in the TeX source. +beginmfpic(114); % line 1694 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5067,7 +5087,7 @@ store (curpath) drawn circle ((0.3875,0),0.0375); -endmfpic; % (114) line 1700 in the TeX source. +endmfpic; % (114) line 1704 in the TeX source. %------------------------------------------ @@ -5076,7 +5096,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.15, 0.15, -0.425, 0); -beginmfpic(115); % line 1701 in the TeX source. +beginmfpic(115); % line 1705 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5097,7 +5117,7 @@ store (curpath) drawn circle ((0,-0.3875),0.0375); -endmfpic; % (115) line 1711 in the TeX source. +endmfpic; % (115) line 1715 in the TeX source. %------------------------------------------ @@ -5106,7 +5126,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.425, 0, -0.15, 0.15); -beginmfpic(116); % line 1712 in the TeX source. +beginmfpic(116); % line 1716 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5127,7 +5147,7 @@ store (curpath) drawn circle ((-0.3875,0),0.0375); -endmfpic; % (116) line 1722 in the TeX source. +endmfpic; % (116) line 1726 in the TeX source. %------------------------------------------ @@ -5136,7 +5156,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.15, 0.15, 0, 0.425); -beginmfpic(117); % line 1723 in the TeX source. +beginmfpic(117); % line 1727 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5157,7 +5177,7 @@ store (curpath) drawn circle ((0,0.3875),0.0375); -endmfpic; % (117) line 1733 in the TeX source. +endmfpic; % (117) line 1737 in the TeX source. %------------------------------------------ @@ -5166,7 +5186,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.430556, -0.151089, 0.151089); -beginmfpic(118); % line 1734 in the TeX source. +beginmfpic(118); % line 1738 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5199,7 +5219,7 @@ store (curpath) drawn circle ((0.393056,-0.001089),0.0375); -endmfpic; % (118) line 1746 in the TeX source. +endmfpic; % (118) line 1750 in the TeX source. %------------------------------------------ @@ -5208,7 +5228,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, -0.430556, 0); -beginmfpic(119); % line 1747 in the TeX source. +beginmfpic(119); % line 1751 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5241,7 +5261,7 @@ store (curpath) drawn circle ((-0.001089,-0.393056),0.0375); -endmfpic; % (119) line 1759 in the TeX source. +endmfpic; % (119) line 1763 in the TeX source. %------------------------------------------ @@ -5250,7 +5270,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.430556, 0, -0.151089, 0.151089); -beginmfpic(120); % line 1760 in the TeX source. +beginmfpic(120); % line 1764 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5283,7 +5303,7 @@ store (curpath) drawn circle ((-0.393056,0.001089),0.0375); -endmfpic; % (120) line 1772 in the TeX source. +endmfpic; % (120) line 1776 in the TeX source. %------------------------------------------ @@ -5292,7 +5312,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, 0, 0.430556); -beginmfpic(121); % line 1773 in the TeX source. +beginmfpic(121); % line 1777 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5325,7 +5345,7 @@ store (curpath) drawn circle ((0.001089,0.393056),0.0375); -endmfpic; % (121) line 1785 in the TeX source. +endmfpic; % (121) line 1789 in the TeX source. %------------------------------------------ @@ -5334,7 +5354,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.4, -0.151089, 0.151089); -beginmfpic(122); % line 1786 in the TeX source. +beginmfpic(122); % line 1790 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5367,7 +5387,7 @@ store (curpath) drawn arcplr ((0.166667,0.105392),-90,-24.529547,0.256481); -endmfpic; % (122) line 1798 in the TeX source. +endmfpic; % (122) line 1802 in the TeX source. %------------------------------------------ @@ -5376,7 +5396,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, -0.4, 0); -beginmfpic(123); % line 1799 in the TeX source. +beginmfpic(123); % line 1803 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5409,7 +5429,7 @@ store (curpath) drawn arcplr ((0.105392,-0.166667),180,245.470453,0.256481); -endmfpic; % (123) line 1811 in the TeX source. +endmfpic; % (123) line 1815 in the TeX source. %------------------------------------------ @@ -5418,7 +5438,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.4, 0, -0.151089, 0.151089); -beginmfpic(124); % line 1812 in the TeX source. +beginmfpic(124); % line 1816 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5451,7 +5471,7 @@ store (curpath) drawn arcplr ((-0.166667,-0.105392),90,155.470453,0.256481); -endmfpic; % (124) line 1824 in the TeX source. +endmfpic; % (124) line 1828 in the TeX source. %------------------------------------------ @@ -5460,7 +5480,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, 0, 0.4); -beginmfpic(125); % line 1825 in the TeX source. +beginmfpic(125); % line 1829 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5493,7 +5513,7 @@ store (curpath) drawn arcplr ((-0.105392,0.166667),0,65.470453,0.256481); -endmfpic; % (125) line 1837 in the TeX source. +endmfpic; % (125) line 1841 in the TeX source. %------------------------------------------ @@ -5502,7 +5522,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.475, -0.151089, 0.151089); -beginmfpic(126); % line 1838 in the TeX source. +beginmfpic(126); % line 1842 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5539,7 +5559,7 @@ store (curpath) drawn circle ((0.4375,-0.001089),0.0375); -endmfpic; % (126) line 1851 in the TeX source. +endmfpic; % (126) line 1855 in the TeX source. %------------------------------------------ @@ -5548,7 +5568,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, -0.475, 0); -beginmfpic(127); % line 1852 in the TeX source. +beginmfpic(127); % line 1856 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5585,7 +5605,7 @@ store (curpath) drawn circle ((-0.001089,-0.4375),0.0375); -endmfpic; % (127) line 1865 in the TeX source. +endmfpic; % (127) line 1869 in the TeX source. %------------------------------------------ @@ -5594,7 +5614,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.475, 0, -0.151089, 0.151089); -beginmfpic(128); % line 1866 in the TeX source. +beginmfpic(128); % line 1870 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5631,7 +5651,7 @@ store (curpath) drawn circle ((-0.4375,0.001089),0.0375); -endmfpic; % (128) line 1879 in the TeX source. +endmfpic; % (128) line 1883 in the TeX source. %------------------------------------------ @@ -5640,7 +5660,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.151089, 0.151089, 0, 0.475); -beginmfpic(129); % line 1880 in the TeX source. +beginmfpic(129); % line 1884 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5677,7 +5697,7 @@ store (curpath) drawn circle ((0.001089,0.4375),0.0375); -endmfpic; % (129) line 1893 in the TeX source. +endmfpic; % (129) line 1897 in the TeX source. %------------------------------------------ @@ -5686,7 +5706,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (0, 0.25, -0.1, 0.1); -beginmfpic(130); % line 1894 in the TeX source. +beginmfpic(130); % line 1898 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5703,7 +5723,7 @@ store (curpath) drawn circle ((0.2125,0),0.0375); -endmfpic; % (130) line 1903 in the TeX source. +endmfpic; % (130) line 1907 in the TeX source. %------------------------------------------ @@ -5712,7 +5732,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1, 0.1, -0.25, 0); -beginmfpic(131); % line 1904 in the TeX source. +beginmfpic(131); % line 1908 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5729,7 +5749,7 @@ store (curpath) drawn circle ((0,-0.2125),0.0375); -endmfpic; % (131) line 1913 in the TeX source. +endmfpic; % (131) line 1917 in the TeX source. %------------------------------------------ @@ -5738,7 +5758,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.25, 0, -0.1, 0.1); -beginmfpic(132); % line 1914 in the TeX source. +beginmfpic(132); % line 1918 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5755,7 +5775,7 @@ store (curpath) drawn circle ((-0.2125,0),0.0375); -endmfpic; % (132) line 1923 in the TeX source. +endmfpic; % (132) line 1927 in the TeX source. %------------------------------------------ @@ -5764,7 +5784,7 @@ unitlen := 1.0pt#; xscale := 72; yscale := 72; bounds (-0.1, 0.1, 0, 0.25); -beginmfpic(133); % line 1924 in the TeX source. +beginmfpic(133); % line 1928 in the TeX source. resizedrawpen (0.8bp); setcolor (drawcolor) black; @@ -5781,7 +5801,7 @@ store (curpath) drawn circle ((0,0.2125),0.0375); -endmfpic; % (133) line 1933 in the TeX source. +endmfpic; % (133) line 1937 in the TeX source. %------------------------------------------ diff --git a/graphics/circuit_macros/examples/mf/mftest b/graphics/circuit_macros/examples/mf/mftest index f75b74f39d..a92ea327a4 100755 --- a/graphics/circuit_macros/examples/mf/mftest +++ b/graphics/circuit_macros/examples/mf/mftest @@ -3,7 +3,7 @@ # # Usage: mftest file # -# e.g. copy ex01.m4 here and type ./mftest ex01 +# e.g. copy ex03.m4 here and type chmod +x mftest; ./mftest ex03 # Invokes m4 on file.m4, and builds the resulting picture in file.ps LIBS=mfpic.m4 @@ -17,7 +17,7 @@ echo "\documentclass{article} %{This is a test of the -m option of dpic (mfpic output).}" \ | tr '\046' '\134' > $1.tex -m4 -B16000 $LIBS $1.m4 | dpic -m >> $1.tex +m4 $LIBS $1.m4 | dpic -m >> $1.tex echo " &closegraphsfile diff --git a/graphics/circuit_macros/examples/mpost/mptest b/graphics/circuit_macros/examples/mpost/mptest index cfc94b6bc0..abc9f07562 100755 --- a/graphics/circuit_macros/examples/mpost/mptest +++ b/graphics/circuit_macros/examples/mpost/mptest @@ -3,7 +3,7 @@ # to produce an eps file # # Usage: ./mptest file -# You may have to make this file executable first. +# You may have to make this file executable first; that is: chmod +x mptest # # e.g. copy ex01.m4 here and type ./mptest ex01 # Starting with file.m4, invoke m4, dpic -s, and MetaPost to produce file.1 diff --git a/graphics/circuit_macros/examples/sfg.m4 b/graphics/circuit_macros/examples/sfg.m4 index 1d22326d45..efa50eefc5 100644 --- a/graphics/circuit_macros/examples/sfg.m4 +++ b/graphics/circuit_macros/examples/sfg.m4 @@ -8,7 +8,7 @@ sfg_init( 1.2 ) # default edge length = 1.2 [ # Graph 1 T:[ - Ft: sfgnode(,f(t),sfgbelow) + Ft: sfgnode(,f(t),sfgbelow,shaded "red") sfgline(,1/K) Y1: sfgnode(,y_1,sfgbelow rjust) sfgline(,K/M) @@ -16,12 +16,12 @@ T:[ sfgline(,s^{-1}) DY2: sfgnode(,\d`'ot{y}_2=x_2,sfgbelow ljust) dnl dot is an m4 macro sfgline(,s^{-1}) - Y2: sfgnode(,y_2=x_1,sfgbelow ljust) + Y2: sfgnode(,y_2=x_1,sfgbelow ljust,shaded "green") sf = 1 - sfgarc(from DY2 to DDY2,-B/M,below,,sf) - sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf) - sfgarc(from Y2 to Y1,1,sfgabove,,sf) + sfgarc(from DY2 to DDY2,-B/M,below,,sf,outlined "gray") + sfgarc(from Y2 to DDY2,-K/M,above,ccw,sf,outlined "gray") + sfgarc(from Y2 to Y1,1,sfgabove,,sf,outlined "gray") ] #showbox_(,"T") @@ -46,7 +46,9 @@ B: [ G3: [#sfg_init( 0.85,0.35/2 ) # change node spacing and size sfg_wid = 0.85 sfg_rad = 0.35/2 - for_(1,4,1,`N`'m4x: sfgnode(,m4x,,fill_(0.9)) + NeedDpicTools + cmyktorgb(96,0,0,0,r,g,b) + for_(1,4,1,`N`'m4x: ColoredV(circle,(r,g,b),"m4x" rad sfg_rad) sfgself(at N`'m4x,-90,P_{m4x},,cw) ifelse(m4x,4,,`sfgline(,G_{m4x},sfgbelow)') ') sfgarc(from N2 to N1,F_2,sfgabove,ccw,) @@ -93,13 +95,13 @@ G4: [sfg_init( 2.0,0.25/2 ) # change node spacing and size # https://tex.stackexchange.com/questions/637455/tikz-how-to-set-exact-position-of-node G5: [sfg_init( 1.75,0.25/2 ) # change node spacing and size - Dstar: sfgnode(,*) - D0: sfgnode(at Dstar+(2,0),\diamond_0) + Dstar: sfgnode(,*,,shaded "green") + D0: sfgnode(at Dstar+(2,0),\diamond_0,,shaded "green") sfgline(,`1-r_{x{-}1,x}-q^i_{x{-}1,x}',,->) - Ddots: sfgnode(,\cdots) + Ddots: sfgnode(,\cdots,,shaded "green") sfgline(,`1-r_{x{-}4,x}-q^i_{x{-}4,x}',,->) - D5: sfgnode(,\diamond_5) - DD: sfgnode(at D0+(0,-1.0),\dagger) + D5: sfgnode(,\diamond_5,,shaded "green") + DD: sfgnode(at D0+(0,-1.0),\dagger,,shaded "green") sfgself(at Dstar,L,,,,0.5) "$`1-i_x-q^a_x'$" wid 45bp__ at Dstar + (-0.3,0.25) sfgself(at DD,D,1\mathstrut,above_,,0.5) diff --git a/graphics/circuit_macros/examples/shadowed.m4 b/graphics/circuit_macros/examples/shadowed.m4 index f25be03732..1f26d36049 100644 --- a/graphics/circuit_macros/examples/shadowed.m4 +++ b/graphics/circuit_macros/examples/shadowed.m4 @@ -1,50 +1,60 @@ .PS # shadowed.m4 gen_init +NeedDpicTools divert(-1) divert(0)dnl Boxes: [ -shadebox(box "s{}hadebox",lthick*4/(1bp__)) - -move -#{print "B"} -B: shadowed(,, - shadowthick=lthick*4;attrib=fill_(0.95) "box") - -move -#{print "B1"} +movewid = movewid/2 B1: shadowed(,, rad=0bp__; shadowthick=lthick*4; shadowcolor="lightgray"; shadowangle=-60; \ attrib=fill_(0.85) "box") move -#{print "R"} R: shadowed(box,, rad=6bp__; shadowthick=lthick*4; \ attrib=wid boxht*2 shaded "orange" outlined "red" thick 2 \ `"\tt box\char44\char44" "\tt rad=6bp\_\_"') -] -Others:[ -#{print "C"} +move C: shadowed(circle,, shadowthick=lthick*4;shadowcolor="blue";\ attrib=outlined "green" shaded "green" diam 0.75 "circle") move -#{print "E"} E: shadowed(ellipse,, shadowthick=lthick*4; attrib=ht boxwid wid boxht shaded "yellow" \ dashed "ellipse") -move right movewid*3/2 then down moveht/2; right_ b = boxht + move to (E.e.x+b,E.s.y) F: shadowed(line,, attrib=left b then up b right b then down b right b then to Here \ shaded "orange" outlined "red" thick 3;shadowthick=4.5bp__;\ shadowangle=45) "line" at F.n+(0,-0.3) -] with .nw at Boxes.sw+(0,-moveht) +] + +Others:[ +movewid = movewid*0.4 + + cmyktorgb(96,0,0,0,r,g,b) + ColoredV(circle,(r,g,b), rad 0.4 "Hello" outlined "cyan") + +move + s = 0.5; v = 0.8 + hsvtorgb(0,s,v,r0,g0,b0) + hsvtorgb(90,s,v,r1,g1,b1) + hsvtorgb(180,s,v,r2,g2,b2) + ColoredV(box,((0,r0,g0,b0, 0.5,r1,g1,b1, 1,r2,g2,b2)), + outlined "blue" rad 0.1 ht 2*boxht "Hmm...") + +move + ColoredV(ellipse,(g,r,b),wid 0.75 ht 1 outlined "magenta" "OK") + +move + ColoredV(ellipse,,outlined "magenta" shaded "yellow" "Goodbye") +] with .nw at Boxes.sw #+(0,-moveht) .PE diff --git a/graphics/circuit_macros/examples/tubedefs.m4 b/graphics/circuit_macros/examples/tubedefs.m4 index fa79c05904..4830dc5d00 100644 --- a/graphics/circuit_macros/examples/tubedefs.m4 +++ b/graphics/circuit_macros/examples/tubedefs.m4 @@ -248,7 +248,7 @@ define(`V_6L6G',`[ ifelse(`$1',,,`pushdef(`tubediam',`$1')') popdef(`tgap') `$4' ifelse(`$1',,,`popdef(`tubediam')')] ') `5U4G rectifier(diam,R)' -define(`V_5V4G',`[ ifelse(`$1',,,`pushdef(`tubediam',`$1')') +define(`V_5U4G',`[ ifelse(`$1',,,`pushdef(`tubediam',`$1')') drawEnv(`$2') P1: line thick tubethick up tubediam/3 with .c at Env-(tubediam/6,0) P2: line thick tubethick up tubediam/3 with .c at Env+(tubediam/6,0) diff --git a/graphics/circuit_macros/examples/xfig/xfiglib.fig b/graphics/circuit_macros/examples/xfig/xfiglib.fig index e284b3c82f..91a4e52740 100644 --- a/graphics/circuit_macros/examples/xfig/xfiglib.fig +++ b/graphics/circuit_macros/examples/xfig/xfiglib.fig @@ -6,7 +6,7 @@ Letter 100.00 Single -2 -# dpic version 2023.06.01 option -x for Fig 3.2 +# dpic version 2024.01.01 option -x for Fig 3.2 1200 2 6 0 0 3975 5025 6 0 0 3975 5025 @@ -289,8 +289,10 @@ Single 6 750 1575 1500 2175 2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2 750 1875 825 1875 -2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 5 - 1425 1875 825 1575 825 2175 1425 1875 1500 1875 +2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 4 + 1425 1875 825 1575 825 2175 1425 1875 +2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2 + 1425 1875 1500 1875 -6 6 1650 1575 2250 2025 2 1 0 1 0 -1 0 -1 -1 0 0 0 0 0 0 2 |