corruption when copy-pasting math text

Post questions on how to use or achieve an effect in Inkscape.
stabu
Posts: 7
Joined: Wed Jan 09, 2008 3:33 am

corruption when copy-pasting math text

Postby stabu » Wed Apr 29, 2009 8:57 am

ok so Ive converted some equations from latex into various svg files using pdf2svg.

I can load each of svg files into inkscape no problem ... but if I try to copy-paste the equations between inkscape instances,
the text gets corrupted. Not beyond recognition however, there is some logic to the corruption (spaces turn into M's,
powers of two turn into powers of b, etc.).

I tried various thing to solve this, like re-saving in inkscape and plain svg format. But the same thing occurs next time around.

There was a related though different problem here on the forums, and it mentioned pasting into different layers, but this didn't work.

The svg files refuse to live with one another in the same inkscape instance, that is the conclusion I've reached.

Maybe pdf2svg is really rendering a crippled SVG format which cannot interchange. Any ideas on how I might appraoch this are welcome.

(PS. I know have used the latex renderer in inkscape,but I can't get lxml nor pstoedit to work on my system).

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: corruption when copy-pasting math text

Postby EarlyBlake » Thu Apr 30, 2009 3:52 am

There are problems copying and pasting between two instances of inkscape for any kind of inkscape file. (Instances being to separate processes of inkscape running with their own menus.) Does it have to be between two separate instances? Did you try pasting between two files in one instance? You could still run into problem there. When a file, generated by another program, is translated to inkscape, there is some file format translation header "stuff" (for lack of a better word) place in the XML tree. That header doesn't always get copied when you paste between instance or files. The quickest way around the problem might be to duplicating the original file, open the original and the duplicate file, in one instance of inkscape. You would probably be able to cut and past between those to with out a problem. You may even be able to copy and paste between instance that way, dunno.

If you still have problems you can see some of what is going wrong by looking in the XML tree. Open the XML editor Shift Control X. Click on something on the page. The item you clicked on will be highlighted in the XML tree. Look for differences between the items that aren't displayed correctly, by checking them against the item displayed correctly in the original file. You may have to search up and down the tree because some formatting that is above an item in the 'tree' is apply "down" the tree to text of line you are having the problem with.
Last edited by EarlyBlake on Fri May 01, 2009 5:36 pm, edited 1 time in total.

stabu
Posts: 7
Joined: Wed Jan 09, 2008 3:33 am

Re: corruption when copy-pasting math text

Postby stabu » Fri May 01, 2009 6:47 am

thanks, EarlyBlake
for a very thoughtful answer, much appreciated!
Now I know it's a problem area, yep I'll probably look into the XML then.
Thanks!!!


Return to “Help with using Inkscape”