Insert footnote in Table?

Everything related to our flagship word processor.
Post Reply
Frank Einstein
Posts: 26
Joined: 2004-12-23 21:53:45

Insert footnote in Table?

Post by Frank Einstein »

Is it possible to insert a footnote into text within a table?
adryan
Posts: 563
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Insert footnote in Table?

Post 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
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
Frank Einstein
Posts: 26
Joined: 2004-12-23 21:53:45

Re: Insert footnote in Table?

Post 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?
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Insert footnote in Table?

Post 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.
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Insert footnote in Table?

Post 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 827 times
philip
dieterjp
Posts: 5
Joined: 2008-02-09 23:31:46
Location: Tokyo

Re: Insert footnote in Table?

Post 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)
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Insert footnote in Table?

Post 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.
philip
dieterjp
Posts: 5
Joined: 2008-02-09 23:31:46
Location: Tokyo

Re: Insert footnote in Table?

Post 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
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Insert footnote in Table?

Post 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
philip
Post Reply