TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 8 down vote accepted

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);



share|improve this answer
Thanks it really worked well, excellent work! – Jasper D'Agostino Nov 28 '10 at 22:54
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
Ok, thank you for your insight. – Jasper D'Agostino Nov 29 '10 at 2:23
@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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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