Recent posts

#61
Layout Issues / Re: 5-Fold Document - HowTo ?
Last post by AdmFubar - September 12, 2023, 11:28:19 PM
A quick hack would be to place a text frame with 6 columns on the page, how many columns you would need  ;)
#62
Text and Typography / Re: Paragraph styles
Last post by Nermander - September 10, 2023, 07:54:45 PM
Isn't this just the issue that space before paragraph does not apply for the first paragraph in the frame? (I am not sure if that is how it works, but it sounds like it could be.)
#63
Text and Typography / Re: Paragraph styles
Last post by Bolean - September 10, 2023, 04:39:17 PM
Using text properties it's not a very sleek option for a book with many chapters. If indeed this is a bug my post could maybe function as a reminder.BDHDCM
#64
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
#65
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.
#66
Text and Typography / Re: Formatting poetry
Last post by a.l.e - September 08, 2023, 06:20:32 PM
btw, it looks like this:

#67
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

https://github.com/aoloe/scribus-script-repository/tree/master/style-repeater

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

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

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

    # 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
        return

    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))
        styles.append(scribus.getParagraphStyle())
        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__":
    main()
#68
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.
#69
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.
#70
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?