Text flowing around images

Previous topic - Next topic

silvain

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

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):

# 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

silvain

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 (https://nextcloud.silvain-dupertuis.net/index.php/s/X9HLKmf9jxjgZQS) I am using on a regular basis.