Greetings,
I'm using Inkscape version 0.48.2 r9819 on windows 7 (64 bit) operating system.
I've created a rather large file that contains strictly paths and text (genealogy tree with names on paths). The file is currently 18000+ lines (roughly 1500 name-path combinations). It has 9 layers.
Initially, when the file wasn't so big (about 5 layers), it was easy to create a new layer and move text with their respective paths to that layer. For some reason it no longer works properly.
When I select text with corresponding paths and move them to another layer, the text and paths separate. The text seems to jump clear across the screen way off the path, but both move to the new layer. Selecting a single path and text, removing from path, then putting back on path doesn't work (it stays separated, albeit "on path").
I've also tried going into the .svg file and manually moving the text and corresponding linked path to the layer, it seems to work, after reloading the file, when I select the path (with the path tool) to move it, the text and path separate . Additionally, both text and path are relocated elsewhere on the drawing (even though I didn't fiddle with the path location, I just cut/paste from one layer to the next).
Initially when I started out I would copy/paste about 10 lines of text into Inkscape which created a single text block with multiple lines. I then cut/paste each individual line into its own line, then put each line of text on a path. Having so many names to add, I ended up pasting a lot of text into a single text block, then manually editing the .svg file to create multiple text blocks (I gave each a unique ID). Then I'd create a single path, duplicate it, duplicate both, etc. till I had enough paths, then move text to path individually (quite tediously).
The edited code looks identical in format to the Inkscape created code and works as it should with the sole exception for trying to move it to a new layer as stated above. The ONLY inconsistency I've spotted in the file (edited code or not) is that some of the paths begin with a lower case m and others begin with an upper case M. I did read about absolute and relative paths, but I have absolutely no idea what caused some to be absolute and some to be relative. I've tried editing the file and changing all lower case m to upper case M with no change in the drawing itself nor does it help with the layer problem.
I am wondering if by editing the svg file manually I may have done something (or not done something) incorrectly. Is there some rule about paths, text, and the root layer? Or perhaps a problem by not using Inkscape generated text and path IDs?
Thanks for any help you can offer.
Moving to new layer separates path and text
Re: Moving to new layer separates path and text

Welcome to InkscapeForum!
My first thought is that this behavior sounds like it might be related to a well known bug. But there are many factors to consider, and I'm not sure they all are consistent (with the bug I'm thinking of). I think the best thing to do, in this situation, is to share the SVG file with us. Then we can examine all the details. You could upload here (attach file to reply using full editor, not Quick Reply) or anywhere you choose, and give us the link. If it's too large to upload here, you could either zip it, and upload the zip file, or again, upload anywhere and give us the link.
When you talk about text and corresponding path, do you mean that you've use the Text on Path feature? Or do you mean that they simply should be side by side? It sounds like you might have used Text on Path. I would be surprised if it's related to the letter "m", or any particular letter. But after 6 years using Inkscape, I think I may never understand certain parts of it (especially the SVG code).
Anyway, if we could look at the file, we (and not necessarily me) can probably find the problem

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Moving to new layer separates path and text
Thanks but it contains a lot of confidential information (names and birth dates) that I don't want to release to the general public. I'll see about editing it first.
Re: Moving to new layer separates path and text
Well, if you edit it, you might remove the problematic content (if indeed the problem is in the content). I'm not sure what to suggest in this case. This forum does have private messaging, but you can't attach files to them. I wonder if you can find a host for the image which is password protected, or something like that? I would offer to give you my email address, except that I'm probably not the best person for this problem. I don't mind trying, but I would not have a very high degree of confidence that I can find the problem, in this case.
Having said all that though, I doubt if more than 5 to 10 of us might download the file. After the problem is solved, you can edit the message and delete the file. (or delete from whatever host) I'd say the chances of any of us knowing, or ever meeting any of your relatives is pretty slim.
Having said all that though, I doubt if more than 5 to 10 of us might download the file. After the problem is solved, you can edit the message and delete the file. (or delete from whatever host) I'd say the chances of any of us knowing, or ever meeting any of your relatives is pretty slim.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Moving to new layer separates path and text
This may not help in the slightest, but try grouping your text and path together before you move it to a different layer. I've had similar issues with things becoming separated (though in my case I think it was during a copy & paste), and grouping the objects did the trick.
Re: Moving to new layer separates path and text
@xav thanks for your suggestion. I tried that and it does work, but when I ungroup them, the text and path fly apart again 
Brynn, I've zipped up the file and attached it. It's 1 MB unzipped. Thanks for your help.
EDIT: Problem solved; file deleted.
The new layer (containing only one item) is called "Robin_de_Logny-Destrehan," the layer below "Layer 1." I'm trying to move some text-path combos from Layer 1 to the new layer.
By the way, in going through the file again I noticed that most text blocks contain the <text><textPath><tspan> labels but a few of them don't have the <tspan> label.
Example: This text block includes a tspan label.
But this text block does not.
I'm assuming the svg <tspan> tag corresponds to the <span> tag in regular html and is optional so it shouldn't have an effect on the layering problem.

