[Ipe-discuss] Warning! Beware of grouped text

Johan Ingvast ingvast at md.kth.se
Wed Nov 2 08:25:08 CET 2005

For long I have had problems with my ipe-files becoming unreadable and 
never understood how to avoid it. Now I think I know how.

When I have text in a group and change fontsize of the group something 
1. When I save and reopens it,Ipe says it does not recognize the the
    symbolic attirbute footnote (if footnote is the size set to the
    group).  The file can still be opened and the problem fixed if the
    group is selected and again the font size is set again, everything
2. Frequently when having a grop of text with the font changed, the file
    becomes unreadable, i.e. can't be opened after save.

Both problems can be reporduced by:
a. Open Ipe
b. Make some text
c. Group it. (Can be done with a single textobject)
d. Set font size of the group to "footnote"
e. Save (preferrable as xml)
f. Quit
g. Reopen

The second problem can be fixed by hand editing of the xml file. There 
is a ">" character missing at line 7. You can insert it and open the 
file in ipe. Then the first problem shows.

As long as you save the file in xml you are relatively safe, however if 
the document would be in pdf or eps, fixing the problem is not trivial.

Therefore I think there should be a
***  Warning somewhere in the documentation or on the Ipe homepage. ***
Of course even better would be a patch.

To fix the problem with the corrupt file format, I have made a macro in 
vim that runs through the file and corrects the content.
Add these lines to .vimrc
   map qf ggqipe1
   map qipe1 /<text\(\s\+\k*="[^"]*"\)*[^>[:blank:]]/e<CR>qipe2
   map qipe2 i><Esc>qipe1
Then to use it, open the file in vim, hit the keys qf
Save and leave by ZZ
I know, not very elegant, I would have preffered to do it in sed or 
perl, but my knowlede of those is too limited to make a fast fix.


More information about the Ipe-discuss mailing list