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

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

在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. 在接口请求时报错Unrecognized field "zZF1&quot

    这个问题是json序列化问题,当参数中出现大写字母组成的字段时(例如:ZZF1),此时需在字段上加入注解:@JsonProperty(value = "ZZF1")

  2. UVA-10047 The Monocycle (图的BFS遍历)

    题目大意:一张图,问从起点到终点的最短时间是多少.方向转动也消耗时间. 题目分析:图的广度优先遍历... 代码如下: # include<iostream> # include<cs ...

  3. day30 主机管理-堡垒机3-操作记录

    课堂代码:https://github.com/liyongsan/git_class/tree/master/day30

  4. MySQL mha 高可用集群搭建

    [mha] MHA作为MySQL故障切换和主从提升的高可用软件,在故障切换过程中,MHA能做到在0~30秒之内自动完成数据库的故障切换操作,并且在进行故障切换的过程中,MHA能在最大程度上保证数据的一 ...

  5. Sql sever 事务

    SQL事务 一.事务概念    事务是一种机制.是一种操作序列,它包含了一组数据库操作命令,这组命令要么全部执行,要么全部不执行.因此事务是一个不可分割的工作逻辑单元.在数据库系统上执行并发操作时事务 ...

  6. Easy UI DataGrid 与 分页

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs& ...

  7. 《Effective C++》第4章 设计与声明(1)-读书笔记

    章节回顾: <Effective C++>第1章 让自己习惯C++-读书笔记 <Effective C++>第2章 构造/析构/赋值运算(1)-读书笔记 <Effecti ...

  8. CUDA概述

    基本概念和定义 CUDA实际上是一种多平台计算系统,最基本的配置是一台CPU主机和一块显卡,两者都能进行计算.其中CPU主机称为host, GPU称为device,CUDA的API程序的命名和参数命名 ...

  9. Linux服务器静态路由配置

    转载自:点击打开链接 静态路由是在路由器中设置的固定的路由表.除非网络管理员干预,否则静态路由不会发生变化.由于静态路由不能对网络的改变作出反映,一般用于网络规模不大.拓扑结构固定的网络中.静态路由的 ...

  10. APUE学习笔记——5.2流与文件对象、fwide

    1 流         当一个文件被打开时,可以获得文件描述符.通过文件描述符可以对文件进行I/O操作.而I/O操作是通过流完成的. 流的定向:         在Unix系统中,使用 ASCII标准 ...