Sigil-0 2 0-Manual
Sigil-0 2 0-Manual
Sigil-0 2 0-Manual
Release 0.2.0
Strahinja Markovic
CONTENTS
Introduction
1.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
3
3
5
Book Browser
13
4.1 Content folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Context menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Meta Editor
17
5.1 Collapsed UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Expanded UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
EPUB Overview
25
7.1 Open Publication Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.2 Open Packaging Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.3 OEBPS Container Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Glossary
21
21
23
23
31
ii
CHAPTER
ONE
INTRODUCTION
Sigil is a free and open source editor for the EPUB format. It is designed for easy,
WYSIWYG editing of EPUB files and for converting other formats to EPUB. It also
provides features for advanced users, like direct XHTML, CSS and XPGT editing. You
can use it to add any of the metadata entries supported by the EPUB specification and
create a hierarchical Table of Contents.
The editor works on all three major platforms: Windows, Linux and Mac OS X.
Sigil is a work in progress, and as such is still missing many features. If you have the
programming skills, you can directly contribute to its development. Even if you dont,
just using Sigil and reporting any bugs or missing features on the issue tracker will go
a long way towards making it a better application for everyone.
1.1 Installation
Installing Sigil is fairly easy on all platforms. The files can be downloaded from the
download section of the project site.
1.1.1 Windows
On Windows, you merely run the the appropriate installer. If you have a 64 bit version
of Windows, you should use the Windows installer labeled with x86_64. Otherwise,
use the vanilla one.
Then just run it. Everything should take care of itself. If you get an application
configuration is incorrect message when starting Sigil, see this item in the FAQ.
Sigil is tested on XP, Vista x64 and Windows 7 x64.
1.1.2 Linux
Run the installer for your CPU architecture. Two are available: x86 and x86_64. If in
doubt, use the x86 one. The Qt Framework is included in the installer.
1
After the installer completes, there should be an icon on your desktop and an entry in
your start menu.
Sigil can be uninstalled by running the uninstall executable located in the folder in
which Sigil was installed. By default, this is /opt/sigil. So with default options,
uninstalling Sigil would look like this:
cd /opt/sigil
sudo ./uninstall
1.1.3 Mac OS X
Unpack the DMG file and drag the Sigil.app file to your Applications folder.
Sigil is built as a universal binary, and is tested on Mac OS X 10.5 and 10.6. Sigil should
also work on Tiger (10.4), but is untested on that version of Mac OS X.
Chapter 1. Introduction
CHAPTER
TWO
So Sigil presents a file-focused editing environment. You can open every XHTML file
and edit it in a WYSIWYG manner in the Book View, or edit the code directly in the
Code View. You can edit the CSS, XPGT and other files, and view the images one by
one.
To add and edit that special information like the Table of Contents and the metadata,
Sigil presents you with purpose-built editors. You can access them through the Tools
menu. Everything you enter in them is saved and exported when the resource files are
bundled together and the EPUB book is built. When you open the resulting EPUB file
in some RS, it will be displayed as a paged book.
CHAPTER
THREE
And only in the Code View, not in the Book View. This limitation exists because of technical restrictions, and will be removed in time.
10
Matches
Any character represents itself by default. a would match a.
Matches any single character.
Matches zero or more of any characters.
Any character in the set; [abc] would match a or b or c.
So if for example you used the search string [123]abc?dd* with the Wildcard mode
selected, it would match any of the following: 1abceddertert, 3abc9dd--.!,
2abc_dd!#$79840sd 12adad ad and many more.
The current regex engine used is actually Qts QRegExp. It will eventually be replaced with PCRE
because of the latters advanced features and performance.
11
12
CHAPTER
FOUR
BOOK BROWSER
The Book Browser (BB) offers a view into the structure of your EPUB book. You can
see all the different files that make up the archive, from XHTML files to images.
Hint: If your not familiar with the internal structure of an EPUB file, see the EPUB
Overview chapter.
The Book Browser pane can be either docked, or undocked. A docked BB can be
undocked by clicking on the little window icon in the top right corner, and docked
by simply dragging the new window to the edge of the main Sigil window and then
releasing the mouse button. An image of it undocked can be see in Book Browser, undocked.
You can also open and close the Book Browser through the View menu.
13
14
For those interested in the technical details, this information is stored in The OPF files <guide>
element.
2
Sigil looks for a normal <img> tag or an SVG <image> one.
15
16
CHAPTER
FIVE
META EDITOR
The Meta Editor is what you use when you want to add or edit metadata for your
EPUB book. As the EPUB Overview explains, the standard allows for hundreds of
different metadata entries to be added to any book.
5.1 Collapsed UI
When you first open the Meta Editor, it will be in its collapsed state, as shown in Meta
Editor, collapsed. This allows you to add the minimum metadata elements that all EPUB
books need to have: the Title of the work, the Author and the Language in which it
is written. If you dont include these elements, then tools like epubcheck will complain
that your book has errors (rightfully so).
This information is the bare minimum you should provide. You can always go the
extra mile though. The expanded version of the dialog enables you to do just that.
17
5.2 Expanded UI
If you click on the More button, the dialog will expand; see Meta Editor, expanded. You
now have a table listing all the other types of metadata present in your EPUB book.
You can remove an item by selecting it and clicking the Remove button, or add new
items with the Add Basic and Add Adv[anced] buttons.
18
5.2. Expanded UI
19
20
CHAPTER
SIX
3
3
4
3
Usually, the natural TOC that Sigil creates using this technique will be enough for
90% of the books youll want to make. But you can always make changes directly.
Hint: For the technical details regarding the storage of the Table of Contents, see The
NCX file.
21
22
The attribute should hold the alternate text that should be used for the TOC.
You can also use this functionality to have images as the targets of the TOC entries:
<h1 title="Text in TOC"><img src="..Images/some_image.png" /></h1>
23
24
CHAPTER
SEVEN
EPUB OVERVIEW
The EPUB format is a standard created by the International Digital Publishing Forum
(IDPF). It consists of three separate specifications:
Open Publication Structure (OPS), which describes how the content is to be presented;
Open Packaging Format (OPF), which describes how the content files and resources are connected into a logical whole, a publication;
OEBPS Container Format (OPS), which describes how the publication is encapsulated in a ZIP archive.
This chapter will provide a brief overview of the format aimed at beginners.
25
</p>
<img src="../Images/example_image.jpg">
</body>
</html>
You would see something very similar to this if you switched to Code View in the main
Sigil UI. Notice the pattern: content is marked up between the start and end tags of an
element. This is how XML (on which XHTML is based) works. The <p> element is a
good example; it delimits the words and sentences that should be regarded as making
up a single paragraph. There are many more elements in XHTML.
With XHTML, the user semantically marks up the content of the document and specifies its structure. Usually, a CSS stylesheet is applied to the document. In this
example, it is linked with the <link> element; this tells any XHTML renderer to use
this stylesheet when rendering the document.
What does the renderer do? It looks at the marked-up document and the linked
stylesheets and determines how this content should be displayed on the users screen.
The XHTML document describes what is the content, and the CSS stylesheet describes
how it should be laid out and formatted. XHTML answers questions like: What is a
paragraph? What is a list of items? What is a table?, and CSS answers questions like:
How much should the paragraphs be indented? What color is the text? What fonts
should be used? How big is the text?.
You create many XHTML documents 1 for one EPUB file. Customarily, you create
one per book chapter, but you can do it differently if you want to (but do so only if
you have a good reason). For novels, one stylesheet is usually enough and is used in
all the XHTML files.
Now you may be wondering, why should readers of an EPUB have to jump from one
XHTML file to the next? Why cant they just see the book as one text flow? The
answer is that they do. The readers are not aware that an EPUB file is an archive of
several different files since their Reading System always displays everything in it as
one text flow. Even when every chapter is actually a separate file, when the user pages
through their book, they see one chapter ending, and on the next page, the next chapter
starting. They are never aware that their Reading System has actually transitioned them
from one file to the next.
You may be surprised, but Microsoft Words new DOCX format is also several
marked-up files inside a ZIP archive. And yet you see it as one document.
26
In the context of EPUB, XHTML documents are often called OPS documents.
27
You can clearly see the metatada, manifest, spine and guide elements and their
children. There really is nothing complicated about this, lots of people end up writing
all this information by hand. Its tedious, but doable. Sigil writes this file automatically
for you, and in the future it will provide the user with the means of editing it directly
if he wants the extra power that comes with this ability.
name="dtb:uid" content="123456789X"/>
name="dtb:depth" content="1"/>
name="dtb:totalPageCount" content="0"/>
name="dtb:maxPageNumber" content="0"/>
<docTitle>
<text>Tale of Two Cities</text>
</docTitle>
<docAuthor>
<text>Dickens, Charles</text>
</docAuthor>
<navMap>
28
The <navPoint> elements point either to whole documents, or to the specific elements within those documents. They can be nested to create a hierarchical TOC.
Sigil creates this file from the headings present in your XHTML documents. Every
heading is referenced by a navPoint, and headings of different levels interact to create a hierarchy. More details of this behaviour can be found in the Building the TOC
section. As with the OPF file, future versions of Sigil will enable direct editing of this
file for those who want it.
Note: If your heading is near the beginning of your XHTML file, Sigil will link
directly to that file and not to the heading element. This is because on some Reading
Systems, linking directly to an element slows down the display of the TOC.
29
30
CHAPTER
EIGHT
GLOSSARY
caret The blinking vertical bar in the text that most people erroneously call the cursor.
CSS Cascading Style Sheets.
epubcheck A tool used to validate EPUB files. Since EPUB files need to follow the
EPUB specification, this tool was made to check for basic errors in the file that
would make it non-valid. Do note that it is not a panacea and it is not perfect;
it doesnt check everything. Also note that even if epubcheck reports that a
file is valid, that doesnt mean the file will render flawlessly on all Reading Systems. None of those are perfect either, and they all have their little quirks and
idiosyncrasies.
With all of that in mind, its still a very good idea to make sure your EPUB files
pass epubcheck without errors or warnings.
Epubcheck can be downloaded here.
metadata The information about the book, like the books title, author, publication
date, publisher, subject etc.
Reading System Any combination of hardware and/or software that is used to
present the EPUB book to the reader. For instance, it can be an application like
Adobe Digital Editions or a hardware device like the Barnes & Noble Nook.
UI User Interface.
WYSIWYG What You See Is What You Get.
XHTML Extensible Hypertext Markup Language.
XML Extensible Markup Language.
XPGT XML Page Template.
31