1

I'd like to use circuitikz's short style on a rectilinear edge:

\documentclass[tikz,margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}
\usepackage{circuitikz}

\begin{document}

\begin{tikzpicture}
  \begin{scope}[shift={(0,0)}] \draw[-*] (0,0) |- (1,1);       \end{scope}
  \begin{scope}[shift={(2,0)}] \draw (0,0) to[short,-*] (1,1); \end{scope}
  \begin{scope}[shift={(4,0)}] \draw[short,-*] (0,0) |- (1,1); \end{scope}
\end{tikzpicture}
\end{document}

On the straight edge, with to[short,-*] it works as expected; also, note that the connection mark is smaller than the non-short arrowhead on the first example. However, in the third one, combining [short,-*] with |- results in a missing connection marker:

enter image description here

How can I apply the second example's styling to the first example's layout?

1 Answer 1

1

The answer is that the -* modifiers work only in a to[] command with a style that is a circuitikz object.

In your example, the first \draw[-*] is an arrow specification of TikZ, created by the library circuits.ee.IEC, which is the internal (competing? ;-)) circuit library. In the manual you can find (around page 9):

enter image description here

...so basically, don't mix them.

The second is the correct usage; unfortunately, it is impossible to mix to commands with the perpendicular coordinate system, so you have to use the node. Using only circuitikz, the correct code will be:

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[]
  \begin{scope}[shift={(2,0)}] \draw (0,0) to[short,-*] (1,1); \end{scope}
  \begin{scope}[shift={(4,0)}]
    \draw[short] (0,0) |- (1,1) node[circ]{}; \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Clearly, you can define an arrow style that matches the poles of circuitikz --- but I do not know if it's so useful. Most of the time you use it in a to[...] or it is straightforward to apply the circ node.

You can even say \newcommand\splat{node[circ]{}} and then just use \splat in the path...

1

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.