02-12-2023, 12:34 AM | #1 |
Wizard
Posts: 2,266
Karma: 7406665
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
|
How to remove unwanted underlining?
I purchased a book from AMZ and unpacked the KF8 as an epub. The book was such a mess ("published independently") I converted epub =>epub and edited. Unfortunately, not until I loaded it on my Sage did I see underlined text all throughout the book that did not appear in the editor. I'm self-taught and know next to nothing about html code.
All instances of underlining appear to be associated with the tag: <a id=" I've attached a screenshot of the editor highlighting two examples where underlining follows the tag I mentioned above. How do I fix this? Any guidance would be most appreciated! |
02-12-2023, 12:42 AM | #2 |
Evangelist
Posts: 483
Karma: 2267928
Join Date: Nov 2015
Device: none
|
Replace
Code:
(<a id="[^"]*")>(.+?)</a> Code:
\1/>\2 |
02-12-2023, 01:31 AM | #3 |
Wizard
Posts: 2,266
Karma: 7406665
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
|
Thank you for your reply, but you've lost me. Using the first example, do I completely remove this?:
<a id="_Hlk119510133"> How, exactly, do I replace it? I do not understand what to do with: \1/>\2 As I mentioned, I am not familiar with code. |
02-12-2023, 02:30 AM | #4 |
Wizard
Posts: 1,164
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Its probably easier to just remove the underline from the stylesheet.css
Check if there is any css code for a. It will most likely be using text-decoration: underline;. Just delete that line. If you're not sure, post the entire css file so we can check. |
02-12-2023, 12:53 PM | #5 | |
Wizard
Posts: 2,266
Karma: 7406665
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
|
Quote:
It appears the unwanted code is the result of the unpacked epub=>epub conversion. I located only one instance of text-decoration: underline; which pointed to the TOC entries. Another does indeed point to the problem but it is already correct, text-decoration: none;. After searching MR archives going back to 2013, an unrelated post led me to this, which worked: a { text-decoration: none } The original KF8 was a disaster, with an individual css for each chapter with numerous blank pages in between. Below are css files from the converted epub and KF8 if you are interested. I still do not understand why the existing code in .calibre42 (:none) was not honored. (.calibre29 is the TOC) Converted epub: (I added the a entry) Spoiler:
Original KF8: Spoiler:
Thank you. |
|
02-12-2023, 02:44 PM | #6 |
Wizard
Posts: 1,164
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Great!! Glad you got it fixed.
Yes, some of the books downloaded off Amazon are a real "dogs breakfast". Obviously created by authors that have no clue. Still, you have to wonder how they were accepted by Amazon. |
02-12-2023, 05:47 PM | #7 |
the rook, bossing Never.
Posts: 11,609
Karma: 87456643
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I've found Penguin as epub/kepub from Kobo Ireland sale less bother to clean than Penguin in same series off Amazon as azw3.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I remove unwanted highlighting? | bizzybody | Calibre | 2 | 01-09-2020 10:45 AM |
Cannot remove unwanted formats w/Edit Metadata | Ginnia | Library Management | 5 | 06-30-2017 01:33 AM |
Remove unwanted news feed | MacNala | Recipes | 2 | 07-28-2013 04:50 AM |
Help! How do I remove unwanted paragraph breaks? | ElMiko | Sigil | 7 | 03-27-2013 11:43 AM |
How to remove unwanted Save-to-disk templates | alexmobile | Calibre | 5 | 02-22-2012 05:54 AM |