Beamer/LaTeX 盒

Beamer/LaTeX 盒

我怎样才能在乳胶(或投影仪)中绘制如图所示的文档和图形? 在此处输入图片描述

答案1

开始的事情:

在此处输入图片描述

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix, positioning, shapes.arrows}
\usepackage{lmodern}

\begin{document}
\begin{frame}[fragile]

\begin{tikzpicture}[font=\sffamily\small,
    yellow/.style={minimum width=1.5cm, fill=yellow, draw=orange, minimum height=5mm},
    gray/.style={minimum width=.5cm, fill=gray, draw,  minimum height=5mm},
    orange/.style={minimum width=1.5cm, fill=orange!70, draw=orange, minimum height=5mm,},
    pink/.style={minimum width=.5cm, fill=pink!70, draw=pink,  minimum height=5mm},
    ]

    \matrix (A) [matrix of nodes, nodes in empty cells,
    nodes={gray, anchor=center}, 
    column sep=1pt, row sep=3pt, 
    column 1/.style={nodes=yellow}
]
    {
    blue &|[label=1]| &|[label=2]| 1 &|[label=3]| &|[label=4]| \\
    cat & & & 1 & \\
    egg & & & & 1 \\
    fish & 1& 1 & & \\
    green & & & & 1 \\
    ham & & & & 1 \\
    hat & & & 1 & \\
    one & 1& & & \\
    red & & 1 & & \\
    two & 1& & & \\
    };

    \matrix (B) [matrix of nodes, 
    nodes={pink, anchor=center}, 
    column sep=3mm, row sep=3pt, 
    column 1/.style={nodes=orange},
    right=3cm of A.south east, anchor=south west
]
    {
    blue & 2 \\
    cat & 3 \\
    egg & 4 \\
    fish & 1& 2 \\
    green & 4 \\
    ham &  4 \\
    hat & 3  \\
    one & 1 \\
    red & 2 \\
    two & 1 \\
    };

    \foreach \i in {1,...,10}
        \draw[->] (B-\i-1)--(B-\i-2);
    \draw[->] (B-4-2)--(B-4-3);

    \path (A-5-5.west) -- node[anchor=east, single arrow, draw=yellow!80!black, fill=yellow!30] {\phantom{right}} (B-5-1.east);
\end{tikzpicture}
\end{frame}
\end{document}

相关内容