I created a force vector (just a line with an arrow) and managed to store it as a symbol. I saved the SVG-file and it showed up among the symbol sets when I restarted Inkscape. But the information about the marker was not stored under the symbol. So I only got a line, without the arrow.
And with the marker inside the Symbol section (in the xml) the arrow showed up nicely. However, when I try to use the symbol in a new document, the arrow (or marker information) disappears AGAIN. Like this:
I guess I'm not understanding how to actually create and use a Symbol. How do I make sure all information is included? I have a similar problem with patterns.
Even after reading the specification of the SVG Symbol, I'm unclear if using markers and/or patterns in symbols is valid SVG. So the safe bet is to convert all elements to paths before converting into a symbol.
Thank you. I have experimented a bit now and by converting my force (arrowhead + b-curve) into paths as you suggested the "arrow" stays with the symbol.
However this symbol can't be used because as soon as I need to point the force in another direction the arrow doesn't follow along. The same goes for the patterns et.c.
It seems the only way to have a library of mechanical elements, like "inclined plane", "Force vector", "Spring", "Pulley" and so on is to have them in lying around in the document and the cloning or duplicating them. Very messy.
There is a workaround, if one is not concerned about valid SVG. (it probably is valid, but I can't say, as yet)
A template document can be made that includes the symbols using patterns and markers. That template can be used, rather than an external symbols and a stock template.
I can't reproduce this. When I create a symbol, all stroke styles are included. End markers are retained when a shape is dragged from the Symbol dialog to the canvas.
So I am trying to create a SVG-file with a couple of symbols. I followed the guidelines found in this thread:
https://inkscape.org/forums/questions/creating-symbolslibraries/
I created a force vector (just a line with an arrow) and managed to store it as a symbol. I saved the SVG-file and it showed up among the symbol sets when I restarted Inkscape. But the information about the marker was not stored under the symbol. So I only got a line, without the arrow.
I moved the marker part inside the symbol
And with the marker inside the Symbol section (in the xml) the arrow showed up nicely. However, when I try to use the symbol in a new document, the arrow (or marker information) disappears AGAIN. Like this:
I guess I'm not understanding how to actually create and use a Symbol. How do I make sure all information is included? I have a similar problem with patterns.
Even after reading the specification of the SVG Symbol, I'm unclear if using markers and/or patterns in symbols is valid SVG. So the safe bet is to convert all elements to paths before converting into a symbol.
Thank you. I have experimented a bit now and by converting my force (arrowhead + b-curve) into paths as you suggested the "arrow" stays with the symbol.
However this symbol can't be used because as soon as I need to point the force in another direction the arrow doesn't follow along. The same goes for the patterns et.c.
It seems the only way to have a library of mechanical elements, like "inclined plane", "Force vector", "Spring", "Pulley" and so on is to have them in lying around in the document and the cloning or duplicating them. Very messy.
There is a workaround, if one is not concerned about valid SVG. (it probably is valid, but I can't say, as yet)
A template document can be made that includes the symbols using patterns and markers. That template can be used, rather than an external symbols and a stock template.
I can't reproduce this. When I create a symbol, all stroke styles are included. End markers are retained when a shape is dragged from the Symbol dialog to the canvas.
Screenshot and SVG attached.
It will fail if the document is moved to the Symbols directory to be used as a repository.