Reply to topic  [ 11 posts ] 
a very useful function in the tables 
Author Message

Joined: 2017-05-01 23:38:06
Posts: 3
I am obliged to be used to me as MS Word when I work on tables, with on the left a text, on the right his translation. And that only because Nisus, not that of 2001, that of 2017, does not make it possible to insert footnotes, or endnotes in the text of the tables..
Thus, I cannot make use only of Nisus, like “front”. And this is very irritating: obliged to have a MS Word beside Nisus “the strong”! :x
When this function will be implemented?


2017-05-01 23:49:19
Profile

Joined: 2012-12-19 05:02:52
Posts: 224
Hi jdevriendt,

I understand your frustration over not being able to enter footnotes in tables.
Meanwhile, you could enter numbers in superscript. Below the table, enter note references with text color white (so the true note references will be invisible.)

If you use "Note references color" you will be able to see them in the document, but they won't be printed. See Preferences > Appearance > Customizable colors > Automatic Text > Note references.

If you decide to use this method, then a macro can be written to enter the fake superscript note references in the table.

Attachment:
2.png
2.png [ 91.14 KiB | Viewed 1716 times ]


Last edited by Þorvarður on 2017-05-03 12:39:11, edited 1 time in total.



2017-05-03 07:58:51
Profile

Joined: 2012-12-19 05:02:52
Posts: 224
Philip Spaelti wrote a macro called "Table Footnote." You can find it here.
https://nisus.com/forum/viewtopic.php?f=18&t=2442&p=25945&hilit=Macro+Table+Footnote#p25945

There is a long thread about the problem here:
https://nisus.com/forum/viewtopic.php?f=18&t=2442&hilit=Macro+Table+Footnote

In the year 2012 an official Nisus person wrote here in the forum:
"At this time we don't have any news to announce about this enhancement request, but we know it's important."
https://nisus.com/forum/viewtopic.php?f=18&t=2442&hilit=footnotes+tables+but+we+know+it%27s+important#p22886

Although they know it's of great importance to their customers, it's obviously not very important to them. :cry:


2017-05-03 08:38:02
Profile

Joined: 2012-12-19 05:02:52
Posts: 224
I don't know if this has been already addressed. The macro "Table Footnote" generates an error if more than 1 footnote is inserted into a cell.

The error message reads:
"There was an error on line 68 in the macro "Table Footnote". The TextSelection object does not have a "location" property.

And when I click on the Open Macro button, I get this error message:
There was an error on line 68 in the macro "Table Footnote". The variable "$txtSel" has not been defined.

The line causing the trouble is highlighted:
if $tblNoteRefs[$i].locaton < $txtSel.location


2017-05-03 09:39:23
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Þorvarður wrote:
I don't know if this has been already addressed. The macro "Table Footnote" generates an error if more than 1 footnote is inserted into a cell.


Thanks Þorvarður for reporting this. This bug is something that was supposed to have been fixed 3 years ago. I'm not sure how the macro has survived all these years in the the state it was. Maybe the many who downloaded it over the years simply decided it was worthless and moved on :)
I have replaced the broken one with a fixed version. Hope this works better. If there are still problems, feel free to report it.

_________________
philip


2017-05-15 01:12:04
Profile

Joined: 2012-12-19 05:02:52
Posts: 224
phspaelti wrote:
If there are still problems, feel free to report it.

Thank you Philip for looking into this.

Unfortunately the numbers (i.e. the cross-references) in the table are not yet in correct order. When a third footnote is inserted, the natural progression begins to spin out of control. The numbers "2" and "3" are swapped, so that we get this:
Attachment:
3.png
3.png [ 16.71 KiB | Viewed 1555 times ]

After 7 footnotes, we end up with this:
Attachment:
7.png
7.png [ 22.56 KiB | Viewed 1555 times ]


2017-05-17 01:11:43
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Þorvarður wrote:
Unfortunately the numbers (i.e. the cross-references) in the table are not yet in correct order. When a third footnote is inserted, the natural progression begins to spin out of control.

Yes, apparently my macro was completely off. Try this new version. Hopefully this should work better. I also changed the "hiding" of the intermediary (true) reference numbers by using a paragraph style.


Attachments:
Table Footnote.nwm [24.37 KiB]
Downloaded 45 times

_________________
philip
2017-05-22 01:11:19
Profile

Joined: 2012-12-19 05:02:52
Posts: 224
phspaelti wrote:
Try this new version.

Now I can't insert anything at all because I get this error message:
Attachment:
1.png
1.png [ 31.63 KiB | Viewed 1453 times ]

The culprit is this line:
if $doc.text.characterAtIndex($fnLoc + $numFound) != 10


2017-05-22 23:41:21
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Þorvarður, I know. Sorry about that. Just make sure to add a return after the table. As it is the table can't be the last thing in the document.

This is all due to the 'hiding' thing. Since I switched to using a paragraph style for hiding the note references at the end of the table, the macro has to insert a "protective" return to make sure the paragraph style doesn't hide all the text following the table. I first forgot to test the case where there is nothing after the table before uploading the macro. And then when I noticed it and tried to fix it, I ran into other issues (which have nothing to do with the macro itself). Basically Nisus seems to have some buggy behavior with returns and styles after a table, but I just don't have the time right now to investigate this.

And I figured you would notice that pretty quickly :)

So just make sure to put a return after the table before you run it. For the time being.

_________________
philip


2017-05-23 05:42:12
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
On second thought, here is a macro with a simple fix that avoids the error message. But note you will have to adjust the styles yourself after you run the macro. I'm not fixing that right now.


Attachments:
Table Footnote.nwm [24.85 KiB]
Downloaded 46 times

_________________
philip
2017-05-23 06:06:27
Profile

Joined: 2012-12-19 05:02:52
Posts: 224
phspaelti wrote:
here is a macro with a simple fix

Philip, it seems you have provided an excellent solution to a long-standing problem that Nisus Software obviously didn't care to solve. Congratulations! Both macros work well, as far as I can tell. In v.2 one has to remember to insert a return after the table, and in v2.1 the user doesn't have to bother about that anymore. Well done! 8) 8) 8)


2017-05-25 20:12:23
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software