# Lyx drop-in table replacement to allow table footnotes

I want to be able to use footnotes in LyX while preserving the LyX table structure. Any way to force LyX to use a different environment for its built-in tables that allows that? I.e. some code to put in the preamble.

This page recommended longtabular (couldn't find it anywhere) or tabu.

Edit: I tried to use the approach in this question to replace tabular with tabu, but it seems to get pdftex stuck in an infinite loop.

% Replace tabular with tabu.
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\renewenvironment{tabular}{\tabu}{\endtabu}


Edit 2: As it has been indicated that tabu is unreliable/unmaintained, any other environment you would recommend for this purpose?

-
The topic ID is invalid. –  Dan Apr 5 '13 at 12:15
–  egreg Apr 5 '13 at 12:21
You can try the package ftnxtra: ctan.org/pkg/ftnxtra –  Marco Daniel Apr 5 '13 at 12:36
Or you use threeparttable: ctan.org/pkg/threeparttable –  Marco Daniel Apr 5 '13 at 12:39

Let me provide a small answer

Avoid the packag tabu

The current version of tabu is 2.8 release. However the author wants to upload a new version whereby most of the current commands will be invalid.

The author wrote at comp.text.tex: Bug in tabu with scantokens (GL, please fix)

Well, to be honest, the time of bug reports will come with the next release. I'm just implementing the \multirow feature, and I have to say that the current available code is very far from what i'm working on now.

That means the current version is completely unmaintained.

-
Thanks, I wasn't initially aware. I changed my question to what I'm actually interested in, how to make footnotes work automatically in LyX tables. –  Dan Apr 5 '13 at 12:32

Please try to avoid tabu. As stated by jon here:

I would recommend staying away from tabu as the package author is still fiddling with things and explicitly promised that there would not be backwards compatibility. See here for the discussion.

If you are trying to get the 'X' funcionality of tabularx with the breakable option of longtable, Alan Munn recommends using the ltxtable package (link to CTAN), written by David Carlisle (see here).

Other thing you can do is still use tabularx, put it inside a table environment and reduce its size. You can always rotate it 90 degrees to get a more space.

Thanks! Does ltxtable support table footnotes out of the box? –  Dan Apr 5 '13 at 12:34
(This way the built-in "LyX table editor" is still used, and the tabular environment is replaced by the longtable environment.)