Scribusoid

Author Topic: Text flowing around images  (Read 474 times)

silvain

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Scribus User
Text flowing around images
« 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.

RobSay

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
  • Scribus User
Re: Text flowing around images
« Reply #1 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:
  • Create an empty frame that is slightly larger than the embedded frame, align centre, group the two objects, setting the flow on the group (uggh)
  • Add a border to the image frame, set the colour to white .. or whatever works with your background, limited width but really easy and amenable to scripting!

#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")

cheers

Rob

 

palmate