删除表格中特定单元格的垂直线

删除表格中特定单元格的垂直线

我想要创建如图所示的表格。 在此处输入图片描述

答案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} 

在此处输入图片描述

相关内容