I have a .tex content that uses a custom command to include an SVG separator. The resulting xhtml is not satisfying out of the box, so I use a text substitution to make the integration valid:
textSubstitutions:
- regex: <p><img src="../media/file2.svg" alt="image" /></p>
replacement: <p class="center"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="50%" height="10%" viewBox="0 0 1628 145" preserveAspectRatio="xMidYMid"><image width="1628" height="145" xlink:href="../media/file2.svg" alt="***" /></svg></p>
When I build the epub and run the epub checker, an error is thrown for each page containing the separator, following this pattern:
ERROR(OPF-014): test/Prod/l-enfant-des-esprits.epub/EPUB/text/ch002.xhtml(-1,-1): La propriété "svg" devrait être déclarée dans le fichier OPF.
*the property "svg" should be declared in the OPF file.
When I unzip the epub and look into the OPF file, I can see:
...
<item id="cover_xhtml" href="text/cover.xhtml" media-type="application/xhtml+xml" properties="svg" />
<item id="title_page_xhtml" href="text/title_page.xhtml" media-type="application/xhtml+xml" />
<item id="ch001_xhtml" href="text/ch001.xhtml" media-type="application/xhtml+xml" />
<item id="ch002_xhtml" href="text/ch002.xhtml" media-type="application/xhtml+xml" />
...
My understanding is that when a page uses an SVG, like the cover, the properties="svg" attribute should be present (I couldn't validate this theory, though, because I have different problems when re-zipping the epub manually).
I have a
.texcontent that uses a custom command to include an SVG separator. The resultingxhtmlis not satisfying out of the box, so I use a text substitution to make the integration valid:When I build the epub and run the epub checker, an error is thrown for each page containing the separator, following this pattern:
*the property "svg" should be declared in the OPF file.
When I unzip the epub and look into the OPF file, I can see:
My understanding is that when a page uses an SVG, like the cover, the
properties="svg"attribute should be present (I couldn't validate this theory, though, because I have different problems when re-zipping the epub manually).