I am trying to colour rows in some tables in a latex IEEEtran article but the colouring does not show at all, and no error is thrown as well.
Here is the snippet of code I used:
\usepackage{array, booktabs, makecell, tabularx}
\usepackage[pdftex]{graphicx}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{subfigure}
\usepackage{float}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage{amsmath}
\setcellgapes{4pt}%parameter for the spacing
\usepackage{mdwmath}
\usepackage{mdwtab}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{multirow}
\begin{document}
\begin{table*}[t]
\centering
\caption{Some of the previous DBQ studies in the literature} \label{tab:Studies}
\begin{tabular}{lccl}
&&&\\
\rowcolor{gray!20}
\multirow{-2}{*}{\textbf{Country}} & \multirow{-2}{*}{\textbf{DBQ type}} & \multirow{-2}{*}{\textbf{Year published}} & \multirow{-2}{*}{\textbf{Resulting factors}}\\
\rowcolor{gray!20}
\midrule
\multirow{2}{*}{UK\cite{parker1995}}& \multirow{3}{*}{....} & \multirow{3}{*}{1995} & driving under influence \\
&&& driving while texting\\
\bottomrule
\end{tabular}
\end{table*}
\end{document}
Best Answer
mdwtab
is not compatible with the packagecolortbl
, consequently with it row colors not show upmultirows
and table over two columns? with example of table, which you provide it can be easily fit in one column.if you persist with colored row with column headers than a possible mwe (mnimal working example) can be:
table*