I am having some problems using multirow
. I'm not sure if it's due to the qcr
font as I'm just learning LaTeX. Could someone help me identify the problem? I have created a simple document to reproduce the problem:
\documentclass[preprint]{elsarticle}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{epsfig}
\usepackage{alltt}
\usepackage{fixme}
\usepackage[table,xcdraw]{xcolor}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{enumerate}
\usepackage[T1]{fontenc}
\usepackage{xr}
\usepackage{graphics}
\usepackage{listings}
\usepackage{tcolorbox}
\usepackage{blindtext}
\usepackage{xcolor}
\usepackage[ruled, lined, linesnumbered, commentsnumbered, longend]{algorithm2e}
\usepackage{algpseudocode}
\usepackage{booktabs}
\usepackage{verbatim}
\journal{Journal of Computational Science}
\bibliographystyle{elsarticle-num}
\begin{document}
\begin{frontmatter}
% ----- Title -----
\title{Blah, blah, blah\tnoteref{t1}}
% ---------- Abstract ----------
\begin{abstract}
Blah, blah, blah
\end{abstract}
\end{frontmatter}
% ---------- Table ----------
\begin{table}[]
\scriptsize
\begin{center}
\caption{The most commonly used variables for PRNG}
\begin{tabular}{|c|l|p{4.7cm}|}
\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
& {\fontfamily{qcr}\selectfont block.coinbase} & Address of the miner who mined the current block\\ \cline{2-3}
& {\fontfamily{qcr}\selectfont block.difficulty} & Relative measure of how difficult it was to find the block\\ \cline{2-3}
& {\fontfamily{qcr}\selectfont block.gaslimit} & Maximum gas consumption for transactions within the block\\ \cline{2-3}
\multirow{-5}{*}{Block variable} & {\fontfamily{qcr}\selectfont block.number} & Height of current block\\ \cline{2-3}
& {\fontfamily{qcr}\selectfont block.timestamp} & When the block was mined\\ \hline
& {\fontfamily{qcr}\selectfont block.blockhash(block.number)} & Blockhash of the current block\\ \cline{2-3}
& {\fontfamily{qcr}\selectfont block.blockhash(block.number - 1)} & Blockhash of the last block\\ \cline{2-3}
\multirow{-3}{*}{Blockhash} & {\fontfamily{qcr}\selectfont block.blockhash()} & Blockhash of a block that is at least 256 blocks older than the current one\\ \hline
\end{tabular}
\end{center}
\end{table}
\bibliography{references}
\end{document}
Best Answer
hyperref
on the end preamble)tabularray
makecell
,multirow
andtabularx
package:(red lines indicate text area border)