2

In the appendix of my report, I would like to add a table. The problem is that I have a cell "description" that contains too much text to be displayed on one line, now the row "overflows" on the right. Also there is too many row to be contained on one single page. Is it possible to display my data such as

  • Fixed width
  • multi-line cell for the description
  • Displayed on several pages

Thank you

2

You may take a look at the tabu package. This extends the well known tabularx and longtable so that you can easily handle them both without writing to a aux file.

\documentclass{book}
\usepackage{tabu}
\usepackage{longtable}

% showcase only strip that
% see http://tex.stackexchange.com/questions/50296/problem-with-using-loop-inside-the-tabular-environment
\newcounter{my}
\setcounter{my}{0}

\def\myinsert{}%
\loop\ifnum\themy<100
  \addtocounter{my}{1}
  \expandafter\def\expandafter\myinsert\expandafter{%
    \myinsert
    Quite a big cell content  & Not so big content but bigger cell \\
  }%
\repeat
% end showcase 

\begin{document}

\begin{longtabu} to .5\textwidth{X[1]X[2]} % half the width of the text
\myinsert
\end{longtabu}

\end{document}

Any additional information can also be found in the tabu documentation (texdoc tabu)

  • 1
    Thank you, actually it seems longtable alone is already enough for what I need to do. \begin{longtable}{|c|l|p{8cm}|} – Martin Trigaux Jul 10 '12 at 9:00

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.