Author Topic: Personnal directory for libraries ?  (Read 3882 times)

July 01, 2016, 02:31:46 AM
Read 3882 times

saucisse31

  • Newbie

  • Offline
  • *

  • 1
Hello everybody !

I want to add a library SVG files that I can use with the ctrl+shift+Y menu.

I'm on my work computer (win7) with limited rights ( not full admin rights). inkscape was setup through the company management app to setup softwares (I didnt choose anything during setup)

I found the directory C:\Program Files (x86)\Inkscape\share\symbols  but it's read only (dont know why). so I cannot add my svg inside and cannot set it to r/w.

I found in the wiki that libs can be put either in the system or personnal directory  (it's written here http://wiki.inkscape.org/wiki/index.php/SymbolsDialog )
Quote (selected)
Inkscape will look for libraries in the share/symbols directories (both system and personal)

So I get in my personnal directory (or seems to be), I mean here:

C:\Users\my_login\AppData\Roaming\inkscape    (I replaced my reel login by "my_login").

I have created a "symbol"  directory in there and add my libs, but it does not work...

Original directories inthere are:
extensions, icons, keys, palettes, templates + 2 files : extensions-errors.log and preferences.xml.


Anyone know where to put libraries in personnal directory ?


PS: I'm new to inkscape since yesterday  :@@:

Best regards,

July 01, 2016, 11:28:12 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to Inkscape Community!

Congrats on all the research you did about how to make and use Symbol files!  I would guess the program files are read only, because the system admin wants to protect them.  But putting in the user directories should work just as well. 

I think you are putting the files in the right place.  Are they SVG files?

I thought I could look at some of the symbol files I've installed, to find out if there's some particular way the files should be made.  But when I look at the SVG files for the symbol sets, they appear to be empty!  I'm not sure what to make of that.  Although I always like to say that my computer not-know-how is large   :-D

I found some symbol files in the program files though, and there the images appear.  Looking at the XML Editor, I see that they are made using what I consider unusual elements.  So instead of the id attribute's value of "path" or "rect" "g" (group), it's "use".

Here's how a path looks in XML Editor:  <svg:path id="path1234">
They symbol object looks like this:  <svg:use id="use1234">

Oh ok, I think I might have it figured out.....maybe.  When you made the SVG symbol file, are they all paths still?  Or did you convert to symbols in the Current Document?

If I can figure this out, maybe I'll write a tutorial.  Because it's not entirely obvious how to do it.  But these are the basics, as far as I can tell.

1 -- Draw the new symbol
2 -- Object menu > Symbols > Current Document
3 -- Click "Add symbol from current document" button, which is in the bottom-left corner of the symbol area in the Symbols dialog.  Now you should see the new symbol in the Symbols dialog.
4 -- Save the file as SVG
5 -- In the file manager, copy that SVG file from wherever you saved it, and paste it into the user symbol directory

Now, when  you open a new Inkscape file, and open the Symbols dialog, you'll see a new item in the Symbol Set dropdown menu, called Unnamed Symbols.  If you click on that, you'll see the new symbol you created.

I haven't figured out how to name the individual symbols yet.  Or how to name the symbol set, so that it shows up in the dropdown menu, with a name besides "Unnamed Symbols".  But once I get those 2 things figured out, I'll try and write a tutorial.

I hope some of that will help.  Let us know how it goes  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 02, 2016, 01:51:15 PM
Reply #2

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
@saucisse31 and brynn:

the directory name would be 'C:\Users\my_login\AppData\Roaming\inkscape\symbols', not 'symbol' (I don't know if that was maybe just a typo, but sometimes little things can cause weird errors ;-) ).

There is a readme file in the shared directory, which describes how to create valid symbol files:
C:\Program Files (x86)\Inkscape\share\symbols\README

July 02, 2016, 10:59:11 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I did look at that.  But it starts out talking about "internationalization", so I skipped over it.

Those instructions are incredibly succinct, and leave plenty of room for misunderstanding.  I would call them "tips" but not instructions.

What is the "default styling"?  Does that mean that symbols can't have different colors or stroke width, for example?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 03, 2016, 08:04:47 AM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
You can skip the internationalization part alright, if you do not want to include your file to be shipped with the next Inkscape version, but below that section, there's a heading "Adding new files", which gives every detail one would need to add a file in a way that is most compatible with Inkscape, and will be conformant to Inkscape and SVG standards.

About the styling, it says:

"Avoid adding unnecessary style properties in the symbol elements;"

- this sets a fixed style. It cannot be changed by anyone, unless they edit the symbol library file.

"this prevents the user from over-riding the default styling by
specifying the style on the <use> element."

- The <use> element is what a user adds to the file when they click on 'add symbol' or drag one on the canvas.
It can be styled, but those styles only have an effect if there aren't any of the same kind for the symbol element.

"Default styling can be
specified in the root SVG element. Inkscape will apply this
styling by default in the <use> element."

- Put the 'style' attribute into SVG root element (<svg>) to get an overridable, but existing, default style.

Easiest way for those who better work with examples is to take a look at the existing symbol libraries, and to imitate them. That's what I usually do when I don't understand the documentation ;-)

July 03, 2016, 10:19:08 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Easiest way for those who better work with examples is to take a look at the existing symbol libraries, and to imitate them. That's what I usually do when I don't understand the documentation ;-)

That's exactly what I was trying to do!  I don't have a ton of symbol files, but I have several.  And most of them don't have a single graphic in them.  They're completely empty except for the XML code!  I guess the artist/author wanted to make sure no one would ever change them  :-S

But I still think I'll try to write a tutorial.  Those instructions are not enough for most newbies.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 03, 2016, 03:55:06 PM
Reply #6

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Sounds like a good idea!

I'd use the official files that come with Inkscape as an example - not any that were found somewhere on the web that work, but maybe don't work in all details.