summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/doc/md.tex
blob: 7d195339e1f82a13f974deea5c4b2b579a784b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%
\newdimen{\leftwid}\setlength{\leftwid}{2in}
\newdimen{\libwid}\setlength{\libwid}{0.5in}
\newdimen\rightwid
\setlength{\rightwid}{\textwidth}
\addtolength{\rightwid}{-\leftwid}
\addtolength{\rightwid}{-\libwid}
%
\newbox\Defbox
%\iffalse% original macrodef:
%\newcommand{\macrodef}[3]{\setbox\Defbox=\hbox{\tt #1}%
%  \ifdim\wd\Defbox>\textwidth%
%    \setbox\Defbox=\hbox{\parbox{\textwidth}{\tt #1}}\fi
%  \ifdim\wd\Defbox>\leftwid%
%       \box\Defbox\hfill\break\hspace*{\leftwid}%
%  \else\hbox to \leftwid{\box\Defbox\hfill}\fi%
%  \hbox to \libwid{#2\hfill}\parbox[t]{\rightwid}%
%   {\raggedright #3}\vspace{\parsep}\\}
%\fi

\newcommand{\macx}[2]{%
  \phantomsection\pdfbookmark[subsection]{#1}{#2}#1}

\newcommand{\macrodef}[5]{\begin{samepage}%
\phantomsection\pdfbookmark[subsection]{#1}{#2}%
\setbox\Defbox=\hbox{\tt #1#3}%
  \ifdim\wd\Defbox>\textwidth%
    \setbox\Defbox=\hbox{\parbox{\textwidth}{\tt #1#3}}\fi
  \ifdim\wd\Defbox>\leftwid%
       \box\Defbox\hfill\break\hspace*{\leftwid}%
  \else\hbox to \leftwid{\box\Defbox\hfill}\fi%
  \hbox to \libwid{#4\hfill}\parbox[t]{\rightwid}%
   {\raggedright #5}\end{samepage}\vspace{\parsep}\\}

\newcommand{\seesect}[1]{ (see \SR{#1})}


\vspace{\abovedisplayskip}
\noindent
\macrodef{Along\_}{Along_}{({\sl LinearObj,distance,}[R])}
  {gen}
  {Distance arg2 (default all the way) along a linear object
   from {\tt .start} to {\tt .end}
   (from {\tt .end} to {\tt .start} if arg3={\tt R}) }
\macrodef{AND\_gate}{AND_gate}{({\sl n},N)}
  {log}
  {basic `and' gate, 2 or {\sl n\/} inputs; {\tt N}=negated input.
   Otherwise, arg1 can be a sequence of letters {\tt P|N}
   to define normal or negated inputs
    \seesect{Logicgates:}}
\macrodef{AND\_gen}{AND_gen}{($n$,{\sl chars},[{\sl wid},[{\sl ht}]])}
  {log}
  {general AND gate: $n$=number of inputs $(0\leq n\leq 16)$;
           {\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}
   to define normal or negated inputs.}