Possible Duplicate:
Longtable: page breaks within row possible?

I'm using longtable and it sometimes contains a text more than 1 page.

I couldn't figure out how to break page when it overflows.

It seems there is no way to do it by longtable. However, is there an alternative to longtable?

To illusturate, what i need is, transforming the following

What longtable does

to this one:

What i want

Thanks in advance.

PS: Bold lines of the figures are the borders of the longtable. Note that there are only one longtable which contains 4 rows and 2 columns :)

PS2: I cannot add more rows since i'm using an environment template

  • I couldn't find an answer on that post. If it cannot be done by longtable, then I need some other package to simulate it. That's why I also asked an alternative for longtable :) – Alper Dec 7 '12 at 15:34
  • Since you have only one column of data: are you using the table to draw the frame around the text or is there some other use? If it's to draw the frame, you can use mdframed package along with minipage to set the width. Something like: \begin{minipage}{10cm} \begin{mdframed} text to frame \end{mdframed} \end{minipage} – mythealias Dec 7 '12 at 15:55
  • Oh I'm really sorry that the figures are misleading. I have 2 columns. However, thanks for your suggestions, if I find a way to put them next to each other, i may use it. – Alper Dec 7 '12 at 15:58
  • As pointed out in the answers to other question; other than manually breaking the table, I don't think there is a way to do it. – mythealias Dec 7 '12 at 16:03
  • @Alper May be a tabbingenvironment can be used. You lose the automatic running header, but you will have correct page brakes and the text lines up. – Sveinung Dec 7 '12 at 16:04

You will have essentially the same problem with any table package, and need to break the table by hand. The problem as described in the question is very underspecified really and that's one of the problems. (The other problem is that the (lack of) features in the underlying \halign primitive would make it hard to mechanise this even if it were fully specified what was required.

Your images show a single column which vastly simplifies things. If you have paragraph text in a column then basically you could hope to break after the last line that fits on the page, but what about the adjacent cells in other columns? they may be text or images or any other TeX material, longtable really doesn't know what is in each cell, it is just an unbreakable box of content.

So it has to be up to the author really to manually decide how to split a given row up into multiple rows that allow page breaking at a suitable point.

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