{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 很 ...
随机推荐
- Angular单元测试系列
Angular单元测试系列 - 大纲Angular单元测试系列 - 简介Angular单元测试系列 - 如何使用Jasmine进行Angular单元测试Angular单元测试系列 - Router.C ...
- 高性能Go并发
1.管道chan吞吐极限10,000,000,单次Put,Get耗时大约100ns/op,无论是采用单Go程,还是多Go程并发(并发数:100, 10000, 100000),耗时均没有变化,Go内核 ...
- Knockout结合Bootstrap创建动态UI--产品列表管理
本篇文章结合Bootstrap创建一个比较完整的应用,对产品列表进行管理,包括产品的增加.删除.修改. 需要的引用 <script type='text/javascript' src='htt ...
- CAJ2PDF
该项目不成熟,很容易遇到转换失败的例子. https://github.com/JeziL/caj2pdf https://github.com/JeziL/caj2pdf/wiki caj2pdf ...
- IOS-下载动画
就2小时教会你抽丝剥茧CAAnimation核心动画之精美的下载动画 header 设计灵感 设计此效果的作者 Nick; images 开始之前你需要了解的 先上一张CAAnimation层次图: ...
- jquery下跨域请求之代码示例
场景描述: 在域A下异步获取B域下的接口: 实现方法: $.ajax({ url : (Q.lottery.serverTimeUrl || 'about:blank'), error : funct ...
- [SQL]会引起全表扫描的10种SQL语句
1.模糊查询效率很低: 原因:like本身效率就比较低,应该尽量避免查询条件使用like:对于like ‘%...%’(全模糊)这样的条件,是无法使用索引的,全表扫描自然效率很低:另外,由于匹配算法的 ...
- C++复习4.函数设计基础
C/C++ 函数设计基础 20130918 函数式程序的基本功能单元,是模块化程序设计的基础,即使函数的功能正确是不够的,因为函数设计的细微缺点很容易导致函数被错用. 了解函数的基本知识,堆栈和堆的相 ...
- CUDA库函数使用笔记与案例(一)
项目合作中需要整合对方公司提供的CUDA代码,因此需要详细学习代码中涉及的cuda函数. CUDA Tool Kit 8.0较完整的官方说明文档: http://docs.nvidia.com/cud ...
- TF随笔-11
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import tensorflow as tf my_var=tf.Variable(0.) step=t ...
演示代码: