Yesterday, 07:58 PM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2024
Device: All
|
Unnecessary Text Anchors
Hey Everyone,
inDesign automatically added idText Anchors to my chapter headings. I have very short chapters and don't include them in the TOC. I'm inclined to remove these. Are there any good reasons to leave them in? Second question, is there a way to quickly remove them rather than go line by line? Or more specifically, is there a way to use regex \d or similar to search <a id="_idTextAnchor024"></a></h3> so that \d replaces 024? Thanks |
Yesterday, 08:23 PM | #2 |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Diaps Toolbag plugin can Delete them no matter how they are used in the block.
|
Advert | |
|
Yesterday, 08:29 PM | #3 | |
Evangelist
Posts: 417
Karma: 2289864
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Quote:
Code:
<a id="_idTextAnchor\d+"></a> If you want to prevent the problem, maybe head your chapters with a styled <p> instead of some <h> and they likely won't get the anchors (guessing, since I don't use InDesign) |
|
Yesterday, 08:53 PM | #4 |
Wizard
Posts: 1,324
Karma: 6700864
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
It's not clear but I am guessing the "024" is the chapter number, so you will need to capture it in the Search regex (\d+) so it can be used in the Replace field.
|
Today, 07:39 AM | #5 |
Grand Sorcerer
Posts: 27,942
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you absolutely need the <h3> in the search to get the right matches, consider using a positive lookahead to avoid capturing/replacing it:
Code:
<a id="_idTextAnchor\d+"></a>(?=<h3>) Or you can capture the h3 and make sure it stays by using it in the replace expression: Code:
<a id="_idTextAnchor\d+"></a><h3> Code:
<h3> |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I remove unnecessary space | motsaw | Calibre | 13 | 08-27-2020 04:07 PM |
Totally unnecessary delay! | disconnected | Amazon Kindle | 30 | 11-07-2018 05:57 PM |
iBooks problem with text anchors | iain robinson | ePub | 6 | 03-09-2012 10:32 AM |
Unnecessary conversion | Helsing | Calibre | 9 | 09-04-2010 06:18 PM |