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 12-23-2017, 09:12 PM   #1
retiredbiker
Addict
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: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Question on "Live CSS"

I've recently gotten into some serious epub editing, and while I'm figuring out most of it, one thing is really stumping me.

99% of the time, the Live CSS window points me to exactly where I need to fix something or make a change. But once in a while, it is weird. Say I want to change a text indent. The body style is "calibre", the paragraph style is "calibre1", and there is a span with class="calibre2" around the paragraph, and no surrounding div's or anything. No styling in the header, just the link to the CSS. The Live CSS reflects all this, as expected.

Messing with those styles does nothing to my indent. But, experimenting at random, I make a change to "calibre13" (for example) in the CSS, and bingo! my indent changes. And I can't find anything using "calibre13" anywhere near the text I'm dealing with--not anywhere in that file.

Can someone tell me what I'm missing--where to look--how it is working?

Many thanks.
retiredbiker is offline   Reply With Quote
Old 12-24-2017, 12:23 AM   #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,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You add text-indent: <value>; to calibre2 in this case
P is a block

span is a (sub/modify) control. eg, make this italic, bold... . You cant do a block action (indent) here

calibre (in this case) is setting the over body (overall margin, basic font)
theducks is offline   Reply With Quote
Advert
Old 12-24-2017, 01:38 AM   #3
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
Quote:
Originally Posted by retiredbiker View Post
I've recently gotten into some serious epub editing, and while I'm figuring out most of it, one thing is really stumping me.
Tip: - the class names you mention, "calibre1", "calibre13" etc suggest the epubs come from conversion. If they were created from well-formed DOCX files with meaningful style names you could use the Mammoth converter and retain the Word template styles, including the names in the epub's css classes.

It's not point and click like calibre's conversion, you have to define the mapping between the Word template and the Style sheet. Only worth doing if the DOCX makes proper use of styles to control formatting, but if the DOCX is full of in-line styling then not worth the effort.

The Sigil editor has a plugin that wraps around Mammoth - with a little bit of care you can edit a Sigil created epub with the calibre editor and vice versa.

BR
BetterRed is offline   Reply With Quote
Old 12-24-2017, 11:05 AM   #4
retiredbiker
Addict
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: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Yes, exactly what I was doing, but expecting "calibre1" - the block - to change the indent...but no dice, it was some apparently the unrelated class that actually made the change...which is why I'm confused.
retiredbiker is offline   Reply With Quote
Old 12-24-2017, 11:26 AM   #5
retiredbiker
Addict
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: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Yes, you're right. This was some ancient sci-fi story from a long defunct 1920's magazine I found somewhere, with "mso..." in the code. As for "well-formed DOCX", I guess the people who do that are pretty rare, and mostly never heard of styles! When I find one of these old chestnuts, if it has "mso-whatever" all over it, it's usually a terrible mess. Maybe converted several times, as well. Often it's so bad I just have Calibre make an RTF out of it, and start over in LibreOffice and/or gedit - remove all the formatting, preserve italics if possible, and rebuild it. Often faster than trying to correct it in the Calibre editor. LibreOffice plays really well for this. Thanks for the tip on Mammoth, I'll look into that.
retiredbiker is offline   Reply With Quote
Advert
Old 12-24-2017, 11:45 AM   #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,778
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 retiredbiker View Post
Yes, exactly what I was doing, but expecting "calibre1" - the block - to change the indent...but no dice, it was some apparently the unrelated class that actually made the change...which is why I'm confused.
the MSO clue (AKA word cruft )

If you see something like <! If MSO >... before the body tags

That can override the CSS

I have Sigil cleanup scripts that I use to remove a lot of Word cruft
theducks is offline   Reply With Quote
Old 12-24-2017, 11:52 AM   #7
retiredbiker
Addict
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: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
Originally Posted by theducks View Post
:That can override the CSS
Ah Ha! That is what I will look for next time I find one of these beasties. Thanks!
retiredbiker is offline   Reply With Quote
Old 12-24-2017, 05:39 PM   #8
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
Quote:
Originally Posted by retiredbiker View Post
When I find one of these old chestnuts, if it has "mso-whatever" all over it, it's usually a terrible mess. Maybe converted several times, as well - including to/from PDF. Often it's so bad I just have Calibre make an RTF out of it, and start over in LibreOffice and/or gedit - remove all the formatting, preserve italics if possible, and rebuild it. Often faster than trying to correct it in the Calibre editor.


