Surprisingly for such a simple and common feature, there doesn't appear to be an option for this in Scribus as of version 1.4.5. Which is maybe related more to the document than the script itself. ValueError: Text distances out of bounds, must be positive. This script overcomes the fact that the script mentioned in Jon Bentley's answer did not work for me (in Scribus 1.4.6 at least), showing an error message with the following line: it cannot center the text if it is overflowing as it creates some kind of top and bottom margins (so maybe not ideal for large texts). Width of the text frame has been modified it is necessary to rerun the script if either the height or.I could experience at least two drawbacks with this script: The text inside the selected text frame will then be vertically centred. a Run Script window appears in which you select the.go to Script (next to Extras) in the main menu at the top, then select Execute Scripts.py file, calling it whatever name you want Notepad for example) with no style formatting applied to the document copy and paste the script in a text document (using bloc note or.Scribus.sizeObject(w, original_height, frame) # undo the latest 10pt step and fine adjust in 1pt steps While (scribus.textOverflows(frame) > 0) : While ((scribus.textOverflows(frame) = 0) and (h > 0)) : # if the frame doesn't overflow, shorten it to make it overflow (dl, dr, dt, db) = scribus.getTextDistances() ssageBox('Error:', 'You can\' center a text which is overflowing') ssageBox('Error:', 'You can\'t adjust an empty frame') ssageBox('Error:', 'You may only adjust text frames') ssageBox('Error:', 'You may select only one frame') # check that the selection is one text frame and get that frame Print "This script only works from within Scribus" To exactly put its content in the middle of the alessandro 1.0 / (c) 2009 alessandro rimoldi under the mit license This script adjust the top and bottom distance of a text frame Here is the script (if needed, a brief instruction on how to use the script follows these lines of code): #!/usr/bin/python and with multiple paragraphs of different styles.doing so automatically even when the linespacing and/or the first line offset is changed afterwards.Using Scribus 1.4.6, the following script center (vertical) align the content of a text frame by Alessandro Rimoldi was able to vertically align the text within a text frame:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |