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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-07-2011, 03:44 AM   #1
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
another no indent for 1st para question

this book code is achieving the "no indent in 1st para" effect but I cannot suss the mechanism. it has the same styling as other paras. (the added calibre2 style is simply "block")

is it something to do use of new line for 1st line text ( which confusingly seems to have added space at start of line in html) ??
Code:
.....>1. Sorpen</h1>

  <p class="western1"><br class="calibre2" />
  The level was at his top lip now. Even with his head pressed hard back against the stones of the cell wall his nose was only just above the surface. He wasn't going to get his hands free in time; he was going to drown.</p>

  <p class="western1">In the darkness of the cell....
appearance
1. Sorpen

[no indent appears here
]The level was at his top lip now. Even with his head pressed hard back against the stones of the cell wall his nose was only just above the surface. He wasn't going to get his hands free in time; he was going to drown.


[1 em indent appears here ]In the darkness of the cell, in its stink and warmth...

.calibre2 {
display: block
}
.western1 {
border-bottom: 0;
border-top: 0;
display: block;
font-family: "Times New Roman", serif;
font-size: 1em;
line-height: 1.2;
margin-bottom: 0.3em;
margin-top: 0;
orphans: 2;
padding-bottom: 0;
padding-top: 0;
text-indent: 1em;
widows: 2
}


PS what do widows & orphans settings in style do, in an ebook - are they redundant ? google tells me they are (paper) pagination controls

Last edited by cybmole; 03-07-2011 at 03:54 AM.
cybmole is offline   Reply With Quote
Old 03-07-2011, 04:06 AM   #2
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
Widows and Orphans should prevent that single lines will be on one page or another. In ePub it usually means that that if one line of the paragraph is on the next page, more lines are moved to the next page. There was a thread about that not long ago.

Your problem could be the result of the <br /> inside the same paragraph. If you want a line to appear before the paragraph or after the header, why not solve it with margins? Add a margin-bottom to the <h1> style in CSS or a margin-top to the <p>, perhaps even creating a special class for it, like this:
Code:
p.initial {
  margin-top: 1em;
}
Toxaris is offline   Reply With Quote
Advert
Old 03-07-2011, 04:34 AM   #3
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
my "problem " is simply that i don't understand how the no-indent is being achieved with this code. the 1st para style - western1 has 1em indent, yet the 1st line of text appears not indented. that is what I do no understand.

I do know how to do no-indent 1st para in other ways we had a very long thread on the topic recently.- this book seems to use a different solution - that's all.
cybmole is offline   Reply With Quote
Old 03-07-2011, 06:11 AM   #4
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
It's because of the <br> tag that's on the first paragraph, the line is breaking, so then the rest of the text has no indent.
Edit: As you would do for some poetry/list etc.

Either remove <br> tag or add a few chars before it and you'll see that the indent is there, but the line as it stands is blank.

Last edited by Perkin; 03-07-2011 at 06:14 AM.
Perkin is offline   Reply With Quote
Old 03-07-2011, 07:11 AM   #5
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
ok thanks- so 1 simple way to edit a book to remove indents from only 1st paragraphs is to just add <br> at start of each 1st line - that seems much easier than the methods discussed in the previous long thread ?

I tried it on a different, random, book & it works fine.

Last edited by cybmole; 03-07-2011 at 07:27 AM.
cybmole is offline   Reply With Quote
Advert
Old 03-07-2011, 10:34 AM   #6
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Only trouble then is there's an extra line of blank space above each paragraph you do it to.
As it's usually first par, it shouldn't matter that much.
As long as you're happy with results, go whichever way you like.
Perkin is offline   Reply With Quote
Old 03-07-2011, 11:25 AM   #7
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 often tweak the amount of space around headers anyway, so that's no big deal.
what I like about this <br> solution is it's relative simplicity - no need to go to css & define a new noindent style.
cybmole is offline   Reply With Quote
Old 03-11-2011, 06:33 PM   #8
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 Perkin View Post
It's because of the <br> tag that's on the first paragraph, the line is breaking, so then the rest of the text has no indent.
Edit: As you would do for some poetry/list etc.

