3. Creating an ebook page

An ebook page is simply an XHTML5 file where the root html element has attribute class="role-ebook-page". This file can be created by first selecting File > New and then choosing the "Page" template.

The File|New dialog showing Ebook templates

Attribute class="role-ebook-page" is not required to use an HTML page in an ebook specification. Simply XMLmind XML Editor automatically detects this attribute and replaces its stock "XHTML" menus and toolbars by extended "XHTML" menus and toolbars.

Moreover you are not restricted to using pages containing XHTML5 markup. You may use pages containing XHTML 1.0 Strict or Transitional or XHTML 1.1 if you prefer. However you must keep in mind that ebookc anyway generates XHTML5 markup. In all cases, you have to make sure that the contents of your input pages is valid.

In addition to HTML, an ebook page may also be written in Markdown. More information in Markdown support.

See also Appendix A. Configuring the Markdown parser.

The "XHTML" menus and toolbars displayed for an ebook page slightly differ from those displayed when opening a plain XHTML5 document.

Ebook page toolbar

The toolbar contains the following specific buttons:

Add pre Add pre
Menu entry "pre(listing)" adds a <pre class="role-listing-1"> element. Menu entry "figure(example)" adds a <figure class="role-example"> element. See "Content of a source HTML page, Examples".
Add note Add note
These menu entries add admonitions like the <blockquote class="role-important"> element. See "Content of a source HTML page, Admonitions".
Add footnote Add footnote
Menu entry "span(footnote)" inserts a <span class="role-footnote"> element at caret position or converts selected text to this element. Menu entry "div(footnote)" adds a general footnote, that is, both a footnote body (element <div class="role-footnote" id="ID">) and the corresponding footnote marker (element <a class="role-footnote-ref" href="#ID">). See "Content of a source HTML page, Footnotes".

Note that in order to delete a general footnote suffice to delete its body or its marker; no need to delete both. This will be done automatically the next time you'll save your ebook page to disk.

Add MathML equation Add MathML equation
Menu entry "figure(equation)" adds a <figure class="role-equation"> element. See "Content of a source HTML page, Equations".