I'm trying to make a beamer slide containing a table with the text in a row styled in a different color. However, the row's height increases when colored, as opposed to the default. The same problem occurs if I use the \rowfont
command. How do I correct this?
\PassOptionsToPackage{table}{xcolor}
\documentclass[compress]{beamer}
\begin{document}
\begin{frame}
Example 1
\rowcolors{1}{gray!30}{blue!30}
\begin{tabular}{|p{0.5\textwidth}|}
\hline
\color{blue}{Foo} \\
Bar\\
Baz\\
\hline
\end{tabular}\\[1in]
Example 2
\rowcolors{1}{gray!30}{blue!30}
\begin{tabular}{|p{0.5\textwidth}|}
\hline
Foo \\
Bar\\
Baz\\
\hline
\end{tabular}
\end{frame}
\end{document}
I want the table to look like "Example 2", but with the row text colored as in "Example 1".
\leavevmode
(before or after\color
) help? I remember a similar case.texdoc grfguide
(Usingtextcolor
or putting\leavevmode
ormbox{}
before\color
will fix it. (Sorry, it's not my fault:)