Inkscape.org
Tips, Tricks, and Tutorials Inkscape tutorials in Full Circle Magazine
  1. #1
    Xav Xav @Xav👹

    As many of you will know, I've been writing a series of Inkscape tutorials in Full Circle Magazine for many years now. With the old forum well and truly offline, the index of articles was no longer easily available (and I couldn't update any of the read-only archives that are around). So now I've put an index onto my own website:

    http://www.peppertop.com/blog/?p=1563

    I'll also update this thread when there's a new article so you don't have to keep checking that page just to see if another one has come out yet.

  2. #2
    brynn brynn @brynn

    Thanks Xav!  I'm sure I'll make good use of that!

    As my frustration continues to grow over the old not-so-up-to-date manual, and having no prospect of creating a new community-written manual anywhere on the horizon (at least not that I've heard of), I'm thinking I might start to consider your collection of tutorials as the best current manual, and start referring users to it.

    I mean, for a while there, there were a bunch of books users could purchase.  But those have all aged now, really.  So your collection really represents the most current, most comprehensive, manual-like, instructions.

    I don't suppose there's any hope they could ever be turned into a manual?  (Sorry, I think you might have answered that before.  I think the answer is "not so much" but I don't remember for sure.)

  3. #3
    Xav Xav @Xav👹

    @brynn The articles are all under a Creative Commons license, so anyone is free to compile them into a larger and add a proper index, should they wish - provided they're suitably attributed. The Full Circle 'Special Editions' are the closest to that, at the moment, but they only cover about half of the series.

    I have always hoped to compile the content into a single volume at some point, once I stop writing the series (which will probably happen later this year, maybe next, once I've covered the new features in v1.0). But my work situation changed significantly just over a year ago, and I no longer have anywhere near as much time for Inkscape stuff as I used to, so that plan may well fall by the wayside. To be honest I'm struggling to find the time to write the articles themselves at the moment - if v1.0 wasn't close on the horizon I would have already stopped.

     

  4. #4
    Xav Xav @Xav👹

    Full Circle Magazine #153 came out the other day, and includes the second part of my tutorial on how to animate an SVG image in a browser, using JavaScript and the "transform" attribute.

     

  5. #5
    Freezr Freezr @freezr

    Nice!

  6. #6
    Xav Xav @Xav👹

    Issue #154 is out. This is a round up of a few odds and ends: the last bit of JS and transforms (refactoring the code), forum news, info about the Heathenx video tutorials and, finally, a shameless plug.

  7. #7
    Xav Xav @Xav👹

    Issue #155 has been released. My article in this issue is a long-overdue examination of the fill-rule buttons in the Fill & Stroke dialog.

  8. #8
    Aero Aero @Aero◻️

    On page 34. Shift+R, the keyboard shortcut for Path > Reverse only works in Windows version of beta v1.0 and not in Linux version?

  9. #9
    Xav Xav @Xav👹

    I don't recall it ever having a keyboard shortcut on Linux - though you can assign one via Preferences > Interface > Keyboard Shortcuts, then Selection > Reverse. Do note my comments about reversing sub-paths on 1.0beta though; my bug report is here: https://gitlab.com/inkscape/inkscape/-/issues/1125

  10. #10
    Aero Aero @Aero◻️

    On Windows Shift+R currently works in 0.48.5, 0.91.1, 0.92.2, 0.92.3, 0.92.4 and 1.0beta2 (f3d5b5a, 2020-03-13). I have not assigned my own, it's there by default. The action SelectionReverse is not assigned a key or a modifier in inkscape.xml or default.xml. The shortcut is not visible in the menu, but still works.
     

  11. #11
    Xav Xav @Xav👹

    Issue 156 is out. My article this time details the use of the "Create Link" context menu entry in Inkscape.

  12. #12
    Xav Xav @Xav👹

    Issue 157 is available, containing part 97 of my series. From this point I'll be introducing the features, changes and bugs of Inkscape v1.0. This instalment talks about the MacOS version, and theme support.

  13. #13
    Creativ Creativ @Creativ

    Thanks for all the effort you've put into these articles. It's an awesome collection!

    I've just downloaded the lot and am looking forward to your articles future articles on Inkscape 1.0.

  14. #14
    Xav Xav @Xav👹

    Thanks for the kind words. I'm glad you're finding the articles useful.

  15. #15
    Xav Xav @Xav👹

    Issue 158 is available, containing part 98 of my series. This one describes the canvas rotation and reflection options in v1.0.

  16. #16
    Xav Xav @Xav👹

    Issue 159 is out containing part 99 of my series. This one describes the new view modes in Inkscape 1.0: "Visible hairlines", "Split view" and "XRay view".

  17. #17
    Martin Owens Martin Owens @doctormo🌹🧀

    I feel we need to add these to the new website design review, to make sure this kind of tutorial has a good space.

  18. #18
    Xav Xav @Xav👹
    *

    Issue #160 is out, containing part 100 (yes! 100!!!) of my series. This one takes a look at the text-to-path problems in Inkscape 1.0, and is essentially a more in-depth exploration of the issues described in this topic: https://inkscape.org/forums/tutorials/text-and-path-regressions-in-10-with-workarounds/

     

  19. #19
    Xav Xav @Xav👹

    Issue #161 of Full Circle Magazine is now available for free download, as usual. My Inkscape article this time covers some more new features from Inkscape v1.0.x:

    • The (Un)Lock and (Un)Hide options on the context menu
    • Inverse clipping paths
    • Inverse masks

     

  20. #20
    Stephen Moskal Stephen Moskal @LawrenceFechtenberger1946

    Thank you, Xav. I'm so new to Inkscape that I appreciate the road map. I promise to go through your guides slowly and methodically.

  21. #21
    Xav Xav @Xav👹
    LawrenceFechtenberger1946

    Thank you, Xav. I'm so new to Inkscape that I appreciate the road map. I promise to go through your guides slowly and methodically.

    For a new user I think it's worth going through the tutorials in Inkscape's Help menu, then perhaps go through the first few of my articles to get a grip on the basics. After that the articles turn into more of a reference guide than a tutorial to follow from start to finish. There is some order to them, and some later articles build on ideas gained from earlier ones, but once you're comfortable with the program it's probably better to just dive into whichever article covers the tool you need right now, or piques your interest with something you're not familiar with.

    I hope they serve you well, but if you do get stuck there are a lot of knowledgable and helpful people on this forum who will do their best to help answer any specific questions (a good description and an attached file always helps).

     

  22. #22
    Xav Xav @Xav👹

    Issue #162 is out in which I take a look at the changes to the Stroke to Path functionality over the years and, particularly, in 1.0.x.

  23. #23
    Xav Xav @Xav👹
    🤘

    Issue #163 is out continuing my look at the additions and changes in 1.0. This time: reordering the toolbox, Bézier tool paraxial mode improvements, the Calligraphy tool’s “dot” feature and chord mode in the Circle tool.

    Note that the editor's spellchecker got a bit carried away, replacing the word "tittles" - meaning a dot used as part of a punctuation character - with "titles". So the sentence near the end of the article that currently makes no sense should actually read:

    As you might imagine, these don’t make for great tittles with your punctuation marks, should you be using the  Calligraphy Tool for, you know, actual calligraphy.

     

  24. #24
    Xav Xav @Xav👹

    Real life has been a bit hectic of late, so I missed posting a notification about issue 164. So here's a double update, at no extra charge:

    Issue #164 continues my look at the additions and changes in 1.0. This time: Pressure-sensitivity in the Freehand tool, improvements to the Eraser tool (pressure-sensitivity and other options similar to the Calligraphy tool, plus a useful clipping mode), tooltip mode (and its problems) in the Measurement tool.

    Issue #165 also continues with details of 1.0.x. This time: Measurement tool (continued) - Measure Only Selected mode, On-canvas Alignment.

     

     

  25. #25
    Xav Xav @Xav👹

    Issue #166 is out, containing details about: New preferences in v1.0.2. Text-to-path regression fixes in v1.0.2. Text tool changes in v1.0. How to turn off SVG 2.0 compatible flowed text (not recommended).

  26. #26
    Roy Torley Roy Torley @Roy_Torley

    Hi Xav,

    I deeply appreciate how you're showing Inkscape in depth with your tutorials.  I am staying with the basics.  To have somebody take on where I leave off is absolutely fantastic!  You have my support, even if it's only being your personal peanut gallery.

    With gratitude,

    Roy

  27. #27
    Xav Xav @Xav👹
    *

    Thanks Roy. The earliest instalments did start with the basics, but after more than 100 parts it's inevitable that I've ended up diving deep into the program. Although it started out as a tutorial series, I'm increasingly viewing my contributions as a reference work 😀

  28. #28
    Roy Torley Roy Torley @Roy_Torley

    Hello Xav,

    A reference work would be excellent.  My feeling is that everybody in the community is focused on their own work and specialty, so to have a comprehensive reference available to supplement or take on where Inkscape's manual leaves off would be very beneficial. If there's anything that I put up that you can use, please feel free to employ and enjoy!  Take care, Roy

  29. #29
    Xav Xav @Xav👹

    Issue #167 is out, containing further information about the new flowed text implementation(s) in Inkscape v1.0.x.

     

  30. #30
    Xav Xav @Xav👹

    Issue #168 is out. This time I cover the new font support in Inkscape 1.0: colour fonts, variable fonts, and the almost-but-not-quite support for bitmap fonts.

  31. #31
    Tyler Durden Tyler Durden @TylerDurden

    Immensely helpful... Thanks Mark! 🏆

  32. #32
    Xav Xav @Xav👹

    Issue #169 includes part 109 of my series. This one covers smaller changes in Inkscape 1.0 (or at least those that can be explained briefly): Y-axis inversion, duplicating guides, on-canvas handles for the filter region size, more options for importing SVG files, mesh gradient polyfill, advanced options in PNG export, 3-digit RGB values, save as a template. Removal of "Import Clip Art", "Save As Cairo PNG", UniConverter library, Selection Sets dialog.

  33. #33
    Xav Xav @Xav👹

    Issue #170 is out. This time I cover the changes to the Trace Bitmap UI in version 1.0, and talk about the Trace Pixel Art mode (not new to 1.0, but I haven't covered it before).

  34. #34
    Xav Xav @Xav👹

    Issue #171 is out now, in which I conclude my look at the changes to the Trace Bitmap dialog by covering the Autotrace and Center Line Trace options.

  35. #35
    Xav Xav @Xav👹

    My article in issue #172 contains: An update on colour and bitmap fonts (not good news), and a quick foray into the topic of using CSS in SVG (in preparation for next month's examination of the Selectors and CSS dialog).

  36. #36
    Xav Xav @Xav👹

    Issue #173 is out, and my article this time introduces the Selectors and CSS dialog. I look at adding a new class selector and using it to set CSS styles, and includes a warning about the unexpected consequences of removing a CSS class from an element.

  37. #37
    Xav Xav @Xav👹

    Issue #174 is out, and my article this time continues to look at the Selectors and CSS dialog. I explore how it can be used as a replacement for the old Selection Sets dialog, and take a look at using element selectors in the dialog (as opposed to the class selectors I used previously).

  38. #38
    dallen8028 dallen8028 @dallen8028

    Thank you Xav for taking the time to produce these tutorials. They are far greater detailed than those found within the Help menu and in the online manual.

    With my Navy experience with Equipment Technical Manuals (ETM) and Standing Operating Procedures (SOP) where all steps are included with no step eluded to or assumed in any given process. If you are open to some "beginner feedback" from an 8 year Navy Veteran with 30 years ACAD experience I would be happy to share my experiences going through your tutorials on the ease and difficulties I am finding. While I am very new to Inkscape, I am finding it easy yet difficult to understand and follow your instructions in the first Tutorial #61. When I go through instructions, I can only assume they are written to cover every possible scenario I might encounter. I understand these are written for beginners and should takes us to a more complex area later, however, I am finding some assumptions. The ease in which to draw an eclipse, change it's location, color and borders are wonderful. The arc and segments on the other hand are a struggle. By manipulating the all the editable handles I was not able to create the Crescent Moon shape you show with your Snowman. Also, I would include either instructions on how to draw an eclipse, arcs, segments or circles separately to include exact precision (as in ACAD) or a note that makes reference to these instructions later in another tutorial. So far it is kind of like throwing paint on a canvas. I hope this make sense? Thank you for your understanding and kind consideration in your reply.

  39. #39
    Tyler Durden Tyler Durden @TylerDurden

    I'll chime in first, as I pointed dallen8028 over here from the Beginners forum. 

    Mark's first tutorial in FCM #61 was written almost exactly 10 years ago, and was pretty good for a first tutorial. Much has changed since then in Inkscape, and Mark has kept pace, keeping his tutorials evolving along with Inkscape's bourgeoning features. Over a decade's time of volunteer writing for the open software movement. 

    WRT the assumption that all expected scenarios will explicitly detailed: instruction frequently "leaves elements as exercises for the student to resolve".  And, many documents have unintended omissions.  Fortunately, there is a living, interactive reference resource here in these official forums, where any earnest learner can ask the global community: "I seem to be stuck... How can I do this with Inkscape?"

    As a CAD user myself, I can attest to the omissions, idiosyncrasies and outdated information that comes with instruction in any number of commercial products... CAD, visual arts, publishing, etc. There too, the user community has been providing battle-tested guidance in augmentation of the commercial suppliers' instructional materials (and many times, much better).

    WRT to throwing paint, Inkscape is illustration software, after all... not CAD. That is not to say that work cannot be done in Inkscape with numeric precision, it can. But it is not where the majority of users' interest is focused. There is a growing segment of Inkscape users interested in parametric features for CNC, but they are still a small fraction of the users. 

    Inkscape is not for everybody... but for those willing to dig just a little, there are nuggets of wisdom and mountains of experience to be discovered.

     

     

  40. #40
    Xav Xav @Xav👹

    I haven't been around here for a while, but I have still been writing my monthly column, so first a bit of housekeeping. Since my last post the following articles have become available:

    • Issue #175: Selectors and CSS dialog continued: advanced CSS selectors, and why you probably don’t want to use them!
    • Issue #176: New Live Path Effects (1.0/1.1): LPE dialog redesign and setting default parameters
    • Issue #177: New Live Path Effects (1.0/1.1): Dashed Stroke, Fill Between Many
    • Issue #178: New Live Path Effects (1.0/1.1): Ellipse From Points, Offset
    • Issue #179: New Live Path Effects (1.0/1.1): Measure Segments (general usage)

    I've also updated my article index with these new entries: https://www.peppertop.com/blog/?p=1563

     

    To dallen8028's comments: first I'd like to thank Tyler Durden for replying. He's pretty much covered the main points I was going to make - specifically that the tutorial in question is almost a decade old, and although it's still largely relevant, Inkscape has seen some significant changes during this time. You should definitely bear that in mind when following any of my older articles.

    My general advice has always been to use my articles where they're beneficial, or as reference material, but that asking questions on this forum is definitely the best way to proceed if you get stuck. Any tutorial always walks a fine balance of what to include and what to leave out: make it too detailed and it will confuse new users; too simple and more experienced users will skip it, possibly missing out on new nuggets of information. Asking questions on this forum is the best way to bridge that gap, as you can ask exactly what you want, at the level you need - and ask for further clarification if the answers are too advanced.

    You should also be aware that although the series is referred to as a "tutorial", it didn't take long for me to stop the hand-holding "here's how to draw a snowman" approach, and move on to being more of a reference guide, detailing almost every aspect of the application. I think my series is now the most comprehensive reference that exists for Inkscape, and continues to expand each month. But it's not really a "tutorial" so much these days.

    For what it's worth, I don't rate Inkscape as suitable for CAD work at all. Yes you can force some CAD-like behaviour out of it, but that's really not where it's most comfortable. I recommend most users to switch to a "real" CAD program if that's what they need. Although I'm an avid Inkscape user and still use it to create my monthly cartoon strip for Linux Pro Magazine, whenever I need to do CAD work I put it to one side and switch to FreeCAD.

     

    Finally, and most importantly, thank you for your feedback dallen8028 - it's always great to hear that people are using and benefiting from the many, many hours of work I've put into them. I hope you'll continue to find them useful, even if they're not a perfect match for your needs - but I'm sure the wonderful people on this forum can help to fill any gaps I may have left.

     

  41. #41
    Thermal Thermal @Thermal

    This is the first I've heard of Full Circle. Way cool!

  42. #42
    Xav Xav @Xav👹

    Hi @Thermal. I'm glad you've discovered FCM through these posts. Hopefully my Inkscape articles will be helpful to you, but if you can find even more value in the rest of the magazine then that's doubly great.

    Here are the details of the latest instalments of my series:

    • Issue #180 - New Live Path Effects (1.0/1.1): Measure Segments (details of how it works from an SVG perspective)
    • Issue #181 - New Live Path Effects (1.0/1.1): Corners (Fillet/Chamfer)
    • Issue #182 - New Live Path Effects (1.0/1.1): Power Clip and Power Mask (and why you might not want to use them)

     

  43. #43
    Xav Xav @Xav👹

    Unfortunately I don't have the time to hang out on here as I once did (and as I did for many years before with the old forum). So updates will continue to come in fits and starts, I'm afraid. I am still writing my column for Full Circle Magazine every month, however - I'm just not updating this thread on the same schedule. So here's another bulk update describing the content of the column for the past three issues:

    • Issue #183 - New Live Path Effects (1.0/1.1): Boolean Operation and Slice LPEs
    • Issue #184 - Live Path Effects and Extensions (1.0/1.1): Additions to the Taper Stroke LPE. Render > Frame extension. Export > Export Layer Slices extension.
    • Issue #185 - Introducing the Web > Interactive Mockup extension (added in 1.0)

    I'm also still using Inkscape as part of the workflow to create my monthly comic strip in Linux (Pro) Magazine, and post older strips to my website and to Twitter, from time to time. All those strips are under a Creative Commons Share-alike license, with all the source files uploaded to GitHub. If anyone's interested in seeing those comics as they're posted, please consider following me on Twitter (@PeppertopComics).

    Finally, I guess I should point out that I also have a Patreon page. You get absolutely nothing extra from this than you would from following me on Twitter (though that might change in future), but if anyone feels that my articles and comic strips are worth a dollar or so to them each month, the extra support would be very much appreciated.

     

  44. #44
    Roy Torley Roy Torley @Roy_Torley

    Hi Xav,

    I know where you are with free time at a premium.  All I can do is lurk on forum now and make a quick comment.  Nonetheless, the links are still here, so we have community.

    I really appreciate the amount and quality of work you have been creating for all of us, so ... consider yourself appreciated!

    I wish you good fortune with all your endeavors and stay well,

    Roy

  45. #45
    Jim Smithheisler Jim Smithheisler @Tjingles

    I have compiled all of the articles into a series of pdf's. Well, I also combined the series into one pdf but that one is over 242mb🤠

  46. #46
    Jim Smithheisler Jim Smithheisler @Tjingles

    I updated my inkscape pdf series to include pt 128 from FCM188 today.

    I would like to offer the fruits of my labor to the community, but I don't know how to do that in a safe, legal manner.

    Perhaps someone could offer a little guidance?

    Jim

  47. #47
    Xav Xav @Xav👹

    Thanks for doing this @Tjingles

    In terms of a safe, legal manner, there's very little to worry about or consider. The whole magazine, including my articles, is released under a Creative Commons license. Provided that license is preserved in the final PDF then you're free to share the files any way that suits you.

    That said, you might also consider getting in touch with Ronnie, the editor of the magazine. I know the previous 'Special Editions' were all reader contributions, so he might be interested in hosting your files on the Full Circle site directly.

     

  48. #48
    AugustM AugustM @AugustM

    Hi @Xav, I would be very interested in following your comic strip, but I imagine Linux Pro Magazine is a paid subscription and in the current political climate I am reluctant to show even a gesture of support for Twitter by creating a new account. Is there any other way of subscribing?

  49. #49
    Xav Xav @Xav👹

    @AugustM, Linux Pro is a paid subscription (individual copies are also sold at some news stands/newsagents), but I do post the strips to our website at the same time that I post them to Twitter (several months after they appear in the magazine). Subscription wise, the website is built on Wordpress and appears to offer an RSS feed - though I haven't tried it myself.

    Note that the website also includes our older comic strips, 'The Greys' and 'Monsters, Inked', as well as our current 'Elvie' series. That's well over 200 comic strips to go through already! In most cases we also make the original Inkscape and MyPaint source files available so you can pick them apart, learn from them, or even change them to suit your needs. In the case of The Greys there's at least one Easter Egg hidden in each one, which usually requires a bit of work with Inkscape to uncover.

    Otherwise there's our Patreon page, where I post new strips before they go on Twitter, and our patrons are notified when I do so. Patreon is a subscription service (though so far there's very little I've posted that's for patrons only - I'm not a fan of restricting content from people who can't afford it), but we've set the basic tier at $1 per month, which we hope people will find reasonable*.

    * (Don't think of it as $1 per month, but rather $12 per year to help us cover the costs to host hundreds of old comic strips, continue to produce new ones, and write my Inkscape articles for FCM!)

  50. #50
    Xav Xav @Xav👹

    Another overdue catch-up post. First of all, I've updated my index of articles following changes to the structure of the Full Circle site, so links should work again now:

    https://www.peppertop.com/blog/?p=1563

    Since my last update there have been 5 new issues, which means 5 new Inkscape articles:

    Yes, I've only just started covering the changes in 1.2 as we career rapidly towards the release of 1.3. I just can't keep up with those Inkscape devs! (Well, not if I want to keep going into things in the detail I do)

     

  51. #51
    dwhall dwhall @dwhall

    Hello: I have recently transcribed the FCM pdf Inkscape tutorials into html files (70MB, 1,470 files in 5 folders and approx. 150 html pages). They are used in my local HDD web site accumulated over the past 30yrs.

    I would like to share the retyped tutorial pages but have zero experience with networks/servers/hosting. Could anyone point me to some simple instructions/advise in how best to do this.    Thank You in advance

  52. #52
    Xav Xav @Xav👹

    Time for another batch update:

     

  53. #53
    dwhall dwhall @dwhall

    Hello: Have just transcribed the latest tutorial (Part134) and tried the Multi-page javascript. The results have me flummixed, I only have a rudimentary knowledge of vanilla JS (even less of ES5/ES6) but this is my attempt to track down the cause of the problem (the array created appears to be empty).

       xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
       xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:svg="http://www.w3.org/2000/svg">
      <script id="script1">const inkNS = 'http://www.inkscape.org/namespaces/inkscape';
    const svgNS = 'http://www.w3.org/2000/svg';
    const pages = document.getElementsByTagNameNS(inkNS, 'page');
    console.log((pages));
    console.log(Array.from(pages));
    if (Array.from(pages) == "") {console.log("empty")}
    else {
    Array.from(pages).forEach((page, idx) => {
       console.log(idx, page);
    });
    }</script>
      <sodipodi:namedview
    

    the console output follows:

    HTMLCollection { 0: inkscape:page#page1, 1: inkscape:page#page2, 2: inkscape:page#page3, 3: inkscape:page#page4, length: 4, … }
    ​
    0: <inkscape:page id="page1" x="0" y="0" width="52.916668" height="52.916668" margin="0" bleed="0" inkscape:label="star">​
    1: <inkscape:page id="page2" x="62.916668" y="0" width="52.916668" height="52.916668" inkscape:label="rhombus">​
    2: <inkscape:page id="page3" x="125.83334" y="0" width="52.916668" height="52.916668" inkscape:label="spiral">​
    3: <inkscape:page id="page4" x="188.75001" y="0" width="52.916668" height="52.916668" inkscape:label="triangle">
    ​
    length: 4
    ​
    page1: <inkscape:page id="page1" x="0" y="0" width="52.916668" height="52.916668" margin="0" bleed="0" inkscape:label="star">​
    page2: <inkscape:page id="page2" x="62.916668" y="0" width="52.916668" height="52.916668" inkscape:label="rhombus">​
    page3: <inkscape:page id="page3" x="125.83334" y="0" width="52.916668" height="52.916668" inkscape:label="spiral">​
    page4: <inkscape:page id="page4" x="188.75001" y="0" width="52.916668" height="52.916668" inkscape:label="triangle">​
    <prototype>: HTMLCollectionPrototype { item: item(), namedItem: namedItem(), length: Getter, … }
                                                       ex-134multi-page.svg:19:9
    
    Array []
    ​length: 0
    ​<prototype>: Array []
                                                       ex-134multi-page.svg:20:9
    
    
    empty                                              ex-134multi-page.svg:21:39

    Any ideas what has gone wrong??? The svg was created using v1.3beta but the JS was initially entered via v1.2.

     

    On a separate but related problem (possible bug in v1.3beta) - In tutorial 133 attempting to enter the element &lt;svg:view&gt; the svg: namespace is not saved. Does work however with v1.2.

  54. #54
    Xav Xav @Xav👹
    *

    Thanks for your feedback @dwhall - and for actually trying the code! It looks to me as though the issue is probably timing-related. The code is running immediately on page load - but that means it's getting a chance to execute before the DOM has settled down and all the elements are in place. Looking at my own test document it seems that Inkscape inserted the <script> element at the end of the page, whereas yours is at the beginning. I'm not sure what caused that difference in behaviour, but it means that the XML has already been read and parsed by the time the script is run with my file, but the opposite is true with yours.

    There are a few ways to work around that issue, but the approach I'm going to suggest is to wrap the code in a function, and call that function as a result of the 'load' event that the browser fires once it's finished loading the content of the page. This doesn't strictly guarantee that the DOM has settled down by that point, but is good enough in the vast majority of cases. Your code  ends up looking like this:

    function addViews() {
      const inkNS = 'http://www.inkscape.org/namespaces/inkscape';
      const svgNS = 'http://www.w3.org/2000/svg';
      const pages = document.getElementsByTagNameNS(inkNS, 'page');
      console.log((pages));
      console.log(Array.from(pages));
      if (Array.from(pages) == "") {
        console.log("empty")
      } else {
        Array.from(pages).forEach((page, idx) => {
           console.log(idx, page);
        });
      }
    }
    
    window.addEventListener('load', addViews);
    

    Hopefully you can see that I've wrapped your code in a function (named 'addViews'), and then at the end of the code I've added an event listener to the browser's window which waits until the browser fires the 'load' event before calling the addViews() function.

    I'd be really grateful if you could try this code and let me know if it works better for you. If it does, the corresponding changes to the code I published should be relatively easy to make (but I'll post the updated code here anyway). Assuming that new code works okay, I'll write a correction in part 135 of the series.

     

    As for the issue with creating a namespaced element in v1.3, thanks for the information. My tutorials only target released versions, rather than development builds, but I'll install 1.3beta to see if I can reproduce the problem in order to file a bug, as soon as I have the time.

     

    Once again, thanks for bringing these issues to my attention, it really is appreciated.

     

  55. #55
    dwhall dwhall @dwhall

    Thank you for your reply.

    Both suggestions ((a.) placing existing code in a function and (b.) moving the existing code block to the end of the svg file) work.

    Thanks again.

  56. #56
    Xav Xav @Xav👹

    Regarding entering the namespace in version 1.3, it appears that the behaviour of the XML editor has changed a little, but the end result should work out the same. The dialog that pops up for you to type in the node name has been replaced with inline editing within the dialog. You can enter a namespace as a colon-separated prefix (e.g. 'inkscape' or 'sodipodi') and it gets saved as expected, but if you use 'svg' as the namespace it gets dropped. The behaviour of the resultant file should be the same, however, as 'svg' is the default namespace, and is therefore implicitly present on all elements that don't otherwise have a specific namespace.

    I believe this is just a small UI change that shouldn't affect the practical outcome of adding a named view to the document. Please let me know if your experience indicates otherwise, though.

  57. #57
    dwhall dwhall @dwhall
    *

    Opps my bad! I was so thrown by the absents of the svg: namespace I reverted to v1.2 to complete the exercise and did not persevere with completing it in v1.3. I have now done just that and it works in v1.3 without the svg: namespace. This peeked my curiosity, so I tried entering view without the svg: namespace in v1.2. The result did not work, so I looked more closely in a text editor at the two versions of the saved svg files. It appears to be more than just a tweak of the XML editor but a change in the format of the svg files saved.

    v1.2 (working version) save
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!-- Created with Inkscape (http://www.inkscape.org/) -->
    
    <svg:svg
       width="52.916668mm"
       ---->
    ....
      <sodipodi:namedview...>
        <inkscape:page
    	---- />
        <inkscape:page--->
          <svg:view
             viewBox="125.83,0,52.92,52.92"
             id="page-3" />
        </inkscape:page>
    
      </sodipodi:namedview>	
      <svg:defs
    ....
      </svg:defs>
      <svg:g
    ....
    v1.3 save
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!-- Created with Inkscape (http://www.inkscape.org/) -->
    
    <svg
       width="52.916668mm"
       ----->
    ....
      <sodipodi:namedview...>
        <inkscape:page id="page1"
    	---- />
    ...
        <inkscape:page id="page3"--->
          <view
             viewBox="125.83,0,52.92,52.92"
             id="page-3" />
        </inkscape:page>
      </sodipodi:namedview>
      <defs
    ....
      </defs>
      <g
    ...	
    

    Also I noticed that v1.3 now saves the page IDs as page1,page2.... etc rather than as numbers, could this in future make accessing the pages easier.

  58. #58
    dwhall dwhall @dwhall

    Sorry I am going mentally bonkers, I am now unable to replicate what I did above. All the svg files have the same format in a text editor (the v3.1 save) the v1.2 save listing is only in the v1.2 XML editor.

  59. #59
    Xav Xav @Xav👹

    Don't worry, XML drives the best of us bonkers from time to time 😀

    The page IDs being 'page1', 'page2' and so on won't help make them any more accessible in a browser, unfortunately. The node itself is still a proprietary <page> element in the 'inkscape' namespace, so the browser won't understand what to do with it if you append that ID to the URL. If anything it will make them potentially less accessible in the browser: if someone tries to use my code but leaves out the hyphen, they'll potentially get ID clashes and the browser might resolve them to the <page> element rather than the <view>.

  60. #60
    dwhall dwhall @dwhall

    Having had time to sleep on it. I am relieved in now being able to replicate what happened yesterday.

    Using the v1.2 XML Editor and inserting only a view element (without the svg: namespace) causes Inkscape to save the file in the same format as shown in the XML Editor. Using a text editor to add svg: to the view element

    results in a working file.

    However if I follow the tutorial and insert the svg:view element the saved file removes all svg: namespaces

    resulting in a file format the same as listed for v1.3 which also works.

  61. #61
    Xav Xav @Xav👹

    In theory either <view> or <svg:view> in the XML file should have exactly the same effect: they both use the same namespace, except that one mentions it explicitly while the other relies on the fact that it's the default namespace.

    When writing the tutorial (which targets version 1.2) I chose to explicitly state the namespace so that the new entry appears the same as the other nodes in the XML editor. It shouldn't be strictly necessary, but I thought it would avoid confusion given that 1.2 likes to show the namespaces for all elements. As you've found, with 1.3 the svg namespace gets stripped out, and also is not displayed in the XML editor. Had I been writing that tutorial with 1.3 as a target then I wouldn't have included the namespace when creating the new element.

    Including or omitting the namespace should result in a working file, regardless of which version of Inkscape you're using. The only real difference is one of user expectation, based on how the XML editor displays other elements.

     

    If I've got space after writing my next article I'll try to mention this difference. But it's a relatively minor thing that will still produce a working file whichever approach you take, so if I'm short of space I'll probably just let it slide, at least until I'm next talking about the XML editor in a post 1.3 world.

  62. #62
    Xav Xav @Xav👹
    🔥

    Where does the time go? I've just updated my index page with the most recent few articles:

     

  63. #63
    dwhall dwhall @dwhall

    For anyone interested in the Full Circle Magazine Inkscape tutorials I have uploaded to the Inkscape gallery a zip file containing all of the tutorial pages as interlinked HTML pages designed for use on a local computer drive. Initially done for my own private use I thought it could be of use to a wider group. The HTML pages have screenshot images updated to reflect more recent v1.2/1.3 layout, include examples of Javascript interactive/animated svgs mentioned in the tutorials as well as my exercise svgs used to experiment while following through the tutorials. Hopefully without abusing the copyright??

  64. #64
    Xav Xav @Xav👹

    Wow! Thanks for doing that dwhall. Hopefully other readers will find it useful.

    I haven't looked at the zip file yet, but so long as Full Circle Magazine is suitably credited and the ZIP is distributed under the same license, there should be no copyright issues. The entire content of the magazine is under a Creative Commons Share-Alike Attribution 3.0 license, summarised pretty well with the text on the contents page of each issue:

    The articles contained in this magazine are released under the Creative Commons Attribution-Share Alike 3.0 Unported license. This means you can adapt, copy, distribute and transmit the articles but only under the following conditions: you must attribute the work to the original author in some way (at least a name, email or URL) and to this magazine by name ('Full Circle Magazine') and the URL www.fullcirclemagazine.org (but not attribute the article(s) in any way that suggests that they endorse you or your use of the work). If you alter, transform, or build upon this work, you must distribute the resulting work under the same, similar or a compatible license.
  65. #65
    dwhall dwhall @dwhall

    Hello. I have just read the latest Part141 and I note that in the section 'Set Origin of Selector Tool Transformations' there is regret for the lack of a centre-point as point of origin. This does actually exist -  enabled by clicking the 'centre of rotation' icon when in rotation mode. I found out about this from a  question to the Inkscape Forum, it seems to be little known of.

  66. #66
    Xav Xav @Xav👹

    You're right! It's a shame that they didn't add a centre handle in the standard move/resize mode which would have been clearer and more discoverable.

    For these 'new in version x.x' articles I tend to go through the release notes, then spend some time playing with the feature on my own machine until I feel I'm comfortable enough to (try to) explain it to the reader. Unfortunately, the mechanism you describe doesn't get a mention in the notes (https://wiki.inkscape.org/wiki/Release_notes/1.2#Selector_Tool) and I failed to stumble across it myself.

     

  67. #67
    Xav Xav @Xav👹

    Another update to my index page, with the latest few articles:

     

Inkscape Inkscape.org Inkscape Forum Tips, Tricks, and Tutorials Inkscape tutorials in Full Circle Magazine