summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-circ
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-17 22:25:16 +0000
committerKarl Berry <karl@freefriends.org>2013-05-17 22:25:16 +0000
commit10710410fa127b4c7ebef6d49956901b912b16ba (patch)
tree4a9ad0ebf6487791d5642eadb14e6fb866cf9b9f /Master/texmf-dist/tex/generic/pst-circ
parenta8b01ad83425fddb3f322b59621c12a8caa889f0 (diff)
pst-circ (17may13)
git-svn-id: svn://tug.org/texlive/trunk@30527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-circ')
-rw-r--r--Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex104
1 files changed, 83 insertions, 21 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 aa304969004..18e4bdaad34 100644
--- a/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex
+++ b/Master/texmf-dist/tex/generic/pst-circ/pst-circ.tex
@@ -1,4 +1,5 @@
-%% This is file `pst-circ.tex',
+%% $Id: pst-circ.tex 780 2013-05-15 06:35:30Z herbert $
+%% This is file `pst-circ.tex'
%%
%% IMPORTANT NOTICE:
%%
@@ -25,8 +26,8 @@
\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi
\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi
%
-\def\fileversion{2.02}
-\def\filedate{2011/05/11}
+\def\fileversion{2.03}
+\def\filedate{2013/05/15}
\message{`pst-circ' v\fileversion (hv)}
%
\edef\PstAtCode{\the\catcode`\@}
@@ -389,6 +390,9 @@
% 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}}
@@ -696,10 +700,6 @@
\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}}
@@ -768,10 +768,6 @@
\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}}
@@ -819,6 +815,9 @@
% 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}}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -909,7 +908,8 @@
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
+ dpleft=false,dpright=true,latch=false,unlatch=false,contactclosed=false,polarized=false,
+ ison=true
}% hv
%\psset[pstricks]{radius=0.5}
@@ -4103,7 +4103,7 @@
\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}%
+ \psset{#1}%
\rput{#2}(#3){
% Inputs
\ifcase\psk@ninputs\or
@@ -4218,7 +4218,7 @@
\def\pst@logicxor[#1]{\@ifnextchar({\pst@logicxori[#1]{0}}{\pst@logicxori[#1]}}
\def\pst@logicxori[#1]#2(#3)#4{{%
\psset{#1}%
- \rput{#2}(#3){
+ \rput{#2}(#3){%
% Inputs
\ifcase\psk@ninputs\or
\ifPst@inputa
@@ -5017,8 +5017,13 @@
\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,%
+ \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)
@@ -5041,8 +5046,13 @@
\ignorespaces}
%
\def\pst@draw@newZener{{%
- \pspolygon[arrows=-,linewidth=1.5\pslinewidth,%
+ \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}
@@ -5059,8 +5069,13 @@
\ignorespaces}
%
\def\pst@draw@newLED{{%
- \pspolygon[arrows=-,linewidth=1.5\pslinewidth,%
+ \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}
@@ -5068,6 +5083,30 @@
}}
%
+% \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[]}}
@@ -5109,9 +5148,32 @@
\pscircle[linewidth=1.5\pslinewidth](0,0){0.5}
}}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\catcode`\@=\PstAtCode\relax
%
-\endinput
+% \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
+}}
+%
+\catcode`\@=\PstAtCode\relax
%
+\endinput \ No newline at end of file