.PS
# `ThyristorMan.m4'
cct_init
s_init(Thyristor)
sinclude(tst.dim)
sinclude(examples.dim)

  vL = 0.35; vS = 0.22; vv = vS
define(`labels',`{ ifelse(`$8',,,vv = vS)
   ifelse(`$1',,,s_box(\sl `$1') `$2' at last[].`$1')
   ifelse(`$3',,,s_box(\sl `$3') `$4' at last[].`$3')
   ifelse(`$5',,,s_box(\sl `$5') `$6' at last[].`$5')
   ifelse(`$7',,,s_box(\tt `$7') \
     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)')
  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)
    {s_box(\sl Ga) rjust above at last[].Ga}
  ]

Row2: [
  thyristor(,DIAC) ; labels(A,above,K,below,G,below ljust,`(,DIAC)')
 DIAC2: thyristor(,DIAC2) Placed; labels(A,above,K,below,,ljust,`(,DIAC2)')
 {arrow <- thick 0.4 from DIAC2.G right_ dimen_/6 up_ dimen_/4; "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)')
   {"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)')
   {"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)
 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) ; s_box(`\tt s{}cr(,K{,}Q)') ljust }
  { s_box(\sl Q.G) at Q.G above }

  move down 0.4; right_
  { Q2: scs(,,Q2) ; s_box(`\tt s{}cs(,{,}Q2)') ljust }
  { s_box(\sl Q2.G) at Q2.G above }
  { s_box(\sl Q2.Ga) at Q2.Ga below }
  ]

 [ {Q3s: sus(,RE,Q3) ; s_box(`\tt s{}us(,RE,Q3)') ljust}
  { s_box(\sl Q3.G) at Q3.G above }

  move down 0.4; right_
  { sbs(,E,Q4) ; s_box(`\tt s{}bs(,E,Q4)') ljust}
  { s_box(\sl Q4.G) at Q4.G below }
  ] with .Q3s.start at T4.Qs.end+(1.0,0)

 [ { gto(,E,Q5) ; s_box(`\tt g{}to(,E,Q5)') ljust}
  { s_box(\sl Q5.G) at Q5.G above ljust }

  move down 0.4; right_
  { gts(,RE,Q6) ; s_box(`\tt g{}ts(,RE,Q6)') ljust}
  { s_box(\sl Q6.G) at Q6.G below ljust}
  ] with .nw at last [].ne+(0.2,0)
 ] with .nw at last [].sw + (0,-0.10)

.PE
