可能很明显,我试图将最后一列涂成绿色,但对我来说,它仍然显示为白色。
另外,如果我理解正确的话,“>”只是用于tabularx
划分格式信息?
\documentclass[compress,red,notes]{beamer}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{colortbl}
\definecolor{Green}{rgb}{0,1,0}
\begin{document}
\frame{\frametitle{Performance}
\begin{figure}
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{lrrrrrrrr>{\columncolor[rgb]{Green}}r}
\textbf{(a)} \hspace{1.2cm} & Max. $\mu$ & Model &
Standard FBA & Fitted FBA & GIMME & iMAT & Lee et al. & FALCON\\
& 75 \%& Yeast~5 MC & 0.66 & 0.66 & NaN & 0.57 & 0.64 & 1 \\
& 75 \%& Yeast~7 MC & 0.66 & 0.66 & 0.68 & 0.66 & 0.66 & 0.98\\
& 75 \%& Yeast~5 HC & 0.73 & 0.78 & 0.75 & 0.66 & 0.98 & 0.99\\
Pearson's r
& 75 \%& Yeast~7 HC & 0.70 & 0.70 & 0.80 & 0.66 & 0.98 & 0.99\\
& 85 \%& Yeast~7 MC & 0.62 & 0.62 & 0.65 & 0.62 & 0.62 & 0.97\\
& 85 \%& Yeast~5 HC & 0.88 & 0.89 & 0.9 & 0.81 & 0.99 & 0.99\\
& 85 \%& Yeast~7 HC & 0.67 & 0.67 & 0.87 & 0.62 & 0.98 & 0.98\\
\end{tabular}}
\caption{Here is a caption.}
\label{tab:FalcPerf}
\end{figure}
}
\end{document}
答案1
您的规范中有 10 列,但您只使用了 9 列。缩写列规范可能更易于管理的另一个原因是:
\begin{tabular}{l*{7}{r}>{\columncolor{Green}}r}
%...
\end{tabular}
答案2
你算错了列数,你要么给出[rgb]
三个数字,要么只给出一个名字(规则与\color
\documentclass[compress,red,notes]{beamer}
\usepackage{tabularx}
\usepackage{xcolor}
\usepackage{colortbl}
\definecolor{Green}{rgb}{0,1,0}
\begin{document}
\frame{\frametitle{Performance}
\begin{figure}
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{lrrrrrrr>{\columncolor{Green}}r}
\textbf{(a)} \hspace{1.2cm} & Max. $\mu$ & Model &
Standard FBA & Fitted FBA & GIMME & iMAT & Lee et al. & FALCON\\
& 75 \%& Yeast~5 MC & 0.66 & 0.66 & NaN & 0.57 & 0.64 & 1 \\
& 75 \%& Yeast~7 MC & 0.66 & 0.66 & 0.68 & 0.66 & 0.66 & 0.98\\
& 75 \%& Yeast~5 HC & 0.73 & 0.78 & 0.75 & 0.66 & 0.98 & 0.99\\
Pearson's r
& 75 \%& Yeast~7 HC & 0.70 & 0.70 & 0.80 & 0.66 & 0.98 & 0.99\\
& 85 \%& Yeast~7 MC & 0.62 & 0.62 & 0.65 & 0.62 & 0.62 & 0.97\\
& 85 \%& Yeast~5 HC & 0.88 & 0.89 & 0.9 & 0.81 & 0.99 & 0.99\\
& 85 \%& Yeast~7 HC & 0.67 & 0.67 & 0.87 & 0.62 & 0.98 & 0.98\\
\end{tabular}}
\caption{Here is a caption.}
\label{tab:FalcPerf}
\end{figure}
}
\end{document}