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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2013, 05:55 AM   #1
Acharn
Junior Member
Acharn began at the beginning.
 
Posts: 5
Karma: 10
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, 06: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: 163
Karma: 86115
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
Old 01-30-2013, 06: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,086
Karma: 1444487
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, 07:52 AM   #4
Turtle91
Guru
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: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
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, 10: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: 38,834
Karma: 19656443
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
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 online now   Reply With Quote
Old 01-31-2013, 01:16 AM   #6
Acharn
Junior Member
Acharn began at the beginning.
 
Posts: 5
Karma: 10
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 09:14 PM.


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