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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-11-2010, 10:08 PM   #1
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
[Old Thread] Epub Output: Line Height

Hi!

I've been using Calibre for a few weeks now, and I'm very impressed by it. I'd like to say thanks to the author of this amazing software.

I have a problem though. I'm very fond of the way feedbooks.com formats the epub ebooks: the line height within a paragraph is somewhat smaller than the line height between paragraphs. This makes it a lot easier to read, when I choose to remove line spacing between paragraphs. To clarify what I mean, this is a screen capture of a public domain ebook from feedbooks.com:



I'm not able to create this effect with calibre when converting a file to epub. Any changes in the 'Line Height' figure under "Look & Feel" is applied evenly within and between paragraphs.

I wonder if you could provide me with instructions how to achieve the effect that feedbooks.com does so effectively with their epub ebooks.

Additionally, I'd like to ask if it is possible to import, save, and apply settings of existing well-formatted epub files as a template for my own conversions.

Thank you for the wonderful software!
greenapple is offline   Reply With Quote
Old 01-11-2010, 10:46 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,380
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In extra css add

p { margin-top: 5px; margin-bottom: 5px; }


and no it's not possible to import settings.
kovidgoyal is online now   Reply With Quote
Advert
Old 01-11-2010, 11:57 PM   #3
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
Hi Kovid!

I'm very thankful for your quick reply.

I tried the code you provided, but it didn't seem to do the trick. Perhaps the previous diagram wasn't quite clear. Here's another screenshot:



The spaces between paragraphs, marked "*", is somewhat bigger than the spaces between lines within a paragraph, marked "#".

I wonder if this could be achieved with extra css codes? Thanks!
greenapple is offline   Reply With Quote
Old 01-12-2010, 12:21 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,380
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
it can and the extra css code i gave you achieves precisely that, provided the text in your document is in actual <p> tags and not just separated by <br> tags. Try increasing the amount to 15px
kovidgoyal is online now   Reply With Quote
Old 01-12-2010, 12:30 AM   #5
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
I tried using the code
p { margin-top: 5px; margin-bottom: 5px; }
again, changing 5px to other figures, eg 15px, 20px. It appears there's no effect at all to the paragraph spacing..

I googled and found this code for widening paragraph spacing
p {
margin-top: 0em;
margin-bottom: 2em;
}

source: http://www.boutell.com/newfaq/creati...phspacing.html

Again, applying this code does not cause any noticeable change to the paragraph spacing in my epub output.

I've set as my default preferences base font as 13px, font key as 11, 12, 13, 15, 17. Could this have anything to do with it?
greenapple is offline   Reply With Quote
Advert
Old 01-12-2010, 12:50 AM   #6
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
I've tried converting a .html file with <p> line breaks, a txt document, a .lit file, but they don't seem to respond to the margin-top and -bottom css code.

Thanks anyway, Kovid. I can totally enjoy my converted ebooks without the extra spacings. It's not essential.
greenapple is offline   Reply With Quote
Old 01-12-2010, 12:57 AM   #7
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
This method of using specific margins for p works very well for me, and makes it possible to fit more text on the screen. I usually combine it with a small indent as well.

Check the rest of the css so you don't have other settings that negate the margin settings for p, later in the code.
Adoby is offline   Reply With Quote
Old 01-12-2010, 07:10 PM   #8
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
Hi

I've tried to work at it for hours, trying to achieve the desired effect. I've used a number of different files/configurations, and I've also completely reinstalled Calibre.

But totally without success.

I wonder if anyone could be kind enough to use the attached file and run it through Calibre's conversion engine to create an epub with the effect described, using the margin-top and -bottom css code.

Just curious if it was something to do with my pc configuration or it's possibly a bug?

Thanks very much.
Attached Files
File Type: lit A_Christmas_Carol.lit (164.6 KB, 319 views)
greenapple is offline   Reply With Quote
Old 01-12-2010, 09:12 PM   #9
GeneS
eBook Enthusiast
GeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enough
 
GeneS's Avatar
 
Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
Quote:
Originally Posted by greenapple View Post
Hi

I wonder if anyone could be kind enough to use the attached file and run it through Calibre's conversion engine to create an epub with the effect described, using the margin-top and -bottom css code.

Just curious if it was something to do with my pc configuration or it's possibly a bug?

I converted your .lit file to .epub using Calibre's engine as you requested. The resulting file had a 1 em bottom margin between paragraphs. It appears to work just fine for me.
GeneS is offline   Reply With Quote
Old 01-12-2010, 10:54 PM   #10
greenapple
Evangelist
greenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enoughgreenapple will become famous soon enough
 
