04-10-2012, 02:03 PM | #1 |
Enthusiast
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
|
Unruly books
Hello,
I've run into several books that seem to defy my efforts to get them to look the way I want them to. I'm looking at one right now where the first, and only the first, paragraph of a chapter is indented. Since I prefer no spaces between paragraphs, I also prefer the start of every paragraph to be indented. That's not normally difficult to achieve, but I'm having trouble with this one. A typical page looks like this: Code:
<head> <title> ... title ... </title> <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" /> <style type="text/css"> /*<![CDATA[*/ @page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; } /*]]>*/ </style> </head> <body class="calibre"> <div class="calibre1"> <h3 class="calibre2" id="heading_id_2"><span class="calibre5 bold">...chapter title...</span></h3><br class="calibre4" /> <p class="calibre2"><span class="calibre3">... first paragraph...</span><br class="calibre4" /> <span class="calibre3">... second paragraph...</span><br class="calibre4" /> <div class="mbppagebreak" id="calibre_pb_8"></div> </div> </body> Code:
@namespace h "http://www.w3.org/1999/xhtml"; .bold { font-weight: bold } .calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .calibre1 { border-bottom: 0; border-top: 0; display: block; margin-bottom: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-indent: 1.5em } .calibre2 { border-bottom: 0; border-top: 0; display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-indent: 1.5em } .calibre3 { font-size: 1em } .calibre4 { display: block } .calibre5 { font-size: 1.29167em; line-height: 1.2 } .calibre6 { color: blue; cursor: pointer; text-decoration: underline } .calibre7 { color: blue } .calibre8 { border-bottom: 0; border-top: 0; display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-align: center; text-indent: 0 } .calibre9 { border: 1px inset; color: gray; display: block; height: 2px; margin-bottom: 0.5em; margin-left: auto; margin-right: auto; margin-top: 0.5em; text-indent: 75% } .italic { font-style: italic } .mbppagebreak { border-bottom: 0; border-top: 0; display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-top: 0; text-indent: 1.5em } .underline { text-decoration: underline } I've tried adding "text-indent: 1.5em;" to calibre3, adding "p {text-indent: 1.5em}" at the end of the stylesheet, adding "* {text-indent: 1.5em}" at the end of the stylesheet, and adding "text-indent: 1.5em;" to the @page. None of those things made any difference at all. At this point I'm stumped. Does anybody out there have any ideas about this? Oh yes, I'm using Sigil 4.7.4. Thanks, Denver |
04-10-2012, 02:21 PM | #2 |
Grand Sorcerer
Posts: 27,478
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The problem is that you appear to actually have only one paragraph. That's why only the very first line is being properly indented. The code is only simulating paragraph breaks using <br /> tags. Also note that the "text-indent" attribute cannot be applied to <span> tags... it has no effect.
I'm afraid you have your work cut out for you. You need to overhaul the code so you have individual paragraphs, instead of giant paragraphs that are divided with <br /> tags. I've run into those situations before. They suck. No choice but to dive in and start rewriting. You can attempt to replace those <br class="calibre4"/> tags with </p><p class="calibre2> for starters, but always keep a good backup because that kind of major Find and Replace surgery may very well break other things badly. Last edited by DiapDealer; 04-10-2012 at 04:39 PM. |
Advert | |
|
04-10-2012, 04:25 PM | #3 |
Enthusiast
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
|
Oh, of course. Now that you've pointed it out, it's obvious. I'll try the find & replace first and see how that does, keeping in mind your advice about backup copies.
Thanks for the help, Denver |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Noobs Guide to Borrowing E-Library Books and Installing non Kobo Bookstore Books | bamelin | Kobo Reader | 17 | 01-07-2012 04:11 PM |
Free (Kindle/Nook)(some at Sony/iBooks) Six books from Writers Digest Books | arcadata | Deals and Resources (No Self-Promotion or Affiliate Links) | 12 | 11-13-2011 02:10 PM |
Free (Kindle) Safari Books Online books (OReilly Media) | arcadata | Deals and Resources (No Self-Promotion or Affiliate Links) | 6 | 08-17-2011 05:19 PM |
Free books (Kobo) - 20 Dorchester Publishing Books (Romance, Horror, Thriller etc.) | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 15 | 09-24-2010 07:01 PM |
Two free books (kobo) from Francesca Lia Block [BOOKS DELETED BY AUTHOR] | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 11 | 04-08-2010 06:03 AM |