EpubDisplay
epubDisplay macro
- inline
- no
- content
- none
- parameters
- filename — the name of the attached EPUB file to show
- mandatory
- document — the page the EPUB is attached to
- default: the current page
- width — CSS width of the reader
- default: 100%
- height — CSS height of the reader
- default: 75vh , three quarters of the window, so it grows with it
- filename — the name of the attached EPUB file to show
No browser displays an EPUB by itself, so the reading is done in the page by epub.js, attached here rather than loaded from a content delivery network. A restricted EPUB stays restricted: the file is fetched with the reader's own rights, exactly as a direct download would be.
Examples
The examples read demo.epub, a two-page book attached to this page for the purpose.
Counterexamples
Libraries attached here
| file | version | licence | source |
|---|---|---|---|
| epub.min.js | 0.3.93 | BSD-2-Clause | epubjs |
| jszip.min.js | 3.10.2 | MIT / GPL-3.0-or-later | jszip |
That table is the record of what this page carries, and has to be kept in step with the attachments. /bin/apc/apice-epub-check.zsh reads it, asks the npm registry for the current releases and reports: it changes nothing. Updating is deliberate — attach the new file under the same name, so the previous one stays in the attachment history, check a publication with an EPUB still reads, then bring the table in step.