# Why are markings of \$R_1\$ displayed everywhere in the circuit?

The marking of $R_1$ is display everywhere.

\documentclass[12pt,letterpaper]{article}
\usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry}

\usepackage{tikz}  % for drawing pictures
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{arrows.meta}

\usepackage[siunitx]{circuitikz} % circuit package and  include electrical units in our labels

\begin{document}

\begin{figure}[H]
\centering
\begin{circuitikz}[american,]
\ctikzset{tripoles/mos style/arrows}
\def\killdepth#1{{\raisebox{0pt}[\height][0pt]{#1}}}
%\path (0,0) -- (2,0); % bounding box

\draw
(-3,9)  -- (3,9) node[label=right: $V_{dd} \SI{}{}$] {}

(2,9) to [resistor, a^ = $R_3$] (2,5)

%(M1.gate) -- (3,-1) -- (-3,-1)[short, -] to (-3,0) coordinate (A)

%(-3,1)[short, *-] to (M1.gate)

(2,5) -- (-3,5) to [resistor, a^ = $R_2$] (-3,3)
to (-3,3) [resistor,a^ = $R_1$] (-3,3)
to (-3,1.5) node[ground](GND){}

(2,1) node[nmos] (M1) {$M_1$}
(M1.source) node[] {} -- (2,0) node[ground](GND){} (2,-3)

(2,4)node[nmos] (M2) {$M_2$}
(0,4) node[anchor=east] {$V_{bias}$}[short, o-] to (M2.gate) node[] {}
(M2.source) node[] {} -- (2,2)
(M2.drain) node[right] {} -- (2,5) to  [short, *-o, name=S] ++ (2,0) node[right]{$V_{out}$};

\draw (-3,3.25)[short, *-] to (-4,3.25) -- (-4,2) node[ground](GND){};

\draw (5,0) node[ground](GND){}  to (5,0) to [I, i_>=$I_{in}$]  (5,2) to (2,2)[short, *-*];
%\draw  [short, -](5,1) to  [short, *-*, name=S] ++(3,0)node[right]{$V_{out}$};

%\draw  [short, *-] (-2,0) to [resistor, a = $R_2$] (-2,-3);

%\draw (5,6) to (5,4) node[nmos] (M2) {$M_2$} (5,3) to (5,1);

\end{circuitikz}
\caption{Current-Voltage Feedback After loop break} \label{fig:curr_volt_break_loop}
\end{figure}

\end{document}


How can I remove those unnecessary $R_1$ markings which are circled with red in my circuit?

• This looks like a bug, report it at circuitikz' issue tracker. For now, you can remove the spurious labels by passing the option a= (i.e. an empty annotation) to the two to where they appear (lines 41 and 43 of your MWE). Commented Mar 24 at 11:50
• BTW, one can use [l=...] instead of [a^=...]. Label (l) is the older option. Commented Mar 24 at 16:23
• No, it's not a bug. You can't use to (coord) [resistor...] ..., the path option must be arguments of to, otherwise they apply globally to the path. Commented Mar 24 at 17:39

You have several errors in your code. The R₁ thing is due to

to (-3,3) [resistor,a^ = $R_1$] (-3,3)

where the [] options are not applied directly to the to command, so that they are global to the (sub)path. Remove the first (by the way, redundant) coordinate and the $R_1$ will stick with the resistor.

Then, you are using node [] {} all over the place, which does nothing here but could create unwanted spaces (remember that a node has a non-zero size, look at the FAQ in the circuitikz manual).

Then, you do not have sufficient space for the R₁/R₂ thing.

The last plot, with a [short, *-*] without a to, is again not correct.

Finally, I think you miss a connection with the M₁ drain.

I did a minimal correction (the circuit code could be greatly improved), but I do not know if this is what you wanted.

\documentclass[12pt,letterpaper]{article}
\usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry}

\usepackage{tikz}  % for drawing pictures
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{arrows.meta}

\usepackage[siunitx]{circuitikz} % circuit package and  include electrical units in our labels

\begin{document}

\begin{circuitikz}[american,]
\ctikzset{tripoles/mos style/arrows}
\def\killdepth#1{{\raisebox{0pt}[\height][0pt]{#1}}}
%\path (0,0) -- (2,0); % bounding box

\draw
(-3,9)  -- (3,9) node[label=right: $V_{dd} \SI{}{}$] {}

(2,9) to [resistor, a^ = $R_3$] (2,5)

%(M1.gate) -- (3,-1) -- (-3,-1)[short, -] to (-3,0) coordinate (A)

%(-3,1)[short, *-] to (M1.gate)

(2,5) -- (-3,5) to [resistor, a^ = $R_2$] (-3,3)
to [resistor,a^ = $R_1$] (-3,1)
node[ground](GND){}

(2,1) node[nmos] (M1) {$M_1$}
(M1.source) -- (2,0) node[ground](GND){} (2,-3)

(2,4)node[nmos, ] (M2) {$M_2$}
(0,4) node[anchor=east] {$V_{bias}$}[short, o-] to (M2.gate)
(M2.source)  -- (2,2)
(M2.drain)  -- (2,5) to  [short, *-o, name=S] ++ (2,0) node[right]{$V_{out}$};

\draw (-3,3.25)[short, *-] to (-4,3.25) -- (-4,2) node[ground](GND){};

\draw (5,0) node[ground](GND){}  to [I, i_>=$I_{in}$]  (5,2) to (2,2) -- (M1.D) ;

\end{circuitikz}

\end{document}