macro to convert "hard" endnotes into footnotes or

Get help using and writing Nisus Writer Pro macros.
Post Reply
economics
Posts: 16
Joined: 2005-05-02 11:31:06
Location: Lexington, VA

macro to convert "hard" endnotes into footnotes or

Post by economics »

This takes a document with in-text references to notes of the sort [##] with the notes numbered at the end of the document, and converts them into "real" endnotes. I've not set it up with a loop, so that I can watch just in case it misses one - I just set a function key and hit repeatedly. Easy to change the Insert:Endnote to Insert:Footnote. Likewise it can be adapted if there is some other systematic reference style (though the chance of error increases if the text uses parentheses, I've not checked that permuation).

Nothing sophisticated, but it gets the job done.

Switch to Clipboard 1
Find 'Notes\n\[[[:digit:]]+\] .+\n', 'E'
Select Start
Find and Replace '\[[[:digit:]]+\] ', '', 'E'
Switch to Clipboard 2
Find '.+\n', 'E'
Edit:Copy:Copy
Insert Text
Select Start
Switch to Clipboard 1
Find and Replace '\n', '', 'E'
Select All
Select Start
Find and Replace '\[[[:digit:]]+\]', '', 'E'
Insert:Endnote
Switch to Clipboard 2
Edit:Paste:Paste
Switch to Clipboard 1
Find and Replace '\n', '', 'Eb'
Select Note Reference 1
Select All
Select Start
Post Reply