[Tugindia] wrapping in table
E. Krishnan
ekmath at asianetindia.com
Wed Jun 29 08:10:59 CEST 2011
On Tue, 28 Jun 2011, Asha G wrote:
> Actually I would like Department to be whole - and
> wrapped, Professor to be whole and wrapped and so on.
> Also, how do you change font size in tables?
> And change color in one line - Say data for M
Please if the code below meets your needs:
\usepackage{array}
\usepackage{color}
\newcommand{\colrow}[4]{%
\color{red} M&\color{red}#1&\color{red}#2&\color{red}#3&\color{red}#4}
\begin{center}
\footnotesize
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|r|>{\raggedright}p{2cm}|c|*{4}{r|}}
\hline
\hline
\multicolumn{1}{|c}{\scshape sl.no.}
& \multicolumn{1}{|c}{\scshape Department}
& \multicolumn{1}{|c}{\scshape Gender}
& \multicolumn{1}{|c}{\scshape Professor}
& \multicolumn{1}{|m{2cm}}{\centering\scshape Associate\\ Professor}
& \multicolumn{1}{|m{2cm}}{\centering\scshape Assistant\\ Professor}
& \multicolumn{1}{|c|}{\scshape Total}\\
\hline
1 & Aerospace\\ Engineering
& \colrow{11}282\\
&& F & 0 & 0 & 1 & 1\\
\hline
\end{tabular}
\end{center}
---
Krshnan
More information about the tugindia
mailing list