Recent posts

Text and Typography / Re: Paragraph styles
Last post by PatJr - September 10, 2023, 04:01:56 PM
looks like that isn't a variable for a style
F3 Content Properties has a setting for that under Columns & Text Distances

it does seem like the styles could use some development, imho there should be a frame tag/style, but I'm happy to use Scribus the way the developers make it
Text and Typography / Paragraph styles
Last post by Bolean - September 10, 2023, 12:19:58 PM
Found some inconsistency when creating a chapter heading style. In the Alignment and Distances section the "space above" settings doesn't seem to work (no result in the document) while the "space below" works as expected.
I would like the heading start at a distance from the top and give a distance down to the body text.
Text and Typography / Re: Formatting poetry
Last post by a.l.e - September 08, 2023, 06:20:32 PM
btw, it looks like this:

Text and Typography / Re: Formatting poetry
Last post by a.l.e - September 05, 2023, 10:10:05 PM
hi sersha

in my eyes, using the tabs is rather a good idea.

but you mentioned that a script could also apply the styles and here is a script that does it:

- just apply the paragraph style to the first n paragraphs in the frames
- select the n paragraphs
- run the script to apply the style from the selection to the rest of the frame

    import scribus
except ImportError:
    print('This script must be run from inside Scribus')

def main():
    if not scribus.haveDoc():
        scribus.messageBox('Error', 'You need to have a document open')

    if scribus.selectionCount() == 0 or scribus.getObjectType() != 'TextFrame':
        scribus.messageBox('Error', 'You need to select a text frame')

    # get current selection
    selected_text = scribus.getFrameText()

    scribus.selectFrameText(0, 0)

    frame_text = scribus.getFrameText().strip('\r')
    if len(selected_text) == len(scribus.getFrameText()):
        scribus.messageBox('Error', 'There is no selection in the text frame')
        # no text selected

    paragraphs_count = selected_text.count('\r') + 1

    frame_paragraphs = frame_text.strip('\r').split('\r')

    styles = []
    start = 0
    for paragraph in frame_paragraphs[0:paragraphs_count]:
        scribus.selectFrameText(start, len(paragraph))
        start += len(paragraph) + 1

    for i, paragraph in enumerate(frame_paragraphs[paragraphs_count:]):
        scribus.selectFrameText(start, len(paragraph))
        scribus.setParagraphStyle(styles[i % len(styles)])
        start += len(paragraph) + 1

    scribus.selectFrameText(0, 0)
if __name__ == "__main__":
Text and Typography / Re: Formatting poetry
Last post by sersha - September 05, 2023, 01:38:34 PM
Thank you all who responded!
I did with tabs on second line, manually.
I also experimented with the second line indents and creating a style for that. It is better in a sense, but still a lot of manual work.
I am lazy! Thus looking for some sort of automated solution, like select a piece, apply a style or run a script and Voila! magic formatting happened!
But maybe it is not such a big deal, since rarely a poetry book is that huge... and it is easier to live with the manual setting of it.
Text and Typography / Re: Formatting poetry
Last post by PatJr - September 05, 2023, 05:21:08 AM
did you try and change the indents?
it can be a little tricky, you have to type the values in, the slider things are a little janky.
Text and Typography / Re: Formatting poetry
Last post by Nermander - September 04, 2023, 09:01:51 PM
The simple solution is maybe to add a tab at the start of every second line?
Text and Typography / Formatting poetry
Last post by sersha - September 04, 2023, 08:23:40 PM
Greetings to all! I wonder, if anybody found the solution to properly indent a poetry piece of an arbitrary length. Like:

lineone line one line one
     linetwo line two line two
linethree line three line three
     linefour line four line four  ...and so on

I imagine creating a style with the second line indented, but that means you must apply it to every other line, which is still quite laborious with a longer piece. Maybe a script could be created for the purpose? Ideas, suggestions are very welcome!
Free discussion / Re: I wonder if improving cont...
Last post by NathanUp - September 04, 2023, 08:21:03 PM
Got it; I'll stand by!
Free discussion / Re: I wonder if improving cont...
Last post by a.l.e - September 04, 2023, 08:05:31 PM
hi nathan

yeah, it might then make sense to install the server with yunohost and then collect some experiences...

but without a statement from jean and/or craig i would not go on with this project (since the scribus code can already be got through git from both github and gitlab).