5

I'm using LyX. I created a box/minipage and put a table in it, so as to allow footnotes in the table (see here: How to put notes under table in LYX). I am using manyfoot for footnotes and tried allowing it to number itself, but it didn't number the footnotes the way I needed them to be:

enter image description here

I fixed this by manually specifying the footnote numbers, like this: \footnoteA[1]{This is a footnote.} and this worked in terms of the numbering in the table, but now there's an issue with the way the footnotes are listed at the bottom of the page:

enter image description here

Is there a way to fix this? I'm using LyX with the document class KOMA-Script Book.

Thank you for any suggestions or help you can provide! - J.D.

  • the footnotes are numbered -- and listed -- in the order in which latex encounters them. since the first row of the table is read in before the second row, that is the order in which the footnotes will be processed. this has nothing to do with lyx. (but i don't have an easy answer for how to get the result you want.) – barbara beeton Mar 6 '16 at 1:38
  • I was able to get footnotes to function with a table using the \footnotemark[1] and \footnotetext[1]{Here is the footnote text.} commands with inline code. But, this didn't work with the box/minipage. I had to delete that container and then it would work. It's a bit difficult even coming to this conclusion, because another thread had said that a box/minipage was needed to enable footnotes for a table. Source: en.wikibooks.org/wiki/LaTeX/… – J.D. Mar 6 '16 at 2:28
  • 1
    unfortunately, the latex wikibook contains quite a bit of invalid or out-of-date information. i haven't looked at that section, but it's on my wish list to get that wikibook updated and corrected. and yes, juggling \footnotemark and \footnotetext can most likely be made to produce a visually acceptable answer, but i'd have to experiment to determine whether such foonotes could be hyperlinked properly; however it's done, the code would be ugly. – barbara beeton Mar 6 '16 at 2:42
  • The end use of this project is not a .pdf, but a printed book. So, while the hyperlinks do work with normal footnotes, and don't work with these, it won't negatively effect the project I'm doing. (Though that issue is worth noting for users who do intend to have a .pdf as one of their target formats.) As for the code being ugly, perhaps that may be the case in a source-code editor, but in LyX, it's actually more visually-appealing this way. I'm not sure that there is an answer for the original question I asked, but this does solve the visual problem I was having. – J.D. Mar 6 '16 at 3:35
  • if you have found an approach that gives the result you want, you can add a self-answer. please be sure to mention that it is good only for a printed document. – barbara beeton Mar 6 '16 at 18:12
2

Note: This answer does not preserve hyperlinks from superscript numbers to footnotes. This means that while this is a viable answer for printed materials, those aiming to make a working .pdf may not be satisfied with this answer.

These instructions are made with LyX in mind. If you are using another editor, you may have to make some adjustments.

  1. Create and fill the table (no box/minipage is necessary)
  2. Where you want to add a footnote, press Cmd+L to enter inline code. (This works for LyX on Mac, the shortcut will be different for LyX on Windows/Linux. In this case, if you don't know the shortcut, you can find a button on the toolbar marked "TEX" or go to the menu: Insert > TeX Code)
  3. Enter \footnotemark[1] -- where 1 is the number that will be displayed in superscript.
  4. Below the table (or somewhere else, if you so desire) enter the inline code: \footnotetext[1]{This is the footnote text.}
  5. For further footnotes, increment the number in the square brackets like so \footnotemark[2] and \footnotetext[2]{This is a second footnote.}

Here are some solutions to common problems:

Problem: Cannot enter code into the table. This can happen if you copied and pasted 'Verbatim' style text into the table, which does not allow entering inline code. To get around this, you can either undo entering the text into the table, style it with another style, then put it back in the table. Or, you can create the \footnotemark[1] code outside the table, cut/copy it and then paste it where you want in the table.

Problem: Styles don't work in the inline code. LyX users don't (necessarily) spend a lot of time editing code, but this is what LyX is really made of -- go to View > Source Pane to see what I mean. You will need to enter the code to change the appearance of the footnote text rather than being able to use shortcuts or menus to style it. \emph{text with emphasis} adds emphasis to the text in the brackets. To discover how to style things further, or add things like citations, go to View > Source Pane and examine some of the document you've already written. If you want your footnote to have certain citations or attributes, you can write that text outside of the inline code box and then view the source to see how to reproduce it in the inline code box. I found this helpful when learning code, but if this is too complex or confusing, there are also tutorials available online: on LyX: http://www.fnal.gov/docs/products/lyx/UserGuide.tex.html on LaTeX: https://en.wikibooks.org/wiki/LaTeX on TeX: https://en.wikibooks.org/wiki/TeX

I hope others may find this useful. As I said, it doesn't completely fix things, as hyperlinks aren't present, but for appearances, it certainly works. - J.D.

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.