I use scalebox
to scale the label of a component in circuitikz
. For example, to[R,l_=$\scalebox{2}{2\si{\ohm}}$,*-*]
which scales the label with no problem, however, when I try this to[cV,l^=$\scalebox{2}{2 v_x}$]
, it throws out this error ! Missing $ inserted.
\documentclass[border={5}]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[siunitx]{circuitikz}
\begin{document}
\begin{circuitikz}[ultra thick,>=latex,american voltages]
\draw
(0,0) to[R,l_=$\scalebox{2}{2\si{\ohm}}$,*-*] (6,0) to[cV,l^=$\scalebox{2}{2 v_x}$] (12,0);
\end{circuitikz}
\end{document}
I've faced this problem before and I've solved it by placing curly brackets (i.e. {=}
) but this solution is not working with v{_}x
.
l^=\scalebox{2}{2 $v_x$}