Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2020, 05:37 AM   #1
bizzybody
Addict
bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.bizzybody ought to be getting tired of karma fortunes by now.
 
Posts: 294
Karma: 7742186
Join Date: Apr 2007
Location: Idaho, USA
Device: Various PalmOS PDAs, Android Phones, Sharper Image Literati
How do I remove unwanted highlighting?

The latest free offering from TOR "Mohs 5.5 Megastructures" has several sections that when the reader is switched to white text on a black background, are stuck as some variety of grey text on a white background. In other words, whomever put together the EPUB done did something wrong, at several apparently random spots throughout. (Would be nice if Calibre could auto-fix a problem like this.)

Here's an example clipped from the foreword. All those c_current__and__white_background and c_current__and__white_background1 need to go away, but not the italic part of c_current__and__white_background__and__italic

<h2 class="p_heading_"><span class="c_current__and__white_background">Colombo, Sri Lanka, 11/2019</span></h2>
<p class="p_normal">*</p>
<p class="p_normal">I am from Sri Lanka, a little island just below India. In the world of scifi, Sri Lanka is the last resting place of Sir Arthur C. Clarke. His remains lie interred next those of Leslie Ekanayake, the brother of Clarke’s landlord. </p>
<p class="p_normal"><span class="c_current__and__white_background1">To say that Sir Arthur was a legend in his own lifetime is an understatement. He settled down here in 1956, when Sri Lanka was still Ceylon. From here he delivered to the world a tremendous output of thought that cemented his status in history. He nodded towards his adopted homeland often; he placed his space elevator close by, and his favourite novel - The Songs of Distant Earth (1986) was about a planet named Thalassa, which in Sinhala breaks down very clearly into “Under the palm trees”. He was the Chancellor of the University of Moratuwa, Sri Lanka’s leading technological university, for 23 years. He wore a white sarong and shirt - the national dress - as part of the Sri Lankan delegation to the United Nations disarmament talks in the 1980. Sri Lanka bestowed upon him the titles of Vidya Jyothi ('Luminary of Science); Sahithyaratna ('Gem of Literature'); and the Lankabhimanya ('Pride of Lanka'), the highest honor a civilian can achieve. </span></p>
<p class="p_normal"><span class="c_current__and__white_background1">All of which is to say: in Sri Lanka, Sir Arthur </span><span class="c_current__and__white_background__and__ital ic">was </span><span class="c_current__and__white_background1">science fiction. He was an icon of intellect. We grew
bizzybody is offline   Reply With Quote
Old 01-09-2020, 10:26 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,336
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Not sure if there is an auto-fix...that just appears to be sloppy coding.

You can fix it with a couple quick regex search/replace in Calibre Editor:

Code:
1) change the italic
   search: <span class="c_current__and__white_background__and__italic">(.*?)</span>
   replace: <em>\1</em>

2) remove the other
   search: <span class="c_current__and__white_background1">(.*?)</span>
   replace: \1
Turtle91 is offline   Reply With Quote
Advert
Old 01-09-2020, 10:45 AM   #3
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,978
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by bizzybody View Post
The latest free offering from TOR "Mohs 5.5 Megastructures" has several sections that when the reader is switched to white text on a black background, are stuck as some variety of grey text on a white background. In other words, whomever put together the EPUB done did something wrong, at several apparently random spots throughout. (Would be nice if Calibre could auto-fix a problem like this.)

Here's an example clipped from the foreword. All those c_current__and__white_background and c_current__and__white_background1 need to go away, but not the italic part of c_current__and__white_background__and__italic

<h2 class="p_heading_"><span class="c_current__and__white_background">Colombo, Sri Lanka, 11/2019</span></h2>
IMHO I would leave the spans as is to preserve the original intent (or in case you want to change your mind)
and simply modify those selectors in the CSS. great time to get your feet wet on a simple CSS tweak

you are looking for 2 items in those 2 selectors ONLY:
(the colors may be represented by (Hex)numbers. eg #FFFFFF )
background-color: white ;
color: gray ; /*this is the text color */
Simply comment out the line and leave the intent intact. the rest reverts to the current usage/device default
Code:
/*background-color: white ;   */
/*color: gray; */

Last edited by theducks; 01-09-2020 at 01:33 PM. Reason: Fixed Whites Hex code
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 10:37 AM


All times are GMT -4. The time now is 02:34 AM.


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