MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Need Help with Sigil Formatting (https://www.mobileread.com/forums/showthread.php?t=338413)

RatherBWriting 03-29-2021 04:57 PM

Need Help with Sigil Formatting
 
Hi! I am a newbie, working on my first epub and using Sigil. I need help finding a few things, like how to number pages, how to insert more blank space between paragraphs on a page which has only three short paragraphs, and how to insert "separators" within a chapter when a new chapter is not called for, but there is a change in scene.

Is there a user guide?

Thanks so much -
RatherBWriting

Turtle91 03-29-2021 05:17 PM

The MR Wiki page has a lot of info for newbies.

I would highly recommend taking a couple hours and learning html and css styling. That will save you tons of effort later.

You can also look at some of the books in our library to see how others have accomplished what you are looking for.

Also, the Sigil forum has a lot of links that can help you with learning Sigil.

DiapDealer 03-29-2021 05:26 PM

Yes, there's a Sigil user guide, but you're going to need to ditch the concept of "pages" if you want to use Sigil to create a reflowable epub.

RatherBWriting 03-29-2021 05:30 PM

Thank you both! I have downloaded the user guide and will read it thoroughly.

I am not a stranger to html, having designed a website for my business (although it was many years ago) and more currently, an author's website. I am puzzled by the simple things that I cannot figure out!

Do I not have to arrange page numbering? I want the prologue to use Roman numerals, and the Arabic numerals to begin with Chapter One.

Thank you both for your help.

RatherBWriting

phillipgessert 03-29-2021 06:42 PM

Quote:

Originally Posted by RatherBWriting (Post 4107414)
Thank you both! I have downloaded the user guide and will read it thoroughly.

I am not a stranger to html, having designed a website for my business (although it was many years ago) and more currently, an author's website. I am puzzled by the simple things that I cannot figure out!

Do I not have to arrange page numbering? I want the prologue to use Roman numerals, and the Arabic numerals to begin with Chapter One.

Thank you both for your help.

RatherBWriting

Those sorts of conventions only exist for printed books, not ebooks that reflow. There aren't pages per se, so: nothing to number.

theducks 03-29-2021 08:48 PM

Quote:

Originally Posted by RatherBWriting (Post 4107414)
Thank you both! I have downloaded the user guide and will read it thoroughly.

I am not a stranger to html, having designed a website for my business (although it was many years ago) and more currently, an author's website. I am puzzled by the simple things that I cannot figure out!

Do I not have to arrange page numbering? I want the prologue to use Roman numerals, and the Arabic numerals to begin with Chapter One.

Thank you both for your help.

RatherBWriting

Since there are no 'Pages", you have no need of Numbers.
Sigil has a TOC (NCX) tool that builds from HTML Headers discovered.
My convention is:
H3 for all chapter-like sections
H2 for Books with Parts or Multiple books
I use H1 for the Bundle, otherwise I stick with the highest used
You can use h4,h5, h6 for mid levels bearing in mind that some devices hate 3+ level nesting.
You can also just place ID for anchors as a landing point.

IMHO Just write a section, chapter each as a file, then order them in the book browser, Generate the TOC (NDX) and save (you can save at any time.
Do learn to use a CSS linked to each section.

Find a couple of EPUB you like the looks of, then examine the code.
Sigil make finding the stylein in the CSS pretty easy find the 'style=blal" Right click it: Goto Link or style. Sigil will jump to the first definition (It is possible the Pub uses Cascading definitions, but that is not the most common)

RatherBWriting 03-30-2021 11:44 AM

Thank you for your reply. I may have overstated the "newbie" part. I am no stranger to a style sheet, or to coding in general. The TOC was created with no problems. I have specific questions, such as how to override the css to allow for more space between paragraphs on a specific page of the book. Sigil has been great to use. My epub is nearly finished, but there are a few quirks that remain.

I did not know that an epub does not have "page numbers". That will have to wait until the paperback version!

Thank you again for your help.
RatherBWriting

DiapDealer 03-30-2021 12:15 PM

You do not "override" the css to create more space between paragraphs on a specific page (and again... the page you're referring to does not exist. The content you're envisioning as being on the same page could, in fact, be spread across multiple "screens" on a reader's device depending on their personal settings). You change the html to identify the specific paragraphs you want more space in between, and then you create more space between them by applying new styles to those particular elements in your stylesheet.

RatherBWriting 03-30-2021 12:50 PM

Hi, DiapDealer - thank you for your reply. (And I promise to stop using the word "page".) Your response makes perfect sense! I will take out my textbooks about CSS and figure this out.

I appreciate your help. These things can be quite frustrating, especially when I am 98% finished.

RatherBWriting

exaltedwombat 03-30-2021 12:53 PM

If you want certain paragraphs to be more widely spaced, create a css Style with a bigger margin-top value and apply it to the next paragraph.

Don't worry about page numbers in an eBook. Apart from chapter breaks, which guarantee a new 'page' we don't know when the screen will have filled up on any particular device with its own screen size and (user-adjustable) text size.

When it comes to preparing a print edition, you'll doubtlessly be working in a page-based program that DOES give control over such things, and which takes care of page numbering automatically.

Turtle91 03-30-2021 01:14 PM

example -
Code:

CSS:
p              {whatever styling you want for normal paragraphs}
div.morespace p {margin-top:2em}


HTML:
<body>

<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>

<div class="morespace">
    <p>This is a paragraph with more space.</p>
    <p>This is a paragraph with more space.</p>
    <p>This is a paragraph with more space.</p>
</div>

<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>
<p>This is a normal paragraph.</p>

</body>


JSWolf 03-30-2021 01:20 PM

Just remember that an eBook is not a pBook and you cannot always expert the pBook format to work for an eBook. Make the eBook work as an eBook and do not try to duplicate the pBook format exactly.

For example, don't use chapter headers with overly large wasted space or offset text at a smaller size. Don't use paragraph spaces in the eBook as they don't work. Also, have the text full justified. But you only need to specify that once in the <body> class. Also, the main body text should not be given a font size so it an go with the default of 1em. Also, forget line-height as that doesn't work. Don't set a L/R margin. And don't embed fonts unless you have a need. Just trying to duplicate the fonts of the pBook doesn't work.

I've seen way too many eBooks make these mistakes and need fixing.

Here is a simple CSS that I ended up with after fixing the CSS.

Code:

blockquote {
  margin-top: 1em;
  margin-right: 1.5em;
  margin-bottom: 1em;
  margin-left: 1.5em;
}
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
img {
  max-height: 100%;
  max-width: 100%;
}
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
.chapter {
  font-size: 2.2em;
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
.copy {
  font-size: small;
  text-align: center;
  text-indent: 0;
  margin-top: 0.8em;
}
.copy1 {
  font-size: small;
  text-align: center;
  text-indent: 0;
}
.coverpage {
  text-align: center;
  padding: 0;
  margin: 0;
}
.ded {
  font-size: large;
  text-align: center;
  text-indent: 0;
  margin-top: 3em;
}
.indent9 {
  padding-left: 1.8em;
}
.largecap {
  font-size: 2.2em;
  font-weight: bold;
  line-height: 0;
}
.noindent {
  text-indent: 0;
}
.part {
  font-size: 2.2em;
  margin-top: 3em;
  text-align: right;
}
.space {
  margin-top: 0.8em;
  text-indent: 0;
}
.space1 {
  margin-top: 1em;
}
.spacebreak {
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
table.padded {
  width: 100%;
}
td.left {
  text-align: left;
  vertical-align: top;
  text-indent: 0;
}

Here is a sample of the eBook code following <body>.

Code:

<h2 class="chapter">Chapter One</h2>
<p class="noindent"><span class="largecap">‘<b>T</b></span>here’s something very wrong here and I expect you to do something about it. Isn’t that what the police are for?’</p>
<p>Sergeant Troy observed his breathing, a trick he had picked up from a colleague at Police Training College who was heavily into T’ai Ch’i and other faddy Eastern pursuits. The routine came in very handy when dealing with abusive motorists, boot-deploying adolescents and, as now, with barmy old ladies.</p>
<p>‘Indeed we are, Miss…er…’ The sergeant pretended he had forgotten her name. Occasionally this simple manoeuvre caused people to wonder if their visit was really worth the bother and to drift off, thus saving unnecessary paperwork.</p>
<p>‘Bellringer.’</p>
<p>Chiming in, thought the sergeant, pleased at the speed of this connection and at his ability to keep a straight face. He continued, ‘But are you sure there’s anything here to investigate? Your friend was getting on in years, she had a fall and it was too much for her. It’s quite common, you know.’</p>
<p>‘Rubbish!’</p>
<p>She had the sort of voice that really got up his nose: clear, authoritative, upper upper middle class. I bet she’s ordered a few skivvies around in her time, he thought, the noun springing easily to mind. He and his wife enjoyed a good costume drama on the television.</p>
<p>‘She was as strong as an ox,’ Miss Bellringer stated firmly. ‘As an ox.’ There was a definite tremor on the repetition. Jesus, thought Sergeant Troy, surely the old bat wasn’t going to start snivelling. Mechanically he reached for the Kleenex under the counter and returned to his breathing.</p>


Turtle91 03-30-2021 01:31 PM

Quote:

Originally Posted by JSWolf (Post 4107679)
...
For example, o not use chapter headers with overly large wasted space or offset text at a smaller size. Don't use paragraph spaces in the eBook as they don't work. Also, have the text full justified. But you only need to specify that once in the <body> class. Also, the main body text should not be given a font size so it an go with the default of 1em. Also, forget line-height as that doesn't work. And do not set a L/R margin.

...

Just a reminder - these are Jon's opinions - they are what he likes, and doesn't like. These are NOT requirements or limitations.

Make sure that you are styling your book the way you want the book to look - but keep in mind that some of the opinions expressed in these forums come from people's experiences with different formats (eg really old style e-ink readers vs. new high definition large format tablets.) Make sure you take your target market's devices capabilities and limitations into account...

JSWolf 03-30-2021 01:33 PM

Quote:

Originally Posted by Turtle91 (Post 4107681)
Just a reminder - these are Jon's opinions - they are what he likes, and doesn't like. These are NOT requirements or limitations.

Make sure that you are styling your book the way you want the book to look - but keep in mind that some of the opinions expressed in these forums come from people's experiences with different formats (eg really old style e-ink readers vs. new high definition large format tablets.) Make sure you take your target market's devices capabilities and limitations into account...

You missed my edits to the post. As for what you think is my opinion, the formatting I am describing is what works best for reading programs that have settings such as margins, line-height, font-size, and font choices.

exaltedwombat 03-30-2021 01:36 PM

You can do it @Turtle91's way if you like. Easier to just define an alternative paragraph style.

Your EPUB code may be compatible with more devices if you ALWAYS give a <p> tag an explicit style. So define a "p.normal" style as well as a "p.extra_space_above" one.

I agree with @JSWolf, white space is much more effective on the printed page than on screen. Don't fall into the trap of trying to make an eBook a fascimile of a well-designed printed page. It ain't going to happen!

Turtle91 03-30-2021 01:47 PM

Quote:

Originally Posted by JSWolf (Post 4107679)
For example, don't use chapter headers with overly large wasted space or offset text at a smaller size. Don't use paragraph spaces in the eBook as they don't work. Also, have the text full justified. But you only need to specify that once in the <body> class. Also, the main body text should not be given a font size so it an go with the default of 1em. Also, forget line-height as that doesn't work. Don't set a L/R margin. And don't embed fonts unless you have a need. Just trying to duplicate the fonts of the pBook doesn't work.

Your edits weren't in the thread when I quoted it. I was referring to your opinions - which I have highlighted in blue - and didn't even mention the inaccuracies - highlighted in red.

I'm not going to argue about whether your opinions are right or wrong - they are your opinions and you are welcome to them. I might even agree with some of them. But you need to be careful when you are telling people that they must follow your opinions, when that is definitely not true.

You certainly have experience with certain types of devices - and people would be foolish to disregard the experience of people on these forums. But please don't push your particular style preferences as a requirement. That's why I mentioned that the OP needs to adjust their style choices based on the target device's capabilities.

Turtle91 03-30-2021 01:58 PM

Quote:

Originally Posted by exaltedwombat (Post 4107685)
You can do it @Turtle91's way if you like. Easier to just define an alternative paragraph style.

I'm not sure if it easier to define a specific style for every paragraph. It certainly makes the code more bloated.

Quote:

Originally Posted by exaltedwombat (Post 4107685)
Your EPUB code may be compatible with more devices if you ALWAYS give a <p> tag an explicit style. So define a "p.normal" style as well as a "p.extra_space_above" one.

Which devices are you referring to that would require an explicit class for each paragraph? I certainly am not familiar with all the devices out there, but it seems to me that if a device respects the css of a paragraph class, it would respect the css rules in general. No???

Quote:

Originally Posted by exaltedwombat (Post 4107685)
I agree with @JSWolf, white space is much more effective on the printed page than on screen.

I actually agree with the "too much space in the chapter title" looks bad on a screen opinion as well...but it is still an opinion. I've seen plenty of books that have very attractive chapter heads. If that is the choice of the publisher...and the author likes it... then, OK. It doesn't take away from my enjoyment of the book. It's just not something I would do.

Quote:

Originally Posted by exaltedwombat (Post 4107685)
Don't fall into the trap of trying to make an eBook a fascimile of a well-designed printed page. It ain't going to happen!

Double thumbs up here! :2thumbsup

DiapDealer 03-30-2021 03:06 PM

Quote:

Originally Posted by Turtle91 (Post 4107681)
Just a reminder - these are Jon's opinions - they are what he likes, and doesn't like. These are NOT requirements or limitations.

Exactly. We're not here to convince others to make their ebooks meet our own overly exacting, and quite personal, standards. Make your chapter headers take up as much space as you like, and offset smaller text to your heart's content. It's your book.

I, for one, am perfectly content with teaching someone the technicalities of how to do something (from a coding perspective) I personally don't think they should be doing in ebooks. I'm not the coding-standards/style police. There's no need for us to attempt to turn everyone new we meet into our epub-coding clones.

Tex2002ans 03-30-2021 03:55 PM

Quote:

Originally Posted by RatherBWriting (Post 4107398)
Hi! I am a newbie, working on my first epub and using Sigil.

Hey. Welcome to MobileRead! Glad to have you. :D

Quote:

Originally Posted by RatherBWriting (Post 4107398)
I need help finding a few things, [...] how to insert more blank space between paragraphs on a page which has only three short paragraphs,

Do I have the perfect thread for you:

2019: "Problem adding extra lines in text"

:D

But here's a simple answer:

You could do it Turtle91's way, or you could create individual classes:

HTML:

Code:

<p>This is an example.</p>
<p class="margintop">This will have a margin above.</p>
<p class="margintop">This will also have a margin above.</p>
<p>This will not have a margin above.</p>

CSS:

Code:

p.margintop {
        margin-top: 1em;
}

Quote:

Originally Posted by RatherBWriting (Post 4107398)
and how to insert "separators" within a chapter when a new chapter is not called for, but there is a change in scene.

This is called a "scenebreak".

And just a few months ago—in Post #8 of the same the thread—I already preemptively answered you:

Quote:

Originally Posted by Tex2002ans (Post 4007112)
For scene breaks, best to just Keep It Simple Stupid (KISS) with centered asterisks. See my 2019 post in "Why is it so hard to preserve blank lines?"

Quote:

Originally Posted by RatherBWriting (Post 4107398)
how to number pages,

Depends on what you mean and what you're trying to accomplish.

Like others have said, ebooks don't really have "pages".

If you already have a Print book fully completed/designed, and you're trying to match "physical page #"<->"ebook page #", then there are plenty of topics discussing RPNs ("Real Page Numbers")... but I'd say that's a relatively advanced topic.

RatherBWriting 03-30-2021 04:26 PM

My goodness. Thank you all for your input! I have spent my lunch hour reading through CSS tutorials online, and totally missed that the "margin-top" setting for the second paragraph would solve my problem. I will give this a try.

I want to thank you all for the helpful advice, links and suggestions, and for the courtesy and patience which you have all shown to a newcomer.

RatherBWriting (wouldn't we all)

JSWolf 03-30-2021 04:39 PM

Quote:

Originally Posted by Turtle91 (Post 4107688)
You certainly have experience with certain types of devices - and people would be foolish to disregard the experience of people on these forums. But please don't push your particular style preferences as a requirement. That's why I mentioned that the OP needs to adjust their style choices based on the target device's capabilities.

If there is no specific target device, what would you suggest for formatting? I'm suggesting formatting that works in most cases. It works with the most popular Readers/software in the US. Kobo, Kindle, nook, and Books.

If formatting is used to try to duplicate the pBook version, then in a some cases, it doesn't work properly in all of those cases. For example, with a Kindle, most people never see embedded fonts because they don't select Publisher Font in the Aa menu. They just use whatever font they are happy reading with.

JSWolf 03-30-2021 04:54 PM

As for a section break, I've changed how I do it. I do it with a simple HR

Code:

hr {
  margin-top: 1em;
  margin-right: 40%;
  margin-bottom: 0.9em;
  margin-left: 40%;
  border-top: 2px solid;
}

Code:

<hr/>
<p class="noindent">This paragraph is not indented and in the start of a new section.</p>

It puts in a line for a section break surrounded by space. It works, it's simple, and it looks good.

RatherBWriting 03-30-2021 05:49 PM

Thank you, everyone! I am very grateful for the information. I have a day job, so unfortunately, this is going to have to wait for a few days before I dive in, but I want you to know that I truly appreciate the help.

RatherBWriting


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.