Opened 21 years ago

Closed 6 years ago

Last modified 6 years ago

#808 closed enhancement (fixed)

Footnote text inside tabular is not printed in LaTeX

Reported by: michael.gerz@… Owned by: Richard Heck
Priority: normal Milestone: 2.3.0
Component: latex export Version: 1.3.7
Severity: normal Keywords:
Cc: Uwe Stöhr, adamp@…, mdovrat@…, Georg Baum, Scott Kostyshak

Description (last modified by Richard Heck)

If a footnote is used inside a tabular which is 1) outside floats 2)
not in a minipage 3) no long-tabular, the following two lines have to
be inserted to the preamble (according to Dekel):

\usepackage{footnote}
\makesavenoteenv{tabular}

Else you get a footnote symbol but no footnote text.

Attachments (1)

footnote.lyx (1.0 KB ) - added by michael.gerz@… 21 years ago.
Test case

Download all attachments as: .zip

Change History (58)

comment:1 by levon, 21 years ago

attach test case please

by michael.gerz@…, 21 years ago

Attachment: footnote.lyx added

Test case

comment:2 by michael, 21 years ago

Reproduced by me with todays cvs.

comment:3 by levon, 21 years ago

Summary: Footnote text is not printed in LaTeX outputFootnote text inside tabular is not printed in LaTeX

comment:4 by Lars Gullik Bjønnes, 19 years ago

Owner: changed from dekel to nobody@…

comment:5 by Lars Gullik Bjønnes, 19 years ago

Milestone: 1.4.0
Status: newassigned

I am only going to fix this for 1.4.0

comment:6 by Lars Gullik Bjønnes, 19 years ago

Status: assignednew

comment:7 by José Matos, 19 years ago

Milestone: 1.4.01.5.0
Severity: normalenhancement

Maybe Lars will fix it in 1.5. ;-)

comment:8 by levon, 19 years ago

Milestone: 1.5.01.4.1

Fixable in 1.4.1...

comment:9 by Uwe Stöhr, 18 years ago

Version: 1.3.0cvs1.3.7

comment:10 by lasgouttes, 18 years ago

Milestone: 1.4.11.4.2

It seems nobody is going to do it.

comment:11 by lasgouttes, 18 years ago

Milestone: 1.4.21.4.x

comment:12 by adamp@…, 18 years ago

I'm using Lyx 1.4.2 on Gentoo linux and have the same problem.

I'm using book (koma script)
I've created a Table Float-object
I've inserted a Table (6x6)

I've 5 Footnotes in the left column (numbered 1 to 5) and a Footnote in the
normal Text outside the Table (Footnote 6)

  • at the bottom of the page only Footnote 6 is visible, the others are gone.

Is that fixable for me? or is there a workaround?

I already tried to paste the two lines from first post in the preamble but that
didn't work, LateX can't compile the file then.

comment:13 by Georg Baum, 18 years ago

Then you may not have the footnote package installed, get it e.g. from ctan and
install it according to the package installation instructions of your TeX
distribution. If you post the error message here we may be able to help you.

comment:14 by adamp@…, 18 years ago

I Think you didn't get my point.

There is no error message.

Footnotes work - except in the table.

I made a Screenshot showing the problem, get it here:

http://home.arcor.de/fieserkiller/footnotes.jpg

You see, theres a footnote before the table, 5 notes in the table and one after.
only the notes befor and after are shown, not the ones in the table

comment:15 by adamp@…, 18 years ago

Cc: adamp@… added

comment:16 by Georg Baum, 18 years ago

I don't understand what you did. It is known that footnotes in tables do not
work out of the box, neither in LyX, nor in LaTeX. Your screenshot shows the
expected result. Until this bug is fixed and LyX has native support
for footnotes in tables you have to put these two lines in the preamble:

\usepackage{footnote}
\makesavenoteenv{tabular}

If that results in an error message as you wrote in comment 8 then most
probably something with your LaTeX setup is wrong, e.g. the footnote package is
not installed. If you don't tell us the error message and do not give a minimal
example file it is impossible to guess what went wrong.

comment:17 by adamp@…, 18 years ago

Sry, I'm a moron.

This time I made a few more screenies ;)

First, my preamble:
http://home.arcor.de/fieserkiller/lyxfehler/preamble.jpg

Then, I press CTRL+D to compile and view as dvi. This three errors occur:
http://home.arcor.de/fieserkiller/lyxfehler/error1.jpg
http://home.arcor.de/fieserkiller/lyxfehler/error2.jpg
http://home.arcor.de/fieserkiller/lyxfehler/error3.jpg

