4
\documentclass{article}


\begin{document}

\begin{center}
\begin{tabular}{| l | p{10cm} |}
\hline
Books & Authors \\  \hline
Real Analysis & W.Rudin \\ \hline
Abstract Algebra & Dummit and Foote \\ \hline
Complex Analysis & S.Lang \\    \hline
\hline
\end{tabular}
\end{center}

\end{document}

enter image description here

How can I make the colors in the table look like the above picture.

2
  • 2
    Why? You don't want to, do you? \usepackage[table]{xcolor}. texdoc colortbl for details.
    – cfr
    Commented May 23, 2017 at 1:45
  • I tried to do this.. I am new to all this could'nt figure out exactly..
    – Kumarm
    Commented May 23, 2017 at 12:48

1 Answer 1

4
\documentclass{article}
\usepackage[table]{xcolor}
 \usepackage{colortbl}
 \usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}

\begin{center}
\setlength\arrayrulewidth{1.5pt}
\begin{tabular}{| L{4.2cm}| L{11cm} |}
\hline
\multicolumn{2}{C{16cm}}{\cellcolor{blue!50!black}\large \bfseries\textcolor{white}{\raisebox{-0.6ex}{BOOKS RECOMENDED FOR MATHEMATICS (NET \& GATE)}}}\\
\arrayrulecolor{blue!80!black}\hline
\bfseries Complex Analysis & \bfseries Schaum Series/Ponnusami/H.S.~Kasana/ Churchil/~J N Sharma Vasistha \\  \hline
\bfseries O.D.E \& P.D.E & \bfseries Schaum Series/ M.D. Raisinghania/ Snedden/ D.A. Murray/ N.M. Kapoor/ T. Amaranath \\ \hline
\bfseries Calculus of variation & \bfseries Lev D. Elsgoic/ M.D. Raisinghania \\ \hline
\bfseries Integral Equations & \bfseries M.D. Raisinghania \\    \hline
\bfseries Linear Algebra & \bfseries Schaum Series/ G. Hadley/ A.R. Vasistha/ Bist \& Sahai\\ \hline
\bfseries Modern Algebra & \bfseries Khanna \& Bhambri/ Gallian/ Herstein/ Vasistha/ R. Kumari/ Bist \& Sahai/ M. Artin/ Zuckerman/ Burton (Number Theory)\\ \hline
\bfseries Real Analysis & \bfseries S.C Malik \& Savita Arora/ N.P Bail/ Rudin/ Vasistha/ S.Bartle\\ \hline
\bfseries Topology & \bfseries Simmons/ J.N Sharma \\ \hline
\bfseries L.P.P & \bfseries Kanti Swarup/ S.D. Sharma/ Taha \\ \hline
\bfseries Numerical Analysis & \bfseries Schaum Series/ S.S. Shastry/ Jain, lyengar \& Jain/ Rajaraman \\ \hline
\bfseries Classical Mechanics & \bfseries Gupta \& Kumar/ Goldstien \\ \hline
\bfseries Probability \& Statistics & \bfseries S.C Gupta/ Schaum Series/ Gun, Gupta \& Dasgupta, Part I \& II \\ \hline
\bfseries General Aptitude & \bfseries R.S. Agarwal \\ \hline


\end{tabular}
\end{center}

\end{document}

enter image description here

8
  • 1
    Please do never use \bf. It's obsolete for quite a time now. Try \bfseries.
    – TeXnician
    Commented May 23, 2017 at 4:31
  • 1
    There's no need to load colortbl. The table option of the xcolor package does exactly that..
    – Troy
    Commented May 23, 2017 at 6:13
  • @Troy the table option does more than just that (e.g. defining the \rowcolors-macro).
    – Skillmon
    Commented May 23, 2017 at 7:05
  • @Skillmon technically that's under the jurisdiction of colortbl isn't it? :p
    – Troy
    Commented May 23, 2017 at 7:08
  • @Troy if you load the colortbl-package and the xcolor-package without giving the table-option, the macro is not defined.
    – Skillmon
    Commented May 23, 2017 at 7:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .