# Resistors corners circuitikz

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

• Welcom on tex.stackexchange! Please provide a Minimal Working Example for us! Nov 5 '20 at 5:56
• PostScript related options: here Nov 17 '20 at 16:10
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers Nov 17 '20 at 16:32
• Ping? I'd like to maintain the circuitikz tag with answered questions... ;-) Dec 23 '20 at 11:33

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}


Notice however that miter joints can go wild...

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


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: