我使用 指示电路中的电流方向\node[current direction={}]
。在下面的代码中,您可以看到标签下的箭头i_L
与电压的箭头不同u_L
。我尝试通过定义自己的箭头将电流方向的箭头更改为“latex”样式IPfeil
。不幸的是,我没有成功。我也尝试过\tikzet{>=latex}
,但这也没有用。
有人知道如何改变箭头吗?
\documentclass[]{scrbook}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}
\usetikzlibrary{arrows}
% Define arrows
\tikzset{
Pfeil/.style={thin,shorten >=#1,shorten <=#1,->,>=latex},
UPfeil/.style={blue,Pfeil=#1,font={\sffamily\itshape\footnotesize}},
IPfeil/.style={red,Pfeil=#1,font={\sffamily\itshape\footnotesize}},
}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw[semithick] ([xshift=6cm]90:1 and 1.25) |- (8,4);
\draw[semithick] ([xshift=6cm]60:1.75 and 2) ++(0.5, 0) |- (8,3);
\draw[fill=white] (8,4) circle (1.5pt);
\draw[fill=white] (8,3) circle (1.5pt);
% Voltage arrow
\draw[UPfeil=0.4em] ([xshift=0em]8,4) -- node[right]{\(u_{L}\)} ([xshift=0em]8,3);
% Current arrow
\tikzset{current direction arrow/.style={IPfeil=0em}},
\node[current direction={red, rotate=180, info'={[IPfeil=0em,red, above]\(i_L\)}}] at (7.5,4) {};
\end{tikzpicture}
\end{document}
答案1
正确的箭头名称是direction ee
。第 47.4.8 节“实现:EE 符号形状库”手动的了解更多:
\documentclass[]{scrbook}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}
\usetikzlibrary{arrows}
% Define arrows
\tikzset{
Pfeil/.style={thin,shorten >=#1,shorten <=#1,->,>=direction ee},
UPfeil/.style={blue,Pfeil=#1,font={\sffamily\itshape\footnotesize}},
IPfeil/.style={red,Pfeil=#1,font={\sffamily\itshape\footnotesize}},
}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw[semithick] ([xshift=6cm]90:1 and 1.25) |- (8,4);
\draw[semithick] ([xshift=6cm]60:1.75 and 2) ++(0.5, 0) |- (8,3);
\draw[fill=white] (8,4) circle (1.5pt);
\draw[fill=white] (8,3) circle (1.5pt);
% Voltage arrow
\draw[UPfeil=0.4em] ([xshift=0em]8,4) -- node[right]{\(u_{L}\)} ([xshift=0em]8,3);
% Current arrow
\tikzset{current direction arrow/.style={IPfeil=0em}},
\node[current direction={red, rotate=180, info'={[IPfeil=0em,red, above]\(i_L\)}}] at (7.5,4) {};
\end{tikzpicture}
\end{document}