1

I am working on a long Scribus document and want to use a single source text file, which then can be imported through the Scribus Text Filter. I want to include frame breaks in this source file, so I don't have to insert them later manually.

can I include frame breaks in my source file?

1

I figured out an even easier, less hack-ish way. The Idea is to perform a 'Search & Replace' on Scribus' sla-file with another tool/application.

  1. In your source text file put a unique keyword in a single line wherever you want to place a frame break later. Example:

    /h1This is my first heading
    /h2This ist my first sub-heading
    /text This is some random text. This is some random text.
    ####framebreak###
    /h2This ist my second sub-heading
    /text This is some random text. This is some random text.
    ####framebreak###
    
  2. In Scribus, put the text in your linked text frames and save.

  3. Use any editor or Search & Replace tool to open your saved Scribus file. Replace the whole line that contains ###framebreak### with <breakframe/>. Save, if needed, and reopen with Scribus.

    Depending on the file size and length of your document it might be a good idea to use a potent application. On Linux 'sed' is a very mighty tool, but complicated when it comes to regex and special characters. A more simple alternative is 'regexxer', which features a GUI. Nevertheless you porbably have to escape special characters with a slash or brackets or similiar - depending on the tool you use.

    Before (regexxer):

    regexxer

    After (regexxer):

    enter image description here

  • I've done this before. This is the poor man's way to use variables in Scribus files. The important part for doing this for frame breaks is to replace the whole line, otherwise you'll just end up with text that says "<breakframe/>" in the document. – Scribblemacher Aug 29 '16 at 13:27
0

No, you cannot. Scribus' Text Filter does not feature regex (regular expressions) like frame break, line break, non-breaking spaces etc.

But I found a (dirty, probably not always working) way to get to a similar result in Scribus 1.5.0 or later.


  1. In your source file add the following line whereever you want a frame break:

/###############################################screwscribus

  1. In Scribus, create a new Paragraph Style, give it a recognizable name (e.g.'framebreak') and apply the following settings:

Font Size: 1pt

Fill Color: None

Stroke Color: None

Background Color: None

Space Below: 300pt

  1. Make sure, that all paragraph that should go on one page together, have their 'Keep together with next paragraph' an 'Do not split paragraph' box checked within the Style Manager:

enter image description here

  1. When importing text and using the text filter, apply your Paragraph Style from point 1 to all paragraphs starting with '/###############################################'

enter image description here


There is no guarantee that this will work but if everything goes well, Scribus will now try to keep all paragraphs together, that we want to go in one frame and then jump to the next frame.

  • This is only applicable to Scribus 1.5.x, since keep together options are not available in 1.4. I also think this technique would cause a lot of unexpected behavior. – Scribblemacher Aug 18 '16 at 11:32
  • I like the idea of a placeholder, but I think that adding a small Python script is a better solution. If I find the time to write a short one, I'll add it as an answer later this evening. – a.l.e Aug 18 '16 at 12:34
  • Currently, it does not seem to be possible to add a frame break through a script. My hint is similar to Scribblemachers' one: make frame breaks very visible. What I would do differently: just manually track the breaks and insert them where needed. – a.l.e Aug 19 '16 at 8:41
  • @Scribblemacher Yes, this can definitly cause a lot of trouble - but then again, in my last 100+ pages project it worked just fine. – serve.chilled Aug 21 '16 at 18:40
  • @a.l.e What do you mean with "make frame breaks very visible"? Of course, adding frame breaks in Scribus would be the easiest way. But there are a lot of advantages with editing your text outside Scribus: Search & Replace with regular expressions or working collaboratively (e. g. via github). Furthermore Scribus becomes (for me) terrible slow when editing large files. – serve.chilled Aug 21 '16 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.