Tools to facilitate work on EPUBs.
The EPUB file must be uncompressed. Then you can work in his directories.
-
EpubTools : Insertion nav
(If a title (
<h.>
) exists inside the<nav>
, it will be preserve.)Display a drop list with:
TDM
: Inserts or modifies table of content in(toc).xhtml
or(toc).ncx
using thespine
of theopf
.
If needed, addid="toc-epubtools-XX"
in the titles (<h.>
) to create anchors.Page List
: Retrieves tags with theepub:type="pagebreak"
attribute. Creates or modifies<nav epub:type="page-list">
in the table of contents file(toc).xhtml
.Table List
: Inserts or modifies a list of<tables>
.Illustration List
: Inserts or modifies a list of<figure>
containing<img>
.Audio List
: Inserts or modifies a list of<audio>
. Retrievesaria-label
in the tag otherwise theid
.Video List
: Inserts or modifies a list of<video>
. Retrievesaria-label
in the tag otherwise theid
.
-
EpubTools: A11Y
Open a list of tools to improve accessibility (a11y):
DPub-Aria roles|epub:type
: Add role="doc-X
" in markup if epub:type="X
" is in it (I was helped by the scripts from JayPanoz et de rodebert)
Reference: Digital Publishing WAI-ARIA Module 1.0
-
EpubTools: Manifest
Rebuilds the manifest in the OPF according to the files in the EPUB. The command must be launched in the
.opf
file.
Rename the files with diacritics (e.g.: accents) or space in their names. -
EpubTools: first <h.> => <title>
Copy the first title (if any) of each
xhtml
page into the<title>
tag of that page. -
EpubTools: Problems?
Displays problems or warnings in the
OUTPUT
tab:- Pages without
<h>
. - Bad hierarchy of titles (e.g.,
h1
followed byh3
withouth2
between them). - Issues with
<spine>
ifidref
in<itemref>
are missing in the<manifest>
. <table>
without<th>
,scope
or<thead>
- Pages without
-
EpubTools : <span...>{numPage}</span> => <span {epub:type} />
Converts...
<span class="epubTools-numPage-style">{number}</span>
... to
<span id="page{number}" title="{number}" epub:type="pagebreak" role="doc-pagebreak"></span>
Tip: Use InDesign script epubTools-numPage before export EPUB from InDesign.
-
epub.activerA11ylint
Activate a11ylint (default true)
-
epub.ancreTDM
ajouterAncre
(addAnchor): boolean (default: true)nomAncre
(nameAnchor): prefix's name of the anchor (default: toc-epubtools)
-
epub.classeTDM
CSS class applied to the
<ol>
tag in the TOC (default: ol-toc) -
epub.coverImage
Name of the file of the cover image (add properties="cover-image" to this image in
<manifest>
- default cover) -
epub.emphaseStyleAChercher
(A11yLint)Text strings in CSS class names on
<span>
to check with A11yLint.italique
(défaut ["italique","italic"])gras
(défaut ["bold", "gras", "strong"])emphase
(défaut ["emphase", "emphasis"])
e.g.:
<span class="fancy-italic">
will trigger an alert with a11yLint. -
epub.emphaseStyleAEviter
(A11yLint)Text strings to avoid in CSS class names on
<span>
withepub.emphaseStyleAChercher
(default ["no-bold", "no-italique","no-emphase"])e.g.:
<span class="no-bold-italic">
will NOT trigger an alert with a11yLint. -
epub.navTDM
Name of the TOC file (Allow to add properties="nav" to the TOC
<item>
in<manifest>
- défaut : toc) -
epub.niveauTitre
Maximum titles level in the TOC generated by
EpubTools: Table of contents
(default: 3) -
epub.titreTDM
('title' of the TOC)titre
: Text title of the TOC (default: Table des matières)balise
: HTML Tag for the title (default: h1)classe
: CSS class for the title (default: titre1)
-
epub.styleNumPage
CSS class to search for
EpubTools : <span...>{numPage}</span> => <span {epub:type} />
- Display issues with
<img>
:- if
alt
is empty - if
alt
is missing
- if
- Check if
<span>
with class italic, bold, etc. => change to<em>
? - Check
noteref
in<sup>
=> remove<sup>...</sup>
aria-label
andcontrols
checking in<audio>
and<video>
tags.