I have a circuit in CircuiTikz in which I am trying to add a dashed short circuit. I know about the \draw[dashed]
, but this gives me dashed lines also in the endpoints.
\documentclass[border=5mm]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{figure}[ht]
\begin{circuitikz}
\draw (0,0) node[op amp] (opAmp) {};
\draw (opAmp.-) to[short,-] ++(-0.5,0) coordinate (J5);
\draw[dashed] (J5) to[short,*-o] ++(0,2)
\end{circuitikz}
\end{figure}
\end{document}
Is there a way to not have the endpoints dashed?
Best Answer
The easiest way is to not use the
circ
andocirc
shapes defined bycircuitikz
but to define styles with the same names so that TikZ does not choose the shapes.Though, if you look closer, that line actually is put together by two lines with a null-node in the middle (the
shortshape
). This is the reason the dashing is not consistent. It becomes very noticeable if you do