Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-18-2011, 09:24 AM   #61
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,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Gah! What a messy convert. (I say this, just from looking at the Calibre numbers assigned.)


<body class="calibre5">
<div class="calibre6">
<h1 class="calibre11" id="calibre_pb_21"><span class="calibre12">ten</span></h1>

<div class="calibre13"></div>

<p class="calibre10"></p>

You did not show The baisic body CSS (calibre5)
Then there is the Div (calibre6)
Then there is the Heading (calibre11 calibre12) that appear to do the same things differently
then there is the div (calibre13) which may have been a HR ar some time (it has a small height value consistent with line thickness)

You have Line heights (I rarely use them except in mixed font size cases), margins, empty (no text/image) div's and p's
theducks is offline   Reply With Quote
Old 02-18-2011, 09:56 AM   #62
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
yes- well blame Amazon & callibre for that, they are the culprits -

I could search for a rael short, simple failed book if you like,

but the core issue is that none of the dozens of books I tested will accept overrides of margin after being converted with remove blank lines in calibre.
so nitpicking specific examples is not helping any. pls try what I said - pick any book you have and do the 2 step outlined above - tell me if you replicate the issue

her is the entire css for the previous example - purists look away now
.calibre {
display: block;
font-size: 1em;
line-height: 1.2;
margin-bottom: 0;
margin-left: 0;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
page-break-before: always
}
.calibre1 {
display: table-row;
vertical-align: middle
}
.calibre10 {
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: justify;
text-indent: 1em
}
.calibre11 {
display: block;
font-size: 1.25em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
margin-top: 0;
page-break-before: always;
text-align: center
}
.calibre12 {
color: windowtext;
font-size: 0.9em;
font-weight: bold;
line-height: 1.2
}
.calibre13 {
border-bottom: 0;
border-top: 0;
display: block;
height: 4px;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-indent: 1em
}
.calibre14 {
color: black;
font-size: 1em;
line-height: 1.2
}
.calibre15 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 24px;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1em
}
.calibre16 {
color: black;
font-size: 1em;
font-style: italic;
line-height: 1.2
}
.calibre17 {
font-size: 0.75em;
line-height: 1.2;
vertical-align: sub
}
.calibre18 {
color: windowtext;
font-size: 1em;
font-style: italic;
line-height: 1.2
}
.calibre2 {
display: block
}
.calibre3 {
color: white
}
.calibre4 {
display: block;
margin-bottom: 0.3em;
margin-left: 0;
margin-right: 0;
margin-top: 0.3em
}
.calibre5 {
display: block;
font-size: 1em;
line-height: 1.2;
margin-bottom: 0;
margin-left: 0;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
page-break-before: always;
tab-interval: 0.2in
}
.calibre6 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-indent: 1em
}
.calibre7 {
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: 1em
}
.calibre8 {
color: windowtext;
font-size: 1em;
font-weight: bold;
line-height: 1.2
}
.calibre9 {
color: windowtext;
font-size: 1em;
line-height: 1.2
}
.cbjauthor {
display: table-cell;
font-size: 1em;
line-height: 1.2;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
text-align: center;
vertical-align: inherit
}
.cbjbanner {
-webkit-border-radius: 8px;
background: #eee;
border: thin solid black;
display: block;
margin-bottom: 1em;
margin-left: 1em;
margin-right: 1em;
margin-top: 1em;
padding-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
padding-top: 1em
}
.cbjcomments {
display: block;
font-family: sans-serif
}
.cbjcontent {
display: table-cell;
font-family: sans-serif;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
text-align: left;
vertical-align: inherit;
width: 67%
}
.cbjfooter {
display: block;
font-family: sans-serif;
font-size: 0.75em;
margin-top: 8px;
text-align: center
}
.cbjheader {
border-collapse: separate;
border-spacing: 2px;
display: table;
margin-bottom: 0;
margin-top: 0;
text-indent: 0;
width: 100%
}
.cbjkindlebannerhr {
border: 1px inset;
border-bottom: 2px solid black;
border-left: 0 solid white;
border-right: 0 solid white;
border-top: 0 solid white;
color: gray;
display: block;
height: 2px;
margin-bottom: 0.5em;
margin-left: 10%;
margin-right: auto;
margin-top: 0.5em;
width: 80%
}
.cbjlabel {
display: table-cell;
font-family: sans-serif;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
text-align: right;
vertical-align: inherit;
width: 33%
}
.cbjpubdata {
display: table-cell;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
text-align: center;
vertical-align: inherit
}
.cbjtitle {
display: table-cell;
font-size: 1.25em;
font-style: italic;
line-height: 1.2;
padding-bottom: 1px;
padding-left: 1px;
padding-right: 1px;
padding-top: 1px;
text-align: center;
vertical-align: inherit
}
.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;
page-break-after: always;
text-indent: 1em
}
.metadatadivider {
border: 1px inset;
border-bottom: solid black 1px;
border-left: solid white 0;
border-right: solid white 0;
border-top: solid white 0;
color: gray;
display: block;
height: 2px;
margin-bottom: 0.5em;
margin-left: 5%;
margin-right: auto;
margin-top: 0.5em;
width: 90%
}
.softbreak {
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;
page-break-before: avoid;
text-align: center;
text-indent: 1em
}
.title {
line-height: 1.2
}
cybmole is offline   Reply With Quote
Advert
Old 02-18-2011, 03:01 PM   #63
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
It could be me, but in the xhtml code snippet you posted there is no reference to the external stylesheet. It doesn't matter what you put in it then, it will not be used if there is no reference to it.

