我正在尝试绘制美国风格的否定器,我找到了一个网站,那里有所有方案中部件的类似名称,但它不断弹出错误,说它无法识别“american not port”,而这个名称与我找到的网站中的名称相同。也许我添加了一些不必要的行,但我对 latex 还不熟悉,任何帮助都将不胜感激。
\documentclass[hidelinks,a4paper,10pt]{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{arrows,shapes,automata,backgrounds,petri,patterns,shadows,fadings,calc,decorations,decorations.text,circuits.logic.US}
\usetikzlibrary{calc}
\usepackage{calc}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{figure}
\tikzstyle{not_1} = [draw,not port, line width=0.75pt]
\begin{tikzpicture}
\draw [<->,line width=3pt] (0,0) - - (0,-2);
\draw [line width=0.5pt] (-1.5,0) - - (-1.5,-1);
\draw [line width=0.5pt] (1.75,0) - - (1.75,-1);
\draw node[](1.75,-1) (n1){};
\draw (n1)node [not_1, rotate=-90](not1){};
\end{tikzpicture}
\end{figure}
\end{document}
答案1
添加\usepackage{circuitikz}
电路元件的序言。
\documentclass[hidelinks,a4paper,10pt]{article}
\usepackage{tikz,circuitikz}
%\usepackage{pgfplots}
\usetikzlibrary{arrows,shapes,automata,backgrounds,petri,patterns,shadows,fadings,calc,decorations,decorations.text,circuits.logic.US}
%\usetikzlibrary{calc}
%\usepackage{calc}
%\pgfplotsset{compat=1.12}
\begin{document}
\begin{figure}
\tikzstyle{not_1} = [draw,not port, line width=0.75pt]
\begin{tikzpicture}
\draw [latex-latex,line width=3pt] (0,-1) -- (0,-3);
\draw [line width=0.5pt] (-1.5,0) -- (-1.5,-1);
\draw [line width=0.5pt] (1.75,0) -- (1.75,-1);
\draw node[](1.75,-1) (n1){};
\draw (n1)node [not_1, rotate=-90](not1){};
\end{tikzpicture}
\end{figure}
\end{document}