3

I would like to know how do I make series and parallel associations in latex? I am trying to use the following code:

\documentclass{standalone}
\usepackage{tikz, tkz-euclide}
\usepackage[american]{circuitikz}
\begin{document}
\begin{circuitikz}

 \draw (0,0) to[C=$C_{1}$] (2,0) (0,0) to[C=$C_{1}$] (4,0) (0,0)  to[C=$C_{1}$] (8,0);

\end{circuitikz}
\end{document}

is almost in the way I want, I just want to show these three capacitors in series and then in parallel. Help, please

1
  • Welcome to TeX.SE, and nice from you that provided a real MWE in your first question. [To add the code inside an appropriate environment, 1)just paste it 2)select it and 3) press the button {}]
    – koleygr
    Nov 2, 2018 at 19:56

2 Answers 2

1

You were close. I don't realy use tcircuitikz but This could help you:

\documentclass{article}
\usepackage{tikz, tkz-euclide}
\usepackage[american]{circuitikz}
\usepackage{subcaption}
\begin{document}
\begin{figure}[!htb]
\begin{minipage}{0.4\textwidth}
\centering
\begin{circuitikz}
 \draw (0,0) to[C=$C_{1}$] (2,0);
 \draw (0,-2) to[C=$C_{2}$] (2,-2);
 \draw (0,-4)  to[C=$C_{3}$] (2,-4);
 \draw (0,0)--(0,-6) (2,0)--(2,-6);
 \draw (0,-6) to[battery1={9 V}] (2,-6);
\end{circuitikz}
\captionof{subfigure}{Paralel}
\end{minipage}\hfill
\begin{minipage}{0.4\textwidth}
\centering
\begin{circuitikz}
 \draw (0,0) to[C=$C_{1}$] (2,0) to[C=$C_{2}$] (4,0) to[C=$C_{3}$] (6,0);
 \draw (0,0)--(0,-2) to[battery1={9 V}] (6,-2)--(6,0);
\end{circuitikz}
\captionof{subfigure}{In Series}
\end{minipage}
\captionof{figure}{Paralel and In Series}
\end{figure}
\end{document}

Output:

enter image description here

May be it is recommended to use siunitx package too.

6
  • Can not leave only the capacitors? Nov 2, 2018 at 21:58
  • The image i need has to be just the capacitors. Nov 2, 2018 at 22:00
  • You can by removing the non-needed parts like to[battery1={9 V}]... But then the capacitors are non In Series neither Parallel then...
    – koleygr
    Nov 2, 2018 at 22:00
  • You may also want to remove the \draw without a capacitor parts
    – koleygr
    Nov 2, 2018 at 22:01
  • Just remove the two last \draw commands in first case... and the last \draw in second case.
    – koleygr
    Nov 2, 2018 at 22:04
0
\documentclass{article}
\usepackage{tikz, tkz-euclide}
\usepackage[american]{circuitikz}
\usepackage{subcaption}
\begin{document}
\begin{figure}[!htb]
\begin{minipage}{0.4\textwidth}
\centering
\begin{circuitikz}
 \draw (0,0) to[C=$C_{1}$] (2,0) to[C=$C_{1}$] (4,0) to[C=$C_{1}$] (6,0);
\end{circuitikz}
\caption{capacitores em série.}
\end{minipage}
\end{figure}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .