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

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

在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. JavaScript权威指南--类型、值和变量

    本章要点图 数据类型:计算机程序的运行需要对值(value)比如数字3.14或者文本"hello world"进行操作,在编程语言中,能够表示并操作的值的类型叫做数据类型(type ...

  2. 树 & 二叉树

    2018-01-04 19:13:46 一.树 在计算机科学中,树(英语:tree)是一种数据结构,用来模拟具有树状结构性质的数据集合.它是由n(n>0)个有限节点组成一个具有层次关系的集合.把 ...

  3. ubuntu 14.04 解决apt-get update报错

    apt-get update 报如下错误: 忽略 http://cn.archive.ubuntu.com trusty-backports/multiverse Translation-zh 忽略 ...

  4. 设计模式--中介者模式C++实现

    中介者模式C++实现 1定义 用一个中介对象封装一系列的对象交互,中介者使各个对象不需要显示的相互作用,从而使其耦合松散,而且可以独立的改变他们之间的交互 2类图 组成说明 Mediator抽象中介者 ...

  5. hdu3544找规律

    如果x>1&&y>1,可以简化到其中一个为1的情况,这是等价的,当其中一个为1(假设为x),另一个一定能执行y-1次, 这是一个贪心问题,把所有的执行次数加起来比较就能得到 ...

  6. Ubuntu下配置舒服的Python开发环境

    Ubuntu 提供了一个良好的 Python 开发环境,但如果想使我们的开发效率最大化,还需要进行很多定制化的安装和配置.下面的是我们团队开发人员推荐的一个安装和配置步骤,基于 Ubuntu 12.0 ...

  7. MYSQL-实现ORACLE 和SQLserver数据中- row_number() over(partition by ) 分组排序功能

    网上看见了好多例子都基本上是一样的,没有过多的解释,对于一个初学MySQL来说有点难,我把部分转摘过来如下 原文:http://www.cnblogs.com/buro79xxd/archive/20 ...

  8. SpringBoot全家桶

    前言 Spring简化了Java的开发,而SpringBoot简化了Spring.本文用SpringBoot采用分层的结构整合了filter,aspect,mybaits,logback,redis, ...

  9. WeChat-扫码支付

    官方文档API: 打开连接 主要实现功能,网站上调起 微信支付二维码图片. 所需引用基类API:Data.cs.WxPayApi.cs.HttpService.cs.Config.cs.Thought ...

  10. JQuery强大的操控标签能力

    jquery选择器 $("#myId")          选择id为myId的元素 $(".myClass")     选择class为myClass的元素 ...