Scribus Forums

Scribus => Scripts and Plugins => Topic started by: silvain on May 16, 2021, 07:34:22 pm

Title: Text flowing around images
Post by: silvain on May 16, 2021, 07:34:22 pm
Does anyone know a script which would simplify setting text flowing around images with a standard margin?
The way I do it involves no less than 6 different selections in 2 different interfaces.
It would be so much better to be able to do it with a single script.
    1. Menu Shape
        a) Click on Modify
    2. Interface of contour line modification
        a) Check «Modify the shape»
        b) Choose value for margin space (like 3 mm or 5 mm)
        c) Click on the appropriate arrow to enlarge the shape
        d) Click ok to confirm
    3. Back to the previous intervace (Menu shape)
        a) Click on the icon (4th one) «Flow text around contour line»

Margin value is preserved during session, otherwise it is reinitialised to its default value of 10 mm.
Title: Re: Text flowing around images
Post by: RobSay on May 18, 2021, 05:38:27 pm
I'm not quite sure of the manual process you are describing - but editing the shape directly is something I've avoided.

To add a visual separation between text flowing around an embedded frame (image or anything else) I have used two approaches:

#1 is a hack but can do anything .. and can just about be scripted if you need it to be repeatable / automated
#2 is the easiest both in user terms and scripting - but is limited to same width on all sides and also limited in width. Add your image, select the frame and run this (update the name to match your frame):
Code: [Select]
# text flow mode 2 is bounding box
setTextFlowMode("nameOfFrame", 2)
# add a line to your frame (shape, image text .. whatever)
# "White" needs to be in your colour palette
setLineWidth(6, "nameOfFrame")
setLineColor("White", "nameOfFrame")


Title: Re: Text flowing around images
Post by: silvain on September 26, 2021, 07:43:45 pm
Creating a second frame can be a good solution.
But generally, with documents with many pictures, I like to set the margins with the text directly with the settings of the image and its contour line. It is not that long to do once you know how to do it, but it would be nice to be able to automate it.
Here is a French/English description of this process ( ( I am using on a regular basis.