3

Consider the following minimal example in with TikZ circuit library

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}

\begin{tikzpicture} [circuit ee IEC,>=latex]
\draw (0,0) to [bulb] (3,0);
\end{tikzpicture}
\end{document}

Is it possible to assign a name to this bulb, say (B). And reuse this point like for example:

\draw let \p1=(B.output) in (B.output) -- (\x1,-2);
3

You can pass options to the bulb node in its argument, so for example ... to [bulb={name=B}] ... (you can also use any other options you can pass to nodes, like thick, red, label=A lightbulb, etc.).

Note that instead of using the let syntax from your example, in this case you could simply use relative coordinates using +.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}

\begin{tikzpicture} [circuit ee IEC,>=latex]
\draw (0,0) to [bulb={name=B}] (3,0);
\draw (B.output) -- +(0,-2);
\end{tikzpicture}
\end{document}

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.