User Tools

Site Tools


svg_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
svg_files [2018/04/11 12:30]
rsewikiadmin created
svg_files [2018/08/13 12:32]
arusso
Line 1: Line 1:
 +===== SVG Files =====
 +
 Files are located in an RPC-managed space: https://www.rfc-editor.org/materials/format/svg/ Files are located in an RPC-managed space: https://www.rfc-editor.org/materials/format/svg/
  
Line 7: Line 9:
   * [[https://boxy-svg.com/|Boxy SVG Editor]]   * [[https://boxy-svg.com/|Boxy SVG Editor]]
   * [[https://inkscape.org/en/|Inkscape]]   * [[https://inkscape.org/en/|Inkscape]]
 +
 +==== Creating SVG diagrams: Some notes from experience ====
 +=== from Nevil Brownlee, 18 July 2018 ===
 +
 +The version of SVG that will be allowed in RFCs is described in [[https://www.rfc-editor.org/info/rfc7996|RFC 7996]], "SVG Drawings for RFCs: SVG 1.2 RFC" Its formal syntax will be updated in 7996-bis (see [[https://github.com/rfc-format/draft-iab-svg-rfc-bis|the GitHub repository]]). 
 +
 +As one of the tools for using SVG 1.2 RFC, we have produced [[https://pypi.org/project/svgcheck/|svgcheck]], a Python program that will read SVG files, check whether they conform to SVG 1.2 RFC, and delete from them anything that doesn't conform. When you've made an SVG diagram, you should run it through svgcheck, and take a careful look at the resulting new SVG diagram to see that no features that you need have been deleted.
 +
 +Many people have asked for advice about how best to create SVG diagrams; in this note I summarise my experiences of doing that. To start with, Wikipedia has a good survey of both Open Source and Proprietary 
 +packages at [[wp>Comparison_of_vector_graphics_editors]].
 +
 +=== Inkscape === 
 +
 +Of the Open Source packages, in my opinion Inkscape is the best of them.  It's a big package, though, with many features, so there's a big learning curve to go through.  Fortunately there's a lot of tutorial material on the web, for example: [[http://tavmjong.free.fr/INKSCAPE/MANUAL/html/QuickStart.html|Inkscape tutorial]]
 +Note, however, that **SVG 1.2 RFC only allows objects that are part of black-and-white line drawings.**
 +
 +Again, Inkscape uses markers for line-end symbols (even if you create your own markers using Object -> Objects to Marker).  That means, if you want arrowheads at the end of lines, you have to draw them in yourself. The simplest way to do that is to make an arrowhead with two lines grouped together, draw your lines, then copy your arrowhead at the end(s) of them.
 +
 +Another nice feature of Inkscape is that its 'Resize page to content' lets you resize your svg drawing to trim the white space around its edges before you save it as 'Plain SVG'. An example SVG flowchart diagram produced in this way is linked to below.
 +
 +[[https://www.rfc-editor.org/rse/wiki/lib/exe/fetch.php?media=inkscape-drawn-arrows.svg|Inkscape example with drawn arrows]]
 +
 +=== LibreOffice Draw ===
 +
 +This is good if you're used to LibreOffice, and your drawing is fairly simple.
 +
 +Create your drawing using Draw, group it into a single object, then export it. (For me, that makes an SVG diagram that emacs and Inkscape display properly, but Firefox donesn't - however, check-svg.py's rewritten SVG diagram displays properly in Firefox, with Draw's arrowheads displayed properly.)
 +
 +=== dia ===
 +Runs on Windows, OSX, GNU/Linux and Unix. Install it from http://dia-installer.de
 +   
 +Dia is simple to use.  Save your drawing as xxx.dia, then export it as xxx.svg.
 +
 +Dia draws line-end arrowheads as filled polygons, and it doesn't use markers.
 +
 +=== Proprietary Applications ===
 +
 +If you're familiar with Adobe Illustrator, it can also be used.  It can save files as SVG-t (i.e. SVG Tiny), which - I assume - means that drawings saved in SVG-t don't use arrowheads.
svg_files.txt ยท Last modified: 2021/12/14 14:13 by arusso