I'm wondering if there are other commands associated with the switch symbol so that one doesn't have to specify if the switch is open or closed. I would like the switch symbol with two connectors and a line rather than the open switch (ospst) and closed switch (cspst). I've looked all over and can't seem to find any solution. Thanks


The following code is a modification of the definition of cspst. I just removed the arc and the arrow.


% modified code from pgfcircbipoles.sty and circuitikz1.code.tex

% create the shape
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/interr/height 2}}{spst}{\ctikzvalof{bipoles/interr/height}}{\ctikzvalof{bipoles/interr/width}}{



% make the shape accessible with nice syntax
\tikzset{switch/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@spst@path, l=#1}}
\tikzset{spst/.style = {switch = #1}}


    \draw (0,0) to[switch, l=$t_0$] (2,0)
                to[spst] (2,-2);



  • Actually if you wouldn't mind helping with one more thing..I noticed that if I try and use to[short, -*] for a connector it disrupts the positioning of the switch itself. Is there a way to have connectors (black dots) at the base of the line where the switch would be connected? It's for an analog electronics report. – Jasper D'Agostino Nov 28 '10 at 23:09
  • @Jasper: I'm not sure what you mean (I have never used circuitikz myself and i'm mostly unfamiliar with circuit diagrams). If it isn't directly connected with drawing a switch without arrow, it is better if you ask a new question. – Caramdir Nov 29 '10 at 1:49
  • @Caramdir, @Jasper: I'm curious, where are these switches (cspst and ospst)? I just looked at the circuit section in the pgfmanual and can't find them. I did find (section 29.4.5) some symbols for contacts which look very similar to what Caramdir's drawn here. – Loop Space Nov 29 '10 at 9:51
  • D'oh. I see. This isn't the circuit tikz library, but is a separate package built on top of tikz. Note that the circuit library in TikZ says: "Inspired by the work of Massimo Redaelli" so the two are closely related. – Loop Space Nov 29 '10 at 9:54
  • The switch without the arrow should be a standard component. – garyp Nov 2 '14 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.