SVG2MD2DRAW turns a box-and-arrow diagram in SVG
into a group of md2slides: a .md2draw file
that any deck can use with > use. The diagram can come
from draw.io, Inkscape or md2slides' own "Export SVG". Once it is a
group, d's editor can do with it what it does with any
drawing: move and resize the boxes, join them with arrows, change their
text, align and stack them.
rexx svg2md2draw flow.svg -- writes flow.md2draw, group #flow
and in the deck:
> drawing ratio=2 width=47%
> use flow.md2draw at=0,0,100,100
> end drawing
An SVG that is not a diagram of boxes and arrows (a logo, a chart, a
picture) does not need this: it goes on a slide as it is
(> pic logo.svg), or through svg2jdor.
[rexx] svg2md2draw [options] drawing.svg [group.md2draw | -]
The file goes beside the SVG, with the extension
.md2draw, unless another file is given; -
writes it to the standard output. svg2md2draw then lists what it left
out (see What Is Left Out).
When called without arguments, svg2md2draw displays help information and exits.
-h, --help |
Display help and exit |
-q, --quiet |
Do not list what was left out |
--name NAME |
The group's name (by default, the file's) |
--skin |
No colours: the deck's skin gives them |
| In the SVG | In the group |
|---|---|
| a rectangle, also with rounded corners, also drawn as a path | a box: > box |
| an ellipse or a circle | a round box: > box round |
| a text inside a rectangle or an ellipse | the text of that box (its lines, as in the SVG) |
| any other text | a text block of its own: > box bare |
| a line, a polyline or a path that is not closed | an arrow: > arrow #a -> #b |
| a text on a line, about its middle | the arrow's label= |
> at=10,13.3,23.3,20), and gets the element's
id as its name when it can be one, or b1,
b2... (boxes) and t1, t2...
(texts).#flow:10,95).
A copy of the group (> use) has its own places.--). A line with one bend, across
and then up or down, is an elbow (route=elbow).style=, and in the arrows' color=,
width= and line=dashed. With
--skin there are no colours, and the deck's skin
decides.\*, \#...), so the
text says only what it said. Its size is in em, for the drawing at the
width the file's header says.The header of the file says how to use it:
<!-- svg2md2draw: flow.svg (600 x 300px).
Its text is sized for a drawing 47% wide (of the slide's contents), as in
> drawing ratio=2 width=47%
> use flow.md2draw#flow at=0,0,100,100
> end drawing
-->
The width keeps the text as big as it was in the SVG next to its boxes. A picture wider than the 1280px stage is shown at the stage's width, and its text is made smaller to match.
A drawing of md2slides holds upright boxes, text and straight arrows. The rest is left out, and listed when svg2md2draw ends:
textPath,
foreignObject, animation.With svg2jdor's reader, the same one: the
presentation attributes, the style attribute and the simple
rules of a <style> sheet, the transforms, the
viewBox, use and nested svg elements, and
text with its tspans.