Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2012, 07:03 AM   #16
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Thanks! But the problem is everywhere, not just confined to individual paragraphs.

I have white space between every paragraph in the book. And so far, I have nothing in my stylesheet save for the code that is supposed to eliminate those spaces (but doesn't).
Alda is offline   Reply With Quote
Old 06-26-2012, 08:06 AM   #17
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Post the entire contents of the CSS file (including the case-sensitive file name of the CSS file). And the beginning of one of the html files (starting with the <html> tag and going straight through and including several paragraphs that are exhibiting the white-space problem).

If every paragraph doesn't have the <br /> at the end of it, then something else must be wrong (either with the CSS itself—and/or how it's linked—or something else in the html).

The guessing and the "after looking more closely"s are getting us nowhere.

Also, what are you viewing the ePub with when you see the white space? Is it only in Sigil's Book View or have you opened the ePub in ADE or any other programs? Please tell me that it's not the white space in Code View that you're trying to get rid of.

Last edited by DiapDealer; 06-26-2012 at 08:12 AM.
DiapDealer is online now   Reply With Quote
Old 06-26-2012, 06:04 PM   #18
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
@DiapDealer - you got it. Here are the contents of the CSS file, which is called Icelandic_Folk_Legends.css:

Quote:
{margin: 0; padding: 0;}
And the beginning of one of the html files:

Quote:
<?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></title>
<link href="../Styles/Icelandic_Folk_Legends.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h1 class="sgc-1" id="heading_id_2">Introduction<br xmlns="http://www.w3.org/1999/xhtml" /></h1>

<div>
<br />
</div>

<p>O<small>NE EVENING, MANY YEARS</small> ago, I was travelling through south Iceland with two of my cousins. We stopped in the town of Vík to camp for the night. After pitching our tent at the campsite we decided to take a walk before turning in. It was in the middle of summer, so it was broad daylight even though it was late in the evening.</p>

<p>After a short stroll we came to a place where we had a gorgeous black sand beach on our right, a grassy area (on which we were walking) in the middle, and a steep mountainside on our left. The waves were rolling in, and on the beach was a large colony of arctic terns. As many readers will know, arctic terns are exceedingly aggressive birds, and as we passed, literally hundreds, if not thousands, of them flew up screeching and shrieking, instantly starting to dive-bomb our heads in an effort to drive us away.&nbsp;</p>

<p>Suddenly we stopped dead in our tracks. Through the screeching of the birds we heard this incredible sound, like a huge banquet going on, with hundreds of people laughing and talking, glasses clinking, dinnerware clanking… all coming from somewhere beyond the cliffs. We looked at each other, completely mystified. Where was that sound coming from? Was it from the campsite? We decided it couldn’t be – we’d only just left it and the number of people required to make that sound, not to mention all those glasses and dinnerware, could not possibly have been transported there in such a short time. Was it from the town? Hardly – the sound seemed like it was just beyond our line of vision and the town was too far away. Was there a banquet hall around, somewhere? Perhaps back from where we had come? We certainly couldn’t rule it out, even though none of us had seen one.</p>

<p>The strange thing was, the party sounded like it was inside the cliff, but we obviously knew it couldn’t be. Or could it? We had pretty much ruled out all possibilities, and were starting to think Shakespeare had hit the nail on the head with the immortal words: <i>There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy</i>.</p>

<p>We stood there for about ten minutes. That is how long it took us to recognize that the sound was being made by the combination of the birds screeching and the waves rolling in, echoing off the cliffs to our left. At that moment we realized that this was the sort of fantastical experience that must have made our ancestors conclude that trolls lived inside the mountains. How could they possibly have come to any other conclusion?&nbsp;</p>

<p>We mused on this a while as we continued our trek. We thought about all those formations rising out of the lava fields that seemed to move in the mist or twilight. Or dark shapes on the rims of the mountains, which appeared to be alive in the fading light, when silhouetted against the sky. And what about the howls of the wind in the mid-winter nights? Surely it was not too much of a stretch to believe those were the voices of the dead – particularly if the presence of ghosts was a normal part of life for you.</p>
I had already removed a <p>&nbsp;<br /> from the end of the first paragraph.

