Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2011, 02:28 AM   #1
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Tweaks/conversion/layout preferences etc

The background:
I am most grateful to Kovid and the team for giving me the ability to convert books to ePub format so that I can read them on my Sony 650. I very much appreciate the ability to take a mobi format book and transfer to my Sony, and have calibre automatically convert it.
But almost all the mobi to ePub ebook conversions I have done have no paragraph indent and no space between paragraphs, and I very much prefer paragraphs to have an indent.
I have used the Tweak utility a couple of times to text-indent: 1em; to the stylesheet.css, and it seems to work. But it was hard to know where to put this; one book has a 'title' class which governed the layout of paragraphs, and the other has a 'calibre7' class which so far as I can tell did the same job - the second book does not have a 'title' class defined in the stylesheet.

The questions:
1. Do the different classes found in an ePub converted by book follow a set format so that e.g. the calibre7 class in one book has the same function as the calibre7 class in another book? If so,
2. Is there a list available of what the various classes do?
3. Alternatively, is it possible to tell calibre before it converts the ebook that it should indent paragraphs? And if so, how?

Regards, Alex
AlexBell is offline   Reply With Quote
Old 02-17-2011, 04:39 AM   #2
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
When converting a book, in conversion dialog, Look'n'Feel
Tick 'Remove spacing between paragraphs', then on right side adjust indent.
Then also Tick 'Insert blank line'.
Perkin is offline   Reply With Quote
Advert
Old 02-17-2011, 10:03 AM   #3
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,800
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 AlexBell View Post
The background:

The questions:
1. Do the different classes found in an ePub converted by book follow a set format so that e.g. the calibre7 class in one book has the same function as the calibre7 class in another book? If so,
2. Is there a list available of what the various classes do?
3. Alternatively, is it possible to tell calibre before it converts the ebook that it should indent paragraphs? And if so, how?

Regards, Alex
#1: Not guaranteed to stay the same (or have the same values).
I see patterns when converting similar clean files . Example the class used for <body> is usually "calibre" or "calibre3". Basic <p> seems to be calibre2 or calibre4
There are lots of exceptions. (If you convert from a OCR to Word file, expect many )
rule 1: look at the code (I use Sigil)
rule 2: change to a different section of the book and repeat rule 1
theducks is offline   Reply With Quote
Old 02-18-2011, 01:11 AM   #4
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Thanks to you both. I guess I'll rely on Perkin's suggestion, though I don't remember seeing that option last time I added a mobi file to the library; it just added it.
Another option for tweaking which occurs to me is to look for the class which contains text-align: justify; in its definition and add the text-intent: 1em; (and font-family: sans-serif; ) there. It's worked so far.

By the way, a little off topic, I've noticed that some of the tag definitions in calibre do not have a trailing semi-colon. Not a good practice in my opinion.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 02-18-2011, 07:42 PM   #5
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,800
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=AlexBell;1401529

By the way, a little off topic, I've noticed that some of the tag definitions in calibre do not have a trailing semi-colon. Not a good practice in my opinion.

Regards, Alex[/QUOTE]

The last one before the } is optional as the } does it by default.
Missing in any other place is a sign of a broken entry
theducks is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Calibre plugins/tweaks baronrus Kobo Reader 2 05-24-2011 11:09 PM
Thank You for the new Tweaks Window Archon Calibre 4 02-16-2011 07:29 PM
Preferences - Plugins, Tweaks Missing Ruffy Calibre 2 02-16-2011 01:13 AM
Conversion solution to have the best layout ? Kniebolo Workshop 3 09-15-2010 07:06 AM
Mobileread RSS Tweaks Alexander Turcic Announcements 1 01-03-2005 05:52 PM


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


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