\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}
我怎样才能使表格中的颜色看起来像上图一样。
答案1
\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}