summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:53:02 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:53:02 +0000
commit0c9405f885f771f05b1a96ff3d298cc1a814966b (patch)
tree0db468f1eb715eae6829d3b9466ff20f155bc469 /Master
parentd14b76fde85c3ba44cbe96692f1db9df3cd956d6 (diff)
circ
git-svn-id: svn://tug.org/texlive/trunk@757 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/latex/circ/basic.def84
-rw-r--r--Master/texmf-dist/tex/latex/circ/box.def44
-rw-r--r--Master/texmf-dist/tex/latex/circ/circ.sty699
-rw-r--r--Master/texmf-dist/tex/latex/circ/gate.def86
-rw-r--r--Master/texmf-dist/tex/latex/circ/ic.def109
-rw-r--r--Master/texmf-dist/tex/latex/circ/oldgate.def37
-rw-r--r--Master/texmf-dist/tex/latex/circ/optics.def79
-rw-r--r--Master/texmf-dist/tex/latex/circ/physics.def43
8 files changed, 1181 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/circ/basic.def b/Master/texmf-dist/tex/latex/circ/basic.def
new file mode 100644
index 00000000000..e92f8db4f09
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/basic.def
@@ -0,0 +1,84 @@
+%%
+%% This is file `basic.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `basic')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\ProvidesFile{basic.def}
+\freecirc
+\def\GND#1 {\setbox\*bbox=\hbox{\c*fnt\char254}%
+ \check*min{\wd\*bbox}\check*max{\wd\*bbox}\put*box
+ \store*XY{GND#1}\store*XY{GND#1:}\reset*ifs}
+\def\gnd#1 {\setbox\*bbox=\hbox{\c*fnt\char253}%
+ \check*min{\wd\*bbox}\check*max{\wd\*bbox}\put*box
+ \store*XY{gnd#1}\store*XY{gnd#1:}\reset*ifs}
+\def\junction#1 {\setbox\*bbox=\hbox{\c*fnt\char255}\check*{\wd\*bbox}\check*X
+ \put*box\store*XY{.#1:}\store*XY{junction#1:}%
+ \store*XY{junction#1}\store*XY{.#1}\reset*ifs}
+\cdef R R \c*fntw 0
+\cdef Rus R \c*fntw 24
+\cdefviii Rvar R \c*fntw 8 . S *
+\cdefviii Rusvar R \c*fntw 32 . S *
+\cdef C C \c*fntw 128
+\cdef Cvar C \c*fntw 130
+\cdefiv Cel C \c*fntw 136 - +
+\cdefiv D D \c*fntd 0 K A
+\cdefiv ZD D \c*fntd 4 K A
+\cdefiviv LED D \c*fntd 8 K A
+\cdefiv Dcap D \c*fntd 16 K A
+\cdefiv whatI I \c*fnt 248 d s
+\cdefiv U U \c*fnt 16 + -
+\cdef varU U \c*fnt 44
+\cdef varI I \c*fnt 46
+\cdefiv Uvar U \c*fnt 20 + -
+\cdef I I \c*fnt 12
+\cdef Ivar I \c*fnt 14
+\cdef V U {\def\add*cmds{\clr*acmds
+ \ac*{\symfont V}}\c*fnt}8
+\cdef A I {\def\add*cmds{\clr*acmds
+ \ac*{\symfont A}}\c*fnt}8
+\cdefiv L L \c*fnt 0 . *
+\cdef xtal Q \c*fnt 4
+\cdef La La \c*fnt 6
+\cdef GasLa {} \c*fnt 40
+\cdef S S \c*fnt 24
+\cdefviii SW S \c*fnt 32 o s c
+\cdefivNL mconnection \c*fnt 232 o c
+\cdefivNL connection \c*fnt 240 o c
+\cdefivNL fconnection \c*fnt 244 o c
+\cdefiviv npnPH T \c*fntt 80 E C
+\cdefviii npnEC T \c*fntt 0 E . C
+\cdefviii pnpEC T \c*fntt 8 E . C
+\cdefviii npn T \c*fntt 16 E B C
+\cdefviii pnp T \c*fntt 24 E B C
+\cdefviii nfet T \c*fntt 32 S G D
+\cdefviii pfet T \c*fntt 40 S G D
+\cdefviii nvmos T \c*fntt 48 S G D
+\cdefviii pvmos T \c*fntt 56 S G D
+\cdefviii namos T \c*fntt 64 S G D
+\cdefviii pamos T \c*fntt 72 S G D
+\protectcirc
+\endinput
+%%
+%% End of file `basic.def'.
diff --git a/Master/texmf-dist/tex/latex/circ/box.def b/Master/texmf-dist/tex/latex/circ/box.def
new file mode 100644
index 00000000000..af1d55d1db1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/box.def
@@ -0,0 +1,44 @@
+%%
+%% This is file `box.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `box')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\ProvidesFile{box.def}
+\freecirc
+\bbdef BBa \c*fntb 252
+\bbdef BBd \c*fntb 253
+\bbdefNeT oscillograph \c*fnt 142 {}
+\bbdefNeT G \c*fntb 250 \vbox{\hc*{\symfont G}\kern1.5\*spc%
+ \hc*{\c*fnts\char16}}
+\bbdefNeT Gvar \c*fntb 250 \vbox{\hc*{\symfont G}\kern1.5\*spc%
+ \hc*{\c*fnts\char17}}
+\bbdefNeT Impulse \c*fntb 250 \c*fnts\char13
+\bbdefNeT Amp \c*fntb 250 \c*fnts\char24
+\sbdef ACtoDC \c*fntb 251 \hbox{\raise.6\ht*\hbox{\c*fnts\char16}%
+ \lower.6\dp*\hbox{\symfont$=$}}
+\protectcirc
+\endinput
+%%
+%% End of file `box.def'.
diff --git a/Master/texmf-dist/tex/latex/circ/circ.sty b/Master/texmf-dist/tex/latex/circ/circ.sty
new file mode 100644
index 00000000000..40e05792993
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/circ.sty
@@ -0,0 +1,699 @@
+%%
+%% This is file `circ.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `code')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesClass{circ}
+ [1997/04/23 v1.0d for typeset circuit diagrams]
+\DeclareOption*{\InputIfFileExists{\CurrentOption.def}{}%
+ {\PackageError{CIRC}{File \CurrentOption.def not found.}%
+ {Check spelling or think about the
+ location of file.\MessageBreak
+ I tried to load macros for the CIRC package.}}}
+\def\freecirc{\chardef\CIRCinternals\the\catcode`\*\catcode`\*=11
+ \chardef\cc@lb\the\catcode`\[
+ \chardef\cc@rb\the\catcode`\]
+ \chardef\cc@at\the\catcode`\@
+ \catcode`\[=11\catcode`\]=11\catcode`\@=11 }
+\def\protectcirc{\catcode`\[=\cc@lb\catcode`\]=\cc@rb\catcode`\@=\cc@at
+ \catcode`\*=\CIRCinternals\relax}
+\freecirc
+\newif\ifshowpoints
+\showpointsfalse
+\newif\iflab*
+\lab*true
+\newif\ifval*
+\val*true
+\newif\ifld*
+\ld*false
+\newif\ifcc*
+\cc*false
+\newif\ifpin
+\pintrue
+\newif\ifxoutofgrid
+\newif\ifyoutofgrid
+\xoutofgridfalse
+\youtofgridfalse
+\newif\ifcen*
+\cen*false
+\newif\ifhvcen*
+\hvcen*false
+\newif\ifcheck*
+\newdimen\X*max
+\newdimen\X*min
+\newdimen\*X*
+\newdimen\*Y*
+\newdimen\**X
+\newdimen\**Y
+\newdimen\***X
+\newdimen\***Y
+\newbox\*bbox
+\newbox\box*
+\newdimen\ic*
+\newdimen\ht*
+\newdimen\wd*
+\newdimen\dp*
+\newcount\cc*
+\newdimen\*spc
+\newtoks\ldd* %linke untere Beschriftung
+\newtoks\rud* %rechte obere Beschriftung
+\newtoks\llpos*
+\newtoks\ldpos*
+\newtoks\rlpos*
+\newtoks\rdpos*
+\newtoks\ulpos*
+\newtoks\udpos*
+\newtoks\dlpos*
+\newtoks\ddpos*
+\newcount\cnta*
+\newcount\cntb*
+\newtoks\name* %Bauelementname
+\newtoks\ld*pin %Bezeichnung linker Anschlu"s
+\newtoks\ru*pin % ...
+\newtoks\m*pin % ...
+\newtoks\rmacros
+\newdimen\outerspace
+\newtoks\*Ilist
+\newtoks\*Olist
+
+\newdimen\pin*spc
+\newdimen\pin*ind
+\newdimen\io*ind
+\newdimen\mid*ind
+\newdimen\pinnum*spc
+\def\CIRCredef{}
+\def\safedef#1{\expandafter\ifx\csname#1\endcsname\relax
+\toks0{\expandafter\def\csname#1\endcsname}\else
+\edef\CIRCredef{\CIRCredef\expandafter\string\csname#1\endcsname\space}%
+\toks0{\expandafter\def\csname.#1.\endcsname}\rmacros
+\expandafter{\the\rmacros\let}\rmacros\expandafter\expandafter\expandafter
+{\expandafter\the\expandafter\rmacros\csname#1\endcsname}\rmacros\expandafter
+\expandafter\expandafter
+{\expandafter\the\expandafter\rmacros\csname.#1.\endcsname}\fi
+\the\toks0}
+\def\safedefs#1{\expandafter\ifx\csname#1\endcsname\relax
+\toks0{\expandafter\def\csname#1\endcsname}\else
+\edef\CIRCredef{\CIRCredef\expandafter\string\csname#1\endcsname\space}%
+\toks0{\expandafter\def\csname.#1.\endcsname}\rmacros
+\expandafter{\the\rmacros\let}\rmacros\expandafter\expandafter\expandafter
+{\expandafter\the\expandafter\rmacros\csname#1\endcsname}\rmacros\expandafter
+\expandafter\expandafter
+{\expandafter\the\expandafter\rmacros\csname.#1.\endcsname}\fi
+\the\toks0 }
+\def\getc*#1 {\advance\cc* by #1%
+ \ifcc*
+ \toks0\ldd*\ldd*\rud*\rud*\toks0
+ \ifval*
+ \iflab*\val*true\else\val*false\fi
+ \lab*true
+ \else
+ \iflab*\val*true\else\val*false\fi
+ \lab*false
+ \fi
+ \fi
+ \global\setbox\box*=\hbox{\char\cc*\/\global\ic*=\lastkern\unkern}%
+ \global\ht*\ht\box*\global\wd*\wd\box*\global\dp*\dp\box*}
+\def\check*max#1{\dimen0=#1\advance\dimen0\*X*
+ \ifdim\dimen0>\X*max\global\X*max\dimen0\fi}
+\def\check*X{\ifcheck*\ifdim\*X*<\X*min\global\X*min\*X*\fi
+ \ifdim\*X*>\X*max\global\X*max\*X*\fi\fi}
+\def\check*min#1{\dimen0=-#1\advance\dimen0\*X*
+ \ifdim\dimen0<\X*min\global\X*min\dimen0\fi}
+\def\check*#1{\check*min{#1}\check*max{#1}}
+\def\check*cen{\ifcen*\errhelp{Use `\hcenterto' or `\vcenterto'.}%
+ \errmessage{You can't use `\string\centerto' to center `\the\name*'}\fi}
+\def\put*box{\hbox to 0pt{\kern\*X*\raise\*Y*\box\*bbox\hss}}
+\def\hc*#1{\hbox to 0pt{\hss#1\hss}}
+\def\vc*#1{\vbox to 0pt{\vss#1\vss}}
+\def\tlap#1{\vbox to 0pt{\vss#1}}
+\def\blap#1{\vbox to 0pt{#1\vss}}
+\def\ac*#1{\vc*{\hc*{#1}}}
+\def\reset*ifs{\ld*false\cen*false\hvcen*false\lab*true\val*true\cc*false}
+\def\store*XY#1{\ifshowpoints\message{#1}\fi
+ \expandafter\xdef\csname#1\endcsname{\*X*\the\*X*\*Y*\the\*Y*}}
+\def\save*XY{\**X\*X*\**Y\*Y*}
+\def\save*xy{\***X\*X*\***Y\*Y*}
+\def\restore*XY{\*X*\**X\*Y*\**Y}
+\def\restore*xy{\*X*\***X\*Y*\***Y}
+\def\diff*XY{\advance\**X-\*X*\advance\**Y-\*Y*}
+\def\centerto#1 {\cen*true\save*XY\frompin#1: }
+\def\hcenterto#1 {\hvcen*true\**Y\*Y*\frompin#1: \*Y*\**Y}
+\def\vcenterto#1 {\hvcen*true\**X\*X*\frompin#1: \*X*\**X}
+\def\do*Ilist{\ifshowpoints\message{|<}\fi
+ \check*true
+ \save*XY\the\*Ilist\ifshowpoints\message{>|}\fi\restore*XY\*Ilist={}}
+\def\shift*Ilist#1{\ifshowpoints\message{|<}\fi
+ \check*false
+ \save*XY\the\*Ilist\frompin{\the\name*#1}
+ \ifshowpoints\message{| shift \the\name*#1 |}\fi
+ \advance\**X\**X\advance\**X-\*X*\*X*\**X
+ \advance\**Y\**Y\advance\**Y-\*Y*\*Y*\**Y
+ \check*true
+ \save*XY\the\*Ilist\restore*XY
+ \ifshowpoints\message{>|}\fi\*Ilist={}}
+\def\shift*IOlist#1{\ifshowpoints\message{|<}\fi
+ \check*false
+ \save*XY\the\*Ilist\restore*XY\advance\*X*\wd\*bbox\the\*Olist
+ \frompin{\the\name*#1}
+ \ifshowpoints\message{| shift \the\name*#1 |}\fi
+ \advance\**X\**X\advance\**X-\*X*\*X*\**X
+ \advance\**Y\**Y\advance\**Y-\*Y*\*Y*\**Y
+ \check*true
+ \save*XY\the\*Ilist\restore*XY\advance\*X*\wd\*bbox\the\*Olist
+ \restore*XY\ifshowpoints\message{>|}\fi\*Ilist={}\*Olist={}}
+\def\Ladd*x#1#2{\dimen9=#2%
+ \edef\next{{\the#1\advance\*X*\the\dimen9 }}%
+ \global#1\next}
+\def\Ladd*y#1#2{\dimen9=#2%
+ \edef\next{{\the#1\advance\*Y*\the\dimen9 }}%
+ \global#1\next}
+\def\Lstore*#1#2{\edef\next{{\the#1\noexpand\store*XY{\the\name*#2}}}%
+ \global#1\next}
+\def\Lstopos*#1{\global#1\expandafter{\the#1\save*xy}}
+\def\Lrstpos*#1{\global#1\expandafter{\the#1\restore*xy}}
+\def\LX*check#1{\global#1\expandafter{\the#1\check*X}}
+\def\add*x{\Ladd*x\*Ilist}
+\def\add*y{\Ladd*y\*Ilist}
+\def\store*{\Lstore*\*Ilist}
+\def\stopos*{\Lstopos*\*Ilist}
+\def\rstpos*{\Lrstpos*\*Ilist}
+\def\X*check{\LX*check\*Ilist}
+\def\Cadd*#1{\Ladd*y#1{-\pin*spc}}
+\def\Cstore*#1#2{\ifx{#2}*\else\Lstore*#1{#2}\fi}
+\def\frompin#1 {\expandafter\ifx\csname#1\endcsname\relax
+ \errhelp{Check spelling! Look up in the description of circuits.}%
+ \errmessage{Point >#1< is not defined}\else\csname#1\endcsname\fi}
+\let\atpin\frompin
+\def\h*twopins#1{\getc*#1 \ifcen*\*Y*\**Y\hvcen*true\fi
+\wd\box*=.5\wd*
+\advance\ht*\*spc
+\X*check\store*{\the\ld*pin}\add*x{.5\wd*}\store*:\add*x{.5\wd*}%
+\store*{\the\ru*pin}\X*check
+\ifhvcen*\shift*Ilist:\else\ifld*\shift*Ilist{\the\ru*pin}\else\do*Ilist\fi\fi
+\labelfont
+\setbox0=\hbox{\the\rud*}\setbox1=\hbox{\the\ldd*}%
+\**X\*X*\advance\*X*.5\wd*
+\iflab*\check*{.5\wd0}\fi%
+\ifval*\check*{.5\wd1}\fi%
+\*X*\**X
+\setbox\*bbox=\hbox{\box\box*
+ \iflab*\raise\ht*\hc*{\unhbox0}\fi
+ \ifval*\lower\dp*\vtop{\kern\*spc\hc*{\unhbox1}}\fi
+ \add*cmds}%
+\put*box
+\ifld*\else\advance\*X*\wd*\fi\reset*ifs}
+\def\v*twopins#1{\getc*#1 \ifcen*\*X*\**X\hvcen*true\fi
+\labelfont
+\setbox0=\hbox{\ifval*\the\ldd*\kern\*spc\fi\kern\dp*}\dimen1\wd0
+\setbox1=\hbox{\kern\wd*\iflab*\kern\*spc\the\rud*\fi}\dimen0\wd1
+\dp0=0pt\dp1=0pt
+\wd\box*=0pt\dp\box*=0pt
+\setbox\*bbox=\hbox{\box\box*
+ \raise.5\ht*\hbox{\vc*{\hbox{\llap{\box0}\rlap{\box1}}}\add*cmds}}%
+\store*{\the\ld*pin}\add*y{.5\ht*}\store*:\add*y{.5\ht*}\store*{\the\ru*pin}%
+\ifhvcen*\shift*Ilist:\else\ifld*\shift*Ilist{\the\ru*pin}\else\do*Ilist\fi\fi
+\check*X
+\check*max{\dimen0}%
+\check*min{\dimen1}%
+\put*box
+\ifld*\else\advance\*Y*\ht*\fi\reset*ifs}
+\def\ii*#1 {\if#1h\ld*pin{l}\ru*pin{r}\h*twopins0\relax\else
+ \if#1v\ld*pin{b}\ru*pin{t}\v*twopins1\relax\else
+ \if#1u\ld*pin{b}\ru*pin{t}\v*twopins1\relax\else
+ \if#1d\ld*pin{b}\ru*pin{t}\ld*true\v*twopins1\relax\else
+ \if#1l\ld*pin{l}\ru*pin{r}\ld*true\h*twopins0\relax\else
+ \if#1r\ld*pin{l}\ru*pin{r}\h*twopins0\relax\else
+ \errhelp{Direction >h<, >v<, >l<, >u<, >r< or >d< expected.}%
+ \errmessage{Bad direction specified! You typed:>#1<.}%
+ \fi\fi\fi\fi\fi\fi}
+\def\change*pins{\toks0\ld*pin\ld*pin\ru*pin\ru*pin\toks0}
+\def\CiRCl{1}\def\CiRCr{2}\def\CiRCu{3}\def\CiRCd{4}
+\def\CiRCL{5}\def\CiRCR{6}\def\CiRCU{7}\def\CiRCD{8}
+\def\CIRCiErr{\PackageError{CIRC}{Internal Error}%
+ {You are great, please send all files to the author and wait for
+ answer.}}
+\def\iv*#1 #2 {\cnta*=0\csname CiRC#2\endcsname\relax
+ \ifnum\cnta*=0
+ \PackageError{CIRC}{Bad direction}%
+ {Please check spelling}\fi
+ \ifcase\CIRCpintoN{#1}\relax\CIRCiErr \or
+ \ifcase\cnta*
+ \CIRCiErr\or\<\change*pins\h*twopins2\relax
+ \or\h*twopins0\relax
+ \or\v*twopins1\relax
+ \or\change*pins\<\v*twopins3\relax\else
+ \PackageError{CIRC}{Bad direction}%
+ {Please check spelling, only [l r u d] expected}\fi\or
+ \ifcase\cnta*
+ \CIRCiErr\or\<\h*twopins0\relax
+ \or\change*pins\h*twopins2\relax
+ \or\change*pins\v*twopins3\relax
+ \or\<\v*twopins1\relax\else
+ \PackageError{CIRC}{Bad direction}%
+ {Please check spelling, only [l r u d] expected}\fi\fi}
+\def\iviv*#1 #2 {\cnta*=0\csname CiRC#2\endcsname\relax
+ \ifnum\cnta*=0
+ \PackageError{CIRC}{Bad direction}%
+ {Please check spelling}\fi
+ \ifcase\CIRCpintoN{#1}\relax\CIRCiErr \or
+ \ifcase\cnta*
+ \CIRCiErr\or\<\change*pins\h*twopins6\relax
+ \or\h*twopins0\relax
+ \or\v*twopins5\relax
+ \or\change*pins\<\v*twopins3\relax
+ \or\<\change*pins\h*twopins2\relax
+ \or\h*twopins4\relax
+ \or\v*twopins1\relax
+ \or\change*pins\<\v*twopins7\relax\fi\or
+ \ifcase\cnta*
+ \CIRCiErr\or\<\h*twopins0\relax
+ \or\change*pins\h*twopins6\relax
+ \or\change*pins\v*twopins3\relax
+ \or\<\v*twopins5\relax
+ \or\<\h*twopins4\relax
+ \or\change*pins\h*twopins2\relax
+ \or\change*pins\v*twopins7\relax
+ \or\<\v*twopins1\relax\fi\fi}
+\def\lviii*#1{\store*{\the\m*pin}\X*check
+ \add*x\wd*\stopos*\add*y{-\dp*}\store*{\the\ld*pin}\X*check
+ \rstpos*\add*y\ht*\store*{\the\ru*pin}\rstpos*
+ \dimen0\ht*\advance\dimen0-\dp*\add*y{.5\dimen0}\store*:
+ \rstpos*\add*x\ic*\X*check
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi
+ \setbox\*bbox=\hbox{\labelfont
+ \the\llpos*\box\box*\the\ldpos*}\put*box}
+\def\rviii*#1{\store*{\the\m*pin}\X*check
+ \add*x{-\wd*}\stopos*\add*y\ht*\store*{\the\ru*pin}\X*check
+ \rstpos*\add*y{-\dp*}\store*{\the\ld*pin}\rstpos*
+ \dimen0\ht*\advance\dimen0-\dp*\add*y{.5\dimen0}\store*:
+ \rstpos*\add*x{-\ic*}\X*check
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi
+ \setbox\*bbox=\hbox{\labelfont
+ \the\rdpos*\box\box*\the\rlpos*}\put*box}
+\def\dviii*#1{\store*{\the\m*pin}%
+ \add*y\dp*\stopos*\add*x\ic*\store*{\the\ru*pin}\X*check
+ \rstpos*\add*x{-\wd*}\store*{\the\ld*pin}\X*check
+ \rstpos*\dimen0-\wd*\advance\dimen0\ic*\add*x{.5\dimen0}\store*:
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi
+ \wd\box*=0pt\dp\box*=0pt
+ \setbox\*bbox=\hbox{\labelfont
+ \the\dlpos*\box\box*\the\ddpos*}\put*box}
+\def\uviii*#1{\store*{\the\m*pin}%
+ \add*y{-\ht*}\stopos*\add*x\ic*\store*{\the\ru*pin}\X*check
+ \rstpos*\add*x{-\wd*}\store*{\the\ld*pin}\X*check
+ \rstpos*\dimen0-\wd*\advance\dimen0\ic*\add*x{.5\dimen0}\store*:
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#1}\fi
+ \wd\box*=0pt\ht\box*=0pt
+ \setbox\*bbox=\hbox{\labelfont
+ \the\ulpos*\box\box*\the\udpos*}\put*box}
+\def\viii*#1 #2 {\check*cen
+ \if#2l \getc*0 \lviii*{#1}\else
+ \if#2r \getc*1 \rviii*{#1}\else
+ \if#2d \getc*3 \dviii*{#1}\else
+ \if#2u \getc*2 \uviii*{#1}\else
+ \if#2L\change*pins\getc*4 \lviii*{#1}\else
+ \if#2R\change*pins\getc*5 \rviii*{#1}\else
+ \if#2D\change*pins\getc*7 \dviii*{#1}\else
+ \if#2U\change*pins\getc*6 \uviii*{#1}\else
+ \errhelp{Direction >l<, >r<, >u<, >d<, >L<, >R<, >U< or >D<
+ expected.}%
+ \errmessage{Bad direction >#2<}\fi\fi\fi\fi\fi\fi\fi\fi
+ \reset*ifs}
+\def\CIRCpintoN#1{\if\the\ld*pin#1 1\else
+ \if\the\ru*pin#1 2\else
+ \if\the\m*pin#1 3\else
+ \PackageError{CIRC}{Bad pin name}%
+ {Please check spelling or look up in the documentation}
+\fi\fi\fi}
+\def\cdef#1 #2 #3#4 {\safedef{#1}##1 ##2 {%
+ \name*{#1##1}\rud*{$#2_{##1}$}\ldd*{##2}\cc*#4 #3\ii*}}
+\def\cdefiv#1 #2 #3#4 #5 #6 {\safedef{#1}##1 ##2 {%
+ \name*{#1##1}\rud*{$#2_{##1}$}\ldd*{##2}\m*pin{@}%
+ \ld*pin{#5}\ru*pin{#6}\cc*#4 #3\iv*}}
+\def\cdefivNL#1 #2#3 #4 #5 {\safedef{#1}##1 ##2 {%
+ \name*{#1##1}\rud*{}\ldd*{##2}\ld*pin{#4}\ru*pin{#5}\m*pin{@}%
+ \cc*#3 #2\iv*}}
+\def\cdefiviv#1 #2 #3#4 #5 #6 {\safedef{#1}##1 ##2 {%
+ \name*{#1##1}\rud*{$#2_{##1}$}\ldd*{##2}\ld*pin{#5}\ru*pin{#6}\m*pin{@}%
+ \cc*#4 #3\iviv*}}
+\def\cdefivivNL#1 #2#3 #4 #5 {\safedef{#1}##1 ##2 {%
+ \name*{#1##1}\rud*{}\ldd*{##2}\ld*pin{#4}\ru*pin{#5}\m*pin{@}%
+ \cc*#3 #2\iviv*}}
+\def\cdefNL#1 #2#3 {\safedef{#1}##1 ##2 {%
+ \name*{#1##1}\rud*{}\ldd*{##2}\cc*#3 #2\ii*}}
+\def\cdefviii#1 #2 #3#4 #5 #6 #7 {\safedef{#1}##1 ##2 {\name*{#1##1}%
+ \rud*{$#2_{##1}$}\ldd*{##2}\ld*pin{#5}\m*pin{#6}\ru*pin{#7}\cc*#4 #3\viii*}}
+\def\cwdef#1 #2 {\safedef{#1}##1 ##2 {\cc*#2
+ \cnta*##1\toks2{}\toks4{}\dimen2=##1em\test*xygrid
+ \csname line*##2\endcsname}}
+\def\black*boxii#1 #2 #3 #4 #5 #6 #7 {\check*cen
+ \if#7h\getc*0
+ \store*{P1}\X*check\add*x{.5\wd*}\stopos*\X*check\store*:
+ \add*y\ht*\store*{P4}\rstpos*\add*y{-\dp*}\store*{P2}\rstpos*
+ \add*x{.5\wd*}\X*check\store*{P3}%
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi
+ \setbox\*bbox=\hbox{\ifpin\pinnumberfont
+ \setbox0=\hbox{#3\kern\*spc}\check*min{\wd0}%
+ \raise\pinnum*spc\llap{#3\kern\*spc}%
+ \setbox0=\hbox{\kern\*spc\kern\wd*#5}\check*max{\wd0}\wd0=0pt
+ \raise\pinnum*spc\box0
+ \setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#6}\check*max{\wd0}\wd0=0pt
+ \dimen0\ht*\advance\dimen0\*spc
+ \raise\dimen0\box0
+ \setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#4}\check*max{\wd0}\wd0=0pt
+ \dimen0\dp*\advance\dimen0\*spc
+ \lower\dimen0\vtop{\kern0pt\box0}\fi
+ \hc*{\kern\wd*\ctextfont\vc*{\hbox{#1}}}\box\box*}\put*box\reset*ifs
+ \else\if#7v\getc*1
+ \store*{P4}\X*check\add*x{.5\wd*}\stopos*\X*check\store*:
+ \add*y\ht*\store*{P3}\rstpos*\add*y{-\dp*}\store*{P1}\rstpos*
+ \add*x{.5\wd*}\X*check\store*{P2}%
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi
+ \setbox\*bbox=\hbox{\ifpin\pinnumberfont
+ \setbox0=\hbox{#6\kern\*spc}\check*min{\wd0}%
+ \raise\pinnum*spc\llap{#6\kern\*spc}%
+ \setbox0=\hbox{\kern\*spc\kern\wd*#4}\check*max{\wd0}\wd0=0pt
+ \raise\pinnum*spc\box0
+ \setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#5}\check*max{\wd0}\wd0=0pt
+ \dimen0\ht*\advance\dimen0\*spc
+ \raise\dimen0\box0
+ \setbox0=\hbox{\kern\pinnum*spc\kern.5\wd*#3}\check*max{\wd0}\wd0=0pt
+ \dimen0\dp*\advance\dimen0\*spc
+ \lower\dimen0\vtop{\kern0pt\box0}\fi
+ \hc*{\kern\wd*\ctextfont\vc*{\hbox{#1}}}\box\box*}\put*box\reset*ifs
+ \else\errhelp{Direction >h< or >v< expected.}%
+ \errmessage{ >#1< Bad direction specified}\fi\fi}
+\def\black*box#1 #2 #3 #4 #5 #6 {\black*boxii{#1} {#2} {#3} {#4} {#5} {#6} h }
+\def\sym*box#1 #2 {\check*cen
+ \getc*0
+ \store*{P1}\X*check\stopos*
+ \add*x{.5\wd*}\store*:\add*x{.5\wd*}\store*{P3}\X*check\rstpos*
+ \add*y{-1em}\store* b
+ \add*x{\wd*}\store* e\rstpos*
+ \add*y{1em}\store* a
+ \add*x{\wd*}\store* f\rstpos*
+ \add*x{.5\wd*}\stopos*
+ \add*y\ht*\store*{P4}%
+ \add*x{1em}\store* g
+ \rstpos*\add*y\ht*
+ \add*x{-1em}\store* h
+ \rstpos*\add*y{-\dp*}\store*{P2}%
+ \add*x{1em}\store* d
+ \rstpos*\add*y{-\dp*}%
+ \add*x{-1em}\store* c
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi
+ \setbox\*bbox=
+ \hbox{\hc*{\kern\wd*\ctextfont\vc*{\hbox{#1}}}\box\box*}\put*box
+ \reset*ifs}
+\def\bbdef#1 #2#3 {\safedef{#1}##1
+{\name*{#1##1}\cc*#3 #2\black*box}}
+\def\bbdefNeT#1 #2#3 #4 {\safedef{#1}##1
+{\name*{#1##1}\cc*#3#2\black*box{#4} }}
+\def\bbdefNeTii#1 #2#3 #4 {\safedef{#1}##1
+{\name*{#1##1}\cc*#3#2\black*boxii{#4} }}
+\def\sbdef#1 #2#3 #4 {\safedef{#1}##1
+{\name*{#1##1}\cc*#3#2\sym*box{#4} }}
+\cwdef wire {128\c*fnt}
+\cwdef dashed {120\c*fnt}
+\def\line*r{\check*X\ifnum\cnta*=0\else\check*max{\dimen2}\ifxoutofgrid
+ \advance\dimen2-.5\fontdimen6\c*fnt\fi
+ \setbox\*bbox=\hbox{\ifxoutofgrid\else\char\cc*\fi\advance\cc*1%
+ \loop\ifnum\cnta*>1\char\cc*
+ \advance\cnta*-1\repeat}\put*box
+ \advance\*X*.5\dimen2\the\toks2\advance\*X*.5\dimen2
+ \advance\cc*2\setbox\*bbox=\hbox{\char\cc*}\put*box\xoutofgridfalse\fi}
+\def\line*l{\advance\*X*-\dimen2
+ \ifxoutofgrid\advance\*X*.5\fontdimen6\c*fnt\fi
+ \**X\*X*\line*r\*X*\**X}
+\def\line*u{\check*X\ifnum\cnta*=0\else\advance\cc*4\ifyoutofgrid
+ \advance\dimen2-.5\fontdimen6\c*fnt\fi
+ \setbox\box*=\hbox{\char\cc*}\advance\cc*-1%
+ \setbox\*bbox=\vbox{\loop\ifnum\cnta*>1\copy\box*
+ \advance\cnta*-1\repeat
+ \ifyoutofgrid\else\hbox{\char\cc*}\fi}\put*box
+ \advance\*Y*.5\dimen2\the\toks4\advance\*Y*.5\dimen2
+ \advance\cc*2\setbox\*bbox=\vbox{\hbox{\char\cc*}}\put*box\youtofgridfalse\fi}
+\def\line*d{\advance\*Y*-\dimen2
+ \ifyoutofgrid\advance\*Y*.5\fontdimen6\c*fnt\fi
+ \**Y\*Y*\line*u\*Y*\**Y}
+\def\test*xygrid{\dimen9\fontdimen6\c*fnt\count@\dimen9
+ \cntb*\*X*\divide\cntb*\count@
+ \dimen0\*X*\advance\dimen0-\cntb*\dimen9
+ \advance\dimen9-.1pt
+ \ifdim\dimen0<0pt \dimen0-\dimen0 \fi
+ \ifdim\dimen0>0.1pt \ifdim\dimen0<\dimen9 \xoutofgridtrue\fi\fi
+ \cntb*\*Y*\divide\cntb*\count@
+ \dimen0\*Y*\advance\dimen0-\cntb*\fontdimen6\c*fnt
+ \ifdim\dimen0<0pt \dimen0-\dimen0 \fi
+ \ifdim\dimen0>0.1pt \ifdim\dimen0<\dimen9 \youtofgridtrue\fi\fi}
+\def\bundle#1 #2 #3 {\cc*136\c*fnt\cnta*#2\dimen2=#2em
+ \toks2{\setbox\box*=\hbox{\char134}%
+ \setbox\*bbox=\rlap{\raise\ht\box*
+ \hc*{\labelfont#1}\unhbox\box*}\put*box}%
+ \toks4{\setbox\*bbox=\hbox{\char135\labelfont
+ \vc*{\hbox{#1}}}%
+ \check*max{\wd\*bbox}\put*box}%
+ \test*xygrid\csname line*#3\endcsname}
+\def\wwire#1 #2 #3 {\cc*112\c*fnt\cnta*#2\dimen2=#2em
+ \toks2{\setbox\*bbox=\rlap{\raise\*spc
+ \hc*{\labelfont#1}}\put*box}%
+ \toks4{\setbox\*bbox=\hbox{\kern\*spc\labelfont
+ \vc*{\hbox{#1}}}%
+ \check*max{\wd\*bbox}\put*box}%
+ \test*xygrid\csname line*#3\endcsname}
+\def\by#1 {\def\by*cmd{#1}}
+\by{\wire}
+\def\calc*u{\cnta*\fontdimen6\c*fnt\advance\dimen0 .5\fontdimen6\c*fnt
+ \cntb*\dimen0\divide\cntb*\cnta*}
+\def\vtopin#1 {\save*XY\frompin{#1} \test*xygrid
+ \dimen0\**Y\advance\dimen0-\*Y*\restore*XY
+ \ifdim\dimen0<0pt\dimen0-\dimen0
+ \calc*u\by*cmd {\cntb*} u
+ \else\calc*u\by*cmd {\cntb*} d \fi}
+\def\htopin#1 {\save*XY\frompin{#1} \test*xygrid
+ \dimen0\**X\advance\dimen0-\*X*\restore*XY
+ \ifdim\dimen0<0pt\dimen0-\dimen0
+ \calc*u\by*cmd {\cntb*} r
+ \else\calc*u\by*cmd {\cntb*} l \fi}
+\safedef{Utext}#1 from #2 to #3 {{%
+ \frompin{#2} \save*XY\frompin{#3} \diff*XY
+ \ifdim\**X=0pt
+ \setbox1=\hbox{\c*fnt\char132}%
+ \ifdim\**Y<0pt
+ \dimen0-\**Y
+ \setbox0=\hbox{\c*fnt\char'373}\advance\dimen0-\ht0\dp0=0pt
+ \calc*u
+ \setbox\*bbox=
+ \vtop to -\**Y{\vfill\box0\loop\ifnum\cntb*>2\copy1
+ \advance\cntb*-1\repeat\vfill}%
+ \else
+ \dimen0\**Y
+ \setbox0=\hbox{\c*fnt\char'371}\advance\dimen0-\ht0\dp0=0pt
+ \calc*u
+ \setbox\*bbox=
+ \vbox to \**Y{\vfill\loop\ifnum\cntb*>2\copy1
+ \advance\cntb*-1\repeat\box0\vfill}%
+ \fi
+ \put*box\advance\*X*\*spc\advance\*Y*.5\**Y\put\vc*{\hbox{#1}}
+ \else
+ \ifdim\**Y=0pt
+ \ifdim\**X<0pt
+ \dimen0-\**X
+ \setbox0=\hbox{\c*fnt\char'372}\advance\dimen0-\wd0
+ \calc*u
+ \setbox\*bbox=\llap{\hbox to -\**X{\hfill\loop\ifnum\cntb*>2\char129
+ \advance\cntb*-1\repeat\box0\hfill}}%
+ \else
+ \dimen0\**X
+ \setbox0=\hbox{\c*fnt\char'370}\advance\dimen0-\wd0
+ \calc*u
+ \setbox\*bbox=\hbox to \**X{\hfill\box0\loop\ifnum\cntb*>2\char129
+ \advance\cntb*-1\repeat\hfill}%
+ \fi
+ \put*box\advance\*X*.5\**X\advance\*Y*\*spc\put\hc*{#1}
+ \else\errhelp{Only horizontal or vertical labeling allowed.}%
+ \errmessage{Bad points!}\fi\fi}}
+\safedef{centertext}#1 from #2 to #3 {%
+ {\frompin{#2} \save*XY\frompin{#3} \diff*XY
+ \ifdim\**X=0pt
+ \advance\*Y*.5\**Y\put\vc*{\hbox{#1}}
+ \else
+ \ifdim\**Y=0pt
+ \advance\*X*.5\**X\put\hc*{#1}
+ \else\errhelp{Only horizontal or vertical labeling allowed.}%
+ \errmessage{Bad points}\fi\fi}}
+\def\from#1 #2 {\c*fnt\*X*=#1em\*Y*=#2em\check*X}
+\let\at\from
+\def\moverel#1 #2 {\c*fnt\advance\*X* #1em\advance\*Y* #2em\check*X}
+\let\shift\moverel
+\safedef{put}#1 {\setbox\*bbox=\hbox{\ctextfont#1}\check*X
+ \check*max{\wd\*bbox}\put*box}
+
+\safedef{P}#1 {\store*XY{P#1}\check*X\reset*ifs}
+\safedefs{_} #1 #2 {\c*fnt\cnta*=0\csname CiRC#2\endcsname\relax
+ \ifnum\cnta*=0\relax
+ \PackageError{CIRC}{Bad direction}{Please check spelling}\fi
+ \ifcase \cnta* \relax
+ \or \advance\*X* -#1em
+ \or \advance\*X* #1em
+ \or \advance\*Y* #1em
+ \or \advance\*Y* -#1em
+ \or \advance\*X* -#1em
+ \or \advance\*X* #1em
+ \or \advance\*Y* #1em
+ \or \advance\*Y* -#1em \fi}
+\def\nl{\lab*false}
+\def\nv{\val*false}
+\def\cc{\cc*true}
+\def\clr*acmds{\global\let\add*cmds\relax}
+\def\*fdef#1 {\expandafter\xdef\csname#1\endcsname{\the\toks0}}
+\newtoks\CIRCfinit
+\CIRCfinit={}
+\def\addCIRCfont#1 {\expandafter\CIRCfinit=\expandafter{\the\CIRCfinit
+ \expandafter\font\csname CIRC#1\endcsname=#1 scaled \*mag}}
+\def\CIusefont#1#2#3{\fontencoding{\encodingdefault}\fontfamily{#1}%
+ \fontseries{\seriesdefault}\fontshape{\shapedefault}%
+ \fontsize{#2}{#3}\selectfont}
+\def\circuit#1 {\PackageInfo{CIRC}{`\CIRCredef' redefined}%
+ \let\add*cmds\relax
+ \*Ilist{}\*Olist{}\check*true
+ \xdef\*mag{\magstep{#1}}%
+ \global\X*max-\maxdimen
+ \global\X*min\maxdimen
+\ifcase#1 % magstep 0
+ \toks0={\CIusefont{\rmdefault}{10}{12pt}}%
+ \*fdef outlabelfont
+ \*fdef labelfont
+ \*fdef ctextfont
+ \toks0={\CIusefont{\sfdefault}{10}{12pt}}%
+ \*fdef symfont
+ \toks0={\CIusefont{\rmdefault}{7}{8pt}}%
+ \*fdef pinnumberfont
+ \*fdef functionfont
+ \toks0={\CIusefont{\rmdefault}{8}{9.5pt}}%
+ \*fdef circlabelfont
+ \toks0={\CIusefont{\sfdefault}{8}{9.5pt}}%
+ \*fdef inlabelfont
+\or % magstep 1
+ \toks0={\CIusefont{\rmdefault}{12}{14pt}}%
+ \*fdef outlabelfont
+ \*fdef labelfont
+ \*fdef ctextfont
+ \toks0={\CIusefont{\sfdefault}{12}{14pt}}%
+ \*fdef symfont
+ \toks0={\CIusefont{\rmdefault}{8}{9.5pt}}%
+ \*fdef pinnumberfont
+ \toks0={\CIusefont{\rmdefault}{9}{11pt}}%
+ \*fdef functionfont
+ \*fdef circlabelfont
+ \toks0={\CIusefont{\sfdefault}{9}{11pt}}%
+ \*fdef inlabelfont
+\or % magstep 2
+ \toks0={\CIusefont{\rmdefault}{14.4}{18pt}}%
+ \*fdef outlabelfont
+ \*fdef labelfont
+ \*fdef ctextfont
+ \toks0={\CIusefont{\sfdefault}{14.4}{18pt}}%
+ \*fdef symfont
+ \toks0={\CIusefont{\rmdefault}{9}{11pt}}%
+ \*fdef pinnumberfont
+ \toks0={\CIusefont{\rmdefault}{10}{12pt}}%
+ \*fdef functionfont
+ \*fdef circlabelfont
+ \toks0={\CIusefont{\sfdefault}{10}{12pt}}%
+ \*fdef inlabelfont
+\or % magstep 3
+ \toks0={\CIusefont{\rmdefault}{17.28}{22pt}}%
+ \*fdef outlabelfont
+ \*fdef labelfont
+ \*fdef ctextfont
+ \toks0={\CIusefont{\sfdefault}{17.28}{22pt}}%
+ \*fdef symfont
+ \toks0={\CIusefont{\sfdefault}{10}{12pt}}%
+ \*fdef pinnumberfont
+ \toks0={\CIusefont{\rmdefault}{12}{14pt}}%
+ \*fdef functionfont
+ \*fdef circlabelfont
+ \toks0={\CIusefont{\sfdefault}{12}{14pt}}%
+ \*fdef inlabelfont
+\or % magstep 4
+ \toks0={\CIusefont{\rmdefault}{20.74}{25pt}}%
+ \*fdef outlabelfont
+ \*fdef labelfont
+ \*fdef ctextfont
+ \toks0={\CIusefont{\sfdefault}{20.74}{25pt}}%
+ \*fdef symfont
+ \toks0={\CIusefont{\rmdefault}{12}{14pt}}%
+ \*fdef pinnumberfont
+ \toks0={\CIusefont{\rmdefault}{14.4}{18pt}}%
+ \*fdef functionfont
+ \*fdef circlabelfont
+ \toks0={\CIusefont{\sfdefault}{14.4}{18pt}}%
+ \*fdef inlabelfont
+\else\errhelp{0 ... 4 expected.}\errmessage{Bad magnification!}\fi
+{\outlabelfont
+\global\*spc 0.4em}%
+\font\c*fnt=cirest scaled \*mag
+\font\c*fntb=cicirc scaled \*mag
+\font\c*fntd=cidiod scaled \*mag
+\font\c*fntt=cibimos scaled \*mag
+\font\c*fntw=ciwidko scaled \*mag
+\font\c*fnts=cisym scaled \*mag
+\outerspace1mm
+\pinnum*spc.7mm
+\pin*ind\fontdimen12\c*fntb
+\pin*spc\fontdimen13\c*fntb
+\io*ind\fontdimen14\c*fntb
+\mid*ind\fontdimen16\c*fntb
+\X*min\maxdimen
+\X*max-\maxdimen
+\the\CIRCfinit
+\begingroup
+ \the\rmacros
+ \let\.\junction
+ \def\- ##1 ##2 {\wire##1 ##2 }%
+ \def\= ##1 ##2 ##3 {\bundle##1 ##2 ##3 }%
+ \def\<{\ld*true}%
+\parindent0pt
+\offinterlineskip\setbox\*bbox=\hbox\bgroup\at 0 0 }
+\def\endcircuit{\egroup\leavevmode
+ \hbox{\kern-\X*min\unhbox\*bbox\kern\X*max}\endgroup
+ \PackageInfo{CIRC}{`\CIRCredef' restored}}
+\safedef{fallingEdge}{{\c*fnts\char3}}
+\safedef{raisingEdge}{{\c*fnts\char2}}
+\safedef{spike}{{\c*fnts\char4}}
+\safedef{ispike}{{\c*fnts\char12}}
+\safedef{squarePulse}{{\c*fnts\char1}}
+\safedef{squarePulses}{{\c*fnts\char5}}
+\safedef{sawtoothPuls}{{\c*fnt\char6}}
+\def\CIRCLogo{\c*fnt\cc*0\getc*252 \check*max{.5\wd*}\check*min{.5\wd*}%
+ \setbox\*bbox=\hbox to \wd*{\hss\lower\ht*\hbox to 0pt{\hss
+ \symfont\raise1.5ex\rlap{\kern1ex CIRC}\box\box*}\hss}\put*box\reset*ifs}
+\protectcirc
+\ProcessOptions
+\endinput
+%%
+%% End of file `circ.sty'.
diff --git a/Master/texmf-dist/tex/latex/circ/gate.def b/Master/texmf-dist/tex/latex/circ/gate.def
new file mode 100644
index 00000000000..8524e1aab5b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/gate.def
@@ -0,0 +1,86 @@
+%%
+%% This is file `gate.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `gate')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\ProvidesFile{gate.def}
+\freecirc
+\def\g*iio#1 #2 #3 #4 #5 {\dimen4\*X*\dimen5\*Y*
+ \rud*{#1}\getc*0
+ \stopos*\add*y\ic*\X*check\store*{\the\ru*pin}\rstpos*
+ \add*y{-\ic*}\store*{\the\ld*pin}\rstpos*
+ \add*x{.5\wd*}\store*:\add*x{.5\wd*}\X*check\store*{\the\m*pin}%
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi
+ \setbox\*bbox=\hbox{\ifpin\pinnumberfont
+ \dimen0\ic*\advance\dimen0\pinnum*spc
+ \raise\dimen0\rlap{\kern\pin*ind\hc*{#3}}%
+ \dimen0-\ic*\advance\dimen0\pinnum*spc
+ \raise\dimen0\rlap{\kern\pin*ind\hc*{#4}}%
+ \raise\pinnum*spc\rlap{\kern\wd*\kern-\pin*ind\hc*{#5}}\fi
+ \the\ldd*\box\box*}\put*box\reset*ifs
+ \*X*\dimen4\*Y*\dimen5}
+\def\g*io#1 #2 #3 #4 {\dimen4\*X*\dimen5\*Y*
+ \rud*{#1}\getc*0
+ \store*{\the\ld*pin}%
+ \add*x{.5\wd*}\store*:\add*x{.5\wd*}\X*check\store*{\the\m*pin}%
+ \ifhvcen*\shift*Ilist:\else\shift*Ilist{#2}\fi
+ \setbox\*bbox=\hbox{\ifpin\pinnumberfont
+ \raise\pinnum*spc\rlap{\kern\pin*ind\hc*{#3}}%
+ \raise\pinnum*spc\rlap{\kern\wd*\kern-\pin*ind\hc*{#4}}\fi
+ \the\ldd*\box\box*}\put*box\reset*ifs
+ \*X*\dimen4\*Y*\dimen5}
+\def\gateIIO#1 #2#3 #4#5 #6 #7 {\expandafter
+ \def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{#4}%
+ \ld*pin{#5}\m*pin{#6}\ru*pin{#7}\cc*#3 #2\g*iio}}
+\def\ldd*gN#1{\raise\fontdimen10\c*fntb
+ \blap{\hc*{\kern\wd*\symfont\,#1}}%
+ \lower\dp*
+ \vtop{\kern\*spc\hc*{\labelfont\kern\wd*\the\rud*}}}
+\def\ldd*OV{\ac*{\kern.8\wd*\ctextfont\the\rud*}}
+\def\NgateIIO#1 #2#3 #4 {\expandafter
+ \def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{\ldd*gN{#4}}%
+ \ld*pin{I2}\m*pin{O}\ru*pin{I1}\cc*#3 #2\g*iio}}
+\def\gateIO#1 #2#3 #4#5 #6 {\expandafter
+ \def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{#4}%
+ \ld*pin{#4}\m*pin{#5}\cc*#3 #2\g*io}}
+\def\NgateIO#1 #2#3 #4 {\expandafter
+ \def\csname#1\endcsname##1 {\name*{#1##1}\ldd*{\ldd*gN{#4}}%
+ \ld*pin{I}\m*pin{O}\cc*#3 #2\g*io}}
+\gateIIO OV \c*fntb 255 \ldd*OV + O -
+\gateIIO ov \c*fntb 254 \ldd*OV - O +
+\NgateIIO NAND \c*fntb 132 {$\&$}
+\NgateIIO AND \c*fntb 131 {$\&$}
+\NgateIIO OR \c*fntb 131 {$\ge$1}
+\NgateIIO NOR \c*fntb 132 {$\ge$1}
+\NgateIIO XOR \c*fntb 131 {$=$1}
+\NgateIIO XNOR \c*fntb 131 {$=$\vrule width 0pt height 1.5ex\,}
+\NgateIO INV \c*fntb 130 {1\,}
+\NgateIO ST \c*fntb 128 {{\c*fnts\char7}}
+\NgateIO STINV \c*fntb 130 {{\c*fnts\char7}}
+\NgateIO BUF \c*fntb 130 {{\c*fnts\char25}}
+\protectcirc
+\endinput
+%%
+%% End of file `gate.def'.
diff --git a/Master/texmf-dist/tex/latex/circ/ic.def b/Master/texmf-dist/tex/latex/circ/ic.def
new file mode 100644
index 00000000000..70ca371a2aa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/ic.def
@@ -0,0 +1,109 @@
+%%
+%% This is file `ic.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `ic')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\ProvidesFile{ic.def}
+\freecirc
+\def\**[#1 #2 #3 #4 {\cc*\cnta*\advance\cc*32 \advance\cc*#1
+ \Cstore*\*Ilist{#2}\Cadd*\*Ilist
+ \rlap{\kern\pin*ind\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#3}}\fi
+ \kern\io*ind\c*fntb\vc*{\hc*{\inlabelfont{#4}}}}\char\cc*
+ \cc*\cnta*\advance\cc*97\char\cc*}
+\def\**]#1 #2 #3 #4 {\cc*\cnta*\advance\cc*48 \advance\cc*#1
+ \Cstore*\*Olist{#2}\Cadd*\*Olist
+ \rlap{\kern.5\mid*ind\vc*{\hc*{\inlabelfont{#3}}}\kern\io*ind
+ \ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#4}}\fi}\char\cc*}
+\def\*F[#1 #2 #3 #4 #5 {\cc*\cnta*\advance\cc*#1
+ \X*check\Cstore*\*Ilist{#2}\Cadd*\*Ilist
+ \rlap{\kern\pin*ind\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#3}}\fi
+ \kern\io*ind\c*fntb\vc*{\hc*{\inlabelfont{#4}}}}%
+ \rlap{\kern\io*ind\kern\mid*ind
+ \blap{\kern0pt\hc*{\functionfont{#5}}}}\char\cc*
+ \cc*\cnta*\advance\cc*96\char\cc*}
+\def\*F]#1 #2 #3 #4 {\cc*\cnta*\advance\cc*16 \advance\cc*#1
+ \LX*check\*Olist\Cstore*\*Olist{#2}\Cadd*\*Olist
+ \rlap{\kern.5\mid*ind\vc*{\hc*{\inlabelfont{#3}}}\kern\io*ind
+ \ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#4}}\fi}\char\cc*}
+\def\*L[#1 #2 #3 #4 #5 {\cc*\cnta*\advance\cc*64 \advance\cc*#1
+ \Cstore*\*Ilist{#2}\Cadd*\*Ilist
+ \rlap{\kern\pin*ind\ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#3}}\fi
+ \kern\io*ind\c*fntb\vc*{\hc*{\inlabelfont{#4}}}}%
+ \rlap{\iflab*\kern\io*ind\kern\mid*ind
+ \vtop{\kern\fontdimen17\c*fntb\kern\outerspace
+ \hc*{\circlabelfont{#5}}}\fi}\char\cc*
+ \cc*\cnta*\advance\cc*98\char\cc*}
+\def\*L]#1 #2 #3 #4 {\cc*\cnta*\advance\cc*80 \advance\cc*#1
+ \Cstore*\*Olist{#2}\Cadd*\*Olist
+ \rlap{\kern.5\mid*ind\vc*{\hc*{\inlabelfont{#3}}}\kern\io*ind
+ \ifpin\raise\pinnum*spc\hc*{\pinnumberfont{#4}}\fi}\char\cc*}
+\def\*H#1 {\cc*\cnta*\X*check\Cadd*\*Ilist
+ \rlap{\kern\io*ind\kern\mid*ind\blap{\kern-\*spc\labelfont\hc*{#1\ }}}%
+ \char\cc*\cc*\cnta*\advance\cc*96\char\cc*\cc*\cnta*\advance\cc*16
+ \LX*check\*Olist\Cadd*\*Olist\char\cc*}
+\def\C*init{\dimen4\*X*\dimen5\*Y*
+ \setbox\*bbox=\vtop\bgroup\c*fntb\cnta*=0 \ignorespaces}
+\def\C*exit#1{\egroup\shift*IOlist{#1}\put*box\*X*\dimen4\*Y*\dimen5}
+\def\*o#1{$\overline{\hbox{#1}}$}
+\def\*|#1| {\hbox{#1}}
+\def\JKMSFF#1 #2 #3 #4 {\name*{JKMSFF#1}\C*init
+\*|\*F[2 S {} S {} \*F]0 . {} {} |
+\*|\**[1 J {} 1J \**]1 Q $\neg$ {} |
+\*|\**[3 C {} C1 \**]0 . {} {} |
+\*|\**[1 K {} 1K \**]2 NQ $\neg$ {} |
+\*|\*L[2 R {} R {#2} \*L]0 . {} {} |
+\C*exit{#3}}
+\def\DFF#1 #2 #3 #4 {\name*{DFF#1}\C*init
+\*|\*F[1 D {} 1D {} \*F]1 Q {} {} |
+\*|\**[0 . {} {} \**]0 . {} {} |
+\*|\*L[3 C {} C1 {#2} \*L]2 NQ {} {} |
+\C*exit{#3}}
+\def\RSFF#1 #2 #3 #4 {\name*{RSFF#1}\C*init
+\*|\*F[1 R {} R {} \*F]1 Q {} {} |
+\*|\**[0 . {} {} \**]0 . {} {} |
+\*|\*L[1 S {} S {#2} \*L]2 NQ {} {} |
+\C*exit{#3}}
+\def\NRSFF#1 #2 #3 #4 {\name*{NRSFF#1}\C*init
+\*|\*F[2 R {} R {} \*F]1 Q {} {} |
+\*|\**[0 . {} {} \**]0 . {} {} |
+\*|\*L[2 S {} S {#2} \*L]2 NQ {} {} |
+\C*exit{#3}}
+\def\fff#1 #2 #3 #4 {\name*{fff#1}\C*init
+\*|\*F[1 IS {6} IS { } \*F]1 OK OK 5 |
+\*|\**[0 . {} {} \**]0 . {} {} |
+\*|\**[1 IT {2} IT \**]1 O O 3 |
+\*|\**[0 . {} {} \**]0 . {} {} |
+\*|\*L[2 R {4} R {#2} \*L]1 OD OD 7 |
+\C*exit{#3}}
+\def\NULL#1 #2 #3 #4 {\name*{NULL#1}\C*init
+\*|\*H{$\vcenter{\hbox{\c*fnts\char25}}\ \infty$} |
+\*|\**[1 i+ {} + \**]1 o+ + {} |
+\*|\**[0 . {} {} \**]0 . {} {} |
+\*|\*L[1 i- {} $-$ {#2} \*L]1 o- $-$ {} |
+\C*exit{#3}}
+\protectcirc
+\endinput
+%%
+%% End of file `ic.def'.
diff --git a/Master/texmf-dist/tex/latex/circ/oldgate.def b/Master/texmf-dist/tex/latex/circ/oldgate.def
new file mode 100644
index 00000000000..95331f0b26f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/oldgate.def
@@ -0,0 +1,37 @@
+%%
+%% This is file `oldgate.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `oldgate')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\freecirc
+\NgateIIO oldAND \c*fntb 133 {}
+\NgateIIO oldNAND \c*fntb 134 {}
+\NgateIIO oldOR \c*fntb 135 {}
+\NgateIIO oldNOR \c*fntb 136 {}
+\NgateIIO oldXOR \c*fntb 137 {}
+\protectcirc
+\endinput
+%%
+%% End of file `oldgate.def'.
diff --git a/Master/texmf-dist/tex/latex/circ/optics.def b/Master/texmf-dist/tex/latex/circ/optics.def
new file mode 100644
index 00000000000..8614ae8e827
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/optics.def
@@ -0,0 +1,79 @@
+%%
+%% This is file `optics.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `optics')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\ProvidesFile{optics.def}
+\freecirc
+\safedef{Dtext}#1 from #2 to #3 {{
+ \frompin{#2} \save*XY\frompin{#3} \diff*XY
+ \ifdim\**X=0pt
+ \dimen0\**Y
+ \ifdim\**Y<0pt\dimen0-\dimen0\fi
+ \c*fnts\setbox0=\hbox{\char9}\setbox1=\hbox{\char11}%
+ \c*fnt\setbox2=\hbox{\char132}\dp1=0pt
+ \advance\dimen0-\ht0\calc*u
+ \setbox\*bbox=
+ \vtop{\box1\loop\ifnum\cntb*>0\copy2
+ \advance\cntb*-1\repeat\box0}%
+ \put*box\advance\*X*\*spc\advance\*Y*.5\**Y\put\vc*{\hbox{#1}}
+ \else
+ \ifdim\**Y=0pt
+ \advance\*X*\**X
+ \dimen0\**X
+ \ifdim\**X<0pt\dimen0-\dimen0\fi
+ \c*fnts\setbox0=\hbox{\char8}\setbox1=\hbox{\char10}%
+ \c*fnt\advance\dimen0-\wd0\calc*u
+ \setbox\*bbox=\hbox{\box0\loop\ifnum\cntb*>0\advance\cntb*-1
+ \char129\repeat\box1}%
+ \put*box\advance\*X*-.5\**X\advance\*Y*\*spc\put\hc*{#1}
+ \else\errhelp{Only horizontal or vertical labeling allowed.}%
+ \errmessage{Bad points!}\fi\fi}}
+\addCIRCfont cioptic
+\cwdef oa {128\CIRCcioptic}
+\cdef SLens L \CIRCcioptic 0
+\cdefiv HSLens L \CIRCcioptic 2 | )
+\cdef BLens L \CIRCcioptic 6
+\cdefiv HBLens L \CIRCcioptic 8 | )
+\cdef VLens L \CIRCcioptic 12
+\cdefiv HVLens L \CIRCcioptic 14 | (
+\cdefviii Mirror M \CIRCcioptic 85 * . +
+\cdefviii BSplit BS \CIRCcioptic 36 * . +
+\cdef Polar P \CIRCcioptic 44
+\cdef Pinhole {} \CIRCcioptic 46
+\cdefiv Cam {} \CIRCcioptic 66 . |
+\cdef ScrL {} \CIRCcioptic 72
+\cdef ScrR {} \CIRCcioptic 74
+\cdef ScrBL {} \CIRCcioptic 76
+\cdef ScrBR {} \CIRCcioptic 78
+\cdef ScrTL {} \CIRCcioptic 80
+\cdef ScrTR {} \CIRCcioptic 82
+\cdef Laser {} \CIRCcioptic 160
+\cdef PM {} \CIRCcioptic 162
+\bbdefNeTii OM \CIRCcioptic 164 {}
+\protectcirc
+\endinput
+%%
+%% End of file `optics.def'.
diff --git a/Master/texmf-dist/tex/latex/circ/physics.def b/Master/texmf-dist/tex/latex/circ/physics.def
new file mode 100644
index 00000000000..fba16b09649
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/circ/physics.def
@@ -0,0 +1,43 @@
+%%
+%% This is file `physics.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% circ.dtx (with options: `ciphysic')
+%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
+%% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
+%%
+%% This program is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation; either version 2 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program; if not, write to the Free Software
+%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%%
+%% For error reports concerning UNCHANGED versions of this file no
+%% more than one year old, see CIRC.DVI after installation.
+%% If installation fails search thru this file for 'bug'.
+\freecirc
+\addCIRCfont ciphysic
+\cdef spring k \CIRCciphysic 0
+\cdef lspring k \CIRCciphysic 2
+\cdef fdmass m \CIRCciphysic 4
+\cdef dmass m \CIRCciphysic 6
+\cdefiv fmass m \CIRCciphysic 8 . *
+\cdefiv mass m \CIRCciphysic 12 . *
+\cdefivNL wall \CIRCciphysic 16 . |
+\cdefivNL tile \CIRCciphysic 20 . *
+\cdef spinu S \CIRCciphysic 24
+\cdef spind S \CIRCciphysic 26
+\protectcirc
+\endinput
+%%
+%% End of file `physics.def'.