How would I go about making a macro to delete all footnotes? I want the markers in the main text gone and the associated text at the bottom of the page. Probably I should have one for endnotes, too, or just one that does both.
Thanks.
macro to strip out (delete) all footnotes
Re: macro to strip out (delete) all footnotes
My version of Nisus comes with a pre-installed macro in the macro menu: "NoteConversions > Convert Footnotes to Inline Snippets"
philip
Re: macro to strip out (delete) all footnotes
Well, Philip, mine apparently didn't. Under "Editing" in Macros I have "Convert Notes to text", but that's not what I want. I just want to totally eradicate them.phspaelti wrote:My version of Nisus comes with a pre-installed macro in the macro menu: "NoteConversions > Convert Footnotes to Inline Snippets"
Re: macro to strip out (delete) all footnotes
Sorry, I misread what you wanted. If you want to remove the notes completely that is very easy. Put a Note marker in the find window, and nothing in the Replace box. Press (not hit
[Martin] ) "Replace All" and they'll be gone.

philip
Re: macro to strip out (delete) all footnotes
Sorry I spoke too soon! You can tell I work with Footnotes only once in a blue moon. I was pretty sure this method worked once. Right now I can't see how one gets a footnote marker into the Find window. Obviously this could be done with a macro, but I thought there was a simpler way.
philip
Re: macro to strip out (delete) all footnotes
Well silly me. The easiest way to strip all footnotes, is to select one, use Select All (i.e. <command>-A) and then just delete. You will get a warning prompt, before it removes them.
But if you still want a macro, one can be provided.
But if you still want a macro, one can be provided.
philip
Re: macro to strip out (delete) all footnotes
And silly me! I had no idea I could do that. But it works! Thanks!! Case closed. 

Last edited by NisusUser on 2013-03-03 21:33:43, edited 1 time in total.
Re: macro to strip out (delete) all footnotes
As for a macro the following works:
Code: Select all
while Select Next Note Reference
Cut
end
philip
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: macro to strip out (delete) all footnotes
Thanks for all that help Philip. I think just placing the selection into any footnote/endnote area, using Select All, and then pressing delete is the easiest way to go.
In case it's useful, here's another macro that asks you which type of notes you want to delete, all footnotes or endnotes:
In case it's useful, here's another macro that asks you which type of notes you want to delete, all footnotes or endnotes:
Code: Select all
$type = Prompt 'Delete all notes of what type?', 'Deleting endnotes will delete both section endnotes and document endnotes.', 'Footnotes', 'Endnotes'
If 'Footnotes' == $type
$isDeleteFootnotes = true
Else
$isDeleteFootnotes = false
End
Select Document Start
While Select Next Note Reference
$selected = TextSelection.active
$note = $selected.text.noteAtIndex($selected.location)
$isFootnote = $note.placement == 'page'
If $isFootnote == $isDeleteFootnotes
Delete
End
End