![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 107414
Join Date: May 2013
Device: Kobo Glo
|
Question about Calibre formatting
Hello! I am a relative noob to Calibre and epub stylesheet formatting, having learned just enough to get in trouble.
The premise: My preference is to have a small extra space (0.4em) between regular, indented paragraphs, and a larger space between non-indented paragraphs, those usually signifying a change of scenes within a chapter. Now, I've always noticed that some books have that big space and some don't, and it always bugged me when they didn't, but I never delved into it. But the other day I realized something. I was casually browsing through a newly purchased book in ADE before imprting it to Calibre. "Oh good! This one has the big space between scene changes (is there a word for that?), that's nice". Well, after I imported it into Calibre and ran it through "convert" to get that 0.4em space between regular paragraphs that I so crave, the big space between scene changes had disappeared! OH NO! Calibre is messing with my formatting in a way I never intended for it to do! Now, it really is no huge deal to just go into the stylesheet of a book, finding the relevant css property and appending 1.5em to top padding. BUT is there some way to have Calibre not behave like this? The _only_ box I have checked in "look & feel" in Convert is "insert blank line between paragraphs". Can Calibre really not do this without removing the big space before non-indented paragraphs? It seems strange. |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 631
Karma: 7544528
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
|
Maybe not exactly what you are after, but go to the heuristic tab in the conversion dialog. There is an option to insert scene breaks. I think one option is a blank line, but even if that does not work, you could insert symbols. That way your scene breaks are retained.
|
![]() |
![]() |
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
calibre does the best it can based on the heuristics of the book.
Unfortunately most ebooks define scenebreaks via a CSS class for regular paragraphs and a separate CSS class for paragraphs with a preceding/following scenebreak, and set different top margins depending. calibre cannot deduce the meaning there, though if you invent a working Artificial Intelligence Kovid will happily include it to do just that -- also you will make billions in consumer tech. ![]() Proper scenebreaks would use their own paragraph containing Code:
* * * ![]() ![]() |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,912
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
A <p class="scenebreak"> whatever marks that strikes your fancy
is IMHO clearer than starting each new 'scene' with a <p class='firstpara'> that just has a bigger top margin YMMV ( ![]() |
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 107414
Join Date: May 2013
Device: Kobo Glo
|
dickloraine, that doesn't seem to work for me, at least not with the book I'm testing all this on (The Dark Defiles by Richard Morgan).
eschwartz, that seems strange to me. I just checked the CSS classes before and after conversion. Before conversion, the scene break CSS class contains: margin-top: 2em After conversion, that same CSS class does not contain margin-top, but it does contain padding-top: 0 So conversion removes the original top margin property and value, and inserts another property with the value zero instead. That does not seem to me to require a Culture Mind level of AI to resolve :-) |
![]() |
![]() |
![]() |
#6 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() Just an idea. BR |
|
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The problem is -- how does calibre know which CSS classes are a scenebreak, and which ones are merely paragraphs, for which you may have instructed calibre to remove the spacing between paragraphs.
![]() That requires figuring out what the intent of a class name is, which requires human oversight. |
![]() |
![]() |
![]() |
#8 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 107414
Join Date: May 2013
Device: Kobo Glo
|
It doesn't really need to figure out any kind of intent. It doesn't need to know which class is for scene breaks, it just needs to not delete properties from classes that are in use, unless the user instructs it to.
|
![]() |
![]() |
![]() |
#9 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Check your conversion settings
![]() ![]() Or so I would guess based on the fact you had this problem. EDIT: To be clear, this was kind of the whole reason you asked in the first place... right? Because you were trying to use calibre conversion to homogenize your book, but it was working too "well"? Right? Right? Last edited by eschwartz; 03-20-2015 at 06:19 PM. |
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,249
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
I'm afraid the 2 goals of simple bulk conversions coupled with refined css editing are mutually exclusive. |
|
![]() |
![]() |
![]() |
#11 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 107414
Join Date: May 2013
Device: Kobo Glo
|
The only thing I've checked is "insert blank line between paragraphs", and I guess I am having a hard time understanding why that setting should also remove spacing. But if that's the way it is, that's the way it is. I asked because I thought there was a good chance I was missing some obvious setting, but I guess not.
Like I said, it's not a huge deal to insert some top padding to the scene break class in every book. Thank you for your answers, everybody! Last edited by Joques; 03-21-2015 at 03:50 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 epub formatting question | scribblenauts | Sony Reader | 11 | 11-01-2010 01:47 PM |
Calibre and FORMATTING how to stop it altering my formatting? | nerys | Calibre | 37 | 07-23-2010 02:35 AM |
Formatting Question | HiddenZebra | Amazon Kindle | 2 | 06-26-2010 02:16 AM |
Calibre and FORMATTING how to stop it altering my formatting? | nerys | Calibre | 0 | 02-28-2010 04:51 PM |
line formatting formatting question | daesdaemar | Workshop | 9 | 02-06-2009 11:47 AM |