Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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);
share|improve this question

1 Answer 1

up vote 3 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.