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亿+,项目需求就是根据各种组合条件寻找标签和人群 ...
随机推荐
- ssl通信c实现
/*File:client.c *Auth:sjin *Date:2014-03-11 * */ #include <stdio.h>#include <string.h>#i ...
- [算法] kmp实现
字符串查找是经典场景,也是面试中最常见的一道题. 说来惭愧,毕业3年了,才明白了kmp算法的实现,以前一直以为这类算法是基础,工作中中不会碰到[也的确没有碰到过...] 但是,对这些基本算法结构的理解 ...
- jQuery + json 实现省市区三级联动
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Apache 隐藏入口文件 index.php
新建 .htaccess文件至站点目录下,并写入如下代码: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQ ...
- iOS开发UI篇—ios应用数据存储方式(归档) :转发
本文转发至:文顶顶http://www.cnblogs.com/wendingding/p/3775293.html iOS开发UI篇—ios应用数据存储方式(归档) 一.简单说明 在使用plist ...
- jquery如何判断元素是否被点击_百度知道
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <div id="parent"> <a id="a1" ...
- MAC使用GITHUB
作者:珊姗是个小太阳链接:https://www.zhihu.com/question/20070065/answer/79557687来源:知乎著作权归作者所有,转载请联系作者获得授权. #什么是 ...
- /bin/sh 与 /bin/bash 的区别
/bin/sh 与 /bin/bash 的区别,用 : 截取字符串不是POSIX 标准的. 区别 sh 一般设成 bash 的软链 (symlink) ls -l /bin/sh lrwxrwxrwx ...
- (中等) HDU 4370 0 or 1,建模+Dijkstra。
Description Given a n*n matrix C ij (1<=i,j<=n),We want to find a n*n matrix X ij (1<=i,j&l ...
- html5 js控制音乐播放
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><script lang ...