Posts: 404
Karma: 664
Join Date: Dec 2009
Device: Kindle Paperwhite, Kindle DX, Kobo Aura HD
Thanks, GeneS.

Hmm... I guess it must be something to do with my system. Can't figure out what could have caused it though. (My OS = Vista, default browser = Firefox.)

It's one of those pc mysteries that couldn't be solved.
greenapple is offline   Reply With Quote
Old 02-19-2011, 11:37 AM   #11
JohnnyRocks
Zealot
JohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-booksJohnnyRocks has learned how to read e-books
 
Posts: 116
Karma: 960
Join Date: Feb 2011
Device: PocketBook 360
I'm seeing the same thing on my end, and I believe it has to do with the fact that RE-converting Epubs (after you have already converted to them initially), causes this. Take a clean download of an epub or whatever format, and try again. It will work
JohnnyRocks is offline   Reply With Quote
Old 02-22-2011, 01:40 AM   #12
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by kovidgoyal View Post
In extra css add

p { margin-top: 5px; margin-bottom: 5px; }
but it should be pointed out, as per my REJECTED bug report, that that does not always work

specifically it will NOT work on any book which has previously been converted with the remove blank lines option ticked.

I learnt that the hard way. I ticked remove blank lines so as to use the linked set indent feature ( which is not accessible unless you also tick remove blank lines)

I then find to my horror, this undocumented side effext - that extra CSS is now broken for that book; and worse, that this is not seens as a defect, either in the program or in its documentation.
cybmole is offline   Reply With Quote
Old 02-22-2011, 02:32 AM   #13
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,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by JohnnyRocks View Post
I'm seeing the same thing on my end, and I believe it has to do with the fact that RE-converting Epubs (after you have already converted to them initially), causes this. Take a clean download of an epub or whatever format, and try again. It will work
Most likely what I'm about to say has nothing to do with your problem, but are you aware that once you convert a book calibre remembers your conversion settings and even if you change your main conversion settings under Preferences, the per book conversions settings remain the same. You can clear these settings three ways.
  1. Clicking Restore Defaults in the single book conversion window.
  2. Uncheck Use saved conversion settings for individual books in the bulk conversion window.
  3. Select the books you want cleared of old conversion settings, open the bulk metadata edit window and check remove stored conversion settings for the selected books then click OK.
Any of the above three should cause the books to revert to the main Preferences conversion settings.
DoctorOhh is offline   Reply With Quote
Old 02-22-2011, 03:51 AM   #14
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
i tried thw wipe saved conversion settings trick - no joy.

the root causeof the "bug" and I still consider it a bug - in documentation / code or both is this:

the mechanism used for set indents+remove blank lines ( a paired option - set indents is not available by itself) is:
add explicit margin top, margin bottom =0 definitions to every relevant css entry.
once that has happened the cascading css rules prevent p - whatever in extra css from overriding.

I was following a logical - fix one thing at time clean -up program
my step 1 was to standardise all my indents - so I ran all epubs through the set indent to 1em option ( wchih necessitated also having remove blank lines active)
by step 2 was to be set my preferred line spacings via CSS and that is where it all went pear shaped.

I did take a full backup beforehand so I could revert, but I decided instead to slog on & fix the line spacings book by book, and do a remove indent for 1st paragraph onlytidy-up at the same time - then flag which books I had optimised.
cybmole is offline   Reply With Quote
Old 02-22-2011, 04:09 AM   #15
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,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by cybmole View Post
the root causeof the "bug" and I still consider it a bug - in documentation / code or both
Could be a bug in documentation. Calibre is not a ebook editing suite. What this means is the options to adjust a book were put there to meet specific broad demands to make books more readable. This does not fine tune books and if a person is very particular they end up having to go elsewhere to fine tune their books.

Personally I made my peace with the compromises that calibre makes. I use the remove spaces between paragraphs and add a 1.1em indent. At the same time I have calibre insert a blank line. This gives a indent and a space between my paragraphs. This combination did destroy soft scenes breaks, but the recent heuristics will usually allow my soft scene breaks to become hard scene breaks so they don't get lost.
DoctorOhh 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
Problems with Line Height Formatting JohnnyRocks Conversion 4 02-20-2011 07:10 AM
EPUB output kovidgoyal Calibre 920 02-05-2011 11:59 AM
changing text line-height in css wjcroft EPUBReader 0 12-15-2010 03:13 PM
Epub line height problem dorotie Calibre 5 08-24-2010 03:23 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM


All times are GMT -4. The time now is 04:10 AM.


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