如何在 LaTeX 中创建颜色键来显示该表的颜色含义?
答案1
你想要这样的东西吗?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{tikzpicture}
\node [label=label1,draw,fill=red] (node1) {};
\node [label={[name=l] label2},draw,fill=yellow] (node2) at ([xshift=2cm]node1.east){};
\node [label={[name=l] label3},draw,fill=blue] (node3) at ([xshift=2cm]node2.east){};
\end{tikzpicture}
\end{document}