Stylesheets icon indicating copy to clipboard operation
Stylesheets copied to clipboard

SVG in Guidelines.epub fails epub3 test, and fails to build Guidelines.pdf

Open ebeshero opened this issue 6 years ago • 5 comments

In working on https://github.com/TEIC/TEI/issues/1949, we found some issues with including SVG images in the Guidelines using the <graphic> element. SVG is fine for the HTML build and also viewable in the epub build. However, there are two issues:

  1. our tests for the epub build are failing because at some point in the processing, SVG isn't being recognized as a valid image type for epub3.
  2. Guidelines.pdf fails to build.

1) epub3 test failure:

Error message for epub:

java -jar Utilities/epubcheck3.jar Guidelines.epub
Epubcheck Version 3.0.1

Validating against EPUB version 3.0
ERROR: Guidelines.epub/OPS/SG.html: This file should declare in the OPF the property: svg

@martindholmes identified the problem in tei-to-epub3.xsl, which is failing to indicate SVG is a property of the specific files in the epub collection. From our Slack conversation, Martin recommends, "for each item that's being listed in the epub manifest, we have to check to see if it has any SVG images linked or embedded in it; if it does, we have to add the appropriate property to the manifest."

2) Guidelines.pdf fails to build at all.

With SVG graphics present, Guidelines.pdf (and LaTeX) build fails with this message:

BUILD: build Lite version of Guidelines, then LaTeX version of Guidelines from Lite, then run to PDF using XeLaTeX
Make sure you have Junicode, Arphic and Mincho fonts installed
ANT_OPTS="-Xss2m -Xmx752m -Djava.awt.headless=true" ant -q -lib Utilities/lib/saxon9he.jar -f antbuilder.xml -DXSL=/usr/share/xml/tei/stylesheet -DXELATEX=xelatex pdfonce
     [echo] make LaTeX and PDF

BUILD FAILED
/tei/P5/antbuilder.xml:185: exec returned: 1
Makefile:148: recipe for target 'Guidelines.pdf' failed
make: *** [Guidelines.pdf] Error 1

Guidelines.pdf builds successfully on replacing the SVG with a PNG.

ebeshero avatar Dec 29 '19 03:12 ebeshero