Currently I am trying to create a table in which one column contains colored text. However, the color differs per cell. See the example code below, where the last column contains the (possibly) colored text.
% Works as it should
\begin{table}\centering\begin{tabular}{ccc}
\toprule
1 & 2 & {\color{red}3} \\
\bottomrule
\end{tabular}\end{table}
% Does not work well...
\begin{table}\centering\begin{tabular}{@{} p{2cm} p{2cm} p{2cm} p{2cm} p{2cm} @{}}
\toprule
Model & Parameter & BIC & $UD\text{max}F_T$ & Same?\\
\midrule
M1 & $\kappa_t^{(2)}$ & $\{43\}$ & $\{22, 50\}$ & {\color{red}No} \\
\bottomrule
\end{tabular}\end{table}
The problem with the second example is, in my case at least, that the text in the last column drops down, or seems to be put at a lower line. In the first example, the colored text is at the same line, though, as I would like it to be. Does anyone have an idea what is going wrong?
Packages that I use are:
tabularx, amsmath, amsfonts, amsthm, color
Your help is greatly appreciated!
booktabs; could you turn your snippet into a complete MWE? – cmhughes Oct 10 '12 at 15:43\texta special definition or does it come from a used package? – Kurt Oct 10 '12 at 16:20\text{}, ie an\hboxin math mode – Thruston Oct 10 '12 at 16:53