zoukankan      html  css  js  c++  java
  • [转]LaTeX技巧286:表格合并行的绘制技巧

    原文来自:http://blog.sina.com.cn/s/blog_5e16f1770100h6jl.html

     

    解决方案:使用宏包multirow,提供了如下命令:参看http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/

    效果图:
    LaTeX技巧286:表格合并行的绘制技巧

    演示代码:
    \documentclass{article}
    \usepackage{longtable}
    \usepackage{rotating}
    \usepackage{multirow}
    \begin{document}
    \begin{longtable}{| c | c | c | c  | c | c |}
        \hline
        & \multicolumn{5}{| c |}{ } \\
        & \multicolumn{5}{| c |}{\textbf{\large Father's Occupation}} \\
        & \multicolumn{5}{| c |}{ } \\
        \hline
        & & & & & \\
        \multicolumn{1}{|c|}{\textbf{}}
        &  \multicolumn{1}{|c|}{\textbf{}}
        &  \multicolumn{1}{c|}{\textbf{Group A}}
        &  \multicolumn{1}{c|}{\textbf{Group B}}
        &  \multicolumn{1}{c|}{\textbf{Group C}}
        &  \multicolumn{1}{c|}{\textbf{Group D}} \\
        & & & & & \\
         \cline{2-6}
        & & & & & \\
        \multirow{5}{*}{\begin{sideways}{\textbf{\large Mother's Occupation}}\end{sideways}}
        &   \textbf{Group A}   &   $8$      &   $3$      &   $4$      &   $1$   \\
        & & & & & \\
        \cline{2-6}
        & & & & & \\
       &   \textbf{Group B}   &   $3$      &   $3$      &   $0$      &   $1$   \\
        & & & & & \\
         \cline{2-6}
        & & & & & \\
        &   \textbf{Group C}   &   $0$      &   $0$      &   $1$      &   $0$   \\
        & & & & & \\
         \cline{2-6}
        & & & & & \\
        &   \textbf{Group D}   &   $2$      &   $0$      &   $0$      &   $1$   \\
        & & & & & \\
        \hline
        & & & & & \\
        &   \textbf{Total:}      &   \textbf{26}   &   \textbf{10}   &   \textbf{10}   &   \textbf{4}    \\
        & & & & & \\
        \hline
        \end{longtable}
      
      
        \end{document}

  • 相关阅读:
    淘宝技术架构演进之路
    单点登录
    [c++11] ——条件变量(Condition Variable)
    std::lock_guard unique_lock
    C++中push_back和emplace_back的区别
    C++11 CAS无锁函数compare_exchange_weak的使用
    C++11新特性之 rvalue Reference(右值引用)
    C++ auto和decltype的区别
    ovs contrack
    周总结03
  • 原文地址:https://www.cnblogs.com/mlv5/p/2529086.html
Copyright © 2011-2022 走看看