4

I am writing intro physics exams in LaTeX, using the circuitikz package to make circuits. A lot of the circuits use simple light bulbs, which we represent as a circle with a curly-cue inside.

Drawing this isn't really hard. But I'm planning on drawing several dozen light bulbs like this, and was hoping to make some kind of macro, hopefully one I can implement in the form

 (0,0) to[bulb, l=A] (2,0)

so that it integrates easily with the other circuitikz commands.

Is there a simple way to do this?

P.S. The "lamp" element predefined in circuitikz is probably great for real world circuit diagrams used by professional electricians; less so for sophomore pre-med majors taking an intro physics class.

  • Welcome to TeX-SE! You may be interested in this question. You can either declare a new shape or combine existing shapes in such a way that you get what you want. – user121799 Jun 15 at 1:06
7

This is just for fun:

\documentclass{standalone}
\usepackage{circuitikz}
\tikzset{tbulb/.style={cute inductor,n=aux,append after command={(aux)
       node[draw,circle,inner  sep=.35cm]{}}}}
\begin{document}
\begin{circuitikz}
      \draw (0,0) to[tbulb] (2,0);
\end{circuitikz}
\end{document}

enter image description here

  • 1
    You can reduce the number of loops using \ctikzset{bipoles/cuteinductor/coils=2} – John Kormylo Jun 15 at 13:26

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.