in a prevois question i asked if there was a good way to display electronics symbols in TeX, i was pointed towards circuitikz (which is awsome), but is there a way to inline a symbol in text?


bla bla bla {symbols} blaa blab bla

  • What kind of symbol are you talking about? Jan 23, 2011 at 20:06

1 Answer 1


Maybe in this case it's easier to use the circuits.ee.IEC library in TikZ instead of circuitikz:




% Define a command for drawing dipole symbols with a bit of wire on either end
\newcommand\esymbol[1]{\tikz[circuit ee IEC] \draw (0,0) -- (.1,0) node [#1,anchor=west,name=s] {} (s.east) -- +(.1,0);}

This is a diode \esymbol{diode} and this is a resistor \esymbol{resistor}


Inline circuit symbols

Edit: The following is merged from another answer I wrote:

Similar approach with circuitikz, but the spacing is quite bad:




\draw (0,0) to [#1] (1,0); \end{circuitikz}}

This is a diode \esymbol{diode} and this is a resistor \esymbol{generic}


inline circuit symbols with circuitikz

  • 2
    Perhaps you'd consider merging both your answers into one? Jan 24, 2011 at 9:59
  • @Martin Is that the preferred thing to do? I figured that, since one method is (in my opinion) superior to the other (which is also reflected by the votes), it would make sense to keep them as separate answers. I'm glad to merge them if that's what's expected, though.
    – Jake
    Jan 24, 2011 at 10:36
  • There are different schools of thought whether this is preferred or not.. but personally I like posts that summarize and contrast different solutions -- even more so when you have written both answers yourself. This is what makes (for me) a good and informative answer that one is happy to upvote, even if not all solutions are equally good. You don't have to merge them, of course -- it's your call. Jan 24, 2011 at 10:42
  • 1
    @Martin Fair point. I have merged the answers and deleted the second one. There's a similar situation on this question, where I also wrote two answers. I'll keep those separate, as there have been comments added to both, but I'll keep your advice in mind in the future.
    – Jake
    Jan 24, 2011 at 10:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .