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}
    

      

     
  • 相关阅读:
    Tampermonkey 油猴脚本开发 入门
    k8s 上安装 lamp 环境
    centOS 7.9 k8s 安装 和 基本命令
    力扣59-螺旋矩阵 II
    力扣54-螺旋矩阵
    力扣705-设计哈希集合
    力扣706-设计哈希映射
    scrapy参数-COOKIES_ENABLED
    优雅降级、渐进增强
    e-cahr的地图组件封装(浙江省为例)
  • 原文地址:https://www.cnblogs.com/startover/p/3663495.html
Copyright © 2011-2022 走看看