{"id":200,"date":"2007-04-23T20:33:12","date_gmt":"2007-04-23T19:33:12","guid":{"rendered":"http:\/\/ospublish.constantvzw.org\/?p=200"},"modified":"2008-09-08T18:04:15","modified_gmt":"2008-09-08T17:04:15","slug":"the-flow-of-text-in-masterpages","status":"publish","type":"post","link":"http:\/\/ospublish.constantvzw.org\/blog\/tools\/the-flow-of-text-in-masterpages","title":{"rendered":"The Flow of Text in MasterPages"},"content":{"rendered":"

The scripting in Scribus happens in the house of Python<\/a>. The Scribus module is loaded into scripts with the standard import scribus<\/em> or from scribus import *<\/em>. In this post, we’ll be using only one function off this module:<\/p>\n

createText(x, y, width, height)<\/code><\/p>\n

This function puts a TextBox of the specified width and height at the (x, y)<\/em>-coordinates of your document. This<\/a> is its documentation.<\/p>\n

The TextBoxes of Scribus Templates are eerily insular. Since we really didn’t find a way to make text flow in Scribus MasterPages, we were forced to write a script. It builds on a script that was posted some time ago on the Scribus mailing list<\/a>.
\n
\nWe have added an alternate to the Flow of Text that may be useful to the users of the script. The TextFlow in the original is fine, but ours is fine, too. To push the Text as a River metaphor a bit further: the text must flow, and we’re redirecting it with a Dam.<\/p>\n

To see the difference, it’s probably best to run the script itself. Fetch the TextBoxes.py<\/a> and Boxes.py<\/a> files, and put them in the same directory. Open Scribus and load a document. Things will only work if there’s already a Scribus document open.<\/p>\n

even = [[30, 30, 10, 10], [50, 50, 20, 20], [80, 80, 30, 30]]<\/code>
\nodd = [[30, 240, 10, 10], [50, 210, 20, 20], [80, 170, 30, 30]]<\/code><\/p>\n

The above are the lines in Boxes.py where you specify the size and position of your TextBoxes. It uses the same units as your Already opened Scribus document. Note that you can have different layouts for odd and even pages. Once you’ve written a layout, execute TextBoxes.py from the aptly named Script<\/em> menu.<\/p>\n

Boxes.py may be the only file that you will need to edit. It has a couple of other tweakable<\/em> parameters. Explore : )<\/p>\n","protected":false},"excerpt":{"rendered":"

The scripting in Scribus happens in the house of Python. The Scribus module is loaded into scripts with the standard import scribus or from scribus import *. In this post, we’ll be using only one function off this module: createText(x, y, width, height) This function puts a TextBox of the specified width and height at […]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[38],"tags":[59,2],"_links":{"self":[{"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/posts\/200"}],"collection":[{"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":1,"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":774,"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions\/774"}],"wp:attachment":[{"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ospublish.constantvzw.org\/blog\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}