更改我的 tikz 电路中电路标签的位置

更改我的 tikz 电路中电路标签的位置

这是我第一次使用 tikz 来绘制电路。

下面是我遇到的问题的图片。我如何默认将垂直电气参数的位置设置为左侧?此外,当涉及到我绘制的一半水平电阻时,我该如何删除多余的线?

在此处输入图片描述

代码如下:

\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}

提前致谢 :)

答案1

更改以下几行

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}

在此处输入图片描述

相关内容