It should be in the <head> tags.
Toxaris is offline   Reply With Quote
Old 02-18-2011, 03:20 PM   #64
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
you lost me there.

afaik I don't have any special external style sheet. just the standard stylesheet.css file
i add a book to calibre, convert it to epub with remove blank lines set.
then I try to use the extra css function in calibre its just fill in the box & click OK

according to the calibre user manual, it's supposed to take what you put in that box & use it as override.

sigil is being used here only to view the xhtml & stylesheet in order to understand what is going on.

here is a start of xhtml file extract - same book as before
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Soul Identity</title>
  <link href="../Styles/stylesheet1.css" rel="stylesheet" type="text/css" />
  
<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
</style>
</head>

<body class="calibre5">
  <div class="calibre6">
    <h1 class="calibre11" id="calibre_pb_21"><span class="calibre12">ten</span></h1>

    <div class="calibre13"></div>

    <p class="calibre10"></p>

    <p class="calibre10"><span class="calibre14"><span>It took me a</span> few seconds when I woke up to remember I was in the Soul Identity guesthouse. Val and I had climbed down the hill and returned to the office, where she wasted a few hours giving me demonstrations of her new online applications.</span></p>
cybmole is offline   Reply With Quote
Old 02-18-2011, 03:57 PM   #65
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
What you want is some space above and below the paragraph? If you create a style in the stylesheet like p { margin-top: 0.3em; margin-bottom: 0.3em;} it will not work.

The reason is simple. The paragraph get the style from p and from calibre10. Unfortunately, calibre10 will overrule your desired setting, because there it is specified margin-top: 0 (among others).
Your solution could be removing the margin from the calibre settings, or setting the margin correctly in all the calibre settings.

Stylesheets are cascading, that's why your setting is overruled.
Toxaris is offline   Reply With Quote
Advert
Old 02-18-2011, 05:12 PM   #66
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
yep - diagnosis is correct but the calibre user guide claims

(extra css)...This option allows you to specify arbitrary CSS that will be applied to all HTML files in the input. This CSS is applied with very high priority and so should override most CSS present in the input document itself. ...

bottom line is - it does not work as described i.e. it cannot overrule settings which calibre itself has previously added to style sheet.

it was calibre itself which added those specific margin 0 lines e,g, into calibre 10 it does that when you run convert with remove blank lines option enabled. that is easily proved.

what we've now established is that calibre gives you a eon way ticket to no-blank-lines-land - the only way back is manual editing of style sheet either by exploding epub or with a program like sigil - most disappointing.

