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 twocircuitikz
environments (or putting them next to each other), simply draw both circuits in the same environment.