summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-09 18:18:51 +0000
committerKarl Berry <karl@freefriends.org>2010-09-09 18:18:51 +0000
commitca6174f9c4fd4c9f7f8e849d208934db0fcb3fa8 (patch)
treee5639cc3368ca9af1b946f8cdbe59792933caf02 /Master/texmf-dist/tex
parent6f8ad80b630fe27ac6608c9a23305830ac19625b (diff)
pst-circ 1.55 (16aug10)
git-svn-id: svn://tug.org/texlive/trunk@19628 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex734
1 files changed, 67 insertions, 667 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex
index e3fc1033a72..73d5545608c 100644
--- a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex
+++ b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex
@@ -29,8 +29,8 @@
\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi
\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi
%
-\def\fileversion{1.54}
-\def\filedate{2010/03/29}
+\def\fileversion{1.55}
+\def\filedate{2010/08/15}
\message{`pst-circ' v\fileversion (CJ,hv,pd)}
%
\edef\PstAtCode{\the\catcode`\@}
@@ -39,7 +39,6 @@
%
\pstheader{pst-circ.pro}
\SpecialCoor
-
%
\newdimen\Pst@position
%
@@ -218,85 +217,57 @@
\def\wire{\@ifnextchar[{\pst@draw@wire}{\pst@draw@wire[]}}
\def\tension{\@ifnextchar[{\pst@draw@tension@}{\pst@draw@tension@[]}}
%
-\def\RFLine{\@ifnextchar[{\pst@RFLine}{\pst@RFLine[]}}
-\def\pst@RFLine[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@RFLine}\ignorespaces}
-%
-\def\resistor{\@ifnextchar[{\pst@resistor}{\pst@resistor[]}}
-\def\pst@resistor[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@resistor}\ignorespaces}
-%
-\def\capacitor{\@ifnextchar[{\pst@capacitor}{\pst@capacitor[]}}
-\def\pst@capacitor[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@capacitor}\ignorespaces}
-%
-\def\battery{\@ifnextchar[{\pst@battery}{\pst@battery[]}}
-\def\pst@battery[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@battery}\ignorespaces}
-%
-\def\coil{\@ifnextchar[{\pst@coil}{\pst@coil[]}}
-\def\pst@coil[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@coil}\ignorespaces}
-%
-\def\Ucc{\@ifnextchar[{\pst@Ucc}{\pst@Ucc[]}}
-\def\pst@Ucc[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Ucc}\ignorespaces}
-%
-\def\Icc{\@ifnextchar[{\pst@Icc}{\pst@Icc[]}}
-\def\pst@Icc[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Icc}\ignorespaces}
-%
-\def\switch{\@ifnextchar[{\pst@switch}{\pst@switch[]}}
-\def\pst@switch[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@switch}\ignorespaces}
-%
-\def\diode{\@ifnextchar[{\pst@diode}{\pst@diode[]}}
-\def\pst@diode[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@diode}\ignorespaces}
-%
-\def\Zener{\@ifnextchar[{\pst@Zener}{\pst@Zener[]}}
-\def\pst@Zener[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Zener}\ignorespaces}
-%
-\def\lamp{\@ifnextchar[{\pst@lamp}{\pst@lamp[]}}
-\def\pst@lamp[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@lamp}\ignorespaces}
-%
-\def\circledipole{\@ifnextchar[{\pst@circledipole}{\pst@circledipole[]}}
-\def\pst@circledipole[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@circledipole}\ignorespaces}
-%
-\def\LED{\@ifnextchar[{\pst@LED}{\pst@LED[]}}
-\def\pst@LED[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@LED}\ignorespaces}
-%
-\def\OpenDipol{\@ifnextchar[{\pst@OpenDipol}{\pst@OpenDipol[]}}
-\def\pst@OpenDipol[#1](#2)(#3)#4{{%
- \pst@draw@dipole{radius=2pt,#1}{#2}{#3}{#4}\pst@draw@OpenDipol}\ignorespaces}
-%
-\def\OpenTripol{\@ifnextchar[{\pst@OpenTripol}{\pst@OpenTripol[]}}
-\def\pst@OpenTripol[#1](#2)(#3)#4{{%
- \pst@draw@dipole{radius=2pt,#1}{#2}{#3}{#4}\pst@draw@OpenTripol}\ignorespaces}
-%
-%-mla-----------------------------------------------
-\def\Suppressor{\@ifnextchar[{\pst@Suppressor}{\pst@Suppressor[]}}
-\def\pst@Suppressor[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Suppressor}\ignorespaces}
-%
-\def\Arrestor{\@ifnextchar[{\pst@Arrestor}{\pst@Arrestor[]}}
-\def\pst@Arrestor[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@Arrestor}\ignorespaces}
-%
-\def\RelayNOP{\@ifnextchar[{\pst@RelayNOP}{\pst@RelayNOP[]}}
-\def\pst@RelayNOP[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@RelayNOP}\ignorespaces}
-%-mla----------------------------------------------
+% 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{circledipole}
+\newCircDipole{LED}
+\newCircDipole[radius=2pt]{OpenDipol}
+\newCircDipole[radius=2pt]{OpenTripol}
+\newCircDipole{Suppressor}
+\newCircDipole{Arrestor}
+\newCircDipole{RelayNOP}
+\newCircDipole{dashpot}
%
-% pd start ====================================================
-\def\dashpot{\@ifnextchar[{\pst@dashpot}{\pst@dashpot[]}}
-\def\pst@dashpot[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@dashpot}\ignorespaces}
-% pd end ======================================================
%
\def\OA{\pst@object{OA}}
\def\OA@i(#1)(#2)(#3){%
@@ -751,29 +722,7 @@
% end hv 2003-08-29
%
%% SQUID def added 2009-02-18 Amit Finkler
-\def\SQUID{\@ifnextchar[{\pst@SQUID}{\pst@SQUID[]}}
-\def\pst@SQUID[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@SQUID}\ignorespaces}
-%
-\def\pst@multidipole@SQUID{\@ifnextchar[{\pst@multidipole@SQUID@}{\pst@multidipole@SQUID@[]}}
-%
-\def\pst@multidipole@SQUID@[#1]#2{%
- \expandafter\def\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname{#2}%
- {\psset{#1}%
- \ifPst@circ@parallel\aftergroup\advance\aftergroup\pst@circ@count@i\aftergroup\
- m@ne\fi}%
- \pst@circ@count@ii=\pst@circ@count@i%
- \advance\pst@circ@count@ii\@ne%
- \toks0\expandafter{\pst@multidipole@output}%
- \edef\pst@multidipole@output{%
- \the\toks0%
- \pst@multidipole@def@coor%
- \noexpand\SQUID[#1]%
- (! X@\the\pst@circ@count@i\space Y@\the\pst@circ@count@i)%
- (! X@\the\pst@circ@count@ii\space Y@\the\pst@circ@count@ii)%
- {\noexpand\csname pst@circ@tmp@\number\pst@circ@count@iii\endcsname}%
- }%
- \pst@multidipole@}
+\newCircDipole{SQUID}
%
\def\pst@draw@SQUID{%
\pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
@@ -841,7 +790,7 @@
\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% 21..28
+ \fi\fi\fi\fi\fi\fi\fi\fi% 21..28
\advance\pst@count@i\@ne
\advance\pst@count@iii\@ne
\pscirc@next}
@@ -884,373 +833,6 @@
\pscirc@next
}
%
-\def\pst@multidipole@resistor{\@ifnextchar[{\pst@multidipole@resistor@}{\pst@multidipole@resistor@[]}}
-\def\pst@multidipole@resistor@[#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\resistor[#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@
-}
-%
-\def\pst@multidipole@RFLine{\@ifnextchar[{\pst@multidipole@RFLine@}{\pst@multidipole@RFLine@[]}}
-\def\pst@multidipole@RFLine@[#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\RFLine[#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@
-}
-%
-% pd start ====================================================
-\def\pst@multidipole@dashpot{\@ifnextchar[{\pst@multidipole@dashpot@}{\pst@multidipole@dashpot@[]}}
-%
-\def\pst@multidipole@dashpot@[#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\dashpot[#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@
-}
-% pd end ======================================================
-\def\pst@multidipole@capacitor{\@ifnextchar[{\pst@multidipole@capacitor@}{\pst@multidipole@capacitor@[]}}
-%
-\def\pst@multidipole@capacitor@[#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\capacitor[#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@
-}
-%
-\def\pst@multidipole@battery{\@ifnextchar[{\pst@multidipole@battery@}{\pst@multidipole@battery@[]}}
-%
-\def\pst@multidipole@battery@[#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\battery[#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@
-}
-%
-\def\pst@multidipole@coil{\@ifnextchar[{\pst@multidipole@coil@}{\pst@multidipole@coil@[]}}
-%
-\def\pst@multidipole@coil@[#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\coil[#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@
-}
-%
-\def\pst@multidipole@Ucc{\@ifnextchar[{\pst@multidipole@Ucc@}{\pst@multidipole@Ucc@[]}}
-%
-\def\pst@multidipole@Ucc@[#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\Ucc[#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@
-}
-%
-\def\pst@multidipole@Icc{\@ifnextchar[{\pst@multidipole@Icc@}{\pst@multidipole@Icc@[]}}
-%
-\def\pst@multidipole@Icc@[#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\Icc[#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@
-}
-%
-\def\pst@multidipole@switch{\@ifnextchar[{\pst@multidipole@switch@}{\pst@multidipole@switch@[]}}
-%
-\def\pst@multidipole@switch@[#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\switch[#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@
-}
-%
-\def\pst@multidipole@diode{\@ifnextchar[{\pst@multidipole@diode@}{\pst@multidipole@diode@[]}}
-%
-\def\pst@multidipole@diode@[#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\diode[#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@
-}
-%
-\def\pst@multidipole@Zener{\@ifnextchar[{\pst@multidipole@Zener@}{\pst@multidipole@Zener@[]}}
-\def\pst@multidipole@Zener@[#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\Zener[#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@
-}
-%
-%mla change
-\def\pst@multidipole@Suppressor{\@ifnextchar[{\pst@multidipole@Suppressor@}{\pst@multidipole@Suppressor@[]}}
-\def\pst@multidipole@Suppressor@[#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\Suppressor[#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@
-}
-%
-\def\pst@multidipole@Arrestor{\@ifnextchar[{\pst@multidipole@Arrestor@}{\pst@multidipole@Arrestor@[]}}
-\def\pst@multidipole@Arrestor@[#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\Arrestor[#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@
-}
-%
-\def\pst@multidipole@RelayNOP{\@ifnextchar[{\pst@multidipole@RelayNOP@}{\pst@multidipole@RelayNOP@[]}}
-\def\pst@multidipole@RelayNOP@[#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\RelayNOP[#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@
-}
-%%%mla change end
-%
-\def\pst@multidipole@lamp{\@ifnextchar[{\pst@multidipole@lamp@}{\pst@multidipole@lamp@[]}}
-%
-\def\pst@multidipole@lamp@[#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\lamp[#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@
-}
-%
-\def\pst@multidipole@circledipole{\@ifnextchar[{\pst@multidipole@circledipole@}{\pst@multidipole@circledipole@[]}}
-%
-\def\pst@multidipole@circledipole@[#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\circledipole[#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@
-}
-%
-\def\pst@multidipole@LED{\@ifnextchar[{\pst@multidipole@LED@}{\pst@multidipole@LED@[]}}
-\def\pst@multidipole@LED@[#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\LED[#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@%
-}
-%
-\def\pst@multidipole@OpenDipol{\@ifnextchar[{\pst@multidipole@OpenDipol@}{\pst@multidipole@OpenDipol@[]}}
-\def\pst@multidipole@OpenDipol@[#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\OpenDipol[#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@OpenTripol{\@ifnextchar[{\pst@multidipole@OpenTripol@}{\pst@multidipole@OpenTripol@[]}}
-\def\pst@multidipole@OpenTripol@[#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\OpenTripol[#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@wire{\@ifnextchar[{\pst@multidipole@wire@}{\pst@multidipole@wire@[]}}
\def\pst@multidipole@wire@[#1]{%
@@ -2110,7 +1692,7 @@
\def\pst@newground[#1]{%
\@ifnextchar({\pst@newgroundi[#1]{0}}{\pst@newgroundi[#1]}%
}
-\def\pst@newgroundi[#1]#2(#3){%
+\def\pst@newgroundi[#1]#2(#3){{%
\psset{#1}%
\rput{#2}(#3){%
\ifx\psk@Gstyle\pst@Gstyle@ads
@@ -2128,7 +1710,7 @@
\ifPst@connectingdot
\pscircle*(0,0){2\pslinewidth}
\fi
- }
+ }}%
\ignorespaces%
}
%
@@ -2138,7 +1720,7 @@
\def\pst@antenna[#1]{%
\@ifnextchar({\pst@antennai[#1]{0}}{\pst@antennai[#1]}%
}
-\def\pst@antennai[#1]#2(#3){%
+\def\pst@antennai[#1]#2(#3){{%
\psset{#1}%
\rput{#2}(#3){%
\ifx\psk@Astyle\pst@Astyle@two
@@ -2154,7 +1736,7 @@
\pstriangle[linewidth=1.5\pslinewidth](0,1.25)(0.4,-0.5)
\fi
\psline(0,0)(0,.75)
- }
+ }}%
\ignorespaces%
}
%
@@ -2164,7 +1746,7 @@
\def\pst@oscillator[#1]{%
\@ifnextchar({\pst@oscillatori[#1]{0}}{\pst@oscillatori[#1]}%
}
-\def\pst@oscillatori[#1]#2(#3)#4#5{%
+\def\pst@oscillatori[#1]#2(#3)#4#5{{%
\psset{#1}%
\rput{#2}(#3){%
\pscircle[#5,linewidth=1.5\pslinewidth](0,0){0.5}
@@ -2236,7 +1818,7 @@
\psline(0,-0.5)(0,-1)
\fi
\fi
- }
+ }}%
\ignorespaces%
}
%
@@ -2267,33 +1849,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% FILTER %%%
%
-\def\filter{\@ifnextchar[{\pst@filter}{\pst@filter[]}}
-%
-\def\pst@filter[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@filter%
- }\ignorespaces}
-%
-\def\pst@multidipole@filter{\@ifnextchar[{\pst@multidipole@filter@}%
-{\pst@multidipole@filter@[]}}
-%
-\def\pst@multidipole@filter@[#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\filter[#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@
-}
-%
+\newCircDipole{filter}%
\def\pst@draw@filter{%
\pnode(-0.5,0){dipole@1}
\pnode(0.5,0){dipole@2}
@@ -2318,33 +1874,7 @@
%%% ISOLATOR %%%
%
-\def\isolator{\@ifnextchar[{\pst@isolator}{\pst@isolator[]}}
-%
-\def\pst@isolator[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@isolator%
- }\ignorespaces}
-%
-\def\pst@multidipole@isolator{\@ifnextchar[{\pst@multidipole@isolator@}%
-{\pst@multidipole@isolator@[]}}
-%
-\def\pst@multidipole@isolator@[#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\isolator[#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@
-}
-%
+\newCircDipole{isolator}
\def\pst@draw@isolator{%
\pnode(-0.5,0){dipole@1}
\pnode(0.5,0){dipole@2}
@@ -2357,33 +1887,7 @@
}
%
%%% Frequency Multiplier or Divider %%%
-\def\freqmult{\@ifnextchar[{\pst@freqmult}{\pst@freqmult[]}}
-%
-\def\pst@freqmult[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@freqmult%
- }\ignorespaces}
-%
-\def\pst@multidipole@freqmult{\@ifnextchar[{\pst@multidipole@freqmult@}%
-{\pst@multidipole@freqmult@[]}}
-%
-\def\pst@multidipole@freqmult@[#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\freqmult[#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@
-}
-%
+\newCircDipole{freqmult}
\def\pst@draw@freqmult{%
\pnode(-0.5,0){dipole@1}
\pnode(0.5,0){dipole@2}
@@ -2417,33 +1921,7 @@
}
%
%%% phaseshifter
-\def\phaseshifter{\@ifnextchar[{\pst@phaseshifter}{\pst@phaseshifter[]}}
-%
-\def\pst@phaseshifter[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@phaseshifter%
- }\ignorespaces}
-%
-\def\pst@multidipole@phaseshifter{\@ifnextchar[{\pst@multidipole@phaseshifter@}%
-{\pst@multidipole@phaseshifter@[]}}
-%
-\def\pst@multidipole@phaseshifter@[#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\phaseshifter[#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@
-}
-%
+\newCircDipole{phaseshifter}
\def\pst@draw@phaseshifter{%
\pnode(-0.4,0){dipole@1}
\pnode(0.4,0){dipole@2}
@@ -2452,33 +1930,7 @@
}
%
%%% VCO
-\def\vco{\@ifnextchar[{\pst@vco}{\pst@vco[]}}
-%
-\def\pst@vco[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@vco%
- }\ignorespaces}
-%
-\def\pst@multidipole@vco{\@ifnextchar[{\pst@multidipole@vco@}%
-{\pst@multidipole@vco@[]}}
-%
-\def\pst@multidipole@vco@[#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\vco[#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@
-}
-%
+\newCircDipole{vco}
\def\pst@draw@vco{%
\pnode(-0.5,0){dipole@1}
\pnode(0.5,0){dipole@2}
@@ -2489,33 +1941,7 @@
%
%%% amplifier %%%
%
-\def\amplifier{\@ifnextchar[{\pst@amplifier}{\pst@amplifier[]}}
-%
-\def\pst@amplifier[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@amplifier%
- }\ignorespaces}
-%
-\def\pst@multidipole@amplifier{\@ifnextchar[{\pst@multidipole@amplifier@}%
-{\pst@multidipole@amplifier@[]}}
-%
-\def\pst@multidipole@amplifier@[#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\amplifier[#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@
-}
-%
+\newCircDipole{amplifier}
\def\pst@draw@amplifier{%
\pnode(-0.433,0){dipole@1}
\pnode(0.433,0){dipole@2}
@@ -2528,33 +1954,7 @@
%
%%% detector %%%
%
-\def\detector{\@ifnextchar[{\pst@detector}{\pst@detector[]}}
-%
-\def\pst@detector[#1](#2)(#3)#4{{%
- \pst@draw@dipole{#1}{#2}{#3}{#4}\pst@draw@detector%
- }\ignorespaces}
-%
-\def\pst@multidipole@detector{\@ifnextchar[{\pst@multidipole@detector@}%
-{\pst@multidipole@detector@[]}}
-%
-\def\pst@multidipole@detector@[#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\detector[#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@
-}
-%
+\newCircDipole{detector}
\def\pst@draw@detector{%
\pnode(-0.5,0){dipole@1}
\psline[fillstyle=none](-0.5,0)(-0.2165,0)