Copy link to clipboard
Copied
Hello,
The latest versions of InDesign CC have the functionality for converting endnotes to footnotes or vice versa. This conversion can be for all notes in the document or select notes.
My question is whether specific notes can be found in the document based on formatting (e.g. with a GREP search) and then the found note is converted.
Consider the following footnotes in a document...
1. Bla bla note one.
2. [Lorem ipsum note two.]
3. Bla bla bla bla another note here.
4. [Eeny meeny miny mo.]
5. Ip dip do the cat has the flu.
So, I want to find the footnotes in square brackets. I know I can do this with a Grep search which would be something like:
Find: ~F\t\[.+\]
Find format - Paragraph style: Footnote paragraph
The question is whether it is possible to covert the found text into an endnote other than manually through the right click options or TYPE > CONVERT FOOTNOTES AND ENDNOTES options.
Does this require a script or can it be done through Find/Replace?
If only there ws a way to select all of the required footnotes then the menu option could be used to convert them to endnotes. This would also work.
Copy link to clipboard
Copied
> Does this require a script or can it be done through Find/Replace?
Yes, this requires a script, it can't be done in the interface.
Copy link to clipboard
Copied
Here is the whole process - based on the file provided by A2D2 -- which shows, that ID-Tasker is perfectly fine with RTL texts as well.
THIS IS VERY IMPORTANT - Endnotes option NEEDS to be set to "On a New Page":
Otherwise, it will create bunch of separate TextFrames for each Endnote.
Let's load Footnotes in "( )":
As per screenshot - Arabic text is displayed in the IDT's UI as well.
I want to convert only those 3x selected:
After conversion - references are doubled:
And fixed:
Now, what's left, is to test IDT on some Far East document.
Even the free version of ID-Tasker can do the whole process semi-automatically - each Footnote that needs conversion, has to be pre-selected - double-clicked on the list of the found results - which BatchMode do this automatically in the full / paid version.
Copy link to clipboard
Copied
Quickly [because of Christmas], Script written for a client in june 2021! 😉
(^/) The Jedi
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Exactly what the op would like basing on a Grep F/R! 😉
(^/)
Copy link to clipboard
Copied
Thank you, and I am glad to see you dealt with this 3 years ago ... but you give no clues about the script! Would you consider sharing or at least describing? 🙂
Copy link to clipboard
Copied
Sorry to be a spoilsport, but this is so simple there's no reason to be mysterious about it.
To use the script, test whether your search string finds all and only what you're looking for, then run it.
(function () {
var start = app.activeDocument.footnoteOptions.separatorText.length+1;
function footnoteToEndnote (fnote) {
var endnote = fnote.storyOffset.createEndnote();
fnote.texts[0].characters.itemByRange (start, -1).
move (
LocationOptions.AFTER,
endnote.insertionPoints[-1]
);
fnote.remove();
}
var fn = app.activeDocument.findGrep();
for (var i = fn.length-1; i >= 0; i--) {
footnoteToEndnote (fn[i].parent);
}
}());
Copy link to clipboard
Copied
Thank you @Peter Kahrel , worked for me in CC2025.
But raises the questions as to whether your pre-CC2018 footnote to endnote script could be modified to convert SELECT FOOTNOTES BASED ON GREP MATCH ONLY, rather than coverting ALL footnotes.
I did take a look at the script but couldn't figure it out myself.
Copy link to clipboard
Copied
You didn't mention pre-CC2018. Doing endnotes from search results in pre-2018 InDesign is no trivial matter. Better upgrade to ID 2024 or 2025.
Copy link to clipboard
Copied
Surely the reason I wrote my Script. See comments on YouTube video 2 [29/06/2021]:
"3 problems to be fixed:
• your document contains several stories and you have to numerate footnotes from 1 to n, on all the doc.
• you need to convert "ref." footnotes to endnotes (at the end of each current story),
• you use InDesign CC 2017 or another older version (CC 2018 introduced the "Endnotes" feature! not truly completely useful here)."
…But that was a long time ago!
(^/)
Copy link to clipboard
Copied
Conversion of Footnotes in CS6 - all or only selected - isn't a problem at all - renumbering neither - I can use mechanism used there:
https://id-tasker.com/2024/05/12/mixing-auto-custom-footnotes/
Managing them - adding / removing - will might require adding a few new rules - definitely one that will correctly select multi-paragraph ones in the ENDnotes Story.
Copy link to clipboard
Copied
And done:
5x Tasks and Footnotes in "( )" converted to Endnotes - extracted and renumbered.