使用 \rowcolor、\cellcolor 和 \multicolumn (已安装包) 时未定义控制序列

使用 \rowcolor、\cellcolor 和 \multicolumn (已安装包) 时未定义控制序列

我在用https://www.tablesgenerator.com以便创建我的表。代码如下:

% Please add the following required packages to your document preamble:
% \usepackage{multirow}
% \usepackage[table,xcdraw]{xcolor}
% If you use beamer only pass "xcolor=table" option, i.e. \documentclass[xcolor=table]{beamer}
\begin{table}[]
\begin{tabular}{|c|l|l|}
\hline
\rowcolor[HTML]{EFEFEF} 
{\color[HTML]{000000} \textbf{Based on}} & \multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}{\color[HTML]{000000} \textbf{Name}}} & \multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}{\color[HTML]{000000} \textbf{Description}}} \\ \hline
                                         & block.coinbase                                                                    & Address of the miner who mined the current block                                         \\ \cline{2-3} 
                                         & block.difficulty                                                                  & Relative measure of how difficult it was to find the block                               \\ \cline{2-3} 
                                         & block.gaslimit                                                                    & Maximum gas consumption for transactions within the block                                \\ \cline{2-3} 
                                         & block.number                                                                      & Height of current block                                                                  \\ \cline{2-3} 
\multirow{-5}{*}{Block variable}         & block.timestamp                                                                   & When the block was mined                                                                 \\ \hline
                                         & block.blockhash(block.number)                                                     & Blockhash of the current block                                                           \\ \cline{2-3} 
                                         & block.blockhash(block.number - 1)                                                 & Blockhash of the last block                                                              \\ \cline{2-3} 
\multirow{-3}{*}{Blockhash}              & block.blockhash()                                                                 & Blockhash of a block that is at least 256 blocks older than the current one              \\ \hline
\end{tabular}
\end{table}

我已经安装了上面提到的软件包:{multirow}[table,xcdraw]{xcolor}。尽管如此,我在\rowcolor\cellcolor和时仍然遇到错误\multirow。有人知道是什么导致了这个错误吗?我遗漏了什么吗?

在此处输入图片描述

相关内容