Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2014, 04:27 PM   #1
asgoreth
Junior Member
asgoreth began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2014
Device: Nook 1st generation
Unable to add margins in Sigil

Hello guys,

I've never edited an ePub before but since I need to add more margins to a book I am reading I tried to use Sigil to do so for several hours to no avail.

From what I read in the Sigil guide and forums I surmised I needed to add a page tag to the CSS sheet, and so I added the following to the end of the stylesheet:

@page {
margin-left: 25px;
margin-right: 25px;
}

As instructed on the Sigil guide, to no effect. I then placed it at the beginning, middle and end, saving the document each time, never able to get the desired margins (I want more space to the left and right of all the text in the book).

I thought about posting the full stylesheet but I don't know if it would be considered bad form here since it's so long.

Also, if it had worked would I have been able to see the results in Sigil right away?

I am using a Nook 1st generation and Sigil 0.7.4 by the way.

I really hope you guys can help me, thank you for your time.
asgoreth is offline   Reply With Quote
Old 01-30-2014, 05:25 PM   #2
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That doesn't change the margins in Sigil's Book View? Or are you talking about when viewing it on the Nook? Because I don't think the @page rule really affects Sigil's Book View. But you should see the effect on your Nook or in ADE.

I'm assuming the stylesheet you're adding the @page to is linked to all the xhtml files in you're trying to affect?

I have no idea why I've adopted the method I have; but I tend to assign left and right margin directly to the <body> element:
Code:
body {
margin-left: 3px;
margin-right: 3px;
}
and then use @page for some top and bottom margin:
Code:
@page {
margin-top: 5pt;
margin-bottom: 5pt;
}
It probably had something to with wanting to SEE (in Sigil) that I had the left/right margins the way I wanted them.

Last edited by DiapDealer; 01-30-2014 at 05:28 PM.
DiapDealer is online now   Reply With Quote
Old 01-30-2014, 07:34 PM   #3
asgoreth
Junior Member
asgoreth began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2014
Device: Nook 1st generation
Quote:
Originally Posted by DiapDealer View Post
That doesn't change the margins in Sigil's Book View? Or are you talking about when viewing it on the Nook? Because I don't think the @page rule really affects Sigil's Book View. But you should see the effect on your Nook or in ADE.

I'm assuming the stylesheet you're adding the @page to is linked to all the xhtml files in you're trying to affect?

I have no idea why I've adopted the method I have; but I tend to assign left and right margin directly to the <body> element:
Code:
body {
margin-left: 3px;
margin-right: 3px;
}
and then use @page for some top and bottom margin:
Code:
@page {
margin-top: 5pt;
margin-bottom: 5pt;
}
It probably had something to with wanting to SEE (in Sigil) that I had the left/right margins the way I wanted them.
After reading your post I tried and succeeded in making the nook display more margin width with the @page tag by changing the values from px to pt, like so:

Code:
@page {
margin-left: 20pt;
margin-right: 5pt;
}
And yeah I totally understand you, it would be ideal to be able to have a WYSIWYG in the Sigil beforehand but apparently it is not possible.

However now I am wondering, is there a similar tag than can justify the text all over the book? Because now it seems to have decided to be left justified only in my nook while appearing justified in the Sigil book view.
asgoreth is offline   Reply With Quote
Old 01-30-2014, 07:58 PM   #4
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,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Think of Boxes (AKA the box model) within Boxes

Body: the outer box.
is where I do most of the Overall (default) stuff for the file like base font, base Screen margin, linespace (if needed)
P: set the indent, Justification, Paragraph Margin (Top/Bottom)

Now think of doing everything else as an EXCEPTION (overrides the base)
.classes : for titles, special dialogs...

What you end up with is a K.I.S.S. CSS
theducks is offline   Reply With Quote
Old 01-30-2014, 08:47 PM   #5
asgoreth
Junior Member
asgoreth began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2014
Device: Nook 1st generation
Quote:
Originally Posted by theducks View Post
Think of Boxes (AKA the box model) within Boxes

Body: the outer box.
is where I do most of the Overall (default) stuff for the file like base font, base Screen margin, linespace (if needed)
P: set the indent, Justification, Paragraph Margin (Top/Bottom)

