# Example: Simple circuit schematics symbols

Published 2007-04-21 | Author: Shengshan Cui

An example of how to create simple schematic symbols using paths and macros. The example also shows how the symbols can be combined with the signalflow library by Karlheinz Ochs. For a general circuit library this should be done by creating custom node shapes. However, that would require a lot more work.

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Simple circuit schematics symbols
% Author: Shengshan Cui
\documentclass{article}
\usepackage{tikz}
\usepackage{subfig}
\usepackage{signalflowdiagram}

% Define two simple circuit schematics symbols
\def\antenna{%
-- +(0mm,4.0mm) -- +(2.625mm,7.5mm) -- +(-2.625mm,7.5mm) -- +(0mm,4.0mm)
}

\def\ground{%
-- +(0mm,-4.0mm) {
[yshift=-4mm]
+(-2mm,0mm) -- +(2mm,0mm)
+(-1mm,-1mm) -- +(1mm,-1mm)
+(-0.3mm,-2mm) -- +(0.3mm,-2mm)
}
}

\begin{document}

\begin{figure}
\centering
\subfloat[Stand alone symbols]{
\begin{tikzpicture}
\draw[step=.5cm,black!25,very thin] (-1.4,-1.4) grid (1.4,1.4);
\draw[color=red,thick] (0,0) \antenna;
\draw[color=blue,thick] (0,0) \ground;
\end{tikzpicture}
\subfloat[Combining symbols with the signalflow library]{
\begin{tikzpicture}
\node[input]  (in)                   {$x(t)$};
\node[delay]  (del) [right from=in]  {$T$};
\node[coordinate] (out) [right from=del] {};
% signal paths
\path[r>] (in)  -- (del);
\path[r] (del) -- (out) \antenna \ground;
\end{tikzpicture}
}
\end{figure}

\end{document} 