Original Content: Home | Books | eBooks | Other | LinksFan Content: Andromeda | Avatars | Anime | Dark Angel | Matrix | Pern | Stargate | Star Trek | Star Wars

Sigil Tutorial - Formatting Your Content:


1. Overview | 2. Importing Your Content | 3. Formatting Your Content  | 4. Walkthrough

Now that we have some content in Sigil, let's make it look good!

We're to the real meat of this tutorial now, there's lots of topics that we can cover here. I'm going to cover some of the most common ones in no particular order. If there's something you want to know how to do, and don't see it here, e-mail me (e-mail is at the bottom of this page) and I'll eventually get around to adding it here (I might get to it faster if you donate...)

How to:

How to make text Bold, Italic, and Underlined

There's a button for that. See the first page of this tutorial

How to make style paragraphs professionally (How to use CSS in Sigil)

A picture is worth a thousand words here, so enjoy the following screenshots (click them to enlarge):

ePub without CSS applied ePub with CSS applied

No CSS                                                                With CSS

I'm going to steal content from my manual tutorial here, as the CSS is the same. What's different, is that it's a lot easier to add a Cascading Style Sheet to your ePub file using Sigil than it is by hand.

/* Style Sheet for ePub Books */

/* Set margins at 2% (This gives a white border around the book) */

body {margin-left:2%;

/* Text indent will make a paragraph indent, like putting a tab at the beginning of each new paragraph
The margin settings get rid of the white space between paragraphs, again so it looks more like a book
The text-align line justifies the margins. If you don't want them justified, change it to left, or remove that line
You don't have to specify a font, but you can */

p {text-indent: .3in;
    text-align: justify;
    font-family:"Times New Roman";}

/* Here we make our headings centered
We've also made the headings the same font as the body text */

 h1 { text-align: center;
    font-family:"Times New Roman"; }
h2 { text-align: center;
    font-family:"Times New Roman"; }
h3 { text-align: center;
    font-family:"Times New Roman"; }

How to use all that green stuff:

1. Create a new Style sheet for your book: (If your book already has a stylesheet in it, you can just double-click it to edit it. Some converters will create a stylesheet for you, but you might want to modify it to change how your book looks.)

Click: File>>New>>Blank Stylesheet

This will add a stylesheet to the book browser pane, and open it for editing.
(You might want to re-name it, for simplicity sake. To re-name the stylesheet, right-click it, and click, "Rename". Type in the name you want. (I usually just remove the numbers.))

2. Enter your CSS code

Any CSS code you want can go here. (Check the manual tutorial for the link to the IDPF page that lists the allowed CSS)

Fee free to copy the green CSS code from above and paste that in.

Close the stylesheet. (click the "X" next to the sheet's name on it's tab)

3. Add a link to the stylesheet on each file in your book that you want the code applied to. (Skip this step if your book already has a stylesheet.)

  1. Click on the tab for your content, if it's open, or double-click on the name of the file you want to apply the code to in the book browser (the left hand pane).
  2. Click the "Code View" button
  3. Add a new line after the line that starts with "<title>"
  4. copy this code: <link rel="stylesheet" type="text/css" href="../Styles/Style0001.css" />
  5. Paste into the new line you made in step c. (make sure that if you re-named your stylesheet, you need to change this line too.)

4. Repeat step 3 for each file in your book that you want to apply the stylesheet to.

How to Make a Table of Contents

In Sigil, making a table of contents is really easy. It does most of the work for you. All you have to do is make the text you want to be in the table of contents a heading, then click a button.

  1. Highlight the text you want to be in the TOC (Table of Contents). (Usually, this will be the chapter headings, the big, "Chapter 1" and whatnot at the beginning of each chapter.
  2. Click the arrow to the right of " Normal " up in the upper left-hand corner.
  3. Select a heading style (Heading 1, Heading 2, etc). (Normally, you'll want to choose "Heading 1". If you have sections under each chapter that you want to show up in the TOC, you'll choose "Heading 2" for those.)
  4. Repeat Steps 1 - 3 for all your chapter headings.
  5. Click the " Generate TOC from headings " button in the bottom right corner of the Sigil window.
  6. Sigil will think for a moment, then the Table of Contents will show up in the pane right above the button.


How to make a section divider

A section divider is that line, image, or line of asterisks in books that goes between different scenes, or when you jump to a new character's point of view. You usually use them when you need such a divider, but don't want to start a new chapter yet.

In Sigil, you can do a section divider several different ways. You can use the asterisks, insert an image, or use a horizontal line (like the green ones that space out the different sections in this tutorial.)

I'd recommend putting at least one line of whitespace on either side of the section divider, this helps separate the sections a little more. (You do this the same way you would in a word-processor; just press the enter key before and after the section divider.)

How to insert an image (and notes on Cover images)

Inserting an image is a two-step process. As you learned in the manual tutorial, an ePub book is composed of a few parts; the content, the XML files that describe the content, and the package that holds all that stuff. As a result of that, to add an image to your book, we first need to add the image to the package (you know, so the person who reads it only has to download one file that has everything they need.)

  1. Click in the book where you want the image to go.
  2. Click: "File>>New>>Add Existing File"
  3. This will open a regular file open box where you can find the image you want to add.
    Click the filename for the image, then click the "Open" button.
  4. This will add the image to the ePub container.
    If you click the + sign next to "Images" in the left-hand pane in Sigil, you'll see the filename for your image there.
  5. To add the image to the book, click the Insert Image button in the toolbar.
  6. The following window will open:
    Insert image box

    The left side of this window will show the names of all the images that have been added to this ePub file.  If you click on a filename, a preview of that image will show up in the right side of the window.
  7. Click the "OK" button.

Notes on Cover Images:

Use the following guidelines to ensure that most reader software will be able to show a preview of your books cover image. You should follow ALL of the below guidelines to ensure that a preview image will show up in most readers.

How to edit meta-data (Author name, genre, ISBN and all that)

Meta-data is all the information about the book that's not really in the book. Well, it might be on the copyright page, but this is how you make sure that the reader software knows what the book's title is.

  1. Click: "Edit>>Meta Editor..."
  2. The following window will open:

  3. Type the name of the book in title. (I don't need to explain the "Author" box, do I?)
  4. You can click the "Add Basic" or "Add Adv." buttons to add all kinds of other information like the ISBN, copyright, and all that other stuff too.
  5. Click the "OK" button when you're done.

How to make a Chapter Break / make a section always be on a new page (insert page-break)

There a few options to always make a section start on a new page in an eReading app. Each different file inside the ePub container will do this. If you want the content to be in the same file, but still start on a new page, you can do that too.

You can spit a section off into it's own file by clicking the Split File At Cursor button in Sigil.

If you want to keep content in the same file, but still have it be at the top of a new page, switch to Code View and add this line where you want the page break

    <div style="page-break-before:always;"></div>

That's it! Note that the page-break won't show in Sigil, but it will in your e-reader.

    >> Continue to Part 4 of the Sigil tutorial: Walkthrough

Was this guide useful to you?

You can also follow my blog for updates on books I write, and also some ePub content:

Please consider donating a small amount to help pay the server costs. You don't have to, but if you would like to, I'd be very thankful!

Download this Guide

Download this guide as an ePub file

Comments? Questions?

If you have any comments, notice any bugs, or have any questions on any of the steps here, please e-mail me at: yoda47 (at) jedisaber (dot) com