From a5ae129f3aa3a3a0aeaa21c55b75a1d543fe4111 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 4 Jun 2021 03:02:48 +0000 Subject: CTAN sync 202106040302 --- graphics/circuit_macros/doc/defines.tex | 762 +++++++++++++++++--------------- 1 file changed, 412 insertions(+), 350 deletions(-) (limited to 'graphics/circuit_macros/doc/defines.tex') diff --git a/graphics/circuit_macros/doc/defines.tex b/graphics/circuit_macros/doc/defines.tex index fdc1f85c35..da19a5fcf0 100644 --- a/graphics/circuit_macros/doc/defines.tex +++ b/graphics/circuit_macros/doc/defines.tex @@ -38,7 +38,7 @@ \noindent \LR{A} \LR{B} \LR{C} \LR{D} \LR{E} \LR{F} \LR{G} \LR{H} \LR{I} \LR{J} \LR{K} \LR{L} \LR{M} \LR{N} \LR{O} \LR{P} -\LR{R} \LR{S} \LR{T} \LR{U} \LR{V} \LR{W} \LR{X} +\LR{R} \LR{S} \LR{T} \LR{U} \LR{V} \LR{W} \LR{X} \LR{Y} \\ \Letter{A}% @@ -122,11 +122,11 @@ {gen} {arc with acute angle (obtuse if radius is negative), drawn in a [ ] block} \macrodef{ArcAngle}{ArcAngle}{({\sl position, position, position, radius, - modifiers}) } + modifiers, label}) } {gen} {Arc angle symbol drawn ccw at arg2. Arg4 is the radius from arg2; - arg5 contains line attributes, e.g., {\tt thick linethick/2}} - + arg5 contains line attributes, e.g., {\tt thick linethick/2 ->}; + arg6 is an optional label at mid-arc} \macrodef{arcd}{arcd}{({\sl center}, {\sl radius},{\sl start degrees},{\sl end degrees}) } {gen} @@ -191,6 +191,9 @@ {Draw the tree for a gate as in the {\tt Autologix} macro. No inputs or external connections are drawn. The names of the internal gate inputs are stacked in {\tt `AutoInNames'}} +\macrodef{assign3}{assign3}{({\sl var name,var name,var name,arg4,arg5,arg6})} + {gen} + {Assigns \$1 = arg4 if \$1 is nonblank; similarly \$2 = arg5 and \$3 = arg6} \macrodef{Autologix}{Autologix}% {({\sl Boolean function sequence},% [N[oconnect]][L[eftinputs]][R][V][M][;offset={\sl value}]} @@ -321,22 +324,27 @@ {buzzer, {\sl In1} to {\sl In3} defined, C=curved \seesect{Composite:}} \Letter{C}% -\macrodef{c\_fet}{c_fet}{(\linespec,L|R,P)} +\macrodef{c\_fet}{c_fet}{(\linespec,R,P)} {cct} {left or right, plain or negated pin simplified MOSFET} -\macrodef{capacitor}{capacitor}{(\linespec,{\sl char}[+[L]],R, +\macrodef{capacitor}{capacitor}{(\linespec,{\sl chars},R, {\sl height}, {\sl wid})} {cct} - {capacitor, {\sl char}: F or none=flat plate, C=curved-plate, - E=polarized boxed plates, - K=filled boxed plates, - M=unfilled boxes, - M=one rectangular plate, - P=alternate polarized; + adds a polarity sign; + {capacitor, {\sl chars}: + F or blank=flat plate; + dF flat plate with hatched fill; + C=curved-plate; + dC=curved-plate with variability arrowhead; + E=polarized boxed plates; + K=filled boxed plates; + M=unfilled boxes; + M=one rectangular plate; + P=alternate polarized; + + adds a polarity sign; +L polarity sign to the left of drawing direction; - arg3: R=reversed polarity, + arg3: R=reversed polarity; arg4 = height (defaults F: {\tt dimen\_}$/3$, - C,P: {\tt dimen\_}$/4$, E,K: {\tt dimen\_}$/5$) + C,P: {\tt dimen\_}$/4$, E,K: {\tt dimen\_}$/5$); arg5 = wid (defaults F: {\sl height}*0.3, C,P: {\sl height}*0.4, E,K: {\sl height}) \seesect{Twoterminal:}} \macrodef{cbreaker}{cbreaker}{(\linespec,L|R,D|Th|TS)} @@ -358,9 +366,17 @@ {gen} {Upper (lower if arg5={\tt R}) intersection of circles at {\sl Pos1} and {\sl Pos2}, radius {\sl rad1} and {\sl rad2}} -\macrodef{clabel}{clabel}{({\sl label},{\sl label},{\sl label})} - {cct} - {centre triple label \seesect{Labels:}} +\macrodef{clabel}{clabel}{({\sl label},{\sl label},{\sl label},{\sl arg4},% + {\sl arg5})} + {cct} + {Triple label along the drawing axis of an element in the current + direction \seesect{Labels:}. Labels are placed at the beginning, + centre, or end of the last {\tt []} block (or a named {\tt []} + block). The labels are treated as math, but copied literally if + in double quotes or defined by sprintf. {\sl Arg4} can be {\tt + above,} {\tt below,} {\tt left,} or {\tt right} to supplement the + default position. {\sl Arg5} is the optional name of a {\tt []} + block to be labelled and is {\tt last []} by default} \macrodef{cm\_\_}{cm__}{} {gen} {absolute centiimetres} @@ -433,10 +449,9 @@ {cct} {controlled-source width} \Letter{D}% -\macrodef{d\_fet}{d_fet}{(\linespec,L|R,P,S,E|S)} +\macrodef{d\_fet}{d_fet}{(\linespec,R,P,E|S)} {cct} - {left or right, N or P depletion MOSFET, normal or simplified, - without or with envelope or thick channel + {left or right, N or P depletion MOSFET, envelope or simplified \seesect{Semiconductors:}} \macrodef{dabove}{dabove}{(at {\sl location})} {darrow} @@ -536,6 +551,11 @@ \macrodef{deleminit\_}{deleminit_}{} {darrow} {sets drawing direction for dlines} +\macrodef{Deltasymbol}{Deltasymbol}{(at {\sl position},keys, + U|D|L|R|{\sl degrees}) (default {\tt U} for up)} + {cct} + {Delta symbol for power-system diagrams. + {\sl keys:} {\tt size={\sl expression}}} \macrodef{Demux}{Demux}{({\sl n},{\sl label}, {\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE], {\sl wid},{\sl ht}})} @@ -591,6 +611,18 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% {\tt Z}=zener; appending {\tt K} to arg 2 draws open arrowheads; arg 3: {\tt R}=reversed polarity, {\tt E}=enclosure \seesect{Twoterminal:}} +%\macrodef{DIP}{DIP}{({\sl pin count, attributes})}% +% {log} +% {Dual in-line package diagram. Default pin count = 8. +% Arg2 ({\sl attributes})= semicolon-separated list of optional terms: +% {\tt bodywid=}{\sl expr} (default 0.25$\,$in${}={}$5{\tt *L\_unit}), +% {\tt bodylen=}{\sl expr} (default {\sl pin count} $\times$ {\sl pin pitch}), +% {\tt pinpitch=}{\sl expr} (default 0.1), +% {\tt pinwid=}{\sl expr} (default 0.06), +% {\tt pinlen=}{\sl expr} (default 0.05), +% {\tt direct=U|D|L|R} (default {\tt U} for up), +% {\tt type=I|Q} (default {\tt I}; Q=pins of alternating length) +% \seesect{Logicgates:}} \macrodef{dir\_}{dir_}{} {darrow} {used for temporary storage of direction by darrow macros} @@ -714,10 +746,10 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% \macrodef{e\_}{e_}{} {gen} {.e relative to current direction} -\macrodef{e\_fet}{e_fet}{(\linespec,L|R,P,S,E|S)} +\macrodef{e\_fet}{e_fet}{(\linespec,R,P,E|S)} {cct} {left or right, N or P enhancement MOSFET, normal - or simplified, without or with envelope or thick channel + or simplified, without or with envelope \seesect{Semiconductors:}} \macrodef{earphone}{earphone}{( U|D|L|R|{\sl degrees, size})} {cct} @@ -766,6 +798,11 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% {3D} {vector projected on current view plane with top face of 3-dimensonal arrowhead normal to x2,y2,z2 } +\macrodef{Fe\_fet}{Fe_fet}{(\linespec,R,{\sl chars})} + {cct} + {FET with superimposed ferroelectric symbol. Args 1 to 3 are as for + the {\tt mosfet} macro + \seesect{Semiconductors:}} \macrodef{FF\_ht}{FF_ht}{} {cct} {flipflop height parameter in {\tt L\_unit}s} @@ -841,6 +878,10 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% \macrodef{G\_hht}{G_hht}{} {log} {gate half-height in {\tt L\_unit}s} +\macrodef{g\_fet}{g_fet}{(\linespec,R,P,{\sl shade spec})} + {cct} + {left or right, N or P graphene FET, without or with shading + \seesect{Semiconductors:}} \macrodef{gap}{gap}{(\linespec,{\sl fill},A)} {cct} {gap with (filled) dots, A=chopped arrow between dots\seesect{Twoterminal:}} @@ -972,11 +1013,14 @@ n|e|s|w,{\sl length})} \macrodef{in\_\_}{in__}{} {gen} {absolute inches} -\macrodef{inductor}{inductor}{(\linespec,W|L,{\sl n},[M|P],{\sl loop wid})} +\macrodef{inductor}{inductor}{(\linespec, W|L, {\sl cycles}, M[n]|P[n]|K[n], + {\sl loop wid})} {cct} {inductor, arg2: narrow (default), W=wide, L=looped; - arg3: {\sl n} arcs (default 4); - arg4: M=magnetic core, P=powder (dashed) core, + arg3: number of arcs or cycles (default 4); + arg4: M=magnetic core, P=powder (dashed) core, K=long-dashed core, + n={\sl integer} (default 2) number of core lines named + {\sl M4Core1, M4Core2,} $\ldots$; arg5: loop width (default L,W: {\tt dimen\_}/5; other: {\tt dimen\_}/8) \seesect{Twoterminal:}} \macrodef{inner\_prod}{inner_prod}{({\sl linear obj},{\sl linear obj})} @@ -1092,9 +1136,17 @@ n|e|s|w,{\sl length})} \macrodef{ljust\_}{ljust_}{} {gen} {ljust with respect to current direction} -\macrodef{llabel}{llabel}{({\sl label},{\sl label},{\sl label})} - {cct} - {triple label on left side of the element \seesect{Labels:}} +\macrodef{llabel}{llabel}{({\sl label},{\sl label},{\sl label},{\sl arg4},% + {\sl arg5})} + {cct} + {Triple label on the left of an element with respect to the current + direction \seesect{Labels:}. Labels are placed at the beginning, + centre, or end of the last {\tt []} block (or a named {\tt []} + block). The labels are treated as math, but copied literally if + in double quotes or defined by sprintf. {\sl Arg4} can be {\tt + above,} {\tt below,} {\tt left,} or {\tt right} to supplement the + default position. {\sl Arg5} is the optional name of a {\tt []} + block to be labelled and is {\tt last []} by default} \macrodef{loc\_}{loc_}{({\sl x}, {\sl y})} {gen} {location adjusted for current direction} @@ -1108,24 +1160,26 @@ n|e|s|w,{\sl length})} \macrodef{loge}{loge}{} {gen} {logarithm, base $e$} -\macrodef{Loopover\_}{Loopover_}{(`{\sl variable}',{\sl actions},{\sl value1, +\macrodef{Loopover\_}{Loopover_}{(`{\sl variable}',{\sl actions},{\sl +value1, value2, $\ldots$})} {gen} {Repeat {\sl actions} with {\sl variable} set successively to - {\sl value1, value2, $\ldots$}, setting macro {\tt m4Lx} to 1, 2, $\ldots$, - terminating if {\sl variable} is nul} + {\sl value1, value2, $\ldots$}, setting macro {\tt m4Lx} to 1, 2, + $\ldots$, terminating if {\sl variable} is nul} \macrodef{lp\_xy}{lp_xy}{} {log} {coordinates used by {\tt lg\_pin}} -\macrodef{lpop}{lpop}{({\sl xcoord}, {\sl ycoord}, {\sl radius}, {\sl fill}, - {\sl zero ht})} - {gen} - {for lollipop graphs: filled circle with stem to (xcoord,zeroht)} +\macrodef{lpop}{lpop}{({\sl xcoord}, {\sl ycoord}, {\sl radius}, +{\sl fill}, + {\sl zero ht})} {gen} + {for lollipop graphs: filled circle with stem to + (xcoord,zeroht)} \macrodef{lswitch}{lswitch}{( \linespec, L|R, {\sl chars} )} {cct} {knife switch R=right orientation (default L=left); - {\sl chars}=[O{\tt|}C][D][K][A] O=opening arrow; C=closing arrow; D=dots; - K=closed switch; A=blade arrowhead \seesect{Twoterminal:}} + {\sl chars}=[O{\tt|}C][D][K][A] O=opening arrow; C=closing arrow; + D=dots; K=closed switch; A=blade arrowhead \seesect{Twoterminal:}} \macrodef{lt\_}{lt_}{} {gen} {left with respect to current direction} @@ -1141,7 +1195,8 @@ n|e|s|w,{\sl length})} {arrow with adjustable head, filled when possible} \macrodef{m4dupstr}{m4dupstr}{({\sl string},{\sl n},`{\sl name}')} {gen} - {Defines {\sl name} as {\sl n} concatenated copies of {\sl string}.} + {Defines {\sl name} as {\sl n} concatenated copies of {\sl + string}.} \macrodef{m4lstring}{m4lstring}{({\sl arg1},{\sl arg2})} {gen} {expand {\sl arg1} if it begins @@ -1163,9 +1218,9 @@ n|e|s|w,{\sl length})} {memristor element\seesect{Twoterminal:}} \macrodef{microphone}{microphone}{( A|U|D|L|R|{\sl degrees, size})} {cct} - {microphone; if arg1 = A: upright mic, otherwise arg1 sets direction - of standard microphone with - {\sl In1} to {\sl In3} defined + {microphone; if arg1 = A: upright mic, otherwise arg1 sets + direction + of standard microphone with {\sl In1} to {\sl In3} defined \seesect{Composite:}} \macrodef{Min}{Min}{({\sl arg, arg, $\ldots$})} {gen} @@ -1181,33 +1236,28 @@ n|e|s|w,{\sl length})} ({\sl Position1,Position2,Position3,length,line attributes})} {gen} {e.g., {\tt mitre\_(A,B,C)} draws angle ABC with legs - of length arg4 (default {\tt linethick bp\_\_/2}); - sets {\tt Here} to Position2 + of length arg4 (default {\tt linethick bp\_\_/2}); sets {\tt Here} + to Position2 \seesect{Corners:}} \macrodef{mm\_\_}{mm__}{} {gen} {absolute millimetres} \macrodef{mosfet}{mosfet}{(\linespec,L|R,{\sl chars},E)} {cct} - {MOSFET left or right, included components defined by characters, envelope. + {MOSFET left or right, included components defined by characters, + envelope. arg 3 chars: - {\tt [u][d]B:} center bulk connection pin; - {\tt D:} D pin and lead; - {\tt E:} dashed substrate; - {\tt F:} solid-line substrate; - {\tt [u][d]G:} G pin to substrate at source; - {\tt [u][d]H:} G pin to substrate at center; - {\tt L:} G pin to channel (obsolete); - {\tt [u][d]M:} G pin to channel; u: at drain end; d: at source end - {\tt [u][d]M{\sl n}:} multiple gates G0 to G{\sl n} - {\tt Py:} parallel diode; - {\tt Pz:} parallel zener diode; - {\tt Q:} connect B pin to S pin; - {\tt R:} thick channel; - {\tt [u][d]S:} S pin and lead u: arrow up; d: arrow down; - {\tt [d]T:} G pin to center of channel d: not circle; - {\tt X:} XMOSFET terminal; - {\tt Z:} simplified complementary MOS + {\tt [u][d]B:} center bulk connection pin; {\tt D:} D pin and lead; + {\tt E:} dashed substrate; {\tt F:} solid-line substrate; {\tt + [u][d]G:} G pin to substrate at source; {\tt [u][d]H:} G pin to + substrate at center; {\tt L:} G pin to channel (obsolete); {\tt + [u][d]M:} G pin to channel; u: at drain end; d: at source end {\tt + [u][d]M{\sl n}:} multiple gates G0 to G{\sl n} {\tt Py:} parallel + diode; {\tt Pz:} parallel zener diode; {\tt Q:} connect B pin to + S pin; {\tt R:} thick channel; {\tt [u][d]S:} S pin and lead u: + arrow up; d: arrow down; {\tt [d]T:} G pin to center of channel + d: not circle; {\tt X:} XMOSFET terminal; {\tt Z:} simplified + complementary MOS \seesect{Semiconductors:}} \macrodef{Mux\_ht}{Mux_ht}{} {cct} @@ -1216,19 +1266,15 @@ n|e|s|w,{\sl length})} {cct} {Mux width parameter in {\tt L\_unit}s} \macrodef{Mux}{Mux}{({\sl n},{\sl label}, - {\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE], - {\sl wid},{\sl ht}})} + {\tt [L][B|H|X][N[{\sl n}]|S[{\sl n}]][[N]OE], {\sl wid},{\sl ht}})} {log} {binary multiplexer, $n$ inputs, - {\tt L} reverses input pin numbers, - {\tt B} display binary pin numbers, - {\tt H} display hexadecimal pin numbers, - {\tt X} do not print pin numbers, - {\tt N[{\sl n}]} puts Sel or Sel$0$ .. Sel$n$ at the top - (i.e., to the left of the drawing direction), - {\tt S[{\sl n}]} puts the Sel inputs at the bottom (default) - {\tt OE} ({\tt N=}negated) {\tt OE} pin - \seesect{Logicgates:}} + {\tt L} reverses input pin numbers, {\tt B} display binary pin + numbers, {\tt H} display hexadecimal pin numbers, {\tt X} do not + print pin numbers, {\tt N[{\sl n}]} puts Sel or Sel$0$ .. Sel$n$ + at the top (i.e., to the left of the drawing direction), {\tt + S[{\sl n}]} puts the Sel inputs at the bottom (default) {\tt OE} + ({\tt N=}negated) {\tt OE} pin \seesect{Logicgates:}} \macrodef{Mx\_pins}{Mx_pins}{} {log} {max number of gate inputs without wings} @@ -1245,23 +1291,24 @@ n|e|s|w,{\sl length})} \macrodef{NAND\_gate}{NAND_gate}{({\sl n},N)} {log} {`nand' gate, 2 or {\sl n\/} inputs; N=negated input. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs. + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define + normal or negated inputs. \seesect{Logicgates:}} \macrodef{ne\_}{ne_}{} {gen} {.ne with respect to current direction} \macrodef{NeedDpicTools}{NeedDpicTools}{} {gen} - {executes {\tt copy "HOMELIB\_/dpictools.pic"} if the file has not been read} + {executes {\tt copy "HOMELIB\_/dpictools.pic"} if the file has + not been read} \macrodef{neg\_}{neg_}{} {gen} {unary negation} \macrodef{NOR\_gate}{NOR_gate}{({\sl n},N)} {log} {`nor' gate, 2 or {\sl n\/} inputs; N=negated input. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs. + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define + normal or negated inputs. \seesect{Logicgates:}} \macrodef{norator}{norator}{(\linespec,{\sl width},{\sl ht})} {cct} @@ -1269,13 +1316,14 @@ n|e|s|w,{\sl length})} \macrodef{NOT\_circle}{NOT_circle}{} {log} {`not' circle} -\macrodef{NOT\_gate}{NOT_gate}{(\linespec,[B][N|n],{\sl wid},{\sl height})} +\macrodef{NOT\_gate}{NOT_gate}{(\linespec,[B][N|n],{\sl wid},{\sl +height})} {log} {`not' gate. When {\sl linespec} is blank then the element is composite and In1, - Out, C, NE, and SE are defined; otherwise the element is drawn as - a two-terminal element. arg2: {\tt B}=box gate, {\tt N}=not circle at input - and output, {\tt n}=not circle at input only + Out, C, NE, and SE are defined; otherwise the element is drawn as a + two-terminal element. arg2: {\tt B}=box gate, {\tt N}=not circle at + input and output, {\tt n}=not circle at input only \seesect{Logicgates:}} \macrodef{NOT\_rad}{NOT_rad}{} {log} @@ -1289,21 +1337,20 @@ n|e|s|w,{\sl length})} nw,nn,ne,ns,space ratio,pin lgth,style, other commands})} {cct} { Default is a standard-box twoport. Args 2 to 5 are - the number of ports to be drawn on w, n, e, s sides. - The port pins are named by side, number, and by a or b pin, - e.g., W1a, W1b, W2a, $\ldots$ - Arg 6 specifies the ratio of port width to interport space (default 2), - and arg 7 is the pin length. Set arg 8 to N to omit the dots on - the port pins. Arguments 1 and 9 allow customizations + the number of ports to be drawn on w, n, e, s sides. The port pins + are named by side, number, and by a or b pin, e.g., W1a, W1b, W2a, + $\ldots$ Arg 6 specifies the ratio of port width to interport space + (default 2), and arg 7 is the pin length. Set arg 8 to N to omit + the dots on the port pins. Arguments 1 and 9 allow customizations \seesect{Composite:}} \macrodef{nterm}{nterm}{({\sl box spec{\tt ;}other commands, nw,nn,ne,ns,pin lgth,style, other commands})} {cct} {n-terminal box macro (default three pins). - Args 2 to 5 are the number of pins to be drawn on W, N, E, S sides. - The pins are named by side and number, e.g. W1, W2, N1, $\ldots$ - Arg 6 is the pin length. Set arg 7 to N to omit the dots - on the pins. Arguments 1 and 8 allow customizations, e.g. + Args 2 to 5 are the number of pins to be drawn on W, N, E, S + sides. The pins are named by side and number, e.g. W1, W2, N1, + $\ldots$ Arg 6 is the pin length. Set arg 7 to N to omit the + dots on the pins. Arguments 1 and 8 allow customizations, e.g. {\tt nterm(,{,},{,},{,}N,"\$a\$" at Box.w ljust,"\$b\$" at Box.e rjust, "\$c\$" at Box.s above)} } \macrodef{nullator}{nullator}{(\linespec,{\sl width},{\sl ht})} @@ -1315,18 +1362,20 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{NXOR\_gate}{NXOR_gate}{({\sl n},N)} {log} {`nxor' gate, 2 or {\sl n\/} inputs; N=negated input. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs. + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define + normal or negated inputs. \seesect{Logicgates:}} \Letter{O}% -\macrodef{opamp}{opamp}{(\linespec,{\sl label},{\sl label},{\sl size},{\sl +\macrodef{opamp}{opamp}{(\linespec,{\sl label},{\sl +label},{\sl size},{\sl chars}, other commands)} {cct} {operational amplifier with $-,$ $+$ or other internal labels, - specified size. {\sl chars:} {\tt P=} add power connections, - {\tt R=} swap In1, In2 labels, - {\tt T=} truncated point. - The first and last arguments allow added customizations + specified size. {\sl chars:} {\tt P=} add power connections, {\tt + R=} swap In1, In2 labels, {\tt T=} truncated point. The internally + defined positions are {\sl W, N, E, S, Out, NE, SE, In, In2}, and + the (obsolete) positions {\sl E1 = NE, E2 = SE}. The first and last + arguments allow added customizations \seesect{Composite:}} \macrodef{open\_arrow}{open_arrow}{(\linespec,{\sl ht},{\sl wid})} {gen} @@ -1334,40 +1383,39 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{OR\_gate}{OR_gate}{({\sl n},N)} {log} {`or' gate, 2 or {\sl n\/} inputs; N=negated input. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs. + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define + normal or negated inputs. \seesect{Logicgates:}} \macrodef{OR\_gen}{OR_gen}{($n$,{\sl chars},[{\sl wid},[{\sl ht}]])} {log} {general OR gate: $n$=number of inputs $(0\leq n\leq 16)$; {\sl chars:} B=base and straight sides; A=Arcs; - [N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles; - [N]P=XOR arc; [N]O=output; C=center. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs.} + [N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles; [N]P=XOR arc; + [N]O=output; C=center. + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define + normal or negated inputs.} \macrodef{OR\_rad}{OR_rad}{} {log} {radius of OR input face in {\tt L\_unit}s} \Letter{P}% -\macrodef{parallel\_}{parallel_}{(\char96{\sl elementspec}\char39,% +\macrodef{parallel\_}{parallel_}{(\char96{\sl +elementspec}\char39,% \char96{\sl elementspec}\char39 $\ldots$)} {cct} - { Parallel combination of two-terminal elements in a {\tt [ ]} block. - Each argument is a {\em quoted} elementspec of the form - {\tt[Sep={\sl val};][{\sl Label}:] {\sl element}; [{\sl attributes}]} - where an {\sl attribute} is of the form - {\tt[llabel($\ldots$);] | [rlabel($\ldots$);] | [b\_current($\ldots$);]}. - An argument may also be {\tt series\_($\ldots$)} or - {\tt parallel\_($\ldots$)} {\em without} attributes or quotes. - Sep={\sl val}; in the first branch sets the default - separation of all branches to {\sl val}; in a later - element Sep={\sl val}; applies only to that branch. - An element may have normal arguments but should - not change the drawing direction. + { Parallel combination of two-terminal elements in a {\tt [ + ]} block. + Each argument is a {\em quoted} elementspec of the form {\tt[Sep={\sl + val};][{\sl Label}:] {\sl element}; [{\sl attributes}]} where + an {\sl attribute} is of the form {\tt[llabel($\ldots$);] | + [rlabel($\ldots$);] | [b\_current($\ldots$);]}. An argument may + also be {\tt series\_($\ldots$)} or {\tt parallel\_($\ldots$)} {\em + without} attributes or quotes. Sep={\sl val}; in the first branch + sets the default separation of all branches to {\sl val}; in a later + element Sep={\sl val}; applies only to that branch. An element may + have normal arguments but should not change the drawing direction. \seesect{Seriesandparallel:}} %\macrodef{par\_}{par_}{({\sl element},{\sl element},{\sl separation})} -% {cct} -% {two same-direction, same-length elements in parallel} +% {cct} % {two same-direction, same-length elements in parallel} \macrodef{proximity}{proximity}{(\sl linespec)} {cct} {proximity detector (= {\tt consource(,P)})} @@ -1383,13 +1431,9 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{pconnex}{pconnex}{(R|L|U|D|{\sl degrees},{\sl chars})} {cct} {power connectors, arg 1: drawing direction; {\sl chars:} - {\tt R}=right orientation, - {\tt M|F}= male, female, - {\tt A|AC}=115V, 3 prong, B=box, C=circle, - {\tt P}= PC connector, - {\tt D}= 2-pin connector, - {\tt G|GC}= GB 3-pin, - {\tt J}= 110V 2-pin + {\tt R}=right orientation, {\tt M|F}= male, female, {\tt A|AC}=115V, + 3 prong, B=box, C=circle, {\tt P}= PC connector, {\tt D}= 2-pin + connector, {\tt G|GC}= GB 3-pin, {\tt J}= 110V 2-pin \seesect{Composite:}} \macrodef{pi\_}{pi_}{} {gen} @@ -1397,8 +1441,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{plug}{plug}{(U|D|L|R|{\sl degrees},[2|3][R])} {cct} {arg1: drawing direction; string arg2: {\tt R} right orientation, - {\tt 2|3} number of conductors - \seesect{Composite:}} + {\tt 2|3} number of conductors \seesect{Composite:}} \macrodef{pmod}{pmod}{({\sl integer}, {\sl integer})} {gen} {+ve $\hbox{mod}(M,N)$ e.g., $\hbox{\tt pmod}(-3,5)=2$} @@ -1407,7 +1450,8 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {(radians) set direction cosines} \macrodef{PerpTo}{PerpTo}{({\sl Pos1, Line, Point})} {gen} - {{\sl Point} is the label for the point on {\sl Line} of the perpendicular + {{\sl Point} is the label for the point on {\sl Line} of the + perpendicular from {\sl Point} to {\sl Line}.} \macrodef{Point\_}{Point_}{({\sl integer})} {gen} @@ -1417,22 +1461,21 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {rectangular-to polar conversion} \macrodef{langle}{langle}{({\sl Start, End})} {gen} - {Angle in radians from horizontal of the line from {\sl Start} to {\sl End}.} + {Angle in radians from horizontal of the line from {\sl Start} + to {\sl End}.} \macrodef{potentiometer}{potentiometer}{(\linespec,% - {\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)} - {cct} + {\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)} {cct} {resistor with taps T1, T2, $\ldots$ - with specified fractional positions and lengths (possibly neg) + with specified fractional positions and lengths (possibly neg) \seesect{Composite:}} \macrodef{print3D}{print3D}{(x,y,z)} - {3D} - {write out triple for debugging} + {3D} {write out triple for debugging} \macrodef{prod\_}{prod_}{({\sl a},{\sl b})} {gen} {binary multiplication} \macrodef{project}{project}{({\sl x},({\sl y},({\sl z})} - {3D} - {3D to 2D projection onto the plane perpendicular to the view vector with + {3D} {3D to 2D projection onto the plane perpendicular to the view + vector with angles defined by {\tt setview({\sl azim, elev})}} \macrodef{psset\_}{psset_}{({\sl PSTricks settings})} {gen} @@ -1440,6 +1483,11 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{pt\_\_}{pt__}{} {gen} {\TeX\ point-size factor, in scaled inches, ({\tt *scale/72.27})} +\macrodef{PtoL}{PtoL}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) } + {gen} + {Evaluates to {\tt from {\sl position} to + {\sl position} + Rect\_({\sl length, angle}) } + from the polar-coordinate data in the arguments } \macrodef{ptrans}{ptrans}{(\linespec, [R|L])} {cct} {pass transistor; {\tt L=} left orientation @@ -1458,40 +1506,31 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{rect\_}{rect_}{({\sl radius},{\sl angle})} {gen} {(radians) polar-rectangular conversion} -\macrodef{reed}{reed}{({\sl linespec, width, height, box attribues}, [R][C])} +\macrodef{reed}{reed}{({\sl linespec, width, height, box attribues}, +[R][C])} {cct} {Enclosed reed two-terminal contact; - {\tt R}=right orientation; {\tt C}=closed contact; - e.g., {\tt reed(,,dimen\_/5,shaded "lightgreen"} - \seesect{Composite:}} + {\tt R}=right orientation; {\tt C}=closed contact; e.g., {\tt + reed(,,dimen\_/5,shaded "lightgreen"} \seesect{Composite:}} \macrodef{relay}{relay}{({\sl number of poles, chars})} {cct} {relay: n poles (default 1), {\sl chars:} {\tt O}=normally open, - {\tt C}=normally closed, {\tt P}=three position, default double throw, - {\tt L}=drawn left (default), - {\tt R}=drawn right, {\tt Th}=thermal. - Argument 3={\tt [L|R]} is deprecated but works for + {\tt C}=normally closed, {\tt P}=three position, default double + throw, {\tt L}=drawn left (default), {\tt R}=drawn right, {\tt + Th}=thermal. Argument 3={\tt [L|R]} is deprecated but works for backward compatibility \seesect{Composite:}} -\macrodef{relaycoil}{relaycoil}{({\sl chars, wid, ht,} R|L|U|D|{\sl degrees})} - {cct} - {chars: - {\tt X}=or default: external lines from A2 and B2; - {\tt AX}=external lines at positions A1,A3; - {\tt BX}=external lines at positions B1,B3; - {\tt NX}=no lines at positions A1,A2,A3,B1,B2,B3; - {\tt SO}=slow operating; - {\tt SOR}=slow operating and release; - {\tt SR}=slow release; - {\tt HS}=hight speed; - {\tt HS}=hight speed; - {\tt NAC}=unaffected by AC current; - {\tt AC AC}=current; - {\tt ML}=mechanically latched; - {\tt PO}=polarized; - {\tt RM}=remanent; - {\tt RH}=remanent; - {\tt TH}=thermal; +\macrodef{relaycoil}{relaycoil}{({\sl chars, wid, ht,} R|L|U|D|{\sl +degrees})} + {cct} + {chars: + {\tt X}=or default: external lines from A2 and B2; {\tt AX}=external + lines at positions A1,A3; {\tt BX}=external lines at positions + B1,B3; {\tt NX}=no lines at positions A1,A2,A3,B1,B2,B3; {\tt + SO}=slow operating; {\tt SOR}=slow operating and release; {\tt + SR}=slow release; {\tt HS}=high speed; {\tt NAC}=unaffected by AC + current; {\tt AC AC}=current; {\tt ML}=mechanically latched; {\tt + PO}=polarized; {\tt RM}=remanent; {\tt RH}=remanent; {\tt TH}=thermal; {\tt EL}=electronic \seesect{Composite:}} \macrodef{resetdir\_}{resetdir_)}{} @@ -1504,14 +1543,10 @@ nw,nn,ne,ns,pin lgth,style, other commands})} cycle wid})} {cct} {resistor, n cycles (default 3), {\sl chars:} - {\tt E}={\tt ebox}, - {\tt ES}={\tt ebox} with slash, - {\tt Q}=offset, - {\tt H}=squared, - {\tt N}=IEEE, - {\tt V}=varistor variant, - {\tt R}=right-oriented, - {\sl cycle width} (default {\tt dimen\_}$/6$) \seesect{Twoterminal:}} + {\tt E}={\tt ebox}, {\tt ES}={\tt ebox} with slash, {\tt Q}=offset, + {\tt H}=squared, {\tt N}=IEEE, {\tt B}=not burnable, {\tt V}=varistor + variant, {\tt R}=right-oriented, {\sl cycle width} (default {\tt + dimen\_}$/6$) \seesect{Twoterminal:}} \macrodef{resized}{resized}{({\sl factor},`{\sl macro name}',args)} {cct} {scale the element body size by {\sl factor}} @@ -1526,47 +1561,51 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {gen} {color drawing for PSTricks, pgf, MetaPost, SVG postprocessors; (color entries are 0 to 1 except for SVG entries which are 0 to 255), - see {\tt setrgb} \seesect{Semiconductors:}. - Exceptionally, the color of - SVG arrows other than the default black has to be defined using - the {\tt outlined }{\sl string} and {\tt shaded }{\sl string} constructs.} + see {\tt setrgb} \seesect{Semiconductors:}. Exceptionally, the color + of SVG arrows other than the default black has to be defined using the + {\tt outlined }{\sl string} and {\tt shaded }{\sl string} constructs.} \macrodef{rgbfill}{rgbfill}{({\sl color triple}, {\sl closed path})} {gen} - {fill with arbitrary color (color entries are 0 to 1 except - SVG entries which are 0 to 255); see {\tt setrgb}\seesect{Semiconductors:}} + {fill with arbitrary color (color entries are 0 to 1 except + SVG entries which are 0 to 255); see {\tt + setrgb}\seesect{Semiconductors:}} \macrodef{rgbstring}{rgbstring}{({\sl color triple or color name})} {gen} {evaluates to a string compatible with the postprocessor in use to go with {\tt colored}, {\tt shaded}, or {\tt outlined} attributes. - (PSTricks, metapost, pgf-tikz, pdf, postscript, svg). - The arguments are fractions - in the range $[0,1]$; For example, - {\tt box outlined rgbstring(0.1,0.2,0.7) shaded rgbstring(0.75,0.5,0.25)}. - For those postprocessors that allow it, - there can be one argument which is the name of a defined color} + (PSTricks, metapost, pgf-tikz, pdf, postscript, svg). The arguments + are fractions in the range $[0,1]$; For example, {\tt box outlined + rgbstring(0.1,0.2,0.7) shaded rgbstring(0.75,0.5,0.25)}. For those + postprocessors that allow it, there can be one argument which is the + name of a defined color} \macrodef{right\_}{right_}{} {gen} {set current direction right \seesect{Placing:}} \macrodef{RightAngle}{RightAngle}{({\sl Pos1, Pos2, Pos3, line len, - attributes})} - {gen} - {Draw a right-angle symbol at {\sl Pos2}, of size given by arg4. Arg5 = + attributes})} {gen} + {Draw a right-angle symbol at {\sl Pos2}, of size + given by arg4. Arg5 = line attributes, e.g., {\tt outlined "gray"}} \macrodef{rjust\_}{rjust_}{} {gen} {right justify with respect to current direction} -\macrodef{rlabel}{rlabel}{({\sl label},{\sl label},{\sl label})} - {cct} - {triple label on right side of the element \seesect{Labels:}} +\macrodef{rlabel}{rlabel}{({\sl label},{\sl label},{\sl label},{\sl arg4},% + {\sl arg5})} + {cct} + {Triple label on the right of an element with respect to the current + direction \seesect{Labels:}. Labels are placed at the beginning, + centre, or end of the last {\tt []} block (or a named {\tt []} + block). The labels are treated as math, but copied literally if + in double quotes or defined by sprintf. {\sl Arg4} can be {\tt + above,} {\tt below,} {\tt left,} or {\tt right} to supplement the + default position. {\sl Arg5} is the optional name of a {\tt []} + block to be labelled and is {\tt last []} by default} \macrodef{rot3Dx}{rot3Dx}{({\sl radians,x,y,z})} - {3D} - {rotates x,y,z about x axis} + {3D} {rotates x,y,z about x axis} \macrodef{rot3Dy}{rot3Dy}{({\sl radians,x,y,z})} - {3D} - {rotates x,y,z about y axis} + {3D} {rotates x,y,z about y axis} \macrodef{rot3Dz}{rot3Dz}{({\sl radians,x,y,z})} - {3D} - {rotates x,y,z about z axis} + {3D} {rotates x,y,z about z axis} \macrodef{Rot\_}{Rot_}{({\sl position, degrees})} {gen} {rotate position by degrees} @@ -1576,20 +1615,20 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{rotbox}{rotbox}{({\sl wid,ht,type},[r|t={\sl val}])} {gen} {box oriented in current direction in {\tt [ ]} block; - {\sl type}= e.g. {\tt dotted shaded "green".} Defined - internal locations: N, E, S, W (and NE, SE, NW, SW if arg4 is blank). - If arg4 is {\tt r=}{\sl val} then corners have radius {\sl val}. - If arg4 is {\tt t=}{\sl val} then a spline with tension {\sl val} - is used to draw a ``superellipse,'' and the bounding box is then - only approximate. } + {\sl type}= e.g. {\tt dotted shaded "green".} Defined internal + locations: N, E, S, W (and NE, SE, NW, SW if arg4 is blank). If arg4 + is {\tt r=}{\sl val} then corners have radius {\sl val}. If arg4 is + {\tt t=}{\sl val} then a spline with tension {\sl val} is used to draw + a ``superellipse,'' and the bounding box is then only approximate. } \macrodef{rotellipse}{rotellipse}{({\sl wid,ht,type})} {gen} {ellipse oriented in current direction in {\tt [ ]} block; - e.g. {\tt Point\_(45); rotellipse(,{},dotted fill\_(0.9)).} Defined internal - locations: N, S, E, W.} + e.g. {\tt Point\_(45); rotellipse(,{},dotted fill\_(0.9)).} Defined + internal locations: N, S, E, W.} \macrodef{round}{round}{(at {\sl location,line thickness,attributes})} {gen} - {filled circle for rounded corners; attributes={\tt colored "gray"} + {filled circle for rounded corners; attributes={\tt colored + "gray"} for example; leaves {\tt Here} unchanged if arg1 is blank \seesect{Corners:}} \macrodef{rpoint\_}{rpoint_}{(\linespec)} @@ -1639,7 +1678,8 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \seesect{Interaction:}} \macrodef{s\_init}{s_init}{({\sl name})} {gen} - {initialize {\tt s\_box} string label to {\sl name} which should be unique + {initialize {\tt s\_box} string label to {\sl name} which should + be unique \seesect{Interaction:}} \macrodef{s\_name}{s_name}{} {gen} @@ -1674,43 +1714,50 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{se\_}{se_}{} {gen} {.se with respect to current direction} -\macrodef{series\_}{series_}{({\sl elementspec}, {\sl elementspec}, $\ldots$)} +\macrodef{series\_}{series_}{({\sl elementspec}, {\sl elementspec}, +$\ldots$)} {cct} { Series combination in a {\tt []} block of elements - with shortened default length. An {\sl elementspec} is of the form - {\tt [{\sl Label}:] {\sl element}; [{\sl attributes}]}, - where an {\sl attribute} is of the form - {\tt [llabel($\ldots$);] | [rlabel($\ldots$);] [b\_current($\ldots$);]}. - Internal points {\tt Start}, {\tt End}, and {\tt C} are defined + with shortened default length. An {\sl elementspec} is of the + form {\tt [{\sl Label}:] {\sl element}; [{\sl attributes}]}, + where an {\sl attribute} is of the form {\tt [llabel($\ldots$);] | + [rlabel($\ldots$);] [b\_current($\ldots$);]}. Internal points {\tt + Start}, {\tt End}, and {\tt C} are defined \seesect{Seriesandparallel:} } -\macrodef{setdir\_}{setdir_}{(R|L|U|D|{\sl degrees}, {\sl default} U|D|R|L|{\sl degrees})} +\macrodef{setdir\_}{setdir_}{(R|L|U|D|{\sl degrees}, {\sl default} +U|D|R|L|{\sl degrees})} {gen} {store drawing direction and set it to - up, down, left, right, or angle in degrees (reset by {\tt resetdir\_}). - The directions may be spelled out, i.e., Right, Left, $\ldots$ + up, down, left, right, or angle in degrees (reset by {\tt + resetdir\_}). The directions may be spelled out, i.e., Right, + Left, $\ldots$ \seesect{Seriesandparallel:}} \macrodef{setrgb}{setrgb}{({\sl red value, green value, blue value},[{\sl name}])} {gen} - {define colour for lines and text, optionally named (default {\tt lcspec}); + {define colour for lines and text, optionally named (default + {\tt lcspec}); svg values are integers from 0 to 255\seesect{Semiconductors:}} \macrodef{setkey\_}{setkey_}{({\sl string, key, default,}[N])} {gen} - {Key-value definition. The string contains semicolon-separated terms + {Key-value definition. The string contains semicolon-separated + terms of the form {\sl key}{\tt =}{\sl value}. Then macro {\tt m4{\sl key}} - is defined using {\tt pushdef} to be {\tt ({\sl value})} but if arg4 is - nonbland, the parentheses are omitted.} -\macrodef{setview}{setview}{({\sl azimuth degrees},{\sl elevation degrees})} - {3D} - {set projection viewpoint} -\macrodef{sfg\_init}{sfg_init}{({\sl default line len, node rad, arrowhd len, - arrowhd wid}), (reads {\tt libcct.m4})} - {cct} - {initialization of signal flow graph macros} + is defined using {\tt pushdef} to be {\tt ({\sl value})} but if arg4 + is nonbland, the parentheses are omitted.} +\macrodef{setview}{setview}{({\sl azimuth degrees},{\sl elevation +degrees})} + {3D} {set projection viewpoint} +\macrodef{sfg\_init}{sfg_init}{({\sl default line len, node rad, +arrowhd len, + arrowhd wid}), (reads {\tt libcct.m4})} {cct} + {initialization of signal + flow graph macros} \macrodef{sfgabove}{sfgabove}{} {cct} {like above but with extra space} -\macrodef{sfgarc}{sfgarc}{(\linespec,{\sl text},{\sl text justification},cw|ccw, +\macrodef{sfgarc}{sfgarc}{(\linespec,{\sl text},{\sl text +justification},cw|ccw, {\sl height scale factor})} {cct} {directed arc drawn between nodes, with text label @@ -1718,16 +1765,17 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{sfgbelow}{sfgbelow}{} {cct} {like below but with extra space} -\macrodef{sfgline}{sfgline}{(\linespec,{\sl text},{\sl text justification})} +\macrodef{sfgline}{sfgline}{(\linespec,{\sl text},{\sl text +justification})} {cct} {directed straight line chopped by node radius, with text label} \macrodef{sfgnode}{sfgnode}{(at {\sl location},{\sl text},above|below,{\sl circle options})} {cct} - {small circle default white interior, with text label. The default label - position is inside if the diameter is bigger than {\tt textht} and - {\tt textwid}; otherwise it is {\tt sfgabove.} Options such as fill or - line thickness can be given.} + {small circle default white interior, with text label. The default + label position is inside if the diameter is bigger than {\tt textht} + and {\tt textwid}; otherwise it is {\tt sfgabove.} Options such as + fill or line thickness can be given.} \macrodef{sfgself}{sfgself}{(at {\sl location}, U|D|L|R|{\sl degrees}, {\sl text}, {\sl text justification}, cw|ccw, {\sl scale factor})} {cct} @@ -1740,19 +1788,27 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {gen} {box with edge shading} \macrodef{ShadedPolygon}{ShadedPolygon}{({\sl vertexseq, line attributes, - degrees, colorseq})} - {gen} - {Draws the polygon specified in arg1 and shades the interior according - to arg4 by drawing lines perpendicular to the angle in arg3. - The {\sl vertexseq} is a colon ({\tt:}) separated sequence of vertex - positions (or names) of the polygon in cw or ccw order. A {\sl colorseq} - is of the form 0, r0,g0,b0, {\sl frac1},r1,g1,b1, {\sl frac2},r2,g2,b2, - \ldots 1,rn,gn,bn with $0 < \hbox{\sl frac1} < \hbox{\sl frac2} \ldots 1$ -} + degrees, colorseq})} {gen} + {Draws the polygon specified in arg1 and + shades the interior according + to arg4 by drawing lines perpendicular to the angle in arg3. The {\sl + vertexseq} is a colon ({\tt:}) separated sequence of vertex positions + (or names) of the polygon in cw or ccw order. A {\sl colorseq} is of + the form 0, r0,g0,b0, {\sl frac1},r1,g1,b1, {\sl frac2},r2,g2,b2, + \ldots 1,rn,gn,bn with $0 < \hbox{\sl frac1} < \hbox{\sl frac2} + \ldots 1$ +} \macrodef{shielded}{shielded}{(`{\sl two-terminal element}', + L|U, {\sl line attributes})} {cct} + {shielding in a {\tt [ ]} box for + two-terminal element. Arg2= blank + (default) to enclose the element body; L for the left side with + respect to drawing direction, R for right. Internal points {\tt + .Start, .End,} and {\tt .C} are defined} \macrodef{SIdefaults}{SIdefaults}{} {gen} {Sets {\tt scale = 25.4} for drawing units in mm, and sets - pic parameters {\tt lineht = 12, linewid = 12, moveht = 12, movewid = 12, + pic parameters {\tt lineht = 12, linewid = 12, moveht = 12, movewid + = 12, arcrad = 6, circlerad = 6, boxht = 12, boxwid = 18, ellipseht = 12, ellipsewid = 18, dashwid = 2, arrowht = 3, arrowwid = arrowht/2,}} \macrodef{sign\_}{sign_}{({\sl number})} @@ -1767,29 +1823,30 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{sind}{sind}{({\sl arg})} {gen} {sine of an expression in degrees} -\macrodef{sinusoid}{sinusoid}{({\sl amplitude, frequency, phase, tmin, tmax, +\macrodef{sinusoid}{sinusoid}{({\sl amplitude, frequency, phase, tmin, +tmax, linetype})} {gen} - {draws a sinusoid over the interval - $(t_{\hbox{\scriptsize min}}, t_{\hbox{\scriptsize max}})$; - e.g., to draw a dashed sine curve, amplitude {\sl a}, of {\sl n} cycles - of length {\sl x} from {\sl A}, - {\tt sinusoid(a,twopi\_*n/x,-pi\_/2,0,x,dashed) with .Start at A}} + {draws a sinusoid over the interval $(t_{\hbox{\scriptsize min}}, + t_{\hbox{\scriptsize max}})$; + e.g., to draw a dashed sine curve, amplitude {\sl a}, + of {\sl n} cycles of length {\sl x} from {\sl A}, {\tt + sinusoid(a,twopi\_*n/x,-pi\_/2,0,x,dashed) with .Start at A}} \macrodef{source}{source}{(\linespec, - V|v|I|i|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, - {\sl diameter},R)} + V|v|I|i|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, {\sl + diameter},R)} {cct} {source, blank or: - V = voltage source; v = alternate voltage source; - I = current source; i = alternate current source; - AC = AC source; B = bulb; F = fluorescent; G = - generator; H = step function; L = lamp; - N = neon; P = pulse; Q = charge; R = ramp; r = right - orientation; S = sinusoid; SC = quarter arc; SE = - arc; T = triangle; U = square-wave; X = interior X; - other = custom interior label or waveform; - arg 4: R = reversed polarity; - arg 5 modifies the circle with e.g., color or fill + V = voltage source; v = alternate voltage source; I = + current source; i = alternate current source; AC = + AC source; B = bulb; F = fluorescent; G = generator; + H = step function; L = lamp; N = neon; P = pulse; + Q = charge; R = ramp; r = right orientation; S = + sinusoid; SC = quarter arc; SE = arc; T = triangle; + U = square-wave; X = interior X; other = custom + interior label or waveform; arg 4: R = reversed + polarity; arg 5 modifies the circle with e.g., + color or fill \seesect{Twoterminal:}} \macrodef{sourcerad\_}{sourcerad_}{} {cct} @@ -1802,8 +1859,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {speaker, {\sl In1} to {\sl In7} defined; {\tt H}=horn \seesect{Composite:}} \macrodef{sprod3D}{sprod3D}{(a,x,y,z)} - {3D} - {scalar product of triple x,y,z by a} + {3D} {scalar product of triple x,y,z by a} \macrodef{sqrta}{sqrta}{({\sl arg})} {gen} {square root of the absolute value of {\sl arg}; i.e., @@ -1811,32 +1867,31 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{SQUID}{SQUID}{({\sl n, diameter, initial angle}, {\tt ccw|cw})} {cct} {Superconducting quantum interface device - with {\sl }n junctions labeled {\tt J1, ... J}{\sl n} - placed around a circle with initial - angle -90 deg (by default) with respect - to the current drawing direction. The - default diameter is {\tt dimen\_} } + with {\sl }n junctions labeled {\tt J1, ... J}{\sl n} placed around + a circle with initial angle -90 deg (by default) with respect to the + current drawing direction. The default diameter is {\tt dimen\_} } \macrodef{stackargs\_}{stackargs}{(`{\sl stackname}',{\sl args})} {gen} {Stack arg 2, arg 3, ... onto the named stack up to a blank arg} \macrodef{stackcopy\_}{stackcopy_}{(`{\sl name 1}',`{\sl name 2}')} {gen} - {Copy stack 1 into stack 2, preserving the order of pushed elements} + {Copy stack 1 into stack 2, preserving the order of pushed + elements} \macrodef{stackdo\_}{stackdo}{(`{\sl stackname}',{\sl commands})} {gen} {Empty the stack to the first blank entry, performing arg 2} \macrodef{stackexec\_}{stackexec_}{(`{\sl name 1}',`{\sl name 2}',% {\sl commands})} {gen} - {Copy stack 1 into stack 2, performing arg3 for each nonblank entry} + {Copy stack 1 into stack 2, performing arg3 for each nonblank + entry} \macrodef{stackprint\_}{stackprint_}{(`{\sl stack name}')} {gen} {Print the contents of the stack to the terminal} -%\macrodef{stackpromote\_}{stackpromote_}{({\sl prefix},% +%\macrodef{stackpromote\_}{stackpromote_}{({\sl prefix},% % `{\sl stack name}',{\sl In name})} % {gen} -% {Define locations {\tt In1} or {\sl In name }{\tt 1}, $\ldots$ corresponding -% to the locations in stack {\sl stack name}, as created by the +% {Define locations {\tt In1} or {\sl In name }{\tt 1}, $\ldots$ corresponding % to the locations in stack {\sl stack name}, as created by the % {\tt AutoGate} and {\tt Autologic} macros. Each location is prefixed % by argument 1 ``.''} \macrodef{stackreverse\_}{stackreverse_}{(`{\sl stack name}')} @@ -1845,14 +1900,15 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{stacksplit\_}{stacksplit_}{(`{\sl stack name}',{\sl string},{\sl separator})} {gen} - {Stack the fields of {\sl string} left to right separated by nonblank - {\sl separator} (default .). White space preceding the fields is ignored.} + {Stack the fields of {\sl string} left to right separated + by nonblank + {\sl separator} (default .). White space preceding the fields + is ignored.} \macrodef{sum\_}{sum_}{({\sl a},{\sl b})} {gen} {binary sum} \macrodef{sum3D}{sum3D}{({\sl x1,y1,z1,x2,y2,z2})} - {3D} - {sum of two triples} + {3D} {sum of two triples} \macrodef{sus}{sus}{({\sl linespec, chars, label})} {cct} {Wrapper to place an SUS thyristor as a two-terminal element with @@ -1881,29 +1937,29 @@ nw,nn,ne,ns,pin lgth,style, other commands})} [{\sl arrowhd} | type={\sl arrowhd};name={\sl Name}], {\sl fraction, length, fraction, length,} $\cdots$)} {cct} - {Draw the two-terminal element with taps in a [ ] block (see {\tt addtaps}). - {\sl arrowhd} = blank or one of {\tt . - <- -> <->}. - Each fraction determines the position along the element body of the tap. - A negative length draws the tap to the right of the current - direction; positive length to the left. - Tap names are Tap1, Tap2, $\cdots$ by default or - Name1, Name2, $\cdots$ if specified. - Internal block names are {\tt .Start, .End,} and {.C} corresponding to the - drawn element, and the tap names - \seesect{Composite:} } + {Draw the two-terminal element with taps in a [ ] block (see + {\tt addtaps}). + {\sl arrowhd} = blank or one of {\tt . - <- -> <->}. Each fraction + determines the position along the element body of the tap. A negative + length draws the tap to the right of the current direction; positive + length to the left. Tap names are Tap1, Tap2, $\cdots$ by default + or Name1, Name2, $\cdots$ if specified. Internal block names are + {\tt .Start, .End,} and {.C} corresponding to the drawn element, + and the tap names \seesect{Composite:} } \macrodef{tbox}{tbox}{({\sl text,wid,ht},<|>|<>,{\sl type})} {cct} - {Pointed terminal box. The {\sl text} is placed at the rectangular center - in math mode unless the text begins with {\tt "} or {\tt sprintf} in which - case the arument is used literally. Arg 4 determines whether the point is - forward, backward, or both with respect to the current drawing direction. + {Pointed terminal box. The {\sl text} is placed at the rectangular + center + in math mode unless the text begins with {\tt "} or {\tt sprintf} in + which case the arument is used literally. Arg 4 determines whether + the point is forward, backward, or both with respect to the current + drawing direction. \seesect{Composite:}} \macrodef{tconn}{tconn}{({\sl linespec,}>|>>|<|<<|O[F],{\sl wid})} {cct} {Terminal connector, {\tt O}=circle; {\tt OF}=filled circle; - {\tt > or >>} output connector - (default {\tt >}) ; - {\tt < or << input connector}; arg3 is arrowhead width or circle diameter + {\tt > or >>} output connector (default {\tt >}) ; {\tt < or << + input connector}; arg3 is arrowhead width or circle diameter \seesect{Composite:}} \macrodef{tgate}{tgate}{({\sl linespec,} [B][R|L])} {cct} @@ -1911,11 +1967,11 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \seesect{Semiconductors:}} \macrodef{thermocouple}{thermocouple}{({\sl linespec, wid, ht,} L|R)} {cct} - { Thermocouple drawn to the left (by default) of the {\sl linespec} - line. If the {\sl linespec} length equals {\sl wid} - (default {\tt dimen\_/5}), then only the two branches appear. - {\tt R=} right orientation. - \seesect{Twoterminal:}} + { Thermocouple drawn to the left (by default) of the {\sl + linespec} + line. If the {\sl linespec} length equals {\sl wid} (default + {\tt dimen\_/5}), then only the two branches appear. {\tt R=} + right orientation. \seesect{Twoterminal:}} \macrodef{thicklines\_}{thicklines_}{({\sl number})} {gen} {set line thickness in points} @@ -1923,40 +1979,40 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {gen} {set line thickness in points} \macrodef{threeD\_init}{threeD_init}{} - {3D} - {initialize 3D transformations (reads {\tt lib3D.m4})} + {3D} {initialize 3D transformations (reads {\tt lib3D.m4})} \macrodef{thyristor}{thyristor}{(\linespec,% {\tt [SCR|SCS|SUS|SBS|IEC][{\sl chars}]})} {cct} {Composite thyristor element in {\tt []}block: types - SCR: silicon controlled rectifier (default), - SCS: silicon controlled switch, - SUS: silicon unilateral switch, - SBS: silicon bilateral switch, - IEC: type IEC. + SCR: silicon controlled rectifier + (default), SCS: silicon controlled + switch, SUS: silicon unilateral switch, + SBS: silicon bilateral switch, IEC: + type IEC. {\sl Chars} to modify or define the element: - K: open arrowheads, - A: arrowhead, - F: half arrowhead, - B: bidirectional diode, - E: adds envelope, - H: perpendicular gate (endpoint G), - N: anode gate (endpoint Ga), - U: centre line in diodes - V: perpendicular gate across arrowhead centre, - R=right orientation, - E=envelope + K: open arrowheads, A: arrowhead, F: + half arrowhead, B: bidirectional diode, + E: adds envelope, H: perpendicular + gate (endpoint G), N: anode gate + (endpoint Ga), U: centre line in diodes + V: perpendicular gate across arrowhead + centre, + R=right orientation, E=envelope \seesect{Semiconductors:}} \macrodef{tikznode}{tikznode}{({\sl \Tikz node name, position}) } {pgf} {insert \Tikz code to define a zero-size \Tikz node at {\sl location} - (default {\tt Here}) to assist with inclusion of \pic code output in - \Tikz diagrams. This macro must be invoked in the outermost \pic scope. - \seesect{Tikzwithpic:}} + (default {\tt Here}) to assist with inclusion of \pic code output + in \Tikz diagrams. This macro must be invoked in the outermost + \pic scope. \seesect{Tikzwithpic:}} \macrodef{tline}{tline}{(\linespec,{\sl wid},{\sl ht}) } {cct} {transmission line, manhattan direction\seesect{Twoterminal:}} +\macrodef{ToPos}{ToPos}{({\sl position}, U|D|L|R|{\sl degrees}, {\sl length}) } + {gen} + {Evaluates to {\tt from {\sl position} - Rect\_({\sl length, angle}) to + {\sl position}} from the polar-coordinate data in the arguments } \macrodef{tr\_xy\_init}{tr_xy_init}{({\sl origin, unit size, sign })} {cct} {initialize {\tt tr\_xy}} @@ -1966,26 +2022,22 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{transformer}{transformer}{(\linespec,L|R,{\sl np},% [A|P][W|L][D1|D2|D12|D21],{\sl ns})} {cct} - {2-winding transformer or choke with terminals P1, P2, TP, S1, S2, TS: - arg2: L = left, R = right, - arg3: np primary arcs, - arg5: ns secondary arcs, - arg4: A = air core, P = powder (dashed) core, - W = wide windings, L = looped windings, - D1: phase dots at P1 and S1 end; D2 at P2 and S2 end; D12 at P1 and S2 end; - D21 at P2 and S1 end + {2-winding transformer or choke with terminals P1, P2, TP, S1, + S2, TS: + arg2: L = left, R = right, arg3: np primary arcs, arg5: ns secondary + arcs, arg4: A = air core, P = powder (dashed) core, W = wide windings, + L = looped windings, D1: phase dots at P1 and S1 end; D2 at P2 and + S2 end; D12 at P1 and S2 end; D21 at P2 and S1 end \seesect{Composite:}} \macrodef{tstrip}{tstrip}{(R|L|U|D|{\sl degrees, nterms, chars})} {cct} {terminal strip, chars: - I=invisible terminals, - C=circle terminals (default), - D=dot terminals, - O=omitted separator lines, - {\tt wid=}value{\tt ;} total strip width, + I=invisible terminals, C=circle terminals (default), D=dot terminals, + O=omitted separator lines, {\tt wid=}value{\tt ;} total strip width, {\tt ht=}value{\tt ;} strip height \seesect{Composite:}} -\macrodef{ttmotor}{ttmotor}{({\sl linespec, string, diameter, brushwid, brushht})} +\macrodef{ttmotor}{ttmotor}{({\sl linespec, string, diameter, brushwid, +brushht})} {cct} {motor with label\seesect{Twoterminal:}} \macrodef{twopi\_}{twopi_}{} @@ -1997,8 +2049,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {unijunction transistor, right, P-channel, envelope \seesect{Semiconductors:}} \macrodef{unit3D}{unit3D}{(x,y,z)} - {3D} - {unit triple in the direction of triple x,y,z} + {3D} {unit triple in the direction of triple x,y,z} \macrodef{up\_\_}{up__}{} {gen} {up with respect to current direction} @@ -2007,30 +2058,33 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {set current direction up \seesect{Placing:}} \Letter{V}% \macrodef{variable}{variable}{(`{\sl element}', - {\tt [A|P|L|[u]N|[u]NN][C|S]},{\sl angle},{\sl length})} + {\tt [A|P|L|[u]N|[u]NN][C|S]}, [+|-]{\sl angle}, + {\sl length}, at position)} {cct} {overlaid arrow or line to indicate variable 2-terminal element: - {\tt A}=arrow, {\tt P}=preset, - {\tt L}=linear, - {\tt N}= symmetric nonlinear, - {\tt C}=continuous, {\tt S}=setpwise; {\tt u} changes the - nonlinearity direction + {\tt A}=arrow, {\tt P}=preset, {\tt L}=linear, {\tt N}= symmetric + nonlinear, {\tt C}=continuous, {\tt S}=setpwise; {\tt u} changes + the nonlinearity direction. The angle is absolute but preceding + it with a sign makes the angle (often -30 or -45) relative to the + element drawing direction. If arg5 is blank the symbol is placed + over the last {\tt [ ]} block \seesect{Twoterminal:}} \macrodef{Vcoords\_}{Vcoords_}{({\sl position})} {gen} {The $x, y$ coordinate pair of the position} \macrodef{Vdiff\_}{Vdiff_}{({\sl position},{\sl position})} {gen} - {{\tt Vdiff\_(A,B)} evaluates to {\tt A-(B)} with dpic, {\tt A-(B.x,B.y)} + {{\tt Vdiff\_(A,B)} evaluates to {\tt A-(B)} with dpic, {\tt + A-(B.x,B.y)} with gpic} \macrodef{vec\_}{vec_}{({\sl x},{\sl y})} {gen} {position rotated with respect to current direction} \macrodef{View3D}{View3D}{} - {3D} - {The view vector (triple) defined by {\tt setview({\sl azim, elev})}. The - {\tt project} - macro projects onto the plane perpendicular to this vector} + {3D} {The view vector (triple) defined by {\tt setview({\sl azim, + elev})}. The + {\tt project} macro projects onto the plane perpendicular to this + vector} \macrodef{vlength}{vlength}{({\sl x},{\sl y})} {gen} {vector length $\sqrt{x^2+y^2}$} @@ -2039,7 +2093,8 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {unit-vector pair CCW-perpendicular to linear object} \macrodef{Vperp}{Vperp}{({\sl position name}, {\sl position name})} {gen} - {unit-vector pair CCW-perpendicular to line joining two named positions} + {unit-vector pair CCW-perpendicular to line joining two named + positions} \macrodef{vrot\_}{vrot_}{({\sl x},{\sl y},{\sl xcosine},{\sl ycosine})} {gen} {rotation operator} @@ -2051,7 +2106,8 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {The vector in arg 1 multiplied by the scalar in arg 2} \macrodef{Vsum\_}{Vsum_}{({\sl position},{\sl position})} {gen} - {{\tt Vsum\_(A,B)} evaluates to {\tt A+B} with dpic, {\tt A+(B.x,B.y)} + {{\tt Vsum\_(A,B)} evaluates to {\tt A+B} with dpic, {\tt + A+(B.x,B.y)} with gpic} \Letter{W}% \macrodef{w\_}{w_}{} @@ -2071,8 +2127,8 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{XOR\_gate}{XOR_gate}{({\sl n},N)} {log} {`xor' gate, 2 or {\sl n\/} inputs; N=negated input. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs. + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define + normal or negated inputs. \seesect{Logicgates:}} \macrodef{XOR\_off}{XOR_off}{} {log} @@ -2084,4 +2140,10 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{xtract}{xtract}{({\sl string, substr1, substr2, $\ldots$})} {gen} {returns substrings if present} +\Letter{Y}% +\macrodef{Ysymbol}{Ysymbol}{(at {\sl position},keys, + U|D|L|R|{\sl degrees}) (default {\tt U} for up)} + {cct} + {Y symbol for power-system diagrams + {\sl keys:} {\tt size={\sl expression}; type=G}} % \end{tabbing} -- cgit v1.2.3