I am viewing the ePub both in Sigil's book view, and in Adobe Digital Editions.

And no, it's not the white space in code view that I want to remove. I'm not that much of a novice.

Thanks for your help.
Alda is offline   Reply With Quote
Old 06-26-2012, 06:39 PM   #19
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: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
p {margin: 0; }
should do it if it appears in Icelandic_Folk_Legends.css and there is no other P in the stylesheet with a margin
theducks is online now   Reply With Quote
Old 06-26-2012, 07:24 PM   #20
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Alda View Post
And no, it's not the white space in code view that I want to remove. I'm not that much of a novice.
Sorry... I had to ask.
And I agree with theducks:
Quote:
Originally Posted by theducks View Post
p {margin: 0; }
should do it if it appears in Icelandic_Folk_Legends.css and there is no other P in the stylesheet with a margin
... and if "Icelandic_Folk_Legends.css" exists in the Styles folder when you open the ePub in Sigil.

-----

The only thing I would possibly question is that maybe your sample html hasn't been copied directly from Sigil? If it were, I'd expect the initial <?xml?> tag to look something like:
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
or
Code:
<?xml version="1.0" encoding="utf-8"?>
instead of just
Code:
<?xml version="1.0"?>
To be the most help, we really need to verify what all the various pieces look like exactly as they appear in Sigil, rather than what they might look like before you import ... add ... paste ... or any other methods you might use to get them into a Sigil ePub. I only bring it up because; "How do I prepare my HTML/CSS before I import it into Sigil?" is a totally different question than "Once I have the code in Sigil, how do I make it do the things I want?"

Last edited by DiapDealer; 06-26-2012 at 07:32 PM.
DiapDealer is online now   Reply With Quote
Old 06-26-2012, 07:41 PM   #21
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Quote:
Originally Posted by DiapDealer View Post
The only thing I would possibly question is that maybe your sample html hasn't been copied directly from Sigil? If it were, I'd expect the initial <?xml?> tag to look something like:
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
or
Code:
<?xml version="1.0" encoding="utf-8"?>
instead of just
Code:
<?xml version="1.0"?>
Nope, I copied the above sample directly from Sigil. So I have no idea why it doesn't look the way it should. Could it be an outdated copy of Sigil? I haven't updated since sometime early last year.

I checked a few more files and they all have the <?xml version="1.0"?>

In any case, thanks for all your help. It's much appreciated. I'll try your suggestions tomorrow when I have a bit more time.
Alda is offline   Reply With Quote
Old 06-26-2012, 08:22 PM   #22
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Alda View Post
Nope, I copied the above sample directly from Sigil. So I have no idea why it doesn't look the way it should. Could it be an outdated copy of Sigil? I haven't updated since sometime early last year.
It could be that way in an older version, I'm not really sure—but that shouldn't really matter here. Neither will the xml tag specifically, but I just wanted to verify that we weren't looking at a pre-Sigil (external) html file that was then being "Added" or opened with Sigil. That would matter, because of the relative path to the CSS file that Sigil would be looking to import along with the HTML (and possibly not finding).

