zoukankan      html  css  js  c++  java
  • Latex 的Table使用multirow and multicolumn

    Here are some tips:

    • Use a multicolumn{1}{|l}{} & multicolumn{2}{l|}{...} construct;
    • Add another multicolumn{2}{c|}{} to the second row; and
    • Use an additional cline{1-1} to insert a rule between elements in the first column.

    documentclass[a4paper,12pt]{report}
    usepackage[inner=0.75in,outer=0.65in,top=0.75in,bottom=0.75in]{geometry}
    usepackage[sc]{mathpazo}
    usepackage{multirow}
    egin{document}
    egin{table}[!htb]
      centering
      caption{Present Strength-Production}
      egin{tabular}{|c|l|l|c|c|c|c|c|c|}
        hline
        multirow{2}{*}{Sl.No} & 
        multicolumn{2}{c|}{multirow{2}{*}{	extbf{Designation}}} & 
        multicolumn{4}{c|}{	extbf{Shifts}} & 	extbf{Leave/Off} & 
        multirow{2}{*}{	extbf{Total}} \
        cline{4-7}
        & multicolumn{2}{c|}{} & 	extbf{A} & 	extbf{B} & 	extbf{C} & 	extbf{G} & 	extbf{Reserve} & \
        hline
        1 & multicolumn{2}{l|}{Plant Engineer} & & & & 1 & & 1 \
        hline
        multicolumn{1}{|l}{} & multicolumn{2}{l|}{	extbf{Sub Total}} & & & & 	extbf{1} & & 	extbf{1} \
        hline
        2 & multirow{2}{*}{Operator}&Work related to water regeneration & 1 & 1 & 1 & & 1 & 4 \
        cline{1-1}cline{3-9}
        3 & & Work related to valve control & 1 & 1 & 1 & & 1 & 4 \
        hline
        multicolumn{1}{|l}{} & multicolumn{2}{l|}{	extbf{Sub Total}} & 	extbf{2} & 	extbf{2} & 	extbf{2} & & 	extbf{2} & 	extbf{8} \
        hline
        1 & multicolumn{2}{l|}{Worker} & 2 & 2 & 2 & & 2 & 8 \
        hline
        multicolumn{1}{|l}{} & multicolumn{2}{l|}{	extbf{Sub Total}} & 	extbf{2} & 	extbf{2} & 	extbf{2} & & 	extbf{2} & 	extbf{8} \
        hline hline
        multicolumn{1}{|l}{} & multicolumn{2}{l|}{	extbf{Total}} & 	extbf{4} & 	extbf{4} & 	extbf{4} 
        & 	extbf{1} & 	extbf{4} & 	extbf{17} \
        hline
      end{tabular}
      label{tab:pro_pro}
    end{table}
    end{document}
    

      

     
  • 相关阅读:
    DAY09(for语句)
    Python 下载 tushare 数据,然后调用 C++ DLL 计算 wMA 存入本地 csv 文件再 python 读取
    Python socket编程之八:阶段性总结
    Ctex + Lyx = 自用 Latex 编辑环境
    matlab下二重积分的蒙特卡洛算法
    实验9 根据材料编程
    实验5 编写、调试具有多个段的程序
    实验4 [bx]和loop的使用
    实验3 编程、编译、连接、跟踪
    汇编语言第三章总结
  • 原文地址:https://www.cnblogs.com/startover/p/3663495.html
Copyright © 2011-2022 走看看