summaryrefslogtreecommitdiff
path: root/graphics/pstricks/contrib/pst-circ
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/pstricks/contrib/pst-circ
Initial commit
Diffstat (limited to 'graphics/pstricks/contrib/pst-circ')
-rw-r--r--graphics/pstricks/contrib/pst-circ/Changes89
-rw-r--r--graphics/pstricks/contrib/pst-circ/README43
-rw-r--r--graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.bib67
-rw-r--r--graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.pdfbin0 -> 854742 bytes
-rw-r--r--graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.tex4211
-rw-r--r--graphics/pstricks/contrib/pst-circ/dvips/pst-circ.pro27
-rw-r--r--graphics/pstricks/contrib/pst-circ/latex/pst-circ.sty14
-rw-r--r--graphics/pstricks/contrib/pst-circ/tex/pst-circ.tex5752
8 files changed, 10203 insertions, 0 deletions
diff --git a/graphics/pstricks/contrib/pst-circ/Changes b/graphics/pstricks/contrib/pst-circ/Changes
new file mode 100644
index 0000000000..219fbd3b91
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/Changes
@@ -0,0 +1,89 @@
+2.16 2019-01-22 fix for arrows in coil-elektor
+2.15 2017-11-16 fix bug with TRot=180 for \transistor
+2.14 2016-08-21 fix bug with \splitter
+2.13 2015-04-15 added some new components (Piere Vivegnis)
+2.12a 2014-10-09 Updated documentation
+2.12 2014-07-30 Added new tripole powermeter.
+2.11 2014-06-24 Added new key circ={} for specific key setting.
+2.10 2014-06-19 Added more alternative styles (Patrice Mégret)
+ fixed bug for quadrupoles
+2.09 2014-05-18 - allow empty arguments for logicSymbolstyle and
+ logicLabelstyle
+2.08 2014-04-19 - added labeloffset for \mixer
+2.07 2014-04-15 - added some more symbols for microwaves
+2.06 2014-04-01 - small fix for missing arrowinset
+2.05 2013-10-03 - added new optional argument tensionstyle
+2.04 2013-06-13 - added new optional argument matlabel and labelstyle
+2.03 2013-05-15 - added new symbol newSwitch and new option ison (cs)
+2.02 2011-05-11 - fix bug with \psdot in transistor module
+2.01 2011-03-03 - typos
+2.00 2011-01-28 - new IEEE symbols for integrated circuits
+ - some more new symbols
+1.57 2010-11-06 - new optional argument for a schottky diode
+ - improved FET transistor symbol
+1.56 2010-09-18 - fixed bug with \circledipole
+1.55 2010-08-15 - circledipole with variable radius
+ - added macro \newCircDipole (cb)
+1.54 2010-03-29 - fix bug in \Transformer
+ - allow any coordinate type in \Transformer
+1.53 2010-02-13 - add OpenDipol and OpenTripol
+1.52 2010-01-15 - add photo diode symbol
+ quadripol symbol
+ RelayNOP symbol (Relay normally open)
+ Suppressor symbol
+ Arrestor symbol
+1.51 2009-02-21 - add SQUID symbol
+1.50 2009-02-01 - add RFLine symbol
+ - internal changes to the code
+ - make all microwave symbols work with
+ multinode
+ - fix several bugs in the documentation
+1.49 2008-11-18 (hv) - fix bug with edge, renamed to circedge
+ - fixed bug with the current arrows of transsistor type
+ - renamed \next to \circnext
+1.48 2008-09-26 (hv) - new option memory for a FET, suggested by
+ Christoph Friederich (doesn't really work)
+ - fix bug with TRot for FET type
+ - added dipolestyle twoCircles for Icc
+1.47 2008-08-06 (hv) - fix bug with \newcommand instead of \def
+1.46 2008-07-15 (hv) - optional dot for the (new)ground symbol (rw)
+ - added dipolstyle crystal for the capacitor
+1.45 2008-03-16 (hv) - fix bug with a switch as multidipole
+1.44 2008-02-28 (hv) - added the microwave part (Francois Boone)
+1.43 2007-12-18 (hv) - fixed bug with \@empty
+1.42 2007-10-15 (hv) - added better FET support (Ted Pavlic)
+ - small changes to draw@dipole (Alan Ristow)
+1.41 2007-04-23 (hv) added dipolestyle varistor
+1.40 2007-03-23 (hv) fix bug with \@empty in the psset part
+1.39 2005-04-03 (hv) fixed introduced bug in wire
+1.38 2005-03-07 (hv) added an option for the OA and some more
+ types for dipoles
+1.37 2005-03-06 (hv) fix bug with wire and arrows
+1.36 2005-02-14 (hv) add another zener symbol
+1.35 2005-02-06 (hv) fix some bugs in the documentation
+1.34 2004-12-31 (hv) new transistormacro
+1.33 2004-12-28 (hv) fix bug for specialCoor in transistor
+1.32 2004-12-28 (hv) make transistor changeLR option run
+1.31 2004-12-27 (hv) make transistor run
+1.30 2004-12-28 (hv) make option arrows=... available, but
+ transistor is broken for this version
+1.22 2004-10-31 (hv) use pst-xkey instead of pst-key
+1.21 2004-06-10 (hv) option for the logic symbol
+1.20 2004-04-30 (hv) options for the logic part
+1.2b 2003-08-30 (hv) new tripole potentiometer,
+ fixes some typos in the doc
+1.2a 2003-08-28 (hv) added options for ground
+1.2 2003-07-28 (hv) added dipolestyle "optoCoupler" and the logic part (Flip Flops)
+1.1b 2003-07-24 (hv) added dipolestyle "triac" and use "rectangle" also for the
+ quadrupol transformer; added quadrupol optoCoupler
+1.1a 2003-07-22 (hv) fix a bug with tension
+1.1 2003-07-18 (hv) fix some bugs and added new dipolestyles for the diode/resistor
+1.0 2003-07-10 (cj) first CTAN version
+
+
+-- pst-circ.sty ---
+2007-03-23 (hv) added message for pst-circ.pro
+
+
+-- pst-circ.pro ---
+0.01 2007-03-23 (hv) first version
diff --git a/graphics/pstricks/contrib/pst-circ/README b/graphics/pstricks/contrib/pst-circ/README
new file mode 100644
index 0000000000..036bc3bfb7
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/README
@@ -0,0 +1,43 @@
+Save the files pst-circ.sty|tex in a directory, which is part of your
+local TeX tree. pst-circ.pro should be saved in ../texmf/dvips/pstricks/
+Then do not forget to run texhash to update this tree.
+pst-circ needs pst-node and pstricks, which should be part of your
+local TeX installation, otherwise get it from a CTAN server, f.ex.
+http://mirror.ctan.org
+
+
+Save the files
+
+pst-circ.sty
+pst-circ.tex
+pst-circ.pro
+
+in any place, where latex or any other TeX program will find it.
+Do not forget to update your database, when installing this
+package the first time.
+
+pst-circ uses the extended version of the keyval package. So
+be sure that you
+- have installed xkeyval with the special pst-xkey
+ (CTAN: macros/latex/contrib/xkeyval/)
+- do not load another package after pst-circ, which loads
+ the old keyval.sty or pst-key.tex
+
+
+If you like to get the documentation file in another format run
+
+latex pst-circ-doc.tex
+biber pst-circ.doc
+latex pst-circ-doc.tex
+dvips pst-circ-doc.dvi
+
+to get a PostScript file. But pay attention, that the pst-circ
+files are saved in the above mentioned way, before you run
+latex on the documentation file.
+
+The intermediate DVI file works only with viewers which can
+interprete the embedded PostScript code.
+
+For another PDF output read the Introduction from
+the documentation.
+hvoss@tug.org \ No newline at end of file
diff --git a/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.bib b/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.bib
new file mode 100644
index 0000000000..ead359beff
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.bib
@@ -0,0 +1,67 @@
+%% -*-bibtex-*-
+@STRING{tugboat = {TUGboat} }
+@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} }
+
+@Book{companion,
+ author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Dennis Roegel and Herbert Vo\ss},
+ title = {The {\LaTeX} {G}raphics {C}ompanion},
+ publisher = {{Addison-Wesley Publishing Company}},
+ edition = {second},
+ year = {2007},
+ address = {Boston, Mass.}
+}
+
+@Article{girou:01:,
+ author = {Denis Girou},
+ title = {Pr\'esentation de {PST}ricks},
+ journal = {Cahier {GUT}enberg},
+ year = 1994,
+ volume = {16},
+ month = apr,
+ pages = {21-70}
+}
+
+@Article{girou:02:,
+ author = {{Timothy Van} Zandt and Denis Girou},
+ title = {Inside {PST}ricks},
+ journal = TUGboat,
+ year = 1994,
+ volume = {15},
+ month = sep,
+ pages = {239-246}
+}
+
+@Book{PostScript,
+ Author = {Kollock, Nikolai G.},
+ Title = {Post{S}cript richtig eingesetzt: vom {K}onzept zum
+ praktischen {E}insatz},
+ Publisher = {IWT},
+ Address = {Vaterstetten},
+ year = 1989,
+}
+
+@Manual{multido,
+ Title = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition},
+ Author = {{Timothy Van} Zandt},
+ Organization = {},
+ Address = {\url{CTAN:/macros/generic/multido.tex}},
+ Note = {},
+ year = 1997
+}
+
+@Book{PSTricks2,
+ author = {Herbert Vo\ss{}},
+ title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
+ edition = {6},
+ publisher = {DANTE -- lehmanns media},
+ year = {2010},
+ address = {Heidelberg/Berlin}
+}
+
+@Book{PSTricks2-UIT,
+ author = {Herbert Vo\ss},
+ title = {PSTricks -- Graphics for \LaTeX},
+ publisher = {UIT},
+ year = {2011},
+ address = {Cambridge/UK}
+}
diff --git a/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.pdf b/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.pdf
new file mode 100644
index 0000000000..11826d5e5e
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.pdf
Binary files differ
diff --git a/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.tex b/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.tex
new file mode 100644
index 0000000000..35f974c0cf
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/doc/pst-circ-doc.tex
@@ -0,0 +1,4211 @@
+%% $Id: pst-circ-doc.tex 918 2019-01-22 16:41:03Z herbert $
+\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,
+ headings=small, headinclude=false,footinclude=false,oneside,abstract=on]{pst-doc}
+\usepackage{pst-circ}
+\let\pstCircFV\fileversion
+\usepackage{amsmath,siunitx}
+
+\addbibresource{\jobname.bib}
+\DeclareSIUnit\dbm{dBm} %% Définition du dBm
+\lstset{explpreset={pos=l,wide=false,rframe=},language=PSTricks,
+ morekeywords={multidipole,parallel},basicstyle=\footnotesize\ttfamily}
+%
+\newcommand\CircPackage{\LPack{pst-circ}}
+\makeatletter
+\renewenvironment{description}
+ {\list{}{\labelwidth\z@ \itemindent-\leftmargin
+ \itemsep0pt \parsep0pt
+ \let\makelabel\descriptionlabel}}
+ {\endlist}
+\makeatother
+
+\def\bgImage{\resizebox{0.75\linewidth}{!}{%
+\begin{pspicture}(1,2)(19,9)
+ \pnode(2,8){A} \antenna{90}(A)
+ \rput(4,8){\rnode{B}{\psframebox{\begin{tabular}{c}Ferrite\\Switch\end{tabular}}}}
+ \ncline{A}{B}
+ %%% Branche Calibration
+ \pnode(4,6){C} \pnode(4,4){D} \pnode(5,5){E}
+ \circulator[tripolestyle=isolator,tripoleconfig=right]{90}(C)(D)(E){Isolator}{}
+ \ncline{B}{C}
+ \pnode(3,3){F} \pnode(5,3){G}
+ \resistor[unit=0.5,dipolestyle=zigzag,variable=true](F)(G){}
+ \pnode(4,3){H}
+ \ncline{D}{H}
+ \rput[t](4,2.75){%
+ \begin{tabular}{c}
+ Hot and Cold\\
+ loads for calibration
+ \end{tabular}}
+ %%% Branche reception
+ \pnode(6,8){R1} \pnode(8,8){R2} \pnode(7,7){X1}
+ \circulator[tripolestyle=isolator,tripoleconfig=right]{180}(R1)(R2)(X1){Isolator}{}
+ \ncline{B}{R1}
+ \pnode(10,8){R3} \pnode(9,7){X2}
+ \mixer[inputarrow,fillcolor=blue,fillstyle=solid, labeloffset=0.8](R2)(R3)(X2){Mixer}{}
+ \pnode(9,6){X3}
+ \oscillator[output=top](X3){LO}{}
+ \pnode(12,8){R4}
+ \ncline{R3}{R4}
+ \naput{0.5~GHZ}
+ \pnode(14,8){R5}
+ \filter[labeloffset=0.8](R4)(R5){BPF}%
+ \pnode(16,8){R6}
+ \amplifier[inputarrow=true,fillcolor=red,fillstyle=solid, labeloffset=0.8](R5)(R6){IF~Amp}
+ \pnode(18,8){R7}
+ \detector[inputarrow=true, labeloffset=0.8](R6)(R7){Detector}
+ \pnode(18,4){R8}
+ \amplifier[inputarrow=true,labeloffset=-1](R7)(R8){Amp}
+ \pscircle[fillstyle=solid,fillcolor=white](18,4){0.1}
+ \rput[t](18,3.9){%
+ \begin{tabular}{c}
+ Output\\
+ for processing
+ \end{tabular}}
+\end{pspicture}}
+}
+\lstset{preset={\centering},vsep=5mm}
+
+
+\begin{document}
+
+\title{\texttt{pst-circ}}
+\subtitle{A PSTricks package for drawing electric circuits; v.\pstCircFV}
+\author{%Christoph Jorssen \\
+Herbert Vo\ss}
+%\docauthor{Herbert Vo\ss}
+\date{\today}
+\maketitle
+
+\tableofcontents
+
+\clearpage
+
+\begin{abstract}
+\noindent
+The package \LPack{pst-circ} is a collection of graphical elements based
+on PStricks that can be used to facilitate display of electronic
+circuit elements. For example, an equivalent circuit of a voltage
+source, its source impedance, and a connected load can easily be
+constructed along with arrows indicating current flow and potential
+differences. The emphasis is upon the circuit elements and the
+details of the exact placement are hidden as much as possible so the
+author can focus on the circuitry without the distraction of sorting
+out the underlying vector graphics.
+
+\LPack{pst-circ} loads by default the following packages: \LPack{pst-node},
+\LPack{multido}, \LPack{pst-xkey}, and, of course \LPack{pstricks}.
+All should be already part of your local \TeX\ installation. If not, or in case
+of having older versions, go to \url{http://www.CTAN.org/} and load the newest version.
+
+\vfill\noindent
+\raggedright
+\begin{sloppypar}
+Thanks to: \\
+\mbox{Rafal Bartczuk},
+\mbox{Christoph Bersch},
+\mbox{Fran\c{c}ois Boone},
+\mbox{Vincent Breton},
+ \mbox{Jean-C\^ome Charpentier},
+ \mbox{Patrick Drechsler},
+ \mbox{Amit Finkler},
+ \mbox{Felix Gottwald},
+ \mbox{Markus Graube},
+ \mbox{Henning Heinze},
+ \mbox{Christophe Jorssen},
+ \mbox{Bernd Landwehr},
+ \mbox{Michael Lauterbach},
+ \mbox{Manuel Luque},
+ \mbox{Steven P. McPherson},
+ \mbox{Patrice Mégret},
+ \mbox{Ted Pavlic},
+ \mbox{Alan Ristow},
+ \mbox{Uwe Siart},
+ \mbox{Carlos Marcelo de Oliveira Stein},
+ \mbox{Pierre Vivegnis},
+\mbox{Douglas Waud},
+\mbox{Richard Weissnar}, and
+\mbox{Felix Wienker}.
+\end{sloppypar}
+\end{abstract}
+
+\clearpage
+
+\section{The basic system}
+
+\subsection{Parameters}
+
+There are specific parameters defined to change easily the behaviour of the \LPack{pst-circ}
+objects you are drawing. You'll find a list in Section~\ref{sec:para} on p.~\pageref{sec:para}.
+
+\iffalse
+\begin{longtable}{@{}>{\ttfamily}l l l@{}}
+\textrm{\emph{name}} & \emph{type} & \emph{default}\\\hline
+\endhead
+\Lkeyword{intensity} & boolean & \emph{false} \\
+\Lkeyword{intensitylabel} & string & \emph{ } \\
+\Lkeyword{intensitylabeloffset} & dimension & \emph{ 0.5} \\
+\Lkeyword{intensitycolor} & color & \emph{ black} \\
+\Lkeyword{intensitylabelcolor} & color & \emph{ black} \\
+\Lkeyword{intensitywidth} & dimension & \emph{ \texttt{\Lcs{pslinewidth}}} \\
+\Lkeyword{tension} & boolean & \emph{ false} \\
+\Lkeyword{tensionstyle} & string& \emph{line} \\
+\Lkeyword{tensionlabel} & string & \emph{ } \\
+\Lkeyword{tensionoffset} & dimension & \emph{ 1} \\
+\Lkeyword{tensionlabeloffset} & dimension & \emph{ 1.2} \\
+\Lkeyword{tensioncolor} & color & \emph{ black} \\
+\Lkeyword{tensionlabelcolor} & color & \emph{ black} \\
+\Lkeyword{tensionwidth} & dimension & \emph{ \texttt{\Lcs{pslinewidth}}} \\
+\Lkeyword{labeloffset} & dimension & \emph{ 0.7} \\
+\Lkeyword{labelangle} & label angle & \emph{ 0} \\
+\Lkeyword{labelInside} & integer & \emph{ 0} \\
+\Lkeyword{dipoleconvention} & & \emph{ receptor} \\
+\Lkeyword{directconvetion} & boolean & \emph{ true} \\
+\Lkeyword{dipolestyle} & string & \emph{ normal} \\
+\Lkeyword{variable} & boolean & \emph{ false} \\
+\Lkeyword{parallel} & boolean & \emph{ false} \\
+\Lkeyword{parallelarm} & dimension & \emph{ 1.5} \\
+\Lkeyword{parallelsep} & real & \emph{ 0} \\
+\Lkeyword{parallelnode} & boolean & \emph{ false} \\
+\Lkeyword{intersect} & boolean & \emph{ false} \\
+\Lkeyword{intersectA} & node & \\
+\Lkeyword{intersectB} & node & \\
+\Lkeyword{OAinvert} & boolean & \emph{ true} \\
+\Lkeyword{OAperfect} & boolean & \emph{ true} \\
+\Lkeyword{OAiplus} & boolean & \emph{ false} \\
+\Lkeyword{OAiminus} & boolean & \emph{ false} \\
+\Lkeyword{OAiout} & boolean & \emph{ false} \\
+\Lkeyword{OAipluslabel} & string & \emph{ } \\
+\Lkeyword{OAiminuslabel} & string & \emph{ } \\
+\Lkeyword{OAioutlabel} & string & \emph{ } \\
+\Lkeyword{transistorcircle} & boolean & \emph{ true} \\
+\Lkeyword{transistorinvert} & boolean & \emph{ false} \\
+\Lkeyword{transistoribase} & boolean & \emph{ false} \\
+\Lkeyword{transistoricollector} & boolean & \emph{ false} \\
+\Lkeyword{transistoriemitter} & boolean & \emph{ false} \\
+\Lkeyword{transistoribaselabel} & string & \emph{ } \\
+\Lkeyword{transistoricollectorlabel} & string & \emph{ } \\
+\Lkeyword{transistoriemitterlabel} & string & \emph{ } \\
+\Lkeyword{TRot} & angle & \emph{ 0} \\
+\Lkeyword{edge} & macro & \emph{ \texttt{\textbackslash ncangles}} \\
+\Lkeyword{transistortype} & string & \emph{ NPN} \\
+\Lkeyword{FETchanneltype} & string & \emph{ N} \\
+\Lkeyword{FETmemory} & boolean & \emph{ false} \\
+\Lkeyword{primarylabel} & string & \emph{ } \\
+\Lkeyword{secondarylabel} & string & \emph{ } \\
+\Lkeyword{transformeriprimary} & boolean & \emph{ false} \\
+\Lkeyword{transformerisecondary} & boolean & \emph{ false} \\
+\Lkeyword{transformeriprimarylabel} & string & \emph{ } \\
+\Lkeyword{transformerisecondarylabel} & string & \emph{ } \\
+\Lkeyword{tripolestyle} & string & \emph{ normal}
+\end{longtable}
+\fi
+
+\subsection{Macros}
+
+\subsubsection{Dipole macros}
+\xLcs{resistor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=true](3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \resistor(A)(B){$R$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{RFLine}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=true](3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \RFLine(A)(B){R}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{capacitor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=true](3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \capacitor(A)(B){$C$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{battery}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \battery(A)(B){$E$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{coil}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil(A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{Ucc}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Ucc[dipolestyle=normal](A)(B){$E$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Ucc[dipolestyle=diamond](A)(B){$E$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Ucc[dipolestyle=normalCei](A)(B){$E$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Ucc[dipolestyle=diamondCei](A)(B){$E$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\xLcs{Icc}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Icc[dipolestyle=normal](A)(B){$\eta$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Icc[dipolestyle=twoCircles](A)(B){$\eta$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+\Icc[dipolestyle=diamond](A)(B){$\eta$}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+
+
+
+\xLcs{switch}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \switch(A)(B){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \switch[dipolestyle=close](A)(B){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{arrowswitch}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \arrowswitch(A)(B){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \arrowswitch[dipolestyle=close](A)(B){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\xLcs{diode}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \diode(A)(B){$D$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{Zener}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Zener(A)(B){$D$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{lamp}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \lamp(A)(B){$\mathcal L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{circledipole}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \circledipole(A)(B){$\mathcal G$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{labeloffset}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \circledipole[labeloffset=0](A)(B){\Large\textbf{A}}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{LED}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \LED(A)(B){$\mathcal D$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \SQUID(A)(B){S}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{RelayNOP}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,0){A}(3,0){B}%Relay normally open
+ \RelayNOP[labeloffset=1.6](A)(B){RelayNOP}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{Suppressor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}% Suppressor (Diode)
+ \Suppressor[labeloffset=0.5](A)(B){Supressor}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{Arrestor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ % Arrestor (Lightning protection)
+ \Arrestor(A)(B){Arrestor}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \cell[labeloffset=1cm](A)(B){Cell}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \igbt[labeloffset=0.7cm, IGBTinvert=false](A)(B){IGBT}
+\end{pspicture}
+\end{LTXexample}
+
+
+\bigskip
+\subsubsection{Tripole macros}
+
+Obviously, \Index{tripole}s are not node connections. So \LPack{pst-circ} tries its best to adjust the
+position of the tripole regarding the three nodes. Internally, the connections are done by the
+\Lcs{ncangle} pst-node macro. However, the auto-positionning and the auto-connections are not always
+well chosen, so don't try to use tripole macros in strange situations!
+
+
+\xLcs{OA}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+ \pnodes(0,0){A}(0,2){B}(5,1){C}
+ \OA(B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{OApower}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+ \pnodes(0,0){A}(0,2){B}(5,1){C}
+ \OA[OApower=true](B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{GM}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+ \pnodes(0,0){A}(0,2){B}(5,1){C}
+ \GM[GMperfect=true](B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{GMpower}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+ \pnodes(0,0){A}(0,2){B}(5,1){C}
+ \GM[GMpower=true](B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+There are 5 types of transistors included : NPN, PNP, FET, NMOS and PMOS. It's the macro \Lcs{transistortype} that determines which transistor will be drawn.
+
+\xLcs{transistor}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnodes(0,2){A}(3,1){B}(3,3){C}
+\transistor(A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transistorFET}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnodes(0,2){A}(3,1){B}(3,3){C}
+\transistor[basesep=1cm, transistortype=FET](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transistorNMOS}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnodes(0,2){A}(3,1){B}(3,3){C}
+\transistor[basesep=1cm, transistortype=NMOS, transistorcircle=false](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transistor}\xLkeyword{TRot}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}[showgrid](3,4)
+\pnodes(3,2){A}(0,1){B}(0,3){C}
+\transistor[TRot=180](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\xLkeyword{TRot}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}[showgrid=true](5,5)
+\pnode(1,3){b}
+\transistor[TRot=90](b){emitter}{collector}
+\transistor[TRot=45](4,4){emitter}{collector}
+\transistor[TRot=180](1,1){emitter}{collector}
+\transistor[TRot=180,transistorinvert=true]%
+ (4,1){emitter}{collector}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{transistortype=PNP}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnodes(0,2){A}(3,1){B}(3,3){C}
+\transistor[transistortype=PNP](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{basesep}\xLkeyword{arrows}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,1.5){A}(5,0){B}(5,3){C}
+ \transistor[basesep=2cm,arrows=o-o](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{basesep}\xLkeyword{transistoriemitter}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnode(0,2){A}\pnode(3,0.5){B}
+\pnode(3,3.5){C}
+\transistor[transistoriemitter=true,
+ basesep=1cm](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{basesep}\xLkeyword{transistorinvert}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnode(0,2){A}\pnode(3,1){B}
+\pnode(3,3){C}
+\transistor[transistorinvert,
+ basesep=1cm](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{transistortype=PNP}
+\xLkeyword{basesep}\xLnotation{Emitter}\xLkeyword{nodesep}\xLnotation{Collector}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnode(0,1.5){A}\psset{linewidth=1pt}
+ \transistor[transistortype=PNP,basesep=2cm,
+ arrows=o-o](A){Emitter}{Collector}
+ \psline{o-}(5,3)(3,3)(3,3|Collector)(Collector)
+ \psline{o-}(5,0)(3,0)(3,3|Emitter)(Emitter)
+ \psline{o-}(A)([nodesep=2]A)
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{Tswitch}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+ \pnodes(0,2){A}(5,2){B}(0,0){C}
+ \Tswitch(A)(B)(C){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{potentiometer}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,1){A}(3,1){B}(3,2.25){C}
+ \potentiometer[labeloffset=0pt](A)(B)(C){$P$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transistorFET}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,4)
+\pnodes(0,2){A}(3,1){B}(3,3){C}
+\transistor[basesep=1cm, transistortype=FET, FETchanneltype=P](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[pos=b]
+\psset{mathlabel}
+\def\pcTran(#1)(#2){\psline(#1)(#2|#1)(#2)}% only 2 segements
+\psset{circedge=\pcTran,connectingdot=false}
+
+\begin{pspicture}(10,10)
+\pnodes(1,1){G1}(6,1){G2}(7.5,1){G3}
+\newground[arrows=o](G1)\newground(G2)\newground(G3)
+\pnodes(1,3){D1u}(7,3){T1B}(0,3){IB}(4,4){T2B}
+\newdiode(G1)(D1u){D1}\qdisk(D1u){2pt}
+\transistor[TRot=270,arrows=-o](T2B)(IB)(T1B)
+\pnode(8,7){O1}%junction to out
+\transistor(T1B)(G3)(O1)
+\pnodes(1,6){D2u}(1,4){G4}
+\newground(G4)
+\newdiode(G4)(D2u){D2}\qdisk(D2u){2pt}
+\pnodes(2.5,7){T4B}(0,6){IA}(5.5,5){T3B}(6,7){R3d}
+\transistor[TRot=270,arrows=-o](T4B)(IA)(T3B)\uput[90](IA){$\mathtt{A}$}
+\transistor(T3B)(G2)(R3d)\uput[90](IB){$\mathtt{B}$}
+\pnodes(2.5,10){VCC1}(4,10){VCC2}(6,10){VCC3}
+\resistor[arrows=o-](VCC1)(T4B){4{,}7k\Omega}
+\resistor[arrows=o-](VCC2)(T2B){4{,}7k\Omega}
+\resistor[arrows=o-](VCC3)(R3d){100\Omega}
+\wire[arrows=*-o](R3d)(O1)
+\uput[90](O1){$\mathtt{OUT}$} \qdisk(7.5,7){2pt}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\clearpage
+\subsubsection{Quadrupole macros}
+
+\xLcs{quadripole}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,2.5){A}(0,0.5){B}%
+ (4,2.5){C}(4,0.5){D}
+ \quadripole(A)(B)(C)(D){Text}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transformer}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,5)
+ \pnodes(0,5){A}(0,0){B}%
+ (5,5){C}(5,0){D}
+ \transformer(A)(B)(C)(D){$\mathcal T$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\xLcs{newtransformer}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \newtransformer(A)(B){$\mathcal T$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\xLcs{newtransformerquad}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,3){A}(0,0){B}%
+ (5,3){C}(5,0){D}
+ \newtransformerquad(A)(B)(C)(D)%
+ {$\mathcal T$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{optoCoupler}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,2.5){A}(0,0.5){B}%
+ (4,2.5){C}(4,0.5){D}
+ \optoCoupler(A)(B)(C)(D){$OC$}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\subsubsection{Multidipole}
+
+\Lcs{multidipole} is a macro that allows multiple dipoles to be drawn between two specified nodes.
+\Lcs{multidipole} takes as many arguments as you want. Note the \rnode{Dot}{dot} that is
+after the last dipole.
+
+\bigskip
+\xLcs{diode}\xLcs{resistor}\xLcs{caoacitor}
+\begin{minipage}{7cm}
+\begin{pspicture}(7,7)
+ \pnodes(0,0){A}(7,7){B}
+ \multidipole(A)(B)\resistor{$R$}%
+ \capacitor[linecolor=red]{$C$}%
+ \diode{$D$}{}\rnode{Dot2}{}.
+\end{pspicture}
+\end{minipage}\hfill
+\begin{minipage}{6cm}
+\verb+\begin{pspicture}(7,7)+\\
+\verb+ \pnodes(0,0){A}(7,7){B}+\\
+\verb+ \multidipole(A)(B)\resistor{$R$}%+\\
+\verb+ \capacitor[linecolor=red]{$C$}%+\\
+\verb+ \diode{$D$}{}+\rnode{Dot2}{}.\\
+\verb+\end{pspicture}+
+\end{minipage}
+
+
+\bigskip
+\ncangles[linestyle=dashed,linecolor=gray,nodesep=3pt,armA=.5cm,angleA=-90,armB=4cm,angleB=0]{->}{Dot}{Dot2}
+Important: for the time being, \Lcs{multidipole} takes optional arguments but does not
+restore original values. We recommand not using it.
+
+
+\bigskip
+\subsubsection{Wire}
+
+\xLcs{wire}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}\wire(A)(B)
+ \pnodes(0,0){A}(3,0){B}\wire[arrows=o-*](A)(B)
+\end{pspicture}
+\end{LTXexample}
+
+\bigskip
+\subsubsection{Potential}
+
+\xLcs{tension}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \tension(A)(B){$u$}
+\end{pspicture}
+\end{LTXexample}
+
+\bigskip
+\subsubsection{ground}
+
+\xLcs{ground}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0.5,1){A}(1,1){B}(2.5,1){C}
+ \ground(A)
+ \ground{135}(B)
+ \ground[linecolor=blue]{180}(C)
+\end{pspicture}
+\end{LTXexample}
+
+\bigskip
+\subsubsection{Open dipol and open tripol}
+
+\xLcs{OpenDipol}\xLcs{OpenTripol}
+\begin{LTXexample}[width=4.5cm]
+\def\Wave{\psscalebox{3}{$\approx$}}
+\def\PM{\psscalebox{2}{$+\,\,-$}}
+\begin{pspicture}(4,3)
+\pnodes(0,0){A}(2,3){B}(4,3){C}(4,0){D}
+\OpenDipol[radius=3pt,labelangle=:U,
+ labeloffset=-0.5](A)(B){\Wave}
+\OpenDipol[radius=3pt,labelangle=:U](B)(C){\PM}
+\OpenTripol(A)(D){}
+\end{pspicture}
+\end{LTXexample}
+
+
+\bigskip
+\subsection{Parameters}
+
+\subsubsection{Label parameters}
+
+
+\xLcs{resitor}\xLkeyword{labeloffset}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,1)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[labeloffset=0](A)(B){$R$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{resitor}\xLkeyset{labelangle=:U}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,0){A}(3,2){B}
+ \resistor[labelangle=:U](A)(B){$R$}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,0){A}(3,2){B}
+ \resistor[labelangle=0](A)(B){$R$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transformer}\xLkeyword{primarylabel}\xLkeyword{secondarylabel}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,5)
+ \pnodes(0,5){A}(0,0){B}(5,5){C}(5,0){D}
+ \transformer[primarylabel=$n_1$,
+ secondarylabel=$n_2$](A)(B)(C)(D){$\mathcal T$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{labelInside}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,4.5)
+ \pnodes(0,.5){A}(3,.5){B}
+ \Ucc[labelInside=1](A)(B){$V$}
+ \pnodes(0,2){A}(3,2){B}
+ \Ucc[labelInside=2](A)(B){$V$}
+ \pnodes(0,3.5){A}(3,3.5){B}
+ \Ucc[labelInside=3](A)(B){$V$}
+\end{pspicture}
+\end{LTXexample}
+
+\bigskip
+\subsubsection{Current intensity and electrical potential parameters}
+
+If the \Lkeyword{intensity} parameter is set to \true, an arrow is drawn on the wire
+connecting one of the nodes to the dipole. If the \Lkeyword{tension} parameter is set to \true,
+an arrow is drawn parallel to the dipole.
+
+The way those \Index{arrows} are drawn is set by \Lkeyword{dipoleconvention} and \Lkeyword{directconvention}
+parameters. \Lkeyword{dipoleconvention} can take two values~: \Lkeyval{generator} or \Lkeyval{receptor}.
+\Lkeyword{directconvention} is a boolean.
+
+
+\xLkeyword{intensity}\xLkeyword{tension}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensity,tension](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{intensity}\xLkeyword{tensionstyle}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensity,tension,tensionstyle=pm](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{intensity}\xLkeyword{tension}\xLkeyset{dipoleconvention=generator}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensity,tension,dipoleconvention=generator](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{intensity}\xLkeyword{tension}\xLkeyword{directconvention}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensity,tension,directconvention=false](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{intensity}\xLkeyword{tension}\xLkeyset{dipoleconvention=generator}\xLkeyword{directconvention}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensity,tension,
+ dipoleconvention=generator,directconvention=false](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+If \Lkeyword{intensitylabel} is set to an non empty argument, then \Lkeyword{intensity} is automatically
+set to true. If \Lkeyword{tensionlabel} is set to an non empty argument, then \Lkeyword{tension} is
+automatically set to true.
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensitylabel=$i$,tensionlabel=$u$](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{intensitylabel}\xLkeyword{intensitylabeloffset}
+\xLkeyword{tensionlabel}\xLkeyword{tensionoffset}\xLkeyword{tensionlabeloffset}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1.5){A}(3,1.5){B}
+ \resistor[intensitylabel=$i$,intensitylabeloffset=-0.5,
+ tensionlabel=$u$,tensionlabeloffset=-1.2,
+ tensionoffset=-1](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{intensitycolor}\xLkeyword{intensitywidth}\xLkeyword{intensitylabel}\xLkeyword{intensitylabelcolor}
+\xLkeyword{tensionwidth}\xLkeyword{tensionlabel}\xLkeyword{tensioncolor}\xLkeyword{tensionlabelcolor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor[intensitylabel=$i$,intensitywidth=3\pslinewidth,
+ intensitycolor=red,intensitylabelcolor=yellow,
+ tensionlabel=$u$,tensionwidth=2\pslinewidth,
+ tensioncolor=green,tensionlabelcolor=blue](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+Some specific intensity parameters are available for \Index{tripole}s and \Index{quadrupole}s.
+
+\xLkeyword{OAiminuslabel}\xLkeyword{OAipluslabel}\xLkeyword{OAioutlabel}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,0){A}(0,3){B}(5,1.5){C}
+ \OA[OAipluslabel=$i_+$,
+ OAiminuslabel=$i_-$,
+ OAioutlabel=$i_o$](B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{basesep}\xLkeyword{transistoribaselabel}\xLkeyword{transistoricollectorlabel}\xLkeyword{transistoriemitterlabel}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,1.5){A}(5,0){B}(5,3){C}
+ \transistor[basesep=2cm,transistoribaselabel=$i_B$,
+ transistoricollectorlabel=$i_C$,
+ transistoriemitterlabel=$i_E$](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{transformerisecondarylabel}
+\xLkeyword{transformeriprimarylabel}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,5)
+ \pnodes(0,5){A}(0,0){B}(5,5){C}(5,0){D}
+ \transformer[transformeriprimarylabel=$i_1$,
+ transformerisecondarylabel=$i_2$]%
+ (A)(B)(C)(D){$\mathcal T$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsubsection{Parallel parameters}
+
+If the \Lkeyword{parallel} parameter is set to \true, the dipole is drawn parallel to the line
+connecting the nodes.
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor(A)(B){}
+ \resistor[parallel](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor(A)(B){}
+ \resistor[parallel,parallelsep=.5](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor(A)(B){}
+ \resistor[parallel,parallelsep=.3,
+ parallelarm=2](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,.5){A}(3,.5){B}
+ \resistor(A)(B){}
+ \resistor[parallel,parallelsep=.3,
+ parallelarm=2,parallelnode](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=8.5cm]
+\begin{pspicture}(8,8)
+ \pnodes(0,0){A}(8,8){B}
+ \multidipole(A)(B)\resistor{$R$}%
+ \capacitor[linecolor=red]{$C$}%
+ \coil[parallel,parallelsep=.1]{$L$}%
+ \diode{$D$}.
+\end{pspicture}
+\end{LTXexample}
+
+Note: When used with \Lcs{multidipole}, the \Lkeyword{parallel} parameter
+must not be set for the first dipole.
+
+
+
+\subsubsection{Wire intersections}
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,0){A}(3,3){B}(0,3){C}(3,0){D}
+ \wire(A)(B)
+ \wire[intersect,intersectA=A,intersectB=B](C)(D)
+\end{pspicture}
+\end{LTXexample}
+
+Wire intersect parameters work also with \Lcs{multidipole}.
+
+\begin{LTXexample}[width=6.5cm]
+\begin{pspicture}(7,7)
+ \pnodes(0,0){A}(6,6){B}(0,6){C}(6,0){D}
+ \wire(A)(B)
+ \multidipole(C)(D)\resistor{$R$}%
+ \wire[intersect,intersectA=A,intersectB=B]%
+ \capacitor{$C$}.
+\end{pspicture}
+\end{LTXexample}
+
+
+\bigskip
+\subsubsection{Dipole style parameters}
+
+\xLkeyset{dipolestyle=twoCircles}\xLcs{ICC}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \Icc[dipolestyle=twoCircles](A)(B){$I$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=zigzag}\xLcs{resistor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \resistor[dipolestyle=zigzag](A)(B){$R$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=varistor}\xLcs{resistor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \resistor[dipolestyle=varistor](A)(B){U}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=chemical}\xLcs{capacitor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \capacitor[dipolestyle=chemical](A)(B){$C$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=elektor}\xLcs{capacitor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \capacitor[dipolestyle=elektor](A)(B){$C$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=elektorchemical}\xLcs{capacitor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \capacitor[dipolestyle=elektorchemical](A)(B){$C$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=crystal}\xLcs{capacitor}\index{Quartz}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \capacitor[dipolestyle=crystal](A)(B){$Q$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=rectangle}\xLcs{coil}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil[dipolestyle=rectangle](A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=curved}\xLcs{coil}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil[dipolestyle=curved](A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=elektor}\xLcs{coil}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil[dipolestyle=elektor](A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=elektorcurved}\xLcs{coil}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil[dipolestyle=elektorcurved](A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=thyristor}\xLcs{diode}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \diode[dipolestyle=thyristor](A)(B){$T$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=GTO}\xLcs{diode}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \diode[dipolestyle=GTO](A)(B){$T$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=triac}\xLcs{diode}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \diode[dipolestyle=triac](A)(B){$T$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{dipolestyle=schottky}\xLcs{diode}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \diode[dipolestyle=schottky](A)(B){$T$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{variable}\xLcs{resistor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \resistor[variable](A)(B){$R$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{variable}\xLcs{capacitor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \capacitor[variable](A)(B){$C$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{variable}\xLcs{coil}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil[variable](A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{variable}\xLcs{battery}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \battery[variable](A)(B){$U$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{variable}\xLcs{coil}\xLkeyset{dipolestyle=elektor}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \coil[dipolestyle=elektor,variable](A)(B){$L$}
+\end{pspicture}
+\end{LTXexample}
+
+In the following example the parameter \Lkeyword{dipolestyle} is used for a tripole and quadrupole, because
+the coils are drawn as rectangles and the resistor as a \Lkeyword{zigzag}.
+
+\xLkeyset{labelangle=:U}\xLcs{potentiometer}\xLkeyset{dipolestyle=zigzag}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)
+ \pnodes(0,0){A}(3,3){B}(3,1.5){C}
+ \potentiometer[dipolestyle=zigzag,%
+ labelangle=:U](A)(B)(C){$P$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{transformer}\xLkeyset{dipolestyle=rectangle}
+\begin{LTXexample}[width=4.5cm]
+\begin{pspicture}(4,4)
+ \pnodes(0,4){A}(0,0){B}(4,4){C}(4,0){D}
+ \transformer[dipolestyle=rectangle](A)(B)(C)(D){$\mathcal T$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsubsection{Tripole style parameters}
+
+\xLcs{Tswitch}\xLkeyset{tripolestyle=left}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,2){A}(5,2){B}(0,0){C}
+ \Tswitch[tripolestyle=left](A)(B)(C){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{Tswitch}\xLkeyset{tripolestyle=right}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,2){A}(5,2){B}(0,0){C}
+ \Tswitch[tripolestyle=right](A)(B)(C){$K$}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{OA}\xLkeyset{tripolestyle=french}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,3){A}(0,0){B}(5,1.5){C}
+ \OA[tripolestyle=french](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Tripoles}
+
+\xLcs{potentiometer}\xLkeyword{labeloffset}
+\begin{pspicture}(3,3)
+ \pnodes(0,1){A}(3,1){B}(3,2){C}
+ \potentiometer[labeloffset=0pt](A)(B)(C){P}
+\end{pspicture}
+\hfill
+\begin{pspicture}(3,3)
+ \pnodes(0,2.5){A}(3,2.5){B}(0,1){C}
+ \potentiometer[labeloffset=0pt](A)(B)(C){P}
+\end{pspicture}
+\hfill
+\xLcs{potentiometer}\xLkeyword{labeloffset}\xLkeyset{labelangle=:U}
+\begin{pspicture}(3,3)
+ \pnodes(0,0){A}(3,2){B}(2.5,3){C}
+ \potentiometer[labeloffset=0pt,labelangle=:U](A)(B)(C){P}
+\end{pspicture}
+
+\vspace{1cm}
+\noindent
+\xLcs{potentiometer}\xLkeyword{labeloffset}
+\begin{pspicture}(3,3)
+ \pnodes(1,0){A}(1,3){B}(2.5,0){C}
+ \potentiometer[labeloffset=0pt](A)(B)(C){P}
+\end{pspicture}
+\hfill
+\begin{pspicture}(3,3)
+ \pnodes(0,3){A}(3,0){B}(2,0){C}
+ \potentiometer[labeloffset=0pt,labelangle=:U](A)(B)(C){P}
+\end{pspicture}
+\hfill
+\begin{pspicture}(3,3)
+ \pnodes(0,2){A}(3,2){B}(1.5,0){C}
+ \potentiometer[labeloffset=0pt](A)(B)(C){P}
+\end{pspicture}
+
+
+\vspace{1cm}
+\noindent
+\begin{pspicture}(3,3)
+ \pnodes(1,0){A}(1,3){B}(2.5,0){C}
+ \potentiometer[dipolestyle=zigzag](A)(B)(C){P}
+\end{pspicture}
+\hfill
+\begin{pspicture}(3,3)
+ \pnodes(0,3){A}(3,0){B}(2,0){C}
+ \potentiometer[dipolestyle=zigzag,labelangle=:U](A)(B)(C){P}
+\end{pspicture}
+\hfill
+\begin{pspicture}(3,3)
+ \pnodes(0,2){A}(3,2){B}(1.5,0){C}
+ \potentiometer[dipolestyle=zigzag](A)(B)(C){P}
+\end{pspicture}
+
+\begin{pspicture}[showgrid=true](9.5,10)
+\dotnode(0,2){N1}
+\dotnode(4,2){N2}
+\dotnode(2,0){N3}
+\powermeter[tripolestyle=bottom,tripoleconfig=left](N1)(N2)(N3){WR}
+
+\rput(5,0){
+\dotnode(0,2){N1}
+\dotnode(4,2){N2}
+\dotnode(2,0){N3}
+\powermeter[tripolestyle=bottom,tripoleconfig=right](N1)(N2)(N3){WR}
+}
+
+\rput(0,3){
+\dotnode(0,2){N1}
+\dotnode(4,2){N2}
+\dotnode(2,4){N3}
+\powermeter[tripolestyle=top,tripoleconfig=left](N1)(N2)(N3){WR}
+}
+
+\rput(5,3){
+\dotnode(0,2){N1}
+\dotnode(4,2){N2}
+\dotnode(2,4){N3}
+\powermeter[tripolestyle=top,tripoleconfig=right](N1)(N2)(N3){WR}
+}
+
+\end{pspicture}
+
+
+
+\begin{pspicture}[showgrid=true](-1,-1)(9.5,5)
+%\psgrid
+
+{%\psset{showNode}
+\dotnode(0,4){NR}\nput{180}{NR}{R}
+\dotnode(0,2.5){NS}\nput{180}{NS}{S}
+\dotnode(0,1){NT}\nput{180}{NT}{T}
+\dotnode(0,0){NNS}\nput{180}{NNS}{N}
+
+\dotnode(1.5,0){NWRM}
+\dotnode(2.5,0){NWSM}
+\dotnode(3.5,0){NWTM}
+
+\pnode(3,4){NRC}
+\pnode(5,2.5){NSC}
+\pnode(7,1){NTC}
+\pnode(4,0){NNC}
+
+\dotnode(7,4){NU}\nput{0}{NU}{U}
+\dotnode(7,2.5){NV}\nput{0}{NV}{V}
+\dotnode(7,1){NW}\nput{0}{NW}{W}
+\dotnode(7,0){NN}\nput{0}{NN}{N}
+}
+
+\powermeter[tripolestyle=bottom,tripoleconfig=left](NR)(NRC)(NWRM){WR}
+\powermeter[tripolestyle=bottom,tripoleconfig=left](NS)(NSC)(NWSM){WS}
+\powermeter[tripolestyle=bottom,tripoleconfig=left](NT)(NTC)(NWTM){WT}
+
+\psframe(7,-0.5)(9,4.5)
+\wire(NRC)(NU)
+\wire(NSC)(NV)
+\wire(NTC)(NW)
+\wire(NNS)(NN)
+
+\end{pspicture}
+
+
+
+\subsubsection{Other Parameters}
+
+\xLkeyword{OAinvert}\xLcs{OA}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,0){A}(0,3){B}(5,1.5){C}
+ \OA[OAinvert=false](B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{OAperfect}\xLcs{OA}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,0){A}(0,3){B}(5,1.5){C}
+ \OA[OAperfect=false](B)(A)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnodes(0,1.5){A}(5,0){B}(5,3){C}
+ \transistor[basesep=2cm,%
+ transistorinvert,transistorcircle=false](A)(B)(C)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{transistortype=FET}\xLcs{transistor}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnode(0,1.5){A}\psset{linewidth=1pt}
+ \transistor[basesep=2cm,arrows=o-o,
+ transistortype=FET](A){Emitter}{Collector}
+ \psline{o-}(5,3)(3,3)(3,3|Collector)(Collector)
+ \psline{o-}(5,0)(3,0)(3,3|Emitter)(Emitter)
+ \psline{o-}(A)([nodesep=2]A)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{transistortype=FET}\xLcs{transistor}\xLkeyset{FETchannel=P}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+ \pnode(0,1.5){A}\psset{linewidth=1pt}
+ \transistor[basesep=2cm,arrows=o-o,
+ transistortype=FET,
+ FETchanneltype=P](A){Emitter}{Collector}
+ \psline{o-}(5,3)(3,3)(3,3|Collector)(Collector)
+ \psline{o-}(5,0)(3,0)(3,3|Emitter)(Emitter)
+ \psline{o-}(A)([nodesep=2]A)
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyset{transistortype=FET}\xLcs{transistor}\xLkeyword{FETmemory}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,3)
+\transistor[basesep=2cm,transistortype=FET,
+ FETmemory=true](0,1.5)(5,0)(5,3)
+\end{pspicture}
+\end{LTXexample}
+
+\clearpage
+\subsection{Special objects}
+
+\subsubsection{\nxLcs{dashpot}}
+
+
+\begin{LTXexample}[pos=t]
+\newcommand*\pswall[3]{% ll ur lr
+ \psframe[linecolor=white,fillstyle=hlines,hatchcolor=black](#1)(#2)% (ll)(ur)
+ \psline[linecolor=black](#1)(#3)}
+\begin{pspicture}(0.5,1)(8,10)
+ \rput(3,9.5){\sffamily \textbf{Viscoelasticity}}
+ % Kelvin-Voigt model (spring and dashpot parallel): ===========
+ \rput[c](1.75,8.85){\sffamily Kelvin-Voigt}
+ \pswall{1,8}{2.5,8.5}{2.5,8}% top
+ \psline(1.75,8)(1.75,7)% top vertical line
+ % node definitions:
+ \pnodes(1,7){ul1}(2.5,7){ur1}(1,3){ll1}(2.5,3){lr1}%
+ \psline(ul1)(ur1)% top line
+ \psline(ll1)(lr1)% bottom line
+ \resistor[dipolestyle=zigzag,linewidth=0.5pt](ul1)(ll1){}% spring
+ \dashpot[linewidth=0.5pt](ur1)(lr1){}% dashpot
+ \psline[arrowscale=3]{->}(1.75,3)(1.75,2)% force
+ % Maxwell model (spring and dashpot serial): ==================
+ \rput[c](4.5,8.85){\sffamily Maxwell}
+ \pswall{4,8}{5,8.5}{5,8}% top
+ \pnodes(4.5,8){t}(4.5,4){b}% node definitions
+ \resistor[dipolestyle=zigzag,linewidth=0.5pt,labeloffset=1.8](t)(b)% spring
+ {\sffamily\small\begin{tabular}{c}\textbf{elasticity}\\(Hookean solid)\end{tabular}}% end spring
+ \dashpot[linewidth=0.5pt,labeloffset=1.8](4.5,5)(4.5,3)% dashpot
+ {\sffamily\small\begin{tabular}{c}\textbf{viscosity}\\(Newtonian fluid)\end{tabular}
+ }% end dashpot
+ \psline[arrowscale=3]{->}(4.5,3)(4.5,2)% force
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Modified pst-circ Components
+%
+\section{Modified default symbols}
+
+
+\subsection{Dipole}
+
+%
+% New Diode
+%
+\subsubsection{New Diode}
+\xLcs{NewDiode}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,4)
+ \pnodes(0,1){A}(3,1){B}(0,3){C}(3,3){D}
+ \newdiode(C)(D){$D_1$}
+ \newdiode[ison=false](A)(B){$D_2$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% New Zener
+%
+\subsubsection{New Zener}
+\xLcs{NewZener}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,4)
+ \pnodes(0,1){A}(3,1){B}(0,3){C}(3,3){D}
+ \newZener(C)(D){$D_1$}
+ \newZener[ison=false](A)(B){$D_2$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% New LED
+%
+\subsubsection{New LED}
+\xLcs{NewLED}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,4)
+ \pnodes(0,1){A}(3,1){B}(0,3){C}(3,3){D}
+ \newLED(C)(D){$D_1$}
+ \newLED[ison=false](A)(B){$D_2$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% New Ideal Switch
+%
+\subsubsection{New Ideal Switch}
+\xLcs{NewSwitch}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,4)
+ \pnodes(0,1){A}(3,1){B}(0,3){C}(3,3){D}
+ \newSwitch(C)(D){$S_1$}
+ \newSwitch[ison=false](A)(B){$S_2$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% New Capacitor
+%
+\subsubsection{New Capacitor}
+\xLcs{RFLine}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \newcapacitor(A)(B){$C_1$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% New Armature
+%
+\subsubsection{New Armature (motor or generator)}
+\xLcs{RFLine}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,4)
+ \pnodes(0,1){A}(3,1){B}(0,3){C}(3,3){D}
+ \newarmature[labelInside=1](C)(D){$M_{CC}$}
+ \newarmature[labelInside=2](A)(B){$G_{CC}$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% VDC
+%
+\subsubsection{V DC}
+\xLcs{RFLine}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \vdc(A)(B){$V_{DC}$}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% VAC
+%
+\subsubsection{V AC}
+\xLcs{RFLine}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}[showgrid=false](3,2)
+ \pnodes(0,1){A}(3,1){B}
+ \vac(A)(B){$V_{AC}$}
+\end{pspicture}
+\end{LTXexample}
+
+\clearpage
+
+
+\section{Examples}
+
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(-1.5,-1)(6,5)
+ \pnodes(0,0){A}(0,3){B}(4.5,3){C}(4.5,0){D}
+ \Ucc[tension,dipoleconvention=generator](A)(B){$E$}
+ \multidipole(B)(C)%
+ \switch[intensitylabel=$i$]{$K$}%
+ \resistor[labeloffset=0,tensionlabel=$u_R$]{$R$}.
+ \capacitor[tensionlabel={$u_C$},tensionlabeloffset=-1.2,
+ tensionoffset=-1,directconvention=false](D)(C){$C$}
+ \wire(A)(D)
+ \ground(D)
+ \end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(-0.5,0)(7,8)
+ \pnodes(0.5,1){A}(3.5,1){B}(6.5,1){C}(0.5,4){D}(3.5,4){Minus}
+ (3.5,3){Plus}(6.5,5){S}(3.5,5){E}
+ \resistor(D)(Minus){$R_2$}
+ \capacitor(E)(S){$C$}
+ \resistor[parallel,parallelarm=2](E)(S){$R_1$}
+ \OA[intensity](Minus)(Plus)(S)
+ \wire(Minus)(E)
+ \wire(Plus)(B)
+ \tension(A)(D){$u_E$}
+ \makeatletter % (special tricks see below)
+ \tension(C)(S@@){$u_S$}
+ \tension[linecolor=blue](Plus@@)(Minus@@){$\epsilon$}
+ \makeatother
+ \ground(A) \ground(B) \ground(C)
+ \end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(-1,0)(7,8)
+ \pnodes(1,1){A}(1,7){B}(3,1){C}(3,7){D}
+ \Ucc[tensionlabel=$E$](A)(B){}
+ \resistor(B)(D){$R$}
+ \coil(D)(C){$L$}
+ \capacitor[parallel,parallelarm=2.5](D)(C){$C$}
+ \wire(A)(C)
+ \end{pspicture}
+\end{LTXexample}
+
+
+
+
+\begin{LTXexample}[pos=t]
+% \usepackage{amsmath} % example by Markus Graube
+\begin{pspicture}(0,.5)(13,4)
+ \pnodes(1,1){I_U}(1,3){I_O}(2.5,1){C}(2.5,3){D}(4,1){K_LU}(4,3){K_LO}(7,1){K_RU}%
+ (7,3){K_RO}(9,3){E}(7.3,3){K_RO1}(7.3,1){K_RU1}(11,3){F}(12,1){O_U}(12,3){O_O}
+ \tension[labeloffset=-0.5](I_O)(I_U){$\underline{u}$}
+ \wire[arrows=o-](I_U)(C)
+ \wire[intensitylabel=$\underline{i}$, arrows=o-](I_O)(D)
+ \capacitor[labeloffset=.9](C)(D){$C_B$}
+ \qdisk(C){2pt} \qdisk(D){2pt}
+ \wire(C)(K_LU)
+ \wire[intensitylabel=$\underline{i}_W$](D)(K_LO)
+ \quadripole(K_LO)(K_LU)(K_RO)(K_RU){\parbox{3cm}{%
+ \begin{align*}
+ \underline{u} &= \frac{\underline{p}}{X} \\[2ex]
+ \underline{i}_W &= X \underline{q}_U
+ \end{align*}}}
+ \wire(K_RO)(K_RO1)
+ \tension[labeloffset=0.5](K_RO1)(K_RU1){$\underline{p}$}
+ \coil[dipolestyle=rectangle](K_RO)(E){$M_{a,K}$}
+ \capacitor(E)(F){$N_{a,K}$}
+ \wire[intensitylabel=$\underline{q}_U$,arrows=-o](F)(O_O)
+ \wire[arrows=-o](K_RU)(O_U)
+ \tension[labeloffset=0.5](O_O)(O_U){$\underline{p}_U$}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\begin{LTXexample}[width=8.5cm]
+ \begin{pspicture}(-0.25,-0.25)(6,6)
+ \pnodes(0,3){A}(3,3){B}(6,3){C}
+ % Dipole node connections
+ \coil[intensitylabel=$i$](A)(B){$L$}
+ \coil[intensitylabel=$i'$,intensitycolor=green,%
+ parallel,parallelarm=2](B)(C){$L'$}
+ \capacitor[parallel,parallelarm=-2](B)(C){$C$}
+ \end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(6,6)
+ \pnodes(0,0){A}(6,0){B}(0.3,4){Cprime}(5.7,4){Dprime}(2.5,4){Gprime}%
+ (2.5,0){Hprime}(0,4){C}(6,4){D}(0.3,6){E}(5.7,6){F}(4,6){G}(4,0){H}
+ \multidipole(G)(H)%
+ \wire[intersect,
+ intersectA=C,intersectB=D]
+ \resistor{$R'_3$}.
+ \resistor(E)(G){$R'_1$}
+ \resistor(G)(F){$R'_2$}
+ \multidipole(C)(D)\resistor{$R_1$}%
+ \wire\resistor{$R_2$}.
+ \wire(A)(B)\wire(Cprime)(E)
+ \wire(Dprime)(F)
+ \resistor(Hprime)(Gprime){$R_3$}
+ \end{pspicture}
+\end{LTXexample}
+
+
+
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(0,-0.25)(9,11)
+ \pnodes(0,0){A}(9,0){B}(0,6){C}(9,6){D}(4.5,1){E}(4.5,10.5){F}
+ \switch(A)(C){$K$}
+ \multidipole(A)(B)\resistor{$R$}\battery[intensitylabel=$i$]{$V$}.
+ \wire(B)(D)
+ \multidipole(C)(D)\diode{$D$}\wire.
+ \resistor[tensionlabel=$U_1$](C)(F){$R_1$} \resistor(C)(E){$R_4$}
+ \capacitor[parallel,parallelarm=1.2,parallelsep=1.5](C)(E){$C_2$}
+ \coil(E)(D){$L$}
+ \capacitor[parallel,parallelarm=1.2,parallelsep=1.5](E)(D){$C_3$}
+ \capacitor[tensionlabel=$U_2$](F)(D){$C_1$}
+ \multidipole(E)(F)\wire\wire[intersect,intersectA=C,intersectB=D]%
+ \circledipole[labeloffset=-0.7]{$E$}%
+ \resistor[parallel,parallelsep=.6,parallelarm=.8]{$R$}.
+ \end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(0,-0.2)(13,8)
+ \psset{intensitycolor=red,intensitylabelcolor=red,tensioncolor=green,
+ tensionlabelcolor=green, intensitywidth=3pt}
+ \circledipole[tension,tensionlabel=$U_0$,
+ tensionoffset=0.75,labeloffset=0](0,0)(0,6){\LARGE\textbf{=}}
+ \wire[intensity,intensitylabel=$i_0$](0,6)(2.5,6)
+ \diode[dipolestyle=thyristor](2.5,6)(4.5,6){$T_1$}
+ \wire[intensity,intensitylabel=$i_1$](4.5,6)(6.5,6)
+ \multidipole(6.5,7.5)(2.5,7.5)%
+ \coil[dipolestyle=rectangle,labeloffset=-0.75]{$L_5$}%
+ \diode[labeloffset=-0.75]{$D_5$}.
+ \wire[intensity,intensitylabel=$i_5$](6.5,6)(6.5,7.5)
+ \wire(2.5,7.5)(2.5,3)
+ \wire[intensity,intensitylabel=$i_c$](2.5,4.5)(2.5,6)
+ \qdisk(2.5,6){2pt}\qdisk(6.5,6){2pt}
+ \diode[dipolestyle=thyristor](2.5,4.5)(4.5,4.5){$T_2$}
+ \wire[intensity,intensitylabel=$i_2$](4.5,4.5)(6.5,4.5)
+ \capacitor[tension,tensionlabel=$u_c$,tensionoffset=-0.75,
+ tensionlabeloffset=-1](6.5,4.5)(6.5,6){$C_k$}
+ \qdisk(2.5,4.5){2pt}\qdisk(6.5,4.5){2pt}
+ \wire[intensity,intensitylabel=$i_3$](6.5,4.5)(6.5,3)
+ \multidipole(6.5,3)(2.5,3)%
+ \coil[dipolestyle=rectangle,labeloffset=-0.75]{$L_3$}%
+ \diode[labeloffset=-0.75]{$D_3$}.
+ \wire(6.5,6)(9,6)\qdisk(9,6){2pt}
+ \diode(9,0)(9,6){$D_4$}
+ \wire[intensity,intensitylabel=$i_4$](9,3.25)(9,6)
+ \wire[intensity,intensitylabel=$i_a$](9,6)(11,6)
+ \multidipole(11,6)(11,0)%
+ \resistor{$R_L$}
+ \coil[dipolestyle=rectangle]{$L_L$}
+ \circledipole[labeloffset=0,tension,tensionoffset=0.7,tensionlabel=$U_B$]{\LARGE\textbf{=}}.
+ \wire(0,0)(11,0)\qdisk(9,0){2pt}
+ \pnode(12.5,5.5){A}\pnode(12.5,0.5){B}
+ \tension(A)(B){$u_a$}
+\end{pspicture}
+\end{LTXexample}
+
+
+\makeatletter
+%
+\def\REG{\@ifnextchar[{\pst@REG}{\pst@REG[]}}
+%
+\def\pst@REG[#1](#2)(#3)(#4)#5{{%
+ \psset{dimen=middle,arm=0}%
+ \psset{#1}
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#4}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y1 2 mul Y3 add 3 div def
+ /Xin XC 1 sub def
+ /Yin YC 0.5 add def
+ /Xout XC 1 add def
+ /Yout Yin def
+ /Xref XC def
+ /Yref YC 1 sub def
+ XC YC){C@}
+ \pnode(! Xin Yin){in@}
+ \pnode(! Xout Yout){out@}
+ \pnode(! Xref Yref){ref@}
+ \rput(C@){\pst@draw@REG}
+ \ncangle{#2}{in@}
+ \ncangle{#3}{out@}
+ \ncangle{#4}{ref@}
+ \rput(C@){#5}
+ }\ignorespaces}
+%
+\def\pst@draw@REG{%
+ \begingroup
+ \psset{linewidth=1.5\pslinewidth}%
+ \psframe(-1,-0.5)(1,0.75)
+ \psline(-1.5,0.5)(-1,0.5)
+ \psline(1.5,0.5)(1,0.5)
+ \psline(0,-0.5)(0,-1)
+ \endgroup
+ }
+%
+\makeatother
+
+The following example was written by Manuel Luque.
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(0,-0.5)(14,4)
+ \pnodes(0,-0.50){B}(0,3){A}(2.5,3.5){C}(2.5,-0.5){D}(5,3){E}(6.5,1.5){F}(5,0){G}%
+ (3.5,1.5){H}(8,2.5){I}(8,1){J}(10,2.5){K}(10,1){L}(14,2.5){M}(12,1){N}%
+ (3,1){H'}(14,2.5){O}(14,1){P}(13.5,1){Q}
+ \transformer[transformeriprimarylabel=$i_1$,transformerisecondarylabel=$i_2$,
+ primarylabel=$n_1$,secondarylabel=$n_2$](A)(B)(C)(D){$T_1$}
+ {\psset{fillstyle=solid,fillcolor=black}
+ \diode(H)(E){}\diode(H)(G){} \diode(E)(F){}\diode(G)(F){}}
+ \capacitor[dipolestyle=chemical](I)(J){} \capacitor(K)(L){}
+ \REG(K)(M)(N){\shortstack{\textsf{\textbf{\large LM7805}}\\\textbf{+5V}}}
+ \ncangle{I}{F}\psline(I)(K) \ncangle{E}{C}\ncangle{G}{D}
+ \ncangle[arm=0]{P}{Q} \ncangle[arm=0]{H}{H'}
+ \ground(H')\ground(J)\ground(L)\ground(N)\ground(Q)
+ \psdots(A)(B)(P)(O)(G)(H)(F)(I)(K)(E)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+The following example was written by Lionel Cordesses.
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(11,3)
+ \psset{dipolestyle=elektor}
+ \pnodes(1,2){Vin}(0.5,2){S}(0.5,0){Sm}(2.5,2){A}(4.5,2){B}(6.5,2){C}(8,2){Cd}%
+ (8.5,2){D}(9.5,2){E}(2.5,0){Am}(4.5,0){Bm}(6.5,0){Cm}(8.5,0){Dm}(9.5,0){Em}
+ \Ucc[labeloffset=0.9](Sm)(S){$V_{in}$}\resistor(Vin)(A){$R$}
+ \capacitor(A)(Am){$C_1$} \capacitor(B)(Bm){$C_3$}
+ \capacitor[labeloffset=-0.7](D)(Dm){$C_n$}\resistor(E)(Em){$R$}
+ \coil(A)(B){$L_2$}\coil(B)(C){$L_4$}
+ \wire(Am)(Bm)\wire(Bm)(Cm)\wire(Cm)(Dm)\wire(Dm)(Em)\wire(D)(E)
+ \wire(Cd)(D)\psline[linestyle=dashed](C)(Cd)
+ \wire(S)(Vin)\wire(Sm)(Am)
+ \psdots(D)(Dm)(A)(Am)(B)(Bm)
+\end{pspicture}
+\end{LTXexample}
+
+The following example was written by Christian Hoffmann.
+
+
+\begin{LTXexample}[pos=t]
+ \SpecialCoor
+ \begin{pspicture}(0,-1)(7,6.5)%
+ \pnodes(0,6){plus}(3,3){basis}([nodesep=-2] basis){schalter}(0,0){masse}
+ \wire[arrows=o-*](plus)(basis|plus)
+ \uput[l](plus){$U_0$}
+ \resistor[labeloffset=.8](basis|plus)(basis){$R_1$}
+ \transistor[basesep=2cm](basis){emitter}{kollektor}
+ \wire[arrows=-*](schalter)(basis)
+% \wire(basis)([nodesep=2] basis)
+ \wire(TBaseNode)(basis)
+ \switch(schalter|masse)(schalter){S}
+ \lamp(kollektor|plus)(kollektor){L}
+ \resistor(kollektor|plus)(basis|plus){$R_2$}
+ \wire(emitter)(emitter|masse)
+ \wire(emitter|masse)(basis|masse)
+ \capacitor(basis)(basis|masse){$C_1$}
+ \wire[arrows=*-](basis|masse)(schalter|masse)
+ \wire[arrows=*-o](schalter|masse)(masse)
+ \end{pspicture}
+\end{LTXexample}
+
+
+Variable radius for \xLcs{circledipole}
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(\linewidth,3)
+\circledipole(0,1)(3,1){} \pnodes(4,1){A}(7,1){B}
+\circledipole[radius=7mm,labeloffset=1cm](A)(B){Strommesser}\rput(5.5,1){\Huge I}
+\circledipole[radius=4mm,fillstyle=solid,fillcolor=blue!30](10,1)(13,1){C}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\section{Microwave symbols}
+Since for microwave signal, the direction in which the signal spreads is very important,
+There are dipoleinput or tripoleinput or quadripoleinput and arrowinput parameters.
+The value of theses parameters are left or right for the first one and true or false for second one.
+
+\xLcs{ifPst@inputarrow}\xLcs{pcline}
+\begin{lstlisting}[style=code]
+\ifPst@inputarrow
+ \ifx\psk@Dinput\pst@Dinput@right
+ \pcline[arrows=-C](#2)(dipole@1)
+ \pcline[arrows=->,arrowinset=0](#3)(dipole@2)
+ \else
+ \pcline[arrows=->,arrowinset=0](#2)(dipole@1)
+ \pcline[arrows=C-](dipole@2)(#3)
+ \fi
+\else
+ \pcline[arrows=-C](#2)(dipole@1)
+ \pcline[arrows=C-](dipole@2)(#3)
+\fi
+\pcline[fillstyle=none,linestyle=none](#2)(#3)
+\end{lstlisting}
+
+The last line is to correct some problems when I use colors (see example2)
+To add color in components (Monopole, tripole and Quadripole), there is a new
+argument.
+ \Lcs{multidipole} also works:
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(4,2)
+ \pnodes(0.5,1){A}(3.5,1){B}
+ \multidipole(A)(B)\filter{BPF}%
+ \resistor{$R$}.
+\end{pspicture}
+\end{LTXexample}
+
+\bigskip
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(4,2)
+ \pnodes(0.5,1){A}(3.5,1){B}
+ \multidipole(A)(B)\amplifier{LNA}%
+ \resistor{$R$}.
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{New monopole components}
+\subsubsection{New ground}
+\begin{description}
+ \item[\Lkeyword{groundstyle}:] \Lkeyval{ads} | \Lkeyval{old} | \Lkeyval{triangle}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnodes(0.5,1){A}(1,1){B}(2.5,1){C}
+ \newground(A)
+ \newground[groundstyle=old]{135}(B)
+ \newground[linecolor=blue,groundstyle=triangle]{180}(C)
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsubsection{Antenna}
+\begin{description}
+ \item[\Lkeyword{antennastyle}:] \Lkeyval{two} | \Lkeyval{three} | \Lkeyval{triangle}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,0.5){A}
+ \antenna[antennastyle=three](A)
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,0.5){A}
+ \antenna(A)
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,0.5){A}
+ \antenna[antennastyle=triangle](A)
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{New monopole macro-components}
+\subsubsection{Oscillator}
+\begin{description}
+ \item[\Lkeyword{output}:] \Lkeyval{top} | \Lkeyval{right} | \Lkeyval{bottom} | \Lkeyval{left}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{LOstyle}:] -- | \Lkeyval{crystal}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,1){A}
+ \oscillator[output=left,inputarrow=false](A)%
+ {$f_{LO}$}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,1){A}
+ \oscillator[output=top,inputarrow=true,LOstyle=crystal](A)%
+ {f$_{\textrm{LO}}$}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,1){A}
+ \oscillator[output=right,inputarrow=false](A)%
+ {$f_{LO}$}{fillstyle=solid,fillcolor=blue}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(1,1){A}
+ \oscillator[output=bottom,inputarrow=false](A)%
+ {$f_{LO}$}{}
+\end{pspicture}
+\end{LTXexample}
+
+\subsection{New dipole macro-components}
+\subsubsection{Filters}
+\begin{description}
+ \item[\Lkeyword{dipolestyle}:] \Lkeyval{bandpass} | \Lkeyval{lowpass} | \Lkeyval{highpass}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\xLcs{filter}
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \filter(A)(B){BPF}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{filter}
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \filter[dipolestyle=lowpass,fillstyle=solid,%
+ fillcolor=red](A)(B){LPF}
+\end{pspicture}
+\end{LTXexample}
+
+\xLcs{filter}\xLkeyset{dipolestyle=highpass}
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \filter[dipolestyle=highpass,dipoleinput=right,
+ inputarrow=true](A)(B){HPF}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \filter[dipolestyle=highpass,inputarrow=true](A)(B){BPF}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Isolator}
+\begin{description}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \isolator[inputarrow=true](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+\pnode(0,1){A} \pnode(3,1){B}
+\isolator[dipoleinput=right,inputarrow=true,
+ fillstyle=solid,fillcolor=yellow](A)(B){Isolator}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A}\pnode(3,1){B}
+ \isolator[dipoleinput=left](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Frequency multiplier/divider}
+\begin{description}
+ \item[\Lkeyword{dipolestyle}:] \Lkeyval{multiplier} | \Lkeyval{divider}
+ \item[\Lkeyword{value}:] \Lkeyval{N} | $n\in N$
+ \item[\Lkeyword{programmable}:] \false | \true
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A}\pnode(3,1){B}
+ \freqmult[dipolestyle=divider,inputarrow=true](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A}\pnode(3,1){B}
+ \freqmult[dipolestyle=multiplier,value=10](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,3)
+\pnode(0,1.5){A}\pnode(3,1.5){B}
+\freqmult[dipolestyle=multiplier,programmable=true,
+ labeloffset=-1,dipoleinput=right,inputarrow=true,
+ fillstyle=solid,fillcolor=green](A)(B){10<N<35}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Phase shifter}
+\begin{description}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A1} \pnode(3,1){A2}
+ \phaseshifter(A1)(A2){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+\pnode(0,1){B1} \pnode(3,1){B2}
+\phaseshifter[inputarrow=true,dipoleinput=right,
+ fillstyle=solid,fillcolor=red](B1)(B2){90$^\circ$}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{VCO}
+\begin{description}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A1} \pnode(3,1){A2}
+ \vco[fillstyle=solid,fillcolor=yellow](A1)(A2){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){B1} \pnode(3,1){B2}
+ \vco[dipoleinput=right,inputarrow=true](B1)(B2){VCO}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Amplifier}
+\begin{description}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \amplifier[inputarrow=true](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \amplifier[dipoleinput=right,inputarrow=true](A)(B){PA}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \amplifier[dipoleinput=left](A)(B){LNA}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Detector}
+\begin{description}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{dipoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \detector[inputarrow=true](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \detector[dipoleinput=right,inputarrow=true](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \detector[dipoleinput=left](A)(B){}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A} \pnode(3,1){B}
+ \attenuator[inputarrow,labeloffset=0.7cm,
+ dipoleinput=left](A)(B){Attentuator}
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{New tripole macro-components}
+\subsubsection{Mixer}
+\begin{description}
+ \item[\Lkeyword{tripolestyle}:] \Lkeyval{bottom} | \Lkeyval{top}
+ \item[\Lkeyword{tripoleconfig}:] \Lkeyval{left} | \Lkeyval{right}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,2){C}
+ \mixer[tripolestyle=top,inputarrow=true](A)(B)(C)%
+ {Mixer}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,0){C}
+ \mixer[inputarrow=true,tripoleinput=right](A)(B)(C)
+ {Mixer}{fillstyle=solid,fillcolor=yellow}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Splitter}
+\begin{description}
+ \item[\Lkeyword{tripolestyle}:] \Lkeyval{bottom} | \Lkeyval{top}
+ \item[\Lkeyword{tripoleconfig}:] \Lkeyval{left} | \Lkeyval{right}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+\end{description}
+
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+\pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,2){C}
+ \splitter[inputarrow,
+ tripolestyle=top](A)(B)(C){Splitter}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+\pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,0){C}
+ \splitter[inputarrow,
+ tripolestyle=bottom,tripoleinput=right, fillstyle=solid, fillcolor=ForestGreen](A)(B)(C){Splitter}{}
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsubsection{Circulator}
+\begin{description}
+ \item[\Lkeyword{tripolestyle}:] \Lkeyval{circulator} | \Lkeyval{isolator}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{tripoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,0){C}
+ \circulator{0}(A)(B)(C){Circulator}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,3)
+ \pnode(1.5,0.5){A}\pnode(1.5,2.5){B}\pnode(0.5,1.5){C}
+ \circulator[tripolestyle=isolator,inputarrow=true]{90}%
+ (A)(B)(C){Isolator}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+\pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,0){C}
+\circulator[tripoleconfig=right,tripolestyle=isolator,
+ inputarrow=true,tripoleinput=right]{0}%
+ (B)(A)(C){Isolator}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+\pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,2){C}
+\circulator[tripoleconfig=right,
+ inputarrow=true]{180}(A)(B)(C){Isolator}%
+ {fillstyle=solid,fillcolor=red}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Agc}
+\begin{description}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{tripoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,0){C}
+ \agc(A)(B)(C){AGC}{fillstyle=solid,fillcolor=yellow}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0.5,1){A}\pnode(2.5,1){B}\pnode(1.5,0){C}
+ \agc[tripoleinput=right,inputarrow=true](A)(B)(C)%
+ {AGC}{fillstyle=solid,fillcolor=blue}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\subsection{New quadripole macro-components}
+\subsubsection{Coupler}
+\begin{description}
+ \item[\Lkeyword{couplerstyle}:] \Lkeyval{hybrid} | \Lkeyval{directional}
+ \item[\Lkeyword{inputarrow}:] \false | \true
+ \item[\Lkeyword{quadripoleinput}:] \Lkeyval{left} | \Lkeyval{right}
+\end{description}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1.4){A} \pnode(0,0.6){B}
+ \pnode(3,1.4){C} \pnode(3,0.6){D}
+ \coupler[couplerstyle=hybrid,inputarrow=true](A)(B)(C)(D)%
+ {Hyb. $180$\ensuremath{^\circ}}%
+ {fillstyle=solid,fillcolor=yellow}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1.4){A} \pnode(0,0.6){B}
+ \pnode(3,1.4){C} \pnode(3,0.6){D}
+ \coupler[couplerstyle=directional](A)(B)(C)(D){10~dB}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1.4){A} \pnode(0,0.6){B}
+ \pnode(3,1.4){C} \pnode(3,0.6){D}
+ \coupler[couplerstyle=hybrid,inputarrow=true,%
+ quadripoleinput=right](A)(B)(C)(D)%
+ {Hyb. $180$\ensuremath{^\circ}}{}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=3.5cm,rframe={}]
+\begin{pspicture}(3,2)
+ \pnode(0,1.4){A} \pnode(0,0.6){B}
+ \pnode(3,1.4){C} \pnode(3,0.6){D}
+ \coupler[couplerstyle=directional,quadripoleinput=right,%
+ inputarrow=true](A)(B)(C)(D){10~dB}{}
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{Examples}
+
+\subsubsection{Radar emission diagram}
+\begin{pspicture}[labelangle=:U](8,5)
+ \pnodes(1, 3){A}(1.8, 3){B}(3.5, 3){C}(5, 3){D}(7, 3){E}(7.1, 3){EE}(6, 2){F}(5, 1){G}%
+ (7, 1){H}(7.1, 1){HH}(4, 1){I}(3.5, 1){J}
+ \rput(1, 3.9){\SI{3.57}{\decibel}}
+ \rput(1, 4.4){\SI{2.4}{\giga\hertz}}
+ \oscillator[output=right,fillstyle=solid,fillcolor=WildStrawberry](A){}{}
+ \attenuator[dipoleinput=left, labeloffset=0.9, inputarrow=true](B)(C){\SI{-3}{\decibel}}
+ \amplifier[dipoleinput=left, labeloffset=0.9, inputarrow=true](C)(D){+\SI{14}{\decibel}}
+ \splitter[tripolestyle=bottom,inputarrow=true, tripoleinput=left,fillstyle=solid,fillcolor=Magenta](D)(E)(F){}{}
+ \psline[arrowinset=0]{->}(E)(EE)
+ \mixer[tripolestyle=top,inputarrow=true, tripoleinput=right, labeloffset=0.9,fillstyle=solid,fillcolor=red](G)(H)(F){}{}
+ \wire(H)(HH)
+ \rput(7.8, 1.25){\SI{13}{\dbm}}
+ \rput(7.8, 0.75){\SI{900}{\mega\hertz}}
+ \attenuator[dipoleinput=left,labeloffset=-0.9,linecolor=blue](I)(G){\textcolor{blue}{\SI{-10}{\decibel}}}
+ \psline[arrowinset=0]{->}(I)(J)
+ \rput(6, 3.9){\SI{-4}{\decibel}}
+ \rput(1.75, 1.25){\SI{3.3}{\mega\hertz} @\SI{-10}{\dbm}}
+ \rput(1.75, 0.75){\SI{1.5}{\mega\hertz} @\SI{-10}{\dbm}}
+\end{pspicture}
+
+\subsubsection{Radiometer block diagram example}
+From Chang, K., RF and Microwave Wireless Systems, Wiley InterScience, page 319, ISBN 0-471-35199-7
+
+\noindent
+\resizebox{\linewidth}{!}{%
+\begin{pspicture}(1,1)(19,9)
+ \pnode(2,8){A}
+ \antenna{90}(A)
+ \rput(4,8){\rnode{B}{\psframebox{\begin{tabular}{c}Ferrite\\Switch\end{tabular}}}}
+ \ncline{A}{B}
+ %%% Branche Calibration
+ \pnode(4,6){C}
+ \pnode(4,4){D}
+ \pnode(5,5){E}
+ \circulator[tripolestyle=isolator,tripoleconfig=right]{90}(C)(D)(E){Isolator}{}
+ \ncline{B}{C}
+ \pnode(3,3){F}
+ \pnode(5,3){G}
+ \resistor[unit=0.5,dipolestyle=zigzag,variable=true](F)(G){}
+ \pnode(4,3){H}
+ \ncline{D}{H}
+ \rput[t](4,2.75){%
+ \begin{tabular}{c}
+ Hot and Cold\\
+ loads for calibration
+ \end{tabular}}
+ %%% Branche reception
+ \pnode(6,8){R1}
+ \pnode(8,8){R2}
+ \pnode(7,7){X1}
+ \circulator[tripolestyle=isolator,tripoleconfig=right]{180}(R1)(R2)(X1){Isolator}{}
+ \ncline{B}{R1}
+ \pnode(10,8){R3}
+ \pnode(9,7){X2}
+ \mixer[inputarrow=true](R2)(R3)(X2){Mixer}{}
+ \pnode(9,6){X3}
+ \oscillator[output=top](X3){LO}{}
+ \pnode(12,8){R4}
+ \ncline{R3}{R4}
+ \naput{0.5~GHZ}
+ \pnode(14,8){R5}
+ \filter(R4)(R5){BPF}%
+ \pnode(16,8){R6}
+ \amplifier[inputarrow=true](R5)(R6){IF~Amp}
+ \pnode(18,8){R7}
+ \detector[inputarrow=true](R6)(R7){Detector}
+ \pnode(18,4){R8}
+ \amplifier[inputarrow=true,labeloffset=-1](R7)(R8){Amp}
+ \pscircle[fillstyle=solid,fillcolor=white](18,4){0.1}
+ \rput[t](18,3.9){%
+ \begin{tabular}{c}
+ Output\\
+ for processing
+ \end{tabular}}
+\end{pspicture}}
+
+\begin{landscape}
+
+\subsubsection{Ku-band Transceiver}
+\resizebox{\linewidth}{!}{%
+\psset{unit=1cm}
+\begin{pspicture}(0,-3.5)(29.25,11)
+ \rput[r](1.9,8){70/140MHz}
+ \pnode(2,8){N1}
+ \pnode(4,8){N2}
+ \amplifier[fillstyle=solid,fillcolor=Thistle,inputarrow=true](N1)(N2){IF~Amp}
+
+ \pnode(6,8){N3}
+ \pnode(5,7){D1}
+ \mixer(N2)(N3)(D1){}{}
+
+ \pnode(5,5){D2}
+ \amplifier[fillstyle=solid,fillcolor=CornflowerBlue,labeloffset=-1.5](D2)(D1){L-Band Buffers}
+ \pnode(3,5){D3}
+ \amplifier[fillstyle=solid,fillcolor=CornflowerBlue](D3)(D2){}
+ \pnode(2,5){D4}
+ \oscillator[output=right](D4){VCO}{fillstyle=solid,fillcolor=Orange}
+ \psframe(1.25,3)(2.75,5.75)
+ \rput[b](2,3.1){\large\textbf{L-band}}
+ \pnode(5,3){D5}
+ \amplifier[fillstyle=solid,fillcolor=CornflowerBlue](D2)(D5){}
+
+ \pnode(2,2){R1}
+ \pnode(4,2){R2}
+ \amplifier[fillstyle=solid,fillcolor=Thistle](R2)(R1){IF~Amp}
+ \rput[r](1.9,2){70/140MHz}
+ \pnode(6,2){R3}
+ \filter(R3)(R2){}
+ \pnode(8,2){R4}
+ \pnode(7,3){D6}
+ \mixer[tripolestyle=top](R3)(R4)(D6){}{}
+ \ncline{D5}{D6}
+
+ \pnode(8,8){N4}
+ \filter(N3)(N4){}
+ \pnode(10,8){N5}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue](N4)(N5){L-band Amp}
+ \pnode(12,8){N6}
+ \resistor[unit=0.5,dipolestyle=zigzag,variable=true,labeloffset=-0.8](N5)(N6){RF Atten}
+ \pnode(11,8){U0}
+
+ \pnode(14,8){N7}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue](N6)(N7){}
+ \pnode(16,8){N8}
+ \pnode(15,7){D7}
+ \mixer(N7)(N8)(D7){Mixer}{fillstyle=solid,fillcolor=BurntOrange}
+ \pnode(18,8){N9}
+ \filter(N8)(N9){}
+ \pnode(20,8){N10}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue,labeloffset=-0.8](N9)(N10){L-band Amp}
+ \pnode(22,8){N11}
+ \pnode(21,7){X1}
+ \mixer(N10)(N11)(X1){Mixer}{fillstyle=solid,fillcolor=BurntOrange}
+ \pnode(24,8){N12}
+ \filter(N11)(N12){}
+ \pnode(26,8){N13}
+ \amplifier[fillstyle=solid,fillcolor=RubineRed,labeloffset=-0.8](N12)(N13){Ku-band Amp}
+
+ \pnode(18,10){U2}
+ \pnode(20,10){U3}
+ \detector[fillstyle=solid,fillcolor=NavyBlue,dipoleinput=right](U2)(U3){Det L-Band}
+ \pnode(11,10){U1}
+ \ncline{U2}{U1}
+ \ncline{U1}{U0}
+ \pnode(24,10){U4}
+ \pnode(26,10){U5}
+ \detector[fillstyle=solid,fillcolor=RubineRed,dipoleinput=right](U4)(U5){Det Ku-Band}
+ \ncline{U4}{U3}
+ \ncline{U5}{N13}
+
+ \pnode(15,5){D8}
+ \amplifier[fillstyle=solid,fillcolor=CornflowerBlue,labeloffset=-1.5](D8)(D7){L-Band Buffers}
+ \pnode(13,5){D9}
+ \amplifier[fillstyle=solid,fillcolor=CornflowerBlue](D9)(D8){}
+ \pnode(13,4){D10}
+ \ncline{D9}{D10}
+ \pnode(11,4){D11}
+ \vco[fillstyle=solid,fillcolor=Orange](D11)(D10){VCO}
+ \rput(10,4){\rnode{D12}{\psframebox{\textbf{PLL}}}}
+ \ncline{D11}{D12}
+ \pnode(10,6){D13}
+ \ncline{D12}{D13}
+ \pnode(11,6){D14}
+ \ncline{D13}{D14}
+ \pnode(13,6){D15}
+ \freqmult[fillstyle=solid,fillcolor=Goldenrod,dipolestyle=divider](D14)(D15){Prescaler}
+ \ncline{D15}{D9}
+ \psframe(9.5,3.25)(13.1,7)
+ \rput[tl](9.7,6.8){\large\textbf{L-Band}}
+
+ \pnode(10,2){R5}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue](R5)(R4){L-band Amp}
+ \pnode(12,2){R6}
+ \resistor[unit=0.5,dipolestyle=zigzag,variable=true,labeloffset=-0.8](R5)(R6){RF Atten}
+ \pnode(14,2){R7}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue](R7)(R6){L-band Amp}
+ \pnode(16,2){R8}
+ \filter(R8)(R7){}
+ \pnode(18,2){R9}
+ \pnode(17,3){D17}
+ \mixer[tripolestyle=top](R8)(R9)(D17){Mixer}{fillstyle=solid,fillcolor=BurntOrange}
+
+ \pnode(15,3){D16}
+ \amplifier[fillstyle=solid,fillcolor=CornflowerBlue](D8)(D16){}
+ \ncline{D16}{D17}
+
+ \pnode(20,2){R10}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue](R10)(R9){L-band Amp}
+ \pnode(22,2){R11}
+ \amplifier[fillstyle=solid,fillcolor=NavyBlue](R11)(R10){L-band Amp}
+ \pnode(24,2){R12}
+ \filter(R12)(R11){}
+ \pnode(26,2){R13}
+ \pnode(25,1){R15}
+ \mixer(R12)(R13)(R15){Mixer}{fillstyle=solid,fillcolor=BurntOrange}
+ \pnode(28,2){R14}
+ \amplifier[fillstyle=solid,fillcolor=Purple](R14)(R13){Ku-band LNA}
+
+ \pnode(25,-1){R16}
+ \amplifier[fillstyle=solid,fillcolor=OliveGreen,labeloffset=-1.6](R16)(R15){Ku-band Buffers}
+ \pnode(24,-1){R17}
+ \ncline{R16}{R17}
+ \pnode(24,-2){R18}
+ \ncline{R17}{R18}
+ \pnode(22,-2){R19}
+ \vco[fillstyle=solid,fillcolor=Red](R18)(R19){Ku-band}
+ \rput(21,-2){\rnode{R20}{\psframebox{\textbf{PLL}}}}
+ \ncline{R19}{R20}
+ \pnode(21,0){R21}
+ \ncline{R20}{R21}
+ \pnode(22,0){R22}
+ \ncline{R21}{R22}
+ \pnode(24,0){R23}
+ \freqmult[fillstyle=solid,fillcolor=Goldenrod,dipolestyle=divider](R22)(R23){Prescaler}
+ \ncline{R23}{R17}
+ \psframe(18,-3)(28.5,3)
+ \rput[br](28,-2.75){\large\textbf{LNB}}
+ \rput[bl](18,3.1){%
+ \begin{tabular}{l}
+ \textbf{950-1540 MHz}\\
+ \textbf{900-1700 MHz}
+ \end{tabular}}
+ \cnode(29,2){.1}{S2}
+ \ncline{R14}{S2}
+
+ \pnode(21,5.5){X2}
+ \ncline{X1}{X2}
+ \pnode(24,5.5){X3}
+ \amplifier[fillstyle=solid,fillcolor=OliveGreen](X3)(X2){Ku-band Buffers}
+ \pnode(24,6.25){X4}
+ \ncline{X3}{X4}
+ \pnode(26,6.25){X5}
+ \freqmult[fillstyle=solid,fillcolor=Goldenrod,dipolestyle=divider,labeloffset=-0.7](X4)(X5){Prescaler}
+ \pnode(27,6.25){X6}
+ \ncline{X5}{X6}
+ \rput(27,4.75){\rnode{X7}{\psframebox{\textbf{PLL}}}}
+ \ncline{X6}{X7}
+ \pnode(26,4.75){X8}
+ \ncline{X7}{X8}
+ \pnode(24,4.75){X9}
+ \vco[fillstyle=solid,fillcolor=Red](X8)(X9){Ku-band}
+ \ncline{X9}{X3}
+ \psframe(23.75,3.25)(28.5,7)
+ \rput[br](28,3.5){\large\textbf{Ku-band}}
+
+ \pnode(28.5,8){N14}
+ \amplifier[fillstyle=solid,fillcolor=RubineRed](N13)(N14){}
+ \cnode(29,8){.1}{S1}
+ \ncline{N14}{S1}
+ \psframe(26.25,7.25)(28.5,10)
+ \rput[t](27.375,9.75){\large \textbf{SSPA}}
+
+ \rput[lt](2,0){\large%
+ \begin{tabular}{l}
+ \textbf{Tx/GHz: 13.75-14.00, 14.00-14.50}\\
+ \textbf{Rx/GHz: 10.95-11.70, 11.20-11.70, 11.70-12.20, 12.25-12.75}
+ \end{tabular}}
+\end{pspicture}}
+
+\subsubsection{Circuit to harvest Solar Energy}
+\resizebox{\linewidth}{!}{%
+\begin{pspicture}[labelangle=:U, showgrid=false](40,10)
+ \pnodes(1.75, 1){A}(3, 1){B}(3, 3.5){C}(4, 3.5){D}(6, 3.5){E}(6, 4.5){F}(3, 5.5){G}(6, 6){H}%
+ (2.5, 6.5){I}(2.5, 8.5){J}(0.5, 6.5){K}(0, 6.5){K1}(8.5, 6){L}(8.5, 5.5){L1}(8.5, 7){M}%
+ (8.5, 9){N}(8.5, 3.5){O}(7.25, 3.5){P}(11, 6){Q}(11, 4){R}(11, 3.5){S}(13, 6){T}%
+ (13, 5){U}(16, 5.5){V}(13, 3.5){W}(13, 1){X}(11.75, 1){X1}(17.5, 3.5){Y}(17.5, 5.5){Z}%
+ (20, 5.5){AA}(20, 6.5){AA1}(20, 5){AA2}(17.5, 9){BB}(22.5, 5.5){CC}(20, 3){DD}(20, 8.5){EE}%
+ (22.5, 3.5){FF}(22.5, 3){FF1}(18.75, 3){GG}(25, 5.5){HH}(25, 4.5){II}(28, 5){JJ}(25, 3){KK}%
+ (25, 0.5){LL}(23.75, 0.5){MM}(27, 3){NN}(29.5, 3){OO}(29.5, 5){PP}(29.5, 8.5){QQ}(31.5, 5){RR}(32.5, 5){SS}
+%
+ \newground [groundstyle=triangle]{180}(A) \rput(1.75, 2.2){+5}
+ \wire(A)(B)
+ \cell(B)(C){}
+ \wire[linecolor=blue](C)(D)
+ \potentiometer [dipolestyle =zigzag ,labelangle =:U, labeloffset=-0.6, linecolor=blue](D)(E)(F){\textcolor{blue}{$\SI{10}{\kilo\ohm}$}}
+ \wire[arrows=-*, linecolor=blue](E)(F) %$
+ \wire(C)(G)
+ \wire[arrows=-*](F)(H)
+ \OA[OAperfect=false, OAinvert=false](I)(G)(H)
+ \cell(I)(J){}
+ \capacitor[labelangle =0, labeloffset=-0.8](K)(I){$\SI{1}{\micro\farad}$}
+ \wire[arrows=-o](K)(K1)
+ \psarc(0, 6.5){0.15}{90}{-90}
+ \newground(0, 6.35)
+ \newground [groundstyle=triangle]{180}(J)
+ \resistor[arrows=-*, dipolestyle =zigzag ,labelangle =0, labeloffset=0.6](H)(L){$\SI{8.45}{\kilo\ohm}~ 1\%$}
+ \wire(L)(M)
+ \capacitor[labelangle =0, labeloffset=-0.8](M)(N){$\SI{1}{\nano\farad}$}
+ \wire(L)(L1)
+ \resistor[arrows=*-, dipolestyle =zigzag ,labelangle =0, labeloffset=-1.2](O)(L1){$\SI{102}{\kilo\ohm}~ 1\%$}
+ \wire(O)(P)
+ \newground [groundstyle=triangle]{180}(P)
+ \resistor[arrows=-*, dipolestyle =zigzag ,labelangle =0, labeloffset=0.6](L)(Q){$\SI{7.15}{\kilo\ohm}~ 1\%$}
+ \capacitor[labelangle =0, labeloffset=-0.8](R)(Q){$\SI{1}{\nano\farad}$}
+ \wire(O)(S)\wire(S)(R)\wire(Q)(T)
+ \OA[OAperfect=false, OAinvert=false, OApower = true](T)(U)(V)
+ \rput(2.5, 9.7){+5}
+ \rput(7.2, 4.7){+5}
+ \newground [groundstyle=triangle]{180}(14.5, 6)
+ \rput(14.5, 7.2){+12}
+ \newground(14.5, 5)
+ \wire[arrows = -*](U)(W)
+ \cell(X)(W){}
+ \wire(X)(X1)
+ \newground [groundstyle=triangle]{180}(X1)
+ \rput(11.75, 2.3){+5}
+ \wire(W)(15, 3.5)
+ \resistor[dipolestyle =zigzag](15, 3.5)(Y){$\SI{1}{\kilo\ohm}~ 1\%$}
+ \wire[arrows = -*](Y)(Z)
+ \wire(V)(Z)
+ \resistor[dipolestyle =zigzag, arrows =-*](Z)(AA){$\SI{17.4}{\kilo\ohm}~ 1\%$}
+ \wire(N)(BB)
+ \wire(BB)(Z)
+ \resistor[dipolestyle =zigzag, arrows =-*](AA)(CC){$\SI{4.12}{\kilo\ohm}~ 1\%$}
+ \wire(AA)(AA2)
+ \resistor[dipolestyle =zigzag ,labelangle =0, labeloffset=1.1, arrows =-*](AA2)(DD){$\SI{28}{\kilo\ohm}~ 1\%$}
+ \wire(AA)(AA1)
+ \capacitor[labelangle =0, labeloffset=-0.8](AA1)(EE){$\SI{1}{\nano\farad}$}
+ \capacitor[labelangle =0, labeloffset=0.8](CC)(FF){$\SI{1}{\nano\farad}$}
+ \wire(FF)(FF1)
+ \wire(FF1)(GG)
+ \newground [groundstyle=triangle]{180}(GG)
+ \rput(18.75, 4.2){+5}
+ \wire(CC)(HH)
+ \OA[OAperfect=false, OAinvert=false](HH)(II)(JJ)
+ \wire[arrows=-*](II)(KK)
+ \cell(LL)(KK){}
+ \wire(LL)(MM)
+ \newground [groundstyle=triangle]{180}(MM)
+ \rput(23.75, 1.7){+5}
+ \wire(KK)(NN)
+ \resistor[dipolestyle =zigzag](NN)(OO){$\SI{1}{\kilo\ohm}~ 1\%$}
+ \wire(OO)(PP)
+ \wire[arrows = -*](JJ)(PP)
+ \wire(EE)(QQ)
+ \wire(QQ)(PP)
+ \resistor[dipolestyle =zigzag](PP)(RR){$\SI{47}{\kilo\ohm}$}
+ \wire[arrows=-o](RR)(SS)
+ %% OP AMP PINS
+ \rput(3.2, 6.7){\texttt{10}}
+ \rput(3.2, 5.7){\texttt{9}}
+ \rput(5.7, 6.2){\texttt{8}}
+ \rput(13.2, 6.2){\texttt{3}}
+ \rput(13.2, 5.2){\texttt{2}}
+ \rput(15.7, 5.7){\texttt{1}}
+ \rput(14.7, 6.2){\texttt{4}}
+ \rput(14.7, 4.8){\texttt{11}}
+ \rput(25.2, 5.7){\texttt{5}}
+ \rput(25.2, 4.7){\texttt{6}}
+ \rput(27.7, 5.2){\texttt{7}}
+\end{pspicture}}
+
+\subsubsection{Amplificator for hearing aid}
+\scalebox{0.7}{%
+\begin{pspicture}[showgrid=false](-0.5, -0.5)(25,10)
+ \pnodes(0, 1){A}(-0.1, 2){BC}(0, 2){B}(2, 1.5){C}(6, 1.5){D}(4, 4.5){E}(0, 7.5){F}%
+ (6, 7.5){G}(0, 5){AA}(0, 6){BB}(2, 5.5){CC}(2.5, 5.5){DD}(2.5, 3.5){EE}(6, 5){H}%
+ (7.5, 5){HH}(7.5, 3){HK}(9, 4){I}(9, 5){II}(11.5, 4.5){J}(9, 6.5){K}(11.5, 6.5){KL}%
+ (13, 3.5){L}(15, 4){M}(19, 4){N}(19, 7){O}(13, 7){LL}(13, 8){JJ}(13, 9.5){PP}%
+ (15, 7.5){MM}(15.5, 7.5){NN}(15.5, 6){OO}(19, 9.5){PQ}(17, 6.5){QQ}(19, 7){RR}%
+ (20.5, 7){P}(20.5, 5.5){Q}(22, 7){R}(22, 6){S}(24.5, 6.5){T}(22, 8.5){U}(24.5, 8.5){V}%
+ (25, 6.5){TT}
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % Première cellule
+
+ \wire[arrows=o-](BC)(B)
+ \GM[GMinvert=false](B)(A)(C)
+ \newground[connectingdot=false, groundstyle=triangle](A)
+ \wire(C)(D)
+ \wire(BB)(F)
+ \wire(F)(G)
+ \wire[arrows=-*](G)(H)
+ \GM[GMinvert=false](BB)(AA)(CC)
+ \newground[connectingdot=false, groundstyle=triangle](AA)
+ \capacitor[arrows=*-, labeloffset=0.9](DD)(EE){$C_{A1}$}
+ \newground[connectingdot=false, groundstyle=triangle](EE)
+
+ \GM[GMinvert=true](CC)(E)(H)
+ \newground[connectingdot=false, groundstyle=triangle](E)
+
+ \wire(D)(H)
+
+ \capacitor[arrows=*-, labeloffset=0.9](HH)(HK){$C_{B1}$}
+ \newground[connectingdot=false, groundstyle=triangle](HK)
+
+ \GM[GMinvert=true](H)(I)(J)
+ \newground[connectingdot=false, groundstyle=triangle](I)
+ \wire[arrows=*-](II)(K)
+ \wire(K)(KL)
+ \wire[arrows=-*](KL)(J)
+ % Seconde cellule
+
+ \GM[GMinvert=false](J)(L)(M)
+ \newground[connectingdot=false, groundstyle=triangle](L)
+ \GM[GMinvert=false](J)(L)(M)
+ \newground[connectingdot=false, groundstyle=triangle](L)
+ \wire(M)(N)
+ \wire(N)(O)
+
+ \GM[GMinvert=false](JJ)(LL)(MM)
+ \newground[connectingdot=false, groundstyle=triangle](LL)
+ \capacitor[arrows=*-, labeloffset=0.9](NN)(OO){$C_{A2}$}
+ \newground[connectingdot=false, groundstyle=triangle](OO)
+ \wire(JJ)(PP)
+ \wire(PP)(PQ)
+ \wire[arrows=-*](PQ)(RR)
+ \GM[GMinvert=false](MM)(QQ)(RR)
+ \newground[connectingdot=false, groundstyle=triangle](QQ)
+
+ \capacitor[arrows=*-, labeloffset=0.9](P)(Q){$C_{B2}$}
+ \newground[connectingdot=false, groundstyle=triangle](Q)
+
+ \GM[GMinvert=false](RR)(S)(T)
+ \newground[connectingdot=false, groundstyle=triangle](S)
+ \wire[arrows=*-](R)(U)
+ \wire(U)(V)
+ \wire[arrows=-*](V)(T)
+ \wire[arrows=-o](T)(TT)
+
+
+
+ %%%%%%%%%%%
+ \rput[B](1, 0.1){$Gm_{5,1}$}
+ \rput[B](1, 4.1){$Gm_{1,1}$}
+ \rput[B](5, 3.6){$Gm_{2,1}$}
+ \rput[B](10.25, 3.1){$Gm_{3,1}$}
+ \rput[B](14, 2.6){$Gm_{5,2}$}
+ \rput[B](14, 6.1){$Gm_{1,2}$}
+ \rput[B](18, 5.6){$Gm_{2,2}$}
+ \rput[B](23.25, 5.1){$Gm_{3,2}$}
+
+ \uput{0.2}[180](BC){\textbf{$V_{IN}$}}
+ \uput{0.2}[0](TT){\textbf{$V_{OUT}$}}
+
+\end{pspicture}
+}
+
+\end{landscape}
+
+
+
+\clearpage
+\section{Flip Flops -- logical elements}
+
+The syntax for all logical base circuits is
+\begin{BDef}
+\Lcs{logic}\OptArgs\OptArg*{\coord0}\Largb{label}
+\end{BDef}
+
+\noindent where the options and the origin are optional. If they are missing,
+then the default options, described in the next section and the default
+origin $(0,0)$ is used. The origin specifies the lower left corner
+of the logical circuit.
+
+\xLcs{logic}xLkeyword{logicType}
+\begin{lstlisting}[style=code]
+\logic{Demo}
+\logic[logicType=and]{Demo}
+\logic(0,0){Demo}
+\logic[logicType=and](0,0){Demo}
+\end{lstlisting}
+
+The above four ,,different`` calls of the \Lcs{logic} macro give the
+same output, because they are equivalent.
+
+\subsection{The Options}
+
+\begin{longtable}{@{}>{\ttfamily}l l l@{}}
+\textrm{\emph{name}} & \emph{type} & \emph{default}\\\hline
+\endhead
+\Lkeyword{logicShowNode} & boolean & \false \\
+\Lkeyword{logicShowDot} & boolean & \false \\
+\Lkeyword{logicNodestyle} & command & \emph{\textbackslash footnotesize} \\
+\Lkeyword{logicSymbolstyle} & command & \emph{\textbackslash large} \\
+\Lkeyword{logicSymbolpos} & value & \emph{0.5} \\
+\Lkeyword{logicLabelstyle} & command & \emph{\textbackslash small} \\
+\Lkeyword{logicType} & string & \Lkeyval{and} \\
+\Lkeyword{logicChangeLR} & boolean & \false \\
+\Lkeyword{logicWidth} & length & \emph{1.5} \\
+\Lkeyword{logicHeight} & length & \emph{2.5} \\
+\Lkeyword{logicWireLength} & length & \emph{0.5} \\
+\Lkeyword{logicNInput} & number & \emph{2} \\
+\Lkeyword{logicJInput} & number & \emph{2} \\
+\Lkeyword{logicKInput} & number &\emph{2}
+\end{longtable}
+
+\subsection{Basic Logical Circuits}
+At least the basic objects require a unique label name, otherwise it is
+not sure, that all nodes will work well. The label may contain any
+alphanumerical character and most of all symbols. But it is save
+using only combinations of letters and digits. For example:
+\begin{verbatim}
+And0
+a0
+a123
+12
+NOT123a
+\end{verbatim}
+
+\verb|A_1| is not a good choice, the underscore may cause some problems.
+
+\subsubsection{And}
+\psset{subgriddiv=0,griddots=5,gridlabels=7pt}
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-1,0)(3,3)
+ \logic{AND1}
+ \end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicChangeLR]{AND2}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=and}\xLkeyword{logicChangeLR}\xLkeyword{logicNInput}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(-0.5,0)(4,5)
+ \logic[logicShowNode,%
+ logicWidth=2,
+ logicHeight=4,
+ logicNInput=6,
+ logicChangeLR](1,1){AND3}
+ \end{pspicture}
+\end{LTXexample}
+
+\subsubsection{NotAnd}
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=nand,
+ logicShowNode]{NAND1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=nand,
+ logicChangeLR]{NAND2}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=nand}\xLkeyword{logicChangeLR}\xLkeyword{logicNInput}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(4,5)
+ \logic[logicType=nand,
+ logicShowNode,
+ logicWidth=2,
+ logicHeight=4,
+ logicNInput=6,
+ logicChangeLR](1,1){NAND3}
+ \end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Or}
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=or,
+ logicShowNode]{OR1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=or,
+ logicChangeLR]{OR2}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=or}\xLkeyword{logicChangeLR}\xLkeyword{logicNInput}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(4,5)
+ \logic[logicType=or,
+ logicShowNode,
+ logicWidth=2,
+ logicHeight=4,
+ logicNInput=6,
+ logicChangeLR](1,1){OR3}
+ \end{pspicture}
+\end{LTXexample}
+
+\clearpage
+\subsubsection{Not Or}
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=nor,
+ logicShowNode]{NOR1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=nor,
+ logicChangeLR]{NOR2}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=nor}\xLkeyword{logicChangeLR}\xLkeyword{logicNInput}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(4,5)
+ \logic[logicType=nor,
+ logicShowNode,
+ logicWidth=2,
+ logicHeight=4,
+ logicNInput=6,
+ logicChangeLR](1,1){NOR3}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\subsubsection{Not}
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=not,
+ logicShowNode]{NOT1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=not,
+ logicChangeLR]{NOT2}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=not}\xLkeyword{logicChangeLR}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(4,5)
+ \logic[logicType=not,
+ logicShowNode,
+ logicWidth=2,
+ logicHeight=4,
+ logicChangeLR](1,1){NOT3}
+ \end{pspicture}
+\end{LTXexample}
+
+\subsubsection{Exclusive OR}
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=exor,
+ logicShowNode]{ExOR1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=exor,
+ logicChangeLR]{ExOR2}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=exor}\xLkeyword{logicChangeLR}\xLkeyword{logicNInput}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(4,5)
+ \logic[logicType=exor,
+ logicShowNode,
+ logicNInput=6,
+ logicWidth=2,
+ logicHeight=4,
+ logicChangeLR](1,1){ExOR3}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+\subsubsection{Exclusive NOR}
+
+\xLkeyset{logicType=exnor}\xLkeyword{logicShowNode}
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=exnor,
+ logicShowNode]{ExNOR1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\xLkeyset{logicType=exor}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,3)
+ \logic[logicType=exnor,
+ logicChangeLR]{ExNOR2}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=exor}\xLkeyword{logicChangeLR}\xLkeyword{logicNInput}
+\xLkeyword{logicWidth}\xLkeyword{logicHeight}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](4,6)
+ \begin{pspicture}(4,5)
+ \logic[logicType=exnor,
+ logicShowNode,
+ logicNInput=6,
+ logicWidth=2,
+ logicHeight=4,
+ logicChangeLR](1,1){ExNOR3}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\subsection{RS Flip Flop}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=RS}
+\begin{LTXexample}[width=4.5cm](3,4.5)
+ \begin{pspicture}(-1,-1)(3,3)
+ \logic[logicShowNode,
+ logicType=RS]{RS1}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=RS}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](3,4.5)
+ \begin{pspicture}(-1,-1)(3,3)
+ \logic[logicShowNode,
+ logicType=RS,
+ logicChangeLR]{RS2}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\subsection{D Flip Flop}
+
+\begin{LTXexample}[width=4.5cm](3,4.5)
+ \begin{pspicture}(-1,-1)(3,3)
+ \logic[logicShowNode,
+ logicType=D]{D1}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=D}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](3,4.5)
+ \begin{pspicture}(-1,-1)(3,3)
+ \logic[logicShowNode=true,
+ logicType=D,
+ logicChangeLR]{D2}
+ \end{pspicture}
+\end{LTXexample}
+
+
+\subsection{JK Flip Flop}
+\xLkeyword{logicShowNode}\xLkeyset{logicType=JK}\xLkeyword{logicJInput}\xLkeyword{logicKInput}
+\begin{LTXexample}[width=4.5cm](3,4.5)
+\begin{pspicture}(-1,-1)(3,3)
+ \logic[logicShowNode,
+ logicType=JK,
+ logicKInput=2,
+ logicJInput=2]{JK1}
+\end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicShowNode}\xLkeyset{logicType=JK}\xLkeyword{logicJInput}\xLkeyword{logicKInput}\xLkeyword{logicChangeLR}
+\begin{LTXexample}[width=4.5cm](3,4.5)
+ \begin{pspicture}(-1,-1)(3,3)
+ \logic[logicShowNode,logicType=JK,
+ logicKInput=2, logicJInput=4,
+ logicChangeLR]{JK2}
+ \end{pspicture}
+\end{LTXexample}
+
+\subsection{Other Options}
+
+\xLkeyword{logicShowDot}
+\begin{LTXexample}[width=3.5cm](3,3)
+ \begin{pspicture}(-0.5,0)(3,2.5)
+ \logic[logicShowDot]{A0}
+ \end{pspicture}
+\end{LTXexample}
+
+\xLkeyword{logicWireLength}
+\begin{LTXexample}[width=4.5cm](4,3)
+ \begin{pspicture}(-1,0)(3,2.5)
+ \logic[logicWireLength=1,
+ logicShowDot]{A1}
+ \end{pspicture}
+\end{LTXexample}
+
+\bigskip
+The unit of \Lkeyword{logicWireLength} is the same than the actual one for pstricks, set by
+the \Lkeyword{unit} option.
+
+\subsection{The Node Names}
+Every logic circuit is defined with its name, which should be a unique one.
+If we have the following NAND circuit, then \LPack{pst-circ} defines the nodes
+\begin{lstlisting}[style=syntax]
+NAND11, NAND12, NAND13, NAND14, NAND1Q
+\end{lstlisting}
+
+\noindent If there exists an inverted output, like for alle Flip Flops,
+then the negated one gets the appendix \verb|neg| to the node name. For
+example:
+\begin{lstlisting}[style=syntax]
+NAND1Q, NAND1Qneg
+\end{lstlisting}
+
+\begin{LTXexample}[width=3cm](3,3.5)
+ \begin{pspicture}(-0.5,0)(2.5,3)
+ \logic[logicShowNode=true,%
+ logicLabelstyle=\footnotesize,%
+ logicType=nand,%
+ logicNInput=4]{NAND1}
+ \multido{\n=1+1}{4}{%
+ \pscircle*[linecolor=red](NAND1\n){2pt}%
+ }
+ \pscircle*[linecolor=blue](NAND1Q){2pt}
+ \end{pspicture}
+\end{LTXexample}
+
+\vspace{0.5cm}
+Now it is possible to draw a line from the output to the input
+
+\begin{lstlisting}[style=syntax]
+\ncbar[angleA=0,angleB=180]{<Node A>}{<Node B>}
+\end{lstlisting}
+
+It may be easier to print a grid since the drawing phase and then comment it out if
+all is finished.
+
+\bigskip
+\begin{LTXexample}[width=3.5cm](3,3.5)
+ \begin{pspicture}(-1,-1)(2.5,3)
+ \logic[logicShowNode=true,%
+ logicLabelstyle=\footnotesize,%
+ logicType=nand,%
+ logicWireLength=1,%
+ logicNInput=4]{NAND1}
+ \pnode(-0.5,0|NAND11){tempA}
+ \pnode(2,0|NAND1Q){tempB}
+ \end{pspicture}
+ \ncbar[angleA=-90,angleB=0,arm=0.75,%
+ arrows=*-*, dotsize=0.15]{tempA}{tempB}
+\end{LTXexample}
+
+
+AN empty argument to the \Lkeyword{logicSymbolstyle} and \Lkeyword{logicLabelstyle} will suppress the
+output of the symbol and/or the label. The label, of course, is a mandatory argument because it is the prefix
+of the node names.
+
+
+
+\subsection{Examples}
+
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(-1,0)(5,5)
+ \psset{logicType=nor, logicLabelstyle=\normalsize,%
+ logicWidth=1, logicHeight=1.5, dotsize=0.15}
+ \logic(1.5,0){nor1}
+ \logic(1.5,3){nor2}
+ \psline(nor2Q)(4,0|nor2Q)
+ \uput[0](4,0|nor2Q){$Q$}
+ \psline(nor1Q)(4,0|nor1Q)
+ \uput[0](4,0|nor1Q){$\overline{Q}$}
+ \psline{*-}(3.50,0|nor2Q)(3.5,2.5)(1.5,2.5)
+ (0.5,1.75)(0.5,0|nor12)(nor12)
+ \psline{*-}(3.50,0|nor1Q)(3.5,2)(1.5,2)
+ (0.5,2.5)(0.5,0|nor21)(nor21)
+ \psline(0,0|nor11)(nor11)\uput[180](0,0|nor11){R}
+ \psline(0,0|nor22)(nor22)\uput[180](0,0|nor22){S}
+ \end{pspicture}
+\end{LTXexample}
+
+\bigskip
+\begin{LTXexample}[pos=t]
+ \begin{pspicture}(-4,0)(5,7)
+ \psset{logicWidth=1, logicHeight=2, dotsize=0.15}
+ \logic[logicWireLength=0](-2,0){A0}
+ \logic[logicWireLength=0](-2,5){A1}
+ \ncbar[angleA=-180,angleB=-180,arm=0.5]{A11}{A02}
+ \psline[dotsize=0.15]{-*}(-3.5,3.5)(-2.5,3.5)
+ \uput[180](-3.5,3.5){$T$}
+ \psline(-3.5,0.5)(A01)\uput[180](-3.5,0.5){$S$}
+ \psline(-3.5,6.5)(A12)\uput[180](-3.5,6.5){$R$}
+ \psset{logicType=nor, logicLabelstyle=\normalsize}
+ \logic(1,0.5){nor1}
+ \logic(1,4.5){nor2}
+ \psline(nor2Q)(4,0|nor2Q)
+ \uput[0](4,0|nor2Q){$Q$}
+ \psline(nor1Q)(4,0|nor1Q)
+ \uput[0](4,0|nor1Q){$\overline{Q}$}
+ \psline{*-}(3,0|nor2Q)(3,4)(1,4)(0,3)(0,0|nor12)(nor12)
+ \psline{*-}(3,0|nor1Q)(3,3)(1,3)(0,4)(0,0|nor21)(nor21)
+ \psline(A0Q)(nor11)
+ \psline(A1Q)(nor22)
+ \end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+
+\section{Logical circuits in american style}
+
+\begin{longtable}{ll>{\ttfamily}l}
+\toprule
+ \emph{macro} & \emph{option} & \emph{defaults} \\\midrule
+ \endfirsthead
+ \midrule
+ \emph{macro} & \emph{option} & \emph{defaults} \\\midrule
+ \endhead
+ \midrule
+ \small continued on next page $\dots$ & & \\
+ \endfoot
+ \midrule
+ \endlastfoot
+ \Lcs{logicnot} & \Lkeyword{input} & true \\
+ & \Lkeyword{invertinput} & false \\
+ & \Lkeyword{invertoutput} & false \\
+ & \Lkeyword{iec} & false \\
+ & \Lkeyword{iecinvert} & false \\
+ & \Lkeyword{bubblesize} & 0.2 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{0.05, 0.10, 0.15, 0.20}} \\
+ \midrule
+ \Lcs{logicand} & \Lkeyword{ninputs} & 2 \\
+ & \nxLkeyword{input?} & true \\
+ & \multicolumn{2}{l}{\quad where ? = a--d} \\
+ & \nxLkeyword{invertinput?} & false \\
+ & \multicolumn{2}{l}{\quad where ? = a--d} \\
+ & \Lkeyword{invertoutput} & false \\
+ & \Lkeyword{iec} & false \\
+ & \Lkeyword{iecinvert} & false \\
+ & \Lkeyword{bubblesize} & 0.2 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{0.05, 0.10, 0.15, 0.20}} \\
+ \midrule
+ \Lcs{logicor} & \Lkeyword{ninputs} & 2 \\
+ & \nxLkeyword{input?} & true \\
+ & \multicolumn{2}{l}{\quad where ? = 1--4} \\
+ & \nxLkeyword{invertinput?} & false \\
+ & \multicolumn{2}{l}{\quad where ? = a--d} \\
+ & \Lkeyword{invertoutput} & false \\
+ & \Lkeyword{iec} & false \\
+ & \Lkeyword{iecinvert} & false \\
+ & \Lkeyword{bubblesize} & 0.2 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{0.05, 0.10, 0.15, 0.20}} \\
+ \midrule
+ \Lcs{logicxor} & \Lkeyword{ninputs} & 2 \\
+ & \nxLkeyword{input?} & true \\
+ & \multicolumn{2}{l}{\quad where ? = 1--4} \\
+ & \nxLkeyword{invertinput?} & false \\
+ & \multicolumn{2}{l}{\quad where ? = a--d} \\
+ & \Lkeyword{invertoutput} & false \\
+ & \Lkeyword{iec} & false \\
+ & \Lkeyword{iecinvert} & false \\
+ & \Lkeyword{bubblesize} & 0.2 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{0.05, 0.10, 0.15, 0.20}} \\
+ \midrule
+ \Lcs{logicff} & \Lkeyword{inputa} & true \\
+ & \Lkeyword{invertinputa} & false \\
+ & \Lkeyword{inputalabel} & \\
+ & \Lkeyword{inputb} & true \\
+ & \Lkeyword{invertinputb} & false \\
+ & \Lkeyword{inputblabel} & \\
+ & \Lkeyword{enable} & false \\
+ & \Lkeyword{invertenable} & false \\
+ & \Lkeyword{clock} & false \\
+ & \Lkeyword{invertclock} & false \\
+ & \Lkeyword{set} & false \\
+ & \Lkeyword{invertset} & false \\
+ & \Lkeyword{reset} & false \\
+ & \Lkeyword{invertreset} & false \\
+ & \Lkeyword{bubblesize} & 0.2 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{0.05, 0.10, 0.15, 0.20}} \\
+ \midrule
+ \Lcs{logicic} & \Lkeyword{nicpins} & 8 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{8, 14, 16, 20, 32}} \\
+ & \nxLkeyword{pin?} & true \\
+ & \nxLkeyword{invertpin?} & false \\
+ & \nxLkeyword{pin?label} & \\
+ & \nxLkeyword{pin?number} & \\
+ & \multicolumn{2}{@{}l}{\quad where \texttt{? = a--z,aa,ab,ac,ad,ae,af}} \\
+ & \Lkeyword{bubblesize} & 0.2 \\
+ & \multicolumn{2}{@{}l}{\quad possible values \texttt{0.05, 0.10, 0.15, 0.20}} \\
+ \midrule
+ \Lcs{xic} & \Lkeyword{plcaddress} & \\
+ & \Lkeyword{plcsymbol} & \\
+ \midrule
+ \Lcs{xio} & \Lkeyword{plcaddress} & \\
+ & \Lkeyword{plcsymbol} & \\
+ \midrule
+ \Lcs{ote} & \Lkeyword{plcaddress} & \\
+ & \Lkeyword{plcsymbol} & \\
+ & \Lkeyword{latch} & false \\
+ & \Lkeyword{unlatch} & false \\
+ \midrule
+ \Lcs{osr} & \Lkeyword{plcaddress} & \\
+ & \Lkeyword{plcsymbol} & \\
+ \midrule
+ \Lcs{res} & \Lkeyword{plcaddress} & \\
+ & \Lkeyword{plcsymbol} & \\
+ \midrule
+ \Lcs{swpb} & \Lkeyword{contactclosed} & false \\
+ \midrule
+ \Lcs{swtog} & \Lkeyword{contactclosed} & false \\
+ \midrule
+ \Lcs{contact} & \Lkeyword{contactclosed} & false \\
+ \end{longtable}
+
+
+
+\subsection{Examples}
+
+%
+% NOT Example
+%
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(8.5,3)
+ \logicnot[invertoutput=true](0,0){IEEE}
+ \logicnot[invertoutput=true,iec=true,iecinvert=true](4,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+
+%
+% AND Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(9.5,3)
+ \logicand[ninputs=2](0,0){IEEE}
+ \logicand[ninputs=2,iec=true](5,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% NAND Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(9.5,3)
+ \logicand[ninputs=2,invertoutput=true](0,0){IEEE}
+ \logicand[ninputs=2,invertoutput=true,iec=true,iecinvert=true](5,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+
+%
+% Negative-AND Example
+%
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,3)
+ \logicand[ninputs=2,invertinputa=true,
+ invertinputb=true](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+% OR Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(9.5,3)
+ \logicor[ninputs=2](0,0){IEEE}
+ \logicor[ninputs=2,iec=true](5,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% NOR Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(9.5,3)
+ \logicor[ninputs=2,invertoutput=true](0,0){IEEE}
+ \logicor[ninputs=2,invertoutput=true,iec=true,iecinvert=true](5,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Negative-OR Example
+%
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,3)
+ \logicor[ninputs=2,invertinputa=true,
+ invertinputb=true](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Exclusive-OR Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(9.5,3)
+ \logicxor[ninputs=2]{0}(0,0){IEEE}
+ \logicxor[ninputs=2,iec=true]{0}(5,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Exclusive-NOR Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-1)(9.5,3)
+ \logicxor[ninputs=2,invertoutput=true]{0}(0,0){IEEE}
+ \logicxor[ninputs=2,invertoutput=true,iec=true,iecinvert=true]{0}(5,0){IEC}
+\end{pspicture}
+\end{LTXexample}
+
+\subsubsection{$S$-$R$ Flip-Flop with Clock}
+%
+% FF Example
+%
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,4)
+ \logicff[clock=true,inputalabel=$S$,inputblabel=$R$](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% FF Example
+%
+\subsubsection{$\bar{S}$-$\bar{R}$ Flip-Flop with Enable} %$
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,4)
+ \logicff[enable=true,inputalabel=$\bar{S}$,inputblabel=$\bar{R}$](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% FF Example
+%
+\subsubsection{$J$-$K$ Flip-Flop}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,4)
+ \logicff[inputalabel=$J$,inputblabel=$K$](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% FF Example
+%
+\subsubsection{$J$-$K$ Flip-Flop with Set and Reset}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,4)
+ \logicff[set=true,reset=true,invertreset=true,%
+ inputalabel=$J$,inputblabel=$K$](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% FF Example
+%
+\subsubsection{$D$ Flip-Flop}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,4)
+ \logicff[inputb=false,inputalabel=$D$](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% FF Example
+%
+\subsubsection{Full Adder}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(5,4)
+ \logicff[enable=true,invertoutputb=false,inputalabel=$A$,
+ inputblabel=$C_{in}$,inputenlabel=$B$,outputalabel=$\Sigma$,
+ outputblabel=$C_{out}$](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+\subsubsection{7-Segment Display}
+%
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(6.5,5)
+ \sevensegmentdisplay(0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% 7-Segment Display Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(6.5,6)
+ \sevensegmentdisplay[pinld=false,pinle=false,pinrc=false,pinlalabel=a,
+ pinlblabel=f,pinlglabel=e,pinrglabel=d,pinrelabel=c,pinrdlabel=g,
+ pinrblabel=b,pinralabel={$V_{CC}$},pinlanumber=1,pinlbnumber=2,
+ pinlcnumber=3,pinlfnumber=6,pinlgnumber=7,pinrgnumber=8,pinrfnumber=9,
+ pinrenumber=10,pinrdnumber=11,pinrbnumber=13,pinranumber=14](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% 7-Segment Display Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(6.5,6)
+ \sevensegmentdisplay[segmentdisplay=5](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% 7-Segment Display Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(6.5,6)
+ \sevensegmentdisplay[segmentdisplay=0,segmentcolor=red,segmentlabels=false,
+ pinlalabel=la,pinlblabel=lb,pinlclabel=lc,pinldlabel=ld,pinlelabel=le,
+ pinlflabel=lf,pinlglabel=lg,pinrglabel=rg,pinrflabel=rf,pinrelabel=re,
+ pinrdlabel=rd,pinrclabel=rc,pinrblabel=rb,pinralabel=ra,pinlanumber=1,
+ pinlbnumber=2,pinlcnumber=3,pinldnumber=4,pinlenumber=5,pinlfnumber=6,
+ pinlgnumber=7,pinrgnumber=8,pinrfnumber=9,pinrenumber=10,pinrdnumber=11,
+ pinrcnumber=12,pinrbnumber=13,pinranumber=14,pinta=true,pintalabel=ta,
+ pintanumber=0,pintb=true,pintblabel=tb,pintbnumber=0,pintc=true,
+ pintclabel=tc,pintcnumber=0,pintd=true,pintdlabel=td,pintdnumber=0,
+ pinte=true,pintelabel=te,pintenumber=0,pinba=true,pinbalabel=ba,
+ pinbanumber=0,pinbb=true,pinbblabel=bb,pinbbnumber=0,pinbc=true,
+ pinbclabel=bc,pinbcnumber=0,pinbd=true,pinbdlabel=bd,pinbdnumber=0,
+ pinbe=true,pinbelabel=be,pinbenumber=0](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% 7-Segment Display Example
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(6.5,6)
+ \sevensegmentdisplay[segmentdisplay=10,pinla=false,pinlb=false,
+ pinlc=false,pinld=false,pinle=false,pinlf=false,pinlg=false,pinrg=false,
+ pinrf=false,pinre=false,pinrd=false,pinrc=false,pinrb=false,pinra=false,
+ pinta=true,pintalabel=g,pintanumber=0,pintb=true,pintblabel=f,pintbnumber=0,
+ pintc=true,pintclabel=$V_{cc}$,pintcnumber=0,pintd=true,pintdlabel=a,
+ pintdnumber=0,pinte=true,pintelabel=b,pintenumber=0,pinba=true,pinbalabel=e,
+ pinbanumber=0,pinbb=true,pinbblabel=d,pinbbnumber=0,pinbc=true,
+ pinbclabel=$V_{cc}$,pinbcnumber=0,pinbd=true,pinbdlabel=c,pinbdnumber=0,
+ pinbe=true,pinbelabel=dp,pinbenumber=0](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 8-pins
+%
+\clearpage
+\subsubsection{8-Pin DIP IC}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,4)
+ \logicic[nicpins=8,bubblesize=0.1,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 8-pins all inverted
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,4)
+ \logicic[nicpins=8,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,%
+ invertpina=true,invertpinb=true,invertpinc=true,invertpind=true,%
+ invertpine=true,invertpinf=true,invertping=true,invertpinh=true](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 14-pin
+%
+\clearpage
+\subsubsection{14-Pin DIP IC}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,6)
+ \logicic[nicpins=14,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14]%
+ (0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+\clearpage
+\subsubsection{14-Pin DIP IC all inverted}
+% IC Example 14-pin all inverted
+%
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,6)
+ \logicic[nicpins=14,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,
+ invertpina=true,invertpinb=true,invertpinc=true,invertpind=true,%
+ invertpine=true,invertpinf=true,invertping=true,invertpinh=true,%
+ invertpini=true,invertpinj=true,invertpink=true,invertpinl=true,%
+ invertpinm=true,invertpinn=true]%
+ (0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 16-pin
+%
+\clearpage
+\subsubsection{16-Pin DIP IC}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,6)
+ \logicic[nicpins=16,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16]%
+ (0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+% IC Example 16-pin all inverted
+%
+\clearpage
+\subsubsection{16-Pin DIP IC all inverted}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,6)
+ \logicic[nicpins=16,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16,
+ invertpina=true,invertpinb=true,invertpinc=true,invertpind=true,%
+ invertpine=true,invertpinf=true,invertping=true,invertpinh=true,%
+ invertpini=true,invertpinj=true,invertpink=true,invertpinl=true,%
+ invertpinm=true,invertpinn=true,invertpino=true,invertpinp=true]%
+ (0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 20-pin
+%
+\clearpage
+\subsubsection{20-Pin DIP IC}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,7)
+ \logicic[nicpins=20,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinqlabel=q,pinrlabel=r,pinslabel=s,pintlabel=t,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16,%
+ pinqnumber=17,pinrnumber=18,pinsnumber=19,pintnumber=20]%
+ (0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 20-pin all inverted
+%
+\clearpage
+\subsubsection{20-Pin DIP IC all inverted}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(5,7)
+ \logicic[nicpins=20,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinqlabel=q,pinrlabel=r,pinslabel=s,pintlabel=t,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16,%
+ pinqnumber=17,pinrnumber=18,pinsnumber=19,pintnumber=20,%
+ invertpina=true,invertpinb=true,invertpinc=true,invertpind=true,%
+ invertpine=true,invertpinf=true,invertping=true,invertpinh=true,%
+ invertpini=true,invertpinj=true,invertpink=true,invertpinl=true,%
+ invertpinm=true,invertpinn=true,invertpino=true,invertpinp=true,%
+ invertpinq=true,invertpinr=true,invertpins=true,invertpint=true]%
+ (0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 32-pin
+%
+\clearpage
+\subsubsection{32-Pin DIP IC}
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-1,-2)(6,9.5)
+\logicic[nicpins=32, pintl=true,pintllabel=tl,pintlnumber=1,
+ pintc=true,pintclabel=tc,pintcnumber=2,pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,
+ pinbl=true,pinbllabel=bl,pinblnumber=1,pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinqlabel=q,pinrlabel=r,pinslabel=s,pintlabel=t,%
+ pinulabel=u,pinvlabel=v,pinwlabel=w,pinxlabel=x,%
+ pinylabel=y,pinzlabel=z,pinaalabel=aa,pinablabel=ab,%
+ pinaclabel=ac,pinadlabel=ad,pinaelabel=ae,pinaflabel=af,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16,%
+ pinqnumber=17,pinrnumber=18,pinsnumber=19,pintnumber=20,%
+ pinunumber=21,pinvnumber=22,pinwnumber=23,pinxnumber=24,%
+ pinynumber=25,pinznumber=26,pinaanumber=27,pinabnumber=28,%
+ pinacnumber=29,pinadnumber=30,pinaenumber=31,pinafnumber=32](0,0){Name}
+\end{pspicture}
+\end{LTXexample}
+
+%
+% IC Example 32-pin all inverted
+%
+\clearpage
+\subsubsection{32-Pin DIP IC all inverted}
+\begin{center}
+\begin{pspicture}(-1,-2)(6,9.5)
+\logicic[nicpins=32,pintl=true,pintllabel=tl,pintlnumber=1,
+ pintc=true,pintclabel=tc,pintcnumber=2,pintr=true,pintrlabel=tr,pintrnumber=3,
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinqlabel=q,pinrlabel=r,pinslabel=s,pintlabel=t,%
+ pinulabel=u,pinvlabel=v,pinwlabel=w,pinxlabel=x,%
+ pinylabel=y,pinzlabel=z,pinaalabel=aa,pinablabel=ab,%
+ pinaclabel=ac,pinadlabel=ad,pinaelabel=ae,pinaflabel=af,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16,%
+ pinqnumber=17,pinrnumber=18,pinsnumber=19,pintnumber=20,%
+ pinunumber=21,pinvnumber=22,pinwnumber=23,pinxnumber=24,%
+ pinynumber=25,pinznumber=26,pinaanumber=27,pinabnumber=28,%
+ pinacnumber=29,pinadnumber=30,pinaenumber=31,pinafnumber=32,%
+ invertpina=true,invertpinb=true,invertpinc=true,invertpind=true,%
+ invertpine=true,invertpinf=true,invertping=true,invertpinh=true,%
+ invertpini=true,invertpinj=true,invertpink=true,invertpinl=true,%
+ invertpinm=true,invertpinn=true,invertpino=true,invertpinp=true,%
+ invertpinq=true,invertpinr=true,invertpins=true,invertpint=true,%
+ invertpinu=true,invertpinv=true,invertpinw=true,invertpinx=true,%
+ invertpiny=true,invertpinz=true,invertpinaa=true,invertpinab=true,%
+ invertpinac=true,invertpinad=true,invertpinae=true,invertpinaf=true](0,0){Name}
+\end{pspicture}
+\end{center}
+
+
+\begin{lstlisting}
+\begin{pspicture}(-1,-2)(6,9.5)
+ \logicic[nicpins=32,%
+ pintl=true,pintllabel=tl,pintlnumber=1,%
+ pintc=true,pintclabel=tc,pintcnumber=2,%
+ pintr=true,pintrlabel=tr,pintrnumber=3,%
+ invertpintl=true,invertpintc=true,invertpintr=true,%
+ pinbl=true,pinbllabel=bl,pinblnumber=1,%
+ pinbc=true,pinbclabel=bc,pinbcnumber=2,%
+ pinbr=true,pinbrlabel=br,pinbrnumber=3,%
+ invertpinbl=true,invertpinbc=true,invertpinbr=true,%
+ pinalabel=a,pinblabel=b,pinclabel=c,pindlabel=d,%
+ pinelabel=e,pinflabel=f,pinglabel=g,pinhlabel=h,%
+ pinilabel=i,pinjlabel=j,pinklabel=k,pinllabel=l,%
+ pinmlabel=m,pinnlabel=n,pinolabel=o,pinplabel=p,%
+ pinqlabel=q,pinrlabel=r,pinslabel=s,pintlabel=t,%
+ pinulabel=u,pinvlabel=v,pinwlabel=w,pinxlabel=x,%
+ pinylabel=y,pinzlabel=z,pinaalabel=aa,pinablabel=ab,%
+ pinaclabel=ac,pinadlabel=ad,pinaelabel=ae,pinaflabel=af,%
+ pinanumber=1,pinbnumber=2,pincnumber=3,pindnumber=4,%
+ pinenumber=5,pinfnumber=6,pingnumber=7,pinhnumber=8,
+ pininumber=9,pinjnumber=10,pinknumber=11,pinlnumber=12,%
+ pinmnumber=13,pinnnumber=14,pinonumber=15,pinpnumber=16,%
+ pinqnumber=17,pinrnumber=18,pinsnumber=19,pintnumber=20,%
+ pinunumber=21,pinvnumber=22,pinwnumber=23,pinxnumber=24,%
+ pinynumber=25,pinznumber=26,pinaanumber=27,pinabnumber=28,%
+ pinacnumber=29,pinadnumber=30,pinaenumber=31,pinafnumber=32,%
+ invertpina=true,invertpinb=true,invertpinc=true,invertpind=true,%
+ invertpine=true,invertpinf=true,invertping=true,invertpinh=true,%
+ invertpini=true,invertpinj=true,invertpink=true,invertpinl=true,%
+ invertpinm=true,invertpinn=true,invertpino=true,invertpinp=true,%
+ invertpinq=true,invertpinr=true,invertpins=true,invertpint=true,%
+ invertpinu=true,invertpinv=true,invertpinw=true,invertpinx=true,%
+ invertpiny=true,invertpinz=true,invertpinaa=true,invertpinab=true,%
+ invertpinac=true,invertpinad=true,invertpinae=true,invertpinaf=true]%
+ (0,0){Name}
+\end{pspicture}
+\end{lstlisting}
+
+\clearpage
+\section{Relay Ladder Logic}
+
+%
+% XIC
+%
+\subsubsection{XIC}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \xic[plcaddress=I:1/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% XIO
+%
+\subsubsection{XI0}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \xio[plcaddress=I:1/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% OTE
+%
+\subsubsection{OTE}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \ote[plcaddress=O:2/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% OTL
+%
+\subsubsection{OTL}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \ote[latch=true,
+ plcaddress=O:2/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% OTU
+%
+\subsubsection{OTE}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \ote[unlatch=true,
+ plcaddress=O:2/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% OSR
+%
+\subsubsection{OSR}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \osr[plcaddress=O:2/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% RES
+%
+\subsubsection{RES}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \res[plcaddress=O:2/0,
+ plcsymbol=Symbol](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% PB NO
+%
+\subsubsection{Switch PB NO}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \swpb(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% PB NC
+%
+\subsubsection{Switch PB NC}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \swpb[contactclosed=true](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Switch Toggle NO
+%
+\subsubsection{Switch TOGGLE NO}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \swtog(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Switch Toggle NC
+%
+\subsubsection{Switch PB NC}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \swtog[contactclosed=true](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Contact NO
+%
+\subsubsection{Contact NO}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \contact(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Contact NC
+%
+\subsubsection{Contact NC}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \contact[contactclosed=true](0,0)
+\end{pspicture}
+\end{LTXexample}
+
+%
+% Motor Armature
+%
+\subsubsection{Motor Armature}
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(1,1)
+ \armature(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+
+\subsection{Examples}
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(0,0)(15,6)
+ \pnode(0.5,0){A} \pnode(0.5,2.75){B} \pnode(0.5,5.5){C}
+ \pnode(3,0){D} \pnode(3,2.75){E} \pnode(3,5.5){F}
+ \pnode(4.75,0){G} \pnode(4.75,5.50){H}
+ \pnode(6.5,0){I} \pnode(6.5,5.5){J}
+ \vac(B)(E){$V$}
+ \newdiode(B)(C){$D_1$}
+ \newdiode[ison=false](E)(F){$D_2$}
+ \newdiode[ison=false](A)(B){$D_3$}
+ \newdiode(D)(E){$D_4$}
+ \capacitor(G)(H){$C$}
+ \newarmature[labelInside=1](I)(J){}
+ \wire(C)(F) \wire(A)(D) \wire(D)(G) \wire(I)(G) \wire(F)(H) \wire(H)(J)
+
+ \pnode(9,0){K} \pnode(9,2.75){L} \pnode(9,5.5){M}
+ \pnode(11.5,0){N} \pnode(11.5,2.75){O}
+ \pnode(11.5,5.5){P}
+ \pnode(13.25,0){Q} \pnode(13.25,5.5){R}
+ \pnode(15,0){S} \pnode(15,5.5){T}
+ \vac(L)(O){$V$}
+ \newdiode[ison=false](L)(M){$D_1$}
+ \newdiode(O)(P){$D_2$}
+ \newdiode(K)(L){$D_3$}
+ \newdiode[ison=false](N)(O){$D_4$}
+ \newcapacitor(Q)(R){$C$}
+ \newarmature[labelInside=1](S)(T){}
+ \wire(M)(P) \wire(K)(N) \wire(N)(Q) \wire(S)(Q) \wire(P)(R) \wire(R)(T)
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=l]
+\begin{pspicture}(-1,-1)(4,4)
+ \vac[labeloffset=-0.7](0,0)(4,0){$\backslash$vac}
+ \vac[labeloffset=1](0,0)(2,3.464){$\backslash$vac}
+ \vac[labeloffset=1](2,3.464)(4,0){$\backslash$vac}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+\section{Adding new components}
+
+Adding new components is not simple unless you need only a simple dipole. For dipoles a macro is provided that generates all helping macros for a new component so that you need to write only the actual drawing code.
+
+If you want to add a new dipole component, you only need the following code:
+\begin{lstlisting}[language=TeX]
+ \newCircDipole{ComponentName}%
+ \def\pst@draw@ComponentName{%
+ % The PSTricks code for your component
+ % The center of the component is at (0,0)
+ \pnode(component_left_end,0){dipole@1}
+ \pnode(component_right_end,0){dipole@2}}
+\end{lstlisting}
+This code can be placed in the core code or somewhere in the respective document in which case it must be surrounded by \lstinline[language=TeX]{\makeatletter...\makeatother}.
+
+If your new dipole should also work with \Lcs{multidipole} then you have to make some changes in the \Lcs{multidipole} core code. In the definition
+of \Lcs{pst@multidipole}, look for the last \Lcs{ifx} test
+\begin{lstlisting}[language=TeX]
+ % ...
+ % Extract from \pst@multidipole
+ \else\ifx\OpenDipol #4\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol #4\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else % Put your modification here
+ \else\let\pscirc@next\ignorespaces
+ \fi\fi\fi
+ % Extract form \pst@multidipole
+ % ...
+\end{lstlisting}
+and add (marked with \verb+%%%+)
+\begin{lstlisting}[language=TeX]
+ % ...
+ % Extract from \pst@multidipole
+ \else\ifx\OpenDipol #4\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol #4\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else\ifx\ComponentName#4\let\next\pst@multidipole@ComponentName%%%
+ \else\let\pscirc@next\ignorespaces
+ \fi\fi\fi
+ % Extract form \pst@multidipole
+ % ...
+\end{lstlisting}
+Do the same in \verb+\pst@multidipole@+
+\begin{lstlisting}[language=TeX]
+ % ...
+ % Extract from \pst@multidipole@
+ \else\ifx\OpenDipol#1\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol#1\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else\ifx\ComponentName#1\let\next\pst@multidipole@ComponentName%%%
+ \else\let\pscirc@next\ignorespaces\pst@multidipole@output
+ \fi\fi\fi
+ % Extract form \pst@multidipole@
+ % ...
+\end{lstlisting}
+and that's it! All you have to do then is send your modified \LFile{pst-circ.tex} to
+me and it will become part of the official release of \LPack{pst-circ}.
+
+\bigskip
+\begin{LTXexample}[width=3.5cm]
+ \begin{pspicture}(3,2)
+ \newCircDipole{delayline}
+ \makeatletter
+ \def\pst@draw@delayline{%
+ \psset{linewidth=1.5\pslinewidth}%
+ \psframe(-0.5,-0.3)(0.5,0.3)
+ \psline[arrows=->](-0.2,-0.5)(0.2,0.5)
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}}%
+ \makeatother
+ \pnode(0,1){A}\pnode(3,1){B}
+ \delayline(A)(B){delay}
+ \end{pspicture}
+\end{LTXexample}
+
+
+
+
+\clearpage
+\section{List of all optional arguments for \texttt{pst-circ}}\label{sec:para}
+Note: the default for booleans is always false.
+
+\xkvview{family=pst-circ,columns={key,type,default}}
+
+\bgroup
+\raggedright
+\nocite{*}
+%\bibliographystyle{plain}
+\printbibliography
+\egroup
+
+\printindex
+
+\end{document}
diff --git a/graphics/pstricks/contrib/pst-circ/dvips/pst-circ.pro b/graphics/pstricks/contrib/pst-circ/dvips/pst-circ.pro
new file mode 100644
index 0000000000..57e66aef5f
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/dvips/pst-circ.pro
@@ -0,0 +1,27 @@
+%!
+% $Id: pst-circ.pro 646 2017-11-16 09:46:12Z herbert $
+%
+% PostScript prologue for pst-circ.tex.
+% version 0.01 2007-03-23 (hv)
+% For distribution, see pstricks.tex.
+%
+/GetNode {
+ tx@NodeDict begin
+ tx@NodeDict 1 index known { load GetCenter } { pop 0 0 } ifelse
+ end
+} bind def
+/ZeroEq { abs 1E-10 lt } bind def /EqDr {
+ 4 copy 3 -1 roll sub 7 1 roll exch sub 5 1 roll 4 -1 roll
+ mul 3 1 roll mul exch sub } bind def
+/InterLines {
+ EqDr /D1c exch def /D1b exch def /D1a exch def
+ EqDr /D2c exch def /D2b exch def /D2a exch def
+ D1a D2b mul D1b D2a mul sub dup ZeroEq
+ { pop pop pop 0 0 }
+ {
+ /Det exch def
+ D1b D2c mul D1c D2b mul sub Det div
+ D1a D2c mul D2a D1c mul sub Det div
+ }
+ ifelse } bind def
+% END pst-circ.pro
diff --git a/graphics/pstricks/contrib/pst-circ/latex/pst-circ.sty b/graphics/pstricks/contrib/pst-circ/latex/pst-circ.sty
new file mode 100644
index 0000000000..3fa57ea4d6
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/latex/pst-circ.sty
@@ -0,0 +1,14 @@
+%% $Id: pst-circ.sty 918 2019-01-22 16:41:03Z herbert $
+\RequirePackage{pstricks}
+\ProvidesPackage{pst-circ}[2019/01/22 package wrapper for
+ pst-circ.tex (hv)]
+\input{pst-circ.tex}
+\IfFileExists{pst-circ.pro}{%
+ \ProvidesFile{pst-circ.pro}
+ [2007/03/23 v. 0.01, PostScript prologue file (hv)]
+ \@addtofilelist{pst-circ.pro}}{}%
+\ProvidesFile{pst-circ.tex}
+ [\filedate\space v\fileversion\space `PST-circ' (CJ,hv)]
+\let\bf\bfseries
+\let\it\itshape
+\endinput
diff --git a/graphics/pstricks/contrib/pst-circ/tex/pst-circ.tex b/graphics/pstricks/contrib/pst-circ/tex/pst-circ.tex
new file mode 100644
index 0000000000..8b3b4485c0
--- /dev/null
+++ b/graphics/pstricks/contrib/pst-circ/tex/pst-circ.tex
@@ -0,0 +1,5752 @@
+%% $Id: pst-circ.tex 918 2019-01-22 16:41:03Z herbert $
+%% This is file `pst-circ.tex'
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Package `pst-circ.tex'
+%%
+%% Herbert Voss <hvoss@tug.org>
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory CTAN:/macros/latex/base/lppl.txt.
+%%
+%% DESCRIPTION:
+%% `pst-circ' is a PSTricks package to draw electric circuits
+%%
+%% For a ChangeLog go the the end
+%%
+\csname PSTcircLoaded\endcsname
+\let\PSTcircLoaded\endinput
+%
+% Require PSTricks and pst-node packages
+%
+\ifx\PSTricksLoaded\endinput \else\input pstricks.tex\fi
+\ifx\PSTnodeLoaded\endinput \else\input pst-node.tex\fi
+\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi
+\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi
+%
+\def\fileversion{2.16}
+\def\filedate{2019/01/22}
+\message{`pst-circ' v\fileversion (hv)}
+%
+\edef\PstAtCode{\the\catcode`\@}
+\catcode`\@=11\relax
+\pst@addfams{pst-circ}
+%
+\pstheader{pst-circ.pro}
+\SpecialCoor
+%
+\newdimen\Pst@position
+%
+\newcount\pst@count@i
+\newcount\pst@count@ii
+\newcount\pst@count@iii
+%
+\newif\ifPst@Dconvention
+\newif\ifPst@parallel
+\newif\ifPst@parallel@node
+\newif\ifPst@T@changeLR
+\newif\ifPst@Ttype
+\newif\ifPst@FETchanneltype% Ted
+\newif\ifPst@Trafo@iprimary
+\newif\ifPst@Trafo@isecondary
+%
+\def\pst@Dconvention@receptor{receptor}
+\def\pst@Dconvention@generator{generator}
+\def\pst@Ttype@PNP{PNP}
+\def\pst@Ttype@NPN{NPN}
+\def\pst@Ttype@FET{FET}
+\def\pst@Ttype@NMOS{NMOS}
+\def\pst@Ttype@PMOS{PMOS}
+%
+\def\pst@FETchanneltype@P{P}% Ted
+\def\pst@FETchanneltype@N{N}% Ted
+\def\pst@Dstyle@twoCircles{twoCircles}
+\def\pst@Dstyle@varistor{varistor}
+\def\pst@Dstyle@thyristor{thyristor}
+\def\pst@Dstyle@GTO{GTO}
+\def\pst@Dstyle@photo{photo}
+\def\pst@Dstyle@triac{triac}
+\def\pst@Dstyle@Z{Z}
+\def\pst@Dstyle@schottky{schottky}
+\def\pst@Dstyle@normal{normal}
+\def\pst@Dstyle@chemical{chemical}
+\def\pst@Dstyle@elektor{elektor}
+\def\pst@Dstyle@crystal{crystal}
+\def\pst@Dstyle@elektorchemical{elektorchemical}
+\def\pst@Dstyle@elektorcurved{elektorcurved}
+\def\pst@Dstyle@curved{curved}
+\def\pst@Dstyle@rectangle{rectangle}
+\def\pst@Dstyle@open{open}
+\def\pst@Dstyle@close{close}
+\def\pst@Dstyle@zigzag{zigzag}
+\def\pst@Dstyle@diamond{diamond}
+\def\pst@Dstyle@normalCei{normalCei}
+\def\pst@Dstyle@diamondCei{diamondCei}
+\def\pst@tripole@style@left{left}
+\def\pst@tripole@style@right{right}
+\def\pst@tripole@style@center{center}
+\def\pst@tripole@style@french{french}
+%
+\define@boolkey[psset]{pst-circ}[Pst@]{intensity}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{mathlabel}[true]{}
+\define@key[psset]{}{circ}{\psset[pst-circ]{#1}}
+\define@key[psset]{pst-circ}{labelstyle}[]{\def\pst@labelstyle{#1}}
+\define@key[psset]{pst-circ}{intensitylabel}[]{\def\psk@I@label{#1}}
+\define@key[psset]{pst-circ}{intensitylabelcolor}[black]{\def\psk@I@labelcolor{#1}}
+\define@key[psset]{pst-circ}{intensitylabeloffset}[0.5]{\def\psk@I@label@offset{#1}}
+\define@key[psset]{pst-circ}{intensitycolor}[black]{\def\psk@I@color{#1}}
+\define@key[psset]{pst-circ}{intensitywidth}[\pslinewidth]{\def\psk@I@width{#1}}
+\define@boolkey[psset]{pst-circ}[Pst@]{tension}[true]{}
+\define@key[psset]{pst-circ}{tensionstyle}[line]{\expandafter\psk@tension@style@@#1\@nil}
+\def\psk@tension@style@@#1#2\@nil{\ifx#1p \def\psk@tension@style{1}\else\def\psk@tension@style{0}\fi}
+\define@key[psset]{pst-circ}{tensionlabel}[]{\def\psk@tension@label{#1}}
+\define@key[psset]{pst-circ}{tensionlabelcolor}[black]{\def\psk@tension@labelcolor{#1}}
+\define@key[psset]{pst-circ}{tensionoffset}[1]{\def\psk@tension@offset{#1}}
+\define@key[psset]{pst-circ}{tensionlabeloffset}[1.2]{\def\psk@tension@label@offset{#1}}
+\define@key[psset]{pst-circ}{tensioncolor}[black]{\def\psk@tension@color{#1}}
+\define@key[psset]{pst-circ}{tensionwidth}[\pslinewidth]{\def\psk@tension@width{#1}}
+\define@key[psset]{pst-circ}{labeloffset}[0.7]{\def\psk@label@offset{#1}}
+\define@key[psset]{pst-circ}{labelangle}[0]{\def\psk@label@angle{#1}}
+\define@key[psset]{pst-circ}{labelInside}[0]{\def\psk@labelInside{#1}}
+\define@key[psset]{pst-circ}{dipoleconvention}[receptor]{\def\psk@Dconvention{#1}}
+\define@boolkey[psset]{pst-circ}[Pst@]{directconvention}[true]{}
+\define@key[psset]{pst-circ}{dipolestyle}[normal]{\def\psk@Dstyle{#1}}
+\define@key[psset]{pst-circ}{parallel}[true]{\@nameuse{Pst@parallel#1}}
+\define@key[psset]{pst-circ}{parallelarm}[1.5]{\def\psk@parallel@arm{#1}}
+\define@key[psset]{pst-circ}{parallelsep}[0]{\def\psk@parallel@sep{#1}}
+\define@key[psset]{pst-circ}{parallelnode}[true]{\@nameuse{Pst@parallel@node#1}}
+\define@boolkey[psset]{pst-circ}[Pst@wire@]{intersect}[true]{}
+\define@key[psset]{pst-circ}{intersectA}{\def\psk@wire@intersectA{#1}}
+\define@key[psset]{pst-circ}{intersectB}{\def\psk@wire@intersectB{#1}}
+\define@boolkey[psset]{pst-circ}[Pst@]{OAperfect}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{OApower}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{OAinvert}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{OAiplus}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{OAiminus}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{OAiout}[true]{}
+\define@key[psset]{pst-circ}{OAipluslabel}[]{\def\psk@label@OAiplus{#1}}
+\define@key[psset]{pst-circ}{OAiminuslabel}[]{\def\psk@label@OAiminus{#1}}
+\define@key[psset]{pst-circ}{OAioutlabel}[]{\def\psk@label@OAiout{#1}}
+\define@boolkey[psset]{pst-circ}[Pst@]{GMperfect}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{GMpower}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{GMinvert}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{GMiplus}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{GMiminus}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{GMiout}[true]{}
+\define@key[psset]{pst-circ}{GMipluslabel}[]{\def\psk@label@GMiplus{#1}}
+\define@key[psset]{pst-circ}{GMiminuslabel}[]{\def\psk@label@GMiminus{#1}}
+\define@key[psset]{pst-circ}{GMioutlabel}[]{\def\psk@label@GMiout{#1}}
+
+\define@boolkey[psset]{pst-circ}[Pst@]{IGBTinvert}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{transistorcircle}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{transistorinvert}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{transistoribase}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{transistoricollector}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{transistoriemitter}[true]{}
+\define@key[psset]{pst-circ}{transistoribaselabel}[]{\def\psk@labeltransistoribase{#1}}
+\define@key[psset]{pst-circ}{transistoricollectorlabel}[]{\def\psk@labeltransistoricollector{#1}}
+\define@key[psset]{pst-circ}{transistoriemitterlabel}[]{\def\psk@labeltransistoriemitter{#1}}
+\define@key[psset]{pst-circ}{FETchanneltype}{\def\psk@FETchanneltype{#1}}% Ted 2007-10-15
+\define@boolkey[psset]{pst-circ}[Pst@]{FETmemory}[true]{}
+\define@key[psset]{pst-circ}{transistortype}[NPN]{%
+ \def\psk@Ttype{#1}%
+ \ifx\psk@Ttype\pst@Ttype@FET \Pst@transistorcirclefalse\fi}
+\newdimen\Pst@basesep
+\define@key[psset]{pst-circ}{basesep}[0]{\pst@getlength{#1}\Pst@basesep}
+%\define@key[psset]{pst-circ}{TRot}[0]{\def\Pst@TRot{#1}}
+\define@key[psset]{pst-circ}{TRot}[0]{\pst@checknum{#1}\Pst@TRot}
+\define@key[psset]{pst-circ}{circedge}[\pcangle]{%
+ \let\pscirc@edge#1%
+ \ifx\pscirc@edge\@none\def\pscirc@edge(##1)(##2){}\fi%
+ \ifx\pscirc@edge\pcangles\def\pscirc@edge@sector{2.5}\else\def\pscirc@edge@sector{1.5}\fi%
+}
+%
+\define@key[psset]{pst-circ}{primarylabel}[]{\def\psk@Trafo@primary@label{#1}}
+\define@key[psset]{pst-circ}{secondarylabel}[]{\def\psk@Trafo@secondary@label{#1}}
+\define@key[psset]{pst-circ}{transformeriprimary}[true]{\@nameuse{Pst@Trafo@iprimary#1}}
+\define@key[psset]{pst-circ}{transformerisecondary}[true]{\@nameuse{Pst@Trafo@isecondary#1}}
+\define@key[psset]{pst-circ}{transformeriprimarylabel}[]{\def\psk@Trafo@iprimary@label{#1}}
+\define@key[psset]{pst-circ}{transformerisecondarylabel}[]{\def\psk@Trafo@isecondary@label{#1}}
+\define@key[psset]{pst-circ}{tripolestyle}[normal]{\def\psk@tripole@style{#1}}
+\define@boolkey[psset]{pst-circ}[Pst@]{variable}[true]{}
+%
+\define@boolkey[psset]{pst-circ}[Pst@]{logicChangeLR}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{logicShowDot}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{logicShowNode}[true]{}
+\define@key[psset]{pst-circ}{logicWidth}[1.5]{\def\psk@logic@width{#1}}% hv
+\define@key[psset]{pst-circ}{logicHeight}[2.5]{\def\psk@logic@height{#1}}% hv
+\define@key[psset]{pst-circ}{logicType}[and]{\def\psk@logic@type{#1}}% hv
+\define@key[psset]{pst-circ}{logicNInput}[2]{\def\psk@logic@nInput{#1}}% hv
+\define@key[psset]{pst-circ}{logicJInput}[2]{\def\psk@logic@JInput{#1}}% hv
+\define@key[psset]{pst-circ}{logicKInput}[2]{\def\psk@logic@KInput{#1}}% hv
+\define@key[psset]{pst-circ}{logicWireLength}[0.5]{\def\psk@logic@wireLength{#1}}% hv
+\define@key[psset]{pst-circ}{logicLabelstyle}[\small]{\def\psk@logic@labelstyle{#1}}% hv
+\define@key[psset]{pst-circ}{logicSymbolstyle}[\large]{\def\psk@logic@symbolstyle{#1}}% hv
+\define@key[psset]{pst-circ}{logicSymbolpos}[0.5]{\def\psk@logic@symbolpos{#1}}% hv
+\define@key[psset]{pst-circ}{logicNodestyle}[\footnotesize]{\def\psk@logic@nodestyle{#1}}% hv
+%
+\def\pst@logic@type@and{and}
+\def\pst@logic@type@or{or}
+\def\pst@logic@type@nand{nand}
+\def\pst@logic@type@nor{nor}
+\def\pst@logic@type@not{not}
+\def\pst@logic@type@exor{exor}
+\def\pst@logic@type@exnor{exnor}
+%
+\def\pst@logic@type@RS{RS}
+\def\pst@logic@type@D{D}
+\def\pst@logic@type@JK{JK}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Logic If Statements
+\newif\ifPst@iec
+\newif\ifPst@iecinvert
+\newif\ifPst@input
+\newif\ifPst@invertinput
+\newif\ifPst@inputa
+\newif\ifPst@invertinputa
+\newif\ifPst@inputb
+\newif\ifPst@invertinputb
+\newif\ifPst@inputc
+\newif\ifPst@invertinputc
+\newif\ifPst@inputd
+\newif\ifPst@invertinputd
+\newif\ifPst@enable
+\newif\ifPst@invertenable
+\newif\ifPst@clock
+\newif\ifPst@invertclock
+\newif\ifPst@set
+\newif\ifPst@invertset
+\newif\ifPst@reset
+\newif\ifPst@invertreset
+
+\newif\ifPst@output
+\newif\ifPst@invertoutput
+\newif\ifPst@outputa
+\newif\ifPst@invertoutputa
+\newif\ifPst@outputb
+\newif\ifPst@invertoutputb
+
+\newif\ifPst@segmentlabels
+
+% IC If Statements
+\newif\ifPst@pina
+\newif\ifPst@invertpina
+\newif\ifPst@pinb
+\newif\ifPst@invertpinb
+\newif\ifPst@pinc
+\newif\ifPst@invertpinc
+\newif\ifPst@pind
+\newif\ifPst@invertpind
+\newif\ifPst@pine
+\newif\ifPst@invertpine
+\newif\ifPst@pinf
+\newif\ifPst@invertpinf
+\newif\ifPst@ping
+\newif\ifPst@invertping
+\newif\ifPst@pinh
+\newif\ifPst@invertpinh
+\newif\ifPst@pini
+\newif\ifPst@invertpini
+\newif\ifPst@pinj
+\newif\ifPst@invertpinj
+\newif\ifPst@pink
+\newif\ifPst@invertpink
+\newif\ifPst@pinl
+\newif\ifPst@invertpinl
+\newif\ifPst@pinm
+\newif\ifPst@invertpinm
+\newif\ifPst@pinn
+\newif\ifPst@invertpinn
+\newif\ifPst@pino
+\newif\ifPst@invertpino
+\newif\ifPst@pinp
+\newif\ifPst@invertpinp
+\newif\ifPst@pinq
+\newif\ifPst@invertpinq
+\newif\ifPst@pinr
+\newif\ifPst@invertpinr
+\newif\ifPst@pins
+\newif\ifPst@invertpins
+\newif\ifPst@pint
+\newif\ifPst@invertpint
+\newif\ifPst@pinu
+\newif\ifPst@invertpinu
+\newif\ifPst@pinv
+\newif\ifPst@invertpinv
+\newif\ifPst@pinw
+\newif\ifPst@invertpinw
+\newif\ifPst@pinx
+\newif\ifPst@invertpinx
+\newif\ifPst@piny
+\newif\ifPst@invertpiny
+\newif\ifPst@pinz
+\newif\ifPst@invertpinz
+\newif\ifPst@pinaa
+\newif\ifPst@invertpinaa
+\newif\ifPst@pinab
+\newif\ifPst@invertpinab
+\newif\ifPst@pinac
+\newif\ifPst@invertpinac
+\newif\ifPst@pinad
+\newif\ifPst@invertpinad
+\newif\ifPst@pinae
+\newif\ifPst@invertpinae
+\newif\ifPst@pinaf
+\newif\ifPst@invertpinaf
+
+
+\newif\ifPst@pinla
+\newif\ifPst@invertpinla
+\newif\ifPst@pinlb
+\newif\ifPst@invertpinlb
+\newif\ifPst@pinlc
+\newif\ifPst@invertpinlc
+\newif\ifPst@pinld
+\newif\ifPst@invertpinld
+\newif\ifPst@pinle
+\newif\ifPst@invertpinle
+\newif\ifPst@pinlf
+\newif\ifPst@invertpinlf
+\newif\ifPst@pinlg
+\newif\ifPst@invertpinlg
+\newif\ifPst@pinlh
+\newif\ifPst@invertpinlh
+\newif\ifPst@pinli
+\newif\ifPst@invertpinli
+\newif\ifPst@pinlj
+\newif\ifPst@invertpinlj
+\newif\ifPst@pinlk
+\newif\ifPst@invertpinlk
+\newif\ifPst@pinll
+\newif\ifPst@invertpinll
+\newif\ifPst@pinlm
+\newif\ifPst@invertpinlm
+\newif\ifPst@pinln
+\newif\ifPst@invertpinln
+\newif\ifPst@pinlo
+\newif\ifPst@invertpinlo
+\newif\ifPst@pinlp
+\newif\ifPst@invertpinlp
+
+\newif\ifPst@pinra
+\newif\ifPst@invertpinra
+\newif\ifPst@pinrb
+\newif\ifPst@invertpinrb
+\newif\ifPst@pinrc
+\newif\ifPst@invertpinrc
+\newif\ifPst@pinrd
+\newif\ifPst@invertpinrd
+\newif\ifPst@pinre
+\newif\ifPst@invertpinre
+\newif\ifPst@pinrf
+\newif\ifPst@invertpinrf
+\newif\ifPst@pinrg
+\newif\ifPst@invertpinrg
+\newif\ifPst@pinrh
+\newif\ifPst@invertpinrh
+\newif\ifPst@pinri
+\newif\ifPst@invertpinri
+\newif\ifPst@pinrj
+\newif\ifPst@invertpinrj
+\newif\ifPst@pinrk
+\newif\ifPst@invertpinrl
+\newif\ifPst@pinrl
+\newif\ifPst@invertpinrl
+\newif\ifPst@pinrm
+\newif\ifPst@invertpinrm
+\newif\ifPst@pinrn
+\newif\ifPst@invertpinrn
+\newif\ifPst@pinro
+\newif\ifPst@invertpinro
+\newif\ifPst@pinrp
+\newif\ifPst@invertpinrp
+
+
+\newif\ifPst@pintl
+\newif\ifPst@invertpintl
+\newif\ifPst@pintc
+\newif\ifPst@invertpintc
+\newif\ifPst@pintr
+\newif\ifPst@invertpintr
+
+\newif\ifPst@pinbl
+\newif\ifPst@invertpinbl
+\newif\ifPst@pinbc
+\newif\ifPst@invertpinbc
+\newif\ifPst@pinbr
+\newif\ifPst@invertpinbr
+
+\newif\ifPst@pinta
+\newif\ifPst@invertpinta
+\newif\ifPst@pintb
+\newif\ifPst@invertpintb
+\newif\ifPst@pintc
+\newif\ifPst@invertpintc
+\newif\ifPst@pintd
+\newif\ifPst@invertpintd
+\newif\ifPst@pinte
+\newif\ifPst@invertpinte
+
+\newif\ifPst@pinba
+\newif\ifPst@invertpinba
+\newif\ifPst@pinbb
+\newif\ifPst@invertpinbb
+\newif\ifPst@pinbc
+\newif\ifPst@invertpinbc
+\newif\ifPst@pinbd
+\newif\ifPst@invertpinbd
+\newif\ifPst@pinbe
+\newif\ifPst@invertpinbe
+
+\newif\ifPst@dpright
+\newif\ifPst@dpleft
+
+% Ladder Logic If Statements
+\newif\ifPst@latch
+\newif\ifPst@unlatch
+\newif\ifPst@contactclosed
+
+% Bipole If Statements
+\newif\ifPst@polarized
+
+% Diodes
+\newif\ifPst@ison
+
+% Define Integer Keys
+\define@choicekey[psset]{pst-circ}{ninputs}{0,1,2,3,4}[2]{\def\psk@ninputs{#1}}
+\define@choicekey[psset]{pst-circ}{segmentdisplay}{0,1,2,3,4,5,6,7,8,9,10}[10]{\def\psk@segmentdisplay{#1}}
+\define@choicekey[psset]{pst-circ}{nicpins}[\val\nr]{8,14,16,20,32}[8]{
+ \ifcase\nr\relax
+ \def\psk@nicpins{0}
+ \or
+ \def\psk@nicpins{1}
+ \or
+ \def\psk@nicpins{2}
+ \or
+ \def\psk@nicpins{3}
+ \or
+ \def\psk@nicpins{4}
+ \fi
+}
+\define@choicekey[psset]{pst-circ}{bubblesize}{0.05,0.1,0.15,0.2}[0.15]{\def\psk@bubblesize{#1}}
+
+%
+\define@key[psset]{pst-circ}{segmentcolor}[black]{\def\psk@segmentcolor{#1}}
+
+% Define Logic String Keys
+\define@key[psset]{pst-circ}{inputalabel}[]{\def\psk@inputalabel{#1}}
+\define@key[psset]{pst-circ}{inputblabel}[]{\def\psk@inputblabel{#1}}
+\define@key[psset]{pst-circ}{inputclabel}[]{\def\psk@inputclabel{#1}}
+\define@key[psset]{pst-circ}{inputenlabel}[]{\def\psk@inputenlabel{#1}}
+\define@key[psset]{pst-circ}{inputcllabel}[]{\def\psk@inputcllabel{#1}}
+\define@key[psset]{pst-circ}{outputalabel}[]{\def\psk@outputalabel{#1}}
+\define@key[psset]{pst-circ}{outputblabel}[]{\def\psk@outputblabel{#1}}
+\define@key[psset]{pst-circ}{outputclabel}[]{\def\psk@outputclabel{#1}}
+
+% Define IC String Keys
+\define@key[psset]{pst-circ}{pinalabel}[]{\def\psk@pinalabel{#1}}
+\define@key[psset]{pst-circ}{pinanumber}[]{\def\psk@pinanumber{#1}}
+\define@key[psset]{pst-circ}{pinblabel}[]{\def\psk@pinblabel{#1}}
+\define@key[psset]{pst-circ}{pinbnumber}[]{\def\psk@pinbnumber{#1}}
+\define@key[psset]{pst-circ}{pinclabel}[]{\def\psk@pinclabel{#1}}
+\define@key[psset]{pst-circ}{pincnumber}[]{\def\psk@pincnumber{#1}}
+\define@key[psset]{pst-circ}{pindlabel}[]{\def\psk@pindlabel{#1}}
+\define@key[psset]{pst-circ}{pindnumber}[]{\def\psk@pindnumber{#1}}
+\define@key[psset]{pst-circ}{pinelabel}[]{\def\psk@pinelabel{#1}}
+\define@key[psset]{pst-circ}{pinenumber}[]{\def\psk@pinenumber{#1}}
+\define@key[psset]{pst-circ}{pinflabel}[]{\def\psk@pinflabel{#1}}
+\define@key[psset]{pst-circ}{pinfnumber}[]{\def\psk@pinfnumber{#1}}
+\define@key[psset]{pst-circ}{pinglabel}[]{\def\psk@pinglabel{#1}}
+\define@key[psset]{pst-circ}{pingnumber}[]{\def\psk@pingnumber{#1}}
+\define@key[psset]{pst-circ}{pinhlabel}[]{\def\psk@pinhlabel{#1}}
+\define@key[psset]{pst-circ}{pinhnumber}[]{\def\psk@pinhnumber{#1}}
+\define@key[psset]{pst-circ}{pinilabel}[]{\def\psk@pinilabel{#1}}
+\define@key[psset]{pst-circ}{pininumber}[]{\def\psk@pininumber{#1}}
+\define@key[psset]{pst-circ}{pinjlabel}[]{\def\psk@pinjlabel{#1}}
+\define@key[psset]{pst-circ}{pinjnumber}[]{\def\psk@pinjnumber{#1}}
+\define@key[psset]{pst-circ}{pinklabel}[]{\def\psk@pinklabel{#1}}
+\define@key[psset]{pst-circ}{pinknumber}[]{\def\psk@pinknumber{#1}}
+\define@key[psset]{pst-circ}{pinllabel}[]{\def\psk@pinllabel{#1}}
+\define@key[psset]{pst-circ}{pinlnumber}[]{\def\psk@pinlnumber{#1}}
+\define@key[psset]{pst-circ}{pinmlabel}[]{\def\psk@pinmlabel{#1}}
+\define@key[psset]{pst-circ}{pinmnumber}[]{\def\psk@pinmnumber{#1}}
+\define@key[psset]{pst-circ}{pinnlabel}[]{\def\psk@pinnlabel{#1}}
+\define@key[psset]{pst-circ}{pinnnumber}[]{\def\psk@pinnnumber{#1}}
+\define@key[psset]{pst-circ}{pinolabel}[]{\def\psk@pinolabel{#1}}
+\define@key[psset]{pst-circ}{pinonumber}[]{\def\psk@pinonumber{#1}}
+\define@key[psset]{pst-circ}{pinplabel}[]{\def\psk@pinplabel{#1}}
+\define@key[psset]{pst-circ}{pinpnumber}[]{\def\psk@pinpnumber{#1}}
+\define@key[psset]{pst-circ}{pinqlabel}[]{\def\psk@pinqlabel{#1}}
+\define@key[psset]{pst-circ}{pinqnumber}[]{\def\psk@pinqnumber{#1}}
+\define@key[psset]{pst-circ}{pinrlabel}[]{\def\psk@pinrlabel{#1}}
+\define@key[psset]{pst-circ}{pinrnumber}[]{\def\psk@pinrnumber{#1}}
+\define@key[psset]{pst-circ}{pinslabel}[]{\def\psk@pinslabel{#1}}
+\define@key[psset]{pst-circ}{pinsnumber}[]{\def\psk@pinsnumber{#1}}
+\define@key[psset]{pst-circ}{pintlabel}[]{\def\psk@pintlabel{#1}}
+\define@key[psset]{pst-circ}{pintnumber}[]{\def\psk@pintnumber{#1}}
+\define@key[psset]{pst-circ}{pinulabel}[]{\def\psk@pinulabel{#1}}
+\define@key[psset]{pst-circ}{pinunumber}[]{\def\psk@pinunumber{#1}}
+\define@key[psset]{pst-circ}{pinvlabel}[]{\def\psk@pinvlabel{#1}}
+\define@key[psset]{pst-circ}{pinvnumber}[]{\def\psk@pinvnumber{#1}}
+\define@key[psset]{pst-circ}{pinwlabel}[]{\def\psk@pinwlabel{#1}}
+\define@key[psset]{pst-circ}{pinwnumber}[]{\def\psk@pinwnumber{#1}}
+\define@key[psset]{pst-circ}{pinxlabel}[]{\def\psk@pinxlabel{#1}}
+\define@key[psset]{pst-circ}{pinxnumber}[]{\def\psk@pinxnumber{#1}}
+\define@key[psset]{pst-circ}{pinylabel}[]{\def\psk@pinylabel{#1}}
+\define@key[psset]{pst-circ}{pinynumber}[]{\def\psk@pinynumber{#1}}
+\define@key[psset]{pst-circ}{pinzlabel}[]{\def\psk@pinzlabel{#1}}
+\define@key[psset]{pst-circ}{pinznumber}[]{\def\psk@pinznumber{#1}}
+\define@key[psset]{pst-circ}{pinaalabel}[]{\def\psk@pinaalabel{#1}}
+\define@key[psset]{pst-circ}{pinaanumber}[]{\def\psk@pinaanumber{#1}}
+\define@key[psset]{pst-circ}{pinablabel}[]{\def\psk@pinablabel{#1}}
+\define@key[psset]{pst-circ}{pinabnumber}[]{\def\psk@pinabnumber{#1}}
+\define@key[psset]{pst-circ}{pinaclabel}[]{\def\psk@pinaclabel{#1}}
+\define@key[psset]{pst-circ}{pinacnumber}[]{\def\psk@pinacnumber{#1}}
+\define@key[psset]{pst-circ}{pinadlabel}[]{\def\psk@pinadlabel{#1}}
+\define@key[psset]{pst-circ}{pinadnumber}[]{\def\psk@pinadnumber{#1}}
+\define@key[psset]{pst-circ}{pinaelabel}[]{\def\psk@pinaelabel{#1}}
+\define@key[psset]{pst-circ}{pinaenumber}[]{\def\psk@pinaenumber{#1}}
+\define@key[psset]{pst-circ}{pinaflabel}[]{\def\psk@pinaflabel{#1}}
+\define@key[psset]{pst-circ}{pinafnumber}[]{\def\psk@pinafnumber{#1}}
+
+
+
+\define@key[psset]{pst-circ}{pinralabel}[]{\def\psk@pinralabel{#1}}
+\define@key[psset]{pst-circ}{pinranumber}[]{\def\psk@pinranumber{#1}}
+\define@key[psset]{pst-circ}{pinrblabel}[]{\def\psk@pinrblabel{#1}}
+\define@key[psset]{pst-circ}{pinrbnumber}[]{\def\psk@pinrbnumber{#1}}
+\define@key[psset]{pst-circ}{pinrclabel}[]{\def\psk@pinrclabel{#1}}
+\define@key[psset]{pst-circ}{pinrcnumber}[]{\def\psk@pinrcnumber{#1}}
+\define@key[psset]{pst-circ}{pinrdlabel}[]{\def\psk@pinrdlabel{#1}}
+\define@key[psset]{pst-circ}{pinrdnumber}[]{\def\psk@pinrdnumber{#1}}
+\define@key[psset]{pst-circ}{pinrelabel}[]{\def\psk@pinrelabel{#1}}
+\define@key[psset]{pst-circ}{pinrenumber}[]{\def\psk@pinrenumber{#1}}
+\define@key[psset]{pst-circ}{pinrflabel}[]{\def\psk@pinrflabel{#1}}
+\define@key[psset]{pst-circ}{pinrfnumber}[]{\def\psk@pinrfnumber{#1}}
+\define@key[psset]{pst-circ}{pinrglabel}[]{\def\psk@pinrglabel{#1}}
+\define@key[psset]{pst-circ}{pinrgnumber}[]{\def\psk@pinrgnumber{#1}}
+\define@key[psset]{pst-circ}{pinrhlabel}[]{\def\psk@pinrhlabel{#1}}
+\define@key[psset]{pst-circ}{pinrhnumber}[]{\def\psk@pinrhnumber{#1}}
+\define@key[psset]{pst-circ}{pinrilabel}[]{\def\psk@pinrilabel{#1}}
+\define@key[psset]{pst-circ}{pinrinumber}[]{\def\psk@pinrinumber{#1}}
+\define@key[psset]{pst-circ}{pinrjlabel}[]{\def\psk@pinrjlabel{#1}}
+\define@key[psset]{pst-circ}{pinrjnumber}[]{\def\psk@pinrjnumber{#1}}
+\define@key[psset]{pst-circ}{pinrklabel}[]{\def\psk@pinrklabel{#1}}
+\define@key[psset]{pst-circ}{pinrknumber}[]{\def\psk@pinrknumber{#1}}
+\define@key[psset]{pst-circ}{pinrllabel}[]{\def\psk@pinrllabel{#1}}
+\define@key[psset]{pst-circ}{pinrlnumber}[]{\def\psk@pinrlnumber{#1}}
+\define@key[psset]{pst-circ}{pinrmlabel}[]{\def\psk@pinrmlabel{#1}}
+\define@key[psset]{pst-circ}{pinrmnumber}[]{\def\psk@pinrmnumber{#1}}
+\define@key[psset]{pst-circ}{pinrnlabel}[]{\def\psk@pinrnlabel{#1}}
+\define@key[psset]{pst-circ}{pinrnnumber}[]{\def\psk@pinrnnumber{#1}}
+\define@key[psset]{pst-circ}{pinrolabel}[]{\def\psk@pinrolabel{#1}}
+\define@key[psset]{pst-circ}{pinronumber}[]{\def\psk@pinronumber{#1}}
+\define@key[psset]{pst-circ}{pinrplabel}[]{\def\psk@pinrplabel{#1}}
+\define@key[psset]{pst-circ}{pinrpnumber}[]{\def\psk@pinrpnumber{#1}}
+
+\define@key[psset]{pst-circ}{pinlalabel}[]{\def\psk@pinlalabel{#1}}
+\define@key[psset]{pst-circ}{pinlanumber}[]{\def\psk@pinlanumber{#1}}
+\define@key[psset]{pst-circ}{pinlblabel}[]{\def\psk@pinlblabel{#1}}
+\define@key[psset]{pst-circ}{pinlbnumber}[]{\def\psk@pinlbnumber{#1}}
+\define@key[psset]{pst-circ}{pinlclabel}[]{\def\psk@pinlclabel{#1}}
+\define@key[psset]{pst-circ}{pinlcnumber}[]{\def\psk@pinlcnumber{#1}}
+\define@key[psset]{pst-circ}{pinldlabel}[]{\def\psk@pinldlabel{#1}}
+\define@key[psset]{pst-circ}{pinldnumber}[]{\def\psk@pinldnumber{#1}}
+\define@key[psset]{pst-circ}{pinlelabel}[]{\def\psk@pinlelabel{#1}}
+\define@key[psset]{pst-circ}{pinlenumber}[]{\def\psk@pinlenumber{#1}}
+\define@key[psset]{pst-circ}{pinlflabel}[]{\def\psk@pinlflabel{#1}}
+\define@key[psset]{pst-circ}{pinlfnumber}[]{\def\psk@pinlfnumber{#1}}
+\define@key[psset]{pst-circ}{pinlglabel}[]{\def\psk@pinlglabel{#1}}
+\define@key[psset]{pst-circ}{pinlgnumber}[]{\def\psk@pinlgnumber{#1}}
+\define@key[psset]{pst-circ}{pinlhlabel}[]{\def\psk@pinlhlabel{#1}}
+\define@key[psset]{pst-circ}{pinlhnumber}[]{\def\psk@pinlhnumber{#1}}
+\define@key[psset]{pst-circ}{pinlilabel}[]{\def\psk@pinlilabel{#1}}
+\define@key[psset]{pst-circ}{pinlinumber}[]{\def\psk@pinlinumber{#1}}
+\define@key[psset]{pst-circ}{pinljlabel}[]{\def\psk@pinljlabel{#1}}
+\define@key[psset]{pst-circ}{pinljnumber}[]{\def\psk@pinljnumber{#1}}
+\define@key[psset]{pst-circ}{pinlklabel}[]{\def\psk@pinlklabel{#1}}
+\define@key[psset]{pst-circ}{pinlknumber}[]{\def\psk@pinlknumber{#1}}
+\define@key[psset]{pst-circ}{pinlllabel}[]{\def\psk@pinlllabel{#1}}
+\define@key[psset]{pst-circ}{pinllnumber}[]{\def\psk@pinllnumber{#1}}
+\define@key[psset]{pst-circ}{pinlmlabel}[]{\def\psk@pinlmlabel{#1}}
+\define@key[psset]{pst-circ}{pinlmnumber}[]{\def\psk@pinlmnumber{#1}}
+\define@key[psset]{pst-circ}{pinlnlabel}[]{\def\psk@pinlnlabel{#1}}
+\define@key[psset]{pst-circ}{pinlnnumber}[]{\def\psk@pinlnnumber{#1}}
+\define@key[psset]{pst-circ}{pinlolabel}[]{\def\psk@pinlolabel{#1}}
+\define@key[psset]{pst-circ}{pinlonumber}[]{\def\psk@pinlonumber{#1}}
+\define@key[psset]{pst-circ}{pinlplabel}[]{\def\psk@pinlplabel{#1}}
+\define@key[psset]{pst-circ}{pinlpnumber}[]{\def\psk@pinlpnumber{#1}}
+
+\define@key[psset]{pst-circ}{pintllabel}[]{\def\psk@pintllabel{#1}}
+\define@key[psset]{pst-circ}{pintlnumber}[]{\def\psk@pintlnumber{#1}}
+\define@key[psset]{pst-circ}{pintclabel}[]{\def\psk@pintclabel{#1}}
+\define@key[psset]{pst-circ}{pintcnumber}[]{\def\psk@pintcnumber{#1}}
+\define@key[psset]{pst-circ}{pintrlabel}[]{\def\psk@pintrlabel{#1}}
+\define@key[psset]{pst-circ}{pintrnumber}[]{\def\psk@pintrnumber{#1}}
+
+\define@key[psset]{pst-circ}{pinbllabel}[]{\def\psk@pinbllabel{#1}}
+\define@key[psset]{pst-circ}{pinblnumber}[]{\def\psk@pinblnumber{#1}}
+\define@key[psset]{pst-circ}{pinbclabel}[]{\def\psk@pinbclabel{#1}}
+\define@key[psset]{pst-circ}{pinbcnumber}[]{\def\psk@pinbcnumber{#1}}
+\define@key[psset]{pst-circ}{pinbrlabel}[]{\def\psk@pinbrlabel{#1}}
+\define@key[psset]{pst-circ}{pinbrnumber}[]{\def\psk@pinbrnumber{#1}}
+
+\define@key[psset]{pst-circ}{pintalabel}[]{\def\psk@pintalabel{#1}}
+\define@key[psset]{pst-circ}{pintanumber}[]{\def\psk@pintanumber{#1}}
+\define@key[psset]{pst-circ}{pintblabel}[]{\def\psk@pintblabel{#1}}
+\define@key[psset]{pst-circ}{pintbnumber}[]{\def\psk@pintbnumber{#1}}
+\define@key[psset]{pst-circ}{pintclabel}[]{\def\psk@pintclabel{#1}}
+\define@key[psset]{pst-circ}{pintcnumber}[]{\def\psk@pintcnumber{#1}}
+\define@key[psset]{pst-circ}{pintdlabel}[]{\def\psk@pintdlabel{#1}}
+\define@key[psset]{pst-circ}{pintdnumber}[]{\def\psk@pintdnumber{#1}}
+\define@key[psset]{pst-circ}{pintelabel}[]{\def\psk@pintelabel{#1}}
+\define@key[psset]{pst-circ}{pintenumber}[]{\def\psk@pintenumber{#1}}
+
+\define@key[psset]{pst-circ}{pinbalabel}[]{\def\psk@pinbalabel{#1}}
+\define@key[psset]{pst-circ}{pinbanumber}[]{\def\psk@pinbanumber{#1}}
+\define@key[psset]{pst-circ}{pinbblabel}[]{\def\psk@pinbblabel{#1}}
+\define@key[psset]{pst-circ}{pinbbnumber}[]{\def\psk@pinbbnumber{#1}}
+\define@key[psset]{pst-circ}{pinbclabel}[]{\def\psk@pinbclabel{#1}}
+\define@key[psset]{pst-circ}{pinbcnumber}[]{\def\psk@pinbcnumber{#1}}
+\define@key[psset]{pst-circ}{pinbdlabel}[]{\def\psk@pinbdlabel{#1}}
+\define@key[psset]{pst-circ}{pinbdnumber}[]{\def\psk@pinbdnumber{#1}}
+\define@key[psset]{pst-circ}{pinbelabel}[]{\def\psk@pinbelabel{#1}}
+\define@key[psset]{pst-circ}{pinbenumber}[]{\def\psk@pinbenumber{#1}}
+
+% Define Ladder logic String Keys
+\define@key[psset]{pst-circ}{plcaddress}[]{\def\psk@plcaddress{#1}}
+\define@key[psset]{pst-circ}{plcsymbol}[]{\def\psk@plcsymbol{#1}}
+
+% Define Logic Boolean Keys
+\define@key[psset]{pst-circ}{iec}[false]{\@nameuse{Pst@iec#1}}
+\define@key[psset]{pst-circ}{iecinvert}[false]{\@nameuse{Pst@iecinvert#1}}
+\define@key[psset]{pst-circ}{input}[true]{\@nameuse{Pst@input#1}}
+\define@key[psset]{pst-circ}{invertinput}[false]{\@nameuse{Pst@invertinput#1}}
+\define@key[psset]{pst-circ}{inputa}[true]{\@nameuse{Pst@inputa#1}}
+\define@key[psset]{pst-circ}{invertinputa}[false]{\@nameuse{Pst@invertinputa#1}}
+\define@key[psset]{pst-circ}{inputb}[true]{\@nameuse{Pst@inputb#1}}
+\define@key[psset]{pst-circ}{invertinputb}[false]{\@nameuse{Pst@invertinputb#1}}
+\define@key[psset]{pst-circ}{inputc}[true]{\@nameuse{Pst@inputc#1}}
+\define@key[psset]{pst-circ}{invertinputc}[false]{\@nameuse{Pst@invertinputc#1}}
+\define@key[psset]{pst-circ}{inputd}[true]{\@nameuse{Pst@inputd#1}}
+\define@key[psset]{pst-circ}{invertinputd}[false]{\@nameuse{Pst@invertinputd#1}}
+\define@key[psset]{pst-circ}{enable}[false]{\@nameuse{Pst@enable#1}}
+\define@key[psset]{pst-circ}{invertenable}[false]{\@nameuse{Pst@invertenable#1}}
+\define@key[psset]{pst-circ}{clock}[false]{\@nameuse{Pst@clock#1}}
+\define@key[psset]{pst-circ}{invertclock}[false]{\@nameuse{Pst@invertclock#1}}
+\define@key[psset]{pst-circ}{set}[false]{\@nameuse{Pst@set#1}}
+\define@key[psset]{pst-circ}{invertset}[false]{\@nameuse{Pst@invertset#1}}
+\define@key[psset]{pst-circ}{reset}[false]{\@nameuse{Pst@reset#1}}
+\define@key[psset]{pst-circ}{invertreset}[false]{\@nameuse{Pst@invertreset#1}}
+
+\define@key[psset]{pst-circ}{output}[true]{\@nameuse{Pst@output#1}}
+\define@key[psset]{pst-circ}{invertoutput}[false]{\@nameuse{Pst@invertoutput#1}}
+\define@key[psset]{pst-circ}{outputa}[true]{\@nameuse{Pst@outputa#1}}
+\define@key[psset]{pst-circ}{invertoutputa}[false]{\@nameuse{Pst@invertoutputa#1}}
+\define@key[psset]{pst-circ}{outputb}[true]{\@nameuse{Pst@outputb#1}}
+\define@key[psset]{pst-circ}{invertoutputb}[true]{\@nameuse{Pst@invertoutputb#1}}
+%\define@key[psset]{pst-circ}{outputc}[true]{\@nameuse{Pst@outputc#1}}
+%\define@key[psset]{pst-circ}{invertoutputc}[false]{\@nameuse{Pst@invertoutputc#1}}
+\define@key[psset]{pst-circ}{segmentlabels}[true]{\@nameuse{Pst@segmentlabels#1}}
+
+% Define IC Boolean Keys
+\define@key[psset]{pst-circ}{pina}[true]{\@nameuse{Pst@pina#1}}
+\define@key[psset]{pst-circ}{invertpina}[false]{\@nameuse{Pst@invertpina#1}}
+\define@key[psset]{pst-circ}{pinb}[true]{\@nameuse{Pst@pinb#1}}
+\define@key[psset]{pst-circ}{invertpinb}[false]{\@nameuse{Pst@invertpinb#1}}
+\define@key[psset]{pst-circ}{pinc}[true]{\@nameuse{Pst@pinc#1}}
+\define@key[psset]{pst-circ}{invertpinc}[false]{\@nameuse{Pst@invertpinc#1}}
+\define@key[psset]{pst-circ}{pind}[true]{\@nameuse{Pst@pind#1}}
+\define@key[psset]{pst-circ}{invertpind}[false]{\@nameuse{Pst@invertpind#1}}
+\define@key[psset]{pst-circ}{pine}[true]{\@nameuse{Pst@pine#1}}
+\define@key[psset]{pst-circ}{invertpine}[false]{\@nameuse{Pst@invertpine#1}}
+\define@key[psset]{pst-circ}{pinf}[true]{\@nameuse{Pst@pinf#1}}
+\define@key[psset]{pst-circ}{invertpinf}[false]{\@nameuse{Pst@invertpinf#1}}
+\define@key[psset]{pst-circ}{ping}[true]{\@nameuse{Pst@ping#1}}
+\define@key[psset]{pst-circ}{invertping}[false]{\@nameuse{Pst@invertping#1}}
+\define@key[psset]{pst-circ}{pinh}[true]{\@nameuse{Pst@pinh#1}}
+\define@key[psset]{pst-circ}{invertpinh}[false]{\@nameuse{Pst@invertpinh#1}}
+\define@key[psset]{pst-circ}{pini}[true]{\@nameuse{Pst@pini#1}}
+\define@key[psset]{pst-circ}{invertpini}[false]{\@nameuse{Pst@invertpini#1}}
+\define@key[psset]{pst-circ}{pinj}[true]{\@nameuse{Pst@pinj#1}}
+\define@key[psset]{pst-circ}{invertpinj}[false]{\@nameuse{Pst@invertpinj#1}}
+\define@key[psset]{pst-circ}{pink}[true]{\@nameuse{Pst@pink#1}}
+\define@key[psset]{pst-circ}{invertpink}[false]{\@nameuse{Pst@invertpink#1}}
+\define@key[psset]{pst-circ}{pinl}[true]{\@nameuse{Pst@pinl#1}}
+\define@key[psset]{pst-circ}{invertpinl}[false]{\@nameuse{Pst@invertpinl#1}}
+\define@key[psset]{pst-circ}{pinm}[true]{\@nameuse{Pst@pinm#1}}
+\define@key[psset]{pst-circ}{invertpinm}[false]{\@nameuse{Pst@invertpinm#1}}
+\define@key[psset]{pst-circ}{pinn}[true]{\@nameuse{Pst@pinn#1}}
+\define@key[psset]{pst-circ}{invertpinn}[false]{\@nameuse{Pst@invertpinn#1}}
+\define@key[psset]{pst-circ}{pino}[true]{\@nameuse{Pst@pino#1}}
+\define@key[psset]{pst-circ}{invertpino}[false]{\@nameuse{Pst@invertpino#1}}
+\define@key[psset]{pst-circ}{pinp}[true]{\@nameuse{Pst@pinp#1}}
+\define@key[psset]{pst-circ}{invertpinp}[false]{\@nameuse{Pst@invertpinp#1}}
+\define@key[psset]{pst-circ}{pinq}[true]{\@nameuse{Pst@pinq#1}}
+\define@key[psset]{pst-circ}{invertpinq}[false]{\@nameuse{Pst@invertpinq#1}}
+\define@key[psset]{pst-circ}{pinr}[true]{\@nameuse{Pst@pinr#1}}
+\define@key[psset]{pst-circ}{invertpinr}[false]{\@nameuse{Pst@invertpinr#1}}
+\define@key[psset]{pst-circ}{pins}[true]{\@nameuse{Pst@pins#1}}
+\define@key[psset]{pst-circ}{invertpins}[false]{\@nameuse{Pst@invertpins#1}}
+\define@key[psset]{pst-circ}{pint}[true]{\@nameuse{Pst@pint#1}}
+\define@key[psset]{pst-circ}{invertpint}[false]{\@nameuse{Pst@invertpint#1}}
+\define@key[psset]{pst-circ}{pinu}[true]{\@nameuse{Pst@pinu#1}}
+\define@key[psset]{pst-circ}{invertpinu}[false]{\@nameuse{Pst@invertpinu#1}}
+\define@key[psset]{pst-circ}{pinv}[true]{\@nameuse{Pst@pinv#1}}
+\define@key[psset]{pst-circ}{invertpinv}[false]{\@nameuse{Pst@invertpinv#1}}
+\define@key[psset]{pst-circ}{pinw}[true]{\@nameuse{Pst@pinw#1}}
+\define@key[psset]{pst-circ}{invertpinw}[false]{\@nameuse{Pst@invertpinw#1}}
+\define@key[psset]{pst-circ}{pinx}[true]{\@nameuse{Pst@pinx#1}}
+\define@key[psset]{pst-circ}{invertpinx}[false]{\@nameuse{Pst@invertpinx#1}}
+\define@key[psset]{pst-circ}{piny}[true]{\@nameuse{Pst@piny#1}}
+\define@key[psset]{pst-circ}{invertpiny}[false]{\@nameuse{Pst@invertpiny#1}}
+\define@key[psset]{pst-circ}{pinz}[true]{\@nameuse{Pst@pinz#1}}
+\define@key[psset]{pst-circ}{invertpinz}[false]{\@nameuse{Pst@invertpinz#1}}
+\define@key[psset]{pst-circ}{pinaa}[true]{\@nameuse{Pst@pinaa#1}}
+\define@key[psset]{pst-circ}{invertpinaa}[false]{\@nameuse{Pst@invertpinaa#1}}
+\define@key[psset]{pst-circ}{pinab}[true]{\@nameuse{Pst@pinab#1}}
+\define@key[psset]{pst-circ}{invertpinab}[false]{\@nameuse{Pst@invertpinab#1}}
+\define@key[psset]{pst-circ}{pinac}[true]{\@nameuse{Pst@pinac#1}}
+\define@key[psset]{pst-circ}{invertpinac}[false]{\@nameuse{Pst@invertpinac#1}}
+\define@key[psset]{pst-circ}{pinad}[true]{\@nameuse{Pst@pinad#1}}
+\define@key[psset]{pst-circ}{invertpinad}[false]{\@nameuse{Pst@invertpinad#1}}
+\define@key[psset]{pst-circ}{pinae}[true]{\@nameuse{Pst@pinae#1}}
+\define@key[psset]{pst-circ}{invertpinae}[false]{\@nameuse{Pst@invertpinae#1}}
+\define@key[psset]{pst-circ}{pinaf}[true]{\@nameuse{Pst@pinaf#1}}
+\define@key[psset]{pst-circ}{invertpinaf}[false]{\@nameuse{Pst@invertpinaf#1}}
+
+\define@key[psset]{pst-circ}{pinla}[true]{\@nameuse{Pst@pinla#1}}
+\define@key[psset]{pst-circ}{invertpinla}[false]{\@nameuse{Pst@invertpinla#1}}
+\define@key[psset]{pst-circ}{pinlb}[true]{\@nameuse{Pst@pinlb#1}}
+\define@key[psset]{pst-circ}{invertpinlb}[false]{\@nameuse{Pst@invertpinlb#1}}
+\define@key[psset]{pst-circ}{pinlc}[true]{\@nameuse{Pst@pinlc#1}}
+\define@key[psset]{pst-circ}{invertpinlc}[false]{\@nameuse{Pst@invertpinlc#1}}
+\define@key[psset]{pst-circ}{pinld}[true]{\@nameuse{Pst@pinld#1}}
+\define@key[psset]{pst-circ}{invertpinld}[false]{\@nameuse{Pst@invertpinld#1}}
+\define@key[psset]{pst-circ}{pinle}[true]{\@nameuse{Pst@pinle#1}}
+\define@key[psset]{pst-circ}{invertpinle}[false]{\@nameuse{Pst@invertpinle#1}}
+\define@key[psset]{pst-circ}{pinlf}[true]{\@nameuse{Pst@pinlf#1}}
+\define@key[psset]{pst-circ}{invertpinlf}[false]{\@nameuse{Pst@invertpinlf#1}}
+\define@key[psset]{pst-circ}{pinlg}[true]{\@nameuse{Pst@pinlg#1}}
+\define@key[psset]{pst-circ}{invertpinlg}[false]{\@nameuse{Pst@invertpinlg#1}}
+\define@key[psset]{pst-circ}{pinlh}[true]{\@nameuse{Pst@pinlh#1}}
+\define@key[psset]{pst-circ}{invertpinlh}[false]{\@nameuse{Pst@invertpinlh#1}}
+\define@key[psset]{pst-circ}{pinli}[true]{\@nameuse{Pst@pinli#1}}
+\define@key[psset]{pst-circ}{invertpinli}[false]{\@nameuse{Pst@invertpinli#1}}
+\define@key[psset]{pst-circ}{pinlj}[true]{\@nameuse{Pst@pinlj#1}}
+\define@key[psset]{pst-circ}{invertpinlj}[false]{\@nameuse{Pst@invertpinlj#1}}
+\define@key[psset]{pst-circ}{pinlk}[true]{\@nameuse{Pst@pinlk#1}}
+\define@key[psset]{pst-circ}{invertpinlk}[false]{\@nameuse{Pst@invertpinlk#1}}
+\define@key[psset]{pst-circ}{pinll}[true]{\@nameuse{Pst@pinll#1}}
+\define@key[psset]{pst-circ}{invertpinll}[false]{\@nameuse{Pst@invertpinll#1}}
+\define@key[psset]{pst-circ}{pinlm}[true]{\@nameuse{Pst@pinlm#1}}
+\define@key[psset]{pst-circ}{invertpinlm}[false]{\@nameuse{Pst@invertpinlm#1}}
+\define@key[psset]{pst-circ}{pinln}[true]{\@nameuse{Pst@pinln#1}}
+\define@key[psset]{pst-circ}{invertpinln}[false]{\@nameuse{Pst@invertpinln#1}}
+\define@key[psset]{pst-circ}{pinlo}[true]{\@nameuse{Pst@pinlo#1}}
+\define@key[psset]{pst-circ}{invertpinlo}[false]{\@nameuse{Pst@invertpinlo#1}}
+\define@key[psset]{pst-circ}{pinlp}[true]{\@nameuse{Pst@pinlp#1}}
+\define@key[psset]{pst-circ}{invertpinlp}[false]{\@nameuse{Pst@invertpinlp#1}}
+
+
+
+\define@key[psset]{pst-circ}{pinra}[true]{\@nameuse{Pst@pinra#1}}
+\define@key[psset]{pst-circ}{invertpinra}[false]{\@nameuse{Pst@invertpinra#1}}
+\define@key[psset]{pst-circ}{pinrb}[true]{\@nameuse{Pst@pinrb#1}}
+\define@key[psset]{pst-circ}{invertpinrb}[false]{\@nameuse{Pst@invertpinrb#1}}
+\define@key[psset]{pst-circ}{pinrc}[true]{\@nameuse{Pst@pinrc#1}}
+\define@key[psset]{pst-circ}{invertpinrc}[false]{\@nameuse{Pst@invertpinrc#1}}
+\define@key[psset]{pst-circ}{pinrd}[true]{\@nameuse{Pst@pinrd#1}}
+\define@key[psset]{pst-circ}{invertpinrd}[false]{\@nameuse{Pst@invertpinrd#1}}
+\define@key[psset]{pst-circ}{pinre}[true]{\@nameuse{Pst@pinre#1}}
+\define@key[psset]{pst-circ}{invertpinre}[false]{\@nameuse{Pst@invertpinre#1}}
+\define@key[psset]{pst-circ}{pinrf}[true]{\@nameuse{Pst@pinrf#1}}
+\define@key[psset]{pst-circ}{invertpinrf}[false]{\@nameuse{Pst@invertpinrf#1}}
+\define@key[psset]{pst-circ}{pinrg}[true]{\@nameuse{Pst@pinrg#1}}
+\define@key[psset]{pst-circ}{invertpinrg}[false]{\@nameuse{Pst@invertpinrg#1}}
+\define@key[psset]{pst-circ}{pinrh}[true]{\@nameuse{Pst@pinrh#1}}
+\define@key[psset]{pst-circ}{invertpinrh}[false]{\@nameuse{Pst@invertpinrh#1}}
+\define@key[psset]{pst-circ}{pinri}[true]{\@nameuse{Pst@pinri#1}}
+\define@key[psset]{pst-circ}{invertpinri}[false]{\@nameuse{Pst@invertpinri#1}}
+\define@key[psset]{pst-circ}{pinrj}[true]{\@nameuse{Pst@pinrj#1}}
+\define@key[psset]{pst-circ}{invertpinrj}[false]{\@nameuse{Pst@invertpinrj#1}}
+\define@key[psset]{pst-circ}{pinrk}[true]{\@nameuse{Pst@pinrk#1}}
+\define@key[psset]{pst-circ}{invertpinrk}[false]{\@nameuse{Pst@invertpinrk#1}}
+\define@key[psset]{pst-circ}{pinrl}[true]{\@nameuse{Pst@pinrl#1}}
+\define@key[psset]{pst-circ}{invertpinrl}[false]{\@nameuse{Pst@invertpinrl#1}}
+\define@key[psset]{pst-circ}{pinrm}[true]{\@nameuse{Pst@pinrm#1}}
+\define@key[psset]{pst-circ}{invertpinrm}[false]{\@nameuse{Pst@invertpinrm#1}}
+\define@key[psset]{pst-circ}{pinrn}[true]{\@nameuse{Pst@pinrn#1}}
+\define@key[psset]{pst-circ}{invertpinrn}[false]{\@nameuse{Pst@invertpinrn#1}}
+\define@key[psset]{pst-circ}{pinro}[true]{\@nameuse{Pst@pinro#1}}
+\define@key[psset]{pst-circ}{invertpinro}[false]{\@nameuse{Pst@invertpinro#1}}
+\define@key[psset]{pst-circ}{pinrp}[true]{\@nameuse{Pst@pinrp#1}}
+\define@key[psset]{pst-circ}{invertpinrp}[false]{\@nameuse{Pst@invertpinrp#1}}
+
+\define@key[psset]{pst-circ}{pintl}[false]{\@nameuse{Pst@pintl#1}}
+\define@key[psset]{pst-circ}{invertpintl}[false]{\@nameuse{Pst@invertpintl#1}}
+\define@key[psset]{pst-circ}{pintc}[false]{\@nameuse{Pst@pintc#1}}
+\define@key[psset]{pst-circ}{invertpintc}[false]{\@nameuse{Pst@invertpintc#1}}
+\define@key[psset]{pst-circ}{pintr}[false]{\@nameuse{Pst@pintr#1}}
+\define@key[psset]{pst-circ}{invertpintr}[false]{\@nameuse{Pst@invertpintr#1}}
+
+\define@key[psset]{pst-circ}{pinbl}[false]{\@nameuse{Pst@pinbl#1}}
+\define@key[psset]{pst-circ}{invertpinbl}[false]{\@nameuse{Pst@invertpinbl#1}}
+\define@key[psset]{pst-circ}{pinbc}[false]{\@nameuse{Pst@pinbc#1}}
+\define@key[psset]{pst-circ}{invertpinbc}[false]{\@nameuse{Pst@invertpinbc#1}}
+\define@key[psset]{pst-circ}{pinbr}[false]{\@nameuse{Pst@pinbr#1}}
+\define@key[psset]{pst-circ}{invertpinbr}[false]{\@nameuse{Pst@invertpinbr#1}}
+
+\define@key[psset]{pst-circ}{pinta}[false]{\@nameuse{Pst@pinta#1}}
+\define@key[psset]{pst-circ}{invertpinta}[false]{\@nameuse{Pst@invertpinta#1}}
+\define@key[psset]{pst-circ}{pintb}[false]{\@nameuse{Pst@pintb#1}}
+\define@key[psset]{pst-circ}{invertpintb}[false]{\@nameuse{Pst@invertpintb#1}}
+\define@key[psset]{pst-circ}{pintc}[false]{\@nameuse{Pst@pintc#1}}
+\define@key[psset]{pst-circ}{invertpintc}[false]{\@nameuse{Pst@invertpintc#1}}
+\define@key[psset]{pst-circ}{pintd}[false]{\@nameuse{Pst@pintd#1}}
+\define@key[psset]{pst-circ}{invertpintd}[false]{\@nameuse{Pst@invertpintd#1}}
+\define@key[psset]{pst-circ}{pinte}[false]{\@nameuse{Pst@pinte#1}}
+\define@key[psset]{pst-circ}{invertpinte}[false]{\@nameuse{Pst@invertpinte#1}}
+
+\define@key[psset]{pst-circ}{pinba}[false]{\@nameuse{Pst@pinba#1}}
+\define@key[psset]{pst-circ}{invertpinba}[false]{\@nameuse{Pst@invertpinba#1}}
+\define@key[psset]{pst-circ}{pinbb}[false]{\@nameuse{Pst@pinbb#1}}
+\define@key[psset]{pst-circ}{invertpinbb}[false]{\@nameuse{Pst@invertpinbb#1}}
+\define@key[psset]{pst-circ}{pinbc}[false]{\@nameuse{Pst@pinbc#1}}
+\define@key[psset]{pst-circ}{invertpinbc}[false]{\@nameuse{Pst@invertpinbc#1}}
+\define@key[psset]{pst-circ}{pinbd}[false]{\@nameuse{Pst@pinbd#1}}
+\define@key[psset]{pst-circ}{invertpinbd}[false]{\@nameuse{Pst@invertpinbd#1}}
+\define@key[psset]{pst-circ}{pinbe}[false]{\@nameuse{Pst@pinbe#1}}
+\define@key[psset]{pst-circ}{invertpinbe}[false]{\@nameuse{Pst@invertpinbe#1}}
+
+\define@key[psset]{pst-circ}{dpleft}[false]{\@nameuse{Pst@dpleft#1}}
+\define@key[psset]{pst-circ}{dpright}[true]{\@nameuse{Pst@dpright#1}}
+
+% Define Ladder Boolean Keys
+\define@key[psset]{pst-circ}{latch}[false]{\@nameuse{Pst@latch#1}}
+\define@key[psset]{pst-circ}{unlatch}[false]{\@nameuse{Pst@unlatch#1}}
+\define@key[psset]{pst-circ}{contactclosed}[false]{\@nameuse{Pst@contactclosed#1}}
+
+% Define Ladder Bipole Keys
+\define@key[psset]{pst-circ}{polarized}[false]{\@nameuse{Pst@polarized#1}}
+
+% Define Diodes
+\define@key[psset]{pst-circ}{ison}[true]{\@nameuse{Pst@ison#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\psset[pst-circ]{%
+ labelstyle=,mathlabel=false,labelInside=0,circedge=\pcangle,
+ intensity=false,intensitylabel={},
+ intensitylabeloffset=0.5,
+ intensitycolor=black,intensitylabelcolor=black,intensitywidth=\pslinewidth,
+ tensionstyle=line,
+ tension=false,tensionlabel={},tensionoffset=1,tensionlabeloffset=1.2,
+ tensioncolor=black,tensionlabelcolor=black,tensionwidth=\pslinewidth,
+ labeloffset=0.7,labelangle=0,dipoleconvention=receptor,directconvention=true,dipolestyle=normal
+ parallel=false,parallelarm=1.5,parallelsep=0,parallelnode=false,
+ intersect=false,OAperfect=true,OAinvert=true,
+ OAiplus=false,OAiminus=false,OAiout=false,OAipluslabel={},
+ OAiminuslabel={},OAioutlabel={},OApower=false,
+ GMperfect=false,GMinvert=true, % pv 2014-12-14
+ GMiplus=false,GMiminus=false,GMiout=false,GMipluslabel={}, %
+ GMiminuslabel={},GMioutlabel={},GMpower=false,% % END of ADD
+ transistorcircle=true, transistorinvert=false, % hv 2003-07-23
+ transistoribase=false,transistoricollector=false,transistoriemitter=false,%
+ transistoribaselabel={},basesep=0pt,
+ transistoricollectorlabel={},transistoriemitterlabel={},
+ transistortype=NPN,TRot=0,%
+ FETmemory=false, % atosch
+ primarylabel={},secondarylabel={},transformeriprimary=false,transformerisecondary=false,
+ transformeriprimarylabel={},transformerisecondarylabel={},
+ tripolestyle=normal,variable=false,
+ logicShowDot=false, logicShowNode=false, logicChangeLR=false, % hv
+ logicWireLength=0.5, logicWidth=1.5, logicHeight=2.5, % hv
+ logicNInput=2, logicJInput=2, logicKInput=2, logicType=and, % hv
+ logicLabelstyle=\small, logicSymbolstyle=\large,
+ logicSymbolpos=0.5,logicNodestyle=\footnotesize,
+ segmentcolor=black,ninputs=2,segmentdisplay=10,nicpins=8,bubblesize=0.15,
+ plcaddress={},plcsymbol={},inputalabel={},inputblabel={},inputclabel={},
+ inputenlabel={$EN$},inputcllabel={$CL$},outputalabel={$Q$},outputblabel={$\bar{Q}$},
+ pinalabel={},pinanumber={},pinblabel={},pinbnumber={},pinclabel={},pincnumber={},
+ pindlabel={},pindnumber={},pinelabel={},pinenumber={},pinflabel={},pinfnumber={},
+ pinglabel={},pingnumber={},pinhlabel={},pinhnumber={},pinilabel={},pininumber={},
+ pinjlabel={},pinjnumber={},pinklabel={},pinknumber={},pinllabel={},pinlnumber={},
+ pinmlabel={},pinmnumber={},pinnlabel={},pinnnumber={},pinolabel={},pinonumber={},
+ pinplabel={},pinpnumber={},pinqlabel={},pinqnumber={},pinrlabel={},pinrnumber={},
+ pinslabel={},pinsnumber={},pintlabel={},pintnumber={},pinulabel={},pinunumber={},
+ pinvlabel={},pinvnumber={},pinwlabel={},pinwnumber={},pinxlabel={},pinxnumber={},
+ pinylabel={},pinynumber={},pinzlabel={},pinznumber={},pinaalabel={},pinaanumber={},
+ pinablabel={},pinabnumber={},pinaclabel={},pinacnumber={},pinadlabel={},pinadnumber={},
+ pinaelabel={},pinaenumber={},pinaflabel={},pinafnumber={},pinlalabel={},pinlanumber={},
+ pinlblabel={},pinlbnumber={},pinlclabel={},pinlcnumber={},pinldlabel={},pinldnumber={},
+ pinlelabel={},pinlenumber={},pinlflabel={},pinlfnumber={},pinlglabel={},pinlgnumber={},
+ pinlhlabel={},pinlhnumber={},pinlilabel={},pinlinumber={},pinljlabel={},pinljnumber={},
+ pinlklabel={},pinlknumber={},pinlllabel={},pinllnumber={},pinlmlabel={},pinlmnumber={},
+ pinlnlabel={},pinlnnumber={},pinlolabel={},pinlonumber={},pinlplabel={},pinlpnumber={},
+ pinralabel={},pinranumber={},pinrblabel={},pinrbnumber={},pinrclabel={},pinrcnumber={},
+ pinrdlabel={},pinrdnumber={},pinrelabel={},pinrenumber={},pinrflabel={},pinrfnumber={},
+ pinrglabel={},pinrgnumber={},pinrhlabel={},pinrhnumber={},pinrilabel={},pinrinumber={},
+ pinrjlabel={},pinrjnumber={},pinrklabel={},pinrknumber={},pinrllabel={},pinrlnumber={},
+ pinrmlabel={},pinrmnumber={},pinrnlabel={},pinrnnumber={},pinrolabel={},pinronumber={},
+ pinrplabel={},pinrpnumber={},pintllabel={},pintlnumber={},pintclabel={},pintcnumber={},
+ pintrlabel={},pintrnumber={},pinbllabel={},pinblnumber={},pinbclabel={},pinbcnumber={},
+ pinbrlabel={},pinbrnumber={},pintalabel={},pintanumber={},pintblabel={},pintbnumber={},
+ pintclabel={},pintcnumber={},pintdlabel={},pintdnumber={},pintelabel={},pintenumber={},
+ pinbalabel={},pinbanumber={},pinbblabel={},pinbbnumber={},pinbclabel={},pinbcnumber={},
+ pinbdlabel={},pinbdnumber={},pinbelabel={},pinbenumber={},
+ iec=false,iecinvert=false,input=true,invertinput=false,inputa=true,invertinputa=false,
+ inputb=true,invertinputb=false,inputc=true,invertinputc=false,inputd=true,invertinputd=false,
+ enable=false,invertenable=false,clock=false,invertclock=false,set=false,invertset=false,
+ reset=false,invertreset=false,invertoutput=false,outputa=true,invertoutputa=false,outputb=true,
+ invertoutputb=true,segmentlabels=true,pina=true,invertpina=false,pinb=true,invertpinb=false,
+ pinc=true,invertpinc=false,pind=true,invertpind=false,pine=true,invertpine=false,
+ pinf=true,invertpinf=false,ping=true,invertping=false,pinh=true,invertpinh=false,
+ pini=true,invertpini=false,pinj=true,invertpinj=false,pink=true,invertpink=false,
+ pinl=true,invertpinl=false,pinm=true,invertpinm=false,pinn=true,invertpinn=false,
+ pino=true,invertpino=false,pinp=true,invertpinp=false,pinq=true,invertpinq=false,
+ pinr=true,invertpinr=false,pins=true,invertpins=false,pint=true,invertpint=false,
+ pinu=true,invertpinu=false,pinv=true,invertpinv=false,pinw=true,invertpinw=false,
+ pinx=true,invertpinx=false,piny=true,invertpiny=false,pinz=true,invertpinz=false,
+ pinaa=true,invertpinaa=false,pinab=true,invertpinab=false,pinac=true,invertpinac=false,
+ pinad=true,invertpinad=false,pinae=true,invertpinae=false,pinaf=true,invertpinaf=false,
+ pinla=true,invertpinla=false,pinlb=true,invertpinlb=false,pinlc=true,invertpinlc=false,
+ pinld=true,invertpinld=false,pinle=true,invertpinle=false,pinlf=true,invertpinlf=false,
+ pinlg=true,invertpinlg=false,pinlh=true,invertpinlh=false,pinli=true,invertpinli=false,
+ pinlj=true,invertpinlj=false,pinlk=true,invertpinlk=false,pinll=true,invertpinll=false,
+ pinlm=true,invertpinlm=false,pinln=true,invertpinln=false,pinlo=true,invertpinlo=false,
+ pinlp=true,invertpinlp=false,pinra=true,invertpinra=false,pinrb=true,invertpinrb=false,
+ pinrc=true,invertpinrc=false,pinrd=true,invertpinrd=false,pinre=true,invertpinre=false,
+ pinrf=true,invertpinrf=false,pinrg=true,invertpinrg=false,pinrh=true,invertpinrh=false,
+ pinri=true,invertpinri=false,pinrj=true,invertpinrj=false,pinrk=true,invertpinrk=false,
+ pinrl=true,invertpinrl=false,pinrm=true,invertpinrm=false,pinrn=true,invertpinrn=false,
+ pinro=true,invertpinro=false,pinrp=true,invertpinrp=false,pintl=false,invertpintl=false,
+ pintc=false,invertpintc=false,pintr=false,invertpintr=false,pinbl=false,invertpinbl=false,
+ pinbc=false,invertpinbc=false,pinbr=false,invertpinbr=false,pinta=false,invertpinta=false,
+ pintb=false,invertpintb=false,pintc=false,invertpintc=false,pintd=false,invertpintd=false,
+ pinte=false,invertpinte=false,pinba=false,invertpinba=false,pinbb=false,invertpinbb=false,
+ pinbc=false,invertpinbc=false,pinbd=false,invertpinbd=false,pinbe=false,invertpinbe=false,
+ dpleft=false,dpright=true,latch=false,unlatch=false,contactclosed=false,polarized=false,
+ ison=true, IGBTinvert=false % pv 2014-12-14
+}% hv
+%\psset[pstricks]{radius=0.5}
+
+%
+\newpsstyle{baseOpt}{circedge=\pcline,arrows=-,arm=.5,angleA=0,angleB=180}
+\newpsstyle{emitterOpt}{arrows=-,arm=.5,angleA=180,angleB=-90}%
+\newpsstyle{collectorOpt}{arrows=-,arm=.5,angleA=180,angleB=90}
+%
+\def\wire{\@ifnextchar[{\pst@draw@wire}{\pst@draw@wire[]}}
+\def\tension{\@ifnextchar[{\pst@draw@tension@}{\pst@draw@tension@[]}}
+%
+% cb 2010-08-12, new macro for defining generic dipole macros
+\def\newCircDipole{\@ifnextchar[{\newCircDipole@i}{\newCircDipole@i[]}}
+% the optional argument can be used to preset options (like 'radius=2pt' in OpenDipol
+\def\newCircDipole@i[#1]#2{%
+ \@ifundefined{pst@#2}{%
+ \@namedef{#2}{\@ifnextchar[{\@nameuse{pst@#2}}{\@nameuse{pst@#2}[]}}%
+ \expandafter\def\csname pst@#2\endcsname[##1](##2)(##3)##4{{%
+ \pst@draw@dipole{#1,##1}{##2}{##3}{##4}{\@nameuse{pst@draw@#2}}}\ignorespaces}%
+ %
+ \@namedef{pst@multidipole@#2}{\@ifnextchar[{\@nameuse{pst@multidipole@#2@}}{\@nameuse{pst@multidipole@#2@}[]}}
+ \expandafter\def\csname pst@multidipole@#2@\endcsname[##1]##2{%
+ \expandafter\def\csname pst@tmp@\number\pst@count@iii\endcsname{##2}%
+ {\psset{##1}%
+ \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}%
+ \pst@count@ii=\pst@count@i
+ \advance\pst@count@ii\@ne
+ \toks0\expandafter{\pst@multidipole@output}%
+ \edef\pst@multidipole@output{%
+ \the\toks0
+ \pst@multidipole@def@coor
+ \noexpand\@nameuse{#2}[##1]%
+ (! X@\the\pst@count@i\space Y@\the\pst@count@i)%
+ (! X@\the\pst@count@ii\space Y@\the\pst@count@ii)%
+ {\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}
+ }%
+ \pst@multidipole@%
+}}\ignorespaces}%
+%
+\newCircDipole{RFLine}
+\newCircDipole{resistor}
+\newCircDipole{capacitor}
+\newCircDipole{battery}
+\newCircDipole{coil}
+\newCircDipole{Ucc}
+\newCircDipole{Icc}
+\newCircDipole{switch}
+\newCircDipole{diode}
+\newCircDipole{Zener}
+\newCircDipole{lamp}
+\newCircDipole[radius=0.5]{circledipole}
+\newCircDipole{LED}
+\newCircDipole[radius=2pt]{OpenDipol}
+\newCircDipole[radius=2pt]{OpenTripol}
+\newCircDipole{Suppressor}
+\newCircDipole{Arrestor}
+\newCircDipole{RelayNOP}
+\newCircDipole{dashpot}
+%
+%
+\def\OA{\pst@object{OA}}
+\def\OA@i(#1)(#2)(#3){%
+ \addbefore@par{dimen=middle}%
+ \begin@ClosedObj%
+ \if\psk@label@OAiplus\@empty\else\psset{OAiplus=true}\fi%
+ \if\psk@label@OAiminus\@empty\else\psset{OAiminus=true}\fi%
+ \if\psk@label@OAiout\@empty\else\psset{OAiout=true}\fi%
+ \ifPst@intensity\psset{OAiplus=true,OAiminus=true,OAiout=true}\fi%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X3 X2} {X3 X1} ifelse add 2 div def
+ /YC Y1 Y2 add 2 div def
+ XC YC){C@}
+ \rput(C@){\pst@draw@OA}
+ \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#1}{\ifPst@OAinvert Minus@\else Plus@\fi}
+ \ncput[npos=2]{\pnode{\ifPst@OAinvert Minus@@\else Plus@@\fi}}
+ \ifPst@OAiplus
+ \ifPst@OAinvert\else
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiplus}
+ \fi
+ \fi
+ \ifPst@OAiminus
+ \ifPst@OAinvert
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiminus}
+ \fi
+ \fi
+ \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#2}{\ifPst@OAinvert Plus@\else Minus@\fi}
+ \ncput[npos=2]{\pnode{\ifPst@OAinvert Plus@@\else Minus@@\fi}}
+ \ifPst@OAiplus
+ \ifPst@OAinvert
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiplus}
+ \fi
+ \fi
+ \ifPst@OAiminus
+ \ifPst@OAinvert\else
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiminus}
+ \fi
+ \fi
+ \ncangle[arrows=-,arm=.5,angleA=180,angleB=0]{#3}{S@}
+ \ncput[npos=2]{\pnode{S@@}}
+ \ifPst@OAiout
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@OAiout}
+ \fi
+ \psline[linestyle=none](#1)(#2)% for the end arrows
+ \psline[linestyle=none](#1)(#3)% for the end arrows
+ \end@ClosedObj
+ \ignorespaces%
+}
+%
+
+%
+\def\GM{\pst@object{GM}}
+\def\GM@i(#1)(#2)(#3){%
+ \addbefore@par{dimen=middle}%
+ \begin@ClosedObj%
+ \if\psk@label@GMiplus\@empty\else\psset{GMiplus=true}\fi%
+ \if\psk@label@GMiminus\@empty\else\psset{GMiminus=true}\fi%
+ \if\psk@label@GMiout\@empty\else\psset{GMiout=true}\fi%
+ \ifPst@intensity\psset{GMiplus=true,GMiminus=true,GMiout=true}\fi%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X3 X2} {X3 X1} ifelse add 2 div def
+ /YC Y1 Y2 add 2 div def
+ XC YC){C@}
+ \rput(C@){\pst@draw@GM}
+ \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#1}{\ifPst@GMinvert Minus@\else Plus@\fi}
+ \ncput[npos=2]{\pnode{\ifPst@GMinvert Minus@@\else Plus@@\fi}}
+ \ifPst@GMiplus
+ \ifPst@GMinvert\else
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@GMiplus}
+ \fi
+ \fi
+ \ifPst@GMiminus
+ \ifPst@GMinvert
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@GMiminus}
+ \fi
+ \fi
+ \ncangle[arrows=-,arm=.5,angleA=0,angleB=180]{#2}{\ifPst@GMinvert Plus@\else Minus@\fi}
+ \ncput[npos=2]{\pnode{\ifPst@GMinvert Plus@@\else Minus@@\fi}}
+ \ifPst@GMiplus
+ \ifPst@GMinvert
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@GMiplus}
+ \fi
+ \fi
+ \ifPst@GMiminus
+ \ifPst@GMinvert\else
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@GMiminus}
+ \fi
+ \fi
+ \ncangle[arrows=-,arm=.5,angleA=180,angleB=0]{#3}{S@}
+ \ncput[npos=2]{\pnode{S@@}}
+ \ifPst@GMiout
+ \ncput[npos=2.5]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@label@GMiout}
+ \fi
+ \psline[linestyle=none](#1)(#2)% for the end arrows
+ \psline[linestyle=none](#1)(#3)% for the end arrows
+ \end@ClosedObj
+ \ignorespaces%
+}
+% % pv 2014-12-14
+
+
+%
+\def\pst@draw@battery{%
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.10,-0.5)(-0.10,0.5)
+ \psline[arrows=-,linewidth=3\pslinewidth](0.10,-0.25)(0.10,0.25)
+ \pnode(-0.1,0){dipole@1}
+ \pnode(0.1,0){dipole@2}
+ \ifPst@variable%
+ \psline{->}(-0.75,-0.5)(0.75,0.5)%
+ \fi
+ }
+%
+%
+\newif\ifPst@temp
+\def\transistor{\def\pst@par{}\pst@object{transistor}}
+\def\transistor@i(#1){%
+ \addbefore@par{dimen=inner}
+ \pst@killglue
+ \begingroup
+ \use@par
+ \@ifnextchar(% do we have more coordinates?
+ {\transistor@iii(#1)}{\Pst@tempfalse\transistor@ii(#1)}%
+}
+%
+\def\transistor@ii(#1)#2#3{% with one node, the base
+ \pst@killglue%
+ \ifPst@temp\pnode(#1){TBaseNode}%
+ \else
+ \pst@getcoor{#1}\pst@tempA%
+ \pnode(!
+ \pst@tempA /YB exch \pst@number\psyunit div def
+ /XB exch \pst@number\psxunit div def
+ /basesep \Pst@basesep\space \pst@number\psxunit div def
+ XB basesep \Pst@TRot\space cos mul add
+ YB basesep \Pst@TRot\space sin mul add){TBaseNode}% base node
+ \fi
+ \rput[c]{\Pst@TRot}(!
+ \pst@tempA /YB exch \pst@number\psyunit div def
+ /XB exch \pst@number\psxunit div def
+ /basesep \Pst@basesep\space \pst@number\psxunit div def
+ XB basesep \Pst@TRot\space cos mul add
+ YB basesep \Pst@TRot\space sin mul add){%
+ \ifdim180pt=\Pst@TRot pt\relax
+ \ifPst@transistorcircle\pscircle(0.3,0){0.7}\fi
+ \ifx\psk@Ttype\pst@Ttype@NPN\relax
+ \ifPst@transistorinvert
+ \pnode(0.5,-0.5){#2}%
+ \pnode(0.5,0.5){#3}%
+ \else
+ \pnode(0.5,-0.5){#3}%
+ \pnode(0.5,0.5){#2}%
+ \fi
+ \psline[linewidth=4\pslinewidth,arrows=-](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \psline[arrowinset=0,arrowsize=8\pslinewidth,arrows=->](#2)(TBaseNode)(#3)%
+ \else
+ \ifx\psk@Ttype\pst@Ttype@PNP\relax
+ \ifPst@transistorinvert
+ \pnode(0.5,-0.5){#2}\pnode(0.5,0.5){#3}%
+ \else
+ \pnode(0.5,-0.5){#3}\pnode(0.5,0.5){#2}%
+ \fi
+ \psline[linewidth=4\pslinewidth,arrows=-](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \psline[arrowinset=0,arrowsize=8\pslinewidth,arrows=->,dimen=middle](0.5,-0.5)(TBaseNode)%
+ \psline(0.5,0.5)(TBaseNode)
+ \else% FET
+ \ifx\psk@Ttype\pst@Ttype@FET\relax%
+ \ifPst@transistorinvert\pnode(0.75,-0.5){#2}\else\pnode(0.75,-0.5){#3}\fi%
+ \ifPst@transistorinvert\pnode(0.75,0.5){#3}\else\pnode(0.75,0.5){#2}\fi%
+ % Main drawings
+ \psline[arrows=-](0.75,0.5)(0.2,0.5)
+ \psline[linestyle=dashed,dash=8pt 3pt,arrows=-](0.2,0.6)(0.2,-0.6)
+ \psline[arrows=-](0.2,-0.5)(0.75,-0.5)%
+ \ifPst@FETmemory% atosch
+ \psline[arrows=-,linewidth=\psk@I@width](-0.15,0.5)(-0.15,-0.5)%
+ \fi%
+ \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,0.5)(TBaseNode|0,-0.5)%
+ \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% Ted 2007-10-15
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(0.2,0)(0.75,0)%
+ \ifPst@transistorinvert
+ \qdisk(#3){1.5pt}\psline[origin={#3}]{-}(0,-0.5)%
+ \else
+ \qdisk(#3){1.5pt}\psline[origin={#3}]{-}(0,0.5)%
+ \fi
+ \else%
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.2,0)(0.75,0)%
+ \ifPst@transistorinvert
+ \qdisk(#2){1.5pt}\psline[origin={#2}]{-}(0,0.5)%
+ \else
+ \qdisk(#2){1.5pt}\psline[origin={#2}]{-}(0,-0.5)%
+ \fi
+ \fi%
+ \else % NMOS or PMOS
+ \ifPst@transistorinvert\pnode(0.75,-0.4){#2}\else\pnode(0.75,-0.4){#3}\fi%
+ \ifPst@transistorinvert\pnode(0.75,0.4){#3}\else\pnode(0.75,0.4){#2}\fi%
+ % Main drawings
+ \psline[arrows=-](0.75,0.4)(0.15,0.4)
+ \psline[linewidth=3\psk@I@width,arrows=-](0.15,0.6)(0.15,-0.6)
+ \psline[arrows=-](0.75,-0.4)(0.15,-0.4)%
+ \ifx\psk@Ttype\pst@Ttype@NMOS\relax%
+ \ifPst@transistorinvert
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(0.15,0.4)(0.75,0.4)%
+ \else
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(0.15,-0.4)(0.75,-0.4)%
+ \fi
+ \psline[arrows=-,linewidth=1.5\psk@I@width](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \else
+ \ifPst@transistorinvert
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,0.4)(0.75,0.4)%
+ \else
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,-0.4)(0.75,-0.4)%
+ \fi
+ \psline[arrows=-,linewidth=1.5\psk@I@width](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \fi
+ \fi
+ \fi %
+ \fi%
+ \else%
+ \ifPst@transistorcircle\pscircle(0.3,0){0.7}\fi
+ \ifx\psk@Ttype\pst@Ttype@FET\relax%
+ \ifPst@transistorinvert\pnode(0.65,0.5){#2}\else\pnode(0.65,0.5){#3}\fi%
+ \ifPst@transistorinvert\pnode(0.65,-0.5){#3}\else\pnode(0.65,-0.5){#2}\fi%
+ % FET Main drawings
+ \psline[arrows=-](0.65,0.5)(0.15,0.5) % upper line
+ \psline[linestyle=dashed,dash=8pt 3pt,arrows=-](0.15,0.6)(0.15,-0.6) % gate
+ \psline[arrows=-](0.15,-0.5)(0.65,-0.5)% lower line
+ \ifPst@FETmemory% atosch
+ \psline[arrows=-,linewidth=\psk@I@width](-0.15,0.5)(-0.15,-0.5)%
+ \fi%
+ \psline[arrows=-,linewidth=\psk@I@width](TBaseNode|0,0.5)(TBaseNode|0,-0.5)%
+ \ifx\psk@FETchanneltype\pst@FETchanneltype@P\relax% Ted 2007-10-15
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(0.15,0)(0.65,0)%
+ \qdisk(#3){1.5pt}\psline[origin={#3}]{-}(0,-0.5)%
+ \else%
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,0)(0.65,0)%
+ \qdisk(#2){1.5pt}\psline[origin={#2}]{-}(0,0.5)%
+ \fi%
+ \else
+ \ifx\psk@Ttype\pst@Ttype@NMOS\relax%
+ % NMOS Main drawings
+ \psline[arrows=-](0.65,0.4)(0.15,0.4) % upper line
+ \psline[linewidth=3\psk@I@width,arrows=-](0.15,0.6)(0.15,-0.6) % gate
+ \psline[arrows=-](0.65,-0.4)(0.15,-0.4)% lower line
+ \psline[arrows=-,linewidth=1.5\psk@I@width](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \ifPst@transistorinvert\pnode(0.65,0.4){#2}\else\pnode(0.65,0.4){#3}\fi%
+ \ifPst@transistorinvert\pnode(0.65,-0.4){#3}\else\pnode(0.65,-0.4){#2}\fi%
+ \ifPst@transistorinvert
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(0.15,0.4)(0.65,0.4)%
+ \else
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(0.15,-0.4)(0.65,-0.4)%
+ \fi
+ \else
+ \ifx\psk@Ttype\pst@Ttype@PMOS\relax%
+ % PMOS Main drawings
+ \psline[arrows=-](0.65,0.4)(0.15,0.4) % upper line
+ \psline[linewidth=3\psk@I@width,arrows=-](0.15,0.6)(0.15,-0.6) % gate
+ \psline[arrows=-](0.65,-0.4)(0.15,-0.4)% lower line
+ \psline[arrows=-,linewidth=1.5\psk@I@width](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \ifPst@transistorinvert
+ \pnode(0.65,0.4){#2}\pnode(0.65,-0.4){#3}
+ \else
+ \pnode(0.65,0.4){#3}\pnode(0.65,-0.4){#2}
+ \fi%
+ \ifPst@transistorinvert
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,0.4)(0.65,0.4)%
+ \else
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{<-}(0.15,-0.4)(0.65,-0.4)%
+ \fi
+ \else % PNP or NPN
+ \ifPst@transistorinvert
+ \pnode(0.5,0.5){#2}\pnode(0.5,-0.5){#3}%
+ \else
+ \pnode(0.5,0.5){#3}\pnode(0.5,-0.5){#2}%
+ \fi
+ \ifx\psk@Ttype\pst@Ttype@NPN\relax% % NPN
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(TBaseNode)(#2)%
+ \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)%
+ \else% % PNP
+ \psline[arrowinset=0,arrowsize=8\pslinewidth]{->}(#3)(TBaseNode)%
+ \psline[arrows=-,linewidth=4\pslinewidth](TBaseNode|0,0.4)(TBaseNode|0,-0.4)%
+ \psline[arrows=-](0.5,0.5)(TBaseNode)(0.5,-0.5)%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ }%
+ \ifPst@temp\else\endgroup\fi%
+ \ignorespaces%
+}
+%
+\def\transistor@iii(#1)(#2)(#3){% with three nodes
+ \pst@getcoor{#1}\pst@tempA%
+ \pst@getcoor{#2}\pst@tempB%
+ \pst@getcoor{#3}\pst@tempC%
+ \pnode(!%
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempC /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /LR X1 X2 lt { false }{ true } ifelse def % change left-right
+ /basesep \Pst@basesep\space \pst@number\psxunit div def
+ /XBase X1 basesep \Pst@TRot\space cos mul add def
+ /YBase Y1 basesep \Pst@TRot\space sin mul add def
+ XBase YBase ){@@base}% base node
+%
+ \global\Pst@temptrue%
+ \transistor@ii(@@base){@@emitter}{@@collector}%
+%
+ \if\psk@labeltransistoribase\@empty\else\psset{transistoribase=true}\fi
+ \if\psk@labeltransistoriemitter\@empty\else\psset{transistoriemitter=true}\fi
+ \if\psk@labeltransistoricollector\@empty\else\psset{transistoricollector=true}\fi
+ \ifPst@intensity\psset{transistoribase=true,transistoriemitter=true,transistoricollector=true}\fi
+%
+ \bgroup\psset{style=baseOpt}\pscirc@edge(#1)(TBaseNode)\egroup
+ \ifPst@transistoribase% base current?
+ \ncput[npos=0.5,nrot=\Pst@TRot]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,%
+ arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)}%
+ \naput[npos=0.5]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoribase}%
+ \fi
+ \bgroup
+ \psset{style=collectorOpt}%
+ \ifPst@transistorinvert
+ \pscirc@edge(#3)(@@emitter)
+ \else
+ \pscirc@edge(#3)(@@collector)
+ \fi
+ \egroup
+ \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@emitter\else @@collector\fi}}%
+ \ifPst@transistoriemitter% emitter current?
+ \ifPst@transistorinvert% emitter/collector changed?
+ \ncput[npos=\pscirc@edge@sector,nrot=:U]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,%
+ arrowsize=6\pslinewidth,arrowinset=0]{->}(-0.1,0)(0.1,0)}%
+ \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter}%
+ \fi\fi
+ \ifPst@transistoricollector% collector current?
+ \ifPst@transistorinvert\else% emitter/collector changed?
+ \ncput[npos=\pscirc@edge@sector,nrot=:U]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,
+ arrowsize=6\pslinewidth,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \nbput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector}%
+ \fi\fi
+ \bgroup
+ \psset{style=emitterOpt}%
+ \ifPst@transistorinvert\pscirc@edge(#2)(@@collector)\else\pscirc@edge(#2)(@@emitter)\fi
+ \egroup
+ \ncput[npos=2]{\pnode{\ifPst@transistorinvert @@collector\else @@emitter\fi}}%
+ \ifPst@transistoriemitter
+ \ifPst@transistorinvert\else
+ \ncput[npos=\pscirc@edge@sector,nrot=:U]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,
+ arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)}
+ \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoriemitter}%
+ \fi\fi
+ \ifPst@transistoricollector% collector current?
+ \ifPst@transistorinvert% emitter/collector changed?
+ \ncput[npos=\pscirc@edge@sector,nrot=:U]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,
+ arrowsize=6\pslinewidth,arrowinset=0]{<-}(-.1,0)(.1,0)}
+ \naput[npos=\pscirc@edge@sector]{\csname\psk@I@labelcolor\endcsname\psk@labeltransistoricollector}%
+ \fi\fi
+ \psline[linestyle=none](#1)(#2)% for the end arrows
+ \psline[linestyle=none](#1)(#3)% for the end arrows
+ \endgroup
+ \ignorespaces
+}
+%
+\def\Tswitch{\pst@object{Tswitch}}
+\def\Tswitch@i(#1)(#2)(#3)#4{%
+ \addbefore@par{dimen=middle}%
+ \begin@ClosedObj
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y2 def
+ XC YC){C@}
+ \rput(C@){\pst@draw@Tswitch}
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tswi@left}
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tswi@right}
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tswi@center}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{Tswi@left}{Tswi@right}
+ \naput{#4}
+ \pcline[linestyle=none](#1)(#2)% for the endarrows
+ \pcline[linestyle=none](#2)(#3)% for the endarrows
+ \end@ClosedObj
+ \ignorespaces%
+}
+%
+% 20030830 hv
+%
+\def\potentiometer{\pst@object{potentiometer}}
+\def\potentiometer@i(#1)(#2)(#3)#4{%
+ \begin@ClosedObj
+ \resistor(#1)(#2){#4}
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /dx X2 X1 sub def
+ /dy Y2 Y1 sub def
+ dx 2 div X1 add
+ dy 2 div Y1 add ){Center@}
+ \pst@getcoor{Center@}\pst@tempd
+ \pnode(!%
+ \pst@tempd /Y4 exch \pst@number\psyunit div def
+ /X4 exch \pst@number\psxunit div def
+ dx abs 0.01 lt{
+ X3 Y4
+ }{dy abs 0.01 lt {
+ X4 Y3
+ }{/m dy dx div def
+ /x Y4 Y3 sub m X3 mul add X4 m div add m 1 m div add div def
+ x dup X3 sub m mul Y3 add
+ } ifelse
+ }ifelse){@tempNodeB}
+ \pnode(!%
+ /Alpha dy dx atan def
+ /dx Alpha sin 0.25 mul def
+ /dy Alpha cos 0.25 mul def
+ Y3 Y2 gt {X4 dx sub Y4 dy add}{X4 dx add Y4 dy sub}ifelse ){@tempNodeC}
+ \psline[arrows=->,arrowsize=0.2](#3)(@tempNodeB)(@tempNodeC)
+ \pcline[linestyle=none](#1)(#3)% for the endarrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+%
+% quadrupoles
+%
+\def\transformer{\pst@object{transformer}}
+\def\transformer@i(#1)(#2)(#3)(#4)#5{%
+ \addbefore@par{dimen=middle,arm=0}%
+ \begin@ClosedObj%
+ \if\psk@Trafo@iprimary@label\@empty\else
+ \psset{transformeriprimary=true}%
+ \fi
+ \if\psk@Trafo@isecondary@label\@empty\else
+ \psset{transformerisecondary=true}%
+ \fi
+ \ifPst@intensity
+ \psset{transformeriprimary=true,transformerisecondary=true}%
+ \fi
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
+ \pst@getcoor{#3}\pst@tempC
+ \pst@getcoor{#4}\pst@tempD
+ \pnode(!%
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempC /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ \pst@tempD /Y4 exch \pst@number\psyunit div def
+ /X4 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def
+ /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def
+ XC YC){C@}
+ \rput(C@){\pst@draw@transformer}
+ \pnode(#1){@endA}\pnode(#2){@endB}\pnode(#3){@endC}\pnode(#4){@endD}%
+ \ncangle[arrows=-,arm=0.5,angleB=90]{@endA}{inup@}
+ \ifPst@Trafo@iprimary
+ \ncput[npos=2.5,nrot=:U]{\psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \nbput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@Trafo@iprimary@label}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{@endB}{indown@}
+ \ncangle[arrows=-,arm=0.5,angleB=90]{@endC}{outup@}
+ \ifPst@Trafo@isecondary
+ \ncput[npos=2.5,nrot=:U]{\psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \naput[npos=2.5]{\csname\psk@I@labelcolor\endcsname\psk@Trafo@isecondary@label}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{@endD}{outdown@}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{inup@}
+ \naput{\psk@Trafo@primary@label}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{outdown@}{outup@}
+ \nbput{\psk@Trafo@secondary@label}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@}
+ \nbput{#5}
+ \pcline[linestyle=none](#1)(#3)% for the end arrows
+ \pcline[linestyle=none](#2)(#4)% for the end arrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+%
+% Start hv 2003-07-23
+\def\optoCoupler{\pst@object{optoCoupler}}
+\def\optoCoupler@i(#1)(#2)(#3)(#4)#5{%
+ \addbefore@par{dimen=middle,arm=0}%
+ \begin@ClosedObj%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pst@getcoor{#4}\pst@tempd
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ \pst@tempd /Y4 exch \pst@number\psyunit div def
+ /X4 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def
+ /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def
+ XC YC){C@}
+ \rput(C@){\pst@draw@optoCoupler}
+ \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{inup@}
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{#2}{indown@}
+ \ncangle[arrows=-,arm=0.5,angleB=90]{#3}{outup@}
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{#4}{outdown@}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@}
+ \nbput{#5}
+ \pcline[linestyle=none](#1)(#3)% for the end arrows
+ \pcline[linestyle=none](#2)(#4)% for the end arrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+%
+\def\quadripole{\pst@object{quadripole}}% Markus Graube
+\def\quadripole@i(#1)(#2)(#3)(#4)#5{%
+ \addbefore@par{dimen=middle,arm=0}%
+ \begin@ClosedObj%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pst@getcoor{#4}\pst@tempd
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ \pst@tempd /Y4 exch \pst@number\psyunit div def
+ /X4 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def
+ /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def
+ XC YC){C@}
+ \rput(C@){#5}
+ \rput(C@){\psframe[linewidth=1.5\pslinewidth](-1.5,-1.2)(1.5,1.2)
+ \pnode(-1.5,1){inup@} \pnode(-1.5,-1){indown@}
+ \pnode(1.5,-1){outdown@} \pnode(1.5,1){outup@}}
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{inup@}
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#2}{indown@}
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#3}{outup@}
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#4}{outdown@}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@}
+ \pcline[linestyle=none](#1)(#3)% for the end arrows
+ \pcline[linestyle=none](#2)(#4)% for the end arrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+%
+% The logical circuits part
+%
+\def\logic{\@ifnextchar[{\pst@draw@logic}{\pst@draw@logic[]}}
+\def\ground{\@ifnextchar[{\pst@ground}{\pst@ground[]}}
+\def\pst@ground[#1]{%
+ \@ifnextchar({\pst@groundi[#1]{0}}{\pst@groundi[#1]}%
+}
+\def\pst@groundi[#1]#2(#3){{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ \psframe[fillstyle=vlines,%
+ linestyle=none,%
+ fillstyle=none,%
+ hatchwidth=0.5\pslinewidth](-0.5,-0.7)(0.5,-0.5)
+ \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5)
+ \psline(0,0)(0,-0.5)
+ \ifPst@connectingdot
+ \pscircle*(0,0){2\pslinewidth}
+ \fi
+ }
+ \ignorespaces%
+}}
+%
+% end hv 2003-08-29
+%
+%% SQUID def added 2009-02-18 Amit Finkler
+\newCircDipole{SQUID}
+%
+\def\pst@draw@SQUID{%
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \psline(0.1,-0.6)(-0.1,-0.4)
+ \psline(0.1,-0.4)(-0.1,-0.6)
+ \psline(0.1,0.6)(-0.1,0.4)
+ \psline(0.1,0.4)(-0.1,0.6)
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}%
+}
+%% End of SQUID def
+
+%
+%%%%%%%%%%%%%
+\def\multidipole{\@ifnextchar[{\pst@multidipole}{\pst@multidipole[]}}
+\def\pst@multidipole[#1](#2)(#3)#4{%
+ \psset{#1}%
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
+ \pst@Verb{%
+ gsave
+ STV CP T
+ \pst@tempA /Ybegin@ exch \pst@number\psyunit div def
+ /Xbegin@ exch \pst@number\psxunit div def
+ \pst@tempB /Yend@ exch \pst@number\psyunit div def
+ /Xend@ exch \pst@number\psxunit div def
+ /Xbegin Xbegin@ Xend@ lt {Xbegin@} {Xend@} ifelse def
+ /Xend Xbegin@ Xend@ lt {Xend@} {Xbegin@} ifelse def
+ /Ybegin Ybegin@ Yend@ lt {Ybegin@} {Yend@} ifelse def
+ /Yend Ybegin@ Yend@ lt {Yend@} {Ybegin@} ifelse def
+ /@angle Yend Ybegin sub Xend Xbegin sub Atan def
+ /X@length Xend Xbegin sub Yend Ybegin sub Pyth @angle cos mul Xend@ Xbegin@ lt {neg} if def
+ /Y@length Xend Xbegin sub Yend Ybegin sub Pyth @angle sin mul Yend@ Ybegin@ lt {neg} if def
+ grestore}%
+ \pst@count@i=\z@
+ \let\pst@multidipole@output\@empty
+ \ifx\resistor #4\let\pscirc@next\pst@multidipole@resistor% 1
+ \else\ifx\RFLine #4\let\pscirc@next\pst@multidipole@RFLine
+ \else\ifx\capacitor #4\let\pscirc@next\pst@multidipole@capacitor
+ \else\ifx\battery #4\let\pscirc@next\pst@multidipole@battery
+ \else\ifx\coil #4\let\pscirc@next\pst@multidipole@coil
+ \else\ifx\Ucc #4\let\pscirc@next\pst@multidipole@Ucc
+ \else\ifx\Icc #4\let\pscirc@next\pst@multidipole@Icc
+ \else\ifx\switch #4\let\pscirc@next\pst@multidipole@switch
+ \else\ifx\diode #4\let\pscirc@next\pst@multidipole@diode
+ \else\ifx\Zener #4\let\pscirc@next\pst@multidipole@Zener% 10
+ \else\ifx\wire #4\let\pscirc@next\pst@multidipole@wire
+ \else\ifx\lamp #4\let\pscirc@next\pst@multidipole@lamp
+ \else\ifx\circledipole#4\let\pscirc@next\pst@multidipole@circledipole
+ \else\ifx\LED #4\let\pscirc@next\pst@multidipole@LED
+ \else\ifx\dashpot #4\let\pscirc@next\pst@multidipole@dashpot %15
+ \else\ifx\filter #4\let\pscirc@next\pst@multidipole@filter
+ \else\ifx\isolator #4\let\pscirc@next\pst@multidipole@isolator%
+ \else\ifx\freqmult #4\let\pscirc@next\pst@multidipole@freqmult%
+ \else\ifx\phaseshifter#4\let\pscirc@next\pst@multidipole@phaseshifter%
+ \else\ifx\vco #4\let\pscirc@next\pst@multidipole@vco % 20
+ \else\ifx\amplifier #4\let\pscirc@next\pst@multidipole@amplifier%
+ \else\ifx\detector #4\let\pscirc@next\pst@multidipole@detector% 22
+ \else\ifx\SQUID #4\let\pscirc@next\pst@multidipole@SQUID% 23
+ \else\ifx\Suppressor #4\let\pscirc@next\pst@multidipole@Suppressor %%% mla change
+ \else\ifx\Arrestor #4\let\pscirc@next\pst@multidipole@Arrestor %%% mla change 25
+ \else\ifx\RelayNOP #4\let\pscirc@next\pst@multidipole@RelayNOP %%% mla 26
+ \else\ifx\OpenDipol #4\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol #4\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else\ifx\arrowswitch #4\let\pscirc@next\pst@multidipole@arrowswitch% 29
+ \else\let\pscirc@next\ignorespaces
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi% 1..10
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%11..20
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi% 21..29
+ \advance\pst@count@i\@ne
+ \advance\pst@count@iii\@ne
+ \pscirc@next}
+%
+\def\pst@multidipole@#1{%
+ \ifx\resistor#1\let\pscirc@next\pst@multidipole@resistor %1
+ \else\ifx\RFLine#1\let\pscirc@next\pst@multidipole@RFLine
+ \else\ifx\capacitor#1\let\pscirc@next\pst@multidipole@capacitor
+ \else\ifx\battery#1\let\pscirc@next\pst@multidipole@battery
+ \else\ifx\coil#1\let\pscirc@next\pst@multidipole@coil %5
+ \else\ifx\Ucc #1\let\pscirc@next\pst@multidipole@Ucc
+ \else\ifx\Icc #1\let\pscirc@next\pst@multidipole@Icc
+ \else\ifx\switch #1\let\pscirc@next\pst@multidipole@switch %off
+ \else\ifx\diode#1\let\pscirc@next\pst@multidipole@diode
+ \else\ifx\Zener #1\let\pscirc@next\pst@multidipole@Zener %10
+ \else\ifx\wire #1\let\pscirc@next\pst@multidipole@wire
+ \else\ifx\lamp #1\let\pscirc@next\pst@multidipole@lamp
+ \else\ifx\circledipole#1\let\pscirc@next\pst@multidipole@circledipole
+ \else\ifx\LED #1\let\pscirc@next\pst@multidipole@LED
+ \else\ifx\dashpot #1\let\pscirc@next\pst@multidipole@dashpot %15
+ \else\ifx\filter #1\let\pscirc@next\pst@multidipole@filter
+ \else\ifx\isolator #1\let\pscirc@next\pst@multidipole@isolator
+ \else\ifx\freqmult #1\let\pscirc@next\pst@multidipole@freqmult%
+ \else\ifx\phaseshifter#1\let\pscirc@next\pst@multidipole@phaseshifter%
+ \else\ifx\vco #1\let\pscirc@next\pst@multidipole@vco % 20
+ \else\ifx\amplifier#1\let\pscirc@next\pst@multidipole@amplifier%
+ \else\ifx\detector #1\let\pscirc@next\pst@multidipole@detector% 22
+ \else\ifx\SQUID #1\let\pscirc@next\pst@multidipole@SQUID% 23
+ \else\ifx\Suppressor #1\let\pscirc@next\pst@multidipole@Suppressor%% mla change
+ \else\ifx\Arrestor #1\let\pscirc@next\pst@multidipole@Arrestor%% mla change 25
+ \else\ifx\RelayNOP #1\let\pscirc@next\pst@multidipole@RelayNOP%% mla change 26
+ \else\ifx\OpenDipol#1\let\pscirc@next\pst@multidipole@OpenDipol% 27
+ \else\ifx\OpenTripol#1\let\pscirc@next\pst@multidipole@OpenTripol% 28
+ \else\ifx\arrowswitch#1\let\pscirc@next\pst@multidipole@arrowswitch% 29
+ \else\let\pscirc@next\ignorespaces\pst@multidipole@output
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \advance\pst@count@i\@ne
+ \advance\pst@count@iii\@ne
+ \pscirc@next
+}
+%
+%
+\def\pst@multidipole@wire{\@ifnextchar[{\pst@multidipole@wire@}{\pst@multidipole@wire@[]}}
+\def\pst@multidipole@wire@[#1]{%
+ {\psset{#1}%
+ \ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}%
+ \pst@count@ii=\pst@count@i
+ \advance\pst@count@ii\@ne
+ \toks0\expandafter{\pst@multidipole@output}%
+ \edef\pst@multidipole@output{%
+ \the\toks0
+ \pst@multidipole@def@coor
+ \noexpand\wire[#1]%
+ (! X@\the\pst@count@i\space Y@\the\pst@count@i)(! X@\the\pst@count@ii\space Y@\the\pst@count@ii)
+ }%
+ \pst@multidipole@
+}
+%
+\def\pst@multidipole@def@coor{%
+ \noexpand\pst@Verb{%
+ /X@\the\pst@count@i\space \the\pst@count@i\space 1 sub X@length \noexpand\the\pst@count@i\space div mul Xbegin@ add def
+ /Y@\the\pst@count@i\space \the\pst@count@i\space 1 sub Y@length \noexpand\the\pst@count@i\space div mul Ybegin@ add def
+ /X@\the\pst@count@ii\space \the\pst@count@i\space X@length \noexpand\the\pst@count@i\space div mul Xbegin@ add def
+ /Y@\the\pst@count@ii\space \the\pst@count@i\space Y@length \noexpand\the\pst@count@i\space div mul Ybegin@ add def
+ }%
+\ignorespaces}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\def\pst@draw@dipole#1#2#3#4#5{% suggestion by Alain Ristow
+ \psset{dimen=middle,#1}%
+ \if\psk@I@label\@empty\else\psset[pst-circ]{intensity=true}\fi
+ \if\psk@tension@label\@empty\else\psset[pst-circ]{tension=true}\fi
+ \ifx\psk@Dconvention\pst@Dconvention@generator
+ \Pst@Dconventiontrue
+ \else
+ \ifx\psk@Dconvention\pst@Dconvention@receptor\Pst@Dconventionfalse\fi
+ \fi
+ \pcline[arrowscale=1,arrows=-,linestyle=none,fillstyle=none](#2)(#3)
+ \ncput[nrot=:U]{\pnode{dipole@M}}
+ \ifPst@parallel
+ \pcline[arrows=-,linestyle=none,fillstyle=none](#2)(dipole@M)
+ \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@1}}
+ \pcline[arrows=-,linestyle=none,fillstyle=none](#3)(dipole@M)
+ \ncput[npos=\psk@parallel@sep]{\pnode{dipole@@2}}
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@parallel@arm](dipole@@1)(dipole@@2)
+ \ncput[npos=0]{\pnode{dipole@@@1}}
+ \ncput[npos=1]{\pnode{dipole@@@2}}
+ \ncput[nrot=:U]{\ifPst@mathlabel$\pst@labelstyle#5$\else\pst@labelstyle#5\fi}
+ \pcline[arrows=-](dipole@@1)(dipole@@@1)
+ \pcline[arrows=-](dipole@@@1)(dipole@1)
+ \pcline[arrows=-](dipole@2)(dipole@@@2)
+ \pcline[arrows=-](dipole@@@2)(dipole@@2)
+ \ifPst@parallel@node
+ \pscircle*(dipole@@1){2\pslinewidth}
+ \pscircle*(dipole@@2){2\pslinewidth}
+ \fi
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](dipole@@@1)(dipole@@@2)
+ \ncput[nrot=\psk@label@angle]{\ifPst@mathlabel$\pst@labelstyle#4$\else\pst@labelstyle#4\fi}
+ \pst@intensity{dipole@@@1}{dipole@@@2}
+ \pst@tension{dipole@@@1}{dipole@@@2}
+ \else
+ \ncput[nrot=:U]{\ifPst@mathlabel$\pst@labelstyle#5$\else\pst@labelstyle#5\fi}
+ \pcline[arrowscale=1,arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](#2)(#3)
+ \ncput[nrot=\psk@label@angle]{\ifPst@mathlabel$\pst@labelstyle#4$\else\pst@labelstyle#4\fi}
+%%%%%
+ \ifPst@inputarrow
+ \ifx\psk@Dinput\pst@Dinput@right
+ \pcline[fillstyle=none,arrows=-C](#2)(dipole@1)
+ \pcline[fillstyle=none,arrows=->,arrowinset=0](#3)(dipole@2)
+ \else
+ \pcline[fillstyle=none,arrows=->,arrowinset=0](#2)(dipole@1)
+ \pcline[fillstyle=none,arrows=C-](dipole@2)(#3)
+ \fi
+ \else
+ \pcline[arrowscale=1,fillstyle=none,arrows=-C](#2)(dipole@1)
+ \pcline[arrowscale=1,fillstyle=none,arrows=C-](dipole@2)(#3)
+ \fi
+ \pcline[fillstyle=none,linestyle=none](#2)(#3)
+%%%%%
+ \pst@intensity{#2}{#3}
+ \pst@tension{#2}{#3}
+ \fi%
+}%
+%
+\def\pst@intensity#1#2{%
+ \ifPst@intensity
+ \ifPst@directconvention
+ \pcline[arrows=-,linestyle=none,fillstyle=none](#1)(dipole@1)
+ \ncput[nrot=:U]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#1)(dipole@1)
+ \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label}
+ \else
+ \pcline[arrows=-,linestyle=none,fillstyle=none](dipole@2)(#2)
+ \ncput[nrot=:U]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width,arrowinset=0]{<-}(-.1,0)(.1,0)}
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@I@label@offset](dipole@2)(#2)
+ \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label}
+ \fi
+ \fi
+}
+%
+\def\pst@tension#1#2{%
+ \ifPst@tension
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@tension@offset](#1)(dipole@1)
+ \ncput[npos=.5]{\pnode{tension@1}}
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=-\psk@tension@offset](#2)(dipole@2)
+ \ncput[npos=.5]{\pnode{tension@2}}
+ \ifPst@directconvention
+ \ifPst@Dconvention
+ \ifnum\psk@tension@style=1
+ \pcline[linestyle=none](tension@1)(tension@2)
+ \ncput[npos=0.25]{$-$}\ncput[npos=0.75]{$+$}%
+ \else
+ \pcline[linecolor=\psk@tension@color,linewidth=\psk@tension@width,arrowinset=0]{<-}(tension@1)(tension@2)
+ \fi
+ \else
+ \ifnum\psk@tension@style=1
+ \pcline[linestyle=none](tension@1)(tension@2)
+ \ncput[npos=0.25]{$+$}\ncput[npos=0.75]{$-$}%
+ \else
+ \pcline[linecolor=\psk@tension@color,linewidth=\psk@tension@width,arrowinset=0]{->}(tension@1)(tension@2)
+ \fi
+ \fi
+ \else
+ \ifPst@Dconvention
+ \ifnum\psk@tension@style=1
+ \pcline[linestyle=none](tension@1)(tension@2)
+ \ncput[npos=0.25]{$-$}\ncput[npos=0.75]{$+$}%
+ \else
+ \pcline[linecolor=\psk@tension@color,linewidth=\psk@tension@width,arrowinset=0]{->}(tension@1)(tension@2)
+ \fi
+ \else
+ \ifnum\psk@tension@style=1
+ \pcline[linestyle=none](tension@1)(tension@2)
+ \ncput[npos=0.25]{$+$}\ncput[npos=0.75]{$-$}%
+ \else
+ \pcline[linecolor=\psk@tension@color,linewidth=\psk@tension@width,arrowinset=0]{<-}(tension@1)(tension@2)
+ \fi
+ \fi
+ \fi
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@tension@label@offset](dipole@1)(dipole@2)
+ \ncput[nrot=\psk@label@angle]{\csname\psk@tension@labelcolor\endcsname\psk@tension@label}
+ \fi
+}
+%
+\def\pst@draw@resistor{%
+ \ifx\psk@Dstyle\pst@Dstyle@zigzag
+ \pnode(-0.75,0){dipole@1}
+ \pnode(0.75,0){dipole@2}
+ \multips(-0.75,0)(0.5,0){3}{%
+ \psline[arrows=-,linewidth=1.5\pslinewidth]%
+ (0,0)(0.125,0.25)(0.375,-0.25)(0.5,0)}%
+ \else
+ \pnode(-0.5,0){dipole@1}\pnode(0.5,0){dipole@2}
+ \psframe[linewidth=1.5\pslinewidth](-0.5,-0.25)(0.5,0.25)
+ \fi
+ \ifPst@variable\psline{->}(-0.5,-0.55)(0.5,0.55)\fi
+ \ifx\psk@Dstyle\pst@Dstyle@varistor
+ \psline[linewidth=0.8pt](-0.75,-0.55)(-0.5,-0.55)(0.5,0.55)%
+ \fi
+}
+%
+\def\pst@draw@RFLine{%
+ \pnode(-1.5,0){dipole@1} \pnode(1.5,0){dipole@2}
+ \pscustom[arrows=-]{%
+ \psellipticarcn(-0.8,0)(0.2,0.3){90}{-90}
+ \psline(-0.8,-.3)(0.8,-.3)
+ \psellipticarc(0.8,0)(0.2,0.3){-90}{90}
+ \psline(-0.8,.3)(0.8,.3)}
+ \psellipse(-0.8,0)(0.2,0.3)
+ \pcline[arrows=-](dipole@1)(-0.8,0)\pcline[arrows=-](dipole@2)(1,0)}
+%
+% pd start ====================================================
+\def\pst@draw@dashpot{%
+ \pnode(0,0){dipole@1}%
+ \pnode(0.5,0){dipole@2}%
+ \psline[linewidth=1.5\pslinewidth]%
+ (-0.5,-0.5)(0.5,-0.5)(0.5,0.5)(-0.5,0.5)%
+ \psline[linewidth=1.5\pslinewidth](0,-0.4)(0,0.4)%
+}
+% pd end ======================================================
+\def\pst@draw@capacitor{%
+ \bgroup
+ \psset{linewidth=1.5\pslinewidth}%
+ \ifx\psk@Dstyle\pst@Dstyle@chemical
+ \psline[arrows=-](-0.2,-0.5)(-0.2,0.5)
+ \psarc[arrows=-](1.1875,0){1.0625}{154.8}{205.2}
+ \pnode(-0.2,0){dipole@1}
+ \pnode(0.125,0){dipole@2}
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@elektorchemical
+ \psframe[framearc=0.01,dimen=outer](-0.2284123,0.2743733)(-0.0557103,-0.2743733)
+ \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](0.0557103,0.2743733)(0.2284123,-0.2743733)
+ \pnode(-0.2284123,0){dipole@1}
+ \pnode(0.2284123,0){dipole@2}
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@elektor
+ \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](-0.2284123,0.2743733)(-0.0557103,-0.2743733)
+ \psframe[framearc=0.01,dimen=outer,fillstyle=solid,fillcolor=black](0.0557103,0.2743733)(0.2284123,-0.2743733)
+ \pnode(-0.2284123,0){dipole@1}
+ \pnode(0.2284123,0){dipole@2}
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@crystal
+ \psline[arrows=-](-0.3,-0.4)(-0.3,0.4)
+ \psline[arrows=-](0.3,-0.4)(0.3,0.4)
+ \psframe(-0.2,-0.5)(0.2,0.5)
+ \pnode(-0.3,0){dipole@1}
+ \pnode(0.3,0){dipole@2}
+ \else
+ \psline[arrows=-](-0.2,-0.5)(-0.2,0.5)
+ \psline[arrows=-](0.2,-0.5)(0.2,0.5)
+ \pnode(-0.2,0){dipole@1}
+ \pnode(0.2,0){dipole@2}
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifPst@variable%
+ \psline[arrows=->](-0.5,-0.55)(0.5,0.55)%
+ \fi
+ \egroup
+}
+%
+\def\pst@draw@OA{%
+ \ifx\psk@tripole@style\pst@tripole@style@french
+ \psframe[linewidth=1.5\pslinewidth](-1,-0.75)(1,0.75)
+ \pspolygon(-0.4,-0.2)(-0.4,0.2)(-0.05,0)
+ \else
+% USUAL AOP
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-1,-1)(-1,1)(1,0)(-1,-1)
+ %\pspolygon[arrows=-](-1,-0.75)(-1,0.75)(1,0)(-1,-0.75)
+
+% Supply pins Position
+ \ifPst@OApower
+ \psline{-}(0,0.5)(0,0.75)%\uput[90](0,1){$+$}
+ %\psline{-o}(0,0.375)(0,0.75)\uput[90](0,0.75){$+$}
+ \psline{-}(0,-0.5)(0,-0.75)%\uput[-90](0,-1){$-$}
+ %\psline{-o}(0,-0.375)(0,-0.75)\uput[-90](0,-0.75){$-$}
+ \fi
+ \fi
+% Input Pins Position
+ \pnode(-1,0.5){\ifPst@OAinvert Minus@\else Plus@\fi}
+ \pnode(-1,-0.5){\ifPst@OAinvert Plus@\else Minus@\fi}
+ \pnode(1,0){S@}
+% + and - Position
+ \uput{0.1}[0](-1,0.5){\ifPst@OAinvert$-$\else$+$\fi}
+ %\uput{0.1}[0](-1,0.25){\ifPst@OAinvert$-$\else$+$\fi}
+ \uput{0.1}[0](-1,-0.5){\ifPst@OAinvert$+$\else$-$\fi}
+ %\uput{0.1}[0](-1,-0.25){\ifPst@OAinvert$+$\else$-$\fi}
+ \ifPst@OAperfect\rput(0.25,0){$\infty$}\fi%
+}
+%
+\def\pst@draw@coil{%
+ \ifx\psk@Dstyle\pst@Dstyle@curved
+ \pscurve[arrows=-](-0.7,0)(-0.6,0.3)(-0.35,0)(-0.4,-0.2)%
+ (-0.5,0)(-0.4,0.3)(-0.15,0)(-0.2,-0.2)(-0.3,0)%
+ (-0.2,0.3)(0.05,0)(0,-0.2)(-0.1,0)%
+ (0,0.3)(0.25,0)(0.2,-0.2)(0.1,0)%
+ (0.2,0.3)(0.45,0)(0.4,-0.2)(0.3,0)%
+ (0.4,0.3)(0.65,0)(0.6,-0.2)(0.5,0)%
+ \pnode(-0.7,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@elektor
+ \psarcn[arrows=c-](-0.3885794,0){0.1295265}{-180}{0}
+ \psarcn[arrows=-](-0.1295265,0){0.1295265}{-180}{0}
+ \psarcn[arrows=-](0.1295265,0){0.1295265}{-180}{0}
+ \psarcn[arrows=-c](0.3885794,0){0.1295265}{-180}{0}
+ \pnode(-0.5181058,0){dipole@1}
+ \pnode(0.5181058,0){dipole@2}
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@elektorcurved
+ \psarcn[arrows=c-c](-0.408167,0.089453){0.211665}{-155}{-410}
+ \psarcn[arrows=-c](-0.136056,0.089453){0.211665}{-130}{-410}
+ \psarcn[arrows=-c](0.136055,0.089453){0.211665}{-130}{-410}
+ \psarcn[arrows=-c](0.408167,0.089453){0.211665}{-130}{-385}
+ \pnode(-0.6,0){dipole@1}
+ \pnode(0.6,0){dipole@2}
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@rectangle
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \psframe[linewidth=1.5\pslinewidth,fillstyle=solid,fillcolor=black](-0.5,-0.25)(0.5,0.25)
+ \else
+ \pscurve[arrows=-,linewidth=1.5\pslinewidth](-1,0)(-0.75,0.5)(-0.5,0)
+ \pscurve[arrows=-,linewidth=1.5\pslinewidth](-0.5,0)(-0.25,0.5)(0,0)
+ \pscurve[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.25,0.5)(0.5,0)
+ \pscurve[arrows=-,linewidth=1.5\pslinewidth](0.5,0)(0.75,0.5)(1,0)
+ \pnode(-1,0){dipole@1}
+ \pnode(1,0){dipole@2}
+ \fi\fi\fi\fi%
+ \ifPst@variable\psline{->}(-0.75,-0.5)(0.75,0.5)\fi%
+ }
+%
+\def\pst@draw@Ucc{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \ifx\psk@Dstyle\pst@Dstyle@diamond
+ \pspolygon[linewidth=1.5\pslinewidth](-0.5,0)(0,0.5)(0.5,0)(0,-0.5)
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@diamondCei
+ \pspolygon[linewidth=1.5\pslinewidth](-0.5,0)(0,0.5)(0.5,0)(0,-0.5)
+ \psline[linewidth=1.5\pslinewidth](-0.5,0)(0.5,0)
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@normalCei
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \psline[linewidth=1.5\pslinewidth](-0.5,0)(0.5,0)
+ \else
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \fi
+ \fi
+ \fi
+ \ifcase\psk@labelInside\or% do nothing
+ \psline[arrows=-,linewidth=2\pslinewidth]{->}(-0.35,0)(0.35,0)\or% case 1
+ \uput{0.1}[0]{90}(-0.5,0){$-$}% case 2
+ \uput{0.1}[0]{90}(0,0){$+$}\or% case 3
+ \rput(0,0){\large\bf =}
+ \fi
+}
+%
+\def\pst@draw@Icc{%
+ \ifx\psk@Dstyle\pst@Dstyle@twoCircles
+ \pnode(-0.7,0){dipole@1}
+ \pnode(0.7,0){dipole@2}
+ \pscircle[linewidth=1.5\pslinewidth](-0.175,0){0.5}
+ \pscircle[linewidth=1.5\pslinewidth](0.175,0){0.5}
+ \else
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \ifx\psk@Dstyle\pst@Dstyle@diamond
+ \pspolygon[linewidth=1.5\pslinewidth](-0.5,0)(0,0.5)(0.5,0)(0,-0.5)
+ \else
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \fi
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.5)(0,0.5)
+ \fi%
+}
+%
+\def\pst@draw@switch{%
+ \ifx\psk@Dstyle\pst@Dstyle@close
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \qdisk(-0.5,0){1.5pt}
+ \qdisk(0.5,0){1.5pt}
+ \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0.05)(0.5,0.05)
+ \else
+ \pnode(-0.55,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0.5,0.5)
+ \psarcn[arrowinset=0]{->}(-0.5,0){0.75}{45}{-45}
+ \pscircle[fillstyle=solid](-0.5,0){0.07}
+ \qdisk(0.5,0){1.5pt}
+ \fi
+}
+%
+\def\pst@draw@diode{%
+ \ifx\psk@Dstyle\pst@Dstyle@triac
+ \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0)(0.25,-0.2)
+ \pspolygon[linewidth=1.5\pslinewidth](0.25,0)(-0.25,0.2)(0.25,0.4)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0.4)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,-0.4)(0.25,0.4)
+ \psline[arrows=-,linewidth=\pslinewidth](0.25,-0.2)(0.5,-0.3)(0.5,-0.6)
+ \else%
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0)
+ \ifx\psk@Dstyle\pst@Dstyle@schottky
+ \psline[linewidth=1.1\pslinewidth](0.4,0.2)(0.4,0.3)(0.3,0.3)(0.3,-0.3)(0.2,-0.3)(0.2,-0.2)
+ \else
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.2)(0.25,-0.2)% for all following
+ \fi
+ \ifx\psk@Dstyle\pst@Dstyle@thyristor
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35)
+ \fi%
+ \ifx\psk@Dstyle\pst@Dstyle@GTO
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.1,-0.12)(-0.1,-0.35)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35)
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@photo
+ \multips(-0.15,0.3)(0.25,0){2}{\psline[arrows=<-](0.25,0.22)}%
+ \fi%
+ \fi%
+ \fi%
+ \pnode(-0.25,0){dipole@1}%
+ \pnode(0.25,0){dipole@2}%
+}
+%
+\def\pst@draw@Zener{%
+ \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0)
+ \ifx\psk@Dstyle\pst@Dstyle@Z
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.35)(0.25,0.25)(0.25,-0.25)(0.4,-0.35)
+ \else
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.25)(0.25,-0.25)(0,-0.25)
+ \fi
+ \pnode(-0.25,0){dipole@1}
+ \pnode(0.25,0){dipole@2}
+}
+%
+%-------------------mla change
+\def\pst@draw@Suppressor{%
+ \pspolygon[linewidth=1.5\pslinewidth](-0.5,-0.2)(-0.5,0.2)(0.0,0.0)
+ \pspolygon[linewidth=1.5\pslinewidth](0.5,-0.2)(0.5,0.2)(0.0,0.0)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.5,0.0)(0.5,0.0)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.15,0.35)(0.0,0.25)(0.0,-0.25)(0.15,-0.35)
+% \ifx\psk@Dstyle\pst@Dstyle@Z
+% \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.35)(0.25,0.25)(0.25,-0.25)(0.4,-0.35)
+% \else
+% \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.25)(0.25,-0.25)(0,-0.25)
+% \fi
+ \pnode(-0.5,0.0){dipole@1}
+ \pnode(0.50,0.0){dipole@2}
+}
+\def\pst@draw@Arrestor{%
+ \pscircle[linewidth=1.5\pslinewidth](0.0,0.0){0.3}
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.1,-0.12)(-0.1,0.12)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,-0.12)(0.1,0.12)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.12)(0.0,0.3)
+% \ifx\psk@Dstyle\pst@Dstyle@Z
+% \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.35)(0.25,0.25)(0.25,-0.25)(0.4,-0.35)
+% \else
+% \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.25)(0.25,-0.25)(0,-0.25)
+% \fi
+ \pnode(-0.3,0.0){dipole@1}
+ \pnode(0.3,0.0){dipole@2}
+}
+%
+\def\pst@draw@RelayNOP{%
+% \pscircle[linewidth=1.5\pslinewidth](0.0,0.0){0.3}
+ \psframe[arrows=-,linewidth=1.5\pslinewidth](-0.2,0.5)(0.2,1.3)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.2,1.3)(0.2,0.5)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.2,0.9)(-0.5,0.9)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.2,0.9)(0.5,0.9)
+%
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.5,0.0)(-0.2,0.0)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.2,0.0)(0.2,0.1)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.2,0.0)(0.5,0.0)
+ \psline[linestyle=dashed,arrows=-,linewidth=1.5\pslinewidth](0.0,0.5)(0.0,0.1)
+% \ifx\psk@Dstyle\pst@Dstyle@Z
+% \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.35)(0.25,0.25)(0.25,-0.25)(0.4,-0.35)
+% \else
+% \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.25)(0.25,-0.25)(0,-0.25)
+% \fi
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+}
+%%%----------------------mla change end
+\def\pst@draw@lamp{%
+ \pscircle[linewidth=1.5\pslinewidth]{0.5}
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.5;45)(0.5;225)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.5;135)(0.5;315)
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+}
+%
+\def\pst@draw@circledipole{%
+ \pscircle[linewidth=1.5\pslinewidth]{\psk@radius}
+ \pnode(-\psk@radius,0){dipole@1}
+ \pnode(\psk@radius,0){dipole@2}
+}
+%
+\def\pst@draw@LED{%
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.2)(-0.25,0.2)(0.25,0)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.2)(0.25,-0.2)
+ \pnode(-0.25,0){dipole@1}
+ \pnode(0.25,0){dipole@2}
+ \multips(-0.25,0.3)(0.25,0){3}{\psline[arrows=->](0.25,0.22)}%
+}
+%
+\def\pst@draw@OpenDipol{%
+ \pscircle(-0.5,0){\psk@radius}
+ \pscircle(0.5,0){\psk@radius}
+ \pst@getlength{\psk@radius}\pst@tempA
+ \pnode(!-0.5 \pst@tempA\space \pst@number\psxunit div sub 0){dipole@1}
+ \pnode(! 0.5 \pst@tempA\space \pst@number\psxunit div add 0){dipole@2}
+}
+%
+\def\pst@draw@OpenTripol{%
+ \pst@getlength{\psk@radius}\pst@tempA
+ \pscircle(0.65,0){\psk@radius}
+ \pscircle(-0.65,0){\psk@radius}
+ \pscircle(0,0){\psk@radius}
+ \psline(!0 \pst@tempA\space \pst@number\psxunit div neg)(0,-5mm)
+ \psline(-2mm,-5mm)(2mm,-5mm)
+ \pnode(!-0.65 \pst@tempA\space \pst@number\psxunit div sub 0){dipole@1}
+ \pnode(! 0.65 \pst@tempA\space \pst@number\psxunit div add 0){dipole@2}
+}
+%
+\def\pst@draw@Tswitch{%
+ \ifx\psk@tripole@style\pst@tripole@style@right
+ \psline[arrows=-,linewidth=2\pslinewidth](0.5,0)(0,-1)
+ \psarcn[arrowinset=0]{<-}(0,-1){0.75}{135}{45}
+ \else
+ \ifx\psk@tripole@style\pst@tripole@style@left
+ \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0,-1)
+ \psarcn[arrowinset=0]{->}(0,-1){0.75}{135}{45}
+ \else
+ \psline[arrows=-,linewidth=2\pslinewidth](0,0.1)(0,-1)
+ \psarcn[linewidth=1pt,arrowinset=0]{<->}(0,-1){0.75}{135}{45}
+ \fi
+ \fi
+ \qdisk(-0.5,0){1.5pt}
+ \qdisk(0.5,0){1.5pt}
+ \pscircle[fillstyle=solid](0,-1){0.07}
+ \pnode(-0.5,0){Tswi@left}
+ \pnode(0.5,0){Tswi@right}
+ \pnode(0,-1.05){Tswi@center}
+}
+%
+\def\pst@draw@transformer{
+ \ifx\psk@Dstyle\pst@Dstyle@rectangle
+ \psframe[fillstyle=solid,fillcolor=black](-0.7,-0.75)(-0.2,0.75)
+ \psframe[fillstyle=solid,fillcolor=black](0.7,-0.75)(0.2,0.75)
+ \psline[arrows=-,linewidth=0.1cm](0,-0.75)(0,0.75)
+ \pnode(-0.5,0.75){inup@}
+ \pnode(-0.5,-0.75){indown@}
+ \else
+ \pscurve[arrows=-](-0.5,0.9)(-0.2,0.8)(-0.5,0.7)(-0.7,0.8)(-0.5,0.82)(-0.2,0.6)
+ (-0.5,0.5)(-0.7,0.6)(-0.5,0.62)(-0.2,0.4)
+ (-0.5,0.3)(-0.7,0.4)(-0.5,0.42)(-0.2,0.2)
+ (-0.5,0.1)(-0.7,0.2)(-0.5,0.22)(-0.2,0)
+ (-0.5,-0.1)(-0.7,0)(-0.5,0.02)(-0.2,-0.2)
+ (-0.5,-0.3)(-0.7,-0.2)(-0.5,-0.18)(-0.2,-0.4)
+ (-0.5,-0.5)(-0.7,-0.4)(-0.5,-0.38)(-0.2,-0.6)
+ (-0.5,-0.7)(-0.7,-0.6)(-0.5,-0.58)(-.2,-0.8)(-0.5,-0.9)
+ \pscurve[arrows=-](0.5,0.7)(0.2,0.6)(0.5,0.5)(0.7,0.6)(0.5,0.62)
+ (0.2,0.4)(0.5,0.3)(0.7,0.4)(0.5,0.42)
+ (0.2,0.2)(0.5,0.1)(0.7,0.2)(0.5,0.22)
+ (0.2,0.)(0.5,-0.1)(0.7,0)(0.5,0.02)
+ (0.2,-0.2)(0.5,-0.3)(0.7,-0.2)(0.5,-0.18)
+ (0.2,-0.4)(0.5,-0.5)(0.7,-0.4)(0.5,-0.38)
+ (0.2,-0.6)(0.5,-0.7)
+ \psline[arrows=-](-0.1,0.7)(-0.1,-0.7)
+ \psline[arrows=-](0,0.7)(0,-0.7)
+ \psline[arrows=-](0.1,0.7)(0.1,-0.7)
+ \pnode(-0.5,0.9){inup@}
+ \pnode(-0.5,-0.9){indown@}
+ \fi
+ \pnode(0.5,-0.7){outdown@}
+ \pnode(0.5,0.7){outup@}
+}
+% start hv 2003-07-23
+\def\pst@draw@optoCoupler{%
+% diode
+ \pspolygon[linewidth=1.5\pslinewidth](-0.5,-0.25)(-0.7,0.25)(-0.3,0.25)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.7,-0.25)(-0.3,-0.25)
+ \psline{->}(-0.2,0.2)(0,0.1)
+ \psline{->}(-0.2,0)(0,-0.1)
+% transistor
+ \psline[arrows=-,linewidth=4\pslinewidth](0.25,-0.3)(0.25,0.3)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0)(0.75,0.5)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0)(0.75,-0.5)
+ \pnode(0.75,-0.5){d@1}
+ \pnode(0.25,0){d@2}
+ \ifx\psk@Ttype\pst@Ttype@PNP
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{d@1}{d@2}
+ \else
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{d@2}{d@1}
+ \fi
+ \ncput[nrot=:U]{\psline[arrowinset=0,arrowscale=2]{->}(0,0)(.2,0)}
+ \pnode(-0.5,0.25){inup@}
+ \pnode(-0.5,-0.25){indown@}
+ \pnode(0.75,-0.5){outdown@}
+ \pnode(0.75,0.5){outup@}
+}
+%
+\def\pst@draw@logic[#1]{\@ifnextchar({\pst@draw@logici[#1]}{\pst@draw@logici[#1](0,0)}}
+%
+\def\pst@draw@logici[#1](#2)#3{{%
+ \psset{#1}%
+ \rput[lb](#2){%
+ \psframe[linewidth=2\pslinewidth](0,0)(\psk@logic@width,\psk@logic@height)%
+ }
+ \pst@getcoor{#2}\pst@tempa
+ \ifPst@logicChangeLR\def\logic@LR{true}\else\def\logic@LR{false}\fi
+ \pstVerb{
+ /YA \pst@tempa exch pop \pst@number\psyunit div def
+ /YB YA \psk@logic@height\space add def
+ \logic@LR {%
+ /XB \pst@tempa pop \pst@number\psxunit div def
+ /XA XB \psk@logic@width\space add def
+ }{%
+ /XA \pst@tempa pop \pst@number\psxunit div def
+ /XB XA \psk@logic@width\space add def
+ } ifelse
+ /dy YB YA sub def
+ }
+ \ifx\psk@logic@type\pst@logic@type@RS%---------------- RS -----------------
+ \pnode(! XA YA dy 4 div add){#3S}
+ \pnode(! XA YA dy 4 div 3 mul add){#3R}
+ \psline(#3R)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add)
+ \psline(#3S)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div add)
+ \uput[\ifPst@logicChangeLR 180\else 0\fi](#3R){\psk@logic@nodestyle R}
+ \uput[\ifPst@logicChangeLR 180\else 0\fi](#3S){\psk@logic@nodestyle S}
+ \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg}
+ \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1}
+ \pnode(! XB YA dy 4 div 3 mul add){#3Q}
+ \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add)
+ \psline(#3Qneg)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div add)
+ \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q}
+ \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$}
+ \ifPst@logicShowDot
+ \qdisk(! XA \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add){3pt}
+ \qdisk(! XA \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YA dy 4 div add){3pt}
+ \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt}
+ \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt}
+ \fi
+ \rput[b](!%
+ /dx XB XA sub 2 div def
+ XA dx add YA 0.1 add){\if$\psk@logic@labelstyle$\else\psk@logic@labelstyle#3\fi}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@D%---------------- D -----------------
+ \pnode(! XA YA dy 2 div add){#3C}
+ \pnode(! XA YA dy 4 div 3 mul add){#3D}
+ \psline(#3D)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add)
+ \psline(#3C)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add)
+ \psline[linewidth=0.5pt](! XA YA dy 2 div add 0.15 add)
+ (! XA 0.4 \logic@LR {sub}{add} ifelse YA dy 2 div add)(! XA YA dy 2 div add 0.15 sub)
+ \uput[\ifPst@logicChangeLR 180\else 0\fi](#3D){\psk@logic@nodestyle D}
+ \uput{0.5}[\ifPst@logicChangeLR 180\else 0\fi](#3C){\psk@logic@nodestyle C}
+ \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg}
+ \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1}
+ \pnode(! XB YA dy 4 div 3 mul add){#3Q}
+ \psline(#3Q)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add)
+ \psline(#3Qneg)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add)
+ \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q}
+ \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$}
+ \ifPst@logicShowDot
+ \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 4 div 3 mul add){3pt}
+ \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add){3pt}
+ \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt}
+ \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt}
+ \fi
+ \rput[b](!%
+ /dx XB XA sub 2 div def
+ XA dx add YA 0.1 add){\if$\psk@logic@labelstyle$\else\psk@logic@labelstyle#3\fi}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@JK%---------------- JK -----------------
+ \multido{\n=1+1}{\psk@logic@JInput}{%
+ \pnode(!%
+ /Step dy 2 div \psk@logic@JInput\space div def
+ /yNew Step \n\space mul def
+ XA YA yNew add Step 2 div sub){#3J\n}
+ \pst@getcoor{#3J\n}\pst@tempc
+ \uput[\ifPst@logicChangeLR 180\else 0\fi](#3J\n){\psk@logic@nodestyle J\n}
+ \pnode(!
+ /YC \pst@tempc exch pop \pst@number\psyunit div def
+ /XC \pst@tempc pop \pst@number\psxunit div def
+ XC 0.5 \logic@LR {add}{sub} ifelse YC){tempJ\n}
+ \psline(#3J\n)(tempJ\n)% input
+ \ifPst@logicShowDot
+ \qdisk(tempJ\n){3pt}
+ \fi
+ }
+ \multido{\n=1+1}{\psk@logic@KInput}{%
+ \pnode(!%
+ /Step dy 2 div \psk@logic@KInput\space div def
+ /yNew Step \n\space mul def
+ XA YB yNew sub Step 2 div add){#3K\n}
+ \pst@getcoor{#3K\n}\pst@tempc
+ \uput[\ifPst@logicChangeLR 180\else 0\fi](#3K\n){\psk@logic@nodestyle K\n}
+ \pnode(!
+ /YC \pst@tempc exch pop \pst@number\psyunit div def
+ /XC \pst@tempc pop \pst@number\psxunit div def
+ XC 0.5 \logic@LR {add}{sub} ifelse YC){tempK\n}
+ \psline(#3K\n)(tempK\n)% input
+ \ifPst@logicShowDot
+ \qdisk(tempK\n){3pt}
+ \fi
+ }
+ \psline[linewidth=0.5pt](! XA YA dy 2 div add 0.15 add)
+ (! XA 0.4 \logic@LR {sub}{add} ifelse YA dy 2 div add)(! XA YA dy 2 div add 0.15 sub)
+ \pnode(! XA YA dy 2 div add){#3C}
+ \psline(#3C)(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add)
+ \uput{0.5}[\ifPst@logicChangeLR 180\else 0\fi](#3C){\psk@logic@nodestyle C}
+ \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 4 div add){#3Qneg}
+ \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 4 div add){0.1}
+ \pnode(! XB YA dy 4 div 3 mul add){#3Q}
+ \psline(#3Q)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add)
+ \psline(#3Qneg)(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add)
+ \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q}
+ \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Qneg){\psk@logic@nodestyle $\mathrm{\overline{Q}}$}
+ \ifPst@logicShowDot
+ \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div 3 mul add){3pt}
+ \qdisk(! XB 0.5 \logic@LR {sub}{add} ifelse YA dy 4 div add){3pt}
+ \qdisk(! XA 0.5 \logic@LR {add}{sub} ifelse YA dy 2 div add){3pt}
+ \fi
+ \rput[b](!%
+ /dx XB XA sub 2 div def
+ XA dx add YA 0.1 add){\if$\psk@logic@labelstyle$\else\psk@logic@labelstyle#3\fi}
+ \else%---------------- default AND/NAND/OR/NOR/NOT/EXOR/ENOR -----------------
+ \ifx\psk@logic@type\pst@logic@type@not \def\@nMax{1}\else \def\@nMax{\psk@logic@nInput}\fi
+ \multido{\n=1+1}{\@nMax}{%
+ \pnode(!%
+ /Step dy \psk@logic@nInput\space div def
+ /yNew Step \n\space mul def
+ XA YA yNew add \@nMax\space 1 gt {Step 2 div sub} if){#3\n}
+ \pst@getcoor{#3\n}\pst@tempc
+ \pnode(!
+ /YC \pst@tempc exch pop \pst@number\psyunit div def
+ /XC \pst@tempc pop \pst@number\psxunit div def
+ XC \psk@logic@wireLength\space \logic@LR {add}{sub} ifelse YC){temp#3\n}
+ \expandafter\psline\expandafter(#3\n)(temp#3\n)% input
+ \ifPst@logicShowDot \qdisk(temp#3\n){3pt}\fi
+ \ifPst@logicShowNode
+ \uput[\ifPst@logicChangeLR 180\else 0\fi](#3\n){\psk@logic@nodestyle\n}
+ \fi
+ }
+ \ifx\psk@logic@type\pst@logic@type@not\else
+ \ifx\psk@logic@type\pst@logic@type@nand\else
+ \ifx\psk@logic@type\pst@logic@type@nor\else
+ \ifx\psk@logic@type\pst@logic@type@exnor\else
+ \pnode(! XB YA dy 2 div add){#3Q}
+ \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add)% output
+ \ifPst@logicShowDot
+ \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add){3pt}
+ \fi
+ \ifPst@logicShowNode
+ \uput[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifx\psk@logic@type\pst@logic@type@and\else% NotX output
+ \ifx\psk@logic@type\pst@logic@type@or\else
+ \ifx\psk@logic@type\pst@logic@type@exor\else
+ \pnode(! XB 0.2 \logic@LR {sub}{add} ifelse YA dy 2 div add){#3Q}
+ \pscircle[linewidth=0.5pt](! XB 0.1 \logic@LR {sub}{add} ifelse YA dy 2 div add){0.1}
+ \psline(#3Q)(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add)% output
+ \ifPst@logicShowDot
+ \qdisk(! XB \psk@logic@wireLength\space \logic@LR {sub}{add} ifelse YA dy 2 div add){3pt}
+ \fi
+ \ifPst@logicShowNode
+ \uput{0.4}[\ifPst@logicChangeLR 0\else 180\fi](#3Q){\psk@logic@nodestyle Q}
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifx\psk@logic@type\pst@logic@type@or
+ \def\logic@type{$\ge\kern-5pt 1$}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@not
+ \def\logic@type{1}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@nand
+ \def\logic@type{\&}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@nor
+ \def\logic@type{$\ge\kern-5pt 1$}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@exor
+ \def\logic@type{=1}
+ \else
+ \ifx\psk@logic@type\pst@logic@type@exnor
+ \def\logic@type{=}
+ \else
+ \def\logic@type{\&}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \rput(!%
+ /dx XB XA sub \psk@logic@symbolpos\space mul def
+ XA dx add YB 0.3 sub){\if$\psk@logic@symbolstyle$\else\psk@logic@symbolstyle\textbf{\logic@type}\fi}
+ \rput[b](!%
+ /dx XB XA sub 2 div def
+ XA dx add YA 0.1 add){\if$\psk@logic@labelstyle$\else\psk@logic@labelstyle#3\fi}
+ \fi
+ \fi
+ \fi% end of no special RS/JK/D
+}\ignorespaces}
+%
+% end hv 2003-07-28
+%
+\def\pst@draw@wire[#1](#2)(#3){{%
+ \psset{#1}
+ \ifx\psk@I@label\@empty\else\psset{intensity=true}\fi
+ \ifx\psk@Dconvention\pst@Dconvention@generator
+ \Pst@Dconventiontrue
+ \else\ifx\psk@Dconvention\pst@Dconvention@receptor\Pst@Dconventionfalse\fi
+ \fi
+ \bgroup
+ \pnode(#2){Inter@1}
+ \pnode(#3){Inter@2}
+ \psset{arrows=-}
+ \ifPst@wire@intersect
+ \rput(!
+ /N@Inter@1 GetNode /N@Inter@2 GetNode /N@\psk@wire@intersectA\space
+ GetNode /N@\psk@wire@intersectB\space GetNode InterLines
+ \pst@number\psyunit div exch \pst@number\psxunit div exch){\pnode{@M}}%
+ \ncline[linestyle=none,fillstyle=none]{Inter@1}{@M}
+ \ncput[nrot=:U,npos=.85]{\pnode{@M1}}
+ \ncline[linestyle=none,fillstyle=none]{@M}{Inter@2}
+ \ncput[nrot=:U,npos=.15]{\pnode{@M2}}
+ \psline(Inter@1)(@M1)
+ \psline(@M2)(Inter@2)
+ \ncarc[arcangle=90]{@M1}{@M2}
+ \else
+ \pcline(#2)(#3)
+ \ifPst@intensity
+ \ifPst@directconvention
+ \ncput[nrot=:U]{%
+ \psline[linecolor=\psk@I@color,
+ linewidth=\psk@I@width,arrowinset=0]{->}(-.1,0)(.1,0)}
+ \pcline[linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#2)(#3)
+ \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label}
+ \else
+ \ncput[nrot=:U]{%
+ \psline[linecolor=\psk@I@color,linewidth=\psk@I@width]{<-}(-.1,0)(.1,0)}
+ \pcline[linestyle=none,fillstyle=none,offset=\psk@I@label@offset](#2)(#3)
+ \ncput[nrot=\psk@label@angle]{\csname\psk@I@labelcolor\endcsname\psk@I@label}
+ \fi
+ \fi
+ \fi
+ \egroup
+ \ncline[linestyle=none]{Inter@1}{Inter@2}
+}\ignorespaces}
+%
+%
+\def\pst@draw@tension@[#1](#2)(#3)#4{{%
+ \psset{#1}%
+ \pnode(#2){pst@tempa} % hv
+ \pnode(#3){pst@tempb} % hv
+ \ncline[linestyle=none,fillstyle=none]{pst@tempa}{pst@tempb}
+ \ncput[nrot=:U,npos=0.05]{\pnode{@M1}}
+ \ncput[nrot=:U,npos=0.95]{\pnode{@M2}}
+ \ncline[arrowinset=0,linecolor=\psk@tension@color]{->}{@M1}{@M2}
+ \pcline[arrows=-,linestyle=none,fillstyle=none,offset=\psk@label@offset](@M1)(@M2)
+ \ncput[nrot=\psk@label@angle]{\csname\psk@tension@labelcolor\endcsname #4}
+}\ignorespaces}
+%
+\def\node(#1){\pscircle*(#1){2\pslinewidth}}
+%
+%
+%
+\define@boolkey[psset]{pst-circ}[Pst@]{inputarrow}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{programmable}[true]{}
+\define@boolkey[psset]{pst-circ}[Pst@]{connectingdot}[true]{}
+%
+\def\pst@Gstyle@old{old} \def\pst@Gstyle@ads{ads} \def\pst@Gstyle@triangle{triangle}
+\def\pst@Astyle@two{two} \def\pst@Astyle@three{three} \def\pst@Astyle@triangle{triangle}
+\def\pst@LOoutput@left{left} \def\pst@LOoutput@top{top} \def\pst@LOoutput@right{right}
+\def\pst@LOoutput@bottom{bottom} \def\pst@LOstyle@crystal{crystal}\def\pst@Dstyle@lowpass{lowpass}
+\def\pst@Dstyle@highpass{highpass}\def\pst@Dinput@right{right} \def\pst@Dinput@left{left}
+\def\pst@Dstyle@multiplier{multiplier}\def\pst@Dstyle@divider{divider}\def\pst@FMvalue@value{0}
+\def\pst@tripole@style@bottom{bottom}\def\pst@tripole@style@top{top}\def\pst@Tinput@left{left}
+\def\pst@Tinput@right{right} \def\pst@tripole@style@circulator{circulator}
+\def\pst@tripole@style@isolator{isolator}\def\pst@Tconfig@left{left}\def\pst@Tconfig@right{right}
+\def\pst@Qstyle@directional{directional}\def\pst@Qstyle@hybrid{hybrid}\def\pst@Qinput@left{left}
+\def\pst@Qinput@right{right}
+\define@key[psset]{pst-circ}{groundstyle}[ads]{\def\psk@Gstyle{#1}}
+\define@key[psset]{pst-circ}{antennastyle}[two]{\def\psk@Astyle{#1}}
+\define@key[psset]{pst-circ}{output}[top]{\def\psk@LOoutput{#1}}
+\define@key[psset]{pst-circ}{LOstyle}[]{\def\psk@LOstyle{#1}}
+\define@key[psset]{pst-circ}{dipoleinput}[left]{\def\psk@Dinput{#1}}
+\define@key[psset]{pst-circ}{value}[0]{\def\psk@FMvalue{#1}}
+\define@key[psset]{pst-circ}{tripoleinput}[left]{\def\psk@Tinput{#1}}
+\define@key[psset]{pst-circ}{tripoleconfig}[left]{\def\psk@Tconfig{#1}}
+\define@key[psset]{pst-circ}{couplerstyle}[hxbrid]{\def\psk@Qstyle{#1}}
+\define@key[psset]{pst-circ}{quadripoleinput}[left]{\def\psk@Qinput{#1}}
+%
+%
+\psset{groundstyle=ads, antennastyle=two, output=top,%
+ dipoleinput=left, dipolestyle=multiplier, value=0,%
+ dipoleinput=left, inputarrow=false, tripoleinput=left,%
+ tripolestyle=bottom,tripoleconfig=left, quadripoleinput=left,%
+ couplerstyle=hybrid, connectingdot=true, LOstyle={} }
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% monopole
+%%% newground: groundstyle: (ads), old, triangle
+%%% Antenna: antennastyle: (two), three, triangle
+%%% Oscillator: oscioutput: (top), right, bottom, left,
+%%% inputarrow: (false), true
+%%% connectingdot: (true), false
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% newground %%%
+\def\newground{\@ifnextchar[{\pst@newground}{\pst@newground[]}}
+\def\pst@newground[#1]{%
+ \@ifnextchar({\pst@newgroundi[#1]{0}}{\pst@newgroundi[#1]}%
+}
+\def\pst@newgroundi[#1]#2(#3){{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ \ifx\psk@Gstyle\pst@Gstyle@ads
+ \psline[linewidth=1.5\pslinewidth]{c-c}(-0.3,-0.5)(0.3,-0.5)
+ \psline[linewidth=1.5\pslinewidth]{c-c}(-0.2,-0.6)(0.2,-0.6)
+ \psline[linewidth=1.5\pslinewidth]{c-c}(-0.1,-0.7)(0.1,-0.7)
+ \fi
+ \ifx\psk@Gstyle\pst@Gstyle@old
+ \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,-0.5)
+ \fi
+ \ifx\psk@Gstyle\pst@Gstyle@triangle
+ \pstriangle[linewidth=1.5\pslinewidth](0,-0.5)(0.4,-0.4)
+ \fi
+ \psline(0,0)(0,-0.5)
+ \ifPst@connectingdot
+ \pscircle*(0,0){2\pslinewidth}
+ \fi
+ }}%
+ \ignorespaces%
+}
+%
+%%% antenna %%%
+%
+\def\antenna{\@ifnextchar[{\pst@antenna}{\pst@antenna[]}}
+\def\pst@antenna[#1]{%
+ \@ifnextchar({\pst@antennai[#1]{0}}{\pst@antennai[#1]}%
+}
+\def\pst@antennai[#1]#2(#3){{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ \ifx\psk@Astyle\pst@Astyle@two
+ \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25)
+ \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25)
+ \fi
+ \ifx\psk@Astyle\pst@Astyle@three
+ \psline[linewidth=1.5\pslinewidth](0,.75)(-0.2,1.25)
+ \psline[linewidth=1.5\pslinewidth](0,.75)(0,1.25)
+ \psline[linewidth=1.5\pslinewidth](0,.75)(0.2,1.25)
+ \fi
+ \ifx\psk@Astyle\pst@Astyle@triangle
+ \pstriangle[linewidth=1.5\pslinewidth](0,1.25)(0.4,-0.5)
+ \fi
+ \psline(0,0)(0,.75)
+ }}%
+ \ignorespaces%
+}
+%
+%%% oscillator %%%
+%
+\def\oscillator{\@ifnextchar[{\pst@oscillator}{\pst@oscillator[]}}
+\def\pst@oscillator[#1]{%
+ \@ifnextchar({\pst@oscillatori[#1]{0}}{\pst@oscillatori[#1]}%
+}
+\def\pst@oscillatori[#1]#2(#3)#4#5{{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ \pscircle[#5,linewidth=1.5\pslinewidth](0,0){0.5}
+ \ifx\psk@LOstyle\pst@LOstyle@crystal
+ \psline(-0.2,-0.35)(-0.2,0.35)
+ \psframe(-0.15,-0.3)(0.15,0.3)
+ \psline(0.2,-0.35)(0.2,0.35)
+ \else
+ \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)%
+ (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000)
+ \fi
+ \ifx\psk@LOoutput\pst@LOoutput@left
+ \pst@getcoor{#3}\pst@tempa
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ /XC X1 def
+ /YC Y1 -0.6 add def
+ XC YC){C@}
+ \rput[t]{#2}(C@){#4}
+ \ifPst@inputarrow
+ \psline[arrows=->,arrowinset=0](-0.5,0)(-1,0)
+ \else
+ \psline(-0.5,0)(-1,0)
+ \fi
+ \fi
+ \ifx\psk@LOoutput\pst@LOoutput@top
+ \pst@getcoor{#3}\pst@tempa
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ /XC X1 def
+ /YC Y1 -0.6 add def
+ XC YC){C@}
+ \rput[t]{#2}(C@){#4}
+ \ifPst@inputarrow
+ \psline[arrows=->,arrowinset=0](0,0.5)(0,1)
+ \else
+ \psline(0,0.5)(0,1)
+ \fi
+ \fi
+ \ifx\psk@LOoutput\pst@LOoutput@right
+ \pst@getcoor{#3}\pst@tempa
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ /XC X1 def
+ /YC Y1 -0.6 add def
+ XC YC){C@}
+ \rput[t]{#2}(C@){#4}
+ \ifPst@inputarrow
+ \psline[arrows=->,arrowinset=0](0.5,0)(1,0)
+ \else
+ \psline(0.5,0)(1,0)
+ \fi
+ \fi
+ \ifx\psk@LOoutput\pst@LOoutput@bottom
+ \pst@getcoor{#3}\pst@tempa
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ /XC X1 def
+ /YC Y1 0.6 add def
+ XC YC){C@}
+ \rput[b]{#2}(C@){#4}
+ \ifPst@inputarrow
+ \psline[arrows=->,arrowinset=0](0,-0.5)(0,-1)
+ \else
+ \psline(0,-0.5)(0,-1)
+ \fi
+ \fi
+ }}%
+ \ignorespaces%
+}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Dipole
+%%% filtre: dipolestyle: (bandpass), lowpass, highpass
+%%% inputarrow: (false), true
+%%% dipoleinput: (left), right
+%%% isolator: dipoleinput: (left), right
+%%% inputarrow: (false), true
+%%% freqmult: dipolestyle: (multiplier), divider,
+%%% value: (N), integer
+%%% programmable: (false) true
+%%% inputarrow: (false), true
+%%% dipoleinput: (left), right
+%%% phaseshifter:
+%%% inputarrow: (false), true
+%%% dipoleinput: (left), right
+%%% vco:
+%%% inputarrow: (false), true
+%%% dipoleinput: (left), right
+%%% amplifier:
+%%% inputarrow: (false), true
+%%% dipoleinput: (left), right
+%%% detector:
+%%% inputarrow: (false), true
+%%% dipoleinput: (left), right
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% FILTER %%%
+%
+\newCircDipole{filter}%
+\def\pst@draw@filter{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.250)(-0.2,0.3750)(0,0.250)(0.2,0.1250)(0.4,0.250)
+ \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,0.000)(-0.2,0.1250)(0,0.000)(0.2,-0.125)(0.4,0.000)
+ \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.4,-0.25)(-0.2,-0.125)(0,-0.25)(0.2,-0.375)(0.4,-0.25)
+% \psline{c-c}(-0.1,0.2)(0.1,0.3)
+ \ifx\psk@Dstyle\pst@Dstyle@lowpass
+ \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3)
+ \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05)
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@highpass
+ \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2)
+ \psline[fillstyle=none]{c-c}(-0.1,-0.05)(0.1,0.05)
+ \else
+ \psline[fillstyle=none]{c-c}(-0.1,0.2)(0.1,0.3)
+ \psline[fillstyle=none]{c-c}(-0.1,-0.3)(0.1,-0.2)
+ \fi
+ \fi
+}
+
+%%% ISOLATOR %%%
+%
+\newCircDipole{isolator}
+\def\pst@draw@isolator{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \ifx\psk@Dinput\pst@Dinput@right
+ \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{<-}(-0.4,0)(0.4,0)
+ \else
+ \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.4,0)(0.4,0)
+ \fi
+}
+%
+%%% Frequency Multiplier or Divider %%%
+\newCircDipole{freqmult}
+\def\pst@draw@freqmult{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \ifPst@programmable%
+ \psline[fillstyle=none](-0.4,-0.75)(-0.4,-0.5)
+ \psline[fillstyle=none](-0.2,-0.75)(-0.2,-0.5)
+ \psline(0,-0.75)(0,-0.5)
+ \psline[fillstyle=none](0.2,-0.75)(0.2,-0.5)
+ \psline[fillstyle=none](0.4,-0.75)(0.4,-0.5)
+ \ifx\psk@Dstyle\pst@Dstyle@divider
+ \rput(0,0){$\div\textrm{N}$}
+ \else
+ \rput(0,0){$\times\textrm{N}$}
+ \fi
+ \else
+ \ifx\psk@FMvalue\pst@FMvalue@value
+ \ifx\psk@Dstyle\pst@Dstyle@divider
+ \rput(0,0){$\div\textrm{N}$}
+ \else
+ \rput(0,0){$\times\textrm{N}$}
+ \fi
+ \else
+ \ifx\psk@Dstyle\pst@Dstyle@divider
+ \rput(0,0){$\div\textrm{\psk@FMvalue}$}
+ \else
+ \rput(0,0){$\times\textrm{\psk@FMvalue}$}
+ \fi
+ \fi
+ \fi%
+}
+%
+%%% phaseshifter
+\newCircDipole{phaseshifter}
+\def\pst@draw@phaseshifter{%
+ \pnode(-0.4,0){dipole@1}
+ \pnode(0.4,0){dipole@2}
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.4}
+ \psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}(-0.5,-0.5)(0.5,0.5)
+}
+%
+%%% VCO
+\newCircDipole{vco}
+\def\pst@draw@vco{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \pscurve[linewidth=1.5\pslinewidth]{c-c}(-0.3,0.000)(-0.225,0.088375)(-0.15,0.1250)(-0.075,0.088375)%
+ (0,0.000)(0.075,-0.088375)(0.15,-0.125)(0.225,-0.088375)(0.3,0.000)
+}
+%
+%%% amplifier %%%
+%
+\newCircDipole{amplifier}
+\def\pst@draw@amplifier{%
+ \pnode(-0.433,0){dipole@1}
+ \pnode(0.433,0){dipole@2}
+ \ifx\psk@Dinput\pst@Dinput@right
+ \pstriangle[gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866)
+ \else
+ \pstriangle[gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866)
+ \fi
+}
+%
+%%% detector %%%
+%
+\newCircDipole{detector}
+\def\pst@draw@detector{%
+ \pnode(-0.5,0){dipole@1}
+ \psline[fillstyle=none](-0.5,0)(-0.2165,0)
+ \pnode(0.5,0){dipole@2}
+ \psline[fillstyle=none](0.5,0)(0.2165,0)
+ \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \ifx\psk@Dinput\pst@Dinput@right
+ \pstriangle[gangle=90,linewidth=1.5\pslinewidth,fillstyle=none](0.2165,0)(0.5,0.433)
+ \psline[fillstyle=none,linewidth=1.5\pslinewidth](-0.2165,-0.25)(-0.2165,0.25)
+ \else
+ \pstriangle[gangle=-90,linewidth=1.5\pslinewidth,fillstyle=none](-0.2165,0)(0.5,0.433)
+ \psline[fillstyle=none,linewidth=1.5\pslinewidth](0.2165,-0.25)(0.2165,0.25)
+ \fi
+}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Tripole
+%%% mixer: tripolestyle:(bottom), top
+%%% inputarrow: (false) | true
+%%% tripoleinput: (left) | right
+%%% Circulator: tripolestyle=(circulator), isolator
+%%% tripoleconfig: (left) | right
+%%% inputarrow: (false) | true
+%%% tripoleinput: (left) | right
+%%% AGC: tripoleinput=(left)|right
+%%% inputarrow: (false) | true
+%%% tripoleinput: (left) | right
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\def\mixer{\pst@object{mixer}}
+\def\mixer@i(#1)(#2)(#3)#4#5{%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y2 def
+ XC YC){C@}
+ \begingroup
+ \use@keep@par
+ \ifx\psk@tripole@style\pst@tripole@style@top
+ \addbefore@par{labeloffset=-0.9,dimen=middle}%
+ \else
+ \addbefore@par{labeloffset=0.9,dimen=middle}%
+ \fi
+ \use@par
+ \rput(C@){\pst@draw@mixer{#3}{#4}{#5}}
+ \endgroup
+ \ifx\psk@Tinput\pst@Tinput@left%
+ \ifPst@inputarrow
+ \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right}
+ \else
+ \ifPst@inputarrow
+ \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}
+ \fi
+ \pcline[linestyle=none](#1)(#2)% for the endarrows
+ \pcline[linestyle=none](#2)(#3)% for the endarrows
+ \ignorespaces%
+}
+\def\pst@draw@mixer#1#2#3{%
+ \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5}
+ \let\psk@fillstyle\psfs@none
+ \psline[linewidth=1.5\pslinewidth](-0.3535,-0.3535)(0.3535,0.3535)
+ \psline[linewidth=1.5\pslinewidth](-0.3535,0.3535)(0.3535,-0.3535)
+ \pnodes(-0.5,0){Tport@left}(0.5,0){Tport@right}
+ \pcline[linestyle=none,offset=\psk@label@offset](Tport@left)(Tport@right)\ncput{#2}
+ \ifx\psk@tripole@style\pst@tripole@style@top%
+ \pnode(0,0.5){Tport@center}
+ \ifPst@inputarrow
+ \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=90]{#1}{Tport@center}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{Tport@center}
+ \fi
+ \else
+ \pnode(0,-0.5){Tport@center}
+ \ifPst@inputarrow
+ \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=-90]{#1}{Tport@center}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{#1}{Tport@center}
+ \fi%
+ \fi%
+}
+%
+%%% Circulator
+%
+\def\circulator{\pst@object{circulator}}
+\def\circulator@i#1(#2)(#3)(#4)#5#6{%
+ \addbefore@par{dimen=middle}%
+ \begin@ClosedObj
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#4}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y1 Y2 add 2 div def
+ XC YC){C@}
+ \rput{#1}(C@){\pst@draw@circulator{#4}{#5}{#6}}
+ \nput{! 90 #1 add}{Tport@label}{#5}
+ \ifPst@inputarrow
+ \ncline[arrows=->,arrowinset=0]{#2}{Tport@input} %,arm=0.5,angleB=180
+ \else
+ \ncline[arrows=-]{#2}{Tport@input}
+ \fi
+ \ncline[arrows=-]{#3}{Tport@output} %,arm=0.5,angleB=0
+ \pcline[linestyle=none](#2)(#3)% for the endarrows
+ \pcline[linestyle=none](#3)(#4)% for the endarrows
+ \end@ClosedObj
+ \ignorespaces%
+}
+\def\pst@draw@circulator#1#2#3{%
+ \pscircle[#3,linewidth=1.5\pslinewidth](0,0){0.5}%
+ \pnode(0,0.6){Tport@label}%
+ \ifx\psk@Tconfig\pst@Tconfig@left%
+ \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{<-}{0.35}{15}{155}
+ \pnode(-0.5,0){Tport@input}
+ \pnode(0.5,0){Tport@output}
+ \else
+ \psarc[linewidth=1.5\pslinewidth,arrowinset=0]{->}{0.35}{25}{165}
+ \pnode(-0.5,0){Tport@output}
+ \pnode(0.5,0){Tport@input}
+ \fi%
+ \ifx\psk@tripole@style\pst@tripole@style@isolator%
+ \psline(0,-0.5)(0,-0.95)%
+ \multips{0}(-0.225,-1)(0.1,0){5}%
+ {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}%
+ \else
+ \pnode(0,-0.5){Tport@center}%
+ \ncline[arrows=-]{#1}{Tport@center}
+ \fi%
+}
+%
+%%% AGC
+\def\agc{\pst@object{agc}}
+\def\agc@i(#1)(#2)(#3)#4#5{%
+ \addbefore@par{dimen=middle}%
+ \begin@ClosedObj
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y2 def
+ XC YC){C@}
+ \rput(C@){\pst@draw@agc{#1}{#2}{#4}{#5}}
+ \ncangle[arrows=-,arm=0.5,angleB=-90]{#3}{Tport@center}
+ \pcline[linestyle=none](#1)(#2)% for the endarrows
+ \pcline[linestyle=none](#2)(#3)% for the endarrows
+ \end@ClosedObj
+ \ignorespaces%
+}
+\def\pst@draw@agc#1#2#3#4{%
+ \pnode(-0.433,0){Tport@left}
+ \pnode(0.433,0){Tport@right}
+ \pnode(0,-0.5){Tport@center}
+ \rput[b](0,0.6){#3}
+ \psline[arrows=->,arrowinset=0](0,-0.5)(0,-0.25)
+ \ifx\psk@Tinput\pst@Tinput@left%
+ \pstriangle[#4,gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866)
+ \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](-0.55,-0.5)(0.25,0.5)
+ \ifPst@inputarrow
+ \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right}
+ \else
+ \pstriangle[#4,gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866)
+ \psline[linewidth=1.5\pslinewidth,arrows=->,arrowinset=0](0.55,-0.5)(-0.25,0.5)
+ \ifPst@inputarrow
+ \ncangle[arrows=<-,arrowinset=0,arm=0.5,angleB=180]{Tport@right}{#2}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=180]{Tport@right}{#2}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}%
+ \fi%
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Quadripole
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Coupler %%%
+\def\coupler{\pst@object{coupler}}
+\def\coupler@i(#1)(#2)(#3)(#4)#5#6{%
+ \addbefore@par{dimen=middle,arm=0}%
+ \begin@ClosedObj%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pst@getcoor{#4}\pst@tempd
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ \pst@tempd /Y4 exch \pst@number\psyunit div def
+ /X4 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def
+ /YC Y1 -0.4 add def
+ XC YC){C@}
+ \rput(C@){\pst@draw@coupler{#6}}
+ \ncangle[arrows=-,angleA=0,angleB=-180]{#1}{inup@}
+ \ncangle[arrows=-,angleA=180,angleB=0]{#3}{outup@}
+ \ifx\psk@Qinput\pst@Qinput@left%
+ \ifx\psk@Qstyle\pst@Qstyle@hybrid
+ \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@}
+ \fi
+ \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@}
+ \else
+ \ncangle[arrows=-,angleA=0,angleB=-180]{#2}{indown@}
+ \ifx\psk@Qstyle\pst@Qstyle@hybrid
+ \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@}
+ \fi
+ \fi
+% \ncangle[arrows=-,angleA=180,angleB=0]{#4}{outdown@}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{inup@}{outup@}
+ \naput{#5}
+ \pcline[linestyle=none](#1)(#3)% for the end arrows
+ \pcline[linestyle=none](#2)(#4)% for the end arrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+%
+\def\pst@draw@coupler#1{%
+ \pnode(-0.75,0.4){inup@}
+ \pnode(0.75,0.4){outup@}
+ \psframe[#1,linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \psline(-0.5,0.4)(0.5,0.4)
+ \psline(-0.5,-0.4)(0.5,-0.4)
+ \psline(-0.4,0.35)(0.4,-0.35)
+ \psline(-0.4,-0.35)(0.4,0.35)
+%
+ \ifx\psk@Qinput\pst@Qinput@left%
+ \pnode(0.75,-0.4){outdown@}
+ \ifPst@inputarrow%
+ \psline[arrows=->,arrowinset=0](-0.75,0.4)(-0.5,0.4)
+ \else
+ \psline(-0.75,0.4)(-0.5,0.4)
+ \fi
+ \psline(0.5,0.4)(0.75,0.4)
+ \psline(0.5,-0.4)(0.75,-0.4)
+ \ifx\psk@Qstyle\pst@Qstyle@hybrid
+ \pnode(-0.75,-0.4){indown@}
+ \ifPst@inputarrow%
+ \psline[arrows=->,arrowinset=0](-0.75,-0.4)(-0.5,-0.4)
+ \else
+ \psline(-0.75,-0.4)(-0.5,-0.4)
+ \fi
+ \else
+ \ifx\psk@Qstyle\pst@Qstyle@directional
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.75)(-0.8,-0.675)
+ \multips{90}(-0.8,-0.675)(0,0.1){4}%
+ {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}%
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.8,-0.275)(-0.8,-0.2)
+ \psline(-0.75,-0.4)(-0.5,-0.4)
+ \fi
+ \fi
+ \else
+ \pnode(-0.75,-0.4){indown@}
+ \ifPst@inputarrow
+ \psline[arrows=->,arrowinset=0](0.75,0.4)(0.5,0.4)
+ \else
+ \psline(0.75,0.4)(0.5,0.4)
+ \fi
+ \psline(-0.5,0.4)(-0.75,0.4)
+ \psline(-0.5,-0.4)(-0.75,-0.4)
+ \ifx\psk@Qstyle\pst@Qstyle@hybrid
+ \pnode(0.75,-0.4){outdown@}
+ \ifPst@inputarrow%
+ \psline[arrows=->,arrowinset=0](0.75,-0.4)(0.5,-0.4)
+ \else
+ \psline(0.75,-0.4)(0.5,-0.4)
+ \fi
+ \else
+ \ifx\psk@Qstyle\pst@Qstyle@directional
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.75)(0.8,-0.675)
+ \multips{90}(0.8,-0.675)(0,0.1){4}%
+ {\psline[arrows=-,linewidth=1.5\pslinewidth](0,0)(0.025,0.05)(0.075,-0.05)(0.1,0)}%
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.8,-0.275)(0.8,-0.2)
+ \psline(0.75,-0.4)(0.5,-0.4)
+ \fi%
+ \fi%
+ \fi%
+}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\logicic{\@ifnextchar[{\pst@intcirc}{\pst@intcirc[]}}
+\def\pst@intcirc[#1]{\@ifnextchar({\pst@intcirci[#1]{0}}{\pst@intcirci[#1]}}
+\def\pst@intcirci[#1]#2(#3)#4{{%
+ \psset{#1}%
+ \rput{#2}(#3){
+ % IC Styles
+ \ifcase\psk@nicpins
+ %
+ % 8-Pin DIP IC
+ %
+ \def\icheight{2.5}
+ \def\icwidth{3.5}
+ \def\icleft{1.75}
+ \def\icmid{2.25}
+ \def\icright{2.75}
+ % a
+ \ifPst@pina
+ \psline(0,2)(1,2) % Input a
+ \uput[r](1,2){\small{\psk@pinalabel}} % Name a
+ \uput[u](0.5,1.9){\small{\psk@pinanumber}} % Number a
+ \ifPst@invertpina
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2){{\psk@bubblesize}} % Invert Input a
+ \fi
+ \fi
+ % b
+ \ifPst@pinb
+ \psline(0,1.5)(1,1.5) % Input b
+ \uput[r](1,1.5){{\psk@pinblabel}} % Name b
+ \uput[u](0.5,1.4){{\psk@pinbnumber}} % Number b
+ \ifPst@invertpinb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input b
+ \fi
+ \fi
+ % c
+ \ifPst@pinc
+ \psline(0,1)(1,1) % Input c
+ \uput[r](1,1){{\psk@pinclabel}} % Name c
+ \uput[u](0.5,0.9){{\psk@pincnumber}} % Number c
+ \ifPst@invertpinc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input c
+ \fi
+ \fi
+ % d
+ \ifPst@pind
+ \psline(0,0.5)(1,0.5) % Input d
+ \uput[r](1,0.5){{\psk@pindlabel}} % Name d
+ \uput[u](0.5,0.4){{\psk@pindnumber}} % Number d
+ \ifPst@invertpind
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input d
+ \fi
+ \fi
+ % e
+ \ifPst@pine
+ \psline(3.5,0.5)(4.5,0.5) % Input e
+ \uput[l](3.5,0.5){{\psk@pinelabel}} % Name e
+ \uput[u](4,0.4){{\psk@pinenumber}} % Number e
+ \ifPst@invertpine
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 0.5){{\psk@bubblesize}} % Invert Input e
+ \fi
+ \fi
+ % f
+ \ifPst@pinf
+ \psline(3.5,1)(4.5,1) % Input f
+ \uput[l](3.5,1){{\psk@pinflabel}} % Name f
+ \uput[u](4,0.9){{\psk@pinfnumber}} % Number f
+ \ifPst@invertpinf
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Input f
+ \fi
+ \fi
+ % g
+ \ifPst@ping
+ \psline(3.5,1.5)(4.5,1.5) % Input g
+ \uput[l](3.5,1.5){{\psk@pinglabel}} % Name g
+ \uput[u](4,1.4){{\psk@pingnumber}} % Number g
+ \ifPst@invertping
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1.5){{\psk@bubblesize}} % Invert Input g
+ \fi
+ \fi
+ % h
+ \ifPst@pinh
+ \psline(3.5,2)(4.5,2) % Input h
+ \uput[l](3.5,2){{\psk@pinhlabel}} % Name h
+ \uput[u](4,1.9){{\psk@pinhnumber}} % Number h
+ \ifPst@invertpinh
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2){{\psk@bubblesize}} % Invert Input h
+ \fi
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,2.5)(3.5,2.5)(3.5,0)(1,0)
+ \or
+ %
+ % 14-Pin DIP IC
+ %
+ \def\icheight{4}
+ \def\icwidth{3.5}
+ \def\icleft{1.75}
+ \def\icmid{2.25}
+ \def\icright{2.75}
+ % a
+ \ifPst@pina
+ \psline(0,3.5)(1,3.5) % Input a
+ \uput[r](1,3.5){{\psk@pinalabel}} % Name a
+ \uput[u](0.5,3.4){{\psk@pinanumber}} % Number a
+ \ifPst@invertpina
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3.5){{\psk@bubblesize}} % Invert Input a
+ \fi
+ \fi
+ % b
+ \ifPst@pinb
+ \psline(0,3)(1,3) % Input b
+ \uput[r](1,3){{\psk@pinblabel}} % Name b
+ \uput[u](0.5,2.9){{\psk@pinbnumber}} % Number b
+ \ifPst@invertpinb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3){{\psk@bubblesize}} % Invert Input b
+ \fi
+ \fi
+ % c
+ \ifPst@pinc
+ \psline(0,2.5)(1,2.5) % Input c
+ \uput[r](1,2.5){{\psk@pinclabel}} % Name c
+ \uput[u](0.5,2.4){{\psk@pincnumber}} % Number c
+ \ifPst@invertpinc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.5){{\psk@bubblesize}} % Invert Input c
+ \fi
+ \fi
+ % d
+ \ifPst@pind
+ \psline(0,2)(1,2) % Input d
+ \uput[r](1,2){{\psk@pindlabel}} % Name d
+ \uput[u](0.5,1.9){{\psk@pindnumber}} % Number d
+ \ifPst@invertpind
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2){{\psk@bubblesize}} % Invert Input d
+ \fi
+ \fi
+ % e
+ \ifPst@pine
+ \psline(0,1.5)(1,1.5) % Input e
+ \uput[r](1,1.5){{\psk@pinelabel}} % Name e
+ \uput[u](0.5,1.4){{\psk@pinenumber}} % Number e
+ \ifPst@invertpine
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input e
+ \fi
+ \fi
+ % f
+ \ifPst@pinf
+ \psline(0,1)(1,1) % Input f
+ \uput[r](1,1){{\psk@pinflabel}} % Name f
+ \uput[u](0.5,0.9){{\psk@pinfnumber}} % Number f
+ \ifPst@invertpinf
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input f
+ \fi
+ \fi
+ % g
+ \ifPst@ping
+ \psline(0,0.5)(1,0.5) % Input g
+ \uput[r](1,0.5){{\psk@pinglabel}} % Name g
+ \uput[u](0.5,0.4){{\psk@pingnumber}} % Number g
+ \ifPst@invertping
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input g
+ \fi
+ \fi
+ % h
+ \ifPst@pinh
+ \psline(3.5,0.5)(4.5,0.5) % Input h
+ \uput[l](3.5,0.5){{\psk@pinhlabel}} % Name h
+ \uput[u](4,0.4){{\psk@pinhnumber}} % Number h
+ \ifPst@invertpinh
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 0.5){{\psk@bubblesize}} % Invert Input h
+ \fi
+ \fi
+ % i
+ \ifPst@pini
+ \psline(3.5,1)(4.5,1) % Input i
+ \uput[l](3.5,1){{\psk@pinilabel}} % Name i
+ \uput[u](4,0.9){{\psk@pininumber}} % Number i
+ \ifPst@invertpini
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Input i
+ \fi
+ \fi
+ % j
+ \ifPst@pinj
+ \psline(3.5,1.5)(4.5,1.5) % Input j
+ \uput[l](3.5,1.5){{\psk@pinjlabel}} % Name j
+ \uput[u](4,1.4){{\psk@pinjnumber}} % Number j
+ \ifPst@invertpinj
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1.5){{\psk@bubblesize}} % Invert Input j
+ \fi
+ \fi
+ % k
+ \ifPst@pink
+ \psline(3.5,2)(4.5,2) % Input k
+ \uput[l](3.5,2){{\psk@pinklabel}} % Name k
+ \uput[u](4,1.9){{\psk@pinknumber}} % Number k
+ \ifPst@invertpink
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2){{\psk@bubblesize}} % Invert Input k
+ \fi
+ \fi
+ % l
+ \ifPst@pinl
+ \psline(3.5,2.5)(4.5,2.5) % Input l
+ \uput[l](3.5,2.5){{\psk@pinllabel}} % Name l
+ \uput[u](4,2.4){{\psk@pinlnumber}} % Number l
+ \ifPst@invertpinl
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2.5){{\psk@bubblesize}} % Invert Input l
+ \fi
+ \fi
+ % m
+ \ifPst@pinm
+ \psline(3.5,3)(4.5,3) % Input m
+ \uput[l](3.5,3){{\psk@pinmlabel}} % Name m
+ \uput[u](4,2.9){{\psk@pinmnumber}} % Number m
+ \ifPst@invertpinm
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 3){{\psk@bubblesize}} % Invert Input m
+ \fi
+ \fi
+ % n
+ \ifPst@pinn
+ \psline(3.5,3.5)(4.5,3.5) % Input n
+ \uput[l](3.5,3.5){{\psk@pinnlabel}} % Name n
+ \uput[u](4,3.4){{\psk@pinnnumber}} % Number n
+ \ifPst@invertpinn
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 3.5){{\psk@bubblesize}} % Invert Input n
+ \fi
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,4)(3.5,4)(3.5,0)(1,0)
+ \or
+ %
+ % 16-Pin DIP IC
+ %
+ \def\icheight{4.5}
+ \def\icwidth{3.5}
+ \def\icleft{1.75}
+ \def\icmid{2.25}
+ \def\icright{2.75}
+ % a
+ \ifPst@pina
+ \psline(0,4)(1,4) % Input a
+ \uput[r](1,4){{\psk@pinalabel}} % Name a
+ \uput[u](0.5,3.9){{\psk@pinanumber}} % Number a
+ \ifPst@invertpina
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 4){{\psk@bubblesize}} % Invert Input a
+ \fi
+ \fi
+ % b
+ \ifPst@pinb
+ \psline(0,3.5)(1,3.5) % Input b
+ \uput[r](1,3.5){{\psk@pinblabel}} % Name b
+ \uput[u](0.5,3.4){{\psk@pinbnumber}} % Number b
+ \ifPst@invertpinb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3.5){{\psk@bubblesize}} % Invert Input b
+ \fi
+ \fi
+ % c
+ \ifPst@pinc
+ \psline(0,3)(1,3) % Input c
+ \uput[r](1,3){{\psk@pinclabel}} % Name c
+ \uput[u](0.5,2.9){{\psk@pincnumber}} % Number c
+ \ifPst@invertpinc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3){{\psk@bubblesize}} % Invert Input c
+ \fi
+ \fi
+ % d
+ \ifPst@pind
+ \psline(0,2.5)(1,2.5) % Input d
+ \uput[r](1,2.5){{\psk@pindlabel}} % Name d
+ \uput[u](0.5,2.4){{\psk@pindnumber}} % Number d
+ \ifPst@invertpind
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.5){{\psk@bubblesize}} % Invert Input d
+ \fi
+ \fi
+ % e
+ \ifPst@pine
+ \psline(0,2)(1,2) % Input e
+ \uput[r](1,2){{\psk@pinelabel}} % Name e
+ \uput[u](0.5,1.9){{\psk@pinenumber}} % Number e
+ \ifPst@invertpine
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2){{\psk@bubblesize}} % Invert Input e
+ \fi
+ \fi
+ % f
+ \ifPst@pinf
+ \psline(0,1.5)(1,1.5) % Input f
+ \uput[r](1,1.5){{\psk@pinflabel}} % Name f
+ \uput[u](0.5,1.4){{\psk@pinfnumber}} % Number f
+ \ifPst@invertpinf
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input f
+ \fi
+ \fi
+ % g
+ \ifPst@ping
+ \psline(0,1)(1,1) % Input g
+ \uput[r](1,1){{\psk@pinglabel}} % Name g
+ \uput[u](0.5,0.9){{\psk@pingnumber}} % Number g
+ \ifPst@invertping
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input g
+ \fi
+ \fi
+ % h
+ \ifPst@pinh
+ \psline(0,0.5)(1,0.5) % Input h
+ \uput[r](1,0.5){{\psk@pinhlabel}} % Name h
+ \uput[u](0.5,0.4){{\psk@pinhnumber}} % Number h
+ \ifPst@invertpinh
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input h
+ \fi
+ \fi
+ % i
+ \ifPst@pini
+ \psline(3.5,0.5)(4.5,0.5) % Input i
+ \uput[l](3.5,0.5){{\psk@pinilabel}} % Name i
+ \uput[u](4,0.4){{\psk@pininumber}} % Number i
+ \ifPst@invertpini
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 0.5){{\psk@bubblesize}} % Invert Input i
+ \fi
+ \fi
+ % j
+ \ifPst@pinj
+ \psline(3.5,1)(4.5,1) % Input j
+ \uput[l](3.5,1){{\psk@pinjlabel}} % Name j
+ \uput[u](4,0.9){{\psk@pinjnumber}} % Number j
+ \ifPst@invertpinj
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Input j
+ \fi
+ \fi
+ % k
+ \ifPst@pink
+ \psline(3.5,1.5)(4.5,1.5) % Input k
+ \uput[l](3.5,1.5){{\psk@pinklabel}} % Name k
+ \uput[u](4,1.4){{\psk@pinknumber}} % Number k
+ \ifPst@invertpink
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1.5){{\psk@bubblesize}} % Invert Input k
+ \fi
+ \fi
+ % l
+ \ifPst@pinl
+ \psline(3.5,2)(4.5,2) % Input l
+ \uput[l](3.5,2){{\psk@pinllabel}} % Name l
+ \uput[u](4,1.9){{\psk@pinlnumber}} % Number l
+ \ifPst@invertpinl
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2){{\psk@bubblesize}} % Invert Input l
+ \fi
+ \fi
+ % m
+ \ifPst@pinm
+ \psline(3.5,2.5)(4.5,2.5) % Input m
+ \uput[l](3.5,2.5){{\psk@pinmlabel}} % Name m
+ \uput[u](4,2.4){{\psk@pinmnumber}} % Number m
+ \ifPst@invertpinm
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2.5){{\psk@bubblesize}} % Invert Input m
+ \fi
+ \fi
+ % n
+ \ifPst@pinn
+ \psline(3.5,3)(4.5,3) % Input n
+ \uput[l](3.5,3){{\psk@pinnlabel}} % Name n
+ \uput[u](4,2.9){{\psk@pinnnumber}} % Number n
+ \ifPst@invertpinn
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 3){{\psk@bubblesize}} % Invert Input n
+ \fi
+ \fi
+ % o
+ \ifPst@pino
+ \psline(3.5,3.5)(4.5,3.5) % Input o
+ \uput[l](3.5,3.5){{\psk@pinolabel}} % Name o
+ \uput[u](4,3.4){{\psk@pinonumber}} % Number o
+ \ifPst@invertpino
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 3.5){{\psk@bubblesize}} % Invert Input o
+ \fi
+ \fi
+ % p
+ \ifPst@pinp
+ \psline(3.5,4)(4.5,4) % Input p
+ \uput[l](3.5,4){{\psk@pinplabel}} % Name p
+ \uput[u](4,3.9){{\psk@pinpnumber}} % Number p
+ \ifPst@invertpinp
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 4){{\psk@bubblesize}} % Invert Input p
+ \fi
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,4.5)(3.5,4.5)(3.5,0)(1,0)
+ \or
+ %
+ % 20-Pin DIP IC
+ %
+ \def\icheight{5.5}
+ \def\icwidth{3.5}
+ \def\icleft{1.75}
+ \def\icmid{2.25}
+ \def\icright{2.75}
+ % a
+ \ifPst@pina
+ \psline(0,5)(1,5) % Input a
+ \uput[r](1,5){{\psk@pinalabel}} % Name a
+ \uput[u](0.5,4.9){{\psk@pinanumber}} % Number a
+ \ifPst@invertpina
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 5){{\psk@bubblesize}} % Invert Input a
+ \fi
+ \fi
+ % b
+ \ifPst@pinb
+ \psline(0,4.5)(1,4.5) % Input b
+ \uput[r](1,4.5){{\psk@pinblabel}} % Name b
+ \uput[u](0.5,4.4){{\psk@pinbnumber}} % Number b
+ \ifPst@invertpinb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 4.5){{\psk@bubblesize}} % Invert Input b
+ \fi
+ \fi
+ % c
+ \ifPst@pinc
+ \psline(0,4)(1,4) % Input c
+ \uput[r](1,4){{\psk@pinclabel}} % Name c
+ \uput[u](0.5,3.9){{\psk@pincnumber}} % Number c
+ \ifPst@invertpinc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 4){{\psk@bubblesize}} % Invert Input c
+ \fi
+ \fi
+ % d
+ \ifPst@pind
+ \psline(0,3.5)(1,3.5) % Input d
+ \uput[r](1,3.5){{\psk@pindlabel}} % Name d
+ \uput[u](0.5,3.4){{\psk@pindnumber}} % Number d
+ \ifPst@invertpind
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3.5){{\psk@bubblesize}} % Invert Input d
+ \fi
+ \fi
+ % e
+ \ifPst@pine
+ \psline(0,3)(1,3) % Input e
+ \uput[r](1,3){{\psk@pinelabel}} % Name e
+ \uput[u](0.5,2.9){{\psk@pinenumber}} % Number e
+ \ifPst@invertpine
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3){{\psk@bubblesize}} % Invert Input e
+ \fi
+ \fi
+ % f
+ \ifPst@pinf
+ \psline(0,2.5)(1,2.5) % Input f
+ \uput[r](1,2.5){{\psk@pinflabel}} % Name f
+ \uput[u](0.5,2.4){{\psk@pinfnumber}} % Number f
+ \ifPst@invertpinf
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.5){{\psk@bubblesize}} % Invert Input f
+ \fi
+ \fi
+ % g
+ \ifPst@ping
+ \psline(0,2)(1,2) % Input g
+ \uput[r](1,2){{\psk@pinglabel}} % Name g
+ \uput[u](0.5,1.9){{\psk@pingnumber}} % Number g
+ \ifPst@invertping
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2){{\psk@bubblesize}} % Invert Input g
+ \fi
+ \fi
+ % h
+ \ifPst@pinh
+ \psline(0,1.5)(1,1.5) % Input h
+ \uput[r](1,1.5){{\psk@pinhlabel}} % Name h
+ \uput[u](0.5,1.4){{\psk@pinhnumber}} % Number h
+ \ifPst@invertpinh
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input h
+ \fi
+ \fi
+ % i
+ \ifPst@pini
+ \psline(0,1)(1,1) % Input i
+ \uput[r](1,1){{\psk@pinilabel}} % Name i
+ \uput[u](0.5,0.9){{\psk@pininumber}} % Number i
+ \ifPst@invertpini
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input i
+ \fi
+ \fi
+ % j
+ \ifPst@pinj
+ \psline(0,0.5)(1,0.5) % Input j
+ \uput[r](1,0.5){{\psk@pinjlabel}} % Name j
+ \uput[u](0.5,0.4){{\psk@pinjnumber}} % Number j
+ \ifPst@invertpinj
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input j
+ \fi
+ \fi
+ % k
+ \ifPst@pink
+ \psline(3.5,0.5)(4.5,0.5) % Input k
+ \uput[l](3.5,0.5){{\psk@pinklabel}} % Name k
+ \uput[u](4,0.4){{\psk@pinknumber}} % Number k
+ \ifPst@invertpink
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 0.5){{\psk@bubblesize}} % Invert Input k
+ \fi
+ \fi
+ % l
+ \ifPst@pinl
+ \psline(3.5,1)(4.5,1) % Input l
+ \uput[l](3.5,1){{\psk@pinllabel}} % Name l
+ \uput[u](4,0.9){{\psk@pinlnumber}} % Number l
+ \ifPst@invertpinl
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Input l
+ \fi
+ \fi
+ % m
+ \ifPst@pinm
+ \psline(3.5,1.5)(4.5,1.5) % Input m
+ \uput[l](3.5,1.5){{\psk@pinmlabel}} % Name m
+ \uput[u](4,1.4){{\psk@pinmnumber}} % Number m
+ \ifPst@invertpinm
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1.5){{\psk@bubblesize}} % Invert Input m
+ \fi
+ \fi
+ % n
+ \ifPst@pinn
+ \psline(3.5,2)(4.5,2) % Input n
+ \uput[l](3.5,2){{\psk@pinnlabel}} % Name n
+ \uput[u](4,1.9){{\psk@pinnnumber}} % Number n
+ \ifPst@invertpinn
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2){{\psk@bubblesize}} % Invert Input n
+ \fi
+ \fi
+ % o
+ \ifPst@pino
+ \psline(3.5,2.5)(4.5,2.5) % Input o
+ \uput[l](3.5,2.5){{\psk@pinolabel}} % Name o
+ \uput[u](4,2.4){{\psk@pinonumber}} % Number o
+ \ifPst@invertpino
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 2.5){{\psk@bubblesize}} % Invert Input o
+ \fi
+ \fi
+ % p
+ \ifPst@pinp
+ \psline(3.5,3)(4.5,3) % Input p
+ \uput[l](3.5,3){{\psk@pinplabel}} % Name p
+ \uput[u](4,2.9){{\psk@pinpnumber}} % Number p
+ \ifPst@invertpinp
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 3){{\psk@bubblesize}} % Invert Input p
+ \fi
+ \fi
+ % q
+ \ifPst@pinq
+ \psline(3.5,3.5)(4.5,3.5) % Input q
+ \uput[l](3.5,3.5){{\psk@pinqlabel}} % Name q
+ \uput[u](4,3.4){{\psk@pinqnumber}} % Number q
+ \ifPst@invertpinq
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 3.5){{\psk@bubblesize}} % Invert Input q
+ \fi
+ \fi
+ % r
+ \ifPst@pinr
+ \psline(3.5,4)(4.5,4) % Input r
+ \uput[l](3.5,4){{\psk@pinrlabel}} % Name r
+ \uput[u](4,3.9){{\psk@pinrnumber}} % Number r
+ \ifPst@invertpinr
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 4){{\psk@bubblesize}} % Invert Input r
+ \fi
+ \fi
+ % s
+ \ifPst@pins
+ \psline(3.5,4.5)(4.5,4.5) % Input s
+ \uput[l](3.5,4.5){{\psk@pinslabel}} % Name s
+ \uput[u](4,4.4){{\psk@pinsnumber}} % Number s
+ \ifPst@invertpins
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 4.5){{\psk@bubblesize}} % Invert Input s
+ \fi
+ \fi
+ % t
+ \ifPst@pint
+ \psline(3.5,5)(4.5,5) % Input t
+ \uput[l](3.5,5){{\psk@pintlabel}} % Name t
+ \uput[u](4,4.9){{\psk@pintnumber}} % Number t
+ \ifPst@invertpint
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 5){{\psk@bubblesize}} % Invert Input t
+ \fi
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,5.5)(3.5,5.5)(3.5,0)(1,0)
+ \or
+ %
+ % 32-Pin DIP IC
+ %
+ \def\icheight{8.5}
+ \def\icwidth{4}
+ \def\icleft{2}
+ \def\icmid{2.5}
+ \def\icright{3}
+ % a
+ \ifPst@pina
+ \psline(0,8)(1,8) % Input a
+ \uput[r](1,8){{\psk@pinalabel}} % Name a
+ \uput[u](0.5,7.9){{\psk@pinanumber}} % Number a
+ \ifPst@invertpina
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 8){{\psk@bubblesize}} % Invert Input a
+ \fi
+ \fi
+ % b
+ \ifPst@pinb
+ \psline(0,7.5)(1,7.5) % Input b
+ \uput[r](1,7.5){{\psk@pinblabel}} % Name b
+ \uput[u](0.5,7.4){{\psk@pinbnumber}} % Number b
+ \ifPst@invertpinb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 7.5){{\psk@bubblesize}} % Invert Input b
+ \fi
+ \fi
+ % c
+ \ifPst@pinc
+ \psline(0,7)(1,7) % Input c
+ \uput[r](1,7){{\psk@pinclabel}} % Name c
+ \uput[u](0.5,6.9){{\psk@pincnumber}} % Number c
+ \ifPst@invertpinc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 7){{\psk@bubblesize}} % Invert Input c
+ \fi
+ \fi
+ % d
+ \ifPst@pind
+ \psline(0,6.5)(1,6.5) % Input d
+ \uput[r](1,6.5){{\psk@pindlabel}} % Name d
+ \uput[u](0.5,6.4){{\psk@pindnumber}} % Number d
+ \ifPst@invertpind
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 6.5){{\psk@bubblesize}} % Invert Input d
+ \fi
+ \fi
+ % e
+ \ifPst@pine
+ \psline(0,6)(1,6) % Input e
+ \uput[r](1,6){{\psk@pinelabel}} % Name e
+ \uput[u](0.5,5.9){{\psk@pinenumber}} % Number e
+ \ifPst@invertpine
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 6){{\psk@bubblesize}} % Invert Input e
+ \fi
+ \fi
+ % f
+ \ifPst@pinf
+ \psline(0,5.5)(1,5.5) % Input f
+ \uput[r](1,5.5){{\psk@pinflabel}} % Name f
+ \uput[u](0.5,5.4){{\psk@pinfnumber}} % Number f
+ \ifPst@invertpinf
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 5.5){{\psk@bubblesize}} % Invert Input f
+ \fi
+ \fi
+ % g
+ \ifPst@ping
+ \psline(0,5)(1,5) % Input g
+ \uput[r](1,5){{\psk@pinglabel}} % Name g
+ \uput[u](0.5,4.9){{\psk@pingnumber}} % Number g
+ \ifPst@invertping
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 5){{\psk@bubblesize}} % Invert Input g
+ \fi
+ \fi
+ % h
+ \ifPst@pinh
+ \psline(0,4.5)(1,4.5) % Input h
+ \uput[r](1,4.5){{\psk@pinhlabel}} % Name h
+ \uput[u](0.5,4.4){{\psk@pinhnumber}} % Number h
+ \ifPst@invertpinh
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 4.5){{\psk@bubblesize}} % Invert Input h
+ \fi
+ \fi
+ % i
+ \ifPst@pini
+ \psline(0,4)(1,4) % Input i
+ \uput[r](1,4){{\psk@pinilabel}} % Name i
+ \uput[u](0.5,3.9){{\psk@pininumber}} % Number i
+ \ifPst@invertpini
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 4){{\psk@bubblesize}} % Invert Input i
+ \fi
+ \fi
+ % j
+ \ifPst@pinj
+ \psline(0,3.5)(1,3.5) % Input j
+ \uput[r](1,3.5){{\psk@pinjlabel}} % Name j
+ \uput[u](0.5,3.4){{\psk@pinjnumber}} % Number j
+ \ifPst@invertpinj
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3.5){{\psk@bubblesize}} % Invert Input j
+ \fi
+ \fi
+ % k
+ \ifPst@pink
+ \psline(0,3)(1,3) % Input k
+ \uput[r](1,3){{\psk@pinklabel}} % Name k
+ \uput[u](0.5,2.9){{\psk@pinknumber}} % Number k
+ \ifPst@invertpink
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3){{\psk@bubblesize}} % Invert Input k
+ \fi
+ \fi
+ % l
+ \ifPst@pinl
+ \psline(0,2.5)(1,2.5) % Input l
+ \uput[r](1,2.5){{\psk@pinllabel}} % Name l
+ \uput[u](0.5,2.4){{\psk@pinlnumber}} % Number l
+ \ifPst@invertpinl
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.5){{\psk@bubblesize}} % Invert Input l
+ \fi
+ \fi
+ % m
+ \ifPst@pinm
+ \psline(0,2)(1,2) % Input m
+ \uput[r](1,2){{\psk@pinmlabel}} % Name m
+ \uput[u](0.5,1.9){{\psk@pinmnumber}} % Number m
+ \ifPst@invertpinm
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2){{\psk@bubblesize}} % Invert Input m
+ \fi
+ \fi
+ % n
+ \ifPst@pinn
+ \psline(0,1.5)(1,1.5) % Input n
+ \uput[r](1,1.5){{\psk@pinnlabel}} % Name n
+ \uput[u](0.5,1.4){{\psk@pinnnumber}} % Number n
+ \ifPst@invertpinn
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input n
+ \fi
+ \fi
+ % o
+ \ifPst@pino
+ \psline(0,1)(1,1) % Input o
+ \uput[r](1,1){{\psk@pinolabel}} % Name o
+ \uput[u](0.5,0.9){{\psk@pinonumber}} % Number o
+ \ifPst@invertpino
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input o
+ \fi
+ \fi
+ % p
+ \ifPst@pinp
+ \psline(0,0.5)(1,0.5) % Input p
+ \uput[r](1,0.5){{\psk@pinplabel}} % Name p
+ \uput[u](0.5,0.4){{\psk@pinpnumber}} % Number p
+ \ifPst@invertpinp
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input p
+ \fi
+ \fi
+ % q
+ \ifPst@pinq
+ \psline(4,0.5)(5,0.5) % Input q
+ \uput[l](4,0.5){{\psk@pinqlabel}} % Name q
+ \uput[u](4.5,0.4){{\psk@pinqnumber}} % Number q
+ \ifPst@invertpinq
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 0.5){{\psk@bubblesize}} % Invert Input q
+ \fi
+ \fi
+ % r
+ \ifPst@pinr
+ \psline(4,1)(5,1) % Input r
+ \uput[l](4,1){{\psk@pinrlabel}} % Name r
+ \uput[u](4.5,0.9){{\psk@pinrnumber}} % Number r
+ \ifPst@invertpinr
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Input r
+ \fi
+ \fi
+ % s
+ \ifPst@pins
+ \psline(4,1.5)(5,1.5) % Input s
+ \uput[l](4,1.5){{\psk@pinslabel}} % Name s
+ \uput[u](4.5,1.4){{\psk@pinsnumber}} % Number s
+ \ifPst@invertpins
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 1.5){{\psk@bubblesize}} % Invert Input s
+ \fi
+ \fi
+ % t
+ \ifPst@pint
+ \psline(4,2)(5,2) % Input t
+ \uput[l](4,2){{\psk@pintlabel}} % Name t
+ \uput[u](4.5,1.9){{\psk@pintnumber}} % Number t
+ \ifPst@invertpint
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 2){{\psk@bubblesize}} % Invert Input t
+ \fi
+ \fi
+ % u
+ \ifPst@pinu
+ \psline(4,2.5)(5,2.5) % Input u
+ \uput[l](4,2.5){{\psk@pinulabel}} % Name u
+ \uput[u](4.5,2.4){{\psk@pinunumber}} % Number u
+ \ifPst@invertpinu
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 2.5){{\psk@bubblesize}} % Invert Input u
+ \fi
+ \fi
+ % v
+ \ifPst@pinv
+ \psline(4,3)(5,3) % Input v
+ \uput[l](4,3){{\psk@pinvlabel}} % Name v
+ \uput[u](4.5,2.9){{\psk@pinvnumber}} % Number v
+ \ifPst@invertpinv
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 3){{\psk@bubblesize}} % Invert Input v
+ \fi
+ \fi
+ % w
+ \ifPst@pinw
+ \psline(4,3.5)(5,3.5) % Input w
+ \uput[l](4,3.5){{\psk@pinwlabel}} % Name w
+ \uput[u](4.5,3.4){{\psk@pinwnumber}} % Number w
+ \ifPst@invertpinw
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 3.5){{\psk@bubblesize}} % Invert Input w
+ \fi
+ \fi
+ % x
+ \ifPst@pinx
+ \psline(4,4)(5,4) % Input x
+ \uput[l](4,4){{\psk@pinxlabel}} % Name x
+ \uput[u](4.5,3.9){{\psk@pinxnumber}} % Number x
+ \ifPst@invertpinx
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 4){{\psk@bubblesize}} % Invert Input x
+ \fi
+ \fi
+ % y
+ \ifPst@piny
+ \psline(4,4.5)(5,4.5) % Input y
+ \uput[l](4,4.5){{\psk@pinylabel}} % Name y
+ \uput[u](4.5,4.4){{\psk@pinynumber}} % Number y
+ \ifPst@invertpiny
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 4.5){{\psk@bubblesize}} % Invert Input y
+ \fi
+ \fi
+ % z
+ \ifPst@pinz
+ \psline(4,5)(5,5) % Input z
+ \uput[l](4,5){{\psk@pinzlabel}} % Name z
+ \uput[u](4.5,4.9){{\psk@pinznumber}} % Number z
+ \ifPst@invertpinz
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 5){{\psk@bubblesize}} % Invert Input z
+ \fi
+ \fi
+ % aa
+ \ifPst@pinaa
+ \psline(4,5.5)(5,5.5) % Input aa
+ \uput[l](4,5.5){{\psk@pinaalabel}} % Name aa
+ \uput[u](4.5,5.4){{\psk@pinaanumber}} % Number aa
+ \ifPst@invertpinaa
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 5.5){{\psk@bubblesize}} % Invert Input aa
+ \fi
+ \fi
+ % ab
+ \ifPst@pinab
+ \psline(4,6)(5,6) % Input ab
+ \uput[l](4,6){{\psk@pinablabel}} % Name ab
+ \uput[u](4.5,5.9){{\psk@pinabnumber}} % Number ab
+ \ifPst@invertpinab
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 6){{\psk@bubblesize}} % Invert Input ab
+ \fi
+ \fi
+ % ac
+ \ifPst@pinac
+ \psline(4,6.5)(5,6.5) % Input ac
+ \uput[l](4,6.5){{\psk@pinaclabel}} % Name ac
+ \uput[u](4.5,6.4){{\psk@pinacnumber}} % Number ac
+ \ifPst@invertpinac
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 6.5){{\psk@bubblesize}} % Invert Input ac
+ \fi
+ \fi
+ % ad
+ \ifPst@pinad
+ \psline(4,7)(5,7) % Input ad
+ \uput[l](4,7){{\psk@pinadlabel}} % Name ad
+ \uput[u](4.5,6.9){{\psk@pinadnumber}} % Number ad
+ \ifPst@invertpinad
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 7){{\psk@bubblesize}} % Invert Input ad
+ \fi
+ \fi
+ % ae
+ \ifPst@pinae
+ \psline(4,7.5)(5,7.5) % Input ae
+ \uput[l](4,7.5){{\psk@pinaelabel}} % Name ae
+ \uput[u](4.5,7.4){{\psk@pinaenumber}} % Number ae
+ \ifPst@invertpinae
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 7.5){{\psk@bubblesize}} % Invert Input ae
+ \fi
+ \fi
+ % af
+ \ifPst@pinaf
+ \psline(4,8)(5,8) % Input af
+ \uput[l](4,8){{\psk@pinaflabel}} % Name af
+ \uput[u](4.5,7.9){{\psk@pinafnumber}} % Number af
+ \ifPst@invertpinaf
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 8){{\psk@bubblesize}} % Invert Input af
+ \fi
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,8.5)(4,8.5)(4,0)(1,0)
+ \fi
+ %
+ % Top Pins
+ %
+ % tl
+ \ifPst@pintl
+ \pnode(\icleft,\icheight){A}
+ \pnode([angle=90,offset=-0.1]A){B}
+ \psline(A)([angle=0,offset=1]A) % Input tl
+ \uput[d](A){{\psk@pintllabel}} % Name tl
+ \uput[l]([angle=0,offset=0.55]B){{\psk@pintlnumber}} % Number tl
+ \ifPst@invertpintl
+ \pscircle[fillstyle=solid]([angle=0,offset=\psk@bubblesize]A){{\psk@bubblesize}} % Invert Input tl
+ \fi
+ \fi
+ % tc
+ \ifPst@pintc
+ \pnode(\icmid,\icheight){A}
+ \pnode([angle=90,offset=-0.1]A){B}
+ \psline(A)([angle=0,offset=1]A) % Input tc
+ \uput[d](A){{\psk@pintclabel}} % Name tc
+ \uput[l]([angle=0,offset=0.55]B){{\psk@pintcnumber}} % Number tc
+ \ifPst@invertpintc
+ \pscircle[fillstyle=solid]([angle=0,offset=\psk@bubblesize]A){{\psk@bubblesize}} % Invert Input tc
+ \fi
+ \fi
+ % tr
+ \ifPst@pintr
+ \pnode(\icright,\icheight){A}
+ \pnode([angle=90,offset=-0.1]A){B}
+ \psline(A)([angle=0,offset=1]A) % Input tr
+ \uput[d](A){{\psk@pintrlabel}} % Name tr
+ \uput[l]([angle=0,offset=0.55]B){{\psk@pintrnumber}} % Number tr
+ \ifPst@invertpintc
+ \pscircle[fillstyle=solid]([angle=0,offset=\psk@bubblesize]A){{\psk@bubblesize}} % Invert Input tr
+ \fi
+ \fi
+ %
+ % Bottom Pins
+ %
+ % bl
+ \ifPst@pinbl
+ \pnode(\icleft,0){A}
+ \pnode([angle=-90,offset=0.1]A){B}
+ \psline(A)([angle=0,offset=-1]A) % Input bl
+ \uput[u](A){{\psk@pinbllabel}} % Name bl
+ \uput[l]([angle=0,offset=-0.55]B){{\psk@pinblnumber}} % Number bl
+ \ifPst@invertpinbl
+ \pscircle[fillstyle=solid]([angle=0,offset=-\psk@bubblesize]A){{\psk@bubblesize}} % Invert Input bl
+ \fi
+ \fi
+ % bc
+ \ifPst@pinbc
+ \pnode(\icmid,0){A}
+ \pnode([angle=-90,offset=0.1]A){B}
+ \psline(A)([angle=0,offset=-1]A) % Input bc
+ \uput[u](A){{\psk@pinbclabel}} % Name bc
+ \uput[l]([angle=0,offset=-0.55]B){{\psk@pinbcnumber}} % Number bc
+ \ifPst@invertpinbc
+ \pscircle[fillstyle=solid]([angle=0,offset=-\psk@bubblesize]A){{\psk@bubblesize}} % Invert Input bc
+ \fi
+ \fi
+ % br
+ \ifPst@pinbr
+ \pnode(\icright,0){A}
+ \pnode([angle=-90,offset=0.1]A){B}
+ \psline(A)([angle=0,offset=-1]A) % Input br
+ \uput[u](A){{\psk@pinbrlabel}} % Name br
+ \uput[l]([angle=0,offset=-0.55]B){{\psk@pinbrnumber}} % Number br
+ \ifPst@invertpinbc
+ \pscircle[fillstyle=solid]([angle=0,offset=-\psk@bubblesize]A){{\psk@bubblesize}} % Invert Input br
+ \fi
+ \fi
+ % Name
+ \uput[r](\icwidth,0){#4}
+ }}%
+\ignorespaces
+}
+
+% NOT Gate \logicnot
+%
+% Input at (+0,+1)
+% Output at (+3.5,+1)
+%
+\def\logicnot{\@ifnextchar[{\pst@logicnot}{\pst@logicnot[]}}
+\def\pst@logicnot[#1]{\@ifnextchar({\pst@logicnoti[#1]{0}}{\pst@logicnoti[#1]}}
+\def\pst@logicnoti[#1]#2(#3)#4{{%
+ \psset{#1}%
+ \rput{#2}(#3){
+ % Input
+ \psline(0,1)(1,1) % Input
+ \ifPst@invertinput
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input
+ \fi
+ % Body
+ \ifPst@iec
+ \psline[linewidth=1.5\pslinewidth](1,0)(2.5,0)(2.5,2)(1,2)(1,0)
+ \uput[u](1.75,1.25){1}
+ \else
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,2)(2.5,1)(1,0)
+ \fi
+ % Output
+ \psline(2.5,1)(3.5,1)
+ \ifPst@invertoutput
+ \ifPst@iecinvert
+ \psline(2.5,1.25)(3,1)
+ \else
+ \pscircle[fillstyle=solid](! 2.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \fi
+ \fi
+ % Name
+ \uput[r](2.5,0){#4}
+ \psset{}
+ }}%
+\ignorespaces
+}
+
+% AND Gate (NAND Gate) \logicand
+%
+% 2-Input
+% Input A at (+0,+1)
+% Input B at ()
+% Output at (+3.5,+1)
+%
+% 3-Input
+% Input A at (+0,+1)
+% Input B at ()
+% Input C at ()
+% Output at (+3.5,+1)
+%
+% 4-Input
+% Input A at (+0,+1)
+% Input B at ()
+% Input C at ()
+% Input D at ()
+% Output at (+3.5,+1)
+%
+
+\def\logicand{\@ifnextchar[{\pst@logicand}{\pst@logicand[]}}
+\def\pst@logicand[#1]{\@ifnextchar({\pst@logicandi[#1]{0}}{\pst@logicandi[#1]}}
+\def\pst@logicandi[#1]#2(#3)#4{{%
+ \psset{#1}
+ \rput{#2}(#3){
+ % Inputs
+ \ifcase\psk@ninputs\or
+ \ifPst@inputa
+ \psline(0,1)(1,1) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.5)(1,1.5) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,0.5)(1,0.5) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.5)(1,1.5) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,1)(1,1) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.5)(1,0.5) % Input C
+ \ifPst@invertinputc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input C
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.75)(1,1.75) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.75){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,1.25)(1,1.25) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.25){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.75)(1,0.75) % Input C
+ \ifPst@invertinputc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.75){{\psk@bubblesize}} % Invert Input C
+ \fi
+ \fi
+ \ifPst@inputd
+ \psline(0,0.25)(1,0.25) % Input D
+ \ifPst@invertinputd
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.25){{\psk@bubblesize}} % Invert Input D
+ \fi
+ \fi
+ \fi
+ % Body
+ \ifPst@iec
+ \psline[linewidth=1.5\pslinewidth](1,0)(2.5,0)(2.5,2)(1,2)(1,0)
+ \uput[u](1.75,1.25){\&}
+ \else
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,2)
+ \psline[linewidth=1.5\pslinewidth](1,0)(2.5,0)
+ \psline[linewidth=1.5\pslinewidth](1,2)(2.5,2)
+ \psbezier[linewidth=1.5\pslinewidth](2.5,0)(3.5,0)(3.5,1)(3.5,1)
+ \psbezier[linewidth=1.5\pslinewidth](3.5,1)(3.5,1)(3.5,2)(2.5,2)
+ \fi
+ % Output
+ \ifPst@iec
+ \psline(2.5,1)(3.5,1)
+ \else
+ \psline(3.5,1)(4.5,1)
+ \fi
+ \ifPst@invertoutput
+ \ifPst@iecinvert
+ \psline(2.5,1.25)(3,1)
+ \else
+ \ifPst@iec
+ \pscircle[fillstyle=solid](! 2.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \else
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \fi
+ \fi
+ \fi
+ % Name
+ \ifPst@iec
+ \uput[r](2.5,0){#4}
+ \else
+ \uput[r](3.25,0){#4}
+ \fi
+ }}%
+\ignorespaces
+}
+
+% OR Gate (NOR Gate) \logicor
+%
+% Input at (+0,+1)
+% Output at (+3.5,+1)
+%
+\def\logicor{\@ifnextchar[{\pst@logicor}{\pst@logicor[]}}
+\def\pst@logicor[#1]{\@ifnextchar({\pst@logicori[#1]{0}}{\pst@logicori[#1]}}
+\def\pst@logicori[#1]#2(#3)#4{{%
+ \psset{#1}%
+ \rput{#2}(#3){
+ % Inputs
+ \ifcase\psk@ninputs\or
+ \ifPst@inputa
+ \psline(0,1)(1.08,1) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1.08 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.5)(1,1.5) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,0.5)(1,0.5) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.5)(1,1.5) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,1)(1.06,1) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1.09 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.5)(1,0.5) % Input C
+ \ifPst@invertinputc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input C
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.75)(0.88,1.75) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 0.87 \space\psk@bubblesize\space sub 1.75){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,1.25)(1.05,1.25) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1.07 \space\psk@bubblesize\space sub 1.25){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.75)(1.05,0.75) % Input C
+ \ifPst@invertinputc
+ \pscircle[fillstyle=solid](! 1.07 \space\psk@bubblesize\space sub 0.75){{\psk@bubblesize}} % Invert Input C
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.25)(0.88,0.25) % Input D
+ \ifPst@invertinputd
+ \pscircle[fillstyle=solid](! 0.87 \space\psk@bubblesize\space sub 0.25){{\psk@bubblesize}} % Invert Input D
+ \fi
+ \fi
+ \fi
+ % Body
+ \ifPst@iec
+ \psline[linewidth=1.5\pslinewidth](1,0)(2.5,0)(2.5,2)(1,2)(1,0)
+ \uput[u](1.75,1.25){$\geq 1$}
+ \else
+ \psbezier[linewidth=1.5\pslinewidth](0.7,0)(1.2,0.5)(1.2,1.5)(0.7,2)
+ \psline[linewidth=1.5\pslinewidth](0.7,0)(2,0)
+ \psline[linewidth=1.5\pslinewidth](0.7,2)(2,2)
+ \psbezier[linewidth=1.5\pslinewidth](2,0)(3,0)(3.5,1)(3.5,1)
+ \psbezier[linewidth=1.5\pslinewidth](3.5,1)(3.5,1)(3,2)(2,2)
+ \fi
+ % Output
+ \ifPst@iec
+ \psline(2.5,1)(3.5,1)
+ \else
+ \psline(3.5,1)(4.5,1)
+ \fi
+ \ifPst@invertoutput
+ \ifPst@iecinvert
+ \psline(2.5,1.25)(3,1)
+ \else
+ \ifPst@iec
+ \pscircle[fillstyle=solid](! 2.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \else
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \fi
+ \fi
+ \fi
+ % Name
+ \ifPst@iec
+ \uput[r](2.5,0){#4}
+ \else
+ \uput[r](3.25,0){#4}
+ \fi
+ }}%
+\ignorespaces
+}
+
+% Exclusive-OR Gate (Exclusive NOR Gate) \logicxor
+%
+% Input at (+0,+1)
+% Output at (+3.5,+1)
+%
+\def\logicxor{\@ifnextchar[{\pst@logicxor}{\pst@logicxor[]}}
+\def\pst@logicxor[#1]{\@ifnextchar({\pst@logicxori[#1]{0}}{\pst@logicxori[#1]}}
+\def\pst@logicxori[#1]#2(#3)#4{{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ % Inputs
+ \ifcase\psk@ninputs\or
+ \ifPst@inputa
+ \psline(0,1)(1.08,1) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1.08 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.5)(1,1.5) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,0.5)(1,0.5) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.5)(1,1.5) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,1)(1.06,1) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1.09 \space\psk@bubblesize\space sub 1){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.5)(1,0.5) % Input C
+ \ifPst@invertinputc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.5){{\psk@bubblesize}} % Invert Input C
+ \fi
+ \fi
+ \or
+ \ifPst@inputa
+ \psline(0,1.75)(0.88,1.75) % Input A
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 0.87 \space\psk@bubblesize\space sub 1.75){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,1.25)(1.05,1.25) % Input B
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1.07 \space\psk@bubblesize\space sub 1.25){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@inputc
+ \psline(0,0.75)(1.05,0.75) % Input C
+ \ifPst@invertinputc
+ \pscircle[fillstyle=solid](! 1.07 \space\psk@bubblesize\space sub 0.75){{\psk@bubblesize}} % Invert Input C
+ \fi
+ \fi
+ \ifPst@inputd
+ \psline(0,0.25)(0.88,0.25) % Input D
+ \ifPst@invertinputd
+ \pscircle[fillstyle=solid](! 0.87 \space\psk@bubblesize\space sub 0.25){{\psk@bubblesize}} % Invert Input D
+ \fi
+ \fi
+ \fi
+ % Body
+ \ifPst@iec
+ \psline[linewidth=1.5\pslinewidth](1,0)(2.5,0)(2.5,2)(1,2)(1,0)
+ \uput[u](1.75,1.25){$= 1$}
+ \else
+ \psbezier[linewidth=1.5\pslinewidth](0.7,0)(1.2,0.5)(1.2,1.5)(0.7,2)
+ \psbezier[linewidth=1.5\pslinewidth](1,0)(1.5,0.5)(1.5,1.5)(1,2)
+ \psline[linewidth=1.5\pslinewidth](1,0)(2,0)
+ \psline[linewidth=1.5\pslinewidth](1,2)(2,2)
+ \psbezier[linewidth=1.5\pslinewidth](2,0)(3,0)(3.5,1)(3.5,1)
+ \psbezier[linewidth=1.5\pslinewidth](3.5,1)(3.5,1)(3,2)(2,2)
+ \fi
+ % Output
+ \ifPst@iec
+ \psline(2.5,1)(3.5,1)
+ \else
+ \psline(3.5,1)(4.5,1)
+ \fi
+ \ifPst@invertoutput
+ \ifPst@iecinvert
+ \psline(2.5,1.25)(3,1)
+ \else
+ \ifPst@iec
+ \pscircle[fillstyle=solid](! 2.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \else
+ \pscircle[fillstyle=solid](! 3.5 \space\psk@bubblesize\space add 1){{\psk@bubblesize}} % Invert Output
+ \fi
+ \fi
+ \fi
+ % Name
+ \ifPst@iec
+ \uput[r](2.5,0){#4}
+ \else
+ \uput[r](3.25,0){#4}
+ \fi
+ }}%
+\ignorespaces
+}
+
+% Flip-Flop
+%
+% Input A at (+0,+2.25)
+% Input B at (+0,+0.75)
+% Output Q at (+3.5,+2.25)
+% Output Not Q at (+3.5,+0.75)
+%
+\def\logicff{\@ifnextchar[{\pst@logicff}{\pst@logicff[]}}
+\def\pst@logicff[#1]{\@ifnextchar({\pst@logicffi[#1]{0}}{\pst@logicffi[#1]}}
+\def\pst@logicffi[#1]#2(#3)#4{{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ % Inputs
+ \ifPst@inputa
+ \psline(0,2.25)(1,2.25) % Input A
+ \uput[r](1,2.25){\psk@inputalabel} % Input A Label
+ \ifPst@invertinputa
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.25){{\psk@bubblesize}} % Invert Input A
+ \fi
+ \fi
+ \ifPst@inputb
+ \psline(0,0.75)(1,0.75) % Input B
+ \uput[r](1,0.75){\psk@inputblabel} % Input B Label
+ \ifPst@invertinputb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.75){{\psk@bubblesize}} % Invert Input B
+ \fi
+ \fi
+ \ifPst@enable
+ \psline(0,1.5)(1,1.5) % Enable
+ \uput[r](1,1.5){\psk@inputenlabel} % Enable Label
+ \ifPst@invertenable
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Enable
+ \fi
+ \fi
+ \ifPst@clock
+ \psline(0,1.5)(1,1.5) % Clock
+ \psline(1,1.7)(1.4,1.5)(1,1.3)
+ \uput[r](1.4,1.5){\psk@inputcllabel} % Clock Label
+ \ifPst@invertclock
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.5){{\psk@bubblesize}} % Invert Clock
+ \fi
+ \fi
+ \ifPst@set
+ \psline(2,4)(2,3) % Set
+ \uput[d](2,3){$S$} % Set Label
+ \ifPst@invertset
+ \pscircle[fillstyle=solid](! 2 3 \space\psk@bubblesize\space add){{\psk@bubblesize}} % Invert Set
+ \fi
+ \fi
+ \ifPst@reset
+ \psline(2,-1)(2,0) % Reset
+ \uput[u](2,0){$R$} % Reset Label
+ \ifPst@invertreset
+ \pscircle[fillstyle=solid](2,-\psk@bubblesize){{\psk@bubblesize}} % Invert Reset
+ \fi
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,3)(3,3)(3,0)(1,0)
+ % Outputs
+ \ifPst@outputa
+ \psline(3,2.25)(4,2.25) % Output Q
+ \uput[l](3,2.25){\psk@outputalabel}
+ \ifPst@invertoutputa
+ \pscircle[fillstyle=solid](! 3 \space\psk@bubblesize\space add 2.25){{\psk@bubblesize}} % Invert Q
+ \fi
+ \fi
+ \ifPst@outputb
+ \psline(3,0.75)(4,0.75) % Output Not Q
+ \uput[l](3,0.75){\psk@outputblabel}
+ \ifPst@invertoutputb
+ \pscircle[fillstyle=solid](! 3 \space\psk@bubblesize\space add 0.75){{\psk@bubblesize}}
+ \fi
+ \fi
+ % Name
+ \uput[r](3,0){#4}
+ }}%
+\ignorespaces
+}
+
+
+%
+% 7-Segment Display \sevensegmentdisplay
+%
+
+\def\sevensegmentdisplay{\@ifnextchar[{\pst@sevensegmentdisplay}{\pst@sevensegmentdisplay[]}}
+\def\pst@sevensegmentdisplay[#1]{\@ifnextchar({\pst@sevensegmentdisplayi[#1]{0}}{\pst@sevensegmentdisplayi[#1]}}
+\def\pst@sevensegmentdisplayi[#1]#2(#3)#4{{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ % Left Side Pins
+ % la
+ \ifPst@pinla
+ \psline(0,3.75)(1,3.75) % Input la
+ \uput[r](1,3.75){{\psk@pinlalabel}} % Name la
+ \uput[u](0.5,3.65){{\psk@pinlanumber}} % Number la
+ \ifPst@invertpinla
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3.75){{\psk@bubblesize}} % Invert Input la
+ \fi
+ \fi
+ % lb
+ \ifPst@pinlb
+ \psline(0,3.25)(1,3.25) % Input lb
+ \uput[r](1,3.25){{\psk@pinlblabel}} % Name lb
+ \uput[u](0.5,3.15){{\psk@pinlbnumber}} % Number lb
+ \ifPst@invertpinlb
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 3.25){{\psk@bubblesize}} % Invert Input lb
+ \fi
+ \fi
+ % lc
+ \ifPst@pinlc
+ \psline(0,2.75)(1,2.75) % Input lc
+ \uput[r](1,2.75){{\psk@pinlclabel}} % Name lc
+ \uput[u](0.5,2.65){{\psk@pinlcnumber}} % Number lc
+ \ifPst@invertpinlc
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.75){{\psk@bubblesize}} % Invert Input lc
+ \fi
+ \fi
+ % ld
+ \ifPst@pinld
+ \psline(0,2.25)(1,2.25) % Input ld
+ \uput[r](1,2.25){{\psk@pinldlabel}} % Name ld
+ \uput[u](0.5,2.15){{\psk@pinldnumber}} % Number ld
+ \ifPst@invertpinld
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 2.25){{\psk@bubblesize}} % Invert Input ld
+ \fi
+ \fi
+ % le
+ \ifPst@pinle
+ \psline(0,1.75)(1,1.75) % Input le
+ \uput[r](1,1.75){{\psk@pinlelabel}} % Name le
+ \uput[u](0.5,1.65){{\psk@pinlenumber}} % Number le
+ \ifPst@invertpinle
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.75){{\psk@bubblesize}} % Invert Input le
+ \fi
+ \fi
+ % lf
+ \ifPst@pinlf
+ \psline(0,1.25)(1,1.25) % Input lf
+ \uput[r](1,1.25){{\psk@pinlflabel}} % Name lf
+ \uput[u](0.5,1.15){{\psk@pinlfnumber}} % Number lf
+ \ifPst@invertpinlf
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 1.25){{\psk@bubblesize}} % Invert Input lf
+ \fi
+ \fi
+ % lg
+ \ifPst@pinlg
+ \psline(0,0.75)(1,0.75) % Input lg
+ \uput[r](1,0.75){{\psk@pinlglabel}} % Name lg
+ \uput[u](0.5,0.65){{\psk@pinlgnumber}} % Number lg
+ \ifPst@invertpinlg
+ \pscircle[fillstyle=solid](! 1 \space\psk@bubblesize\space sub 0.75){{\psk@bubblesize}} % Invert Input lg
+ \fi
+ \fi
+ % Right Side Pins
+ % rg
+ \ifPst@pinrg
+ \psline(4.5,0.75)(5.5,0.75) % Input rg
+ \uput[l](4.5,0.75){{\psk@pinrglabel}} % Name rg
+ \uput[u](5,0.65){{\psk@pinrgnumber}} % Number rg
+ \ifPst@invertpinrg
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 0.75){{\psk@bubblesize}} % Invert Input rg
+ \fi
+ \fi
+ % rf
+ \ifPst@pinrf
+ \psline(4.5,1.25)(5.5,1.25) % Input rf
+ \uput[l](4.5,1.25){{\psk@pinrflabel}} % Name rf
+ \uput[u](5,1.15){{\psk@pinrfnumber}} % Number rf
+ \ifPst@invertpinf
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 1.25){{\psk@bubblesize}} % Invert Input rf
+ \fi
+ \fi
+ % re
+ \ifPst@pinre
+ \psline(4.5,1.75)(5.5,1.75) % Input re
+ \uput[l](4.5,1.75){{\psk@pinrelabel}} % Name re
+ \uput[u](5,1.65){{\psk@pinrenumber}} % Number re
+ \ifPst@invertpinre
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 1.75){{\psk@bubblesize}} % Invert Input re
+ \fi
+ \fi
+ % rd
+ \ifPst@pinrd
+ \psline(4.5,2.25)(5.5,2.25) % Input rd
+ \uput[l](4.5,2.25){{\psk@pinrdlabel}} % Name rd
+ \uput[u](5,2.15){{\psk@pinrdnumber}} % Number rd
+ \ifPst@invertpinrd
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 2.25){{\psk@bubblesize}} % Invert Input rd
+ \fi
+ \fi
+ % rc
+ \ifPst@pinrc
+ \psline(4.5,2.75)(5.5,2.75) % Input rc
+ \uput[l](4.5,2.75){{\psk@pinrclabel}} % Name rc
+ \uput[u](5,2.65){{\psk@pinrcnumber}} % Number rc
+ \ifPst@invertpinrc
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 2.75){{\psk@bubblesize}} % Invert Input rc
+ \fi
+ \fi
+ % rb
+ \ifPst@pinrb
+ \psline(4.5,3.25)(5.5,3.25) % Input rb
+ \uput[l](4.5,3.25){{\psk@pinrblabel}} % Name rb
+ \uput[u](5,3.15){{\psk@pinrbnumber}} % Number rb
+ \ifPst@invertpinrb
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 3.25){{\psk@bubblesize}} % Invert Input rb
+ \fi
+ \fi
+ % ra
+ \ifPst@pinra
+ \psline(4.5,3.75)(5.5,3.75) % Input ra
+ \uput[l](4.5,3.75){{\psk@pinralabel}} % Name ra
+ \uput[u](5,3.65){{\psk@pinranumber}} % Number ra
+ \ifPst@invertpinra
+ \pscircle[fillstyle=solid](! 4 \space\psk@bubblesize\space add 3.75){{\psk@bubblesize}} % Invert Input ra
+ \fi
+ \fi
+ % Top Pins
+ % ta
+ \ifPst@pinta
+ \psline(1.75,4.5)(1.75,5.5) % Input ta
+ \uput[d](1.75,4.5){{\psk@pintalabel}} % Name ta
+ \uput[l](1.75,5.05){{\psk@pintanumber}} % Number ta
+ \ifPst@invertpinta
+ \pscircle[fillstyle=solid](1.75,4.5){{\psk@bubblesize}} % Invert Input ta
+ \fi
+ \fi
+ % tb
+ \ifPst@pintb
+ \psline(2.25,4.5)(2.25,5.5) % Input tb
+ \uput[d](2.25,4.5){{\psk@pintblabel}} % Name tb
+ \uput[l](2.25,5.05){{\psk@pintbnumber}} % Number tb
+ \ifPst@invertpintb
+ \pscircle[fillstyle=solid](2.25,4.5){{\psk@bubblesize}} % Invert Input tb
+ \fi
+ \fi
+ % tc
+ \ifPst@pintc
+ \psline(2.75,4.5)(2.75,5.5) % Input tc
+ \uput[d](2.75,4.5){{\psk@pintclabel}} % Name tc
+ \uput[l](2.75,5.05){{\psk@pintcnumber}} % Number tc
+ \ifPst@invertpintc
+ \pscircle[fillstyle=solid](2.75,4.5){{\psk@bubblesize}} % Invert Input tc
+ \fi
+ \fi
+ % td
+ \ifPst@pintd
+ \psline(3.25,4.5)(3.25,5.5) % Input td
+ \uput[d](3.25,4.5){{\psk@pintdlabel}} % Name td
+ \uput[l](3.25,5.05){{\psk@pintdnumber}} % Number td
+ \ifPst@invertpintd
+ \pscircle[fillstyle=solid](3.25,4.5){{\psk@bubblesize}} % Invert Input td
+ \fi
+ \fi
+ % te
+ \ifPst@pinte
+ \psline(3.75,4.5)(3.75,5.5) % Input te
+ \uput[d](3.75,4.5){{\psk@pintelabel}} % Name te
+ \uput[l](3.75,5.05){{\psk@pintenumber}} % Number te
+ \ifPst@invertpinte
+ \pscircle[fillstyle=solid](3.75,4.5){{\psk@bubblesize}} % Invert Input te
+ \fi
+ \fi
+ % Bottom Pins
+ % ba
+ \ifPst@pinba
+ \psline(1.75,0)(1.75,-1) % Input ba
+ \uput[u](1.75,0){{\psk@pinbalabel}} % Name ba
+ \uput[l](1.75,-0.55){{\psk@pinbanumber}} % Number ba
+ \ifPst@invertpinba
+ \pscircle[fillstyle=solid](1.75,0){{\psk@bubblesize}} % Invert Input ba
+ \fi
+ \fi
+ % bb
+ \ifPst@pinbb
+ \psline(2.25,0)(2.25,-1) % Input bb
+ \uput[u](2.25,0){{\psk@pinbblabel}} % Name bb
+ \uput[l](2.25,-0.55){{\psk@pinbbnumber}} % Number bb
+ \ifPst@invertpinbb
+ \pscircle[fillstyle=solid](2.25,0){{\psk@bubblesize}} % Invert Input bb
+ \fi
+ \fi
+ % bc
+ \ifPst@pinbc
+ \psline(2.75,0)(2.75,-1) % Input bc
+ \uput[u](2.75,0){{\psk@pinbclabel}} % Name bc
+ \uput[l](2.75,-0.55){{\psk@pinbcnumber}} % Number bc
+ \ifPst@invertpinbc
+ \pscircle[fillstyle=solid](2.75,0){{\psk@bubblesize}} % Invert Input bc
+ \fi
+ \fi
+ % bd
+ \ifPst@pinbd
+ \psline(3.25,0)(3.25,-1) % Input bd
+ \uput[u](3.25,0){{\psk@pinbdlabel}} % Name bd
+ \uput[l](3.25,-0.55){{\psk@pinbdnumber}} % Number bd
+ \ifPst@invertpinbd
+ \pscircle[fillstyle=solid](3.25,0){{\psk@bubblesize}} % Invert Input bd
+ \fi
+ \fi
+ % be
+ \ifPst@pinbe
+ \psline(3.75,0)(3.75,-1) % Input be
+ \uput[u](3.75,0){{\psk@pinbelabel}} % Name be
+ \uput[l](3.75,-0.55){{\psk@pinbenumber}} % Number be
+ \ifPst@invertpinbe
+ \pscircle[fillstyle=solid](3.75,0){{\psk@bubblesize}} % Invert Input be
+ \fi
+ \fi
+ % Right Decimal Point
+ \ifPst@dpright
+ \pscircle[linewidth=0.5\pslinewidth](3.75,0.75){0.1}
+ \fi
+ % Left Decimal Point
+ \ifPst@dpleft
+ \pscircle[linewidth=0.5\pslinewidth](1.75,0.75){0.1}
+ \fi
+ % Body
+ \psline[linewidth=1.5\pslinewidth](1,0)(1,4.5)(4.5,4.5)(4.5,0)(1,0)
+ % Segments
+ \ifcase\psk@segmentdisplay
+ % Display 0
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 1
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,2.25)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 2
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 3
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 4
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.25)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 5
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 6
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 7
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 8
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display 9
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9,fillstyle=solid,fillcolor=\psk@segmentcolor](2.05,2.15)(3.45,2.35) % g
+ \or
+ % Display Blank
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,3.65)(3.45,3.85) % a
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](3.45,2.35)(3.65,3.65) % b
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](3.45,0.85)(3.65,2.15) % c
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,0.65)(3.45,0.85) % d
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,0.85)(2.05,2.15) % e
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](1.85,2.35)(2.05,3.65) % f
+ \psframe[linewidth=0.5\pslinewidth,framearc=.9](2.05,2.15)(3.45,2.35) % g
+ \fi
+ % Segment Labels
+ \ifPst@segmentlabels
+ \uput[d](2.75,3.75){\footnotesize{a}}
+ \uput[l](3.55,3.05){\footnotesize{b}}
+ \uput[l](3.55,1.55){\footnotesize{c}}
+ \uput[u](2.75,0.75){\footnotesize{d}}
+ \uput[r](1.95,1.55){\footnotesize{e}}
+ \uput[r](1.95,3.05){\footnotesize{f}}
+ \uput[u](2.75,2.35){\footnotesize{g}}
+ \fi
+ % Name
+ \uput[r](4.5,0){#4}%
+ }}%
+\ignorespaces
+}
+
+%
+% PLC Ladder Logic
+%
+
+%
+% \xic (XIC)
+%
+\def\xic{\@ifnextchar[{\pst@xic}{\pst@xic[]}}
+\def\pst@xic[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){
+ % Input
+ \psline(-1,0)(-0.25,0) % Input
+ % Body
+ \psline(-0.6,-0.35)(-0.25,-0.35)(-0.25,0.35)(-0.6,0.35)
+ \psline(0.6,-0.35)(0.25,-0.35)(0.25,0.35)(0.6,0.35)
+ % Output
+ \psline(1,0)(0.25,0)
+ % Names
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ \psset{}
+ }}%
+\ignorespaces
+}
+
+%
+% \xio (XIO)
+%
+\def\xio{\@ifnextchar[{\pst@xio}{\pst@xio[]}}
+\def\pst@xio[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){
+ % Input
+ \psline(-1,0)(-0.25,0) % Input
+ % Body
+ \psline(-0.6,-0.35)(-0.25,-0.35)(-0.25,0.35)(-0.6,0.35)
+ \psline(0.6,-0.35)(0.25,-0.35)(0.25,0.35)(0.6,0.35)
+ \psline(-0.6,-0.35)(0.6,0.35)
+ % Output
+ \psline(1,0)(0.25,0)
+ % Name
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ }}%
+\ignorespaces
+}
+
+%
+% \ote (OTE)
+%
+\def\ote{\@ifnextchar[{\pst@ote}{\pst@ote[]}}
+\def\pst@ote[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.6,0) % Input
+ % Body
+ \psline(-0.2,-0.35)(-0.6,-0.1)(-0.6,0.1)(-0.2,0.35)
+ \psline(0.2,-0.35)(0.6,-0.1)(0.6,0.1)(0.2,0.35)
+ % Output
+ \psline(1,0)(0.6,0)
+ % Name
+ \ifPst@latch
+ \uput[u](0,-0.3){L} % Latch
+ \fi
+ \ifPst@unlatch
+ \uput[u](0,-0.3){U} % Unlatch
+ \fi
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ }}%
+\ignorespaces
+}
+%
+% \osr (OSR)
+%
+\def\osr{\@ifnextchar[{\pst@osr}{\pst@osr[]}}
+\def\pst@osr[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.7,0) % Input
+ % Body
+ \psline(-0.4,-0.35)(-0.7,-0.35)(-0.7,0.35)(-0.4,0.35)
+ \psline(0.4,-0.35)(0.7,-0.35)(0.7,0.35)(0.4,0.35)
+ % Output
+ \psline(1,0)(0.7,0)
+ % Name
+ \uput[u](0,-0.3){OSR} % OSR
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ }}%
+\ignorespaces
+}
+
+%
+% \res (RES)
+%
+\def\res{\@ifnextchar[{\pst@res}{\pst@res[]}}
+\def\pst@res[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.7,0) % Input
+ % Body
+ \psline(-0.4,-0.35)(-0.7,-0.1)(-0.7,0.1)(-0.4,0.35)
+ \psline(0.4,-0.35)(0.7,-0.1)(0.7,0.1)(0.4,0.35)
+ % Output
+ \psline(1,0)(0.7,0)
+ % Name
+ \uput[u](0,-0.3){RES} % RES
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ }}%
+\ignorespaces
+}
+
+%
+% Relay Ladder Logic
+%
+
+%
+% \swpb (Switch PB)
+%
+\def\swpb{\@ifnextchar[{\pst@swpb}{\pst@swpb[]}}
+\def\pst@swpb[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.5,0) % Input
+ % Body
+ \pscircle[fillstyle=solid](-0.4,0){0.1}
+ \pscircle[fillstyle=solid](0.4,0){0.1}
+ \ifPst@contactclosed
+ \psline[linewidth=1.5\pslinewidth](-0.4,-0.1)(0.4,-0.1)
+ \psline[linewidth=1.5\pslinewidth](0,-0.1)(0,0.4)
+ \else
+ \psline[linewidth=1.5\pslinewidth](-0.4,0.3)(0.4,0.3)
+ \psline[linewidth=1.5\pslinewidth](0,0.3)(0,0.7)
+ \fi
+ % Output
+ \psline(1,0)(0.5,0)
+ }}%
+\ignorespaces
+}
+
+%
+% \swtog (Switch NO Toggle)
+%
+\def\swtog{\@ifnextchar[{\pst@swtog}{\pst@swtog[]}}
+\def\pst@swtog[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.5,0) % Input
+ % Body
+ \pscircle[fillstyle=solid](-0.4,0){0.1}
+ \pscircle[fillstyle=solid](0.4,0){0.1}
+ \ifPst@contactclosed
+ \psline[linewidth=1.5\pslinewidth](-0.3,0)(0.4,0.1)
+ \else
+ \psline[linewidth=1.5\pslinewidth](-0.3,0)(0.3,0.4)
+ \fi
+ % Output
+ \psline(1,0)(0.5,0)
+ }}%
+\ignorespaces
+}
+
+%
+% \contact (Contact)
+%
+\def\contact{\@ifnextchar[{\pst@contact}{\pst@contact[]}}
+\def\pst@contact[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.2,0) % Input
+ % Body
+ \psline(-0.2,-0.35)(-0.2,0.35)
+ \psline(0.2,-0.35)(0.2,0.35)
+ \ifPst@contactclosed
+ \psline(-0.6,-0.35)(0.6,0.35)
+ \fi
+ % Output
+ \psline(1,0)(0.2,0)
+ % Name
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ }}%
+\ignorespaces
+}
+
+%
+% \motor (Motor Armature)
+%
+\def\armature{\@ifnextchar[{\pst@armature}{\pst@armature[]}}
+\def\pst@armature[#1](#2){{%
+ \psset{#1}%
+ \rput(#2){%
+ % Input
+ \psline(-1,0)(-0.7,0)
+ %\psline[linewidth=8pt](-0.75,0)(-0.5,0)
+ % Body
+ \psline(-0.7,0.2)(0.7,0.2)(0.7,-0.2)(-0.7,-0.2)(-0.7,0.2)
+ \pscircle[fillstyle=solid](0,0){0.5}
+ % Output
+ \psline(1,0)(0.7,0)
+ %\psline[linewidth=8pt](0.75,0)(0.5,0)
+ % Name
+ \uput[u](0,0.3){\psk@plcaddress}
+ \uput[d](0,-0.35){\psk@plcsymbol}
+ }}%
+\ignorespaces
+}
+
+%
+% Modified pst-circ Components
+%
+%
+% \newcapacitor
+%
+\def\newcapacitor{\@ifnextchar[{\pst@newcapacitor}{\pst@newcapacitor[]}}
+\def\pst@newcapacitor[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@newcapacitor}\ignorespaces}
+%
+\def\pst@draw@newcapacitor{{%
+ \psset{linewidth=1.5\pslinewidth}%
+ \psline[arrows=-](-0.1,-0.3)(-0.1,0.3)
+ \psline[arrows=-](0.1,-0.3)(0.1,0.3)
+ \pnode(-0.1,0){dipole@1}
+ \pnode(0.1,0){dipole@2}
+ \ifPst@variable%
+ \psline[arrows=->](-0.5,-0.55)(0.5,0.55)%
+ \fi
+ \ifPst@polarized%
+ \rput[u](0,0){$+$}%
+ \fi
+}}
+
+%
+% \newDiode
+%
+\def\newdiode{\@ifnextchar[{\pst@newdiode}{\pst@newdiode[]}}
+\def\pst@newdiode[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@newdiode}
+ \ignorespaces}
+%
+\def\pst@draw@newdiode{{%
+ \ifx\psk@Dstyle\pst@Dstyle@triac
+ \pspolygon[linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0)(0.25,-0.2)
+ \pspolygon[linewidth=1.5\pslinewidth](0.25,0)(-0.25,0.2)(0.25,0.4)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.25,-0.4)(-0.25,0.4)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,-0.4)(0.25,0.4)
+ \psline[arrows=-,linewidth=\pslinewidth](0.25,-0.2)(0.5,-0.3)(0.5,-0.6)
+ \else
+ \ifPst@ison%
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth,%
+ fillstyle=solid,fillcolor=black](-0.25,-0.3)(-0.25,0.3)(0.25,0)
+ \else
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth]%
+ (-0.25,-0.3)(-0.25,0.3)(0.25,0)
+ \fi
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.3)(0.25,-0.3)
+ \ifx\psk@Dstyle\pst@Dstyle@thyristor
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35)
+ \fi
+ \ifx\psk@Dstyle\pst@Dstyle@GTO
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.1,-0.12)(-0.1,-0.35)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0,-0.1)(0,-0.35)
+ \fi
+ \fi
+ \pnode(-0.25,0){dipole@1}
+ \pnode(0.25,0){dipole@2}
+}}
+
+%
+% \newZener
+%
+\def\newZener{\@ifnextchar[{\pst@newZener}{\pst@newZener[]}}
+\def\pst@newZener[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@newZener}
+ \ignorespaces}
+%
+\def\pst@draw@newZener{{%
+ \ifPst@ison%
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth,%
+ fillstyle=solid,fillcolor=black](-0.25,-0.3)(-0.25,0.3)(0.25,0)
+ \else
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth]%
+ (-0.25,-0.3)(-0.25,0.3)(0.25,0)
+ \fi
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.1,0.4)(0.25,0.3)(0.25,-0.3)(0.4,-0.4)
+ \pnode(-0.25,0){dipole@1}
+ \pnode(0.25,0){dipole@2}
+}}
+
+%
+% \newLED
+%
+\def\newLED{\@ifnextchar[{\pst@newLED}{\pst@newLED[]}}
+\def\pst@newLED[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@newLED}
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#3}\pst@tempb
+ \ignorespaces}
+%
+\def\pst@draw@newLED{{%
+ \ifPst@ison%
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth,%
+ fillstyle=solid,fillcolor=black](-0.25,-0.3)(-0.25,0.3)(0.25,0)
+ \else
+ \pspolygon[arrows=-,linewidth=1.5\pslinewidth]%
+ (-0.25,-0.3)(-0.25,0.3)(0.25,0)
+ \fi
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.25,0.3)(0.25,-0.3)
+ \multips(-0.15,0.35)(0.2,0){2}{\psline[arrows=->](0,0)(0.2,0.25)}
+ \pnode(-0.25,0){dipole@1}
+ \pnode(0.25,0){dipole@2}
+}}
+
+%
+% \newarmature
+%
+\def\newarmature{\@ifnextchar[{\pst@newarmature}{\pst@newarmature[]}}
+\def\pst@newarmature[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@newarmature}\ignorespaces}
+%
+\def\pst@draw@newarmature{{%
+ \pnode(-1,0){dipole@1}
+ \pnode(1,0){dipole@2}
+ % Input
+ \psline(-1,0)(-0.7,0)
+ % Body
+ \psline(-0.7,0.2)(0.7,0.2)(0.7,-0.2)(-0.7,-0.2)(-0.7,0.2)
+ \pscircle[fillstyle=solid](0,0){0.5}
+ % Output
+ \psline(1,0)(0.7,0)
+ % Name
+ \ifcase\psk@labelInside\or% do nothing
+ \rput(0,0){\large\bf M}\or% case 1 - motor
+ \rput(0,0){\large\bf G}% case 2 - generator
+ \fi
+}}
+
+%
+% \vdc
+%
+\def\vdc{\@ifnextchar[{\pst@vdc}{\pst@vdc[]}}
+\def\pst@vdc[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@vdc}\ignorespaces}
+%
+\def\pst@draw@vdc{{%
+ \psline[arrows=-,linewidth=1.5\pslinewidth](-0.30,-0.5)(-0.30,0.5)
+ \psline[arrows=-,linewidth=3\pslinewidth](-0.10,-0.25)(-0.10,0.25)
+ \psline[arrows=-,linewidth=1.5\pslinewidth](0.10,-0.5)(0.10,0.5)
+ \psline[arrows=-,linewidth=3\pslinewidth](0.30,-0.25)(0.30,0.25)
+ \pnode(-0.3,0){dipole@1}
+ \pnode(0.3,0){dipole@2}
+ \ifPst@variable%
+ \psline{->}(-0.75,-0.5)(0.75,0.5)%
+ \fi
+}}
+
+%
+% \vac
+%
+\def\vac{\@ifnextchar[{\pst@vac}{\pst@vac[]}}
+\def\pst@vac[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@vac
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#3}\pst@tempb
+ \rput(! %
+ \pst@tempa \pst@number{\psyunit} div /YA ED
+ \pst@number{\psxunit} div /XA ED
+ \pst@tempb \pst@number{\psyunit} div /YB ED
+ \pst@number{\psxunit} div /XB ED
+ XA XB add 2 div
+ YA YB add 2 div
+ ){\pscurve(-0.25,0)(-0.125,0.25)(0.125,-0.25)(0.25,0)}}\ignorespaces}
+%
+\def\pst@draw@vac{{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+}}
+
+%
+% \newSwitch (New Switch)
+%
+\def\newSwitch{\@ifnextchar[{\pst@newSwitch}{\pst@newSwitch[]}}
+\def\pst@newSwitch[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@newSwitch}
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#3}\pst@tempb
+ \ignorespaces}
+%
+\def\pst@draw@newSwitch{{%
+ \ifPst@ison
+ \pnode(-0.6,0){dipole@1}
+ \pnode(0.6,0){dipole@2}
+ \psline[arrows=-,linewidth=4\pslinewidth](-0.5,-0.005)(0.5,-0.005)
+ \pscircle[fillstyle=solid,fillcolor=black](-0.5,0){0.1}
+ \pscircle[fillstyle=solid,fillcolor=black](0.5,0){0.1}
+ \else
+ \pnode(-0.6,0){dipole@1}
+ \pnode(0.6,0){dipole@2}
+ \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0.5,0.5)
+ \pscircle[fillstyle=solid](-0.5,0){0.1}
+ \pscircle[fillstyle=solid](0.5,0){0.1}
+ \fi
+}}
+%
+% PHOTOVOLTAIC CELL
+%
+% \cell
+%
+\def\cell{\@ifnextchar[{\pst@cell}{\pst@cell[]}}
+\def\pst@cell[#1](#2)(#3)#4{{%
+ \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@cell}
+% \pst@getcoor{#2}\pst@tempa
+% \pst@getcoor{#3}\pst@tempb
+ \ignorespaces}
+%
+\def\pst@draw@cell{{%
+ \pscircle(0.1,0){0.5}
+ \psline[linewidth=2.5\pslinewidth](-0.1,-0.2)(-0.1, 0.2)
+ \psline[linewidth=2\pslinewidth](0.1,-0.4)(0.1, 0.4)
+ \psline[arrows=->](0.9,1)(0.5,0.6)
+ \psline[arrows=->](0.6,1)(0.2,0.6)
+ \wire(-0.6,0)(-0.1,0)
+ \wire(0.6,0)(0.1,0)
+ \pnode(-0.6,0){dipole@1}
+ \pnode(0.6,0){dipole@2}%
+}\ignorespaces}%
+%
+% \splitter
+%
+\def\splitter{\pst@object{splitter}}
+\def\splitter@i(#1)(#2)(#3)#4#5{%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y2 def
+ XC YC){C@}
+ \begingroup
+ \use@keep@par
+ \ifx\psk@tripole@style\pst@tripole@style@top
+ \addbefore@par{labeloffset=-0.9,dimen=middle}%
+ \else
+ \addbefore@par{labeloffset=0.9,dimen=middle}%
+ \fi
+ \use@par
+ \rput(C@){\pst@draw@splitter{#3}{#4}{#5}}
+ \ifx\psk@Tinput\pst@Tinput@left%
+ \ifPst@inputarrow
+ \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=180]{#1}{Tport@left}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}
+ \fi
+ \ncangle[arrows=-, arm=0.5,angleB=0]{#2}{Tport@right}
+ \else
+ \ifPst@inputarrow
+ \ncangle[arrows=->,arrowinset=0,arm=0.5,angleB=0]{#2}{Tport@right}
+ \else
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#2}{Tport@right}
+ \fi
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{Tport@left}
+ \fi
+ \endgroup
+ \pcline[linestyle=none](#1)(#2)% for the endarrows
+ \pcline[linestyle=none](#2)(#3)% for the endarrows
+ \ignorespaces%
+}
+\def\pst@draw@splitter#1#2#3{%
+ \psframe[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \let\psk@fillstyle\psfs@none
+ %% Diagonal line within the square
+ \ifx\psk@Tinput\pst@Tinput@left%
+ \ifx\psk@tripole@style\pst@tripole@style@top%
+ \psline[linewidth=1.5\pslinewidth](-0.5,0.5)(0.5,-0.5)
+ \else
+ \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \fi
+ \else
+ \ifx\psk@tripole@style\pst@tripole@style@top%
+ \psline[linewidth=1.5\pslinewidth](-0.5,-0.5)(0.5,0.5)
+ \else
+ \psline[linewidth=1.5\pslinewidth](-0.5,0.5)(0.5,-0.5)
+ \fi
+ \fi
+ \pnodes(-0.5,0){Tport@left}(0.5,0){Tport@right}%
+ \pcline[offset=\psk@label@offset,linestyle=none](Tport@left)(Tport@right)\ncput{#2}%
+ \ifx\psk@tripole@style\pst@tripole@style@top%
+ \pnode(0,0.5){Tport@center}
+ \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{Tport@center}
+ \else
+ \pnode(0,-0.5){Tport@center}
+ \ncangle[arrows=-,arm=0.5,angleB=270]{#1}{Tport@center}
+ \fi%
+}
+%
+%%% Attenuator %%%
+%
+\newCircDipole{attenuator}
+\def\pst@draw@attenuator{%
+ \pnode(-0.433,0){dipole@1}
+ \pnode(0.433,0){dipole@2}
+ \psline[fillstyle=none, arrowinset=0](-0.5,0)(0.5,0)
+ \ifx\psk@Dinput\pst@Dinput@right
+ \psline[linewidth=1.5\pslinewidth,fillstyle=none](-0.10825,0.433)(0.10825,0.2165)(-0.10825,0)(0.10825,-0.2165)(-0.10825,-0.433)
+ \else
+ \psline[linewidth=1.5\pslinewidth, fillstyle=none](0.10825,0.433)(-0.10825,0.2165)(0.10825,0)(-0.10825,-0.2165)(0.10825,-0.433)
+ \fi
+}
+%
+% THIS CAN BE SET AS AN OPTION OF THE OSCILLATOR...
+% IT'S UP TO YOU...
+%
+%%% Modulator
+%
+\newCircDipole{modulator}
+\def\pst@draw@modulator{%
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \ifx\psk@Dinput\pst@Dinput@right
+ \psline[linewidth=1.5\pslinewidth]{cc-cc}(-0.3,-0.1)(0,0.2)(0,-0.1)(0.3,-0.1)
+ \else
+ \psline[linewidth=1.5\pslinewidth]{cc-cc}(-0.3,-0.1)(0,-0.1)(0,0.2)(0.3,-0.1)
+ \fi
+}
+%
+%%% Plug %%%
+%
+\def\plug{\@ifnextchar[{\pst@plug}{\pst@plug[]}}
+\def\pst@plug[#1]{%
+ \@ifnextchar({\pst@plugi[#1]{0}}{\pst@plugi[#1]}%
+}
+\def\pst@plugi[#1]#2(#3){{%
+ \psset{#1}%
+ \rput{#2}(#3){%
+ \psline[linewidth=1.5\pslinewidth](0,0)(0,-0.3)(1.2,-0.3)(1.5,0)(1.2,0.3)(0,0.3)(0,0)
+ }}%
+ \ignorespaces%
+}
+%
+% \ampsinu
+%
+% THIS CAN ALSO BE SET AS AN OPTION FOR THE AMPLIFIER...
+% IT'S UP TO YOU
+\newCircDipole{ampsinu}
+\def\pst@draw@ampsinu{%
+ \pnode(-0.433,0){dipole@1}
+ \pnode(0.433,0){dipole@2}
+ \ifx\psk@Dinput\pst@Dinput@right
+ \pstriangle[gangle=90,linewidth=1.5\pslinewidth](0.433,0)(1,0.866)
+ \pscurve[fillstyle=none,linewidth=1\pslinewidth](0.071625,-0.20)(0.025,-0.125)(0.061625,-0.05)%
+ (0.15,0.025)(0.238375,0.1)(0.275,0.175)(0.238375,0.25)
+ \else
+ \pstriangle[gangle=-90,linewidth=1.5\pslinewidth](-0.433,0)(1,0.866)
+ \pscurve[fillstyle=none,linewidth=1\pslinewidth](-0.071625,-0.20)(-0.025,-0.125)(-0.061625,-0.05)%
+ (-0.15,0.025)(-0.238375,0.1)(-0.275,0.175)(-0.238375,0.25)
+ \fi
+}
+%
+%%% newtransformer %%%
+%
+\newCircDipole{newtransformer}
+\def\pst@draw@newtransformer{%
+ \pnode(-0.8,0){dipole@1}
+ \pnode(0.8,0){dipole@2}
+ \pscircle[linewidth=1.5\pslinewidth](-0.3,0){0.5}
+ \pscircle[linewidth=1.5\pslinewidth](0.3,0){0.5}
+}
+%
+
+
+\def\newtransformerquad{\pst@object{newtransformerquad}}%
+\def\newtransformerquad@i(#1)(#2)(#3)(#4)#5{%
+ \addbefore@par{dimen=middle,arm=0}%
+ \begin@ClosedObj%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pst@getcoor{#4}\pst@tempd
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ \pst@tempd /Y4 exch \pst@number\psyunit div def
+ /X4 exch \pst@number\psxunit div def
+ /XC X1 X2 lt {X2} {X1} ifelse X3 X4 lt {X3} {X4} ifelse add 2 div def
+ /YC Y1 Y3 lt {Y1} {Y3} ifelse Y2 Y4 lt {Y2} {Y4} ifelse add 2 div def
+ XC YC){C@}
+ \rput(C@){#5}
+ \rput(C@){\pscircle[linewidth=1.5\pslinewidth](-0.3,0){0.5}
+ \pscircle[linewidth=1.5\pslinewidth](0.3,0){0.5}
+ \pnode(-1,0.3){inup@} \pnode(-1,-0.3){indown@}
+ \pnode(1,-0.3){outdown@} \pnode(1,0.3){outup@}
+ \psline(inup@)(-0.7,0.3) \psline(indown@)(-0.7,-0.3)
+ \psline(outup@)(0.7,0.3) \psline(outdown@)(0.7,-0.3)}
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#1}{inup@}
+ \ncangle[arrows=-,arm=0.5,angleB=180]{#2}{indown@}
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#3}{outup@}
+ \ncangle[arrows=-,arm=0.5,angleB=0]{#4}{outdown@}
+ \ncline[arrows=-,linestyle=none,fillstyle=none]{indown@}{outdown@}
+ \pcline[linestyle=none](#1)(#3)% for the end arrows
+ \pcline[linestyle=none](#2)(#4)% for the end arrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+
+\newCircDipole{arrowswitch}
+\def\pst@draw@arrowswitch{%
+ \ifx\psk@Dstyle\pst@Dstyle@close
+ \pnode(-0.5,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \qdisk(-0.5,0){1.5pt}
+ \qdisk(0.5,0){1.5pt}
+ \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0.05)(0.5,0.05)
+ \psarc[arrowinset=0]{->}(-0.5,0){0.75}{-45}{45}
+ \else
+ \pnode(-0.55,0){dipole@1}
+ \pnode(0.5,0){dipole@2}
+ \psline[arrows=-,linewidth=2\pslinewidth](-0.5,0)(0.5,0.5)
+ \psarcn[arrowinset=0]{->}(-0.5,0){0.75}{45}{-45}
+ \pscircle[fillstyle=solid](-0.5,0){0.07}
+ \qdisk(0.5,0){1.5pt}
+ \fi
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Tripole
+%%% powermeter: tripolestyle:(bottom) | top
+%%% tripoleconfig: (left) | right
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\def\powermeter{\pst@object{powermeter}}
+\def\powermeter@i(#1)(#2)(#3)#4{%
+ \addbefore@par{dimen=middle,arm=0}%
+ \begin@ClosedObj%
+ \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#3}\pst@tempc
+ \pnode(!%
+ \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempb /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ \pst@tempc /Y3 exch \pst@number\psyunit div def
+ /X3 exch \pst@number\psxunit div def
+ /XC X1 X2 add 2 div def
+ /YC Y2 def
+ XC YC){C@}
+ \rput(C@){#4}
+ \rput(C@){%
+ \pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
+ \pnodes(-1,0){Tport@left}(1,0){Tport@right}%
+ \psline[arrows=-](Tport@left)(-0.5,0)
+ \psline[arrows=-](Tport@right)(0.5,0)
+ \ifx\psk@tripole@style\pst@tripole@style@top%
+ \pnode(0,1){Tport@center}
+ \ifx\psk@Tconfig\pst@Tconfig@left
+ \psdot(-0.8,0)
+ \psline[arrows=-](-0.8,0)(-0.8,-0.8)(0,-0.8)(0,-0.5)
+ \psline[arrows=-](0,0.5)(Tport@center)
+ \else
+ \psdot(0.8,0)
+ \psline[arrows=-](0.8,0)(0.8,-0.8)(0,-0.8)(0,-0.5)
+ \psline[arrows=-](0,0.5)(Tport@center)
+ \fi%
+ \ncangle[arrows=-,arm=0.25,angleB=-90]{#3}{Tport@center}
+ \else
+ \pnode(0,-1){Tport@center}
+ \ifx\psk@Tconfig\pst@Tconfig@left
+ \psdot(-0.8,0)
+ \psline[arrows=-](-0.8,0)(-0.8,0.8)(0,0.8)(0,0.5)
+ \psline[arrows=-](0,-0.5)(Tport@center)
+ \else
+ \psdot(0.8,0)
+ \psline[arrows=-](0.8,0)(0.8,0.8)(0,0.8)(0,0.5)
+ \psline[arrows=-](0,-0.5)(Tport@center)
+ \fi%
+ \ncangle[arrows=-,arm=0.25,angleB=90]{#3}{Tport@center}
+ \fi%
+ }
+ \ncangle[arrows=-,arm=0.25,angleB=180]{#1}{Tport@left}
+ \ncangle[arrows=-,arm=0.25,angleB=0]{#2}{Tport@right}
+ \pcline[linestyle=none](#1)(#2)% for the endarrows
+ \pcline[linestyle=none](#2)(#3)% for the endarrows
+ \end@ClosedObj%
+ \ignorespaces%
+}
+%
+%%% POWER IGBT %%%
+%
+\newCircDipole{igbt}
+\def\pst@draw@igbt{%
+ \pnode(-0.433,0){dipole@1}
+ \pnode(0.433,0){dipole@2}
+ %\psline[fillstyle=none, arrowinset=0](-0.433,-0.5)(0.5,0)
+ \psdot(dipole@1)
+ \psdot(dipole@2)
+ \ifPst@IGBTinvert
+ \psline[arrows=->,linewidth=1.5\pslinewidth, arrowsize =0.2, arrowinset=0](0.433,0)(-0.457,-0.457)
+ \else
+ \psline[arrows=->,linewidth=1.5\pslinewidth, arrowsize =0.2, arrowinset=0](0.433,0)(-0.457,0.457)
+ \fi
+}
+%
+%
+%%% TRANSCONDUCTOR %%%
+%
+\def\pst@draw@GM{%
+ \ifx\psk@tripole@style\pst@tripole@style@french
+ \psframe[linewidth=1.5\pslinewidth](-1,-0.75)(1,0.75)
+ \pspolygon(-0.4,-0.2)(-0.4,0.2)(-0.05,0)
+ \else
+% USUAL Transconductor
+ \pspolygon[arrows=-, linewidth=1.5\pslinewidth](-0.5, -1)(-0.5, 1)(0.5, 0.6)(0.5, -0.6)(-0.5, -1)
+% Supply pins Position
+ \ifPst@GMpower
+ \psline{-}(0,0.8)(0,1)%\uput[90](0,1){$+$}
+ %\psline{-o}(0,0.375)(0,0.75)\uput[90](0,0.75){$+$}
+ \psline{-}(0,-0.8)(0,-1)%\uput[-90](0,-1){$-$}
+ %\psline{-o}(0,-0.375)(0,-0.75)\uput[-90](0,-0.75){$-$}
+ \fi
+ \fi
+% Input Pins Position
+ \pnode(-0.5,0.5){\ifPst@GMinvert Minus@\else Plus@\fi}
+ \pnode(-0.5,-0.5){\ifPst@GMinvert Plus@\else Minus@\fi}
+ \pnode(0.5,0){S@}
+
+% + and - Position
+ \uput{0.1}[0](-0.5,0.5){\ifPst@GMinvert$-$\else$+$\fi}
+ %\uput{0.1}[0](-1,0.25){\ifPst@OAinvert$-$\else$+$\fi}
+ \uput{0.1}[0](-0.5,-0.5){\ifPst@GMinvert$+$\else$-$\fi}
+ %\uput{0.1}[0](-1,-0.25){\ifPst@OAinvert$+$\else$-$\fi}
+ \ifPst@GMperfect\rput(0.25,0){$\infty$}\fi%
+}
+%
+
+\catcode`\@=\PstAtCode\relax
+%
+\endinput \ No newline at end of file