Help:SVG/basic3

From Wikimedia Commons, the free media repository
Jump to: navigation, search

From invalid to valid SVG: Inkscape-files[edit]

To make Inkscape-SVG-files valid according to the guidelines of W3C and its validator: http://validator.w3.org/#validate_by_upload, these steps are required and work every time:

1. Load the SVG-file into Inkscape

  • a) Select all elements and then ungroup all the elements of the picture by pressing the ungroup button several times (or by pressing CTRL+SHITFT+G) till even the words are ungrouped and every letter becomes a single path.
  • b) Goto File/Vacuum Defs and run it. This will declutter the SVG-file.

2. It might be that the file is still not W3C-valid. One reason can be the text in the SVG-file. A quick and dirty solution is to press Path/Object to Path with all the elements of SVG-file still selected. All the elements of the SVG-file will be paths now.

  • a) Regroup all the elements of the file by pressing the group-button or by pressing CTRL+G.

3. Save the file as Plain SVG. (There is no consensus on this. For the pros and cons on this, see this page: https://commons.wikimedia.org/wiki/Help:Inkscape#Bugs_and_workarounds).

4. Now you can add the templates: {{ValidSVG}} and {{made with Inkscape}}.

If this still hasn't worked, you can open the file in a text-editor. SVG-files consist of XML-code and this code can be worked upon.

More information[edit]