Row 1 has one line and centered for each cell.

Row 2. Column 1 has two (2) lines. each line centered.
Row 2. Column 2 has one line. centered horizontal and vertical.
Row 2. Column 3 has text wrapping.justified.

Row 3 and 4 repeat Row 1.

  • 2
    Welcome to TeX.sx! Although your question has an answer, please add a minimal working example (MWE) that illustrates your problem, or what you have that you want to fix. This is a good idea for virtually all questions here. There is also no need to put a thanks in your question. Thanks is best expressed with upvotes, and it is the style here not to put it into the question. – qubyte May 2 '12 at 11:20
  • 1
    In addition to Harish Kumar's excellent answer, there are several other good answers to an old question over in StackOverflow: How to wrap text in LaTeX tables? – Mars Aug 28 '13 at 22:09
  • @Mars the package tabularx described in your link is by far the most neat solution. – deps_stats Nov 4 '18 at 0:47


one & two & three \\\hline
This is two line thing and centered & only one line&  \multicolumn{1}{m{3cm}|}{This is justified and may go to second line as well, neatly}\\\hline
  one & two & three \\\hline
  one & two & three \\\hline

enter image description here


Thanks for your answer, it inspired me to make some custom column-types, and I'd love to share them.

    \begin{tabular}{ | C{0.45\textwidth} | C{0.45\textwidth} | }
        Correct (from the reader) & Experimental (HyperChem) \\ \hline
    \begin{tabular}{ | L{0.45\textwidth} | m{0.45\textwidth} | }
        \includegraphics[width=0.45\textwidth]{as1correlationcorrect} & \includegraphics[width=0.45\textwidth]{as1correlationbondorderbonddissociationenergyexperiment} \\ \\

        \textbf{Figure 3: }Correlation between bond-order and Dissociation Energy, with the literature-experiment values for D\(_0\). & \textbf{Figure 4: }Correlation between bond-order and Dissociation Energy, with the computer-experiment values for D\(_0\).

        \\ \hline

result of tabular


Without calling \newcolumntype, there is a built in command that we could use, which is >{\centering\arraybackslash}m{length}, where the variable "length" specifies the width that the text spans

Only one line here. & Same for column two. & Same for column three. \\
We have two lines here, each line centered. & This cell will have three lines and each line centered as well. & Here is a justified cell, please check this out! \\
This cell has one line. & So does this one. & And this one, too! \\

And the output looks like

table text wrap

The text is centered both horizontally and vertically in each cell. If you prefer to have the text aligned to top vertically, use >{\centering\arraybackslash}p{3.7cm} instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.