summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/doc/defines.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/doc/defines.tex')
-rw-r--r--graphics/circuit_macros/doc/defines.tex122
1 files changed, 108 insertions, 14 deletions
diff --git a/graphics/circuit_macros/doc/defines.tex b/graphics/circuit_macros/doc/defines.tex
index cb3a1a5dae..fdc1f85c35 100644
--- a/graphics/circuit_macros/doc/defines.tex
+++ b/graphics/circuit_macros/doc/defines.tex
@@ -8,11 +8,11 @@
%
\newbox\Defbox
-\newcommand{\macx}[2]{%
- \phantomsection\pdfbookmark[subsection]{#1}{#2}#1}
+%\newcommand{\macx}[2]{%
+% \phantomsection\pdfbookmark[subsection]{#1}{#2}#1}
\newcommand{\macrodef}[5]{%\begin{samepage}%
-\phantomsection\pdfbookmark[subsection]{#1}{#2}%
+\phantomsection\pdfbookmark[subsubsection]{#1}{#2}%
\setbox\Defbox=\hbox{\tt #1#3}%
\ifdim\wd\Defbox>\textwidth%
\setbox\Defbox=\hbox{\parbox{\textwidth}{\tt #1#3}}\fi
@@ -22,12 +22,26 @@
\hbox to \libwid{#4\hfill}\parbox[t]{\rightwid}%
{\raggedright #5}%
% \end{samepage}%
- \vspace{\parsep}\\}
+ \vspace{\parsep}\\}%
\newcommand{\seesect}[1]{ (\SR{#1})}
+\newcommand{\Letter}[1]{\noindent%
+ \pdfbookmark[subsection]{#1}{#1}%
+ \hskip-2em\hbox to 2em{#1\label{#1}\hfill}\relax}%
+
+\newcommand{\LR}[1]{\hyperref[#1]{{#1}}\hskip1em}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\vspace{\abovedisplayskip}
\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}
+\\
+
+\Letter{A}%
\macrodef{above\_}{above_}{}
{gen}
{string position above relative to current direction}
@@ -39,8 +53,8 @@
{cct}
{draw an AC symbol ( 1-cycle sine wave); If arg 4 contains A, two arcs
are drawn. The current drawing direction is default, otherwise Up, Down,
- Left, Right, or at {\sl degrees} slant; e.g.,
- {\tt ebox; $\lbrace$ ACsymbol(at last [],{,}dimen\_/8) $\rbrace$} }
+ 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})}
{cct}
{ADC with defined width, height, and number of inputs {\tt In$i$},
@@ -107,6 +121,12 @@
{\sl modifiers}) }
{gen}
{arc with acute angle (obtuse if radius is negative), drawn in a [ ] block}
+\macrodef{ArcAngle}{ArcAngle}{({\sl position, position, position, radius,
+ modifiers}) }
+ {gen}
+ {Arc angle symbol drawn ccw at arg2. Arg4 is the radius from arg2;
+ arg5 contains line attributes, e.g., {\tt thick linethick/2}}
+
\macrodef{arcd}{arcd}{({\sl center},
{\sl radius},{\sl start degrees},{\sl end degrees}) }
{gen}
@@ -139,6 +159,29 @@
radius},[dashed|dotted])}
{gen}
{line toward position 1 with rounded corner toward position 2}
+\macrodef{arrester}{arrester}{(\linespec,{\sl chars},
+ {\sl len}[:arrowhead ht],
+ {\sl ht}[:arrowhead wid] )}
+ {cct}
+{
+ {\sl Arg2 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}
+ \seesect{Twoterminal:}}
\macrodef{arrowline}{arrowline}{(\linespec)}
{cct}
{line (dotted, dashed permissible) with centred arrowhead
@@ -176,6 +219,7 @@
Setting {\tt offset=}{\sl value} displaces the
drawn input list in order to disambiguate the input connections when {\tt L}
is used}
+\Letter{B}%
\macrodef{b\_}{b_}{}
{gen}
{blue color value}
@@ -276,6 +320,7 @@
{cct}
{buzzer, {\sl In1} to {\sl In3} defined, C=curved
\seesect{Composite:}}
+\Letter{C}%
\macrodef{c\_fet}{c_fet}{(\linespec,L|R,P)}
{cct}
{left or right, plain or negated pin simplified MOSFET}
@@ -387,6 +432,7 @@
\macrodef{csdim\_}{csdim_}{}
{cct}
{controlled-source width}
+\Letter{D}%
\macrodef{d\_fet}{d_fet}{(\linespec,L|R,P,S,E|S)}
{cct}
{left or right, N or P depletion MOSFET, normal or simplified,
@@ -473,6 +519,14 @@
\macrodef{dcosine3D}{dcosine3D}{({\sl i,x,y,z})}
{3D}
{extract i-th entry of triple x,y,z}
+\macrodef{DCsymbol}{DCsymbol}{(at {\sl position, len, ht,}
+ U|D|L|R|{\sl degrees}) }
+ {cct}
+ {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$}
+ \seesect{Twoterminal:} }
\macrodef{delay\_rad\_}{delay_rad_}{}
{cct}
{delay radius}
@@ -510,7 +564,7 @@
{difference of two triples}
\macrodef{dimen\_}{dimen_}{}
{cct}
- {size parameter for circuit elements \seesect{Circuitscaling:}}
+ {size parameter for scaling circuit element bodies \seesect{Circuitscaling:}}
\macrodef{dimension\_}{dimension_}{(\linespec,{\sl offset},{\sl label},
D|H|W|{\sl blank width},{\sl tic offset},{\sl arrowhead })}
{gen}
@@ -653,6 +707,7 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,%
\macrodef{dturn}{dturn}{({\sl degrees ccw})}
{darrow}
{turn dline arg1 degrees left (ccw)}
+\Letter{E}%
\macrodef{E\_\_}{E__}{}
{gen}
{the constant $e$}
@@ -692,14 +747,15 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,%
\macrodef{endshade}{endshade}{}
{gen}
{end gray shading, see {\tt beginshade}}
-\macrodef{Equidist3}{Equidist3}{({\sl Pos1, Pos2, Pos3, Result})}
+\macrodef{Equidist3}{Equidist3}{({\sl Pos1, Pos2, Pos3, Result, distance})}
{gen}
{Calculates location named {\sl Result} equidistant from the first three
positions, i.e.\ the centre of the circle passing through the three
- positions}
+ positions. If arg5 is nonblank, it is equated to the radius.}
\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.
@@ -778,6 +834,7 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|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{g\_}{g_}{}
{gen}
{green color value}
@@ -809,10 +866,10 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,%
\macrodef{grid\_}{grid_}{({\sl x},{\sl y})}
{log}
{absolute grid location}
-\macrodef{ground}{ground}{(at {\sl location}, T, N|F|S|L|P[A]|E, U|D|L|R|{\sl
- degrees})}
+\macrodef{ground}{ground}{(at {\sl location}, T|{\sl stem length},
+ N|F|S|L|P[A]|E, U|D|L|R|{\sl degrees})}
{cct}
- { ground, without stem for nonblank 2nd arg;
+ { ground, without stem for 2nd arg = T;
{\tt N}=normal, {\tt F}=frame, {\tt S}=signal, {\tt L}=low-noise,
{\tt P}=protective,
{\tt PA}=protective alternate,
@@ -828,6 +885,7 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,%
{Gyrator two-port wrapper for {\tt nport}, {\tt N} omits pin dots; {\tt V}
gives a vertical orientation
\seesect{Composite:}}
+\Letter{H}%
\macrodef{H\_ht}{H_ht}{}
{log}
{hysteresis symbol dimension in {\tt L\_unit}s}
@@ -867,6 +925,7 @@ 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}
@@ -942,6 +1001,7 @@ n|e|s|w,{\sl length})}
along the line; {\tt P}= label only;
{\tt N}=with {\tt NOT\_circle};
{\tt R}=circle to right of current direction }
+\Letter{J}%
\macrodef{j\_fet}{j_fet}{(\linespec,L|R,P,E)}
{cct}
{left or right, N or P JFET, without or with envelope
@@ -952,10 +1012,12 @@ n|e|s|w,{\sl length})}
one or more {\tt L[M][B]} for L and auxiliary contacts with make or break
points; {\tt S[M][B]} for S and auxiliary contacts
\seesect{Composite:}}
+\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}
\seesect{Composite:}}
+\Letter{L}%
\macrodef{L\_unit}{L_unit}{}
{log}
{logic-element grid size}
@@ -1073,6 +1135,7 @@ n|e|s|w,{\sl length})}
\macrodef{lthick}{lthick}{}
{gen}
{current line thickness in drawing units}
+\Letter{M}%
\macrodef{m4\_arrow}{m4_arrow}{(\linespec,{\sl ht},{\sl wid})}
{gen}
{arrow with adjustable head, filled when possible}
@@ -1169,6 +1232,7 @@ n|e|s|w,{\sl length})}
\macrodef{Mx\_pins}{Mx_pins}{}
{log}
{max number of gate inputs without wings}
+\Letter{N}%
\macrodef{n\_}{n_}{}
{gen}
{.n with respect to current direction}
@@ -1254,6 +1318,7 @@ 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}{(\linespec,{\sl label},{\sl label},{\sl size},{\sl
chars}, other commands)}
{cct}
@@ -1283,6 +1348,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\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}
@@ -1339,12 +1405,19 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\macrodef{point\_}{point_}{({\sl angle})}
{gen}
{(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
+ from {\sl Point} to {\sl Line}.}
\macrodef{Point\_}{Point_}{({\sl integer})}
{gen}
{sets direction cosines in degrees \seesect{Placing:}}
\macrodef{polar\_}{polar_}{({\sl x},{\sl y})}
{gen}
{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}.}
\macrodef{potentiometer}{potentiometer}{(\linespec,%
{\sl cycles},{\sl fractional pos},{\sl length},$\cdots$)}
{cct}
@@ -1371,6 +1444,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
{cct}
{pass transistor; {\tt L=} left orientation
\seesect{Semiconductors:}}
+\Letter{R}%
\macrodef{r\_}{r_}{}
{gen}
{red color value}
@@ -1450,9 +1524,12 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
{reverse polarity of 2-terminal element}
\macrodef{rgbdraw}{rgbdraw}{({\sl color triple}, {\sl drawing commands})}
{gen}
- {color drawing for PSTricks, pgf, MetaPost, svg postprocessors;
+ {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:}}
+ 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
@@ -1470,6 +1547,11 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\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 =
+ line attributes, e.g., {\tt outlined "gray"}}
\macrodef{rjust\_}{rjust_}{}
{gen}
{right justify with respect to current direction}
@@ -1538,6 +1620,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\macrodef{rvec\_}{rvec_}{({\sl x},{\sl y})}
{gen}
{location relative to current direction}
+\Letter{S}%
\macrodef{s\_}{s_}{}
{gen}
{.s with respect to current direction}
@@ -1611,6 +1694,12 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
{gen}
{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
+ 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}
@@ -1784,6 +1873,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
if arg4=B (button switch): arg3 = O{\tt|}C
O=normally open, C=normally closed,
if arg4=D: arg3 = same as for dswitch \seesect{Twoterminal:}}
+\Letter{T}%
\macrodef{ta\_xy}{ta_xy}{({\sl x, y})}
{cct}
{macro-internal coordinates adjusted for {\tt L|R}}
@@ -1901,6 +1991,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\macrodef{twopi\_}{twopi_}{}
{gen}
{$2\pi$}
+\Letter{U}%
\macrodef{ujt}{ujt}{(\linespec,R,P,E)}
{cct}
{unijunction transistor, right, P-channel, envelope
@@ -1914,6 +2005,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\macrodef{up\_}{up_}{}
{gen}
{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})}
{cct}
@@ -1961,6 +2053,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
{gen}
{{\tt Vsum\_(A,B)} evaluates to {\tt A+B} with dpic, {\tt A+(B.x,B.y)}
with gpic}
+\Letter{W}%
\macrodef{w\_}{w_}{}
{gen}
{.w with respect to current direction}
@@ -1984,6 +2077,7 @@ nw,nn,ne,ns,pin lgth,style, other commands})}
\macrodef{XOR\_off}{XOR_off}{}
{log}
{XOR and NXOR offset of input face}
+\Letter{X}%
\macrodef{xtal}{xtal}{(\linespec)}
{cct}
{quartz crystal\seesect{Twoterminal:}}