On 9/13/24 21:43, Leif Halvard Silli wrote:
We are using Ebook for a book project. We started using DITA, but styling DITA was too much hazzle for me, and secondly, if anything, we would have needed the DITA education profile, whish XXE does not support.

So then we went for Ebook - at least, then I know how to style the result via CSS.

Ebook consist of an Ebook «map» file with the .ebook suffix, and Ebook pages with simply the .html suffix. Hence I wondered what makes Ebook pages into Ebook pages. And it turns out that Ebook pages are simply HTML pages with the following class on the root element:

    <html class="role-ebook-page" …

And it seems like the sole purpose of class="role-ebook-page" is to put XXE in Ebook editing mode.

Yes, that's right.




Because, when I tried embedding Ebook pages  without class="role-ebook-page" on the <html> element into a Ebook, it worked just fine.

Indeed.




However, what was different, was the editing experience inside XXE: When class="role-ebook-page" switches XXE into Ebook page mode, one gets various «micro formats», such as notes, footnoes, various code examples and so on.

But compared with the HTML editor, one also looses a lot: One looses the Web browser view and also many things from the HTML toolbar, such as <aside>, <article> and more. (These elements can still be inserted via the Edit menu, though.)

Some of the Ebook page mode fetaures, such as footnotes, are very general and something it would be nice to have easily available. While some of the HTML page features would also be useful to have available as well.

Why do we have to choose between the Ebook page mode features and the HTML page features?

The "Footnote" and "Note" menu in the Ebook page toolbar are not found in the XHTML toolbar because footnotes and notes are styled in the Ebook page CSS stylesheet, which contains additional CSS rules compared to the XHTML CSS stylesheet.




To (inside XXE) replacing class="role-ebook-page" with class="foo" has strange effects on the documents: Despite that the document remains a HTML document, next time you open the document in XXE, it opens in generic XML mode.

I cannot reproduce this. This page, for example, opens in "XHTML5 mode", with all expected menus and toolbar.

---
<!DOCTYPE html>
<html class="foo" xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <meta charset="UTF-8" />

    <title>Test</title>
  </head>

  <body><p>Test</p></body>
</html>
---





Hence, for «lay people» it is not so easy switch between the two modes.

It would be nice to at least have a «Open Ebook page in HTML mode» feature. Or perhaps the Ebook features could simply somehow be fused with the HTML mode features?

We'll *try* to implement what follows in the next version of XXE:

- Add "Emulate Web Browser" to the Ebook page View menu.
- Add a "Section" menu (containing <aside>, <article>, etc) to the Ebook page toolbar.

I'm writing *try* because some features (e.g. Section|section(h1), section(h2), etc) *may* conflict with how the ebookc Ebook compiler works.



The promise of the Ebook format is that it should be simpler to use than DITA and Docbook, since it is simply HTML. And it is indeed simpler, in that sense. But I feel that the Ebook page editing mode hides many of the good parts of the XXE HTML editing mode.


Understood.





For now, for our part, we will pronbably remove class="role-ebook-page" from our Ebook pages.






--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to