Asked
Active
Viewed 324 times
-2
1 Answers
5
Here is a possible code, based on tabularx and makecell:
\documentclass{article}
\usepackage{tabularx, ragged2e, makecell}
\begin{document}
\begin{table}[!htb]
\sffamily
\setlength{\extrarowheight}{2pt}
\renewcommand{\theadfont}{\normalsize\bfseries}
\begin{tabularx}{\linewidth}{!{\vrule width0.8pt}c|c|>{\arraybackslash\RaggedRight}X|c|c|c!{\vrule width0.8pt}}
\Xhline{0.8pt}
\thead{S. No}& \thead{Course\\No} & \thead{Course Title} & thead{Sem/Year} & \thead{Credit} & \thead{Grade}\\
\Xhline{0.8pt}
\multicolumn{6}{!{\vrule width0.8pt}l!{\vrule width0.8pt}}{\bfseries Core Courses}\\
\Xhline{0.8pt}
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\
\Xhline{0.8pt}
\multicolumn{6}{!{\vrule width0.8pt}l!{\vrule width0.8pt}}{\bfseries Elective Courses}\\
\Xhline{0.8pt}
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\
\Xhline{0.8pt}
\multicolumn{6}{!{\vrule width0.8pt}l!{\vrule width0.8pt}}{\bfseries Compulsory Courses / Optional Courses}\\
\Xhline{0.8pt}
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\ \hline
& & & & & \\
\Xhline{0.8pt}
\end{tabularx}
\end{table}
\end{document}
Bernard
- 271,350


\multicolumncommand. – leandriis Jun 25 '18 at 18:08\multicolumn). But did not get anything over there. Its sad that something that can be done so easily in Word becomes pain in LaTeX. – Kunal Tiwari Jun 25 '18 at 18:16\multicolumn{<number of columns>}{<format>}{<text>}. Applied to your table, it would for example be\multicolumn{6}{|l|}{\textbf{Core Courses}}. Apart from that, please edit your question to include the code for the table you already have. With the code it is a lot easier to see where your actual problem is. – leandriis Jun 25 '18 at 18:32