我尝试创建如下例所示的数据结构列表。
\documentclass[a4paper,12pt]{article}
\usepackage[margin=3cm]{geometry}
\usepackage{array}
\usepackage[table]{xcolor}
\begin{document}
\begin{figure}[htb]
\begin{center}
\begin{tabular}{
|c|ccc|
} \cline{1-2} \cline{4-4}
\multicolumn{1}{|c|}{\textbf{Index 1}}
& \multicolumn{1}{c}{\textbf{Index 2}}
& \multicolumn{1}{c}{\textbf{...}}
& \multicolumn{1}{c|}{\textbf{Index N}}
\\ \cline{1-2} \cline{4-4}
\\[-1ex]
% -- Index 1
\begin{tabular}{|c|c|} \hline
\multicolumn{2}{|c|}{My Data Structure}\\ \hline
\begin{tabular}[c]{@{}c@{}}First\\Field\end{tabular} &
\begin{tabular}[c]{@{}c@{}}Second\\Field\end{tabular} \\
\hline
\end{tabular} &
% -- Index 2
\begin{tabular}{|c|c} \hline
\multicolumn{2}{|c}{My Data Struct...}\\ \hline
\begin{tabular}[c]{@{}c@{}}First\\Field\end{tabular} &
\begin{tabular}[c]{@{}c@{}}Sec..\\Fie...\end{tabular} \\
\hline
\end{tabular} &
% -- Gap ...
\begin{tabular}{c}
\multicolumn{1}{c}{\textbf{...}}\\
\textbf{...} \\
\end{tabular} &
% -- Index N
\begin{tabular}{c|c|} \hline
\multicolumn{2}{c|}{...ata Structure}\\ \hline
\begin{tabular}[r]{@{}l@{}}...rst\\...ield\end{tabular}
& \begin{tabular}[c]{@{}c@{}}Second\\Field\end{tabular} \\ \hline
\end{tabular} \\[4ex]
\cline{1-2} \cline{4-4}
\end{tabular}
\end{center}
\caption{List of Data Structure.}
\label{fig:control_response_list}
\end{figure}
\end{document}
这几乎就是我想要呈现的方式,如果不是网格最后一条垂直线上的空间的话,如图所示。
我怎样才能得到最后一条完整的垂直线?
谢谢