[Scribus] inserting a frame into already linked frames

Nik scribus
Mon Jul 10 07:28:04 CEST 2006


Hi Greg,

Thanks for your continued time and thoughts.

On reading and re-reading your responses and my original posts, I am 
wondering if my original post was perhaps ambiguous. The problem I was 
trying to describe was that of inserting a *text* frame into a chain of 
linked *text* frames.

>>>Message: 4
>>>Date: Sun, 09 Jul 2006 11:14:56 -0400
>>>From: Gregory Pittman <gpittman at iglou.com>
>>>Subject: Re: [Scribus] inserting a frame into already linked frames
>>>To: scribus at nashi.altmuehlnet.de
>>>Message-ID: <44B11D70.8030903 at iglou.com>
>>>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>>
>>>Nik wrote:
>>>
>>>    
>>>
>>>>Hi All,
>>>>
>>>>I have encountered this situation in most documents, and still haven't 
>>>>found a good solution. The issue is that for various reasons, I find I 
>>>>need to insert a frame somewhere in the middle of an existing set of 
>>>>linked frames. The problem is that Scribus doesn't seem to allow me to 
>>>>link my new frame to any frame which has existing links. So the only way 
>>>>that I have found to successfully insert a frame is to manually unlink 
>>>>all the frames from the insertion point to the last frame in the chain, 
>>>>link in my new frame, and then manually re-link all the frames together 
>>>>that I just had to unlink. If the chain has many frames (if I have 
>>>>tables, then there can be 50 or more frames invloved, then this is very 
>>>>tedious.
>>>>
>>>>I have looked around for some way to force link or unlink a frame, but 
>>>>have found nothing so far. Is there something I've missed which makes 
>>>>this easier?

> Perhaps the developers will know -- seems a rather complex operation to 
> accomplish.

I would expect it to be a vary simple operation. In terms of the file 
format, and most likely the memory structures as well, I expect it to 
consist of simply manipulating a linked list.

Eg: if each frame has a 'previous_link' and 'next_link' field, then 
inserting a new frame B *before* frame A consists of:

B.next_link = A;
B.previous_link = A.previous_link;
A.previous_link = B;
if (B.previous_link != null) B.previous_link.next_link = B;

alternatively, inserting B *after* A consists of:

B.previous_link = A;
B.next_link = A.next_link;
A.next_link = B;
if (B.next_link != null) B.next_link.previous_link = B;


> 
> As far as I know, you can delete/insert content in the middle of a 
> series of linked frames.

I'm not sure I understand this sentence. If you mean 'As far as I know, 
you can delete/insert a text frame in the middle of a series of linked 
frames', then are you referring to a method different to the one I've 
described, with its attendent problems? If so, I would be pleased to try 
it out - what do you have in mind?

If you are referring to inserting/deleting content, as distinct to 
frames, then I agree - it is easily done; but that is not the issue that 
I have been referring to. I specifically need to insert or delete a text 
frame into/from the middle of a chain of text frames, and the current 
way I am doing it requires me to perform a whole series of completely 
unnecessary steps to accomplish this.

Thanks again for your thoughtful input.

Cheers!
Nik.



More information about the scribus mailing list