Find return characters in footnotes and replace with pilcrow

Everything related to our flagship word processor.
Post Reply
NisusUser
Posts: 279
Joined: 2011-01-12 05:32:38

Find return characters in footnotes and replace with pilcrow

Post by NisusUser »

Hi, once again,

I need a way to find all returns in footnotes and replace them with pilcrows. What I want to do is make it so all the text in every footnote is only one paragraph (so it can be easily converted to plain text). The pilcrows will mark where the return characters were (so they can be re-inserted later if necessary).

I just tried to do a Find & Replace for this, but I think what I'd want to do is over my head. I don't know how to find the embedded footnote numbers at the beginning of a footnote. I though "Any digit" might catch the footnote #, but it doesn't. Here's what I have so far:
Find-Replace sample
Find-Replace sample
Screen Shot 2020-03-05 at 18.16.41.png (87.63 KiB) Viewed 907 times
I do need to leave one return at the end of each footnote, of course, so I'm sure there is much more tweaking needed.

Thank you!

martin
Official Nisus Person
Posts: 4693
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Find return characters in footnotes and replace with pilcrow

Post by martin »

Just to make sure I understand this correctly before giving any advice: you want to process each footnote in your document to remove internal returns, so each single footnote is a single paragraph. You do not want to change the document's main text, footnote references/numbering, or the total number of footnotes. You only want to replace return characters with pilcrows inside each footnote. Is that correct?

martin
Official Nisus Person
Posts: 4693
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Find return characters in footnotes and replace with pilcrow

Post by martin »

As an example, you want to turn document text that looks like this:
This is the main body[1]. Another sentence with another footnote afterwards[2].
End of main text.
---------------------
1. First paragraph in the first footnote.
Second paragraph in the first footnote.
2. First paragraph in the second footnote.
Second paragraph in the second footnote.
Into text that looks like this:
This is the main body[1]. Another sentence with another footnote afterwards[2].
End of main text.
---------------------
1. First paragraph in the first footnote. ¶ Second paragraph in the first footnote.
2. First paragraph in the second footnote. ¶ Second paragraph in the second footnote.

NisusUser
Posts: 279
Joined: 2011-01-12 05:32:38

Re: Find return characters in footnotes and replace with pilcrow

Post by NisusUser »

Yes, Martin, you understood correctly.

martin
Official Nisus Person
Posts: 4693
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Find return characters in footnotes and replace with pilcrow

Post by martin »

Ah great, then this is a relatively straightforward task. You want to change your Find dialog "where" setting to "Footnotes & Endnotes". Once that's done just insert what you want to find (returns) and replace (pilcrows), and then click "Replace All". It should look like this:

find.png
find.png (115.86 KiB) Viewed 894 times

NisusUser
Posts: 279
Joined: 2011-01-12 05:32:38

Re: Find return characters in footnotes and replace with pilcrow

Post by NisusUser »

Thank you, Martin!

Post Reply