Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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
    
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
add comment

1 Answer

\documentclass{article}
\usepackage{array}
\newcolumntype{L}{>{\centering\arraybackslash}m{3cm}}

\begin{document}

\begin{table}
\begin{tabular}{|L|c|L|}\hline
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
\end{tabular}
\end{table}
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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