Recent posts

#41
Free discussion / Re: Provocative question: Bett...
Last post by NathanUp - September 14, 2023, 04:37:16 PM
QuoteIntegration between Inkscape and other TDP software (including Scribus) could be a useful approach.
[Moderation: The quote above is from a spam post that has been deleted]

What sort of integrations do you have in mind? I've often wished that something like Adobe CC's Libraries existed for FLOSS creative software; specifically, I would find syncing character, paragraph, and object styles, swatches, and vector and raster assets, between Scribus, Inkscape, Krita and Kdenlive incredibly useful. I have a feeling that even making synced assets interoperable would be tricky though, and then there's the matter of actually syncing (although maybe this could be left for the user to figure out using git, syncthing, nextcloud, or whatever).
#42
Text and Typography / Re: Paragraph styles
Last post by Bolean - September 13, 2023, 11:33:19 PM
The trick to get it working: Open in story editor and add one empty line before the title.
#43
General Discussion / Use tabs for docments
Last post by AdmFubar - September 12, 2023, 11:56:25 PM
From what I can tell, when using tabs for documents, there doesnt seem to be a option to only show the document name and not the full path and name, or am I missing that options somewhere?
#44
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  ;)
#45
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.)
#46
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
#47
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
#48
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.
#49
Text and Typography / Re: Formatting poetry
Last post by a.l.e - September 08, 2023, 06:20:32 PM
btw, it looks like this:

#50
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()