LaTex 制作表格 合并行\multirow 合并列\multicolumn
2015-01-16 00:00
519 查看
摘要: LaTex 制作表格 合并行\multirow 合并列\multicolumn在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}
[object Object]通常畫表格需要使用到\multicolumn, \multirow, \hline, \cline四種指令其中要使用\multirow,必須在前頭先行加入\usepackage{multirow}直接看例子,Latex程式碼 =>
使用宏包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}
相关文章推荐
- LaTex 制作表格 合并行\multirow 合并列\multicolumn
- LaTex 制作表格 合并行\multirow 合并列\multicolumn
- LaTex 制作表格 合并行\multirow 合并列\multicolumn
- LaTeX表格合并行:Linux下TeXstudio提示multirow.sty not found
- Latex 制作斜线表头、合并行列单元格
- LaTeX制作表格
- <zz>latex制作复杂表格(跨行、跨列)
- LaTex学习教程——插入较复杂的表格(合并、换行以及加标题)
- latex 表格制作
- 用latex multirow包 绘制表格
- Latex 制作积分规则表格
- latex表格线的加粗及合并两行
- latex 复杂表格(多行多列)的制作
- LaTeX表格制作
- latex 复杂表格(多行多列)的制作
- html 制作表格 合并 样式
- 加粗合并latex表格线的加粗及合并两行
- Latex:表格制作全攻略
- 通用型简单latex模板&表格制作
- LaTeX 制作表格