Work around broken export of SVGs not compliant with the 1.1 standard #877
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
SVGs generated with draw.io contain XHTML tags and are thus not compliant with the SVG 1.1 standard. While rendered correctly by web browsers and Inkscape, the svgexport package used by the gitbook executable to export SVG images fails to do so as ImageMagick and rsvg-convert do. This would result in black rectangles covering most of SVG images present in the Booting chapter.
To prevent this, let's just use Inkscape CLI to convert source SVG images directly to PNGs before building the book with gitbook. Unfortunately, it seems that inkscape has to be invoked separately for each SVG, as the interactive mode toggled with the --shell switch seems to be too buggy to do that in one run in this outdated version of Inkscape.
Optionally, the image resolution may be increased to 300 DPI if necesary. That would result in slightly larger e-book files.
Further changes:
Related issues