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}

  • 相关阅读:
    垃圾回收相关概念
    垃圾回收相关算法
    垃圾回收概述
    StringTable
    执行引擎
    [前端]背景图,中间放大特效
    [Javascript]类数组对象为什么不能用for in进行遍历
    [前端] 画个圈圈显示百分比
    win10 Build 14905.rs_prerelease.160811-1739 填坑记录
    [翻译][10 By 10 外文博客] 01.uwp获得关注并安装
  • 原文地址:https://www.cnblogs.com/mlv5/p/2529086.html
Copyright © 2011-2022 走看看