Page 1 of 1

Insert footnote in Table?

Posted: 2020-11-19 16:37:16
by Frank Einstein
Is it possible to insert a footnote into text within a table?

Re: Insert footnote in Table?

Posted: 2020-11-19 23:05:40
by adryan
G'day, Frank et al

No — and yes.

It could be regarded as a — ahem! — anticipated feature.

Pending that glorious day, Philip has written a Macro called "Table Footnote". I found a copy in the Editing set of the Macros folder, but I'm not sure how it got there. I can't find it on the Nisus sites, so maybe it's bundled with the application these days. I could post a copy on a Forum, but it's probably better if Philip gets a chance to review it first. The version I have dates from 2017.

Cheers,
Adrian

Re: Insert footnote in Table?

Posted: 2020-11-20 09:06:46
by Frank Einstein
Thanks for your response. I have never used a macro in NW, but am willing to try. Where is this one available?

Re: Insert footnote in Table?

Posted: 2020-11-20 09:33:37
by martin
I believe this forum post from Philip includes the "Table Footnote" macro mentioned by Adrian. If you've never used a macro before, you might read our instructions on how to install a macro.

Re: Insert footnote in Table?

Posted: 2020-11-20 19:45:05
by phspaelti
To help avoid the need for everyone to revisit those threads full of revised versions of the macro, I can post the most recent version. Please report any problems.
Table Footnote.nwm
(26.11 KiB) Downloaded 999 times

Re: Insert footnote in Table?

Posted: 2023-06-16 15:17:04
by dieterjp
phspaelti wrote: 2020-11-20 19:45:05 To help avoid the need for everyone to revisit those threads full of revised versions of the macro, I can post the most recent version. Please report any problems.

Table Footnote.nwm
Dear Philip,

thank you for posting your macro. Unfortunately, in my case, I get the message that there is an error in line 67, and "The given character index (20910) is out of bounds for the Text object (length 20909)."

Is that in any way useful?

Kind regards,
Dieter (also in Japan)

Re: Insert footnote in Table?

Posted: 2023-06-17 01:45:23
by phspaelti
Hello Dieter,
I'm sorry for the trouble.
Let me try to understand the situation. You are using the macro to insert a footnote in a table, and you are getting the stated error message. Does this happen for you consistently, or only in certain cases?

I must admit that at the referenced location in the macro, the macro probes a calculated location in the file without checking if this is safe, so obviously this could lead to an error. I could add a protective test, but without knowing what the issue is, this would just cause the macro to end and report an error, which would not be an improvement over what it does now.

The only way I can reproduce the error myself is if
  • I have the table at the very end of a file
  • The table already contains at least one footnote
  • I first mess with the hidden footnote references after the end of the table. This would however cause one of the footnote markers in the table to show as [reference missing] which should be pretty obvious
If this is the case you should be able to get the error to go away by just adding some text (a few spaces or returns should suffice) at the end of the document.

So if you could perhaps send me a (short sample) file where this happens, or at least describe in some more detail in what type of circumstance this occurs.

Re: Insert footnote in Table?

Posted: 2023-06-19 15:25:12
by dieterjp
Dear Philip,

thank you very much for your reply.

I copied a few cells from my table into a new table, added some returns at the end, and: it worked!!

So I am going to play a bit more with my original table.

Thank you so much for your help,
Dieter

Re: Insert footnote in Table?

Posted: 2023-06-20 01:10:40
by phspaelti
Dear Dieter,
Thank you for the update. If you do find a situation where the macro misperforms and gives you such messages, please feel free to send me the relevant file and I will try to improve the macro.
Best
Philip