[Tex/LaTex] tabular and array

arraystables

Consider the following example:

\documentclass{article}
\usepackage{array}
\usepackage{calc}

\begin{document}
\begin{tabular}{p{\textwidth - 3cm}|p{1cm}<{foo}}
   Caption1 & Caption2\\
   Text & \\
   Text & \\
   Text & \\
   % much more rows
\end{tabular}
\end{document}

Now my question is, how to modify this such that foo applies to every row except to the first one?

Best Answer

Just use \multicolumn for the header row.

\documentclass{article}
\usepackage{array}
\usepackage{calc}

\begin{document}
\begin{tabular}{p{\textwidth - 3cm}|p{1cm}<{foo}}
   \multicolumn{1}{p{\textwidth - 3cm}|}{Caption1} & \multicolumn{1}{p{1cm}}{Caption2}\\
   Text & \\
   Text & \\
   Text & \\
   % much more rows
\end{tabular}
\end{document}