Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 07:58 PM   #1
AaronMo
Junior Member
AaronMo began at the beginning.
 
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
AaronMo is offline   Reply With Quote
Old Yesterday, 08:23 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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.
theducks is offline   Reply With Quote
Advert
Old Yesterday, 08:29 PM   #3
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 417
Karma: 2289864
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Quote:
Originally Posted by AaronMo View Post
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
If you are not using them, you can probably get rid of them without causing a problem. Just make sure that anchor string is not used somewhere else where you DO want it. Try a regex search for
Code:
<a id="_idTextAnchor\d+"></a>
and replace with nothing.

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)
retiredbiker is offline   Reply With Quote
Old Yesterday, 08:53 PM   #4
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
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.
Karellen is offline   Reply With Quote
Old Today, 07:39 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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>)
Then replace with nothing,

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>
Then replace with:

Code:
<h3>
DiapDealer is offline   Reply With Quote
Advert
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:28 AM.


MobileRead.com is a privately owned, operated and funded community.