1

This question already has an answer here:

I want to have table, for instance with 3 columns, where the first two columns will have natural width, so the text doesn't wrap and the last column will wrap if the whole table will be bigger than text width. Is it possible in latex?

--------------------------------------- // line
| a | asfafasf | asfasfasff           |
| b | saf      | asafasfsafasfasfasfs |
| c | safasf   | asasffsaf asfasf     |
|   |          | asasfsafaf           |

marked as duplicate by Alenanno, Mico tables May 2 '15 at 10:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • tabular* and tabularx take a width argument. But maybe a p-column might be more suited. Always hard to say, when the example contains just random strings of letters. – Johannes_B May 2 '15 at 9:28
2

tabularx can do this job with its X column. I have added \raggedright so the complex words don't trouble.

\documentclass{article}
\usepackage{tabularx}
\begin{document}
  \noindent
  \begin{tabularx}{\textwidth}{ll>{\raggedright\arraybackslash}X}
     a & asfafasf & asfasfasff          \\
     b & saf      & asafasfsafasfasfasfs \\
     c  & safasf   & asasffsaf asfasf asasfsafaf   asasfsafaf   asasfsafaf   asasfsafaf   asasfsafaf   asasfsafaf   asasfsafaf   asasfsafaf        \\
  \end{tabularx}
\end{document}

enter image description here

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