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 want to create a table and to make all cells of a column emphasized. Is there a simple way to do it, or do I have to emphasize every single cell?

share|improve this question
3  
For rows please look at Make first row of table all bold; for columns a related post is Can I set the format of an entire column except for the header?. –  Hendrik Vogt Mar 2 '11 at 14:31

2 Answers 2

up vote 12 down vote accepted

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

\documentclass{article}
\usepackage{array}

\begin{document}

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

\end{document}
share|improve this answer
    
The answers was perfect!! I really was looking for this to make the first row bold. THANKS!!!! Alex –  user15254 Jun 4 '12 at 1:55

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

share|improve this answer

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.