# Align vertically 2 circuits

I'm currently at 8th grade working on circuits and I'm taking notes with LaTeX and CircuiTikZ. The problem is that I have 2 circuits, but one is vertically bigger than the other, and so I don't know how to align those two circuits vertically.

Currently I have this code:

\begin{center}\begin{circuitikz}
\draw (0,0) -- (1,0) -- (1,1) to[R, l=$R_1$] (3,1) -- (3,0) -- (4,0);
\draw (1,0) -- (1,-1) to[R, l=$R_2$] (3,-1) -- (3,0);
\end{circuitikz}
$\ \ \Longleftrightarrow \ \$
\begin{circuitikz}
\draw (0,0) to[R, l=$R$] (3,0);
\end{circuitikz}
\end{center}
$$R=\frac{1}{\frac{1}{R_1}+\frac{1}{R_2}} \Longleftrightarrow R=\left( \sum_n\frac{1}{R_n} \right)^{-1}$$


## Then I tried adding a node at (4,0) and add the second circuit but I get this:

\begin{center}\begin{circuitikz}
\draw (0,0) -- (1,0) -- (1,1) to[R, l=$R_1$] (3,1) -- (3,0) -- (4,0);
\draw (1,0) -- (1,-1) to[R, l=$R_2$] (3,-1) -- (3,0);
\draw (4,0) node[right]{$\ \ \Longleftrightarrow \ \$
\begin{circuitikz}
\draw (0,0) to[R, l=$R$] (3,0);
\end{circuitikz}};
\end{circuitikz}
\end{center} Anyone knows how could I align the circuits?

•  is not supported in LaTeX, use $ and $ instead!, also instead of nesting two circuitikz environments (or putting them next to each other), simply draw both circuits in the same environment. Mar 5 at 10:49

One way to do this could look like this (I'd personally work more with relative placement than this, but this might do for OP).

The used scopes are not necessary for this, I only added them for semantic reasons and they could be dropped.

\documentclass[border=3.14,preview]{standalone}

\usepackage{circuitikz}

\begin{document}
\begin{center}
\begin{circuitikz}
\begin{scope} % not really necessary
\draw (0,0) to[short,-*] (1,0) -- (1,1) to[R, l=$R_1$] (3,1) to[short,-*]
(3,0) -- (4,0) coordinate(end1);
\draw (1,0) -- (1,-1) to[R, l=$R_2$] (3,-1) -- (3,0);
\end{scope}
\path
(end1)++(0.5,0)
node[anchor=west](lr){$\Longleftrightarrow$}
;
\begin{scope} % not really necessary
\draw (lr.east)++(.5,0) to[R, l=$R$] ++(3,0);
\end{scope}
\end{circuitikz}
\end{center}
$R = \frac{1}{\frac{1}{R_1}+\frac{1}{R_2}} \Longleftrightarrow R = \left( \sum_n\frac{1}{R_n} \right)^{-1}$
\end{document} • Perhaps with a TikZ matrix, one could get a more aesthetic result with formulas centred under their circuit. Mar 5 at 11:32
• @projetmbc the formulae are not directly linked to either of the circuits, both fully describe the two circuits and how they are equivalent. Mar 5 at 11:46

Although I would use @Skillmon method here (centering the arrow would be quite complex here, see Vertical alignment of tikz circle in equation, for example), is good to know the existence of the baseline option to TikZ (and so circuitikz) pictures. You can feed it a coordinate or a node, and it will consider this coordinate or node the vertical position around which the whole picture is aligned vertically.

\documentclass[border=3.14,preview]{standalone}

\usepackage{circuitikz}

\begin{document}
\begin{center}
\begin{circuitikz}[baseline={(0,0)}]
\draw (0,0) to[short,-*] (1,0) -- (1,1) to[R, l=$R_1$] (3,1) to[short,-*]
(3,0) -- (4,0) coordinate(end1);
\draw (1,0) -- (1,-1) to[R, l=$R_2$] (3,-1) -- (3,0);
\tikz [baseline] \draw (0,0) node{$\Longleftrightarrow$};
\draw (0,0) to[R, l=$R$] ++(3,0);
$R = \frac{1}{\frac{1}{R_1}+\frac{1}{R_2}} \Longleftrightarrow R = \left( \sum_n\frac{1}{R_n} \right)^{-1}$ 