[Tex/LaTex] Label name in circuitikz

circuitikz

Is it possible to get a labelname in circuitikz to be equal to the output from

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}[circuit ee IEC,every info/.style={font=\footnotesize},set resistor graphic=var resistor IEC graphic]
    \draw (0,0) to[resistor={info={$R_\text{L}=\SI{220}{\ohm}$}}] (2,0);
\end{tikzpicture}
\end{document}

As far I've understood there's no "info" property in circuitikz, so I can't figure out how to do the same with that package. E.g., using something like

\draw (0,0) to[R=$R_1=\SI{2}{\ohm}$] (2,0)

results in an error in circuitikz.

If possible, I'd prefer to use circuitikz over the circuits.ee.IEC library as I like the symbols in circuitikz more.

Best regards,
dm

Edit:

circuitikz example that's not working:

\documentclass{article}
\usepackage{tikz}
\usepackage[siunitx,european,americanresistors]{circuitikz}
\begin{document}
\begin{tikzpicture}[american currents]
    \draw (0,0) to[R=$R_1=\SI{2}{\ohm}$] (2,0);
\end{tikzpicture}
\end{document}

Best Answer

Putting the label in a \mbox seems to do the trick. Try the following version:

\documentclass{standalone}
\usepackage{tikz}
\usepackage[siunitx,european,americanresistors]{circuitikz}
\begin{document}
\begin{tikzpicture}[american currents]
    \draw (0,0) to[R,label=\mbox{$R_1=\SI{2}{\ohm}$}] (2,0);
\end{tikzpicture}
\end{document}

enter image description here