I use Mammoth on DOCX's I convert from professionally created PDF public-domain documents from institutional sources (.gov, org, .edu etc). Trying to do the same with commercial PDF's is usually pointless.

Much converted texts invariably have boatloads of content errors too, such as OCR induced spelling errors, casing anomalies, broken paragraphs, quote marks all over the place - straight, bent, missing, mismatched, and superfluous etc.

Like you I prefer to start over, but in my case its always rather than often; I have 30 years worth of Word usage and macro/add-on gathering at my disposal.

I don't seek to create typographical replicates of the original. The reverse in fact, I remove embellishments such as graphical scene markers, first para start effects such as dropcaps etc - I do unindent them though. I also like to spell out chapter numbers - i.e. Twenty-two instead of 22.

BR

Last edited by BetterRed; 12-24-2017 at 05:42 PM.
BetterRed is offline   Reply With Quote
Old 12-24-2017, 07:32 PM   #9
retiredbiker
Addict
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: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
Originally Posted by BetterRed View Post
I don't seek to create typographical replicates of the original.
Right on! My eyes are as old as the rest of me, and aren't about to improve any time soon. And why should an ebook try and emulate something printed on 8x10 paper, anyway? I edit what I want to read so I CAN read it, more or less easily. E-readers are wonderful for that, but when a book/doc/article is formatted all cutsy-poo and jammed onto that six-inch screen...and I've got the reader font set to nearly huge...it just doesn't work very well. So what I try and end up with is something resembling a large-print book that might have been published in 1900!

Yes, the converted files one can find can be spectacularly bad...but it's amazing how often I'll buy a brand-new book, read two pages, and whisk it into the editor to make it more comfortable. "Text-align: left" I can type in my sleep by now; justified text with 4 or 5 words per line is just awful.

Thanks to Kovid and Apprentice Alf, I can actually do this! Amazing, really.
retiredbiker is offline   Reply With Quote
Old 12-25-2017, 08:53 AM   #10
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
You can also do a quick Convert to change to the ugly, jagged right margin (instead of the neat-looking justified margins--lol) by selecting Left Align under Look & Feel/Text/Text Justification.
deback is offline   Reply With Quote
Old 12-25-2017, 07:21 PM   #11
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 deback View Post
You can also do a quick Convert to change to the ugly, jagged right margin (instead of the neat-looking justified margins--lol) by selecting Left Align under Look & Feel/Text/Text Justification.
When you have a large font on a 6 inch screen (as the poster stated) the left align option is the easier to read due to not having giant irregular spacing between words that is seen in justified margins.
DoctorOhh is offline   Reply With Quote
Old 12-25-2017, 10:49 PM   #12
retiredbiker
Addict
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: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Convert versus Edit

Yes, the alignment option in conversion works; in fact I always do that if I'm converting to epub from something else. But I usually end up in the editor anyway to fix something...
retiredbiker is offline   Reply With Quote
Old 12-26-2017, 06:41 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DoctorOhh View Post
When you have a large font on a 6 inch screen (as the poster stated) the left align option is the easier to read due to not having giant irregular spacing between words that is seen in justified margins.
That depends if you have hyphenation or not.
JSWolf is offline   Reply With Quote
Old 12-26-2017, 06:42 AM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,887
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If you are fixing an ePub for left justification, it is much easier to just use the editor to edit the CSS. than it is to convert.
JSWolf is offline   Reply With Quote
Old 12-26-2017, 08:35 AM   #15
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
Quote:
Originally Posted by JSWolf View Post
If you are fixing an ePub for left justification, it is much easier to just use the editor to edit the CSS. than it is to convert.
Converting the file to fix one thing takes one click. Editing the file to fix the margin takes more than one click. How is it "much" easier to edit the CSS than it is to convert?

Last edited by deback; 12-26-2017 at 08:58 AM.
deback is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert "Book A" using css, formatting, fonts 1:1 -> "Book B"? Mr.Husky Calibre 1 11-24-2015 05:22 PM
Question: addition of "virtual libraries" (was "base search restriction") chaley Library Management 53 04-15-2013 12:52 PM
"Sharpness" and "Kobo Styling" question? EldRick Kobo Reader 3 11-19-2012 09:25 AM
epub CSS versus "Regular" CSS konrad ePub 4 02-18-2011 09:29 AM
Question - Does iLiab have the "search" & "annotation, highlighting" features? HiSoC8Y iRex 5 07-01-2009 04:37 PM


All times are GMT -4. The time now is 09:51 PM.


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