我在用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
。有人知道是什么导致了这个错误吗?我遗漏了什么吗?