Cell wrapping in Latex table, showing multiple lines

Source: Internet
Author: User

In addition to using the MultiRow method (more cumbersome), the better way is to use the following statement, you can make a cell display multiple lines, and then with other format statements, can make the table very beautiful.

\newcommand{\tabincell}[2]{\begin{tabular}{@{}#[email protected]{}} #2 \end{tabular}}

The following is a more comprehensive example:

\BEGIN{TABLE*}[HTBP]

\centering

\newcommand{\tabincell}[2]{\begin{tabular}{@{}#[email protected]{}} #2 \end{tabular}}

\CAPTION{XXXXXXX}

\begin{tabular}{|m{0.5cm}<{\centering}|m{2.5cm}<{\centering}|m{1.5cm}<{\centering}|m{1.5cm}<{\ centering}|m{1.5cm}<{\centering}|m{1.5cm}<{\centering}|m{1.5cm}<{\centering}|}

\hline

\multicolumn{2}{|m{3cm}<{\centering}|} {Test instance}&

Number of the decision variables &

The decision Space &

Number of the linear equations &

Number of the nonlinear equations &

Number of the optimal solutions\\

\hline

F1 &

\TABINCELL{L}{EQU1 \ Equ2} &

2 &

2 &

2 &

2 &

2 \ \

\hline

F1 & & & & & & \ \

\hline

F2 & & & & & & \ \

\hline

F3 & & & & & & \ \

\hline

F4 & & & & & & \ \

\hline

F5 & & & & & & \ \

\hline

F6 & & & & & & \ \

\hline

F7 & & & & & & \ \

\hline

\end{tabular}

\end{table*}

Final effect

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/58/AF/wKioL1S4f1_Q1IqMAAFP5K700FA858.jpg "title=" Qq20150116105756.jpg "alt=" Wkiol1s4f1_q1iqmaafp5k700fa858.jpg "/>


This article is from "A Dream a journey-record learning drip" blog, please be sure to keep this source http://jincheng.blog.51cto.com/4625177/1604690

Cell wrapping in Latex table, showing multiple lines

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.