And I created a Testfile, it contains only the preambel and the word "test":
http://home.arcor.de/fieserkiller/lyxfehler/testfile.lyx

Thanks for getting into that, Georg.

comment:18 by Georg Baum, 18 years ago

The test file compiles fine here. Does it give the same errors as your original
file on your box? If yes, then your TeX installation is broken and this is no
LyX bug. If not, send a test file that shows the error.

comment:19 by adamp@…, 18 years ago

Thx for the Info, i found out that the bug is caused by the used Documentclass.
Using "Book (koma-script)" gives me errors complaining about
\makesavenoteenv{tabular}, using eg. "book" there are no errors, the site
renders fine with the table's footnotes.

Is there something i can do to somehow keep on using koma-script? i like that
style.

comment:20 by adamp@…, 18 years ago

ok problem fixed.
I just found out that Koma-Script is pretty old in the gentoo latex-package.
Just downloaded and installed the newest, it works :)

comment:21 by Uwe Stöhr, 17 years ago

Cc: uwestoehr@… added
Resolution: fixed
Status: newclosed

Works now in LyX 1.4.4 and 1.5.0beta1.

comment:22 by Juergen Spitzmueller, 17 years ago

Resolution: fixed
Status: closedreopened

Works now in LyX 1.4.4 and 1.5.0beta1.

No, it doesn't. With neither version.

comment:23 by Uwe Stöhr, 17 years ago

Subject: Re: Footnote text inside tabular is not printed in LaTeX

Works now in LyX 1.4.4 and 1.5.0beta1.

No, it doesn't. With neither version.

It definetively works here:

  • open the attached LyX-file
  • add

\usepackage{footnote}
\makesavenoteenv{tabular}
to the preamble as described in command 0

and it works.

comment:24 by Georg Baum, 17 years ago

That has been working from the beginning. This bug is about LyX not putting
these lines automatically in the preamble if they are needed. What Adam
described inbetween is something not related.

comment:25 by Juergen Spitzmueller, 17 years ago

Georg, what about your fix? Do you think it's ready for 1.4.5 and trunk?

comment:26 by Georg Baum, 17 years ago

As I wrote some testing by other pople than me would be good, but it works for
me.

comment:27 by Juergen Spitzmueller, 17 years ago

Cc: scaltro@… added

comment:28 by Juergen Spitzmueller, 17 years ago

* #3753 has been marked as a duplicate of this bug. *

comment:29 by Richard Heck, 17 years ago

Milestone: 1.4.x1.5.x

Moving all bugs targeted to before 1.5.0 to 1.5.x.

If these are yours, please check that they have not been fixed and, if so, close
them.

Otherwise, sorry for the spam.

comment:30 by Juergen Spitzmueller, 16 years ago

Cc: mdovrat@… added

comment:31 by Juergen Spitzmueller, 16 years ago

* #4569 has been marked as a duplicate of this bug. *

comment:32 by Juergen Spitzmueller, 16 years ago

Milestone: 1.5.x1.6.x

1.5.x is frozen. Shifting all 1.5.x-targetted bugs to 1.6.x.

If you have reported this bug, please verify if it still occurs in 1.6.0 and
close the report, if not.

comment:33 by ps, 15 years ago

Priority: highlow

comment:34 by Richard Heck, 13 years ago

Cc: Georg Baum added
Description: modified (diff)
Milestone: 1.6.x2.0.x

Georg, did you have some kind of fix for this somewhere? A patch for validate()?

in reply to:  34 comment:35 by Georg Baum, 13 years ago

Replying to rgheck:

Georg, did you have some kind of fix for this somewhere? A patch for validate()?

Yes. Search the devel list archives for "[patch] fix bug 808". There was a discussion, since the fix did not work in all cases, but I do not understand the details anymore. Meanwhile there is also hardcoded stuff for footnotes in floats (search for "NeedLyXFootnoteCode" in the code), that probably interferes with my patch. IMO this hardwired LaTeX coded should be removed, and replaced with something that loads the proper package(s).

comment:36 by Richard Heck, 13 years ago

Owner: changed from nobody@… to Richard Heck
Status: reopenedassigned

comment:37 by Richard Heck, 10 years ago

Component: exportconverters

comment:38 by Richard Heck, 10 years ago

Milestone: 2.0.x2.1.x

LyX 2.0.8 is released, so all 2.0.x bugs are being retargeted to 2.1.x. If this is your bug, please check whether the 2.1.x milestone makes sense and, if not, remove it.

