2. Creating an ebook specification
An ebook specification is an XML generally having a ".ebook
" file name extension. This file may be created by first selecting File > New and then choosing one of the two ebook specification templates.
An newly created ebook specification is then rendered as follows:
Notice that the ebook specification toolbar is divided in two parts.
- The first part of the toolbar contains buttons which may be used to edit the structure of the book.
- The second part of the toolbar is active only inside element
head
/title
. It contains the same buttons as those found in an XHTML page toolbar and may be used to edit the “rich text” possibly contained in atitle
.
The first part of the toolbar contains the following buttons:
- Insert Book Division Before
- Insert a book division (chapter, section, appendix, etc) before selected book division. Displays the "Insert or Edit Book Division" dialog box. Keyboard shortcut: Shift-ENTER.
- Insert Book Division Into
- Insert a book division (chapter, section, appendix, etc) as the last child of selected book division. Displays the "Insert or Edit Book Division" dialog box. Keyboard shortcut: Ctrl-ENTER.
- Insert Book Division After
- Insert a book division (chapter, section, appendix, etc) after selected book division. Displays the "Insert or Edit Book Division" dialog box. Keyboard shortcut: ENTER.
- Edit Book Division
- Displays the "Insert or Edit Book Division" dialog box in order to modify selected book division (chapter, section, appendix, etc). Keyboard shortcut: ESC e.
- Move Up
- Move selected element up, that is, swap it with its preceding sibling node. Requires the element to be explicitly selected. Keyboard shortcut: Alt+Shift-UP.
- Move Down
- Move selected element down, that is, swap it with its following sibling node. Requires the element to be explicitly selected. Keyboard shortcut: Alt+Shift-DOWN.
- Promote
- Decrease the nesting level of selected book division (chapter, section, appendix, etc). For example, convert a
section
to achapter
. Keyboard shortcut: Alt+Shift-LEFT. - Demote
- Increase the nesting level of selected book division (chapter, section, appendix, etc). For example, convert a
chapter
to asection
. Keyboard shortcut: Alt+Shift-RIGHT. - Show Level
- Displays a menu containing "Show Level 1", "Show Level 2", ..., "Show Level 9" items. "Show Level N" means: expand all the collapsible elements of the ebook specification up to nesting level N and recursively collapse all the collapsible elements having a nesting level greater than N.
- Open All Pages R/O
- Opens in read-only mode all the HTML source pages referenced in the selected elements and their descendants.
- Open All Pages
- Opens in normal read-write mode all the HTML source pages referenced in the selected elements and their descendants.
Right-clicking (Ctrl-click on the Mac) a book division (chapter, section, appendix, etc) displays a contextual menu containing some of the buttons found the ebook specification toolbar.
Dropping a file or URL onto a book division (chapter, section, appendix, etc) displays a contextual menu containing some of the buttons found the ebook specification toolbar.
The "Insert or Edit Book Division" dialog box
This dialog box displayed by the Insert Book Division Before, Insert Book Division Into, Insert Book Division After and Edit Book Division tool bar buttons let's the user easily add or remove the main attributes of a book division (chapter, section, appendix, etc). Note that the book
root element is also considered to be a book division.