Reply to topic  [ 9 posts ] 
macro to strip out (delete) all footnotes 
Author Message

Joined: 2011-01-12 05:32:38
Posts: 256
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.


2013-03-01 01:08:44
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
My version of Nisus comes with a pre-installed macro in the macro menu: "NoteConversions > Convert Footnotes to Inline Snippets"

_________________
philip


2013-03-01 02:34:14
Profile

Joined: 2011-01-12 05:32:38
Posts: 256
phspaelti wrote:
My version of Nisus comes with a pre-installed macro in the macro menu: "NoteConversions > Convert Footnotes to Inline Snippets"


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.


2013-03-01 06:10:43
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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 :wink: [Martin] ) "Replace All" and they'll be gone.

_________________
philip


2013-03-01 06:53:30
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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


2013-03-01 07:01:41
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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.

_________________
philip


2013-03-01 07:15:03
Profile

Joined: 2011-01-12 05:32:38
Posts: 256
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.



2013-03-01 07:16:37
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
As for a macro the following works:

Code:
while Select Next Note Reference
   Cut
end

_________________
philip


2013-03-01 07:34:05
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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:
Code:
$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


2013-03-05 12:25:18
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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