Brynn, I've zipped up the file and attached it. It's 1 MB unzipped. Thanks for your help.
EDIT: Problem solved; file deleted.
The new layer (containing only one item) is called "Robin_de_Logny-Destrehan," the layer below "Layer 1." I'm trying to move some text-path combos from Layer 1 to the new layer.
By the way, in going through the file again I noticed that most text blocks contain the <text><textPath><tspan> labels but a few of them don't have the <tspan> label.
Example: This text block includes a tspan label.
Code: Select all
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Sans"
id="text3859"
sodipodi:linespacing="125%"><textPath
xlink:href="#path3988"
id="textPath3990"><tspan
id="tspan3861">Marie de Bore de Mauleon (b. 1783) 4</tspan></textPath></text>
But this text block does not.
Code: Select all
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Sans"
id="text7745"
sodipodi:linespacing="125%"><textPath
xlink:href="#path8025"
id="textPath8328"
style="fill:#008000">Marie Celeste Destrehan (1808-1886) ---- Prosper François de Marigny (1807-1836) 5</textPath></text>
Last edited by xrayextra on Fri Sep 07, 2012 1:40 am, edited 1 time in total.
Re: Moving to new layer separates path and text
Wow, that is an ambitious project! Maybe I'll do something like that for my family.
Anyway, I've observed the same behavior, and I'm also on Win7, 64-bit, but Inkscape 0.48.1. If I remove the text from the path, it goes to the same place on the canvas as it does when I move it to the new layer, except it's still on the path when I move it to the new layer. It still looks related to a bug that I generally refer to as a transform bug (apologies to ~suv for not using the proper terminology) to me. But whether it is related, or whether the problem is even caused by a bug, I don't know for sure. I also can't speak to the code you mentioned.
But no worries, I'm sure others can find the problem
Anyway, I've observed the same behavior, and I'm also on Win7, 64-bit, but Inkscape 0.48.1. If I remove the text from the path, it goes to the same place on the canvas as it does when I move it to the new layer, except it's still on the path when I move it to the new layer. It still looks related to a bug that I generally refer to as a transform bug (apologies to ~suv for not using the proper terminology) to me. But whether it is related, or whether the problem is even caused by a bug, I don't know for sure. I also can't speak to the code you mentioned.
But no worries, I'm sure others can find the problem

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Moving to new layer separates path and text
xrayextra wrote:@xav thanks for your suggestion. I tried that and it does work, but when I ungroup them, the text and path fly apart again
Is there a particular reason why you need to ungroup them? You can enter a group to edit its contents without having to ungroup then re-group.
Re: Moving to new layer separates path and text
AFAICT the trigger of the observed displacement of text-put-on-path and the path the text was put on is the differing 'transform' attribute applied to the source and target layer groups [1].
Alternative workaround (alternative to Xav's tip about putting things into individual groups), applicable to your current drawing (note: the workaround assumes that the target layer (e.g. "Robin_de_Logny-Destrehan") is still empty):
Copy the 'transform' attribute of the source layer ("Layer 1") to the target layer (via 'Edit > XML Editor'). After this step you should be able to move path and text put on that path to the new layer without having things unexpectedly displaced.
Steps:
[1] transformations applied to (layer or regular) groups (e.g after changing the page orientation, or resizing the page to selection or drawing) can cause problems with other operations - this is known, and has been discussed at length and repeatedly in earlier topics. I won't go into details here, especially not about whether or not using transformations on SVG container elements like groups is a bug or not (it's not, the bug is elsewhere).
Alternative workaround (alternative to Xav's tip about putting things into individual groups), applicable to your current drawing (note: the workaround assumes that the target layer (e.g. "Robin_de_Logny-Destrehan") is still empty):
Copy the 'transform' attribute of the source layer ("Layer 1") to the target layer (via 'Edit > XML Editor'). After this step you should be able to move path and text put on that path to the new layer without having things unexpectedly displaced.
Steps:
- delete any existing objects from the target layer (or create a new target layer)
- open 'Edit > XML Editor…'
- select the source layer '<svg:g id="layer1" inkscape:label="Layer 1">' in the list of nodes on the left
- select the attribute 'transform' in the upper right pane
- copy the value of the 'transform' attribute displayed in the bottom right field
- select the target layer '<svg:g id="layer9" inkscape:label="Robin_de_Logny-Destrehan">' in the list of nodes on the left
- the target layer has no transform attribute yet:
to add it, first type the new attribute name 'transform' in the attribute name entry (entry box in the middle, to the left of the 'Set' button) - then paste the attribute value into the edit field at the bottom
- click on 'Set'
- close the XML Editor, deselect all (important), and reselect individual objects in the source layer
(make sure that the source layer is your current layer) - use the commands from the 'Layer' menu to move the selected objects to the target layer below.
[1] transformations applied to (layer or regular) groups (e.g after changing the page orientation, or resizing the page to selection or drawing) can cause problems with other operations - this is known, and has been discussed at length and repeatedly in earlier topics. I won't go into details here, especially not about whether or not using transformations on SVG container elements like groups is a bug or not (it's not, the bug is elsewhere).
Re: Moving to new layer separates path and text
@suv THANK YOU! That certainly took care of the problem. Now if only I could fully understand why, but I'll worry about that another time.
Thanks again, I'm one happy camper.
Thanks again, I'm one happy camper.