19

I have a fixed-column long table, with much text inside, that spans about three pages. I set it using the supertabular package, and for the most part it is working (I will still have to go back to manually tweak a few things once the document is complete). However, I sometimes wonder if longtable would have been a better choice.

Looking for troubleshooting tips for tables in this site, I noticed that there are a little over three times as many questions tagged for longtable than there are for supertabular. I could speculate that this is either because supertabular has fewer undesirable side-effects or because longtable is the preferred package, therefore more people will have problems with it. I have tried them both, and by putting enough time into them I have gotten the desired results; however, the question still nags me: which one is the right one (or the better one) for which type of long-table?

Ricardo
  • 3,186
  • 4
    If you're happy with columns changing width across pages, then supertabular can be for you. :) – egreg May 09 '12 at 15:11
  • I don't mind that much, as long as they stay the same width in that page. The document I'm working on is already pre-specified to be as ugly as possible, so I don't think those reading it will mind either. – Ricardo May 09 '12 at 15:13
  • 3
    Why don't you try longtabu from tabu? –  May 09 '12 at 15:45
  • @HarishKumar, I didn't even know that was an option! It also seems to get less love than supertabular here. – Ricardo May 09 '12 at 16:08
  • There is a question that compares variuos table packages. Unfortunately I can't locate it now. That answer (by Stefan Kottwitz, I think) is exhaustive in nature and good. –  May 09 '12 at 16:13
  • 1
    as @HarishKumar, I would also suggest you look at longtabu. I am not entirely sure what you mean about it getting "less love than supertabular". – ArTourter May 09 '12 at 16:58
  • 2
    IIRC longtabu uses longtable internally. – cgnieder May 09 '12 at 17:01
  • 1
    @cgnieder: True, but with more features than longtable. –  May 09 '12 at 17:04
  • @ArTourter, I meant that it is under-represented in the questions in this site, more so than supertabular. Either it's so good that it causes no problems or not a lot of people use it. Without polling, there's no way to tell. – Ricardo May 09 '12 at 17:19
  • 1
    @HarishKumar, i think you mean this one: http://tex.stackexchange.com/questions/12672/which-tabular-packages-do-which-tasks-and-which-packages-conflict. I must have missed it the first time because I was focusing only on comparing longtable and supertabular. It recommends xtab over supertabular, but also states that longtable is "very popular". – Ricardo May 09 '12 at 17:32
  • 15
    If you use any of the mentioned packages other than longtable then any bug or problem reports don't go to me. That is a definite advantage of using those packages. – David Carlisle May 09 '12 at 18:49
  • @Ricardo: Yes, the same question. To be honest, I also use long table extensively. –  May 09 '12 at 22:58
  • @DavidCarlisle, that alone is enough to convince me to make longtable my package of choice. Could you phrase it as an answer to the original question so I may mark this as answered? – Ricardo May 10 '12 at 18:34
  • what about tabu? – skan Feb 21 '16 at 13:24
  • this was marked as a duplicate of a question about xtab which makes no sense so I voted to reopen – David Carlisle May 18 '16 at 22:23
  • Just in case some poor soul reads this thread of comments and decides to follow the numerous tabu suggestions: this package is unmaintained and usage currently not recommended. – ScumCoder Nov 19 '23 at 02:15

2 Answers2

19

Flippant comment moved to answer as requested:-):

If you use any of the mentioned packages other than longtable then any bug or problem reports don't go to me. That is a definite advantage of using those packages.

David Carlisle
  • 757,742
  • 8
    While you have my heartfelt thanks for all your work on LaTeX including longtable, I have to say that this answer is utterly unhelpful. – Gilles 'SO- stop being evil' May 18 '16 at 16:34
  • 3
    In contrast this is a useful answer. – Gilles 'SO- stop being evil' May 18 '16 at 16:39
  • @Gilles as it says it was a comment but the OP requested it be posted as an answer. It doesn't do you any harm, but I can probably survive with two less rep:-) – David Carlisle May 18 '16 at 17:47
  • 1
    @Gilles, this question predates the question you link to by about 1-1/2 years. At the time (and still now), it was helpful enough for me to request the comment to be made an answer and accept it. Unlike the question you link, that asks about the technical differences between two table packages, this one asks about use cases. Knowing that @DavidCarlisle is the maintainer of longtable and incredibly active in the community informed my decision to accept the answer. If you insist on marking it as a duplicate, refer to this question instead: http://tex.stackexchange.com/q/12672/3731 – Ricardo May 18 '16 at 19:25
  • I'm waiting for a starred version longtable* of longtable, that could work in onecolumn settings. – lRadha Dec 12 '22 at 10:41
  • longtable doc shows how to achieve that, there's a package that adds it. – David Carlisle Dec 12 '22 at 10:43
3

which one is the right one (or the better one) for which type of long-table?

Unfortunately, longtable issues a "longtable not in 1-column mode" error message when used in multi-column documents, while supertabular does produce multiple-column and/or multiple-page tables in such documents.

As a side note, on the other hand, supertabular breaks columns earlier than it should (thus leaving partially blank column bottoms). I've also tried xtab, which presents itself as "[...] an extension of the supertabular package and also reduces or eliminates some of its weaknesses." in its documentation, but the problem got worse, since xtab broke columns even earlier than where supertabular did.

cnaak
  • 131
  • 1
    I absolutely love longtable (thanks, David Carlisle!), but the "doesn't play nice with twocolumn/onecolumn settings made it unusable for me in one part of a very large document, and xtab, even with its own warts, came to the rescue. So the overall answer to OP's question might be "use both, each when it provides the thing you need." But the two/one column gotcha noted in this answer came as a big surprise to me, so I applaud its being mentioned here. [It's probably in the longtable documentation, but...that's a lot of reading to do and remember 5 years later.] – John Jul 06 '20 at 12:57
  • "that's a lot of reading to do" I found the longtable manual to be very concise and to the point.

    – ScumCoder Nov 19 '23 at 02:09