Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-17-2015, 04:24 AM   #1
Joques
Addict
Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.
 
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.
Joques is offline   Reply With Quote
Old 03-17-2015, 09:30 AM   #2
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
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.
dickloraine is offline   Reply With Quote
Advert
Old 03-17-2015, 04:18 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
* * *
at least IMNSHO but definitely something more semantically meaningful than the current popular convention.
eschwartz is offline   Reply With Quote
Old 03-17-2015, 06:00 PM   #4
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: 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
( I also do that coding by hand in the editor)
theducks is offline   Reply With Quote
Old 03-20-2015, 04:00 AM   #5
Joques
Addict
Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.
 
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 :-)
Joques is offline   Reply With Quote
Advert
Old 03-20-2015, 05:21 AM   #6
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: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Joques View Post
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 :-)
@Joques - maybe make use of the Extra CSS and Filter Style Information specifications in Conversion->Look and Feel settings.

Just an idea.

BR
BetterRed is online now   Reply With Quote
Old 03-20-2015, 02:59 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 03-20-2015, 03:42 PM   #8
Joques
Addict
Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.
 
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.
Joques is offline   Reply With Quote
Old 03-20-2015, 04:18 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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 there is a tremendously good chance you are instructing it to.

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.
eschwartz is offline   Reply With Quote
Old 03-20-2015, 06:05 PM   #10
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,249
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Joques View Post
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.
The conversion options 'Remove spacing between paragraphs' and 'Insert blank line between paragraphs' are blunt instruments which may significantly change your original css. If you want to avoid this you'll need to leave them unchecked and take a more surgical approach to adding the 0.4em margin-top between regular paragraphs.

I'm afraid the 2 goals of simple bulk conversions coupled with refined css editing are mutually exclusive.
jackie_w is offline   Reply With Quote
Old 03-21-2015, 03:05 AM   #11
Joques
Addict
Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.Joques is my name, but call me Ishmael.
 
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.
Joques is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:41 AM.


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