Either remove <br> tag or add a few chars before it and you'll see that the indent is there, but the line as it stands is blank.
strangely- this formatting method, although fine in epub, does not convert well to mobi - the indent returns! - as it's not a sigil issue I've created a new calibre thread in search of an explanation
cybmole is offline   Reply With Quote
Old 03-11-2011, 09:42 PM   #9
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by cybmole View Post
strangely- this formatting method, although fine in epub, does not convert well to mobi - the indent returns! - as it's not a sigil issue I've created a new calibre thread in search of an explanation
Mobi does not support CSS at all and the translations to mobi cannot support this construct. Since mobi does not support it then nothing can be done with conversion issues to fix the problem. And you are right, this has no place in the Sigil forum, or even in the Calibre forum.

Dale
DaleDe is offline   Reply With Quote
Old 03-12-2011, 02:48 AM   #10
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
sure - but I added it here so that the thread had complete info, in case others followed my lead & then wondered why it did not convert into mobi OK.

I will have to revert to defining a separate non-indent style - that approach converts OK. luckily I'd only tweaked a couple of books using the <br> tag, before noticing the issue.

I find your "mobi does not support CSS" statement misleading.

I'm sure you are technically correct, but it is "supported" in the sense that books can be created/edited in sigil using css styles then converted to mobi in calibre & the styling will carry over into mobi equivalents.
cybmole is offline   Reply With Quote
Old 03-12-2011, 04:02 AM   #11
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
No, the statement is absolutely true. Mobi does not support CSS in any form whatsoever. What's happening is that some of the Mobi creation tools - including Calibre and Mobi Creator - will convert CSS into the equivalent Mobi tag attributes, but that doesn't mean that the resulting Mobi files has CSS: it categorically does not.
HarryT is offline   Reply With Quote
Old 03-12-2011, 05:38 AM   #12
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,539
Karma: 19001081
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
... and I believe the "trick" should work in mobi fine. The following mobi code would give no visual indent, as far as I know:

Code:
<p><br>This paragraph has no indent.</p>
Of course, the proper way to have a non-indented paragraph in mobi would be:

Code:
<p width="0">This paragraph has no indent.</p>
If a mobi converter does not create the first from the equivalent ePUB, it's a bug (in my opinion).
Jellby is offline   Reply With Quote
Old 03-12-2011, 07:09 AM   #13
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
well it didn't seem to work for me - viewing the epub ( before) and the mobi ( after) versions with calibre viewer - the epub has no 1st indent but the mobi has. I tried it twice with 2 different books. I initially spotted it after sending book to kindle - I thought maybe I'd messed up conversion or copied an older version so I backtracked & double checked.

building & converting a short test file would prove for definite what is happening
cybmole is offline   Reply With Quote
Old 03-12-2011, 08:07 AM   #14
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,539
Karma: 19001081
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
It's possible that the mobi converter or reader does not like a <br> just at the beginning of a paragraph, try this:

Code:
<p>&nbsp;<br>This paragraph has no indent.</p>

...but going back to proper CSS formatting, doesn't the following work the same?

Code:
<p style="text-indent: 0">This paragraph has no indent.</p>
if you are going to modify the text to add the <br>, you could just as well add the style="text-indent: 0".
Jellby is offline   Reply With Quote
Old 03-12-2011, 08:42 AM   #15
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
been there tried that - see older threads.

problem is you don't usually just have <p> text, you have <p class="calibreX" > text and you can't apparently have <p class="whatever" as well as "text-indent: 0" all in the same line.

so you have do define a new class - calibreY with the no indent property..... which means opening & editing the .css file....

it's all doable, just more work than slotting in a quick <br> tag
cybmole 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
remove indent from 1st line of chapter only cybmole Sigil 15 02-21-2011 11:50 AM
indent control cybmole Conversion 18 02-18-2011 12:12 PM
hanging indent Oldpilot Sigil 2 11-13-2010 07:20 AM
Too much left indent! Barty Amazon Kindle 12 11-09-2010 03:43 PM
Calibre nuking para indents from epub->mobi Hitch Calibre 2 09-09-2010 10:11 PM


All times are GMT -4. The time now is 03:37 PM.


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