我想制作一个两列表格,每个单元格有多行,没有边框线,并将表格设置为适合页面宽度。结果应该类似于这:
我怎样才能实现这个目标?
答案1
这可以通过多种方式实现 - minipage
s、\parbox
es、tabular
s 或其他框。下面是使用tabular
和tabularx
(为了方便,尽管这不是必要的):
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\noindent
\begingroup
\setlength{\tabcolsep}{0pt}% Remove intercolumn spacing
\begin{tabularx}{\textwidth}{ >{\centering}X >{\centering\arraybackslash}X }
\begin{tabular}[t]{c}
Item 1 \\ Details of item \\ specification
\end{tabular} &
\begin{tabular}[t]{c}
Item 2 \\ Details of item \\ specification
\end{tabular} \\ \\
\begin{tabular}[t]{c}
Item 3 \\ Details of item \\ specification
\end{tabular} &
\begin{tabular}[t]{c}
Item 4 \\ Details of item \\ specification
\end{tabular} \\ \\
\begin{tabular}[t]{c}
Item 5 \\ Details of item \\ specification
\end{tabular}
\end{tabularx}
\endgroup
\end{document}