I want to use longtable as tabularx, that is setting the width of the table and using the X cell type.


I want something similar but with longtable as the table is extending multiple pages.

I have found tabu package but it seems that it is deprecated and people is advicing not to use it.

Any help

  • 3
    in preamble add package ltablex. For example see tex.stackexchange.com/questions/368444/… (answer in addendum). – Zarko May 9 '17 at 19:27
  • 1
    you could use ltablex or ltxtable both of which combine tabularx and longtable, but really, I wouldn't. You do not need the complication of tabularx here you can simply calculate the width of your last column by subtracting the widths of the other columns from \textwidth – David Carlisle May 9 '17 at 19:31
  • but the tabcolsep... how do I deal with it? – jlanza May 9 '17 at 19:33
  • 3
    you know how many columns you have and each has two \tabcolsep so the last column is p{\dimexpr\textwidth-8\tabcolsep-5\arrayrulewidth-5.7cm-6cm-1.7cm} – David Carlisle May 9 '17 at 19:37
  • @DavidCarlisle I like the idea. How can I set it like a formula for automatic calculation. Let's see it as a variable argument list of lenghts and then the size is automatically calculated – jlanza May 10 '17 at 14:24

Based on @DavidCarlisle suggestion, here is my solution:



\multicolumn{3}{|c|}{\large\textbf{My Title}}\\
\centering\small{A} & \centering\small{B} & \centering\arraybackslash\small{C}\\


There problably should be an automated way of doing it, but it worked for me.

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.