我试图在电路中箭头的下方或上方正确放置某种图例。我的目的是用箭头和文本表示外部刺激。然而,我发现的唯一方法是使用短的用当前箭头代替带有结束箭头的线。这是我的 MWE。也附上结果。
\documentclass[10pt]{standalone}
\usepackage{circuitikz}
\usepackage{tikz}
\begin{document}
\begin{circuitikz}[american voltages, american currents, european resistors]
\draw
(-2.5,2) to [short,i=Solar Flux] (-0.5,1.3)
(0,0) to[I, i_>=$I_{Light}$] (0,2) %% Note _>= instead of >=
to[short, -*] (1.5,2)
(1.5,2) to[diode, i=$I_{Diode}$, -*] (1.5,0)
to[short, -*] (0,0)
(1.5,2) to[short, i_>=$I_{out}$] (3,2)
(1.5,0) to[short] (3,0)
(3,2) to [open,v^>=$V_{out}$] (3,0)
\end{circuitikz}
\end{document}
答案1
如果我正确理解了你的问题,你可以这样做:
\documentclass[10pt]{standalone}
\usepackage{circuitikz}
\usepackage{tikz}
\begin{document}
\begin{circuitikz}[american voltages, american currents, european resistors]
\draw
(-2.5,2) to [short,i=\ ] (-0.5,1.3)
(-2.5,1.75) to [short,i=\ ] (-0.5,1.05)
(-2.5,1.5) to [short,i=\ ] (-0.5,0.8)
(0,0) to[I, i_>=$I_{Light}$] (0,2) %% Note _>= instead of >=
to[short, -*] (1.5,2)
(1.5,2) to[diode, i=$I_{Diode}$, -*] (1.5,0)
to[short, -*] (0,0)
(1.5,2) to[short, i_>=$I_{out}$] (3,2)
(1.5,0) to[short] (3,0)
(3,2) to [open,v^>=$V_{out}$] (3,0);
\node at (-1.5,0.75){$Solar Flux$};
\end{circuitikz}
\end{document}