Quick question regarding colouring rows in a latex table:
I simply want to colour the first row in the following table light gray as in the image. Unfortunately the colour does not seem to fill the full row. I think this has something to do with my specification column separation command "\setlength{\tabcolsep}{0.5cm}".
\documentclass[reprint,amsmath,amssymb,aps,pra,]{revtex4-1}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage[table]{xcolor}
\begin{document}
\begin{figure}
\hspace*{0cm}
\setlength{\tabcolsep}{0.5cm}
\begin{table}
\centering
\renewcommand{\arraystretch}{2.0}
\begin{tabular}{|c|c|c|c|c|c|{5cm}}
\hline
\rowcolor[gray]{0.9}
\multicolumn{6}{|c|}{\boldsymbol{\text{Some Text}}}\\
\hline
a & b & c & d & e & f \\
\hline
\end{tabular}
\caption{Example...}
\label{tab:Example}
\end{table}
\end{figure}
\end{document}
Does anyone know how to resolve this? Thanks.
MWE
as in error free format...{5cm}
supposed to do in the list of column specifiers? Probably you wanted something likep{5cm}
instead?\boldsymbol
outside mathmode.\boldsymbol
will only work if used in math mode. Nevertheless,\boldsymbol{\text{Some Text}}
seems quite unusual. Maybe you wanted\textbf{some text}
instead?