TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have problem with some of the longtable tables, as illustrated here:

Is there an easy way to make table wrap cell contents multi-line so that it does not exceed page margins?

share|improve this question
Please provide a minimal working example (MWE) the duplicates this problem. That way community members can identify the problems much easier and hit the ground running. Specific to this example, you mention \multicolumn although it seems like you only have two columns in your longtable. Is there any addition (invisible) columns to your longtable? – Werner Jun 4 '12 at 23:24
TeX file was auto-generated by Sphinx. Here is sample that produced above table: pastebin.com/88qjEfdG – bmatt Jun 4 '12 at 23:36
Using the p{<width} column type should fix it. The l column type does not allow for line wrapping. – Peter Grill Jun 4 '12 at 23:37
up vote 6 down vote accepted

longtable column specifiers are exactly the same as standard latex tabular ones (or the extended set from the array package. so change l to p{3cm} and it will wrap the lines in that column to the specified width.

share|improve this answer
It would be really nifty if one could use a X column type. – Werner Jun 4 '12 at 23:48
@Werner The ltxtable package combines longtable and tabularx functionalities, and lets you do just that. :) – LianTze Lim Jun 4 '12 at 23:54

Your Answer


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.