Register Guidelines E-Books Search Today's Posts Mark Forums Read

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
Member
meghane_e began at the beginning.
 
Posts: 24
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: 22,143
Karma: 22087764
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, 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 online now   Reply With Quote
Old 06-12-2018, 05:16 PM   #3
deback
Book E d i t o r
deback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the end
 
Posts: 285
Karma: 31930
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
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: 11,095
Karma: 10563148
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
Member
meghane_e began at the beginning.
 
Posts: 24
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
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: 22,143
Karma: 22087764
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Red face

Duho!
Use the Edit spans and Tags plugin.
It can delete i tags among others
theducks is online now   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: 15,298
Karma: 24761108
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
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,655
Karma: 13662888
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: 22,143
Karma: 22087764
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, 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 online now   Reply With Quote
Old 06-16-2018, 04:12 PM   #10
meghane_e
Member
meghane_e began at the beginning.
 
Posts: 24
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:29 PM.


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