Now think of doing everything else as an EXCEPTION (overrides the base)
.classes : for titles, special dialogs...

What you end up with is a K.I.S.S. CSS
Don't be mad but I have NO idea how to do any of that, today is the first day I have tried to edit an ePub with Sigil, I mean I understand the concept of what you are saying but have no idea how to execute it.

The only thing that worked for me was to create a new stylesheet in which the only value is the @page tag using pt instead of the px value which was not working for me.

So I was wondering if there was a similar tag/instruction/style I could add to that new stylesheet to have all of the text justified in the book. Do you know of any?

Thanks.
asgoreth is offline   Reply With Quote
Old 01-30-2014, 09:14 PM   #6
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,801
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 asgoreth View Post
Don't be mad but I have NO idea how to do any of that, today is the first day I have tried to edit an ePub with Sigil, I mean I understand the concept of what you are saying but have no idea how to execute it.

The only thing that worked for me was to create a new stylesheet in which the only value is the @page tag using pt instead of the px value which was not working for me.

So I was wondering if there was a similar tag/instruction/style I could add to that new stylesheet to have all of the text justified in the book. Do you know of any?

Thanks.
body {text-align: justify}

do spend some time reading the MR Wiki sectopns on EPUB and CSS

(and get a (set) of HTML CSS cheat sheets. Not a substitute for doing a tutorial)
theducks is offline   Reply With Quote
Old 01-30-2014, 09:50 PM   #7
asgoreth
Junior Member
asgoreth began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2014
Device: Nook 1st generation
Quote:
Originally Posted by theducks View Post
body {text-align: justify}

do spend some time reading the MR Wiki sectopns on EPUB and CSS

(and get a (set) of HTML CSS cheat sheets. Not a substitute for doing a tutorial)
@DiapDealer Thank you for the idea of trying pt instead of px.

@theducks Thank you for the justified text tag.

Thank you so much for your help. I will keep on studying to be able to better edit my epubs.

Cheers.
asgoreth is offline   Reply With Quote
Old 01-31-2014, 07:08 AM   #8
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Go to the MR library and download several books by different uploaders.

Look at them in book view in Sigil and see if you like how it looks.

Where you like the appearance look at it in code view and look at any tags that are shown there, and go to the stylesheet and see what is there.

Like if you see <p class="indent">, go the the stylesheet and look for .noindent and see how they make one particular paragraph not have an indent when all the others do.

If p is listed all by itself, all the stuff following will affect all the paragraphs in the book, etc.

There are several stylesheets in various posts on the forum and in each book. Save one out of one of the books, or copy and paste into your stylesheet and try them out. With Sigil you can eliminate unused ones at the end, so it doesn't matter if you don't use everything. When you have done a few, save a stylesheet aside so you can just start from one having the styles you like.

There is a Nook for PC program, so you can look at your creation at various stages without having to load it into your e-reader. Be sure to close the book in the Nook program before you try to save in Sigil. The program may claim ownership and keep Sigil from saving it.

Please don't feel like your Nook is the only one with issues. Every single e-reader has its own way of interpreting what ought to be a standard. Hitch, a professional book creator has a table full of e-readers just to check out books she and her gang have created. She didn't buy the e-readers entirely for fun, but because the e-readers all have their quirks.

Last edited by mrmikel; 01-31-2014 at 07:14 AM.
mrmikel is offline   Reply With Quote
Old 01-31-2014, 09:26 PM   #9
asgoreth
Junior Member
asgoreth began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2014
Device: Nook 1st generation
@mrmikel

Thank you for all your advice, I will try out new styles and try to find some tutorials as well. Also the Nook for PC program sounds really useful, I will look for it.

Cheers.
asgoreth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to start Sigil weedfreak Sigil 3 08-15-2011 03:28 AM
Unable to add books using 0.8.9 jackastor Calibre 0 07-11-2011 07:30 PM
Unable to add new books ManishS Kobo Reader 10 01-28-2011 01:04 AM
Unable to add subscriptions to collections jasonfedelem Calibre 2 07-14-2010 01:13 PM
HELP Unable to add or take off books arl215 Sony Reader 0 06-16-2010 04:32 PM


All times are GMT -4. The time now is 11:23 AM.


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