# Fuse symbol with TikZ in circuitikz environment

This is my standard environment for tikzpicture:

\documentclass{standalone}

\usepackage{pgf,tikz}
%Einstellungen von siunitx nach pgf übertragen
\SendSettingsToPgf

%%package ciruitikz is based on TikZ
\usepackage[straightvoltages,%uses arrows to define voltages, and and uses straight voltage arrows
european,%equivalent to europeancurrents, europeanvoltages, europeanresistors, europeaninductors, europeanports, europeangfsurgearrester
emptydiode,%the various diodes are drawn but not filled by default, i.e. when using styles such as D, sD, …Other diode styles can always be forced with e.g. Do, D-, …
RPvoltages,%(meaning Rising Potential voltages): the arrow is in direction of rising potential, like in oldvoltagedirection, but batteries and current sources are fixed to follow the passive/active standard
betterproportions,%nicer proportions of transistors in comparision to resistors;
compatibility%makes it possibile to load CircuiTikZ and TikZ circuit library together
]{circuitikz}

\tikzset{circuit declare annotation={HorizontalAnnotation}{0pt}{edge[to path={[-]
($(-0.5,-0.5\tikzcircuitssizeunit)+(0,-0.5\pgflinewidth)$) --
($( 0.5,-0.5\tikzcircuitssizeunit)+(0,-0.5\pgflinewidth)$)}] ()}
}
\tikzset{circuit declare symbol=fuse, set fuse graphic={
draw, circuit symbol size=width 4 height 1, HorizontalAnnotation},
transform shape
}

\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,1.0) to [resistor] (3,1.0) node [right] {resistor};
\draw (0,0.5) to [fuse]     (3,0.5) node [right] {fuse};
\draw (0,0.5) to [fuse] (0,-2) to [fuse] (3,0.5);
\end{tikzpicture}
\end{document}


I learned from Fuse symbol with TikZ that I have to add this code in my document head to draw a fuse:

\tikzset{circuit declare annotation={HorizontalAnnotation}{0pt}{edge[to path={[-]
($(-0.5,-0.5\tikzcircuitssizeunit)+(0,-0.5\pgflinewidth)$) --
($( 0.5,-0.5\tikzcircuitssizeunit)+(0,-0.5\pgflinewidth)$)}] ()}
}
\tikzset{circuit declare symbol=fuse, set fuse graphic={
draw, circuit symbol size=width 4 height 1, HorizontalAnnotation},
transform shape
}


So far so good. But I need the symbol "fuse" in my normal tikzpicture enviroment, in other words I want to compile this body:

\begin{document}
\begin{tikzpicture}
\draw (0,1.0) to [resistor] (3,1.0) node [right] {resistor};
\draw (0,0.5) to [fuse]     (3,0.5) node [right] {fuse};
\draw (0,0.5) to [fuse] (0,-2) to [fuse] (3,0.5);
\end{tikzpicture}
\end{document}


Notice that I change "\begin{tikzpicture}[circuit ee IEC]" to "\begin{tikzpicture}", because my normal environment is the package "circuitikz". How to draw my fuse in my environment without [circuit ee IEC]?

• If you use compatibility (which is not advised, though) you have to prepend a * to the path-style component of circuitikz. Jan 18, 2021 at 19:28
• I created an sfuse component a few years ago, if you are interested (see elfsoft2000.com/projects/index.htm). Jan 19, 2021 at 17:52
• I still have an understanding problem: With my preferences I have the symbols from circuitikz when using the stared version (* fuse).The definition of the new symbol with \ tikzset {..} affects the standard version, right? Why should I then use the stared version? I already know that I am using the existing symbol in circuitikz with the stared version (see the answer below), but how would I have access to the symbol defined by \ tikzset {..} in my environment without [circuit ee IEC]? Jan 20, 2021 at 9:53
• The symbols in the standard TikZ circuit library and the ones you define with circuit declare symbols are activated by the "circuit ee IEC" and are completely independent to the circuitikz ones. The compatibility key add a * in front of the to-style form of circuitikz component to avoid (most) clashed between the two. circuititz never looks at the circuit ee IEC keys. My personal advice is to choose one of the two and stick to it... Jan 22, 2021 at 18:11
• @JohnKormylo, would you mind if I add your nice sfuse to circuitikz? Jan 22, 2021 at 18:56

circuitikz offers its own fuse:

\documentclass{standalone}

\usepackage{pgf,tikz}
%Einstellungen von siunitx nach pgf übertragen
%\SendSettingsToPgf

%%package ciruitikz is based on TikZ
\usepackage[straightvoltages,%uses arrows to define voltages, and and uses straight voltage arrows
european,%equivalent to europeancurrents, europeanvoltages, europeanresistors, europeaninductors, europeanports, europeangfsurgearrester
emptydiode,%the various diodes are drawn but not filled by default, i.e. when using styles such as D, sD, …Other diode styles can always be forced with e.g. Do, D-, …
RPvoltages,%(meaning Rising Potential voltages): the arrow is in direction of rising potential, like in oldvoltagedirection, but batteries and current sources are fixed to follow the passive/active standard
betterproportions,%nicer proportions of transistors in comparision to resistors;
%  compatibility%makes it possibile to load CircuiTikZ and TikZ circuit library together
]
{circuitikz}

\begin{document}
\begin{tikzpicture}
\draw (0,1.0) to [resistor] (3,1.0) node [right] {resistor};
\draw (0,0.5) to [fuse]     (3,0.5) node [right] {fuse};
\draw (0,0.5) to [fuse] (0,-2) to [fuse] (3,0.5);
\end{tikzpicture}
\end{document}

• Unfortunately, only the US version of the fuse is shown in the documentation for ciruitikz. When I looked through the documentation, that made me not even try it out. Due to my European setup, however, it becomes the correct symbol. Thanks for the hint. Jan 20, 2021 at 9:34
• @Michael.H ...I think there is just one version of the fuse in circuitikz (with variant fuse and afuse, current manual page 62. Can you please point me out to some standard/hint of which other version should be implemented? If you open an issue at github.com/circuitikz/circuitikz/issues I will look into it. Jan 22, 2021 at 18:07
• @Michael.H ah, drats! github.com/circuitikz/circuitikz/issues/487 — will try to fix it as soon as possible Jan 22, 2021 at 18:18