01-15-2018, 04:23 PM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jun 2017
Device: kindle
|
No indents and white spaces between paragraphs
I am completely baffled right now. I have formatting a number of books in SIGIL and never had any issues until today.
My process for formatting in Sigil is this: 1. Copy my document from Word (Office 365) 2. paste into word2cleanhtml. Copy. 3. Paste clean html into Notepad++ into a template created by NotJohn. 4. Save as html and open in Sigil (0.9.9) Now, my paragraphs *should* look like this: [INDENT]The dream changed when I changed. When I became. The green grass of the emerald sea decayed and fell to a wasteland, an endless graveyard of what we once were. I stumbled over the others who lay beneath me as I ran, the splinters of their bones opening the soles of my feet. [INDENT]I was no longer a child. No longer even human. Everything that had once held me together now swarmed: my bones, my skin, my flesh, my blood; I was undone. My hands-that-were-no-longer-hands were empty, my kite gone. I mourned its loss as the pieces of me ran toward the tree at the center of the barren earth. and instead they look like: The dream changed when I changed. When I became. The green grass of the emerald sea decayed and fell to a wasteland, an endless graveyard of what we once were. I stumbled over the others who lay beneath me as I ran, the splinters of their bones opening the soles of my feet. I was no longer a child. No longer even human. Everything that had once held me together now swarmed: my bones, my skin, my flesh, my blood; I was undone. My hands-that-were-no-longer-hands were empty, my kite gone. I mourned its loss as the pieces of me ran toward the tree at the center of the barren earth. This is despite cleaning the html and using a style sheet. There does not seem to be any errant html in the paragraphs: <p> The dream changed when I changed. When I <em>became.</em> The green grass of the emerald sea decayed and fell to a wasteland, an endless graveyard of what we once were. I stumbled over the others who lay beneath me as I ran, the splinters of their bones opening the soles of my feet.</p> <p>I was no longer a child. No longer even human. Everything that had once held me together now swarmed: my bones, my skin, my flesh, my blood; I was undone. My hands-that-were-no-longer-hands were empty, my kite gone. I mourned its loss as the pieces of me ran toward the tree at the center of the barren earth.</p> And the .css for p is this: p { margin-top:0.0em; margin-bottom:0.0em; text-indent:1.5em; text-align:justify; } The start of my doc looks like this: <?xml version="1.0" encoding="utf-8"?> <!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>The Gardener of Man</title> <link href="../Styles/TSOW.css" rel="stylesheet" type="text/css"/> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> </head> <body> This is so frustrating. I am hoping it's something really obvious that I'm not seeing because I am ill. Honestly, I'd welcome the embarrassment over this bewildered wtf? Thank you so much in advance! Last edited by awcross; 01-15-2018 at 04:46 PM. Reason: updated |
01-15-2018, 04:35 PM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
It's a long time since I used Sigil but I seem to remember the HTML files are always in a subdirectory called 'Text' and stylesheets in a subdirectory called 'Styles'.
In which case shouldn't your stylesheet link be Code:
<link rel="stylesheet" type="text/css" href="../Styles/TSOW.css"/>
|
Advert | |
|
01-15-2018, 04:45 PM | #3 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jun 2017
Device: kindle
|
I agree, and I've changed it. Still no joy :/
|
01-15-2018, 05:02 PM | #4 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Either there's a syntax error in your stylesheet, or your stylesheet is not correctly linked to the xhtml.
|
01-15-2018, 05:04 PM | #5 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
If there is a mistake in the CSS anyplace, the entire stylesheet can and will be ignored based on the device. Using the BookBrowser, highlight your css sheet and use the online validator to make sure it is structured properly.
If you still have issues, simplify down the css and xhtml to the barest minimum and post a test epub here so that more eyes can figure out what is going on. |
Advert | |
|
01-15-2018, 05:17 PM | #6 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Jun 2017
Device: kindle
|
Quote:
Last edited by awcross; 01-15-2018 at 05:26 PM. Reason: I'm an idiot XD |
|
01-15-2018, 05:27 PM | #7 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jun 2017
Device: kindle
|
Here is a sample epub.
|
01-15-2018, 05:53 PM | #8 |
Bookmaker & Cat Slave
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
There's something wrong with your CSS declaration. I removed it entirely by deleting the entire line and replaced it with my own--which is, in practice, identical to yours--and the indents worked fine. There's something not immediately apparent, but, once I removed it and retyped it (sorta), it worked just fine.
Now, about that "CleanHTML" or whatever that site is--if THAT is the HTML that you get out, run like hell and don't ever look back. That is some of the worst-looking cruft I've seen, if it's to be construed as "clean" HTML. All those bloody spaces, etc. That's not clean. That's the dog's breakfast. I would NOT continue to use those folks, and quite honestly, you should manually clean your first 5+ files, because you will learn loads that you will NOT learn any other way. Hitch |
01-15-2018, 06:15 PM | #9 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I wonder if it is left-over ByteOrderMarks or strange unicode whitespace characters in the css file someplace. If you are familiar with hexdumptools, you could look at the utf-8 byte codes directly to see if funny whitespace chars are present.
Last edited by KevinH; 01-15-2018 at 06:41 PM. |
01-15-2018, 06:24 PM | #10 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I see that the CSS file has Windows line-endings (CR LF) rather than *nix line-endings (LF).
That's not normal in an epub, is it? I don't know whether it causes a problem in real life, though. |
01-15-2018, 06:26 PM | #11 | ||
Bookmaker & Cat Slave
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Hitch |
||
01-15-2018, 06:32 PM | #12 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Checked. No funny chars that I saw. There is one problem, the href in the ch1.html link is wrong. I checked this by unzipping the epub and looking at the files directly:
Code:
<head> <title>The Gardener of Man</title> <link rel="stylesheet" type="text/css" href="TSOW.css"/> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> </head> Not sure how this will be imported into Sigil since the epub structure is not correct. The correct way to to this in Sigil would be to use the link stylesheet tools just to be safe. KevinH |
01-15-2018, 06:34 PM | #13 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I must be totally lost Hitch...or maybe the OP edited his file and I am not seeing what you saw. The HTML files I saw had the <p> tags on their own line and of course the empty paragraphs <p><em> </em></p> which is poor coding, but that is easily corrected with a right click and a Mend-n-Prettify. The only glaring thing I cringed at was the initial paragraph that was only surrounded by <a> tags. I thought that was a nono.
Did you see anything else??? |
01-15-2018, 06:37 PM | #14 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Confirmed. As soon as I edited the ch1.html to fix the link href, the styling showed right up in Preview.
The corrected code as mentioned earlier in this thread by jackie_w: Code:
<link rel="stylesheet" type="text/css" href="../Styles/TSOW.css"/> In the future it would probably be easier to highlight ch1.html in the BookBrowser and right click and select Link Stylesheets... would probably be a safer way to make proper links if you are unsure about the exact href needed. Last edited by KevinH; 01-15-2018 at 06:43 PM. |
01-15-2018, 06:49 PM | #15 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jun 2017
Device: kindle
|
Thanks, everyone!
I've managed to sort it. I just deleted and redid the stylesheet and relinked it, and this time it worked. I think it may have the fact that, as Kevin mentioned, there was no ../Styles/ on that first page. There *was* on the intro page before it that I removed when I was creating the sample, so I'm guessing that only the first section/page (which was an image) linked to the css and the rest of the doc didn't. Thank you so much for taking the time to help me. You're all rock stars Last edited by awcross; 01-15-2018 at 06:59 PM. |
Tags |
paragraph indent, paragraph spacing, paragraphing |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Spaces between paragraphs | Bigo2 | Calibre | 15 | 06-25-2014 03:37 AM |
Removing spaces between paragraphs | Skydog | Calibre | 12 | 02-20-2013 08:52 PM |
Help with removing indents from beginning paragraphs | markpearl | ePub | 17 | 01-26-2012 01:47 PM |
Indents and lines between paragraphs | James_Wilde | ePub | 12 | 12-17-2010 06:21 PM |
Spaces between Paragraphs in FBReader? | luqmaninbmore | PocketBook | 2 | 03-10-2010 09:09 AM |