![]() ![]() ![]() charstyle – a string with the name of the character style you wish to use in this paragraph style. dropcapoffset – this is the space between the right edge of the drop cap and the first line(s) of text. hasdropcap 0 = no 1 = yes dropcaplines – the number of lines the dropcap will take up. This can be a negative value for a hanging indent, but make sure leftmargin has a larger absolute value or Scribus will hang when you apply this. firstindent – indentation of the first line. gapafter – we might also say gap below the paragraph. Perhaps that feature could be added to the rules: Fill all space between upper and lower rule with a background color. It often turns out to be hard to create a background color that covers the whole paragraph. Changeing the background color is used, too, to highlight paragraphs. gapbefore – we might also say gap above the paragraph. It would be great to have this option as well in Scribus. rightmargin – indentation of the body of the paragraph. alignment – one of the following:Ġ = left justification 1 = center justification 2 = right justification 3 = fully justified 4 = extend leftmargin – indentation of the body of the paragraph. Must be an integer, in fact, all of the numerical values in createParagraphStyle must be integers. linespacingmode – numeric integer value, which must be one of the following:Ġ = fixed linespacing 1 = automatic linespacing 2 = align to baseline grid linespacing – only applies for fixed linespacing. Technically, this is only required element, but if you only want some of the options, then you must have an element for all the intervening ones. Scribus.createParagraphStyle("name", linespacingmode, linespacing, alignment, leftmargin, rightmargin, gapbefore, gapafter, firstindent, hasdropcap, dropcaplines, dropcapoffset, "charstyle")Īs in the companion piece, quotes around a parameter indicate it is a string surrounded by quotes, and the absence of quotes indicates a numerical value.Ĭommand Elements name – a string with the name of the style. This is something of a companion to Using createCharStyle.Īlthough in Scribus there is an implicit character style whenever you create a paragraph style, in Scripter these are two distinct commands, but we'll see how the two can be linked. This article is part of the Scripts series.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |