final IDrawing drawing = ui.getPresentation(IDrawing.class, LCanvas.class).getAbstractPresentation();
// Creation of the SVG document.
final Instrument[] instruments = ui.getInstruments();
final double incr = 100./(drawing.size() + instruments.length + ui.getPresentations().size());
final SVGDocument doc = toSVG(drawing, incr);
final SVGMetadataElement meta = new SVGMetadataElement(doc);
final SVGSVGElement root = doc.getFirstChild();
final SVGElement metaLTD = (SVGElement)doc.createElement(LNamespace.LATEXDRAW_NAMESPACE+':'+SVGElements.SVG_METADATA);
// Creation of the SVG meta data tag.
meta.appendChild(metaLTD);
root.appendChild(meta);
if(saveParameters) {
// The parameters of the instruments are now saved.
for(final Instrument instrument : instruments) {