Mobile app version of vmapp.org
Login or Join
Hamm6457569

: Scribus and Text Filter: Importing page / frame breaks 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

@Hamm6457569

Posted in: #Scribus #Text

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamm6457569

2 Comments

Sorted by latest first Latest Oldest Best

 

@Jennifer810

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.


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

In Scribus, put the text in your linked text frames and save.
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):



After (regexxer):

10% popularity Vote Up Vote Down


 

@Fox8063795

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.




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



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



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


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:





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






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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme