I just discovered the tabularx package which allows me to introduce a table column which has line wrapping, and I also know that packages that allow automatic table splitting across pages do exists (e.g. longtable).

The problem is that I need both features at once, and nesting two commands provided by two different packages doesn't work (e.g. longtable + tabularx).

I would prefer a solution which uses tabularx + some other package if necessary to achieve this. Otherwise, any solution is acceptable which allows me to do automatic table splitting across pages and long line wrapping on the same table.

  • 4
    lockstep has given an answer for combining tabularx and longtable, but your wording makes me check that you do realise that standard latex tables allow line wrapping if you use a p column? (tabularx just saves you from specifying the column width) similarly you can use p columns in longtable without any additional packages. Apr 28, 2012 at 21:06

2 Answers 2


You can use feature rich tabu package that has a longtabu option which combines tabularx and longtable. Here is a MWE:

\usepackage{longtable} %tabu needs this to be loaded.
\usepackage{lipsum} % provides dummy text.
\usepackage[charter]{mathdesign} % just for some good font...(personal taste)
\usepackage[margin=1in,showframe]{geometry}% to adjust page margins etc and to show frame.
% ----------------------------------------------------------------------%
\begin{longtabu} to \textwidth {|X[1 , p ] |X[1 , l ] | X[1 , c ]| X[1 , r ]|}\firsthline\hline
% -----------------These are headings----------------------------------%
Head - 1 (paragraph mode) &Head - 2 (left aligned) & Head-3 (centered) & Head -4 (right aligned) \\ \hline
{{\bfseries  Continued from previous page}} \\
Head - 1 (paragraph mode) &Head - 2 (left aligned) & Head-3 (centered) & Head -4 (right aligned)  \\ \hline\hline
\hline \multicolumn{4}{|r|}{{Continued on next page}} \\ \hline
\multicolumn{4}{|r|}{{Concluded}} \\ \hline
%-----------Headings end---------------------------------
%--------------------------table body starts-------------------
\lipsum[4]& \lipsum[4]& \lipsum[4] & \lipsum[4] \\\hline
\lipsum[4]& \lipsum[4]& \lipsum[4] & \lipsum[4]\\hline
\lipsum[4] &\lipsum[4]& \lipsum[4] & \lipsum[4]\\\lasthline
%--------------------------table body ends-------------------

enter image description here


Have a look at the ltxtable package. From the package description:

Ltxtable provides the functionality of longtable and tabularx together inside a longtable environment. The code of each such environment (with X specifiers in its column layout) should be in a separate file, which is then included in your document by a command \LTXtable{<width>}{<file name>}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .