我无法使用 获得正确的电感形状circuitikz
。我得到的是一个黑色填充的矩形:
这是我的 MWE:
\documentclass{article}
\usepackage{circuitikz}
\usepackage[french]{babel}
\begin{document}
\begin{circuitikz}
\draw (0,0)to[european inductor](2,0);
\draw(0,0)to(0,-.25)to[ground](0,-.5);
\end{circuitikz}
\end{document}
我正在使用 Windows 7 和 MiKTeX 2.9,我刚刚更新了它。谢谢。
我忽略了 确实european inductor
是正确的。看来真正的问题在于cute inductor
,或者简单地说L
:我收到以下错误消息:
! Undefined control sequence.
\pgf@sh@bg@cuteinductorshape ...mationadjustments
\par \pgfmathsetlength {\p...
l.8 \draw (0,0) to [L] (2,0)
;
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
我怀疑这个问题有联系:Miktex 2.9 pgfplots,circuitikz……
答案1
- 你应该添加
tikz
库(它删除了代码babel
中由法语 Babel 引入的更改)tikz
ground
是节点
\documentclass{article}
\usepackage[french]{babel}
\usepackage{circuitikz}
\usetikzlibrary{babel}
\begin{document}
\begin{circuitikz}
\draw (0,0) to [european inductor] (2,0)
(0,0) -- (0,-0.25) node [ground] {};
\end{circuitikz}
\end{document}
编辑:用于L
电感器:
\documentclass{article}
\usepackage[french]{babel}
\usepackage{circuitikz}
\usetikzlibrary{babel}
\begin{document}
\begin{circuitikz}
\draw (0,0) to [L] (2,0)
(0,0) -- (0,-0.25) node [ground] {};
\end{circuitikz}
\end{document}