使用 tikz 在框图中创建三角形

使用 tikz 在框图中创建三角形

我一直试图在我的图表中创建一个三角形作为缓冲区,但是出现了错误:

!Package pgfkeys Error: I do no know the key '/tikz/buffer' and I am going to ignore it. Perhaps you misspelled if. 

有人能给我指出正确的方向吗?我已经包含了软件包和 tikz 库:

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{shapes.geometric}

框图

 \tikzset{%
  blocks/.style    = {draw, thick, rectangle, minimum height = 3em,
    minimum width = 3em},
  sum/.style      = {draw, circle, node distance = 2cm}, % Adder
  input/.style    = {coordinate}, % Input
  output/.style   = {coordinate} % Output
  %buffer/.style = {isosceles triangle, fill=gray!25, minimum width=1.5cm    }
  buffer/.style={
        draw,
        shape border rotate=180,
        regular polygon,
        regular polygon sides=3,
        fill=white,
        node distance=2cm,
        minimum height=4em
    }

}
% Defining string as labels of certain blocks.
\newcommand{\suma}{\Large$+$}
\newcommand{\inte}{$\displaystyle \int$}
\newcommand{\derv}{\huge$\frac{d}{dt}$}
\begin{center}

\begin{tikzpicture}[auto, thick, node distance=2cm, >=triangle 45]
\draw
    % Drawing the blocks of first filter :
    node at (0,0)[right=-3mm]{\Large \textopenbullet}
    node [input, name=input1] {} 
    node [sum, right of=input1] (suma1) {\suma}
    node [blocks, right of=suma1] (inte1) {\Large $z^{-1}$}
    node [blocks, right of=inte1] (inte2) {\Large $z^{-1}$}
    node [buffer, right of=inte2] (buff) {\Large $K$}
         %node at (6,0)[block] (Q1) {\Large $z^{-1}$} %giver navn på blocken
         %node at (8,0)[blocks] (Q2) {\Large $K$}
         %node at (8,0)[buffer] (Q1) {\Large $K$}
         node [blocks, below of=inte1] (ret1) {\Large$T_1$};
    % Joining blocks. 
    % Commands \draw with options like [->] must be written individually
    \draw[->](input1) -- node {$X(n)$}(suma1);
    \draw[->](suma1) -- node {$+$} (inte1);
    \draw[->](inte1) -- node {} (inte2);
    %\draw[->](inte2) -- node {} {Q2};  
    \draw[->](ret1) -| node[near end]{} (suma1);
    % Adder
    ;
\end{tikzpicture}
\end{center}

\begin{tikzpicture}
\node [isosceles triangle, fill=gray!25, minimum width=1.5cm] (t) {};
\end{tikzpicture}

相关内容