comment:39 by Richard Heck, 10 years ago

There is a patch from Georg that fixes the NeedLyXFootnoteCode problem here: http://marc.info/?l=lyx-devel&m=133702481900940&w=2. It seems to have gotten lost a while back. Georg, do you want to commit that patch? Then perhaps we can address this issue.

There were a couple of small comments by me and JMarc that followed that patch, but it generally looked good.

comment:40 by Uwe Stöhr, 10 years ago

Cc: Uwe Stöhr added; uwestoehr@… removed
Keywords: patch added

in reply to:  39 ; comment:41 by Georg Baum, 10 years ago

Replying to rgheck:

There is a patch from Georg that fixes the NeedLyXFootnoteCode problem here: http://marc.info/?l=lyx-devel&m=133702481900940&w=2. It seems to have gotten lost a while back. Georg, do you want to commit that patch? Then perhaps we can address this issue.

There were a couple of small comments by me and JMarc that followed that patch, but it generally looked good.

The patch is still in my stash, so I did not forget it, but I'll need to find some time to address the comments and test the whole thing again.

in reply to:  41 comment:42 by Georg Baum, 9 years ago

Replying to baum:

The patch is still in my stash, so I did not forget it, but I'll need to find some time to address the comments and test the whole thing again.

It is now in: [0bf8b8a1d234/lyxgit], but I do not plan to work on this bug at the moment, so feel free to adapt my patch in http://marc.info/?l=lyx-devel&m=115927061429897&w=2 to the current code base.

comment:43 by Juergen Spitzmueller, 9 years ago

Somewhat related: #9387.

comment:44 by Scott Kostyshak, 9 years ago

Component: converterslatex export

comment:45 by Richard Heck, 8 years ago

Milestone: 2.1.x2.2.x

Moving all 2.1.x bugs to 2.2.x. Feel free to triage....

comment:46 by Richard Heck, 8 years ago

The patch from Georg is here.

comment:47 by Juergen Spitzmueller, 6 years ago

Same problem exists in longtable headers/footers (see #5869). The proposed fix should be extended to cover this.

comment:48 by Juergen Spitzmueller, 6 years ago

Milestone: 2.2.x2.4.0

We should finally address this after all those years.

comment:49 by Richard Heck, 6 years ago

Apparently, there are some limitations to this sort of approach. See
https://tex.stackexchange.com/questions/109467/footnote-in-tabular-environment
There is apparently now a tablefootnote package that offers a number of additional options. Perhaps that would be better?

comment:50 by Juergen Spitzmueller, 6 years ago

The two package are orthogonal. Tablefootnotes only works in floats, the footnote package only outside. I have a working patch for the latter, which I will commit to master soon; but we should add support for the former as well.

comment:51 by Juergen Spitzmueller, 6 years ago

Cc: Richard Heck Scott Kostyshak added

Fixed in master for non-float tables at [3affde3957ff29fb05/lyxgit]

Candidate for 2.3.x.

comment:52 by Juergen Spitzmueller, 6 years ago

Milestone: 2.4.02.3.1
Status: assignedfixedinmaster

Fixed in master for floating tables at [5017a0a1c635/lyxgit]

This is also a candidate for 2.3.x.

comment:53 by Uwe Stöhr, 6 years ago

Milestone: 2.3.12.3.0
Priority: lownormal
Severity: minornormal

Many, many thanks Jürgen!

This feature was often requested and it could be implemented without a fileformat change. so Scott, I propose to have new functionalities like this one in before 2.3.0 because this requires also some adaptions to the manuals and wiki pages. I mean people will wonder why in LyX 2.3.1 footnotes will appear but at the colleague's computer with LyX 2.3.0 it won't.

I also don't think it is a good idea to wait for LyX 2.4. So would you allow to put the 2 footnote-related patches from Jürgen in for LyX 2.3.0RC2?

comment:54 by Scott Kostyshak, 6 years ago

Jürgen, if you're confident enough go ahead for 2.3.0.

comment:55 by Juergen Spitzmueller, 6 years ago

Keywords: patch removed
Status: fixedinmasterfixed

Backported to 2.3.x for non-floating tables and longtable headers at [c2d121f663b2/lyxgit], for floating tables at [55bc365872105/lyxgit].

comment:56 by Richard Heck, 6 years ago

Cc: scaltro@… Richard Heck removed

comment:57 by Richard Heck, 6 years ago

Resolution: fixed
Status: fixedclosed

LyX 2.3.0 is released.

Note: See TracTickets for help on using tickets.