summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-03 15:34:57 +0000
committerKarl Berry <karl@freefriends.org>2010-04-03 15:34:57 +0000
commitef657b0c61ed6e67b60adb7ed1ae6577f076e8df (patch)
tree722a9467d473425a2a750c0536bc84c2858e056b /Master/texmf-dist/tex
parent6d405653de70d591d8f622da10d02b6ffa24ee27 (diff)
pst-circ 1.54 (1apr10)
git-svn-id: svn://tug.org/texlive/trunk@17659 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex111
1 files changed, 86 insertions, 25 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 17c3227d19f..e3fc1033a72 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.52}
-\def\filedate{2010/01/15}
+\def\fileversion{1.54}
+\def\filedate{2010/03/29}
\message{`pst-circ' v\fileversion (CJ,hv,pd)}
%
\edef\PstAtCode{\the\catcode`\@}
@@ -270,6 +270,14 @@
\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{{%
@@ -603,37 +611,38 @@
\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
+ \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@tempc /Y4 exch \pst@number\psyunit div def
- /X4 exch \pst@number\psxunit div def
+ \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}
- \ncangle[arrows=-,arm=0.5,angleB=90]{#1}{inup@}
+ \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]{#2}{indown@}
- \ncangle[arrows=-,arm=0.5,angleB=90]{#3}{outup@}
- \ifPst@Trafo@iprimary
+ \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]{#4}{outdown@}
+ \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@}
@@ -827,10 +836,12 @@
\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\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% 21..26
+ \fi\fi\fi\fi\fi\fi\fi\fi% 21..28
\advance\pst@count@i\@ne
\advance\pst@count@iii\@ne
\pscirc@next}
@@ -862,17 +873,18 @@
\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\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\fi\fi\fi\fi\fi
\advance\pst@count@i\@ne
\advance\pst@count@iii\@ne
\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}%
@@ -1190,7 +1202,6 @@
}
%
\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}%
@@ -1206,11 +1217,42 @@
(! X@\the\pst@count@ii\space Y@\the\pst@count@ii)%
{\noexpand\csname pst@tmp@\number\pst@count@iii\endcsname}
}%
- \pst@multidipole@
+ \pst@multidipole@%
}
%
-\def\pst@multidipole@wire{\@ifnextchar[{\pst@multidipole@wire@}{\pst@multidipole@wire@[]}}
+\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]{%
{\psset{#1}%
\ifPst@parallel\aftergroup\advance\aftergroup\pst@count@i\aftergroup\m@ne\fi}%
@@ -1647,6 +1689,25 @@
\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)