Last edited by cybmole; 02-18-2011 at 05:15 PM.
cybmole is offline   Reply With Quote
Old 02-18-2011, 05:49 PM   #67
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Frankly I don't care what the user guide of Calibre claims. Like I said before, I don't like the code from Calibre. For conversion it is ok, but I always cleanup afterwards. All the additional margins in every styles is annoying. It will override almost al settings you made due to the cascading.

I see where the problem arise and you could try to issue a bug to Kovid.

For your problem at hand, you can try the following. In sigil open the stylesheet and do a replace of the lines below with nothing. It is not a perfect solution, that would be a total cleanup of code.

Remove the following lines in the stylesheet of all classes:
Code:
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;
Toxaris is offline   Reply With Quote
Old 02-19-2011, 02:00 AM   #68
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
interesting - I reckon that is the code which calibre adds when you tick remove blank lines.

pity there's no automated removal method
cybmole is offline   Reply With Quote
Old 02-20-2011, 09:22 PM   #69
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,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by cybmole View Post
h1+p,h2+p, h3+p,blockquote+p{text-indent:0;}

can I combine that with also having p {text-indent: 1em} in the extra css

so that a book with no indents becomes a book with indents except at chapter start.

PS Idolise - do you have a view on why p {text-indent: 1em} fails if there are text-indent 0 entires in the stylesheet as per earlier post. and can you reproduce this bug/feature ?

meatime - testing this new suggestion - using mobi to mobi as the mobi source already has intents (previously added via extra css )...
didn't work in this case but my test book may have extra styling, as the chapter start words are in bold:
the epub looks like this.
typically there is a lot of hard to remove crap in chapter headings
Code:
<body class="calibre6">
  <h2 class="calibreclass2" id="heading_id_11"><span class="calibreclass1"><strong class="calibre7">CHAPTER</strong> 10<br class="calibre8" /></span></h2>

  <p class="calibre2"><strong class="calibre5">Robert Langdon</strong> had entered the Capitol Rotunda many times in his life,
i try a different book ( mobi to mobi again) no joy chapter start is still indented.

I'll have to test with epubs where I can see what is going on.
The CSS style calibre2 is set to have indents. And most likely, most paragraphs are <p class="calibre2">. And if that is the case, what I do is go into the CSS and copy calibre2 and make it into calibre2a with text-indent: 0. The I just go into each XML file and change calibre2 to calibre2a as needed.
JSWolf is offline   Reply With Quote
Old 02-20-2011, 09:26 PM   #70
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,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by cybmole View Post
sure I though I'd done that earlier. I'll just open a test book...
here's a slice of xhtml
Code:
<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
</style>
</head>

<body class="calibre5">
  <div class="calibre6">
    <h1 class="calibre11" id="calibre_pb_21"><span class="calibre12">ten</span></h1>

    <div class="calibre13"></div>

    <p class="calibre10"></p>

    <p class="calibre10"><span class="calibre14"><span>It took me a</span> few seconds when I woke up to remember I was in the Soul Identity guesthouse. Val and I had climbed down the hill and returned to the office, where she wasted a few hours giving me demonstrations of her new online applications.</span></p>

    <p class="calibre10"><span class="calibre14">I laughed out loud when I remembered how disappointed I was to go back to work. But I had earned my round-the-clock pay, even if I did have a hard time staying focused on the software.</span></p>
& here's the style sheet stuff
.calibre {
display: block;
font-size: 1em;
line-height: 1.2;
margin-bottom: 0;
margin-left: 0;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
page-break-before: always
}
.calibre1 {
display: table-row;
vertical-align: middle
}
.calibre10 {
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: justify;
text-indent: 1em
}
.calibre11 {
display: block;
font-size: 1.25em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
margin-top: 0;
page-break-before: always;
text-align: center
}
.calibre12 {
color: windowtext;
font-size: 0.9em;
font-weight: bold;
line-height: 1.2
}
.calibre13 {
border-bottom: 0;
border-top: 0;
display: block;
height: 4px;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-indent: 1em
}