Anyway... how about this. Here's an epub that has the exact html code you posted and the simplest of CSS that achieves what you're talking about (or at least it works when I view it Sigil's Book View or in ADE).

Compare it to what you have and maybe it will help you find where things are going wonky.
Attached Files
File Type: epub Spacing Sample.epub (3.5 KB, 179 views)
DiapDealer is online now   Reply With Quote
Old 06-27-2012, 07:32 AM   #23
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
OK, now I am completely flummoxed. I can't find any difference between the code in the sample you sent and my own document. When I open the sample in Sigil, I don't get the spaces, but on my own document I do.

Did you alter the document in any way?? What's happening (aaaarrrggghhh!!!)

UPDATE: Never mind, the p {margin: 0; } did the trick. Whoohoo!

NOW ... is there an easy way to get the first line of each paragraph to indent, but not the first line of each chapter? - Or, if it's too much fuss to leave out the first line, I can do that manually.

Thanks so much!

Last edited by Alda; 06-27-2012 at 07:40 AM.
Alda is offline   Reply With Quote
Old 06-27-2012, 07:57 AM   #24
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Alda View Post
NOW ... is there an easy way to get the first line of each paragraph to indent, but not the first line of each chapter? - Or, if it's too much fuss to leave out the first line, I can do that manually.
Check this attached ePub out for possible indentation solutions.
You'll have to get rid of the:
Code:
<div>
  <br />
</div>
between the chapter header and the first paragraph for it to work properly, though.

You could also create a special css class and assign it to the first paragraph in every chapter/section.
Attached Files
File Type: epub Sample2.epub (3.6 KB, 175 views)
DiapDealer is online now   Reply With Quote
Old 06-27-2012, 08:05 AM   #25
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Thanks for the swift reply!

However, I'm not sure what I should be looking at. All I see is the same code as before (see attached). I'm guessing you did something to the stylesheet - am I right? Or where is the code that controls the indents?
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2012-06-27 at 12.05.30 PM.png
Views:	231
Size:	136.2 KB
ID:	88396  
Alda is offline   Reply With Quote
Old 06-27-2012, 08:13 AM   #26
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Alda View Post
Thanks for the swift reply!

However, I'm not sure what I should be looking at. All I see is the same code as before (see attached). I'm guessing you did something to the stylesheet - am I right? Or where is the code that controls the indents?
Yes, the changes were in the stylesheet. There's no need to guess what I did ... it's all there in two tiny little files.

Last edited by DiapDealer; 06-27-2012 at 08:16 AM.
DiapDealer is online now   Reply With Quote
Old 06-27-2012, 08:49 AM   #27
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Ah. I get it now. I need to open the book browser to access the css file.

I'm getting such an education in these forums!

Thanks so much for your invaluable help!
Alda is offline   Reply With Quote
Old 06-27-2012, 09:06 AM   #28
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Alda View Post
Ah. I get it now. I need to open the book browser to access the css file.
I was beginning to suspect you might not be seeing/editing the CSS file from within Sigil.

Quote:
Thanks so much for your invaluable help!
You're quite welcome.
DiapDealer is online now   Reply With Quote
Old 06-27-2012, 09:48 AM   #29
Alda
Zealot
Alda began at the beginning.
 
Posts: 104
Karma: 22
Join Date: Jun 2010
Device: none
Dang! Here I thought I was out of the woods and that it was smooth sailing from now on. :/

For some reason, the styling code that you so kindly provided in the stylesheet doesn't extend to this file (see attached). Any idea why?
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2012-06-27 at 1.48.14 PM.png
Views:	239
Size:	108.2 KB
ID:	88397  
Alda is offline   Reply With Quote
Old 06-27-2012, 10:16 AM   #30
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,598
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Alda View Post
For some reason, the styling code that you so kindly provided in the stylesheet doesn't extend to this file (see attached). Any idea why?
None of the styling is being applied to that file? I'm guessing that you mean everything is working except the "no indent on the first paragraph in the chapter" bit, right?

If so, that's because for that bit to work, there can't be anything between the <h1> heading and the first <p> tag. That file you showed had an <h2> tag in between them. If an h2 tag will always immediately precede the first p tag, you can simply change the css code to:
Code:
h2 + p {
	margin-top: 2em;
	text-indent: 0;
	}
If sometimes it's there and sometimes it's not (<h2>), you can it apply to both:
Code:
h1 + p, h2 + p {
	margin-top: 2em;
	text-indent: 0;
	}
Might as well include h3's as well:
Code:
h1 + p, h2 + p, h3 + p {
	margin-top: 2em;
	text-indent: 0;
	}
DiapDealer is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove white space between paragraphs for iPad? kabloooie Conversion 4 05-28-2012 05:11 AM
Removing space between paragraphs in a Mobi book HarryT Conversion 7 08-07-2011 10:42 AM
space between paragraphs gatorman Sigil 3 01-07-2011 10:17 AM
How to reduce indents without "removing space between paragraphs" Skydog Calibre 5 06-05-2010 12:58 AM
Removing unwanted white space JayLaFunk Sigil 4 03-19-2010 11:33 AM


All times are GMT -4. The time now is 06:00 PM.


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