I have a book, which is basically a 100-page table. I use xtab package to layout this book.

The book has a list of 100-ish definitions, which are referenced multiple times in the table. Think of a bank commission table, where there are many footnotes referenced multiple times, eg. 1) for this thing You need to have a gold credit card, 2) for this thing You need to have $1M in Your account, etc.

The numbering of the definitions is fixed (Say, this is a legal document). The definitions can have arbitrary numbering (like "1", "W" , "III").

What I want to be able to do, is for each of the definitions that are referenced on the page have them appear as footnotes (or something that resembles footnotes visually). Is this doable? Or at least partially doable?

  • 1
    Is longtable an option? I think xtab uses supertabular internally, and possibly longtable is better at footnote, or at least I might be better at coercing longtable to do footnotes than supertabular – David Carlisle Jul 2 '12 at 12:18
  • @DavidCarlisle I have not tried longtable yet, but yes, it seems like an option. The arbitrary numbering requirement seems to be the most important blocker. – maniek Jul 2 '12 at 12:33
  • 2
    @maniek Please, give us an example of one or two pages. I'm asking myself, where would you like to put the footnotes, as the tabular filles the whole page . . . – Keks Dose Jul 2 '12 at 12:36
  • @maniek -- it seems to me that, rather than thinking of these as footnotes, they might be thought of as part of a running footer. the problem then becomes how to omit the ones that aren't referenced on the page. could the format be matched simply with \tabbing? if so, then repeating column heads could probably be handled as part of a running head, and footnotes would work (though you'd have to avoid repeating any). (i've done this sort of thing with plain tex, but never with latex, where you're more constrained.) – barbara beeton Jul 2 '12 at 13:14

So this lists A and i on the first page and i and w on the second, just listing once each, in the order of definition. It takes the page numbers for which cite to use on each page from the previous run so will take a couple of runs to settle down.

enter image description here


\def\foopage#1#2{\global\expandafter\let\csname foopage-#1-#2\endcsname\@empty}



\expandafter\ifx\csname foopage-\tmp-\thepage\endcsname\@empty
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
    \textsuperscript{\tmp}\csname foo-\tmp\endcsname}%

% add the insert loop



\foodef{A}{Something about A.}
\foodef{i}{Something equally dull about i.}
\foodef{w}{In case you missed $x$ $y$ and $z$, here's $w$.}


| improve this answer | |
  • This is a wonderful sorcery, thank You very much! works GREAT! – maniek Jul 2 '12 at 16:42
  • I found a glitch with this solution. Sometimes the document never stabilizes. A row jumps between 2 pages on subsequent compilations (and the footnotes don't match the table). Here is an example (I just moved around the citations from Your solution, and expanded a definition). Is there a fix for this? – maniek Oct 26 '12 at 10:11
  • The link in your comment is broken should be pastebin.com/0QEjCKXq I guess. There is always a fix for anything but probably don't have time today, ping me again if nothing appears in a day or so – David Carlisle Oct 26 '12 at 10:16

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.