{Notes}{Latex}{multirow}
这个文章写的真的太牛比了!
============================================================
在latex文件最前面用这个包\usepackage{multirow}
multirow 宏包提供了 \multirow 命令可以在表格中排版横跨两行以上的文本。命令的格式如下:
\multirow{nrows}[bigstructs]{width}[fixup]{text}
nrows 设定所占用的行数。
bigstructs 此为可选项,主要是在你使用了 bigstruct 宏包时使用。
width 设定该栏文本的宽度。如果想让 LaTeX 自行决定文本的宽度,则用 * 即可。
fixup 此为可选项,主要用来调整文本的垂直位置。
text 所要排版的文本。可用 \\ 来强迫换行。
更多介绍与实例:http://www.ctex.org/documents/packages/table/multirow.htm
补充例子1: http://blog.sina.com.cn/s/blog_5e16f1770100u40t.html
\renewcommand{\multirowsetup}{\centering}
\begin{tabular}{|l|l|l|l|}
\hline
\multirow{4}{2cm}{This is a demo table}
& C2a &
\multirow{4}{2cm}{This is another one} & C4a\\
& C2b & & C4b\\
& C2c & & C4c\\
& C2d & & C4d\\
\hline
\end{tabular}

补充例子2:http://jhengjyun.blogspot.fr/2011/01/latexmulticolumnmultirow.html
通常畫表格需要使用到\multicolumn, \multirow, \hline, \cline四種指令
其中要使用\multirow,必須在前頭先行加入\usepackage{multirow}
直接看例子,Latex程式碼 =>
de style="" >\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{Multi-Row}&
\multicolumn{2}{c|}{Multi-Column}&
\multicolumn{2}{c|}{\multirow{2}{*}{Multi-RowandCol}} \\
\cline{2-3}
& column-1& column-2& \multicolumn{2}{c|}{} \\
\hline
label-1& label-2& label-3& label-4& label-5 \\
\hline
\end{tabular}de>
顯示結果 =>
补充个例子3:http://blog.sina.com.cn/s/blog_5e16f1770100h6jl.html
使用宏包multirow,提供了如下命令:参看http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/
效果图:
演示代码:
\documentclass{article}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{multirow}
\begin{document}
\begin{longtable}{| c | c | c | c
| c | c |}
\hline
& \multicolumn{5}{| c |}{ } \\
& \multicolumn{5}{| c |}{\textbf{\large Father's Occupation}} \\
& \multicolumn{5}{| c |}{ } \\
\hline
& & & & & \\
\multicolumn{1}{|c|}{\textbf{}}
& \multicolumn{1}{|c|}{\textbf{}}
& \multicolumn{1}{c|}{\textbf{Group A}}
& \multicolumn{1}{c|}{\textbf{Group B}}
& \multicolumn{1}{c|}{\textbf{Group C}}
& \multicolumn{1}{c|}{\textbf{Group D}} \\
& & & & & \\
\cline{2-6}
& & & & & \\
\multirow{5}{*}{\begin{sideways}{\textbf{\large Mother's Occupation}}\end{sideways}}
& \textbf{Group A} & $8$ & $3$ & $4$ & $1$ \\
& & & & & \\
\cline{2-6}
& & & & & \\
& \textbf{Group B} & $3$ & $3$ & $0$ & $1$ \\
& & & & & \\
\cline{2-6}
& & & & & \\
& \textbf{Group C} & $0$ & $0$ & $1$ & $0$ \\
& & & & & \\
\cline{2-6}
& & & & & \\
& \textbf{Group D} & $2$ & $0$ & $0$ & $1$ \\
& & & & & \\
\hline
& & & & & \\
& \textbf{Total:} & \textbf{26} & \textbf{10} & \textbf{10} & \textbf{4} \\
& & & & & \\
\hline
\end{longtable}
\end{document}
{Notes}{Latex}{multirow}的更多相关文章
- {Notes}{LaTeX}{enumerate}
\usepackage{enumerate} \begin{enumerate}{(1)} \setcounter{enumi}{2} % begin with 2 \item first \item ...
- CASthesis 模板编译的问题
使用CASthesis模板(https://github.com/xiaoyao9933/UCASthesis,介绍里说这个版本是在ThuThesis的基础上修改的),自带的说明如下. 使用须知 == ...
- [旧版] CASthesis 模板编译的问题
写在前面的话:国科大最新版的模板在这里(https://github.com/mohuangrui/ucasthesis),利用它来写博后出站报告的相关介绍在这里: 本篇博文是针对另一个模板进行介绍的 ...
- Pandas高级教程之:自定义选项
目录 简介 常用选项 get/set 选项 经常使用的选项 最大展示行数 超出数据展示 最大列的宽度 显示精度 零转换的门槛 列头的对齐方向 简介 pandas有一个option系统可以控制panda ...
- LaTex 制作表格 合并行\multirow 合并列\multicolumn
在latex文件最前面用这个包\usepackage{multirow} multirow 宏包提供了 \multirow 命令可以在表格中排版横跨两行以上的文本.命令的格式如下: \multirow ...
- Latex Notes
latex Table of Contents 1. Presentation/Slides with Beamer 2. Drawing in LaTex With TikZ 3. Tracked ...
- Latex 的Table使用multirow and multicolumn
Here are some tips: Use a \multicolumn{1}{|l}{} & \multicolumn{2}{l|}{...} construct; Add anothe ...
- Note | LaTeX
目录 一.TeX家族 1. TeX - LaTeX 2. pdfTeX - pdfLaTeX 3. XeTeX - XeLaTeX 4. CTeX - MiKTeX - TeX Live 二.入门 1 ...
- TeXstudio 编写Latex论文的若干问题
TeXstudio 编写Latex论文的若干问题解决方案总结 问题1: 如何安装TeXstudio 以及 Texstudio当中的中文字体使用问题. 一.如何安装TeXstudio 很 ...
随机推荐
- 轻量级 HTTP(s) 代理 TinyProxy
J CentOS 下安装 TinyProxy yum install -y tinyproxy 启动.停止.重启 # 启动service tinyproxy start# 停止service ti ...
- Linux命令详解-hwclock/chock
hwclock命令可以用来显示/设置硬件时钟命令. 在Linux中有硬件时钟与系统时钟等两种时钟.硬件时钟是指主机板上的时钟设备,也就是通常可在BIOS画面设定的时钟.系统时钟则是指kernel中 的 ...
- SPOJ 5152 Brute-force Algorithm EXTREME && HDU 3221 Brute-force Algorithm 快速幂,快速求斐波那契数列,欧拉函数,同余 难度:1
5152. Brute-force Algorithm EXTREME Problem code: BFALG Please click here to download a PDF version ...
- SSM整合AOP,日志框架和拦截器
前言 日志是所有系统必不可少的部分,而AOP在MVC通常用于监控方法调用,可以生成一个traceid,记录从用户调用到底层数据库的数据链路,帮助监控和排查问题. AOP 现在做一个简单的前置切面,用来 ...
- Annotation方式实现AOP
1.添加其他jar包 2.配置applicationContext.xml文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <?xml version=&quo ...
- FMDB给表添加新的字段
1.首先判断添加的字段是否存在,如果不存在就添加. 2.代码演示: (1)判断是否存在,判断之前先导入头文件确保可以调用FMDB的api(#import “FMDatabaseAdditions.h” ...
- 剑指offer--42.孩子们的游戏(圆圈中最后剩下的数)
约瑟夫环,用链表,队列,总之模拟过程 ----------------------------------------------------------------- 时间限制:1秒 空间限制:32 ...
- 20165202 week10课下补做
相关知识点总结 在数据结构和算法中,排序是很重要的操作,要让一个类可以进行排序,有两种方法: 有类的源代码,针对某一成员变量排序,让类实现Comparable接口,调用Collection.sort( ...
- xss 防御
系列 防御原则 第一.在输入方面对所有用户提交内容进行可靠的输入验证,提交内容包括URL.查询关键字.http头.post数据等 第二.在输出方面,在用户输内容中使用 <XMP>标签 还是 ...
- apache+php 字符编码问题解决
如果你在网上搜索 “apache配置”,搜到的页面大多都会建议你在httpd.conf中加上这么一句:AddDefaultCharset GB2312.对于新手而且是只用GB2312编码的开发人来说, ...
演示代码: