I am using color tables in my document, as it produces very nice results. Further to that I use some equations using cases environment. I see that the colors from the color table get mixed up with the equations.
How to remove the effect of color table once I finished using it in a table.
Here is a MWE to reproduce the problem. If I un-comment the line \rowcolors{2}{white}{white}
, I see that the half brace goes missing.
\documentclass{article}
\usepackage[table,rgb,hyperref]{xcolor}
\usepackage{hhline}
\usepackage{multirow}
\usepackage{amsmath}
\begin{document}
\rowcolors{2}{white}{gray!25}
\begin{table}[h]
\centering
\begin{tabular}{cccc}
\hline
& \multicolumn{3}{c}{$TxCost_p$} \\\hhline{~---}
\multirow{-2}{*}{p} & min & max & avg \\\hline\hline
1 & 1.13 & 14.00 & 2.57 \\\hline
2 & 1.78 & 29.98 & 4.13 \\\hline
4 & 3.97 & 47.23 & 11.07 \\\hline
8 & 5.43 & 87.86 & 18.82\\\hline
\end{tabular}
\caption{performance }
\end{table}
%\rowcolors{2}{white}{white}
\begin{equation}
Time = \begin{cases}
m \cdot C + 2 T & \mbox{in the computation }\\
(m+1) \cdot T & \mbox{in the transfer }
\end{cases}
\end{equation}
\end{document}
and here is the screenshot
\rowcolors
command must be within\begin{table}...\end{table}
, not outsideclose
this question.