<< | Page list | >>
Include SVG Images in LyX
Apache Batik from http://xmlgraphics.apache.org/batik can be used to configure LyX to directly include SVG images. Batik produces high quality PDF and PGN files but it currently cannot generate EPS. Make sure you have a "lossless" (vector to vector) PDF -> EPS converter defined, as described below.
This solution requires working Java Virtual Machine. It is slower than method with Inkscape described below, but circumvents Inkscape SVG incompatibilities (and does not require Inkskape, of course).
If you encounter problems with Inkspace messing up gradients, batik solves the problems just fine.
Please note: batik bases the size of the output graphics file, be it PNG or PDF, on the height and width attributes of the SVG element in the SVG file. If these are not present, batik assumes a default rectangle area, circa 400px by 400px. To work around the issue with buggy SVG files (for example diagrams produced by eUML), please provide the necessary attributes by hand-editing the files. One could find the dimensions with a cursor in the batik editor.
You can configure LyX in a few steps:
You need to restart and maybe reconfigure LyX.
A really similar approach to the one on Windows. Please see SVG Files and Batik for a bash script.