diff options
Diffstat (limited to 'graphics/circuit_macros/doc/defines.tex')
-rw-r--r-- | graphics/circuit_macros/doc/defines.tex | 657 |
1 files changed, 363 insertions, 294 deletions
diff --git a/graphics/circuit_macros/doc/defines.tex b/graphics/circuit_macros/doc/defines.tex index 0c9c67bfbf..6cb3a997c7 100644 --- a/graphics/circuit_macros/doc/defines.tex +++ b/graphics/circuit_macros/doc/defines.tex @@ -1,6 +1,6 @@ % -\newdimen{\leftwid}\setlength{\leftwid}{2in} -\newdimen{\libwid}\setlength{\libwid}{0.5in} +\newdimen{\leftwid}\setlength{\leftwid}{140pt} +\newdimen{\libwid}\setlength{\libwid}{35pt} \newdimen\rightwid \setlength{\rightwid}{\textwidth} \addtolength{\rightwid}{-\leftwid} @@ -11,31 +11,31 @@ %\newcommand{\macx}[2]{% % \phantomsection\pdfbookmark[subsection]{#1}{#2}#1} -\newcommand{\macrodef}[5]{%\begin{minipage}[b]{\textwidth}% -\phantomsection\pdfbookmark[subsubsection]{#1}{#2}% -\setbox\Defbox=\hbox{\tt #1#3}% +% This is alchemy but good enough for now. +\newcommand{\macrodef}[5]{\paragraph*{\hfill}\noindent% + \phantomsection\pdfbookmark[subsubsection]{#1}{#2}\hspace*{-\parindent}% + \setbox\Defbox=\hbox{\tt #1#3}% \ifdim\wd\Defbox>\textwidth% - \setbox\Defbox=\hbox{\parbox{\textwidth}{\tt #1#3}}\fi + \setbox\Defbox=\hbox{\parbox[t]{\textwidth}{\tt #1#3}}\fi% + \nopagebreak% \ifdim\wd\Defbox>\leftwid% - \box\Defbox\hfill\break\hspace*{\leftwid}% + \box\Defbox\hfill\break\hspace*{-1ex}\hbox to \leftwid{\hfill}% \else\hbox to \leftwid{\box\Defbox\hfill}\fi% - \nopagebreak - \hbox to \libwid{#4\hfill}\parbox[t]{\rightwid}% - {\raggedright #5}% - %\end{minipage}% - \vspace{\parsep}\\}% + \hbox to \libwid{#4\hfill}% + \begin{minipage}[t]{\rightwid}\raggedright#5\end{minipage}}% \newcommand{\seesect}[1]{ (\SR{#1})} \newcommand{\Letter}[1]{\noindent% \pdfbookmark[subsection]{#1}{#1}% - \hskip-2em\hbox to 2em{#1\label{#1}\hfill}\relax}% + \hskip-2em\hbox to 2em{\par#1\label{#1}}\relax}% \newcommand{\LR}[1]{\hyperref[#1]{{#1}}\hskip1em} +\newcommand{\fra}[1]{\hbox{\sl frac#1}}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\raggedbottom +%\raggedbottom \vspace{\abovedisplayskip} \noindent \LR{A} \LR{B} \LR{C} \LR{D} \LR{E} \LR{F} \LR{G} \LR{H} \LR{I} \LR{J} @@ -50,7 +50,7 @@ \macrodef{abs\_}{abs_}{({\sl number})}% {gen}% {absolute value function}% -\macrodef{ACsymbol}{ACsymbol}{(at {\sl position, len, ht,}% +\macrodef{ACsymbol}{ACsymbol}{(at {\sl position, len, ht,} % [n:][A]U|D|L|R|{\sl degrees}) }% {cct}% {draw a stack of $n$ (default 1) AC symbols @@ -58,12 +58,12 @@ are used. The current drawing direction is default, otherwise Up, Down, Left, Right, or at {\sl degrees} slant; \seesect{Twoterminal:} e.g.,\\ {\tt ebox; $\lbrace$ACsymbol(at last [],{,}dimen\_/8)$\rbrace$}}% -\macrodef{adc}{adc}{({\sl width,height,nIn,nN,nOut,nS})}% +\macrodef{adc}{adc}{({\sl width, height, nIn, nN, nOut, nS})}% {cct}% {Analog-digital converter with defined width, height, and number of inputs {\tt In$i$}, top terminals {\tt N$i$}, ouputs {\tt Out$i$}, and bottom terminals~{\tt S$i$}}% -\macrodef{addtaps}{addtaps}{[{\sl arrowhd}% +\macrodef{addtaps}{addtaps}{([{\sl arrowhd}% | type={\sl arrowhd};name={\sl Name}], {\sl fraction, length, fraction, length,} $\cdots$)}% {cct}% @@ -81,7 +81,7 @@ \macrodef{Along\_}{Along_}{({\sl LinearObj,distance,}[R])}% {gen}% {Position arg2 (default all the way) along a linear object - from {\tt .start} to {\tt .end}% + from {\tt .start} to {\tt .end} (from {\tt .end} to {\tt .start} if arg3={\tt R}) }% \macrodef{amp}{amp}{(\linespec, {\sl size}, {\sl attributes})}% {cct}% @@ -89,7 +89,7 @@ \macrodef{And, Or, Not, Nand, Nor, Xor, Nxor, Buffer}% {And, Or, Not, Nand, Nor, Xor, Nxor, Buffer}{}% {log}% - {Wrappers of {\tt AND\_gate}, $\ldots$ for use in the {\tt Autologix}% + {Wrappers of {\tt AND\_gate}, $\ldots$ for use in the {\tt Autologix} macro}% \macrodef{AND\_gate}{AND_gate}{({\tt {\sl n}, [N][B], [{\sl wid}, [{\sl ht}]], {\sl attributes}})}% @@ -106,11 +106,11 @@ {\sl attributes})}% {log}% {general AND gate: $n$=number of inputs $(0\leq n\leq 16)$; - {\sl chars:}% + {\sl chars:} B=base and straight sides; A=Arc; [N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles; [N]O=output; C=center. - Otherwise, arg1 can be a sequence of letters {\tt P|N}% + Otherwise, arg1 can be a sequence of letters {\tt P|N} to define normal or negated inputs; arg2 is as above except that {\tt [N]I} is ignored. Arg 5 contains body attributes.}% \macrodef{AND\_ht}{AND_ht}{}% @@ -170,8 +170,8 @@ the macro affect the arc only, e.g., {\tt arcr(A,r,0,pi\_/2,->) dotted ->}% \seesect{Positions:}}% -\macrodef{arcto}{arcto}{({\sl position 1},{\sl position 2},{\sl - radius},[dashed|dotted])}% +\macrodef{arcto}{arcto}{({\sl position 1}, {\sl position 2}, + {\sl radius}, [dashed|dotted])}% {gen}% {line toward position 1 with rounded corner toward position 2}% \macrodef{array}{array}{({\sl variable, expr1, expr2, \ldots})}% @@ -181,15 +181,15 @@ \macrodef{array2}{array2}{({\sl variable, expr1, expr2, \ldots})}% {dpictools}% {$\;\;$ Populate a doubly-subscripted array: - {\tt {\sl var}[{\sl expr1},1]={\sl expr2;}% + {\tt {\sl var}[{\sl expr1},1]={\sl expr2;} {\sl var}[{\sl expr1},2]={\sl expr3;} \ldots}.}% \macrodef{arraymax}{arraymax}{({\sl data array, n, index name, value})}% {dpictools}% {$\;\;$ Find the index in {\sl array[1:n]} of the first occurrence of the maximum array element value. The value is assigned if arg4 is nonblank; example: - {\tt array(x,4,9,8,6); arraymax( x,4,i )}% - assigns 2 to {\sl i,} and {\tt arraymax( x,4,i,m )}% + {\tt array(x,4,9,8,6); arraymax( x,4,i )} + assigns 2 to {\sl i,} and {\tt arraymax( x,4,i,m )} assigns 2 to {\sl i} and 9 to {\sl m.}}% \macrodef{arraymin}{arraymin}{({\sl data array, n, index name, value})}% {dpictools}% @@ -197,37 +197,36 @@ of the minimum array element value. The value is assigned if arg4 is nonblank; see {\tt arraymax}.}% \macrodef{arrester}{arrester}{(\linespec,{\sl chars}, - {\sl len}[:arrowhead ht], - {\sl ht}[:arrowhead wid], + {\sl len}[:{\sl arrowhead ht}], + {\sl ht}[:{\sl arrowhead wid}], {\sl attributes} )}% {cct}% -{ Arg2 {\sl chars:}\\ - {\tt G=} spark gap (default)\\ - {\tt g=} general (dots)\\ - {\tt E=} gas discharge\\ - {\tt S=} box enclosure\\ - {\tt C=} carbon block\\ - {\tt A=} electrolytic cell\\ - {\tt H=} horn gap\\ - {\tt P=} protective gap\\ - {\tt s=} sphere gap\\ - {\tt F=} film element\\ - {\tt M=} multigap\\ - {\sl Modifiers in arg2:}\\ - {\tt R=} right orientation\\ - {\tt L=} left orientation\\ - {\tt D=} 3-terminal element for {\tt S, E} - only, with terminals {\sl A, B, G}\\ - Arg5 applies to options C, E, S - \seesect{Twoterminal:}}% +{Arg2 {\sl chars:}\\ + {\tt G=} spark gap (default)\\ + {\tt g=} general (dots)\\ + {\tt E=} gas discharge\\ + {\tt S=} box enclosure\\ + {\tt C=} carbon block\\ + {\tt A=} electrolytic cell\\ + {\tt H=} horn gap\\ + {\tt P=} protective gap\\ + {\tt s=} sphere gap\\ + {\tt F=} film element\\ + {\tt M=} multigap\\ + {\sl Modifiers appended to arg2:}\\ + {\tt R=} right orientation\\ + {\tt L=} left orientation\\ + {\tt D=} add terminals {\sl A, B, G} for {\tt S, E} only\\ + Arg5 applies to options C, E, S + \seesect{Twoterminal:}}% \macrodef{arrowline}{arrowline}{(\linespec)}% {cct}% {line (dotted, dashed permissible) with centred arrowhead \seesect{Twoterminal:}}% -\macrodef{assign3}{assign3}{({\sl var name,var name,var name,arg4,arg5,arg6})}% +\macrodef{assign3}{assign3}{({\sl name, name, name, arg4, arg5, arg6})}% {gen}% {Assigns \$1 = arg4 if \$1 is nonblank; similarly \$2 = arg5 and \$3 = arg6}% -\macrodef{AutoGate}{AutoGate}{}% +\macrodef{AutoGate}{AutoGate}{\relax}% {log}% {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 @@ -239,17 +238,18 @@ {Draw the Boolean expressions defined in function notation. The first argument is a semicolon (;)-separated sequence of Boolean function specifications using the functions - {\tt And, Or, Not, Buffer, Xor, Nand, Nor, Nxor}% + {\tt And, Or, Not, Buffer, Xor, Nand, Nor, Nxor} with variables, e.g., - {\tt Autologix(And(Or(x1,~x2),Or(~x1,x2)));}. - Each function specification is of the form + {\tt Autologix(And(Or(x1,\~{}x2),Or(\~{}x1,x2)));}.\\ + Each function specification is of the form\\ {\tt {\sl function}({\sl arguments}) [@{\sl attributes}]}. \par Function outputs are aligned vertically but appending - {\tt@}{\sl attributes} to a function can be used to place it. + {\tt@}{\sl attributes} to a function can be used to place it; e.g., + {\tt Nand(\~{}A,B) @with .n at last [].s+(0,-2bp\_\_).} \par The function arguments are variable names or nested Boolean functions. - Each unique variable {\sl var} causes an input point {\tt In}{\sl var}% + Each unique variable {\sl var} causes an input point {\tt In}{\sl var} to be defined. Preceding the variable by a {\tt \~{}} causes a NOT gate to be drawn at the input. The inputs are drawn in a row at the upper left by default. @@ -264,15 +264,15 @@ Each variable {\sl var} corresponds also to one of the input array points with label {\tt In}{\sl var}. Setting {\tt offset=}{\sl value} displaces the - drawn input list in order to disambiguate the input connections when {\tt L}% + drawn input list in order to disambiguate the input connections when {\tt L} is used. \par In the (possibly rare) case where one or more inputs of a normal function gate is to have a NOT-circle, an additional first argument of the function - is inserted, of the form {\tt [{\sl charseq}]}, where {\sl charseq}% + is inserted, of the form {\tt [{\sl charseq}]}, where {\sl charseq} is a string containing the characters {\tt P} for a normal input or {\tt N} for a negated input, the length of the string equal to the number - of gate inputs. For example: + of gate inputs. Example: {\tt Autologix(Xor([PN],And(x,y),And(x,y)),LRV)}}% \Letter{B}% @@ -287,8 +287,8 @@ \macrodef{b\_}{b_}{}% {gen}% {blue color value}% -\macrodef{b\_current}{b_current}{({\sl label},{\sl pos},In|Out,Start|End,{\sl - frac})}% +\macrodef{b\_current}{b_current}{({\sl label}, {\sl pos}, In|Out, Start|End, + {\sl frac})}% {cct}% {labelled branch-current arrow to {\sl frac} between branch end and body \seesect{Branchcurrent:}}% @@ -343,14 +343,14 @@ {cct}% {left or right, N- or P-type bipolar transistor, without or with envelope \seesect{Semiconductors:}}% -\macrodef{boxcoord}{boxcoord}{({\sl planar obj},{\sl x fraction},{\sl y - fraction})}% +\macrodef{boxcoord}{boxcoord}{({\sl planar obj}, {\sl x fraction}, + {\sl y fraction})}% {gen}% {internal point in a planar object}% \macrodef{boxdim}{boxdim}{({\sl name},h|w|d|v,{\sl default})}% {gen}% - {evaluate, e.g.\ {\sl name}{\tt \_w} if defined, else {\sl default\/}% - if given, else 0 {\tt v} gives sum of {\tt d} and {\tt h} values + {Evaluate, e.g.\ {\sl name}{\tt \_w} if defined, else {\sl default\/} + if given, else 0. {\tt v} gives sum of {\tt d} and {\tt h} values \seesect{Interaction:}}% \macrodef{BOX\_gate}{BOX_gate}{({\sl inputs, output, swid, sht, label, attributes })}% @@ -378,12 +378,12 @@ {log}% {general buffer, {\sl chars:}\\ {\tt T}: triangle,\\ - {\tt [N]O}: output location {\tt Out}% + {\tt [N]O}: output location {\tt Out} ({\tt NO} draws circle {\tt N\_Out});\\ {\tt [N]I, [N]N, [N]S, [N]NE, [N]SE} input locations;\\ {\tt C}: centre location.\\ Args 4-6 allow alternative - definitions of respective {\tt In, NE,}% + definitions of respective {\tt In, NE,} and {\tt SE} argument sequences }% \macrodef{BUF\_ht}{BUF_ht}{}% {log}% @@ -395,6 +395,7 @@ {cct}% {buzzer, {\sl In1} to {\sl In3} defined, C=curved \seesect{Composite:}}% + \Letter{C}% \macrodef{cangle}{cangle}{({\sl Start, End},[d])}% {gen}% @@ -427,7 +428,7 @@ \seesect{Twoterminal:}}% \macrodef{case}{case}{({\sl i, alt1, alt2, \ldots})}% {dpictools}% - {$\;\;$ Case statement for dpic; execute alternative {\sl i.}% + {$\;\;$ Case statement for dpic; execute alternative {\sl i.} Example: {\tt case( 2, x=5, x=10, x=15 )} sets {\tt x} to 10. Note: this is a macro so {\tt \${}n} refers to the {\sl n}-th argument of {\tt case}.}% @@ -453,19 +454,17 @@ \macrodef{Cintersect}{Cintersect}{({\sl Pos1, Pos2, rad1, rad2,} [R])}% {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},[{\sl arg4}],% - [{\sl block name}])}% + {\sl Pos1} and {\sl Pos2}, radius {\sl rad1} and {\sl rad2}} +\macrodef{clabel}{clabel}{( {\sl label}, {\sl label}, {\sl label}, + {\sl relative position}, {\sl block name})}% {cct}% {Triple label along the drawing axis of the body of an element in the current direction \seesect{Labels:}. Labels are placed at the - beginning, centre, and end of the last {\tt []} block (or a named - {\tt []} block). Each label is treated as math by default, but is - copied literally if it is in double quotes or sprintf. - {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt - right} to supplement the default relative position. The fifth - argument is the optional name of the {\tt []} block to be labelled, - which is {\tt last []} by default.}% + beginning, centre, and end of the last {\tt []} block (or a {\tt + []} block named or enumerated in arg5). Each label is treated as + math by default, but is copied literally if it is in double quotes + or sprintf. {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} + or {\tt right} to supplement the default relative position.}% \macrodef{cm\_\_}{cm__}{}% {gen}% {absolute centimetres}% @@ -477,19 +476,29 @@ {voltage or current controlled source with alternate forms; {\tt R}: reversed polarity\seesect{Twoterminal:}}% \macrodef{ColoredV}{ColoredV}{% - (box|circle|ellipse,({\sl r,g,b})|(({\sl colorseq})),{\sl attributes})}% + (box|circle|ellipse,({\sl r,g,b})|(({\sl colorseq}))[:{\sl nlines}],% + {\sl attributes})}% {gen}% {box (default), circle, or ellipse in a {\tt []} block. - If arg2 is blank then all formatting is in arg3. If arg2 is blank + If arg2 is blank then all formatting is in arg3; if parenthesized r,g,b, the object is shaded top to bottom white to the specified rgb color; if a - double-parenthesized colorseq then the colorseq defines the internal + double-parenthesized {\sl colorseq} then the {\sl colorseq} + defines the internal shading top to bottom. 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$. + {\sl 0,r0,g0,b0,\\ + frac1,r1,g1,b1,\\ + frac2,r2,g2,b2,\\ + \ldots\\ + 1,rn,gn,bn}\\ + with $0 < \hbox{\sl frac1} < \hbox{\sl frac2} \ldots 1$. + The number of {\sl colorseq} lines can be specified with the colon + (default {\tt height/(line thickness)*2)}. Examples: {\tt ColoredV(circle,(1,0,0)); - ColoredV(ellipse,(1,0.04,1),wid 0.75 ht 1 outlined "magenta" "Goodbye"); - ColoredV(box,(1,0,0),outlined "blue" rad 0.1, (0,1,1,0, 1,0,0,1)).} }% + ColoredV(ellipse,(1,0.04,1),wid 0.75 ht 1 \textbackslash\\ + $\;$ outlined "magenta" "Goodbye"); + ColoredV(box,((0,1,1,0, 1,0,0,1)):50, \\ + $\;$ outlined "blue" rad 0.1).} }% \macrodef{contact}{contact}{({\sl chars})}% {cct}% {single-pole contact: @@ -515,14 +524,14 @@ \seesect{Composite:}}% \macrodef{contline}{contline}{({\sl line})}% {gen}% - {evaluates to {\tt continue}% + {evaluates to {\tt continue} if processor is {\bf dpic}, otherwise to first arg (default {\tt line})}% \macrodef{copy3}{copy3}{({\sl vector1,vector2})}% {dpictools}% {$\;\;$ Copy vector1 into vector named by arg2.}% \macrodef{copythru}{copythru}{({\sl dpic macro name,} "{\sl file name}")}% {dpictools}% - {$\;\;$ Implements the gpic {\tt copy {\sl filename} thru {\sl macro-name}}% + {$\;\;$ Implements the gpic {\tt copy {\sl filename} thru {\sl macro-name}} for file data separated by commas, spaces, or tabs.}% \macrodef{corner}{corner}{({\sl line thickness,attributes,turn radians})}% {gen}% @@ -559,15 +568,17 @@ {\tt size={\sl expr};}, {\tt line={\sl attributes};} }% \macrodef{crossover}{crossover}{(\linespec, [L|R][:{\sl line attributes}], - Line1, Line2, .{.}.)}% + {\sl Linename1, Linename2,} $\ldots$)}% {cct}% - {line jumping left or right over ordered named lines\seesect{Semiconductors:}}% + {line jumping left or right over ordered named + lines\seesect{Semiconductors:}}% \macrodef{crosswd\_}{crosswd_}{}% {gen}% {cross dimension}% \macrodef{csdim\_}{csdim_}{}% {cct}% {controlled-source width}% + \Letter{D}% \macrodef{dabove}{dabove}{(at {\sl location})}% {darrow}% @@ -583,12 +594,13 @@ {darrow}% {Wrapper for {\tt darc}. CCW arc in {\tt dline} style, with closed ends or (dpic only) arrowheads. - Semicolon-separated {\sl parameters}: - {\tt thick=}{\sl value}, {\tt wid=}{\sl value}, {\tt ends=}% - {\sl x}{\tt -}, + Semicolon-separated {\sl parameters}:\\ + {\tt thick=}{\sl value};\\ + {\tt wid=}{\sl value};\\ + {\tt ends=} {\sl x}{\tt -}, {\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->}, - {\tt <-}, {\tt <-}{\sl x}, {\tt <->}% - where {\sl x} means {\tt |} or (half-thickness line) {\tt !}.}% + {\tt <-}, {\tt <-}{\sl x}, {\tt <->}, + where {\sl x} is {\tt |} or (half-thickness line) {\tt !}.}% \macrodef{darc}{darc}{({\sl center position}, {\sl radius}, {\sl start radians}, {\sl end radians}, {\sl dline thickness}, {\sl arrowhead wid}, {\sl arrowhead ht}, @@ -599,8 +611,8 @@ Permissible {\sl end symbols}: {\sl x}{\tt -}, {\tt -}{\sl x}, {\sl x}{\tt -}{\sl x}, {\tt ->}, {\sl x}{\tt ->}, - {\tt <-}, {\tt <-}{\sl x}, {\tt <->}% - where {\sl x} means {\tt |} or (half-thickness line) {\tt !}. + {\tt <-}, {\tt <-}{\sl x}, {\tt <->} + where {\sl x} is {\tt |} or (half-thickness line) {\tt !}. An inner arc is drawn overlaying the outer arc. Example: {\tt darc(,{,},{,},{,},{,}outlined "red",outlined "yellow")}.}% \macrodef{Darlington}{Darlington}{(L|R,{\sl chars})}% @@ -616,14 +628,15 @@ Z= zener bias diode \seesect{Semiconductors:}}% \macrodef{darrow}{darrow}{(\linespec, - t,t,{\sl width},{\sl arrowhd wd},{\sl arrowhd ht},{\sl parameters}, + t, t, {\sl width}, {\sl arrowhd wd}, {\sl arrowhd ht}, {\sl parameters}, {\sl color attributes})}% {darrow}% {See also {\tt Darrow}. Double arrow, truncated at beginning (arg2={\tt t}) or end (arg3={\tt t}), specified sizes, with arrowhead and optional closed stem. The parameters (arg7) are - {\tt {\sl x}-} or {\tt ->} or {\tt {\sl x}->} or {\tt <-} or {\tt <-{\sl x}}% + {\tt {\sl x}-} or {\tt ->} or {\tt {\sl x}->} or {\tt <-} or + {\tt <-{\sl x}} or {\tt <->} where {\sl x} is {\tt |} or {\tt !}. The {\tt !-} or {\tt -!} parameters close the stem with half-thickness lines to simplify butting to other objects. @@ -639,7 +652,7 @@ {\tt thick=}{\sl val}; (total thicknes, ie width)\\ {\tt wid=}{\sl val}; (arrowhead width)\\ {\tt ht=}{\sl val}; (arrowhead height)\\ - {\tt ends=}% + {\tt ends=} {\sl x}{\tt -}{\sl x} or {\tt -}{\sl x} or {\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line) @@ -669,30 +682,30 @@ {A DC symbol (a dashed line below a solid line). The current drawing direction is default, otherwise Up, Down, Left, Right, or at {\sl degrees} slant; e.g., - {\tt source(up\_ dimen\_); $\lbrace$ DCsymbol(at last [],{},{},R) $\rbrace$}% + {\tt source(up\_ dimen\_); $\lbrace$ DCsymbol(at last [],{},{},R) $\rbrace$} \seesect{Twoterminal:} }% \macrodef{DefineCMYKColor}{DefineCMYKColor}{({\sl color-name, c, m, y, k})}% {dpictools}% {$\;\;$ Like {\tt DefineRGBColor} but takes arguments in percent, i.e., - the range $[0,100].$ Define dpic macro {\sl colorname}% + the range $[0,100].$ Define dpic macro {\sl colorname} according to the postprocessor specified by dpic command-line option. The macro evaluates to a string.}% \macrodef{DefineHSVColor}{DefineHSVColor}{({\sl color-name, h, s, v})}% {dpictools}% {$\;\;$ Like {\tt DefineRGBColor} but takes argument {\sl h} in the range $[0,360],$ {\sl s} in $[0,1],$ and {\sl v} in $[0,1].$ - Define dpic macro {\sl colorname}% + Define dpic macro {\sl colorname} according to the postprocessor specified by dpic command-line option. The macro evaluates to a string.}% \macrodef{DefineRGBColor}{DefineRGBColor}{({\sl color-name, r, g, b})}% {dpictools}% - {$\;\;$ Arguments are in the range 0 to 1. Define dpic macro {\sl colorname}% + {$\;\;$ Arguments are in the range 0 to 1. Define dpic macro {\sl colorname} according to the postprocessor specified by dpic command-line option. The macro evaluates to a string.}% \macrodef{definergbcolor}{definergbcolor}{({\sl color-name, r, g, b})}% {gen}% {Arguments are in the range 0 to 1. Define color name - according to the postprocessor. Similar to dpictools {\tt DefineRGBColor}% + according to the postprocessor. Similar to dpictools {\tt DefineRGBColor} but the color name is an m4 macro, not a string.}% \macrodef{delay}{delay}{(\linespec,{\sl size},{\sl attributes})}% {cct}% @@ -707,7 +720,7 @@ U|D|L|R|{\sl degrees}) (default {\tt U} for up)}% {cct}% {Delta symbol for power-system diagrams. - {\sl keys:} {\tt size={\sl expression;}}% + {\sl keys:} {\tt size={\sl expression;}} {\tt type=C|O} (default {\tt C} for closed; {\tt O} draws an ``open'' symbol); }% \macrodef{Demux}{Demux}{({\sl n},{\sl label}, @@ -727,9 +740,9 @@ \macrodef{dend}{dend}{(at {\sl location}, {\sl line thickness}{\tt |}{\sl attributes})}% {darrow}% - {Close (or start) double line (Note specifying {\tt dends=} for {\tt Dline}% - is a similar function. Arg2 is dline thickness or atributes: - {\tt thick={\sl expression};} (dline thickness in drawing units) + {Close (or start) double line (Note specifying {\tt dends=} for {\tt Dline} + is a similar function. Arg2 is dline thickness or atributes:\\ + {\tt thick={\sl expression};} (dline thickness in drawing units)\\ {\tt outline=({\sl r,g,b})|"{\sl color}";}}% \macrodef{d\_fet}{d_fet}{(\linespec,R,P,E|S)}% {cct}% @@ -744,10 +757,10 @@ $\hbox{\sl vec3} = \hbox{\sl vec1} - \hbox{\sl vec2}$.}% \macrodef{dfitcurve}{dfitcurve}{({\sl Name, n, linetype, m})}% {dpictools}% - {$\;\;$ Draw a spline through {\sl Name}{\tt [m],} \ldots {\sl Name}{\tt [n]}% + {$\;\;$ Draw a spline through {\sl Name}{\tt [m],} \ldots {\sl Name}{\tt [n]} with attribute {\sl linetype} {\tt dotted,} for example. The calculated control points {\sl P[i]} satisfy approximately: - {\sl P[0] = V[0];} {\sl P[i-1]/8 + P[i]*3/4 + P[i+1]/8 = V[i];}% + {\sl P[0] = V[0];} {\sl P[i-1]/8 + P[i]*3/4 + P[i+1]/8 = V[i];} {\sl P[n] = V[n].} See m4 macro {\tt fitcurve.}}% \macrodef{dfitpoints}{dfitpoints}{({\sl V,n,m,P,mp})}% {dpictools}% @@ -766,10 +779,9 @@ \macrodef{dimension\_}{dimension_}{(\linespec,{\sl offset},{\sl label}, D|H|W|{\sl blank width},{\sl tic offset},{\sl arrowhead })}% {gen}% - {macro for dimensioning diagrams; - {\sl arrowhead=}{\tt -> | <-}}% -\macrodef{diode}{diode}{(\linespec,% -B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% + {macro for dimensioning diagrams; {\sl arrowhead=}{\tt -> | <-}}% +\macrodef{diode}{diode}{(\linespec, +B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars, [R][E])}% {cct}% {diode: @@ -815,7 +827,7 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% \macrodef{dlabel}{dlabel}{({\sl long},{\sl lat},{\sl label},{\sl label},{\sl label},{\sl chars})}% {cct}% - {general triple label; {\sl chars:}% + {general triple label; {\sl chars:} $X$ displacement {\tt {\sl long, lat}} with respect to the drawing direction is from the centre of the last line rather than the centre of the last {\tt [ ]}; @@ -825,8 +837,8 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {\sl attributes})}% {darrow}% {Double line left turn 90 degrees. Attributes can be - {\tt outline=({\sl r, g, b})|"{\sl color}";}% - {\tt innershade=({\sl r, g, b})|"{\sl color}";}% + {\tt outline=({\sl r, g, b})|"{\sl color}";} + {\tt innershade=({\sl r, g, b})|"{\sl color}";} where rgb values in parentheses or a defined color is specified.}% \macrodef{Dline}{Dline}{(\linespec, {\sl parameters})}% {darrow}% @@ -847,7 +859,7 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {See also {\tt Dline}. Double line, truncated by half width at either end, closed at either or both ends. - {\sl parameters=}% + {\sl parameters=} {\sl x}{\tt -}{\sl x} or {\tt -}{\sl x} or {\sl x}{\tt -} where {\sl x} is {\tt !} (half-width line) @@ -900,9 +912,9 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% \macrodef{dright}{dright}{({\tt at} {\sl position}, {\sl line thickness}, {\sl attributes})}% {darrow}% - {Double line right turn 90 degrees. Attributes can be - {\tt outline=({\sl r, g, b})|"{\sl color}";}% - {\tt innershade=({\sl r, g, b})|"{\sl color}";}% + {Double line right turn 90 degrees. Attributes can be\\ + {\tt outline=({\sl r, g, b})|"{\sl color}";}\\ + {\tt innershade=({\sl r, g, b})|"{\sl color}";}\\ where rgb values in parentheses or a defined color is specified.}% \macrodef{drjust}{drjust}{(at {\sl location})}% {darrow}% @@ -944,8 +956,8 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {\tt diam={\sl expr}; circle={\sl circle attribs};}\\ {\tt GX}: box control mechanism, attribs: - {\tt lgth={\sl expr}; wdth={\sl expr}; % - box={\sl box attr};}% + {\tt lgth={\sl expr}; wdth={\sl expr}; + box={\sl box attr};} {\tt text={\sl char};}\\ {\tt H}: time delay closing\\ {\tt uH}: time delay opening\\ @@ -980,7 +992,7 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% \{ darrow(down\_,t) \}; darrow(right\_,t)}. The attributes are {\tt thick={\sl expr};} (line thickness in drawing units), - {\tt innershade=({\sl r,g,b})|"{\sl color}";}% + {\tt innershade=({\sl r,g,b})|"{\sl color}";} {\tt outline=({\sl r,g,b})|"{\sl color}";}. }% \macrodef{dtor\_}{dtor_}{}% {gen}% @@ -990,11 +1002,12 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {darrow}% {Tturn dline arg1 degrees left (ccw). Attributes can be - {\tt outline=({\sl r, g, b})|"{\sl color}";}% - {\tt innershade=({\sl r, g, b})|"{\sl color}";}% + {\tt outline=({\sl r, g, b})|"{\sl color}";} + {\tt innershade=({\sl r, g, b})|"{\sl color}";} where rgb values in parentheses or a defined color is specified.}% -% + \Letter{E}% + \macrodef{earphone}{earphone}{( U|D|L|R|{\sl degrees, size})}% {cct}% {earphone, {\sl In1} to {\sl In3} defined @@ -1064,8 +1077,9 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% \macrodef{expe}{expe}{}% {gen}% {exponential, base $e$}% -% + \Letter{F}% + \macrodef{f\_box}{f_box}{({\sl boxspecs},{\sl text},{\sl expr1},$\cdots$)}% {gen}% {like {\tt s\_box} but the text is overlaid on a box of identical size. @@ -1111,7 +1125,7 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {log}% {General flipflop. Arg 1 modifies the box (labelled Chip) default specification. - Each of args 3 to 6 is null or a string of {\sl pinspecs}% + Each of args 3 to 6 is null or a string of {\sl pinspecs} separated by semicolons ({\tt;}). A {\sl Pinspec} is either empty or of the form {\tt[}{\sl pinopts}{\tt]:[}{\sl label}{\tt[:}{\sl Picname}{\tt]]}. @@ -1119,10 +1133,10 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% Pins are placed top to bottom or left to right along the box edges with null {\sl pinspecs} counted for placement. Pins are named by side and number by default; eg {\tt W1, W2, ..., N1, N2, ..., E1, ..., S1, ...} ; however, - if {\tt:}{\sl Picname} is present in a {\sl pinspec} then {\sl Picname}% + if {\tt:}{\sl Picname} is present in a {\sl pinspec} then {\sl Picname} replaces the default name. A {\sl pinspec} label is text placed at the pin base. Semicolons are - not allowed in labels; use, e.g., {\tt \char92{}char59\char123\char125}% + not allowed in labels; use, e.g., {\tt \char92{}char59\char123\char125} instead. To put a bar over a label, use {\tt lg\_bartxt(}{\sl label}{\tt)}. The {\sl pinopts} are {\tt[N|L|M][E]}; @@ -1131,8 +1145,8 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {\tt M}: active low in; {\tt E}: edge trigger \seesect{Logicgates:}.\\ Optional arg 7 is the length of pins}% -\macrodef{foreach\_}{foreach_}{(`{\sl variable}',{\sl actions},{\sl - value1, value2, $\ldots$})}% +\macrodef{foreach\_}{foreach_}{(`{\sl variable}',{\sl actions},% + {\sl value1, value2, $\ldots$})}% {gen}% {Clone of Loopover\_ by a different name: Repeat {\sl actions} with {\sl variable} set successively to @@ -1144,7 +1158,8 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% \macrodef{FTcap}{FTcap}{({\sl chars})}% {cct}% {Feed-through capacitor; example of a composite element derived from - a two-terminal element. Defined points: {\sl .Start, .End, .C .T1 .T2 T}% + a two-terminal element. Defined points: + {\sl .Start, .End, .C, .T1, .T2, T}\\ Arg 1: {\tt A}: type A (default), {\tt B}: type B, {\tt C}: type C @@ -1153,8 +1168,9 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {cct}% {fuse symbol, type$=$ {\tt A|B|C|D|S|HB|HC|SB} or {\tt dA=D}\seesect{Twoterminal:}}% -% + \Letter{G}% + \macrodef{gap}{gap}{(\linespec,{\sl fill},A)}% {cct}% {gap with (filled) dots, A=chopped arrow between dots\seesect{Twoterminal:}}% @@ -1172,13 +1188,18 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% \macrodef{G\_hht}{G_hht}{}% {log}% {gate half-height in {\tt L\_unit}s}% -\macrodef{glabel\_}{glabel_}{}% +\macrodef{geiger}{geiger}{(\linespec, r, {\sl diameter}, R, + {\sl body attributes, body name})}% {cct}% - {internal general labeller}% + {Wrapper that calls {\tt source} with identical arguments except + arg2, which is blank or {\tt r} for right orientation.} +%\macrodef{glabel\_}{glabel_}{}% +% {cct}% +% {internal general labeller}% %\macrodef{gpar\_}{gpar_}{({\sl element},{\sl element},{\sl separation})}% % {cct}% % {two same-direction elements in parallel}% -\macrodef{gpolyline\_}{gpolyline_}{({\sl fraction},{\sl location}, ...)}% +\macrodef{gpolyline\_}{gpolyline_}{({\sl fraction}, {\sl location}, ...)}% {gen}% {internal to {\tt gshade}}% \macrodef{graystring}{graystring}{({\sl gray value})}% @@ -1209,11 +1230,12 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% vertices, attempting to avoid sharp corners}% \macrodef{gyrator}{gyrator}{({\sl box specs,space ratio,pin lgth,}[N][V])}% {cct}% - {Gyrator two-port wrapper for {\tt nport}, {\tt N} omits pin dots; {\tt V}% + {Gyrator two-port wrapper for {\tt nport}, {\tt N} omits pin dots; {\tt V} gives a vertical orientation \seesect{Composite:}}% -% + \Letter{H}% + \macrodef{hatchbox}{hatchbox}{({\sl boxspec,hashsep,hatchspec,angle}) {\rm or} hatchbox({\sl keys})}% {gen}% @@ -1227,7 +1249,7 @@ B|b|CR|D|G|L|LE[R]|P[R]|S|Sh|T|U|V|v|w|Z|chars,% {\tt fillcolor="{\sl color}"|({\sl r,g,b});}\\ {\tt hatchsep={\sl expr};}\\ {\tt hatchspec={\sl attributes};}\\ - {\tt angle={\sl expr};}% + {\tt angle={\sl expr};} e.g., {\tt hatchbox(outlined "blue",{},dashed outlined "green" thick 0.4)};\\ also @@ -1251,26 +1273,26 @@ n|e|s|w,{\sl length})}% {Heater element with curved sides\seesect{Twoterminal:}. {\tt R} means right orientation; {\tt T} truncates leads to the width of the body. - The {\sl keys} for the body are - {\tt lgth={\sl expr};}% + The {\sl keys} for the body are\\ + {\tt lgth={\sl expr};} {\tt wdth={\sl expr};} (default {\tt lgth*2/5}); {\tt cycles={\sl expr};}% {\tt line={\sl attributes};} (e.g., {\tt dotted, dashed, outlined})}% \macrodef{heater}{heater}{({\sl linespec, ndivisions|keys, wid, ht, boxspec}|[E[R][T]])}% {cct}% - {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,}% - draws an {\tt heatere({\sl linespec, keys,} [R][T]),}% + {Heater element\seesect{Twoterminal:}. If arg 5 contains {\tt E,} + draws an {\tt heatere({\sl linespec, keys,} [R][T]),} otherwise a {\tt heatert({\sl linespec, nparts, wid, ht, boxspec})}}% \macrodef{heatert}{heatert}{({\sl linespec, nparts|keys, wid, ht, boxspec})}% {cct}% {Two-terminal rectangular heater element\seesect{Twoterminal:}. The {\sl keys} for the body are - {\tt parts={\sl expr};}% - {\tt lgth={\sl expr};}% + {\tt parts={\sl expr};} + {\tt lgth={\sl expr};} {\tt wdth={\sl expr};} (default {\tt lgth*2/5}); - {\tt box={\sl body attributes};}% + {\tt box={\sl body attributes};} (e.g., {\tt dotted, dashed, outlined, shaded}). Args 3--5 are unused if any key is given}% \macrodef{hexadecimal\_}{hexadecimal_}{($n$, [$m$])}% @@ -1301,8 +1323,9 @@ n|e|s|w,{\sl length})}% \macrodef{ht\_}{ht_}{}% {gen}% {height relative to current direction}% -% + \Letter{I}% + \macrodef{ifdpic}{ifdpic}{({\sl if true},{\sl if false})}% {gen}% {test if dpic has been specified as pic processor}% @@ -1314,8 +1337,7 @@ n|e|s|w,{\sl length})}% {gen}% {test if the second argument is a substring of the first; also {\tt ifinstr({\sl string},{\sl string},{\sl if true},{\sl - string},{\sl string},{\sl if true}, $\ldots$ {\sl if false})}% - }% + string},{\sl string},{\sl if true}, $\ldots$ {\sl if false})} }% \macrodef{ifmfpic}{ifmfpic}{({\sl if true},{\sl if false})}% {gen}% {test if mfpic has been specified as pic post-processor}% @@ -1381,12 +1403,13 @@ n|e|s|w,{\sl length})}% {corrected (old) gpic $int()$ function}% \macrodef{IOdefs}{IOdefs}{(\linespec,{\sl label},[P|N]*,L|R) }% {log}% - {Define locations {\sl label}{\tt 1}, $\ldots$ {\sl label}{\tt n}% + {Define locations {\sl label}{\tt 1}, $\ldots$ {\sl label}{\tt n} along the line; {\tt P}: label only; {\tt N}: with {\tt NOT\_circle}; {\tt R}: circle to right of current direction }% -% + \Letter{J}% + \macrodef{jack}{jack}{(U|D|L|R|{\sl degrees},{\sl chars})}% {cct}% {arg1: drawing direction; string arg2: {\tt R}: right orientation, @@ -1402,9 +1425,9 @@ n|e|s|w,{\sl length})}% { Two-terminal solder jumper with named body parts. The {\sl chars} character sequence specifies the jumper components, and normally begins with {\tt C} and ends with {\tt D.} The character - {\tt E} is an empty (blank) gap, {\tt J} is a filled gap, {\tt B}% - is a box component. The components are named {\sl T1, T2, \ldots}% - Examples: {\tt CED} is a simple open jumper (the default); {\tt CJD}% + {\tt E} is an empty (blank) gap, {\tt J} is a filled gap, {\tt B} + is a box component. The components are named {\sl T1, T2, \ldots} + Examples: {\tt CED} is a simple open jumper (the default); {\tt CJD} closed; {\tt CEBED} three-contact open; {\tt CJBED} three-contact open and closed. The {\sl keys} are: {\tt type=}{\sl chars} as previously; @@ -1412,21 +1435,23 @@ n|e|s|w,{\sl length})}% {\tt wdth=}{\sl expr}; {\tt name=}{\sl chars} (the body name)% \seesect{Twoterminal:}}% -% + \Letter{K}% + \macrodef{KelvinR}{KelvinR}{({\sl cycles},[R],{\sl cycle wid})}% {cct}% - {IEEE resistor in a {\tt [ ]} block with Kelvin taps {\sl T1} and {\sl T2}% + {IEEE resistor in a {\tt [ ]} block with Kelvin taps {\sl T1} and {\sl T2} \seesect{Composite:}}% -% + \Letter{L}% + \macrodef{lamp}{lamp}{(\linespec, [R][T])}% {cct}% {Two-terminal incandescent lamp. {\tt T} truncates leads to the body width. \seesect{Twoterminal:}}% \macrodef{langle}{langle}{({\sl Start, End})}% {gen}% - {Angle in radians from horizontal of the line from {\sl Start}% + {Angle in radians from horizontal of the line from {\sl Start} to {\sl End}.}% \macrodef{larrow}{larrow}{({\sl label},{\tt ->|<-},{\sl dist})}% {cct}% @@ -1459,7 +1484,7 @@ n|e|s|w,{\sl length})}% \macrodef{length3D}{length3D}{(x,y,z)}% {3D}% {Euclidean length of triple x,y,z}% -\macrodef{LEtangent}{LEtangent}{({\sl Pos1, Centre, ellips wid, ellipse ht}% +\macrodef{LEtangent}{LEtangent}{({\sl Pos1, Centre, ellips wid, ellipse ht,} [R])}% {gen}% { Left (right if arg5=R) tangent point of line @@ -1498,23 +1523,21 @@ n|e|s|w,{\sl length})}% {set line thickness in points}% \macrodef{lin\_leng}{lin_leng}{({\sl line-reference})}% {gen}% - {length of a line, equivalent to {\sl line-reference}{\tt .len}% + {length of a line, equivalent to {\sl line-reference}{\tt .len} with dpic}% \macrodef{ljust\_}{ljust_}{}% {gen}% {ljust with respect to current direction}% -\macrodef{llabel}{llabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],% - [{\sl block name}])}% +\macrodef{llabel}{llabel}{( {\sl label}, {\sl label}, {\sl label}, + {\sl relative position}, {\sl block name})}% {cct}% {Triple label on the left of the body of an element with respect to the current direction \seesect{Labels:}. Labels are placed at the - beginning, centre, and end of the last {\tt []} block (or a named - {\tt []} block). Each label is treated as math by default, but is - copied literally if it is in double quotes or defined by sprintf. - {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt - right} to supplement the default relative position. The fifth - argument is the optional name of the {\tt []} block to be labelled, - which is {\tt last []} by default}% + beginning, centre, and end of the last {\tt []} block (or a {\tt []} block + named or enumerated in arg5). Each label is treated as math by + default, but is copied literally if it is in double quotes or defined + by sprintf. {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} + or {\tt right} to supplement the default relative position.}% \macrodef{loc\_}{loc_}{({\sl x}, {\sl y})}% {gen}% {location adjusted for current direction}% @@ -1531,7 +1554,7 @@ n|e|s|w,{\sl length})}% \macrodef{loop}{loop}{({\sl initial assignments, test, loop end, statements})}% {dpictools}% {$\;\;$ C-like loop. Commas in arg3 and arg4 must - be in quotes or parentheses. Example: + be in quotes or parentheses. Example:\\ {\tt loop(i=1, i<=3, i+=1, print i)} prints 1, 2, 3.}% \macrodef{Loopover\_}{Loopover_}{(`{\sl variable}',{\sl actions},{\sl value1, value2, $\ldots$})}% @@ -1543,7 +1566,7 @@ n|e|s|w,{\sl length})}% {\sl fill}, {\sl zero ht})} {gen}% {for lollipop graphs: filled circle with stem to - (xcoord,zeroht)}% + {\tt ({\sl xcoord,zeroht})}}% \macrodef{lp\_xy}{lp_xy}{}% {log}% {coordinates used by {\tt lg\_pin}}% @@ -1564,8 +1587,9 @@ n|e|s|w,{\sl length})}% \macrodef{L\_unit}{L_unit}{}% {log}% {logic-element grid size}% -% + \Letter{M}% + \macrodef{m4\_arrow}{m4_arrow}{(\linespec,{\sl ht},{\sl wid})}% {gen}% {arrow with adjustable head, filled when possible}% @@ -1597,8 +1621,7 @@ n|e|s|w,{\sl length})}% {memristor element\seesect{Twoterminal:}}% \macrodef{microphone}{microphone}{( A|U|D|L|R|{\sl degrees, size, attributes})}% {cct}% - {microphone; if arg1 = A: upright mic, otherwise arg1 sets - direction + {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$})}% @@ -1615,7 +1638,7 @@ 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}% + of length arg4 (default {\tt linethick bp\_\_/2}); sets {\tt Here} to Position2 \seesect{Corners:}}% \macrodef{mm\_\_}{mm__}{}% @@ -1656,7 +1679,7 @@ n|e|s|w,{\sl length})}% 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}% + S[{\sl n}]} puts the Sel inputs at the bottom (default) {\tt OE} ({\tt N}: negated) {\tt OE} pin \seesect{Logicgates:}}% \macrodef{Mux\_wid}{Mux_wid}{}% {cct}% @@ -1664,8 +1687,9 @@ n|e|s|w,{\sl length})}% \macrodef{Mx\_pins}{Mx_pins}{}% {log}% {max number of gate inputs without wings}% -% + \Letter{N}% + \macrodef{NAND\_gate}{NAND_gate}{({\tt {\sl n}, [N][B], [{\sl wid}, [{\sl ht}]], {\sl attributes}})}% {log}% @@ -1756,8 +1780,9 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% Otherwise, arg1 can be a sequence of letters {\tt P|N} to define normal or negated inputs. \seesect{Logicgates:}}% -% + \Letter{O}% + \macrodef{opamp}{opamp}{\tt (\linespec,{\sl label, label, size|keys, chars, other commands})}% {cct}% @@ -1794,13 +1819,14 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% {\tt [N]P}: XOR arc;\\ {\tt [N]O}: output; C=center.\\ Otherwise, arg1 can be a sequence of letters {\tt P|N} to define - normal or negated inputs. If arg5 contains {\tt shaded rgbstring(...)}% + normal or negated inputs. If arg5 contains {\tt shaded rgbstring(...)} the arguments of {\tt rgbstring} may not contain parentheses.}% \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,% \char96{\sl elementspec}\char39 $\ldots$)}% {cct}% @@ -1843,10 +1869,10 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% \macrodef{pi\_}{pi_}{}% {gen}% {$\pi$}% -\macrodef{plug}{plug}{(U|D|L|R|{\sl degrees},[2|3][R])}% +\macrodef{plug}{plug}{\smash{(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:}}% + {Phone plug; arg1: drawing direction; arg2: {\tt R} right orientation, + {\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$}% @@ -1865,19 +1891,22 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% {\tt line={\sl line attributes};} (e.g., {\tt dashed shaded "blue"}), {\tt rot={\sl degrees};} (angle of first internal vertex {\tt V[0]}), {\tt side|rad={\sl expression};} size by side length or by radius. + {\tt radv={\sl expression};} radius of rounded vertices. If this is + nonzero then any fill has to be by {\tt rgbfill(r,g,b,polygon(...)).} The internal defined points are the centre {\tt C} and vertices - {\tt V[0]} $\ldots$ {\tt V[{\sl n}-1]}. }% + {\tt V[0]} $\ldots$ {\tt V[{\sl n}]}. }% \macrodef{posarray}{posarray}{({\sl Name, Position1, Position2, \ldots})}% {dpictools}% {$\;\;$ Populate a singly-subscripted array of positions: - {\tt {\sl Name}[1]:{\sl Position1;}% + {\tt {\sl Name}[1]:{\sl Position1;} {\sl Name}[2]={\sl Position2;} \ldots}.}% \macrodef{posarray2}{posarray2}{({\sl Name, expr, Position1, Position2, \ldots})}% {dpictools}% {$\;\;$ Populate a doubly-subscripted array of positions: - {\tt {\sl Name}[{\sl expr},1]={\sl Position1;}% + {\tt {\sl Name}[{\sl expr},1]={\sl Position1;} {\sl Name}[{\sl expr},2]={\sl Position2;} \ldots}.}% + \macrodef{potentiometer}{potentiometer}{(\linespec,% {\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)} {cct}% {resistor with taps T1, T2, $\ldots$ @@ -1905,7 +1934,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% \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}) }% + {\sl position} + Rect\_({\sl length, angle}) } from the polar-coordinate data in the arguments }% \macrodef{pt\_\_}{pt__}{}% {gen}% @@ -1918,7 +1947,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% {gen}% {Key-value definition. If {\sl string} contains the substring - {\sl key}{\tt =}{\sl expr} then macro {\tt m4{\sl key}}% + {\sl key}{\tt =}{\sl expr} then macro {\tt m4{\sl key}} is defined using {\tt pushdef()} to expand to {\tt ({\sl expr})}, or to {\tt ({\sl default value})} if the substring is missing. Arg 1 can contain several such substrings separated @@ -1927,10 +1956,15 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% \seesect{Macroarguments:}}% \macrodef{pushkeys\_}{pushkeys_}{({\sl string, key sequence})}% {gen}% - {Multiple key-value definitions. Arg 2 is a semicolon-separated - sequence of terms of the form {\tt {\sl key}:{\sl default value}:[N]}% + {Multiple key-value definitions. Arg2 is a semicolon-separated + sequence of terms of the form {\tt {\sl key}:{\sl default-value}[:N]} which must contain no semicolons and the default values contain no colons. + A key may not be the tail of another key. Macro {\tt pushkey\_} is applied to each of the terms in order. + Quote arg2 for robustness and, if an argument depends on a previous + argument, add quotes to delay expansion; for example + {\tt pushkeys\_(\char96\$1\char39,\char96{}hght:0.5; + wdth:m4\char96\char39hght/2\char39)}. \seesect{Macroarguments:}}% \macrodef{pvcell}{pvcell}{({\sl linespec, width, height, attributes})}% {cct}% @@ -1938,8 +1972,9 @@ nw,nn,ne,ns,pin lgth,style, other commands})}% \macrodef{px\_\_}{px__}{}% {gen}% {absolute SVG screen pixels}% -% + \Letter{R}% + \macrodef{randn}{randn}{({\sl array name, $n,$ mean, stddev})}% {dpictools}% {$\;\;$ Assign $n$ Gaussian random numbers in array @@ -1973,6 +2008,7 @@ degrees, attributes})}% {\tt SOR}: slow operating and release;\\ {\tt SR}: slow release;\\ {\tt HS}: high speed;\\ + {\tt S}: diagonal slash;\\ {\tt NAC}: unaffected by AC current;\\ {\tt AC}: AC current;\\ {\tt ML}: mechanically latched;\\ @@ -1997,19 +2033,20 @@ degrees, attributes})}% \macrodef{resetrgb}{resetrgb}{}% {gen}% {cancel {\tt r\_, g\_, b\_} color definitions}% -\macrodef{resistor}{resistor}{(\linespec, n|E, {\sl chars}, {\sl cycle wid})}% +\macrodef{resistor}{resistor}{(\linespec, n, {\sl chars}, {\sl cycle wid})}% {cct}% {resistor, n cycles (default 3), {\sl chars:}\\ {\tt AC}: general complex element,\\ {\tt E}: {\tt ebox},\\ {\tt ES}: {\tt ebox} with slash,\\ + {\tt F}: FDNR (frequency-dependent negative resistor),\\ {\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$) + {\tt R}: right-oriented;\\ + Arg4: {\sl cycle width} (default {\tt dimen\_}$/6$) \seesect{Twoterminal:}}% \macrodef{resized}{resized}{({\sl factor},`{\sl macro name}',args)}% {cct}% @@ -2048,38 +2085,37 @@ degrees, attributes})}% {dpictools}% {$\;\;$ rgb color triple to hsv with {\sl h} range 0 to 360.}% \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 = - line attributes, e.g., {\tt outlined "gray"}}% + attributes})}% + {gen}% + {Draw a right-angle symbol at {\sl Pos2}, of size given by arg4. + Arg5 = line attributes, e.g., {\tt outlined "gray"} or e.g. to add a dot, + {\tt ;dot(at last line.c)}}% \macrodef{right\_}{right_}{}% {gen}% {set current direction right \seesect{Placing:}}% \macrodef{rjust\_}{rjust_}{}% {gen}% {right justify with respect to current direction}% -\macrodef{rlabel}{rlabel}{({\sl label},{\sl label},{\sl label},[{\sl arg4}],% - [{\sl block name}])}% +\macrodef{rlabel}{rlabel}{( {\sl label}, {\sl label}, {\sl label}, + {\sl relative position}, {\sl block name})}% {cct}% {Triple label on the right of the body of an element with respect to the current direction \seesect{Labels:}. Labels are placed at the - beginning, centre, and end of the last {\tt []} block (or a named - {\tt []} block). Each label is treated as math by default, but is - copied literally if it is in double quotes or defined by sprintf. - {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} or {\tt - right} to supplement the default relative position. The fifth - argument is the optional name of the {\tt []} block to be labelled, - which is {\tt last []} by default}% + beginning, centre, and end of the last {\tt []} block (or a {\tt []} block + named or enumerated in arg5). Each label is treated as math by + default, but is copied literally if it is in double quotes or defined + by sprintf. {\sl Arg4} can be {\tt above,} {\tt below,} {\tt left,} + or {\tt right} to supplement the default relative position.}% \macrodef{rot3Dx}{rot3Dx}{({\sl radians,x,y,z})}% {3D} {rotates x,y,z about x axis}% \macrodef{rot3Dy}{rot3Dy}{({\sl radians,x,y,z})}% {3D} {rotates x,y,z about y axis}% \macrodef{rot3Dz}{rot3Dz}{({\sl radians,x,y,z})}% {3D} {rotates x,y,z about z axis}% -\macrodef{rotbox}{rotbox}{({\sl wid,ht,type},[r|t={\sl val}])}% +\macrodef{rotbox}{rotbox}{({\sl wid,ht,attributes},[r|t={\sl val}])}% {gen}% {box oriented in current direction in {\tt [ ]} block; - {\sl type=} e.g. {\tt dotted shaded "green".} Defined internal + {\sl attributes:} 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 @@ -2097,8 +2133,7 @@ degrees, attributes})}% {rotate {\sl x,y} by theta radians}% \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)}% @@ -2148,13 +2183,14 @@ degrees, attributes})}% \macrodef{rvec\_}{rvec_}{({\sl x},{\sl y})}% {gen}% {location relative to current direction}% -% + \Letter{S}% + \macrodef{sarrow}{sarrow}{(\linespec,{\sl keys})}% {gen}% {Single-segment, single-headed special arrows with {\sl keys}:\\ {\tt type=}{\tt O[pen]} (default) - | {\tt D[iamond]} | {\tt C[rowfoot]} | {\tt P[lain]}% + | {\tt D[iamond]} | {\tt C[rowfoot]} | {\tt P[lain]} | {\tt R[ight]} | {\tt L[eft]} {\tt ;}\\ {\tt wdth=}{\sl expression}{\tt ;} (default {\tt arrowwid})\\ {\tt lgth=}{\sl expression}{\tt ;} (default {\tt arrowht})\\ @@ -2169,8 +2205,9 @@ degrees, attributes})}% \macrodef{s\_box}{s_box}{({\sl text},{\sl expr1},$\cdots$)}% {gen}% {generate dimensioned text string using {\tt\char92{}boxdims} from - {\tt boxdims.sty}. Two or more args are passed to {\tt sprintf()}% + {\tt boxdims.sty}. Two or more args are passed to {\tt sprintf()} (default 90) degrees \seesect{Interaction:}}% + \macrodef{sbs}{sbs}{({\sl linespec, chars, label})}% {cct}% {Wrapper to place an SBS thyristor as a two-terminal element with @@ -2191,17 +2228,22 @@ degrees, attributes})}% \seesect{Semiconductors:}}% \macrodef{s\_dp}{s_dp}{({\sl name},{\sl default})}% {gen}% - {depth of the most recent (or named) {\tt s\_box}% + {depth of the most recent (or named) {\tt s\_box} \seesect{Interaction:}}% \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. + Each argument is an 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. + An element may have normal arguments but should not + change the drawing direction. + Internal points {\tt Start}, {\tt End}, and {\tt C} are defined \seesect{Seriesandparallel:} }% \macrodef{se\_}{se_}{}% {gen}% @@ -2217,7 +2259,7 @@ $\ldots$)}% \macrodef{setkey\_}{setkey_}{({\sl string, key, default,}[N])}% {gen}% {Key-value definition, like {\tt pushkey\_()} but the resulting - macro is defined using {\tt define()} rather than {\tt pushdef().}% + macro is defined using {\tt define()} rather than {\tt pushdef().} \seesect{Macroarguments:}}% \macrodef{setkeys\_}{setkeys_}{({\sl string, key sequence})}% {gen}% @@ -2251,11 +2293,10 @@ justification},cw|ccw, \macrodef{sfgbelow}{sfgbelow}{}% {cct}% {like below but with extra space}% -\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{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{sfgline}{sfgline}{(\linespec,{\sl text},{\tt sfgabove|sfgbelow|ljust|rjust},{\sl line attributes})}% {cct}% @@ -2265,7 +2306,7 @@ arrowhd len, circle attributes})}% {cct}% {small circle default white interior, with text label. The default - label position is inside if the diameter is bigger than {\tt textht}% + label position is inside if the diameter is bigger than {\tt textht} and {\tt textwid}; otherwise it is {\tt sfgabove.} Options such as color, fill, or line thickness can be given, e.g., {\tt thick 0.8 outlined "red" shaded "orange"}. }% @@ -2279,11 +2320,19 @@ arrowhd len, \macrodef{shade}{shade}{({\sl gray value},{\sl closed line specs})}% {gen}% {Fill arbitrary closed curve. Note: when producing pdf via pdflatex, line - thickness changes within this macro must be made via the {\tt linethick}% + thickness changes within this macro must be made via the {\tt linethick} environment variable rather than by the {\tt thickness} line attribute}% \macrodef{shadebox}{shadebox}{(box {\sl attributes, shade width})}% {gen}% {Box with edge shading. Arg2 is in points. See also {\tt shaded} }% +\macrodef{shadedball}{shadedball}{({\sl radius, highlight radius, + highlight degrees, initial gray, final gray} | ({\sl rf,gf,bf}))}% + {3D}% + { Shaded ball in {\tt [ ]} box. + The highlight is by default at {\sl radius}*3/5 and angle 110 deg + (or arg2 deg); if setlight has been invoked then its azimuth and + elevation arguments determine highlight position. Arg5 can be a + parenthesized rgb color.} \macrodef{ShadedPolygon}{ShadedPolygon}{({\sl vertexseq, line attributes, degrees, colorseq})} {gen}% {Draws the polygon specified in arg1 and @@ -2293,35 +2342,49 @@ arrowhd len, (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{ShadeObject}{ShadeObject}{({\sl drawroutine name, n, colorseq})}% +\macrodef{ShadeObject}{ShadeObject}{({\sl drawroutine, n, colorseq})}% {dpictools}% - {$\;\;$ Fill an area in a {\tt []} block with graded color + {$\;\;$ + Fill an area in a {\tt []} block with graded color defined by {\sl colorseq,} an indexed sequence of rgb colors: - {\sl 0,r0,g0,b0,}% - {\sl frac1,r1,g1,b1,}% - {\sl frac2,r2,g2,b2,}% + \fra{0}{\sl,r0,g0,b0,} + \fra{1}{\sl,r1,g1,b1,} \ldots - {\sl 1,rn,gn,bn}% - with $0 < \hbox{\sl frac1}$ $< \hbox{\sl frac2} <$ $\ldots < 1.$ The macro - {\sl drawroutine{\tt(}frac, r, g, b{\tt)}} typically draws a colored line + \fra{n}{\sl,rn,gn,bn} with\\ + $0 \leq \fra{0} < \fra{1}$ + $< \fra{2} <$ + $\ldots$ + $\fra{n} \leq 1.$\\ + (Often $\fra{0} = 0$ and $\fra{n} = 1.$) + The dpic macro\\ + {\sl drawroutine{\tt(}frac, r, g, b{\tt)}}\\ + typically draws a colored line and must be defined according to the area to be filled. - The routine is called $n{+}1$ times for - $\hbox{\sl frac}= 0, 1/n, 2/n, \ldots 1$ with rgb arguments interpolated - in hsv space between {\sl colorseq} points. + This routine is called $n{+}1$ times for + $\fra{}= \fra{0},\;$ + $\fra{0} + 1/n\times(\fra{n}{-}\fra{0}),$ + $\fra{0} + 2/n\times(\fra{n}{-}\fra{0}),$ + \ldots + \fra{n}\\ + (i.e., often + $\fra{} = 0, 1/n, 2/n, \ldots 1$)\\ + with rgb + arguments interpolated in hsv space between {\sl colorseq} points + (which are specified in rgb-space). Example (shade a box with 101 graded-color lines):\\ {\tt B: box\\ define HorizShade \lbr\ line right B.wid \textbackslash\\ - $\;$ thick B.ht/100/(1bp\_\_) from (0,-(\$1)*B.ht) \textbackslash\\ - $\;$ outlined rgbstring(\$2,\$3,\$4) \rbr;}% - {\tt ShadeObject(HorizShade,100, 0,1,0,0, 1,0,0,1) \textbackslash\\ - $\;$ at B}.}% + $\;$ from (0,-(\char36{}1)*B.ht) \textbackslash\\ + $\;$ outlined rgbstring(\char36{}2,\char36{}3,\char36{}4) \rbr;}\\ + {\tt ShadeObject(HorizShade, B.ht/lthick, 0,1,0,0, 1,0,0,1) at B}. + }% \macrodef{shadowed}{shadowed}{(box|circle|ellipse|line, {\sl position spec, keys})}% {gen}% { Object with specified shadow. {\sl possspec} is e.g., {\tt with .w at ...} or {\tt at} {\sl position}. The {\sl keys} are - {\tt attrib=}{\sl object attributes}{\tt ;}% + {\tt attrib=}{\sl object attributes}{\tt ;} {\tt shadowthick=}{\sl expr}{\tt ;} (default {\tt linethick*)}5/4), {\tt shadowcolor=}{\sl string}{\tt ;} (default {\tt "gray"}), {\tt shadowangle=}{\sl expr}{\tt ;} (default $-45$) @@ -2370,6 +2433,7 @@ arrowhd len, 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{sl\_box}{sl_box}{({\sl stem linespec, keys, stem object})}% {SLD}% {One-terminal SLD element: argument 1 is a \linespec\ to define the stem @@ -2402,7 +2466,7 @@ arrowhd len, {\tt C} for a curved breaker; adding a {\tt D} puts drawout elements in the input and output leads. Otherwise, the arguments are as for - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} \seesect{SingleLine:}}% \macrodef{sl\_busbar}{sl_busbar}{({\sl linespec, np, keys})}% {SLD}% @@ -2469,19 +2533,19 @@ arrowhd len, Argument 3 is null for no breaker in the stem, {\tt C} for a default closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for these marks, or - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} key-value pairs defining box attributes for the breaker (default name {\sl Br}) - \label{sl_disk}% + \label{sl_disk} \seesect{SingleLine:}}% \macrodef{sl\_drawout}{sl_drawout}{({\sl linespec, keys,} R)}% {SLD}% {Two-terminal SLD element: argument 1 is a \linespec\ as for ordinary two-terminal elements. - Argument 2 contains semicolon (;)-separated key-value body attributes: + Argument 2 contains semicolon (;)-separated key-value body attributes:\\ {\tt type=T} (for truncated leads); - {\tt lgth={\sl{}expr},}% + {\tt lgth={\sl{}expr},} {\tt wdth={\sl{}expr}} (body size); {\tt name={\sl{}Name}} (default {\sl Body}); {\tt line={\sl{}pic line attributes}}; (e.g., {\tt thick 2}) @@ -2498,7 +2562,7 @@ arrowhd len, Argument 3 is null for no breaker in the stem, {\tt C} for a default closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for these marks, or - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} key-value pairs defining box attributes for the breaker (default name {\sl Br}) \seesect{SingleLine:}}% @@ -2518,19 +2582,20 @@ arrowhd len, Argument 3 is null for no breaker in the stem, {\tt C} for a default closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for these marks, or - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} key-value pairs defining box attributes for the breaker (default name {\sl Br}) \seesect{SingleLine:}}% \macrodef{sl\_inverter}{sl_inverter}{({\sl ttbox args})}% {SLD}% {Two-terminal SLD element: the arguments are as for - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} \seesect{SingleLine:}}% + \macrodef{sl\_lamp}{sl_lamp}{({\sl stem linespec, keys, breaker})}% {SLD}% {One-terminal SLD element: the arguments are as for - \MR{sl_disk}{\tt sl\_disk}% + \MR{sl_disk}{\tt sl\_disk} \seesect{SingleLine:}}% \macrodef{sl\_load}{sl_load}{({\sl stem linespec, keys, breaker})}% {SLD}% @@ -2549,7 +2614,7 @@ arrowhd len, Argument 3 is null for no breaker in the stem, {\tt C} for a default closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for these marks, or - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} key-value pairs defining box attributes for the breaker (default name {\sl Br}) \seesect{SingleLine:}}% @@ -2571,7 +2636,7 @@ arrowhd len, Argument 3 is null for no breaker in the stem, {\tt C} for a default closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for these marks, or - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} key-value pairs defining box attributes for the breaker (default name {\sl Br}) \seesect{SingleLine:}}% @@ -2587,8 +2652,7 @@ arrowhd len, Argument 3 is null for no breaker in the input lead, {\tt C} for a default closed breaker, {\tt O} for an open breaker, {\tt X,} {\tt /,} or \bsl\ for - these marks, or - key-value pairs as above defining breaker attributes + these marks, or key-value pairs as above defining breaker attributes except that the default breaker name is {\sl BrI}. Argument 4 defines the breaker in the output lead as for argument 3 @@ -2597,7 +2661,7 @@ arrowhd len, \macrodef{sl\_rectifier}{sl_rectifier}{({\sl ttbox args})}% {SLD}% {Two-terminal SLD element: the arguments are as for - \MR{sl_ttbox}{\tt sl\_ttbox}% + \MR{sl_ttbox}{\tt sl\_ttbox} \seesect{SingleLine:}}% \macrodef{sl\_slash}{sl_slash}{(at {\sl position, keys,}% [$n$:]R|L|U|D|{\sl degrees})}% @@ -2625,8 +2689,8 @@ arrowhd len, Argument 3 is colon (:)-separated sequence of up to three breaker attribute specifications for the input, output, and teriary breaker - in order. A null or blank means no breaker, {\tt tt\_breaker}% - specifications otherwise. Default breaker names are {\sl BrI}% + in order. A null or blank means no breaker, {\tt tt\_breaker} + specifications otherwise. Default breaker names are {\sl BrI} and {\sl BrO} as for {\tt sl\_transformer,} and {\sl Br} for the third breaker. @@ -2699,7 +2763,7 @@ arrowhd len, Argument 4 defines the breaker in the output lead as for argument 3 except that the default breaker name is {\sl BrO}. - \label{sl_ttbox}% + \label{sl_ttbox} \seesect{SingleLine:}}% \macrodef{s\_name}{s_name}{}% {gen}% @@ -2713,37 +2777,39 @@ arrowhd len, {dpictools}% {$\;\;$ Trapezoid formed from a box with top corners displaced right by $x$ offset and right corners displaced up by $y$ offset.}% -\macrodef{source}{source}{(\linespec, - V|v|tv|I|i|ti|ii|AC|B|F|G|H|J|Q|L|N|P|S[C[r]]|E[r]]|T|X|U|{\sl other}, {\sl - diameter},R)}% +\macrodef{source}{source}{(\linespec, {\sl char or chars}, {\sl diameter},R, + {\sl body attributes, body name})}% {cct}% - {source, arg2 blank or:\\ - {\tt V}: voltage source;\\ - {\tt v}: alternate voltage source;\\ - {\tt tv}: truncated-bar alternate voltage source;\\ - {\tt I}: current source;\\ - {\tt i}: alternate current source;\\ - {\tt ti}: truncated-bar alternate current source;\\ - {\tt ii}: double arrow current source; AC: AC source;\\ + {Source; arg2 blank or:\\ + {\tt AC}: AC source;\\ {\tt B}: bulb;\\ {\tt F}: fluorescent;\\ {\tt G}: generator;\\ {\tt H}: step function;\\ + {\tt I}: current source;\\ + {\tt i}: alternate current source;\\ + {\tt ii}: double arrow current source;\\ + {\tt ti}: truncated-bar alternate current source;\\ {\tt L}: lamp;\\ {\tt N}: neon;\\ + {\tt NA}: neon 2;\\ + {\tt NB}: neon 3;\\ {\tt P}: pulse;\\ {\tt Q}: charge;\\ {\tt R}: ramp; - {\tt r}: right orientation; {\tt S}: sinusoid;\\ - {\tt SC}: quarter arc;\\ - {\tt SE}: arc;\\ + {\tt SC}: quarter arc, {\tt SCr} right orientation;\\ + {\tt SE}: arc, {\tt SEr} right orientation;\\ {\tt T}: triangle;\\ {\tt U}: square-wave;\\ + {\tt V}: voltage source;\\ {\tt X}: interior X;\\ + {\tt v}: alternate voltage source;\\ + {\tt tv}: truncated-bar alternate voltage source;\\ other: custom interior label or waveform;\\ arg 4: R: reversed polarity;\\ - arg 5 modifies the circle with e.g., color or fill + arg 5 modifies the circle (body) with e.g., color or fill;\\ + arg 6 names the body {\tt [ ]} block \seesect{Twoterminal:}}% \macrodef{speaker}{speaker}{( U|D|L|R|{\sl degrees},{\sl size},H,attributes)}% {cct}% @@ -2775,8 +2841,7 @@ arrowhd len, {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}% @@ -2838,8 +2903,9 @@ arrowhd len, \macrodef{sw\_}{sw_}{}% {gen}% {.sw with respect to current direction}% -% + \Letter{T}% + \macrodef{tapped}{tapped}{(`{\sl two-terminal element}', [{\sl arrowhd} | type={\sl arrowhd};name={\sl Name}], {\sl fraction, length, fraction, length,} $\cdots$)}% @@ -2871,13 +2937,13 @@ arrowhd len, block. The permissible {\sl chars} are: {\tt > | >{}> | < | <{}< | A | AA | M | O | OF}. Type {\tt O} draws a node (circle); {\tt OF} a filled circle. - Type {\tt M} is a black bar; {\tt A} is an open arc end; type {\tt AA}% + Type {\tt M} is a black bar; {\tt A} is an open arc end; type {\tt AA} a double open arc. Type {\tt >} (the default) is an arrow-like output connector; {\tt <} and {\tt <<} input connectors. Arg 3 is arrowhead width or circle diameter when key-value pairs are not used. If keys are specified, they are {\tt type=}{\sl chars} as previously; {\tt wdth=}{\sl expr}; {\tt lgth=}{\sl expr}; {\tt sep=}{\sl expr}; - {\tt head=}{\sl attributes except} {\tt lgth, wdth.}% + {\tt head=}{\sl attributes except} {\tt lgth, wdth.} The key {\tt sep=} is the double-head separation \seesect{Composite:}}% \macrodef{testexpr}{testexpr}{({\sl variable, expr1, expr2, \ldots})}% @@ -2894,8 +2960,8 @@ arrowhd len, {cct}% { Thermocouple drawn to the left (by default) of the {\sl linespec} line. A {\tt T} argument truncates the leads so - only the two branches appear. {\tt R=}% - right orientation. \seesect{Twoterminal:}}% + only the two branches appear. {\tt R=} right orientation. + \seesect{Twoterminal:}}% \macrodef{thicklines\_}{thicklines_}{({\sl number})}% {gen}% {set line thickness in points}% @@ -2972,7 +3038,7 @@ arrowhd len, {terminal strip, chars: I (invisible terminals), C (default circle terminals), D (dot terminals), O (omitted separator lines), {\tt wid=}value{\tt ;} total strip width, - {\tt ht=}value{\tt ;} strip height, {\tt box={\sl shaded etc.};}% + {\tt ht=}value{\tt ;} strip height, {\tt box={\sl shaded etc.};} \seesect{Composite:}}% \macrodef{ttmotor}{ttmotor}{({\sl linespec, string, diameter, brushwid, brushht})}% @@ -2981,8 +3047,9 @@ brushht})}% \macrodef{twopi\_}{twopi_}{}% {gen}% {$2\pi$}% -% + \Letter{U}% + \macrodef{ujt}{ujt}{(\linespec,R,P,E)}% {cct}% {unijunction transistor, right, P-channel, envelope @@ -2995,8 +3062,9 @@ brushht})}% \macrodef{up\_}{up_}{}% {gen}% {set current direction up \seesect{Placing:}}% -% + \Letter{V}% + \macrodef{variable}{variable}{(`{\sl element}', {\sl chars}, [+|-]{\sl angle}, {\sl length}, at position)}% % {\tt [A|P|L|[u]N|[u]NN][C|S]}, @@ -3019,8 +3087,7 @@ brushht})}% {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}% @@ -3041,8 +3108,7 @@ brushht})}% {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}% @@ -3054,11 +3120,11 @@ brushht})}% {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{while\_}{while_}{(`{\sl test}',`{\sl actions}')}% {gen}% {Integer m4 while loop}% @@ -3082,8 +3148,9 @@ brushht})}% \macrodef{XOR\_off}{XOR_off}{}% {log}% {XOR and NXOR offset of input face}% -% + \Letter{X}% + \macrodef{xtal}{xtal}{(\linespec,{\sl keys})}% {cct}% {Quartz crystal. The {\sl keys} are @@ -3102,7 +3169,9 @@ brushht})}% \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}% |