Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to italicize all of the names in the second column of a table, but presently the only way I have found to do this is to use \textit{} in each cell, i.e.:

\begin{table}
\begin{tabular}{lll}
PFT & Scientific Name & Common Name\\
PFT1 &  & \\
 & \textit{Elymus repens} & quackgrass\\
 & \textit{Koeleria macrantha} & prairie Junegrass\\
 & \textit{Elymus canadensis} & Canada wildrye\\
%....
\end{tabular}
\label{tab:foo}
\caption{test caption}

Is there an easier / more elegant way to do this?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

Use the array package to specify \itshape for the second column, and use the \multicolumn command to cancel the effect for the header.

\documentclass{article}

\usepackage{array}

\begin{document}

\begin{tabular}{l>{\itshape}ll}
PFT & \multicolumn{1}{l}{Scientific Name} & Common Name\\
PFT1 &  & \\
 & Elymus repens & quackgrass\\
 & Koeleria macrantha & prairie Junegrass\\
 & Elymus canadensis & Canada wildrye\\
\end{tabular}

\end{document}
share|improve this answer
3  
Instead of \multicolumn, you can also use \upshape or \textup{...}, although \multicolumn is more general. –  Antal S-Z Nov 30 '10 at 1:14
3  
\normalfont also works. –  Caramdir Nov 30 '10 at 1:16
1  
@Antal: My idea was not to counter \itshape, but to cancel whatever formatting may have been set for the column. @Caramdir: I didn't think of \normalfont. –  lockstep Nov 30 '10 at 6:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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