Tabular, make a column or a row emphasized

>{..} defines what to do before the cell

\documentclass{article}
\usepackage{array}% for extended column definitions    
\begin{document}

\begin{tabular}{c >{\em}c c}
foo & bar & baz
\end{tabular}

\end{document}

Just worth adding to @Herbert's answer, that you can also make an entire column bold with >{\bfseries}, used in exactly the same way as he uses >{\em}. The meaning of bfseries is discussed in detail here.

As stated in the comments here, you can use \normalfont{} to unbold the column header.

\begin{table}
    \begin{tabular}{>{\bfseries}l l}
        \toprule
        \normalfont{foo} & bar \\
        \midrule
        foo & baz \\
        bar & qux \\
        \bottomrule
    \end{tabular}
\end{table}

enter image description here


A very elementary addon but I was unable to find this elsewhere online and it may save someone a few minutes of head-scratching: you can add multiple styles to each line with a space:

\begin{tabular}{|c |>{\huge \bfseries}c |}
\hline
\multicolumn{2}{|c|}{Using multiple styles on a column}\\
\hline
normal & bold and huge\\
\hline
0 & 0\\
\hline
1 & 1\\
\hline
\end{tabular}

enter image description here

Tags:

Tables