Monday, 27 May 2013

Disappearance of the table title/caption, when using colortbl

Disappearance of the table title/caption, when using colortbl

I'm formatting a manuscript according to the PNAS style, as prescribed in http://www.pnas.org/site/authors/LaTex.xhtml
When I color my table using the package colortbl, the title/caption disappears (the content of the table is just fine). From my testing, it seems the only way to get the title back is to remove colortbl package and \cellcolor from the table. I can speculate that there must be a conflict between pnastwo document class and colortbl, but I have no idea how to get around this problem. Has anyone experienced this? I appreciate your suggestions!
FYI, I use MacOS X 10.6.8 and TeXShop 2.47
\documentclass{pnastwo}
\usepackage{colortbl,xr}

\begin{document}
\begin{article}
\end{article}

\clearpage
\begin{table}
\caption{TITLE}\label{LAB}
\begin{tabular}{ p{4.5cm} p{.8cm} | p{1.2cm}}
Name 1 & first & second \\ \hline\hline
value1 & \cellcolor[gray]{0.7}0.004 & 0.034 \\
value2 & 7721 & \cellcolor[gray]{0.7}0.14 \\
\end{tabular}
\end{table}

\end{document}

No comments:

Post a Comment