Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 06-12-2018, 01:36 PM   #1
meghane_e
Connoisseur
meghane_e began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Sep 2016
Device: Kindle
change font style of single page of html

I have an HTML book (14 files) and one of the chapters was preformatted as completely italic text with tags scattered in the HTML (not the css). It's the Prologue and it is an author-published web chapter.

In the Epub editor, I tried a simple Select on the text in the file preview pane to de-italicize it, but the Editor only seems to add Italics tags. The files wasn't too long, so I did it manually (about 20-25 occurrences). For future reference, is there a built-in way to remove the html formatting (<i ...>xxxx</i> or similar tags) while preserving the text? Ex. Here is some italicized text that I want to invert . Or is it something I need a regular expression for? The Metadata editor has a function to remove HTML formatting, so am I just overlooking it in the Epub editor?

Thanks to anyone who can provide some help!

Last edited by meghane_e; 06-12-2018 at 01:45 PM. Reason: more details
meghane_e is offline   Reply With Quote
Old 06-12-2018, 02:00 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: 29,779
Karma: 54830978
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 meghane_e View Post
I have an HTML book (14 files) and one of the chapters was preformatted as completely italic text with tags scattered in the HTML (not the css). It's the Prologue and it is an author-published web chapter.

In the Epub editor, I tried a simple Select on the text in the file preview pane to de-italicize it, but the Editor only seems to add Italics tags. The files wasn't too long, so I did it manually (about 20-25 occurrences). For future reference, is there a built-in way to remove the html formatting (<i ...>xxxx</i> or similar tags) while preserving the text? Ex. Here is some italicized text that I want to invert . Or is it something I need a regular expression for? The Metadata editor has a function to remove HTML formatting, so am I just overlooking it in the Epub editor?

Thanks to anyone who can provide some help!
In the Code view.
Select the text, including the <i tags at both ends
Ctrl-F (find): replace the text you want to keep with (.+?)
set replace to \1
Set the mode to REGEX: (current file if you don't want Global)
reset the cursor to The top: the click find is it a correct find click replace. Preview if needed is the replace good:


Repeat: find: replace and find:
theducks is offline   Reply With Quote
Advert
Old 06-12-2018, 05:16 PM   #3
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Theducks's explanation made no sense to me, but here's a way to remove italics quickly. Find the <span> class that's being used to italicize the text (example: <span class="italics">. Click on the stylesheet.css file at the left and find that class (in the example above, it would be "italics"). Then remove the line that says font style: italic; from that section. Save the file, and you're done.

Personally, I would do a find for <span class="italics"> (or whatever italics code is being used) and then replace all with blank, which will remove all occurrences of the span. Then hit Beautify Files, which will remove all the closing </span> codes.
deback is offline   Reply With Quote
Old 06-12-2018, 07:16 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,550
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@meghane_e - The Sigil editor has a Format->Remove Formatting option, you could try that next time. IIRC, in Book View it only removes styling tags, i.e. bold, italics etc.

Bit surprised the calibre editor doesn't have a similar feature, or maybe it does and I haven't spotted it

BR
BetterRed is offline   Reply With Quote
Old 06-12-2018, 08:06 PM   #5
meghane_e
Connoisseur
meghane_e began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Sep 2016
Device: Kindle
Thanks for the suggestions! Was really sure I was overlooking an option in the Calibre book editor. But perhaps not. I've been going back and forth between Sigil and Calibre's book editor until I decide what my priorities are. Sigil is bit more straight forward, but Calibre is more functional and powerful. My regex knowledge (and memory capacity) was from 20 years ago so it's been really slow building it back up. So sad. But it's useful and good brain exercise.

Really appreciate the help!

Last edited by meghane_e; 06-12-2018 at 08:08 PM.
meghane_e is offline   Reply With Quote
Advert
Old 06-12-2018, 08:34 PM   #6
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: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Red face

Duho!
Use the Edit spans and Tags plugin.
It can delete i tags among others
theducks is offline   Reply With Quote
Old 06-12-2018, 09:33 PM   #7
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
You can also try the plugin Diap's Editing Toolbag. That has a tool that will remove various tags based on class or ids. Or replace them with something else.
davidfor is offline   Reply With Quote
Old 06-13-2018, 06:43 AM   #8
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by theducks View Post
Duho!
Use the Edit spans and Tags plugin.
It can delete i tags among others
I can't find a plugin by this name for calibre, is this a plugin for Sigil?

Update: Nevermind, I see the Edit Spans and Divs plugin is not a stand alone plugin, but installs when you add Diap's Editing Toolbag plugin.

Last edited by DoctorOhh; 06-13-2018 at 06:49 AM.
DoctorOhh is offline   Reply With Quote
Old 06-13-2018, 10:40 AM   #9
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: 29,779
Karma: 54830978
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 DoctorOhh View Post
I can't find a plugin by this name for calibre, is this a plugin for Sigil?

Update: Nevermind, I see the Edit Spans and Divs plugin is not a stand alone plugin, but installs when you add Diap's Editing Toolbag plugin.
I read the name off th window header header when the PI was running. Never thought to check the name attached to the configured Icon
theducks is offline   Reply With Quote
Old 06-16-2018, 04:12 PM   #10
meghane_e
Connoisseur
meghane_e began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Sep 2016
Device: Kindle
That's excellent! I haven't used it other than try one or two small changes to a file. Definitely helpful! Thank you for suggesting it and Diap for writing it!
meghane_e is offline   Reply With Quote
Reply

Tags
convert html, epub editor, remove formatting


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change font size and font style? butterbescotch Sigil 20 09-06-2013 08:22 PM
Unwanted page numbers and font change SoulStyle Conversion 5 05-21-2011 04:58 PM
ePub - Changing Font size doesn't change page numbers higgs Sony Reader 46 03-26-2010 02:36 PM
single HTML to ePub with fixed width font skyfish Calibre 8 12-10-2009 01:30 PM
change html font size ssh nwsco iRex 0 04-26-2009 03:17 AM


All times are GMT -4. The time now is 03:26 AM.


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