我想添加一个电路符号(电容器)和quantikz
仪表在相同的tikzpicture
环境中,但这并没有绘制quantikz
符号。我遗漏了什么?
\documentclass{article}
\usepackage{amssymb,amsfonts,dsfont}
\usepackage{tikz}
\usepackage{quantikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{quantikz}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to [capacitor] (2,0);
\node at (1,-1) {capacitor};
\draw (0,-4) to |[meter]| (2,-4);
\node at (1,-5) {meter};
\end{tikzpicture}
\end{document}
答案1
meter
您可以添加具有 定义的样式的节点quantikz
。
\documentclass{article}
\usepackage{amssymb,amsfonts,dsfont}
\usepackage{tikz}
\usetikzlibrary {circuits.ee.IEC}
\usetikzlibrary{quantikz}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to [capacitor] (2,0);
\node at (1,1) {capacitor};
\node[meter, label=below:meter] (M) at (1,-2) {};
\draw (M) edge (0,-2) (2,-2) edge (M);
\end{tikzpicture}
\end{document}