Creating and Manipulating Styles

createCharStyle(...)
createCharStyle(...)

Creates a character style. This function takes the following keyword parameters:

On a practical level, this is a challenging command to fully understand if you wish to assign a number of settings, since keeping track of where you are, and which kind of entry is needed (string vs number) is not easy. For some guidance on this showing in particular how to set tracking, see the wiki page Text and Text Manipulation.

createCustomLineStyle(...)
createCustomLineStyle(styleName, style)

Creates the custom line style 'styleName'.

This function takes list of dictionary as parameter for "style". Each dictionary represent one subline within style. Dictionary can have those keys:

createParagraphStyle(...)
createParagraphStyle(...)

Creates a paragraph style. This function takes the following keyword parameters:

If you wish to skip a number of settings, unfortunately, this command will not accept null values, i.e., a series of commas. You must put some integer value for each of the potential parameters. For example, imagine you wish to only specify a name for the Paragraph Style, and the Character Style. Your command should be something like:

scribus.createParagraphStyle("MyNewStyle",0,0,0,0,0,0,0,0,0,"MyCharStyle")

On the other hand, if you only wanted to specify a name and linespacing mode, you can quit whenever after you finished with non-zero data:

scribus.createParagraphStyle("MyOtherNewStyle",1)

getAllStyles(...)
getAllStyles() -> list

Deprecated, use getParagraphStyles() instead.

getCharStyles(...)
getCharStyles() -> list

Return a list of the names of all character styles in the current document.

getParagraphStyles(...)
getParagraphStyles() -> list

Return a list of the names of all paragraph styles in the current document.