NB I figure you can reproduce this with ANY epub - maybe I put the formula in another thread -in 2 steps it is:
1. convert epub to epub with the option to remove blank lines set(ticked) in calibre.

2. then try to add add any kind of top / bottom margin via extra css

ps the above is a clean source. it is a kindle book that i own, converted to epub by calibre, not processed by any other program ( just viewed in Sigil)
Fix calibre10. This is what it should be...
.calibre10 {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
text-align: justify;
text-indent: 1.2em
}

Now make calibre10a as follows and put in the CSS...
.calibre10a {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
text-align: justify;
text-indent: 0
}

In the XML, replace calibre10 with calibre10a where you want no indent and you are good for no indents.
JSWolf is offline   Reply With Quote
Old 02-21-2011, 02:33 AM   #71
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
thanks - I have been doing something similar.

browsing around, I found a java program called epub-tweaker - designed for quick css edits - it's a tad quicker than going via sigil if all you need to do is adjust an indent, or a margin
cybmole is offline   Reply With Quote
Old 02-21-2011, 10:08 AM   #72
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,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Way too much code

in the css
Code:
.firstpara { text-indent: 0 }
Now in your book
just ADD firstpara AFTER the calibre10
Code:
<p class="calibre10 firstpara">Ipsum ...</p>
[B]Cascade[/
B], use it or lose it
All yo did was change a single attribute. and tack that OVER the base style

Last edited by theducks; 02-21-2011 at 10:10 AM.
theducks is offline   Reply With Quote
Old 02-21-2011, 10:46 AM   #73
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
I now just use an in-line style statement, as it's easy to add with sigil's find / replace engine ( which retains recent code)

so I find a <p which follows a </h2> and replace
e.g. find
h2>\s*<p class="calibre2"
replace all
</h2> <p style "text-indent:0;margin-bottom:0.3em " - ( my preferred line space needs to be in there also )

less neat - but quick to do. the number after calibre varies from book to book.
cybmole is offline   Reply With Quote
Old 02-21-2011, 11:15 AM   #74
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,802
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 cybmole View Post
I now just use an in-line style statement, as it's easy to add with sigil's find / replace engine ( which retains recent code)

so I find a <p which follows a </h2> and replace
e.g. find
h2>\s*<p class="calibre2"
replace all
</h2> <p style "text-indent:0;margin-bottom:0.3em " - ( my preferred line space needs to be in there also )

less neat - but quick to do. the number after calibre varies from book to book.
The problem with this way is changing it later. (you also have no OTHER styling )

It takes a few moments to read the code and 'tune-up' your REGEX.
I keep a 'REGEX Notes' (txt) file and paste sample as well as both the terms along with my notes on what it does. Copy and Paste into the S+R boxes, adjust the tags. Fire in the Hole
theducks is offline   Reply With Quote
Old 02-21-2011, 11:58 AM   #75
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by theducks View Post
The problem with this way is changing it later. (you also have no OTHER styling )
yep, but I tested with several books and the default P tag was adequate except for needing to style the indent & line space. It's lazy, I know , & probably will come back to bite me someday :-)

your cascade solution is elegant but it's not clear to dummies like me, from your post exacly how to do it.

is cascade
part of the solution, or a commentary ?

seems that to do it your way I have to add 1 lines or more to my .css ( which I could paste in from one I made earlier ) and then also run a regex

I am confused because I read somewhere that you can only have one class per tag, yet you seem to have found a way of having 2 - the calibre class + the firstpara class.
how come that works, but adding (in-line) style text:indent 0 where you added firstpara does not work - I am pretty sure I tried doing it in line & it failed , even with all brackets in the correct places.

Last edited by cybmole; 02-21-2011 at 12:01 PM.
cybmole is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indents! Please Help! Ephraim Sigil 8 11-23-2010 03:43 PM
Margins and Indents sloecoach Calibre 2 09-26-2010 04:41 PM
Display of Hanging Indents crutledge Workshop 1 09-25-2009 06:09 PM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 10:37 AM
Hanging indents? llasram Kindle Formats 11 01-05-2009 10:59 AM


All times are GMT -4. The time now is 07:10 PM.


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