【问题标题】:Latex multirow and multicolumn tableLatex 多行多列表
【发布时间】:2019-09-26 11:02:30
【问题描述】:

我在 Latex 中处理多行、多列的表格。到目前为止,我有这个(凌乱的)代码:

\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 不应为粗体......

感谢任何帮助。

【问题讨论】:

    标签: latex multirow


    【解决方案1】:

    您需要单独输入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包一起使用,所以我将其替换为水平分割线)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-26
      • 1970-01-01
      • 2011-02-05
      • 2021-11-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多