How to Change Column Gap En Masse (Version 1.4.7)

Previous topic - Next topic

spibo

Hello,

Is there any way to change the column gap of multiple text frames at once?

a.l.e

no, i don't think so...

but if you have really many frames to modify, it would be easy to write a small script that goes through all frames and changes the column gap.

the pseudo code for it is:

for each page
  for each item in page
    set column gap to 1 cm

but you probably don't want to modify every frame in the document, so i have to know more about the to find the frames to be changed, before i can help you to create a python script for it...

spibo

Every text frame in the document is identical, I do indeed want to modify all of them in the same way.

a.l.e

this script will do what you need:


import scribus

unit = scribus.getUnit()
scribus.setUnit(scribus.UNIT_MILLIMETERS)

columns_width = 20

for page in range(1, scribus.pageCount() + 1):
    scribus.gotoPage(page)
    for item in scribus.getPageItems():
        if (item[1] == 4):
            scribus.setColumnGap(columns_width, item[0])

scribus.setUnit(unit)


save this in a text file (not a word file!) with the extension py (something like set-column.py; make sure that the spaces are kept exactly this way) and run it from scripter > execute script...

spibo