Copy link to clipboard
Copied
I’m having trouble with a long document in InDesign. I suspect it’s because of a large number of text anchors that somehow were introcduced when a copyeditor imported a lengthy series of endnotes in Word. Now the INDD doc is sluggish, crashy and generally hard to handle.
Is there any way to find and replace these anchors? I can’t seem to find the right search string.
Thanks! CWS
OK, I know what is "wrong" with your file...
Your text is linked as ICML - you've mentioned InCopy but I have Links pallet closed and I've ignored initial message about missing links:
I wasn't even able to search for the "endnote" numbers so I started digging and found out that this Story is linked.
After I've UNLINKED it - my script:
app.activeDocument.hyperlinkTextDestinations.everyItem().remove();
works perfectly fine on your sample.
Not sure if you can or should
...Copy link to clipboard
Copied
Try the simple "big hammer" fix: save/export the doc to IDML, then open that and save it as INDD under a new name. It may not work in this case, but that process purges and rewrites the doc structure, especially link-related elements. Such a cleanup might make the many links and anchors less troublesome.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Oh, well, it's a tool always worth a try. 🙂
I'm not clear on exactly what these bits of grit are, in strict technical terms. Are they anchored items? End note links? Something else?
Most things in an ID doc can be searched or managed by something... details would help, here.
Copy link to clipboard
Copied
The guide to non-printing characters that I found refers to them as “Text Anchors.” They show up as blue colons when invisibles are on, and they show as gray colons with an icon (see below.)
Nowhere can I find the sort of basic "Find xxx" syntax one can use for every other non-printing character. Go figure.
To be honest, I can’t be certain that this is what’s gumming up the works, but I had the same problem with a previous file from the same source, so seems likely. CWS
Copy link to clipboard
Copied
Okay, that makes sense.
You do know you can search for most such markers? One option is 'End Note Reference Marker," which is what *should* be in the text in these locations; if this is some wack-a-doodle approach, is deleting these markers going to preserve those notes in some useful way?
Read that as: I'm still unclear as to what these markers are and how they got there; you're sort of implying it was some out-of-bounds operation by a prior editor. Approaching it from the way it was implemented might lead to a solution; this does not appear to be any valid end note implementation, but something more like a TOC, index or cross-reference.
Another thought is that you could open the IDML in a good text editor and use find/replace or GREP to nuke the little punks.
Copy link to clipboard
Copied
Possibly worth trying: on a COPY of the doc, delete all the end notes. Save as IDML and reopen. Does the sluggish behavior persist with the notes and links gone?
Copy link to clipboard
Copied
Deleting the markers does not impact the notes, which I imported as static text. The markers appear between the text and the note reference (also static). One possibility is that InDesign is struggling to connect links of which it only has one component.
I suspect the original MS was composed in something other than Word. The author is an older academic of the sort who are notorious for keeping WordPerfect running on some ancient DOS machine, or, worse, using some proprietary program on their school’s mainframe. An earlier version of the MS has cross-references of a sort I’ve never seen in 20+ years of working with MSs, so you can imagine how baffling it is. If I weren’t on a deadline, I’d send the whole mess back, but don’t have the luxury.
I’d happily do a global Find-and-Replace, but the Find side of the equation eludes me. I’ve tried all the searches I can find, although my iffy grasp of GREP has hamstrung me a bit.
Copy link to clipboard
Copied
P.S. It’s Almost as sluggish in InCopy....
Copy link to clipboard
Copied
Egads, do I know that situation. If an end result of completely static text is okay, though, you have a path out. I still suggest directly editing an IDML (== XML) version in a good code or source editor might be the fastest path, but as I can't accurately replicate the technical issue, I can't give any better advice. It does sound like you have a handle on it, though.
One thing with those horrible incompatible Word-export formats: sometimes opening them in a real copy of Word and saving to RTF (or even directly to DOC/DOCX) can clean them up a lot. Open the RTF and re-export to DOC/X for more alternatives.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Here’s a snippet of text that has the problem:
by rain.251 It was
In InCopy it looks like this:
In Layout view it looks like this:
Don’t know if the makes it any clearer. CWS
Copy link to clipboard
Copied
I would prefer sample INDD file - for a deeper investigation.
But ... if you ALWAYS have this anchor there - then maybe:
or some variation - with look-behind or something.
What if you open Bookmarks Panel:
If those are bookmarks - double-click gets you there - and you can delete them.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Here’s a sample page. The Paragraph that ends with the note citation has the problem.
By @cwscarbrough
Those are not "true" EndNotes? Just bunch of digits:
This marker - its Unicode value is 0xFEFF - but there is nothing in Bookmarks and Hyperlinks:
But as you've mentioned - you have a few dead Hyperlinks:
Do you have any Hyperlinks / Bookmarks in the document - when you check Pallets?
If not - then those remnants should be delete-able - I'll try to prepare a script in JS so you can use on your Mac.
Copy link to clipboard
Copied
Those are not "true" EndNotes? Just bunch of digits:
Yeah, I think we've established this is neither fish nor fowl nor good red Impossible Burger, but some bastardized drop-in, probably from one of those academic note/cite managers that I've railed and raged about before.
The goal, as I understand it so far, is just to get the dead markers out of there to see if they're the cause of the slowdown etc., leaving completely dead reference numbers and detached notes, typewriter style.
Copy link to clipboard
Copied
[...]
The goal, as I understand it so far, is just to get the dead markers out of there to see if they're the cause of the slowdown etc., leaving completely dead reference numbers and detached notes, typewriter style.
By @James Gifford—NitroPress
Unfortunately, it's not possible to delete them through script:
app.activeDocument.hyperlinkTextDestinations.everyItem().remove();
nor manually:
I've tried to re-assign them - by creating Source - but they still can't be deleted - same error...
Copy link to clipboard
Copied
But there is a always brute force solution - editing IDML file:
Copy link to clipboard
Copied
You just need some Text editor that can handle GREP / RegExp:
Not sure how many Stories to process you'll have:
but you need to look for larger file(s) - the smaller ones will be stuff on MasterSpreads:
or something else.
Copy link to clipboard
Copied
Interestingly, the Bookmarks panel allows me to locate the anchors, but will not delete them. So far, the only workable approach is to delete them one at a time in InCopy.
Really appreciate the input. We’re pretty far beyond the scope of my skillset. I’ve never had a knack for scripting, and editing IDML is probably beyond my patience at this point..
Unfortunately, I think a more elegant solution will have to wait. I’m worried that there’s another one of these in the pipeline, but at least I can get the client to head off the issue before delivering the next file.
Copy link to clipboard
Copied
IDML is just a ZIP - export your INDD file as IDML, add ".zip" at the end and open with something.
Then go to Stories folder and check biggest XML files - it's plain text.
Extract them, edit, put back, remove ".zip", open with InDesign.
If you ever need to extract images from DOCX - it's a ZIP package as well.
Copy link to clipboard
Copied
If you work on a PC - you could try free version of my tool - ID-Taker - with one click you can get complete structure of your text / document and with double click on an item on the list - get to this item instantly.
Copy link to clipboard
Copied
Thanks, Robert, but I’m on Mac. CWS
Copy link to clipboard
Copied
Thanks, Robert, but I’m on Mac. CWS
By @cwscarbrough
If you send me your file - INDD alone - on priv I can convert those "endnotes" to real ones and also remove those dead bookmarks.
Copy link to clipboard
Copied
This may be completely unrelated to the problem CWS has but when I open his sample InDesign file and look at the text in the story editor every line has, overlaid on the first character of the line, a symbol just like the InDesign page number icon. It's there in a newly created text frame in the same document but it disappears if I copy the frame to a new document . . . .