Thread: Unruly books
View Single Post
Old 04-10-2012, 02:03 PM   #1
denverh
Enthusiast
denverh began at the beginning.
 
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>
The stylesheet is like this:
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
    }
This particular book was also missing spaces between sentences. I used a regexp to try adding a couple spaces between, and that worked, more or less. I ended up with one space, not two like I was aiming for. But that's a separate, minor, issue at this point.

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
denverh is offline   Reply With Quote