2

我与乳胶中的多行、多列表作斗争。到目前为止,我有这个(凌乱的)代码:

\begin{tabular}{cccccccccc}
    \toprule
    \multirow{2}{*}{\textbf {A}} &
    \multirow{2}{*}{\textbf {B}} &
    \multirow{2}{*}{\textbf {C}} &
    \multicolumn{3}{c}{\textbf {D}} && D1 & D2 & D3 &
    \multicolumn{3}{c}{\textbf {E}}   && E1 & E2 & E3 &
    \multirow{2}{*}{\textbf {F}}\\
    \cmidrule(lr){1-10}
    a & b & c & d1 & d2 & d3 & e1 & e3 & e3 & f\\
    aa & bb & cc & dd1 & dd2 & dd3 & ee1 & ee3 & ee3 & ff
    \bottomrule
\end{tabular}

理想情况下,表格如下所示:

多列、多行表

副标题 D1-E3 不应为粗体......

任何帮助表示赞赏。

4

1 回答 1

4

您需要输入D1, ....E3作为单独的行:

\documentclass{article}

\usepackage{booktabs}
\usepackage{multirow}
\usepackage{makecell}
\renewcommand\theadfont{\normalsize\bfseries}

\begin{document}

\begin{tabular}{cccccccccc}
    \toprule
    \multirow{2}{*}[-4pt]{\thead{A}} &
    \multirow{2}{*}[-4pt]{\thead{B}} &
    \multirow{2}{*}[-4pt]{\thead{C}} &
    \multicolumn{3}{c}{\thead{D}} &
    \multicolumn{3}{c}{\thead{E}} & 
    \multirow{2}{*}[-4pt]{\thead{F}}\\
    \cmidrule(lr){4-6}
    \cmidrule(lr){7-9}
    &&& D1 & D2 & D3 & E1 & E2 & E3 &\\
    \midrule
    a & b & c & d1 & d2 & d3 & e1 & e3 & e3 & f\\
    aa & bb & cc & dd1 & dd2 & dd3 & ee1 & ee3 & ee3 & ff\\
    \bottomrule
\end{tabular}


\end{document}

(我不会将垂直线与booktabs包装一起使用,因此我将其替换为拆分水平线)

在此处输入图像描述

于 2019-09-26T11:10:27.937 回答