[pstricks] multiple switch possible?
Patrick Drechsler
patrick.drechsler at gmx.net
Tue Sep 16 21:47:07 CEST 2003
Hi,
I'm looking for a way to display a switch between more than 3 objects
(\switch and \Tswitch only appear to connect 2 and 3
points/objects). Is this possible with PSTricks?
To give you an idea what I'm looking for I posted some code at the
end.
TIA,
Patrick
\listfiles
\documentclass{article}
\usepackage{pst-circ}
\begin{document}
%
\begin{pspicture}(5,6)
\psgrid[subgriddiv=1,griddots=10]
% resistor nodes:
\pnode(1,6){atop}
\pnode(1,4){amid}
\pnode(1.5,3){abot}
\pnode(2,6){btop}
\pnode(2,4){bmid}
\pnode(2.25,3){bbot}
\pnode(3,6){ctop}
\pnode(3,4){cmid}
\pnode(2.75,3){cbot}
\pnode(4,6){dtop}
\pnode(4,4){dmid}
\pnode(3.5,3){dbot}
\pnode(2.5,3){switchbottom}
% battery and lamp nodes:
\pnode(5,6){battery1}
\pnode(5,3){battery2}
\pnode(5,0){lamp}
% switch:
\pnode(2.5,0){myswitch}
% setup:
\resistor(atop)(amid){}
\wire(amid)(abot)
\resistor(btop)(bmid){}
\wire(bmid)(bbot)
\resistor(ctop)(cmid){}
\wire(cmid)(cbot)
\resistor(dtop)(dmid){}
\wire(dmid)(dbot)
\wire(atop)(battery1)
\battery(battery1)(battery2){}
\lamp(battery2)(lamp){}
\wire(lamp)(myswitch)
% not good...:
\switch(myswitch)(switchbottom){}
\end{pspicture}
\end{document}
*File List*
myswitch.tex
article.cls 2001/04/21 v1.4e Standard LaTeX document class
size10.clo 2001/04/21 v1.4e Standard LaTeX file (size option)
pst-circ.sty 2002/09/21 package wrapper for PSTricks pst-circ.tex
--
Computers are good at following instructions,
but not at reading your mind. -- Donald Knuth
More information about the PSTricks
mailing list