我怎样才能将电阻器的标签水平放置,而不是与元件处于同一方向?
我尝试将其用作[R, l=$R_c$:-90]
我看到的示例,但没有效果。
\documentclass[11pt]{article}
\usepackage{circuitikz}
\usepackage{tikz} % for flowcharts
\begin{document}
\begin{center}
\begin{circuitikz}[american voltages]
\draw (0,0)
to[R, l=$R_c$, o-o] (4,0)
to[R, l=$R_a$, o-o] (2,-3)
to[R, l=$R_b$, o-o] (0,0)
{[anchor=east] (0,0) node {a} [anchor=west] (4,0) node {b} [anchor = north] (2,-3) node {c}};
\end{circuitikz}
$\hspace{0.25in} \displaystyle \Leftrightarrow \hspace{0.25in}$
\begin{circuitikz}[american voltages]
\draw (0,0)
to[R, l=$R_1$, o-*] (2,-1)
to[R, l=$R_2$, *-o] (4,0) (2,-1)
to[R, l=$R_3$, *-o] (2,-3)
{[anchor=east] (0,0) node {a} [anchor=west] (4,0) node {b} [anchor = north] (2,-3) node {c}};
\end{circuitikz}
\end{center}
\end{document}
这就是
这就是我想要的
附言:我还想将两幅图之间的箭头放得更居中一些。可以吗?
此致!
答案1
使用宏可以实现直接标记\ctikzset
:
\documentclass[a4paper]{article}
\usepackage{circuitikz}
\begin{document}
\begin{center}
\begin{circuitikz}[american voltages]
\ctikzset { label/align = straight }
\draw (0,0)
to[R, l=$R_c$, o-o] (4,0) % The voltage source
to[R, l=$R_a$, o-o] (2,-3)
to[R, l=$R_b$, o-o] (0,0)
{[anchor=east] (0,0) node {a} [anchor=west] (4,0) node {b} [anchor = north] (2,-3) node {c}};
\end{circuitikz}
$\hspace{0.25in} \displaystyle \Leftrightarrow \hspace{0.25in}$
\end{center}
\end{document}
有关 circuitikz 标签的此信息和其他信息可在circuitikz 官方文档。