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.

I have a table with two columns: a word and its description, which is a sentences. Now, when I create a pdf, the sentences run out of the page boundary. Is it possible to automatically split the sentences in Latex or do linebreaks need to be used?

share|improve this question
2  
Use \begin{tabular}{p{0.5\linewidth}m{0.2\linewidth}}. –  Please don't touch Mar 23 '12 at 17:28
    
With 2 times 'p', thus {p{0.5\linewidth}p{0.2\linewidth}} it worked. Thanks! –  MaVe Mar 23 '12 at 17:47

1 Answer 1

up vote 10 down vote accepted

Use a p{<length>} column in the tabular format (p{<length>} behaves like \parbox[t]{width} and text will wrap); if you load the array package you can also use m{<length>} which is similar but now every entry will be centered in proportion to the rest of the line. A little example:

\documentclass{article}
\usepackage{array}
\usepackage{lipsum}% just to generate some text

\begin{document}

\noindent\begin{tabular}{lp{8cm}}
Left aligned column & \lipsum[1]
\end{tabular}

\noindent\begin{tabular}{lm{8cm}}
Left aligned column & \lipsum[1]
\end{tabular}

\end{document}

enter image description here

share|improve this answer

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.