![删除表格中特定单元格的垂直线](https://linux22.com/image/378365/%E5%88%A0%E9%99%A4%E8%A1%A8%E6%A0%BC%E4%B8%AD%E7%89%B9%E5%AE%9A%E5%8D%95%E5%85%83%E6%A0%BC%E7%9A%84%E5%9E%82%E7%9B%B4%E7%BA%BF.png)
答案1
tabularx
以下是基于和的可能代码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}