I'm having an issue with rowcolors from the xcolor package.
Whenever I use rowcolors before a table, it seems that the row counter does not reset with each tabularx environment.
I read that rowcolors uses the rownum counter internally, and I tried resetting this with \global\rownum=1, but unfortunately this does not seem to work.
I am basically just trying to alter all my tabularx environments to be colored:
\definecolor{table-shade}{gray}{0.9}
\let\oldtabularx\tabularx
\let\endoldtabularx\endtabularx
\renewenvironment{tabularx}{\table\rowcolors{1}{white}{table-shade}\oldtabularx}{\endoldtabularx\endtable}
I'd welcome any suggestions, and thanks for your help.
tabularxenvironments inside atableenvironment. – Mico Apr 02 '13 at 00:45\documentclass{...}and ending with\end{document}. – Speravir Apr 02 '13 at 15:33etoolboxorxpatch(linebreaks disappear in comments):\usepackage[table]{xcolor} \definecolor{table-shade}{gray}{0.9} \usepackage{tabularx} \let\oldtabularx\tabularx \let\endoldtabularx\endtabularx \renewenvironment{tabularx}{\rowcolors{1}{white}{table-shade}\oldtabularx}{\endoldtabularx}. – Speravir Apr 02 '13 at 18:08