Text "sticking" together

Post questions on how to use or achieve an effect in Inkscape.
franciscojhh
Posts: 3
Joined: Mon Jul 14, 2014 3:26 am

Text "sticking" together

Postby franciscojhh » Mon Jul 14, 2014 8:40 am

Dear all,

Often when I save a project in eps with Inkscape, and open it again in Inkscape, similar types of text in the figure stick together in the same object. However, I cannot separate them using Object>Ungroup. Do you know why does this happen and how can I separate the texts so I can edit them separately?

Thank you in advance,

Fran

JurgenG
Posts: 7
Joined: Mon Jul 14, 2014 9:24 pm

Re: Text "sticking" together

Postby JurgenG » Tue Jul 15, 2014 5:49 am

Hi Fran,

often when importing vector objects I notice these items are grouped multiple times (groups of 1).
Have you tried ungrouping the file more than once?
If you look in the status bar, what kind of object does it say it is if you select it? Is it still a group? Or is it something else?

franciscojhh
Posts: 3
Joined: Mon Jul 14, 2014 3:26 am

Re: Text "sticking" together

Postby franciscojhh » Wed Jul 16, 2014 1:05 am

Ungrouping several times does not help. In the status bar, it says it is "Text". It is as if the program had combined different text boxes into a big text box, which is a bit annoying then if I want to edit them.

russellallyn899
Posts: 2
Joined: Tue Oct 17, 2017 6:51 am

Re: Text "sticking" together

Postby russellallyn899 » Tue Oct 17, 2017 7:06 am

Hey guys - any update on separate text boxes that link together when you bring them into InkScape? I'm starting with AI files (or SVG files - doesn't matter) and importing them to InkScape but all the text will link together and cannot be edited. Any idea how to fix?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Text "sticking" together

Postby brynn » Wed Oct 18, 2017 2:32 pm

Well, even in the original post (a few years ago) no one ever provided files which displayed the issue, which we could test. I have no idea what is meant by the text sticking or linking together, or why it's a problem.

Please provide an SVG file which is showing this problem, and describe it as well as possible, so we know which part of the file to look at (in case there are other contents in the file).

Unless you mean that the text has been converted to paths. That's an irreversible process. However, if it's still text, it should be editable. So we need to investigate, before we can offer comments.

russellallyn899
Posts: 2
Joined: Tue Oct 17, 2017 6:51 am

Re: Text "sticking" together

Postby russellallyn899 » Thu Oct 19, 2017 12:15 am

Hi Brynn - See the attached file. I work for a transportation company and we create these "traffic figures" to edit separate volumes and I work quicker in Illustrator so I create them in AI and then for the interim edits we use an InkScape workflow so the traffic engineer (who does not have Illustrator) can edit the volumes on the fly. The issue is that separate text boxes which contain the traffic volumes come stuck together and cannot be edited without affecting all the other numbers. Sometimes it is only a few linked together and sometimes it is 30 or 40... They are not grouped - they come in as one huge text box. As soon as I try to edit one they all move to one huge top-down text box. Let me know what you think. Thanks!
Attachments
Fig xx_TEST v2.svg
(55.06 KiB) Downloaded 173 times

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Text "sticking" together

Postby Xav » Thu Oct 19, 2017 2:18 am

Looking at the file you only actually have a single <text> element in the SVG. Within that are a load of <tspan> elements, one for each bit of text. Each of those <tspan> elements has explicit x and y coordinates - and, in fact has multiple explicit x coordinates, one for each character. That's why normal editing doesn't work: even if you remove a character the ones that follow it won't slide along because their coordinates are set in stone. It seems that AI might have been a little overzealous about nailing down the position of each character.

If you open the XML editor in Inkscape (Edit > XML Editor) you can see the structures I'm talking about.

To edit this there are a couple of approaches you can take. The first is to make edits to the numbers directly in the XML editor. This seems to work as you would expect, but may require some trial and error to find the right <tspan> to edit for a particular number. (Hint: in the XML editor select one <tspan> then use the up and down keys to move to the others - you can see the currently selected one on the canvas as you do so)

The other approach is to split the text into individual <text> elements by using Extensions > Text > Split Text. Uncheck the option to Preserve Original Text, and make it split based on Lines. That gets you most of the way there, but the individual coordinates are still present. To remove those, select all the text objects (select one, then use Edit > Select Same > Object Type) then use the Text > Remove Manual Kerns option.

There will still be some manual cleanup to do on "odd" elements. For example, the original file has a <tspan> for each label, except for three labels in a line (<tspan id="994">) which has all three labels as individually positioned characters in a single string.


Going forward, the best bet would be to see if AI has some option to export individual text objects, rather than a single <text> element with lots of <tspan> children. Or if there's a workflow you can use which will create them as separate things. At least that way, even if the explicit coordinates are still present, it simplifies it down to just removing manual kerns in Inkscape.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”