This. I would love, as an author and teacher, to keep my flowcharts, diagrams, etc with my book code.
Right now I'm using SVG for that, but it's kinda rotten.
Right now I'm using SVG for that, but it's kinda rotten.
If it's the second, you can embed XML within SVG or a PNG. If you draw something simple in draw.io [0] (which I do co-author) and then "File->Export As" either "SVG with XML" or "PNG with XML" the diagram data is stored within the display format itself. This way you can just reload the SVG+XML or PNG+XML and carry on editing. But the PNG and SVG display as you'd normally expect.
Does that solve your problem?
GNU pic can target LaTeX directly, if that helps.