3

Is there a way to set default settings of the arrow marker in Inkspace with a given color and style? Currently I copy/paste the line shown below into documents to retain the style.

A color arrow-head in Inkspace

4

The default style when drawing with the bezier curve tool can be set under Edit > Preferences.

Default Style Settings

Last Style Used (works)

Default setting is Last used style. This can be used to include markers in the default style in your current session:

  • Draw a line and change its style (add the markers you want).
  • Here comes the trick to include markers: Paste the first line's style on itself
    (select the line, press Ctrl+C, then Ctrl+Shift+V).
  • Lines drawn afterwards will have the style from your first line.

Once you close and reopen your document or create a new document, the markes won't be in the default style anymore.

This Tool's Own Style (may work with some tricks)

Unfortunately the following approach does not work for markers:

  • Draw a line and change its style (add the markers you want).
  • Open Edit > Preferences > Tools > Pen, select This tool's own style and take the style from the line you draw before.

This changes the default stroke width, color, and so on, but not the markers. The reason for this is probably technical. In SVG, markers are objects which must be embeded in the SVG file. Example:

A stroke with a marker has the style marker-end:url(#marker5964), which only works if the SVG contains a <marker id="marker5964"><path ... /></marker>.

You could edit the default style in Inkscape's config file preferences.xml (stored under ~/.config/inkscape/ in Linux) to include marker-end:url(#marker5964). Search for id="pen" to find the default style of the bezier curve tool. Then copy the definition of your marker into the markers.svg (stored under /usr/share/inkscape/markers/ in linux).

  • Thanks Socowi for pointing out on how to edit preferences.xml. My issue, following your answer is that preferences.xml is modified each time I quit Inkspace which removes the marker style marker-end:url(#Arrow2Lend). I am working on a windows PC. Any thoughts? – Hasan Tahir Abbas Apr 18 '17 at 17:09
  • Inkscape probably removes the tag for the same reasons why it didn't include markers in the first place. Maybe you could make the file write protected, but then you wouldn't be able to change your settings anymore. You also could try to use a data URI instead of url(#marker5964), but I have very little hope that Inkscape will recognize the self-containedness of that data URI and therefore keep it. – Socowi Apr 18 '17 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.