Re: wrapping in table

"E. Krishnan" <[email protected]>
Newsgroups gmane.comp.tex.tugindia
Message-ID <alpine.DEB.2.00.1106291137270.4277@krshnan-laptop>

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
_______________________________________________
Home:        http://www.tug.org.in/
TeX FAQ:     http://www.tex.ac.uk/faq
unsubscribe: http://tug.org/mailman/listinfo/tugindia
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.