Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/Switches.m4

raw
1 .PS
2 # Switches.m4
3 cct_init
4
5 define(`Below',`at last [].s+(0,-(8 ifelse(`$1',,,+10*(`$1')))bp__)')
6
7 movewid = 0.25
8
9 # Row 1
10 right_; {
11 lswitch; {"\tt ls{}witch" at last [].s Below}
12 move right_
13 lswitch(,,O); {"\tt (,{,}O)" at last [].s Below}
14 move right_
15 lswitch(,,C); {"\tt (,{,}C)" at last [].s Below}
16 move right_
17 lswitch(,,DA); {"\tt (,{,}DA)" at last [].s Below}
18 move right_
19 lswitch(,,dDO); {"\tt (,{,}dDO)" at last [].s Below}
20 move right_
21 lswitch(,,uDC); {"\tt (,{,}uDC)" at last [].s Below}
22 }
23 # Row 2
24 move down 0.4; right_; {
25 lswitch(,,K); {"\tt (,{,}K)" at last [].s Below}
26 move right_
27 lswitch(,,KD); {"\tt (,{,}KD)" at last [].s Below}
28 move right_
29 lswitch(,,KOD); {"\tt (,{,}KOD)" at last [].s Below}
30 move right_
31 lswitch(,,KCD); {"\tt (,{,}KCD)" at last [].s Below}
32 move right_
33 bswitch; {"\tt `bswitch'" at last [].s Below}
34 move right_
35 bswitch(,,C); {"\tt (,{,}C)" at last [].s Below}
36 }
37 # Row 3
38 move down 0.45; right_; {
39 D: dswitch(,,); {"\tt ds{}witch(,{},)" at last [].s Below}
40 thinlines_
41 {spline <- from last [].B.c up 0.1 then up 0.05 left 0.1; "\tt B" rjust}
42 thicklines_
43 move right_
44 dswitch(,,WdBK); {"\tt (,{,}WdBK)" at last [].s Below}
45 thinlines_
46 { spline <- from 0.5 along_(last [].B) up 0.1 then up 0.10 left 0.1
47 {"\tt B" rjust} }
48 { spline <- from last [].K right 0.1 then right 0.05 up 0.15
49 {"\tt K" above }}
50 thicklines_
51 move right_
52 dswitch(,,WBmdDK); {"\tt (,{,}WBmdDK)" at last [].s Below}
53 move right_
54 dswitch(,,WBKTr); {"\tt (,{,}WBKTr)" at last [].s Below}
55 move right_
56 dswitch(,,WdBL); {"\tt (,{,}WdBL)" at last [].s Below}
57 move right_
58 dswitch(,,WBSd); {"\tt (,{,}WBSd)" at last [].s Below}
59 }
60 # Row 4
61 move down 0.4; right_; {
62 dswitch(,,WBCb); {"\tt (,{,}WBCb)" at last [].s Below}
63 move right_
64 dswitch(,,WBcCb); {"\tt (,{,}WBcCb)" wid 50bp__ at last [].s Below}
65 move right_
66 dswitch(,,WBcDI); {"\tt (,{,}WBcDI)" at last [].s Below}
67 thinlines_
68 {arrow <- from last [].DI.start up_ 0.1 right_ 0.15; "\tt DI" ljust}
69 thicklines_
70 move right_
71 # dswitch(,,WBDI); {"\tt (,{,}WBDI)" at last [].s Below}
72 dswitch(,,WBKCo); {"\tt (,{,}WBKCo)" at last [].s Below}
73 move right_
74 dswitch(,,WBFDI); {"\tt (,{,}WBFDI)" at last [].s Below}
75 move right_
76 dswitch(,,WBFSd); {"\tt (,{,}WBFSd)" at last [].s Below}
77 }
78 # Row 5
79 move down 0.4; right_; {
80 dswitch(,,WBMMR); {"\tt (,{,}WBMMR)" at last [].s Below}
81 move right_
82 dswitch(,,WBMM); {"\tt (,{,}WBMM)" at last [].s Below}
83 move right_
84 dswitch(,,WBMR); {"\tt (,{,}WBMR)" at last [].s Below}
85 move right_
86 dswitch(,,WBEL); {"\tt (,{,}WBEL)" at last [].s Below}
87 move right_
88 dswitch(,,WBLE); {"\tt (,{,}WBLE)" at last [].s Below}
89 move right_
90 dswitch(,,WBoKEL); {"\tt (,{,}WBoKEL)" at last [].s Below}
91 }
92 # Row 6
93 move down moveht+2bp__; right_; {
94 dswitch(,,WBTh); {"\tt (,{,}WBTh)" at last [].s Below}
95 move right_
96 dswitch(,,WBKC); {"\tt (,{,}WBKC)" at last [].s Below}
97 thinlines_
98 { arrow <- from last [].C.c left 0.2; "\tt C" rjust }
99 thicklines_
100 move right_
101 dswitch(,,WBM); {"\tt (,{,}WBM)" at last [].s Below}
102 move right_
103 dswitch(,,WBCO); {"\tt (,{,}WBCO)" at last [].s Below}
104 move right_
105 dswitch(,,WBMP); {"\tt (,{,}WBMP)" at last [].s Below}
106 move down_ 2bp__ then right_
107 dswitch(,,WBoKCP); {"\tt (,{,}WBoKCP)" at last [].s Below}
108 }
109 # Row 7
110 move down moveht*7/6; right_; {
111 dswitch(,,WBCY); {"\tt (,{,}WBCY)" at last [].s Below}
112 move right_
113 dswitch(,,WBCZ); {"\tt (,{,}WBCZ)" at last [].s Below}
114 move right_
115 dswitch(,,WBCE); {"\tt (,{,}WBCE)" at last [].s Below}
116 move right_
117 dswitch(,,WBRH); {"\tt (,{,}WBRH)" at last [].s Below}
118 move right_
119 dswitch(,,WBRdH); {"\tt (,{,}WBRdH)" at last [].s Below}
120 move right_
121 dswitch(,,WBRHH); {"\tt (,{,}WBRHH)" at last [].s Below}
122 }
123 # Row 8
124 move down moveht; right_; {
125 move down_ 2bp__; right_
126 dswitch(,,WBPr); {"\tt (,{,}WBPr)" at last [].s Below}
127 move right_
128 dswitch(,,WBPrT); {"\tt (,{,}WBPrT)" at last [].s Below}
129 move down_ 6bp__ then right_
130 dswitch(,,WBPrM); {"\tt (,{,}WBPrM)" at last [].s Below}
131 move right_
132 dswitch(,,WBDIGX,text=W)
133 {"\tt (,{,}WBDIGX," ljust at last line.start+(0,-15bp__) \
134 "\tt text=W)" ljust}
135 move right_
136 dswitch(,,WBDIGC,circle="M")
137 {"\tt (,{,}WBDIGC," ljust at last line.start+(0,-15bp__) \
138 "\tt circle=\"M\")" ljust}
139 move right_
140 dswitch(,,WBcDIGC,circle="M")
141 {"\tt (,{,}WBcDIGC," wid 72bp__ ljust at last line.start+(0,-15bp__) \
142 "\tt circle=\"M\")" ljust}
143 }
144
145 .PE