Page 1 of 1

Find return characters in footnotes and replace with pilcrow

Posted: 2020-03-05 08:18:34
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 8130 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!

Re: Find return characters in footnotes and replace with pilcrow

Posted: 2020-03-05 09:03:52
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?

Re: Find return characters in footnotes and replace with pilcrow

Posted: 2020-03-05 09:06:32
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.

Re: Find return characters in footnotes and replace with pilcrow

Posted: 2020-03-05 09:12:18
by NisusUser
Yes, Martin, you understood correctly.

Re: Find return characters in footnotes and replace with pilcrow

Posted: 2020-03-05 09:32:20
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 8117 times

Re: Find return characters in footnotes and replace with pilcrow

Posted: 2020-03-05 10:07:36
by NisusUser
Thank you, Martin!