7

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?

9

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}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.