## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ What is wrong with this simple tabularx in revtex4 ? Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Cham
Posts: 830
Joined: Sat Apr 02, 2011 4:06 pm

### What is wrong with this simple tabularx in revtex4 ?

I'm experiencing a major error with this simple code (tabularx with a color, under the revtex4 class), and I don't understand what is happening here :

\RequirePackage[l2tabu,orthodox]{nag}\documentclass[11pt]{revtex4}\usepackage[T1]{fontenc}\usepackage{graphicx}\usepackage[dvipsnames,table]{xcolor}\usepackage{tabularx} \begin{document} \section{Introduction} A simple table :\begin{table}	\renewcommand{\arraystretch}{1.5}	\begin{tabularx}{\textwidth}{|X|X|X|X|X|}	\hline		\rowcolor[gray]{0.95}		\multicolumn{5}{|c|}{\textbf{\textsf{Title}}}		\\ \hline		\multicolumn{1}{|>{\centering}p{6.5em}|}{\textsf{word 1}}		& \multicolumn{1}{>{\centering}p{6.5em}|}{\textsf{word 2}}		& \multicolumn{1}{>{\centering}p{6.5em}|}{\textsf{word 3}}		& \multicolumn{1}{>{\centering}p{6.5em}|}{\textsf{word 4}}		& \multicolumn{1}{>{\centering}p{6.5em}|}{\textsf{word 5}}		\\ \hline		 & & & &		\\		 & & & &		\\		 & & & &		\\ \hline	\end{tabularx}\end{table} \end{document}

The same tabularx is working great with all the other classes I tested (article, book, etc). So what is wrong with this code ?

Stefan Kottwitz
Posts: 8708
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi Cham,

again, you made a fantastic minimal example, so it's easy to work with it.

That's an issue with revtex4 that I consider as a bug. It is fixed with revtex4-1. Is that ok for you, or would you like to fix it with revtex4?

Stefan

Cham
Posts: 830
Joined: Sat Apr 02, 2011 4:06 pm
I didn't tried revtex4-1 with this table yet. How to fix it for revtex4 ?

Weird bug !

EDIT : Works much better with revtex4-1.