1

It is possible to get the corners of a resistor to be like this ?. Im using the circuitikz package and working with Overleaf.

enter image description here

4
3

Well, it's not a standard option, but in a sufficiently recent circuitikz is not complex to do — you have to patch an internal command.

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\pgf@circ@zigzag}{\pgfsetbeveljoin}{\pgfsetmiterjoin}
    {\typeout{Switching to pointy resistors!}}
    {\typeout{Patching resistors failed}}
\makeatother
\begin{document}
\begin{circuitikz}[american,thick]
    \draw (0,0) to[R] ++(3,0) to[R=R] ++(3,0);
\end{circuitikz}
\end{document}

enter image description here

Notice however that miter joints can go wild...

\draw (0,0) to[R] ++(3,0) to[R=R, resistors/zigs=8] ++(3,0);

enter image description here

as you can see, the "pointy ends" are not taken into account in the positioning of labels... (there is a parameter in TikZ to set a maximum length for miters, you can find it easily in the manual searching for pgfsetmiterjoin).

As an aside, you can also say

\patchcmd{\pgf@circ@zigzag}{\pgfsetbeveljoin}{\pgfsetroundjoin}
    {\typeout{Switching to safe resistors!}}
    {\typeout{Patching resistors failed}}

To obtain safe to manipulate (non-puncturing 😜) resistors:

enter image description here

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.