[Tex/LaTex] \rowcolor not working in latex IEEEtrans


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}
\setcellgapes{4pt}%parameter for the spacing
             \caption{Some of the previous DBQ studies in the literature} \label{tab:Studies}
               \multirow{-2}{*}{\textbf{Country}} & \multirow{-2}{*}{\textbf{DBQ type}} & \multirow{-2}{*}{\textbf{Year published}} & \multirow{-2}{*}{\textbf{Resulting factors}}\\
                \multirow{2}{*}{UK\cite{parker1995}}& \multirow{3}{*}{....} & \multirow{3}{*}{1995} & driving under influence \\
                &&& driving while texting\\

Best Answer

  • package mdwtab is not compatible with the package colortbl, consequently with it row colors not show up
  • ieee journals doesn't allows colored tables
  • your table code is unnecessary complicated. do you really need all this multirows 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:

    \usepackage{booktabs, cellspace, multirow, tabularx}
    \caption{Some of the previous DBQ studies in the literature} \label{tab:Studies}
    \begin{tabularx}{\linewidth}{l c c S{R}}
        & \textbf{DBQ type} & \textbf{Year published} & \textbf{Resulting factors}  \\
        &                   & 1995                      & driving under influence   \\
        & ...               & ...                       & driving while texting     \\

enter image description here

  • above table is simple to extend to table*
  • if cell contents in your table is bigger, please provide three rows of table which emulate your real table.
Related Question