我想在投影仪幻灯片中使用 TikZ 绘制图形

我想在投影仪幻灯片中使用 TikZ 绘制图形

我想用 TI 绘制图形beamer幻灯片中的 Z。

我曾尝试过

\begin{figure} 
    \centering
    \begin{tikzpicture}[scale=0.47]
        \tikzset{%
            every matrix/.style={%
                inner sep=-\pgflinewidth,
                matrix of math nodes,
                column sep=-\pgflinewidth,
                nodes={draw=red,font=\color{blue}\footnotesize,minimum size=.55cm,anchor=center},
                ampersand replacement=\&}
        } 
        \matrix[above] (t1) at (0,0) {\cdots \& K \& \cdots\\};
        \matrix[below] (b1) at (0,0) {\cdots \& \bullet \& \bullet \& \& \cdots\\}; 
    \end{tikzpicture} 
\end{figure}

在此处输入图片描述

答案1

像这样吗?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{figure} 
    \centering
    \begin{tikzpicture}[scale=0.47]
        \tikzset{%
            every matrix/.style={%
                inner sep=-\pgflinewidth,
                matrix of math nodes,
                column sep=-\pgflinewidth,
                nodes={draw=red,font=\color{blue}\footnotesize,minimum size=.55cm,anchor=center},
                ampersand replacement=\&}
        } 
        \matrix[above] (t1) at (0,0) {\cdots \& K \& \cdots\\};
        \matrix[below] (b1) at (0,0) {\cdots \& \bullet \& \bullet \& \& \cdots\\};
        \draw[blue] (b1-1-2.center) -- ++ (-1,-2) node[pos=1.25] {$A_i$};
        \draw[blue] (b1-1-3.center) -- ++ (1,-2) node[pos=1.25] {$A_j$};
        \node[align=left,blue] at (7,0) {%
        \begin{tabular}{@{}r@{:\ }l@{}}
            $K$ & key\\
            $A_i,A_j$ & something else
        \end{tabular}};
    \end{tikzpicture} 
\end{figure}
\end{document}

在此处输入图片描述

相关内容