Circuitikz:虚线和箭头

Circuitikz:虚线和箭头

如何添加虚线和箭头?

我希望电阻器后面有一个指向右侧的箭头,并且从 B 到连接点有一条虚线。

另外,书中有一个模拟接地的符号,但只有两条线,就像电容一样。这也可以做到吗?

在此处输入图片描述

书籍图

在此处输入图片描述

我的代码:

\documentclass[convert = false]{standalone}

\usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx
% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt
\renewcommand{\rmdefault}{ppl}% rm
\linespread{1.05}% Palatino needs more leading
\usepackage[scaled]{helvet}% ss //  http://ctan.org/pkg/helvet
\usepackage{courier}% tt // http://ctan.org/pkg/courier
\usepackage{eulervm}  %  http://ctan.org/pkg/eulervm
% a better implementation of the euler package (not in gwTeX)
\normalfont%
\usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc
\usepackage{textcomp}%  http://ctan.org/pkg/textcomp

\usepackage[american, cuteinductors]{circuitikz}
\usepackage{siunitx}

\begin{document}
\begin{circuitikz}[scale = 2]
  \draw                                     (0, 0)
        to[C, l^ = \(v_2\), -*]             (0, 1)
        node[anchor = east] {\(B\)}
        to[short]                           (.5, 1.25) 
        to[short]                           (.5, 2)
        to[R, l^ = ${R = \SI{1}{\ohm}}$]    (3, 2)
        to[short]                           (4, 2)
        to[L, l^ = ${L = \SI{1}{\henry}}$]  (4, 0)
        to[short]                           (0, 0);
  \draw                                     (1, 0)
        to[C, l_ = \(v_1\), -*]             (1, 1)
        node[anchor = west] {\(A\)}
        to[short]                           (.5, 1.25);

  \node at (.1, .65) {\(+\)};
  \node at (1.1, .65) {\(+\)};
\end{circuitikz}
\end{document}

答案1

一个可能但有点长的解决方案可能是如下:

   \documentclass[convert = false]{standalone}

\usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx
% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt
\renewcommand{\rmdefault}{ppl}% rm
\linespread{1.05}% Palatino needs more leading
\usepackage[scaled]{helvet}% ss //  http://ctan.org/pkg/helvet
\usepackage{courier}% tt // http://ctan.org/pkg/courier
\usepackage{eulervm}  %  http://ctan.org/pkg/eulervm
% a better implementation of the euler package (not in gwTeX)
\normalfont%
\usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc
\usepackage{textcomp}%  http://ctan.org/pkg/textcomp

\usepackage[american, cuteinductors]{circuitikz}
\usepackage{siunitx}
\tikzstyle{densely dashed}=          [dash pattern=on 4pt off 3pt]
\begin{document}
\begin{circuitikz}[scale = 2]
  \draw                                    (0, 0)
        to[battery1, l^ = \(v_2\), -*]             (0, 1)
        node[anchor = east](BB) {\(B\)};
   \draw [densely dashed] (BB.east)--(.5, 1.25) node (AA){} ;
   \draw (AA)[short]  to                         (.5, 2)
        to[R, l^ = ${R = \SI{1}{\ohm}}$]    (3, 2)
      to[short,i=$i(t)$]                           (4, 2)
      to[L, l^ = ${L = \SI{1}{\henry}}$]  (4, 0)
     to[short]                           (0, 0);
   \draw                                     (1, 0)
        to[battery1, l_ = \(v_1\), -*]             (1, 1)
        node[anchor = west] {\(A\)}
        to[short]                           (.5, 1.25);

  \node at (.1, .65) {\(+\)};
  \node at (1.1, .65) {\(+\)};
\end{circuitikz}
\end{document}

在此处输入图片描述

相关内容