0

I am using tikz for the first time to draw my electrical circuits.

Below is an image of the problem I am having. How can I set, by default, the position of the vertical electrical parameters, to be in the left side? Also, when it comes to my half drawn horizontal resistance how can I delete the extra line?

enter image description here

The code is the following:

\begin{center}
\begin{circuitikz} 
\draw (0,0) to [short, *-, l=$\mathrm{n^1_e}$(i)] (1,0)
to [short] (1,-0.4)
to [short] (0.3,-0.4)
to [R, l=$\mathrm{G_{ii}/2}$] (0.3,-2)
to [short] (1.7,-2)
to [C, l=$\mathrm{C_{ii}/2}$] (1.7,-0.4)
to [short] (1,-0.4);
\draw (1,-2) node[ground] (1,-0.4);
\draw (1,0) to [short] (2,0)
to [R, l=$\mathrm{R_{ii}}$(i)] (3,0)
to [short] (3.3,0)
to [L, l=$\mathrm{L_{ii}}$(i)] (4.3,0);
\end{circuitikz}
\end{center}

Thanks in advance :)

2
  • could you upload the code producing this figure
    – js bibra
    Feb 15, 2021 at 15:06
  • @jsbibra Done :)
    – Wallflower
    Feb 15, 2021 at 15:08

1 Answer 1

2

change the following lines

to [R, l_=$\mathrm{G_{ii}/2}$] (0.3,-2)%<--------------add underscore

     ---------

        to [C, l_=$\mathrm{C_{ii}/2}$] (1.7,-0.4)%<--------------add underscore

**MWE**

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx, circuitikz}
\begin{document}
    \begin{circuitikz} 
        \draw (0,0) to [short, *-, l=$\mathrm{n^1_e}$(i)] (1,0)
        to [short] (1,-0.4)
        to [short] (0.3,-0.4)
        to [R, l_=$\mathrm{G_{ii}/2}$] (0.3,-2)
        to [short] (1.7,-2)
        to [C, l_=$\mathrm{C_{ii}/2}$] (1.7,-0.4)
        to [short] (1,-0.4);
        \draw (1,-2) node[ground]{} (1,-0.4);
        \draw (1,0) 
        to [R, l=$\mathrm{R_{ii}}$(i)] (3,0)
        to [short] (3.3,0)
        to [L, l=$\mathrm{L_{ii}}$(i)] (4.3,0);
    \end{circuitikz}
    
\end{document}

enter image description here

3
  • 1
    It worked, thank you !!
    – Wallflower
    Feb 15, 2021 at 15:17
  • 1
    the last three lines of code have been edited to take care of the extra line also
    – js bibra
    Feb 15, 2021 at 15:44
  • 1
    Thanks for your help !!
    – Wallflower
    Feb 15, 2021 at 18:17

You must log in to answer this question.

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