tabularx 多列内的列宽

tabularx 多列内的列宽

我想在多列命令中使用一些适当的参数来绘制列宽的水平线。我试过但\linewidth没有成功。在下面的例子中,我的目标是在点 A 和 D(理想情况下)或 B 和 C 之间画一条线。列分隔符垂直条仅用于显示列限制。

谢谢你的帮助

亨利

\documentclass[a4paper]{book}

\usepackage{tabularx}

\begin{document}

\begin{tabularx}{15.5cm}{|X|c|X|c|X|c|X|c|X|}
\multicolumn{9}{c}{ {\bf Aaaaa}}
\\
\multicolumn{9}{c}{ \&{} {\bf Bbbbb}}
\\
\multicolumn{9}{c}{\rule{0.5pt}{0.5cm}}
\\
\multicolumn{1}{c}{A}&
\multicolumn{1}{l}{B}&
\multicolumn{5}{c}{}&
\multicolumn{1}{r}{C}&
\multicolumn{1}{c}{D}
\\
\multicolumn{1}{r}{\rule{0.60cm}{0.5pt}}&
\multicolumn{7}{c}{\rule{8cm}{0.5pt}}& % this should be \linewidth
\multicolumn{1}{l}{\rule{0.60cm}{0.5pt}}
\\
\multicolumn{1}{c}{\rule{0.5pt}{0.5cm}}&&
\multicolumn{1}{c}{\rule{0.5pt}{0.5cm}}&&
\multicolumn{1}{c}{\rule{0.5pt}{0.5cm}}&&
\multicolumn{1}{c}{\rule{0.5pt}{0.5cm}}&&
\multicolumn{1}{c}{\rule{0.5pt}{0.5cm}}
\\
\begin{center}{\bf Ccccc xx}\end{center} & &
\begin{center}{\bf Ddddd}\end{center} & &
\begin{center}{\bf Eeeee\\wider text ideally without hyphenation}\end{center} & &
\begin{center}{\bf Fffff xx}\end{center} & &
\begin{center}{\bf Ggggg}\end{center}
\\
\end{tabularx}

\end{document}

相关内容