在 Latex 中创建表格数据

在 Latex 中创建表格数据

我想创建一个类似于图中的表格数据。它是空的。但是它填充了一些内容。我该如何在 latex 中做到这一点。就像我在正文中有一个行标题及其内容一样。

在此处输入图片描述

答案1

由于不清楚桌子的实际样子,我假设了一些形状和尺寸。随意更改...

\documentclass{book}


\begin{document}


\begin{tabular}{|p{5cm}|p{5cm}|}
\hline
\textbf{Title 1} & \tabularnewline
\hline
Data 1 & \tabularnewline
Data 2 & \tabularnewline
Data 3 & \tabularnewline
Data 4 & \tabularnewline
\cline{2-2} 
Data 5 &  \tabularnewline
\cline{2-2} 
Data 6 &  \tabularnewline
Data 7 &  \tabularnewline
\cline{1-1} 
\textbf{Title 2} & \tabularnewline
\cline{1-1} 
More data 1 &  \tabularnewline
More data 2 &  \tabularnewline
More data 3 &  \tabularnewline
\cline{2-2} 
 & \tabularnewline
\cline{2-2} 
 & \tabularnewline
\cline{1-1}
\end{tabular}


\end{document}

在此处输入图片描述

编辑进一步请求后更新

\documentclass{book}
\begin{document}

\begin{tabular}{|*{3}{p{5cm}|}}
\hline
\textbf{Title 1} & & \tabularnewline
\hline
Data 1 & & \tabularnewline
Data 2 & & \tabularnewline
Data 3 & & \tabularnewline
Data 4 & & \tabularnewline
Data 5 & & \tabularnewline
Data 6 & & \tabularnewline
\cline{2-2} 
Data 7 & & \tabularnewline
\hline
\textbf{Title 2} & & \tabularnewline
\cline{1-1} \cline{3-3}
More data 1 & & \tabularnewline
More data 2 & & \tabularnewline
More data 3 & & \tabularnewline
More data 4 & & \tabularnewline
More data 5 & & \tabularnewline
\cline{2-3}
More data 6 & & \tabularnewline
\hline
 & & \tabularnewline

\cline{1-1} 

 & & \tabularnewline
 & & \tabularnewline
 & & \tabularnewline
 & & \tabularnewline
\cline{3-3}
 & & \tabularnewline
% Either one complete \hline or a single \cline{3-3} at the 3rd column 
%\hline
\cline{3-3}
\end{tabular}
\end{document}

我仍然对那张桌子的布局感到疑惑……

在此处输入图片描述

相关内容