这个文章写的真的太牛比了!

============================================================

在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}的更多相关文章

  1. {Notes}{LaTeX}{enumerate}

    \usepackage{enumerate} \begin{enumerate}{(1)} \setcounter{enumi}{2} % begin with 2 \item first \item ...

  2. CASthesis 模板编译的问题

    使用CASthesis模板(https://github.com/xiaoyao9933/UCASthesis,介绍里说这个版本是在ThuThesis的基础上修改的),自带的说明如下. 使用须知 == ...

  3. [旧版] CASthesis 模板编译的问题

    写在前面的话:国科大最新版的模板在这里(https://github.com/mohuangrui/ucasthesis),利用它来写博后出站报告的相关介绍在这里: 本篇博文是针对另一个模板进行介绍的 ...

  4. Pandas高级教程之:自定义选项

    目录 简介 常用选项 get/set 选项 经常使用的选项 最大展示行数 超出数据展示 最大列的宽度 显示精度 零转换的门槛 列头的对齐方向 简介 pandas有一个option系统可以控制panda ...

  5. LaTex 制作表格 合并行\multirow 合并列\multicolumn

    在latex文件最前面用这个包\usepackage{multirow} multirow 宏包提供了 \multirow 命令可以在表格中排版横跨两行以上的文本.命令的格式如下: \multirow ...

  6. Latex Notes

    latex Table of Contents 1. Presentation/Slides with Beamer 2. Drawing in LaTex With TikZ 3. Tracked ...

  7. Latex 的Table使用multirow and multicolumn

    Here are some tips: Use a \multicolumn{1}{|l}{} & \multicolumn{2}{l|}{...} construct; Add anothe ...

  8. Note | LaTeX

    目录 一.TeX家族 1. TeX - LaTeX 2. pdfTeX - pdfLaTeX 3. XeTeX - XeLaTeX 4. CTeX - MiKTeX - TeX Live 二.入门 1 ...

  9. TeXstudio 编写Latex论文的若干问题

    TeXstudio 编写Latex论文的若干问题解决方案总结       问题1: 如何安装TeXstudio 以及 Texstudio当中的中文字体使用问题.   一.如何安装TeXstudio 很 ...

随机推荐

  1. 【Python】模块学习之ConfigParser读写配置信息

    前言 使用配置文件可以在不修改程序的情况下,做到对程序功能的定制.Python 使用自带的configParser模块可以很方便的读写配置文件的信息. configParser 支持的方法 Confi ...

  2. tensorflow wide deep 介绍

    https://blog.csdn.net/heyc861221/article/details/80131369 https://blog.csdn.net/heyc861221/article/d ...

  3. springmvc的@Validated/@Valid注解使用和BindingResult bindingResult

    关于@Valid和Validated的比较 @Valid是使用hibernate validation的时候使用 @Validated 是只用spring  Validator 校验机制使用 一:@V ...

  4. Python3 学习第十三弹: 模块学习五之pickle与json

    对于python来说,这两个模块是十分实用的两个模块,以一种简单的方法用于储存数据实例. pickle模块 提供用来储存Python各种数据序列化存储 # 原来的cPickle已经在python3中与 ...

  5. bzoj2501

    题解: 显然,每当进入一个小的边界,那么我们的ans+1,出去一个大的边界,ans-1 然后,我们将每一个边界排序,时间小的在前,大的在后 每一次进来一个,如果是左边的边界,+1,右边的-1 然后输出 ...

  6. cookie和session的区别与联系

    http://www.cnblogs.com/s1nker/p/4876284.html 基本概念 对于许多人来说,都知道的是,cookie是存储在客户端的,可以用来放需要长期使用的内容,例如用户密码 ...

  7. php获取excel文件数据

    很简单就可以实现,下面为大家简单介绍下 1.下载PHPExcel类,是一个文件夹,还得有一个文件PHPExcel.php,两个在同级目录 require __DIR__ . './PHPExcel/I ...

  8. jsp页面图片显示不出来

    jsp页面就是MyJsp.jsp <body> This is my JSP page. <br> <img src="img/top.jpg"> ...

  9. D. Closest Equals(线段树)

    题目链接: D. Closest Equals time limit per test 3 seconds memory limit per test 256 megabytes input stan ...

  10. 【剑指offer】n个骰子的点数,C++实现

    # 题目 # 思路 # 代码