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}
    

      

     
  • 相关阅读:
    【python刷题】前缀和
    【python刷题】数组链表去重
    【python刷题】滑动窗口法
    【python刷题】二分查找
    【python刷题】广度优先搜索(BFS)
    【python刷题】回溯算法(深度优先搜索DFS)
    机器学习十讲-第三讲分类
    数学知识-质数&约数
    树与图的DFS与BFS
    桥梁保护与监控-开发进度(二)
  • 原文地址:https://www.cnblogs.com/startover/p/3663495.html
Copyright © 2011-2022 走看看