LaTex Production Tables Merge rows \multirow merge columns \multicolumn

Source: Internet
Author: User

Use this package at the front of the latex file \usepackage{multirow}

The MultiRow macro package provides the \multirow command to compose text that spans more than two lines in a table. The format of the command is as follows:

\multirow{nrows}[bigstructs]{width}[fixup]{text}

Nrows sets the number of rows occupied.

Bigstructs This is optional, mainly when you use the BIGSTRUCT macro package.

Widths sets the width of the column text. If you want LaTeX to decide the width of the text itself, use *.

Fixup this is optional and is used primarily to adjust the vertical position of the text.

Text to be typeset. You can use \ \ To force a line break.

More introduction and Examples: http://www.ctex.org/documents/packages/table/multirow.htm

Supplementary example 1:http://blog.sina.com.cn/s/blog_5e16f1770100u40t.html

       
        \renewcommand{\multirowsetup}{\centering}  
        
        \hline  
        \multirow{4}{2cm}{this is a demo table}  
                
        
                & C2B &  
                & &  
                
        
        
 

Supplementary example 2:http://jhengjyun.blogspot.fr/2011/01/ latexmulticolumnmultirow.html
Usually draw a form to use to \multicolumn, \multirow, \hline, \cline four instructions
where to use \multirow, You must first add \usepackage{multirow}
to see the example directly, Latex code =>
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-row and Col}} \ \
\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> ;
Show Fruit =>








Add an example 3:http://blog.sina.com.cn/s/blog_5e16f1770100h6jl.html
Using the macro package MultiRow, the following commands are available: see http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/



Demo Code:
\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} from:http://blog.163.com/chen_dawn/blog/static/1125063201318115613703/

LaTex Production Tables Merge rows \multirow merge columns \multicolumn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.