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}
\begin{document}
\begin{table}[!htb]
\centering
\caption{Present Strength-Production}
\begin{tabular}{|c|l|l|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{Sl.No} &
\multicolumn{2}{c|}{\multirow{2}{*}{\textbf{Designation}}} &
\multicolumn{4}{c|}{\textbf{Shifts}} & \textbf{Leave/Off} &
\multirow{2}{*}{\textbf{Total}} \\
\cline{4-7}
& \multicolumn{2}{c|}{} & \textbf{A} & \textbf{B} & \textbf{C} & \textbf{G} & \textbf{Reserve} & \\
\hline
1 & \multicolumn{2}{l|}{Plant Engineer} & & & & 1 & & 1 \\
\hline
\multicolumn{1}{|l}{} & \multicolumn{2}{l|}{\textbf{Sub Total}} & & & & \textbf{1} & & \textbf{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|}{\textbf{Sub Total}} & \textbf{2} & \textbf{2} & \textbf{2} & & \textbf{2} & \textbf{8} \\
\hline
1 & \multicolumn{2}{l|}{Worker} & 2 & 2 & 2 & & 2 & 8 \\
\hline
\multicolumn{1}{|l}{} & \multicolumn{2}{l|}{\textbf{Sub Total}} & \textbf{2} & \textbf{2} & \textbf{2} & & \textbf{2} & \textbf{8} \\
\hline \hline
\multicolumn{1}{|l}{} & \multicolumn{2}{l|}{\textbf{Total}} & \textbf{4} & \textbf{4} & \textbf{4}
& \textbf{1} & \textbf{4} & \textbf{17} \\
\hline
\end{tabular}
\label{tab:pro_pro}
\end{table}
\end{document}
Latex 的Table使用multirow and multicolumn的更多相关文章
- Footnotes for tables in latex - 为latex的table加上footnotes
参考: Footnotes for tables in LaTeX Footnote in tabular environment Footnotes for tables in latex - 为l ...
- LaTex 制作表格 合并行\multirow 合并列\multicolumn
在latex文件最前面用这个包\usepackage{multirow} multirow 宏包提供了 \multirow 命令可以在表格中排版横跨两行以上的文本.命令的格式如下: \multirow ...
- {Notes}{Latex}{multirow}
这个文章写的真的太牛比了! ============================================================ 在latex文件最前面用这个包\usepackag ...
- Latex:表格制作全攻略
给出一个制作复杂表格的例子,制作表格主要用到multicolumn,multirow和cline,其中,要使用multirow,必须usepackage{multirow} 如果要制作出如下图所示的表 ...
- 【LaTeX】E喵的LaTeX新手入门教程(4)图表
这里说的不是用LaTeX画图,而是插入已经画好的图片..想看画图可以把滚动条拉到底.前情回顾[LaTeX]E喵的LaTeX新手入门教程(1)准备篇 [LaTeX]E喵的LaTeX新手入门教程(2)基础 ...
- Latex 表格(跨行、跨列、背景加灰)new
一. 效果如图 二.代码如下 1. 首部增加宏包: \usepackage{multirow} 2. 正文部分增加: \begin{table} \centering \caption{Suspici ...
- latex制作表格-跨行跨列
1.列的合并,使用 \multicolumn{跨几列}{格式}{填充内容} \documentclass[UTF8]{ctexart} \begin{document} 三囚犯问题进行300次实验后\ ...
- sqoop的安装与使用
1.什么是Sqoop Sqoop即 SQL to Hadoop ,是一款方便的在传统型数据库与Hadoop之间进行数据迁移的工具.充分利用MapReduce并行特点以批处理的方式加快传输数据.发展至今 ...
- spark集群搭建整理之解决亿级人群标签问题
最近在做一个人群标签的项目,也就是根据客户的一些交易行为自动给客户打标签,而这些标签更有利于我们做商品推荐,目前打上标签的数据已达5亿+, 用户量大概1亿+,项目需求就是根据各种组合条件寻找标签和人群 ...
随机推荐
- 我也谈javascript闭包的原理理解
参考原文:http://www.oschina.net/question/28_41112 前言:还是一篇入门文章.Javascript中有几个非常重要的语言特性——对象.原型继承.闭包.其中闭包 对 ...
- HDFS读写程序小测试
WriteHdfs: package aa; import java.io.*; import org.apache.hadoop.conf.Configuration; import org.apa ...
- SDAU课程练习--problemB(1001)
题目描述 There is a pile of n wooden sticks. The length and weight of each stick are known in advance. T ...
- ARMs3c2440开发板挂接NFS服务
1.修改IP地址,使虚拟机,电脑PC机.开发板位于同一个网段,开发板网线与电脑网络接口连接,如PC:ip 192.168.0.112 255.255.255.0 虚拟机 192.168.0.8 255 ...
- Material Design设计的开源代码
https://github.com/telly/FloatingAction http://www.csdn.net/article/2014-11-21/2822753-material-desi ...
- 图解SQL的各种连接join
对于SQL的Join,在学习起来可能是比较乱的.我们知道,SQL的Join语法有很多inner的,有outer的,有left的,有时候,对于Select出来的结果集是什么样子有点不是很清楚.Codin ...
- jquery如何判断元素是否被点击_百度知道
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <div id="parent"> <a id="a1" ...
- jquery 如何动态添加、删除class样式方法介绍_jquery_脚本之家
获取与设置样式 获取class和设置class都可以使用attr()方法来完成.例如使用attr()方法来获取p元素的class 取与设置样式 获取class和设置class都可以使用attr()方法 ...
- Linux启动时显示Grub命令行及修改
1.在启动Linux系统时,如果/boot/grub/grub.cfg文件损坏或者不存在时,启动Linux时,就会有Grub命令行的提示. 如下操作,将系统自带的grub.cfg文件改名.重新启动系统 ...
- STL中的所有算法(70个)
STL中的所有算法(70个)----9种类型(略有修改by crazyhacking) 参考自: http://www.cppblog.com/mzty/archive/2007/03/14/1981 ...