.PS
# `ThyristorDPV.m4'
cct_init(svg_font(sans-serif,11bp__,1.5bp__))

  vL = 0.35; vS = 0.22; vv = vS
define(`labels',`{ ifelse(`$8',,,vv = vS)
   ifelse(`$1',,,"svg_it(`$1')" `$2' at last[].`$1')
   ifelse(`$3',,,"svg_it(`$3')" `$4' at last[].`$3')
   ifelse(`$5',,,"svg_it(`$5')" `$6' at last[].`$5')
   ifelse(`$7',,,"svg_tt(`$7')" `$9' \
     at (last[].s+(0,-vv`'ifelse(`$8',,,`+(`$8')'))) )}
   if vv == vS then { vv = vL } else { vv = vS } ')

define(`Placed',`with .A at last [].A+(ifelse(`$1',,0.5,`$1'),0)')

setdir_(D)
Row1: [
SCR:  thyristor(,SCR); labels(A,above,K,below,G,ljust,`(,SCR)',,wid 36bp__)
  thyristor(,SCRE) Placed; labels(A,above,K,below,G,ljust below,`(,SCRE)')
  thyristor(,SUS) Placed; labels(A,above,K,below,G,rjust,`(,SUS)')
  thyristor(,SUSK) Placed; labels(A,above,K,below,G,rjust,`(,SUSK)')
  thyristor(,SBS) Placed; labels(T1,above,T2,below,G,rjust,`(,SBS)')
  thyristor(,IEC) Placed; labels(A,above,K,below,G,ljust,`(,IEC)')
  thyristor(,GTO) Placed; labels(A,above,K,below,G,ljust,`(,GTO)')
 GTOE: thyristor(,GTOE) Placed; labels(A,above,K,below,G,ljust,`(,GTOE)')
 GTON: thyristor(,GTON) Placed; labels(A,above,K,below,Ga,rjust,`(,GTON)')
  thyristor(,GTS) Placed(0.4); labels(A,above,K,below,G,ljust,`(,GTS)')
  thyristor(,SCS) Placed(0.55)
    labels(A,above,K,below,G,ljust,`(,SCS)',0,wid 36bp__)
    {"svg_it(Ga)" rjust above at last[].Ga}
  ]

Row2: [
  thyristor(,DIAC) ; labels(A,above,K,below,G,below ljust,`(,DIAC)',,wid 40bp__)
 DIAC2: thyristor(,DIAC2) Placed; labels(A,above,K,below,,ljust,`(,DIAC2)')
 {arrow <- thick 0.4 from DIAC2.G right_ dimen_/6 up_ dimen_/4
   "svg_it(G)" above}
  down_;
 DIAC3: thyristor(,DIAC3) Placed(0.6);labels(A,above,K,below,G,below,`(,DIAC3)')
 ETO: thyristor(,ETO) Placed; labels(A,above,K,below,G,ljust,`(,ETO)')
   {"svg_it(Go)" rjust at ETO.Go}
 RCT: thyristor(,RCT) Placed; labels(A,above,K,below,G,rjust,`(,RCT)')
 RCTA: thyristor(,RCTA) Placed; labels(A,above,K,below,Ga,rjust,`(,RCTA)')
 MTO: thyristor(,MTO) Placed; labels(A,above,K,below,G,ljust,`(,MTO)')
   {"svg_it(Go)" rjust at MTO.Go}
 IGCT: thyristor(,IGCT) Placed; labels(A,above,K,below,G,ljust,`(,IGCT)')
 SIDAC: thyristor(,SIDAC) Placed ; labels(A,above,K,below,,ljust,`(,SIDAC)',0)
  thyristor(,B) Placed(0.4) ; labels(A,above,K,below,G,ljust,`(,B)',-0.16)
  thyristor(,V,G: G+(dimen_/5,dimen_/3)) Placed(0.4)
    labels(A,above,K,below,G,ljust,`(,V)',0) 
    {thinlines_
     line <- from last [].Gm.end to last [].G +(0,-4bp__)
     thicklines_}
  ] with .nw at last [].sw + (0,-0.15)

Row3: [
 Sch:thyristor(,Sch) ; labels(A,above,K,below,G,ljust,`(,Sch)',-0.16,wid 34bp__)
 Sch2:thyristor(,Sch2) Placed(0.6) ; labels(A,above,K,below,G,rjust,`(,Sch2)',0)
  thyristor(,F) Placed(0.25); labels(A,above,K,below,G,ljust,`(,F)',0)
  thyristor(,N) Placed(0.45); labels(A,above,K,below,Ga,rjust,`(,N)',0)
  thyristor(,dC) Placed(0.45); labels(A,above,K,below,G,ljust,`(,dC)',0)
  thyristor(,dD) Placed(0.45); labels(A,above,K,below,G,ljust,`(,dD)',0)
  thyristor(,rb) Placed(0.45) ; labels(A,above,K,below,G,ljust,`(,rb)',0)
  thyristor(,H) Placed(0.45) ; labels(A,above,K,below,G,ljust,`(,H)',0)
  thyristor(,P) Placed(0.45) ; labels(A,above,K,below,G,ljust,`(,P)',0)
  thyristor(,S) Placed(0.45) ; labels(A,above,K,below,G,ljust,`(,S)',0)
  thyristor(,T) Placed(0.45) ; labels(A,above,K,below,G,ljust,`(,T)',0)
  thyristor(,X) Placed(0.45) ; labels(A,above,K,below,G,ljust,`(,X)',0)
  ] with .nw at last [].sw + (0,-0.10)

setdir_(R)
Row4: [ 
 T4: [{ Qs: scr(,K,Q) ; "svg_tt(`scr'(,K,Q))" ljust }
  {"svg_it(Q.G)" at Q.G above }

  move down 0.4; right_
  { Q2: scs(,,Q2) ; "svg_tt(`scs'(,,Q2))" ljust }
  {"svg_it(Q2.G)" at Q2.G above }
  {"svg_it(Q2.Ga)" at Q2.Ga below }
  ]

 T5: [{Q3s: sus(,RE,Q3) ; "svg_tt(`sus'(,RE,Q3))" ljust}
  {"svg_it(Q3.G)" at Q3.G above }

  move down 0.4; right_
  { sbs(,E,Q4) ; "svg_tt(`sbs'(,E,Q4))" ljust}
  {"svg_it(Q4.G)" at Q4.G below }
  ] with .Q3s.start at T4.Qs.end+(1.0,0)

 T6: [{Q5s: gto(,E,Q5) ; "svg_tt(`gto'(,E,Q5))" ljust}
  {"svg_it(Q5.G)" at Q5.G above ljust }

  move down 0.4; right_
  {Q6s: gts(,RE,Q6) ; "svg_tt(`gts'(,RE,Q6))" ljust}
  {"svg_it(Q6.G)" at Q6.G below ljust}
  ] with .Q5s.start at T5.Q3s.end+(1.2,0)
 ] with .nw at last [].sw + (0,-0.10)

 command "</g>" # end font
.PE
