2

I don't know how to create circuit like the image in the attachment.

wanted

3 Answers 3

9

Here is a circuitikz solution. You may like the circuitikz input format but not like the shapes/sizes of the components; in that case, there are many options described in the package manual and in the code if you wish to explore and do some tweaking for your own circuit diagrams.

\documentclass{standalone}
\usepackage[
  europeanresistors,
  americaninductors,
]{circuitikz}

\begin{document}
\begin{circuitikz} \draw (0,0)
  node[above] {A}
  to[R=$R$,*-*] ++(2.5,0)
  node[above] {B}
  to[L=$L_r$,-*] ++(2.5,0)
  node[above] {D}
  to[C=$C$,-*] ++(2.5,0)
  node[above] {E}
;\end{circuitikz}
\end{document}

enter image description here

1
  • 1
    @datanhlg If this answer helped you, please mark your question as resolved by 'accepting' it. Commented May 25, 2015 at 3:42
8

I don't know circuitikz, but here is a solution utilizing the TikZ library circuits.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}
    \begin{tikzpicture}[circuit ee IEC]
        \path node [contact] (A) {}
            ++(right:2) node [contact] (B) {}
            ++(right:2) node [contact] (D) {}
            ++(right:2) node [contact] (E) {};
        \draw (A) to [resistor={info=$R$}] (B)
                  to [inductor={info=$L$}] (D)
                  to [capacitor={info=$C$}] (E);
        \path   (A) node[above] {A}
                (B) node[above] {B}
                (D) node[above] {D}
                (E) node[above] {E};
    \end{tikzpicture}
\end{document}

Screen shot

1
  • 1
    @datanhlg If this answer helped you, please mark your question as resolved by 'accepting' it. Commented May 25, 2015 at 3:42
4

A PSTricks solution using the pst-circ package:

\documentclass{article}

\usepackage{pst-circ}
\newcommand*\Node[1]{\uput[90](#1){#1}}

\begin{document}

\begin{pspicture}(9.2,1.35) % boundry found manually
\psset{arrows = *-*}
  % definition of node positions
  \pnodes(0.1,0.5){A}(3.1,0.5){B}(6.1,0.5){D}(9.1,0.5){E}
  % electrical components
  \resistor[labeloffset = 0](A)(B){$R$}
  \coil(B)(D){$L_{r}$}
  \capacitor(D)(E){$C$}
  % placement of nodes
  \Node{A}
  \Node{B}
  \Node{D}
  \Node{E}
\end{pspicture}

\end{document}

output1

or

\documentclass{article}

\usepackage{pst-circ}
\newcommand*\Node[1]{\uput[90](#1){#1}}

\begin{document}

\begin{pspicture}(9.2,1.35) % boundry found manually
\psset{arrows = *-*}
  % definition of node positions
  \pnodes(0.1,0.5){A}(3.1,0.5){B}(6.1,0.5){D}(9.1,0.5){E}
  % electrical components
  \resistor[labeloffset = 0](A)(B){$R$}
  \coil[dipolestyle = curved, labeloffset = 0.55](B)(D){$L_{r}$}
  \capacitor(D)(E){$C$}
  % placement of nodes
  \Node{A}
  \Node{B}
  \Node{D}
  \Node{E}
\end{pspicture}

\end{document}

output2

You must log in to answer this question.

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