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?
eg.
bla bla bla {symbols} blaa blab bla
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?
eg.
bla bla bla {symbols} blaa blab bla
Maybe in this case it's easier to use the circuits.ee.IEC
library in TikZ
instead of circuitikz
:
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}
\begin{document}
% 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}
\end{document}
Edit: The following is merged from another answer I wrote:
Similar approach with circuitikz
, but the spacing is quite bad:
\documentclass{minimal}
\usepackage{circuitikz}
\begin{document}
\ctikzset{bipoles/length=.6cm}
\newcommand\esymbol[1]{\begin{circuitikz}
\draw (0,0) to [#1] (1,0); \end{circuitikz}}
This is a diode \esymbol{diode} and this is a resistor \esymbol{generic}
\end{document}