Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2013, 04:55 AM   #1
Acharn
Member
Acharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheese
 
Posts: 23
Karma: 1010
Join Date: Jul 2012
Device: none
How to Change Paragraph Indentation

I just downloaded an epub that may have been converted in Calibre. All the rules in the CSS are .calibre, .calibre1, .calibre2, etc. My problem is there is a blank line between paragraphs, and the first line of each paragraph, including in the Table of Contents, is indented. I'm new to editing ebooks. In fact I just started using Kompozer to remove page numbers and unwanted line breaks in some books converted from .pdf. I used to know HTML and CSS, so when I learned about the structure of EPUBs I thought I could do this, but I don't see any CSS that refers to <p> or text-indent. I've tried searching the forum, and Google in general, but I haven't hit on the right combination of keywords. Can someone point me toward a good beginner's page on using CSS for formatting EPUBs? Or maybe just tell me why the paragraphs in this book are indented when in some others (converted from .pdf, but on my computer) are not.
Acharn is offline   Reply With Quote
Old 01-30-2013, 05:29 AM   #2
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
what reader are you seeing this on? i believe that the desktop nook reader software will auto-indent paragraphs unless you've explicitly declared text-indent: 0; in the css. i don't think it's unlikely that other e-readers also exhibit this behaviour.

the spacing between <p> tags probably is the result of padding-top or -bottom in the css, unless there are empty paragraph tags in the html itself (<p>&nbsp;</p>)
mzmm is offline   Reply With Quote
Advert
Old 01-30-2013, 05:46 AM   #3
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Suggest you use Sigil for the epub editing job. It is more stable than Kompozer, made for job and has a lot of features that make things much easier.

With it you can make changes in the css and note the changes in book view.

Make sure that you do not have css at the top of each individual file that is governing this, or that there is in a stylesheet that is controlling everything. Calibre throws in a lot of its own styles which can be overlapping and hard to figure out. Some people just strip them all out in Sigil and take it from there.

It is possible to use Mobipocket Creator to create an html file from the pdf and then add the pages to a blank Sigil document. It will pull in all the associated pictures while it is doing that. The primary shortcoming to this method is that it does not keep the files in order, so it is necessary to drag them around in the book browser in Sigl to get them in order.
mrmikel is offline   Reply With Quote
Old 01-30-2013, 06:52 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Welcome back to HTML/CSS - and, of course, the forum!

W3Schools has a pretty good HTML/CSS/JS tutorial and reference site that will get you back up to speed with the latest changes. Here's a link to their CSS tutorial http://www.w3schools.com/css/default.asp

One thing to keep in mind - while HTML5 and CSS3 are out and ePub 3 is a standard, there are very few devices that support it fully (yet). Most ePubs are written to the ePub 2 standard which only supports CSS2. Sigil currently only produces valid ePub 2 - with plans to incorporate ePub3 in the (near??) future.

That might allow you to focus your studies!

Cheers!
Turtle91 is offline   Reply With Quote
Old 01-30-2013, 09:43 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,896
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Before I try to help, I have some questions.

Acharn, is that Calibre converted ePub a legal download? What book is it?

The reason I ask this is that we've had too many people download illegally and then come here for help with these illegal eBooks.
JSWolf is offline   Reply With Quote
Advert
Old 01-31-2013, 12:16 AM   #6
Acharn
Member
Acharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheeseAcharn can extract oil from cheese
 
Posts: 23
Karma: 1010
Join Date: Jul 2012
Device: none
Thanks to all of you for helping. I am using Calibre on my desktop PC to read my books. I finally spotted the offending CSS -- it was in the User Stylesheet of the E-Book Reader. Thanks for the reminder of the tutorial at W3C. I used that when CSS first came out and have gone back to it a few times since, but not for six or seven years. How quickly I forget!
Acharn is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppress indentation of first paragraph btab Conversion 3 12-11-2012 01:49 AM
[Suggestion] Change indentation to one letter per indentation level. John Peterson Development 1 10-22-2012 02:05 PM
Preference: Paragraph indent or a little paragraph spacing? 1611mac General Discussions 48 11-11-2011 12:43 AM
control blockquote indentation bobb40 Conversion 9 08-10-2011 05:04 AM
Preserving Indentation zaph0d Conversion 5 05-30-2011 04:41 PM


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


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