12-23-2017, 09:12 PM | #1 |
Addict
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. |
12-24-2017, 12:23 AM | #2 |
Well trained by Cats
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) |
Advert | |
|
12-24-2017, 01:38 AM | #3 | |
null operator (he/him)
Posts: 20,550
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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 |
|
12-24-2017, 11:05 AM | #4 |
Addict
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.
|
12-24-2017, 11:26 AM | #5 |
Addict
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.
|
Advert | |
|
12-24-2017, 11:45 AM | #6 | |
Well trained by Cats
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:
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 |
|
12-24-2017, 11:52 AM | #7 |
Addict
Posts: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
|
|
12-24-2017, 05:39 PM | #8 | |
null operator (he/him)
Posts: 20,550
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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. |
|
12-24-2017, 07:32 PM | #9 | |
Addict
Posts: 383
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
|
Quote:
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. |
|
12-25-2017, 08:53 AM | #10 |
Book E d i t o r
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.
|
12-25-2017, 07:21 PM | #11 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
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.
|
12-25-2017, 10:49 PM | #12 |
Addict
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...
|
12-26-2017, 06:41 AM | #13 |
Resident Curmudgeon
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
|
|
12-26-2017, 06:42 AM | #14 |
Resident Curmudgeon
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.
|
12-26-2017, 08:35 AM | #15 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
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. |
Thread Tools | Search this Thread |
|
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 |