# How do I label Circuitikz resistor R1 with the value below and V1 above

I use Circuitikz to make a circuit and wanted to make resistor with + V1 - above and R1 with the value below like in the picture. The code I use ended up clumping the R1 and 47 Value instead of the R1 going below the 47. Thanks in advance.

\begin{circuitikz}
\draw (0,0) node[shape=ground]{}
(0,0) to [V, invert, l=$V$, a = $5V$ ] (0,3)
(0,3) to [cspst, i = $I_1$ ] (2,3)
(2,3) to [R, v^=$V_1$, l_=$R_1$, a = 47<\ohm>] (5,3)
(5,3) to [R, l =$R_1$, a = 100<\ohm>] (5,0)
(5,0) -- (0,0);
\end{circuitikz}
\caption{}
\label{}

• Welcome to TSE. Please post a Minimal Working Example, instead of a code snippet. Commented Sep 20, 2022 at 12:30

You can also use the circuitikz builtin l2 options (see pag. 175 of the manual, "Stacked (two line) label"), although Zarko's solution is more general.

\documentclass[margin=3mmm]{standalone}
\usepackage[siunitx]{circuitikz}

\begin{document}
\begin{circuitikz}[american voltages]
\draw   (0,0) node[shape=ground]{}
(0,0)   to [V, invert, l=$V$, a = $5V$ ] (0,3)
to [cspst, i = $I_1$ ] (2,3)
to [R, v^=$V_1$, l2_ = \SI{47}{\ohm} and $R_1$, l2 halign=c] (5,3)
(5,3)   to [R, v^=$V_2$, l2_ = \SI{100}{\ohm} and $R_2$, l2 halign=c] (5,0)
to [short,-*] (0,0);
\end{circuitikz}
\end{document}


Although it seems a bit tight to me, I'd go with

      to [R, v^=$V_1$, l_ = {$R_1=\SI{47}{\ohm}$}] (5,3)


to obtain

• +1! I see, that I need to read circuitikz package documentation again :-) Commented Sep 20, 2022 at 17:08

Like this?

With help of makecell and siunitx package:

\documentclass[margin=3mmm]{standalone}
\usepackage{makecell, siunitx}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}[american voltages]
\draw   (0,0) node[shape=ground]{}
(0,0)   to [V, invert, l=$V$, a = $5V$ ] (0,3)
to [cspst, i = $I_1$ ] (2,3)
to [R, v^=$V_1$, a = \makecell{\SI{47}{\ohm}\\  $R_1$}] (5,3)
(5,3)   to [R, v^=$V_2$, a = \makecell{\SI{100}{\ohm}\\ $R_2$}] (5,0)
to [short,-*] (0,0);
\end{circuitikz}
\end{document}

• Thank you very much! Commented Sep 20, 2022 at 14:27
• Without makecell: bipole annotation style={align=center} (either after to[ or as an option to the enclosing scope). Commented Sep 20, 2022 at 14:50
• @Qrrbrbirlbelm thank you very much for inbfo! Commented Sep 20, 2022 at 17:00
• @JayBirds Consider accepting the answer (click on the large tick mark below the voting buttons) if it solves your problem. This will help others to easily identify which answer solves the question best. Commented Oct 12, 2022 at 8:17