View Issue Details

IDProjectCategoryView StatusLast Update
0010227ScribusStory Editor / Text Framespublic2017-10-26 07:08
Reportermecirt Assigned Tojghali  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.0svn 
Fixed in Version1.5.0svn 
Summary0010227: Text flow implementation (widow/orphan control and more) - patch attached
DescriptionThe attached patch implements several paragraph text flow options. Specifically, these include the option not to leave isolated parts of paragraphs at the end/beginning of a line/column (known as widow/orphan control), option to never split a paragraph to multiple pages (it will move entirely if needed), and an option to keep a paragraph with the next one (useful for headings and such). These options are very important for typesetting of longer texts (books and such).

The patch implements the feature itself (hooked to the textitem layouting code), adds the necessary controls to the text property widget and the paragraph style dialog, and also supports loading/saving of the new options (1.5 format only). Additionally, it includes some cleanup of the text layouting code, which I did to help me understand how the whole thing works. It also fixes a problem with automatic tab breaks retaining the fill character, if any, which I have randomly noticed.

Known limitation: the option to ensure that isolated lines won't remain at the start of a new *column* currently doesn't work (it works fine for pages, or if the column break is also a page break). The layout code was making my head hurt enough by that point, so I left this alone for now.

The resulting patch is more than 100 KB, but most of it are context lines and some XML reformatting that Qt Designer did, so it's not as bad as it looks! :)
Tagstext frames, typography
Patch

Activities

mecirt

2011-08-28 18:22

reporter  

scribus-textflow.patch (108,064 bytes)   

Vladimir Savic

2011-08-28 21:19

reporter   ~0026809

I want this one in! Not that my vote counts, but I run into this problem a lot.

cezaryece

2011-08-28 21:20

updater   ~0026810

Really nice work!
But for me there is need for one more thing - add to document checker (Preflight Verifier) warnings where text was changed due to flow options. And in addition maybe it should be noticed be some unprintable signs at the edge of column/frame (like "no space for text" sign at the right bottom of frame if text don`t fit in it).
For me any changes in text flow should be done automatically without user notice!

mecirt

2011-08-29 08:06

reporter  

mecirt

2011-08-29 08:08

reporter   ~0026811

Forgot to include one file - it's attached, belongs to scribus/ui. Note that there are two more new files in the patch (ui/propertywidget_flow.cpp and ui/propertywidget_flow.h), these obviously need to be added to svn as well :)

Not sure if preflight needs to react on these - all the textflow stuff is in paragraph style and is disabled by default - if you don't enable the related options, you get no flow changes.

cezaryece

2011-08-30 05:16

updater   ~0026813

At least preflight should react if these flow controls inserts empty lines at columns`s bottom.

StefanM

2011-09-02 09:26

reporter   ~0026822

Thanks for the work. Your description reads great.

In July I produced a 24-page newspaper with scribus 1.4.0 RC5

orphan/widow auto and more flow control would have saved me lots of time. Looking forward for that in scribus.

jghali

2011-09-12 21:18

administrator   ~0026858

I have applied it here, starting to test it.

jghali

2011-09-14 21:14

administrator  

scribus-textflow-r16832.patch (112,399 bytes)   

jghali

2011-09-14 21:16

administrator   ~0026872

Last edited: 2011-09-14 21:22

I uploaded an updated patch vs r16832, only one minor modification vs first patch in scribusformat150_save.cpp.

jghali

2011-09-18 20:56

administrator   ~0026886

Committed! Thanks! I did an additionnal modification : i renamed most *_flow class names and variables to _orphans as _flow is not very meaning full. The caption for those options in style manager and properties palette has also been renamed from "text flow" to "orphans and widows".

mecirt

2011-09-19 09:16

reporter   ~0026889

Excellent, thank you! The 'widows and orphans' caption isn't entirely accurate, as the 'keep with next paragraph' option is unrelated to these, but it should be good enough.

Issue History

Date Modified Username Field Change
2011-08-28 18:22 mecirt New Issue
2011-08-28 18:22 mecirt File Added: scribus-textflow.patch
2011-08-28 21:19 Vladimir Savic Note Added: 0026809
2011-08-28 21:20 cezaryece Note Added: 0026810
2011-08-29 08:06 mecirt File Added: propertywidget_flowbase.ui
2011-08-29 08:08 mecirt Note Added: 0026811
2011-08-30 05:16 cezaryece Note Added: 0026813
2011-09-02 09:26 StefanM Note Added: 0026822
2011-09-02 09:26 StefanM Tag Attached: text frames
2011-09-02 09:26 StefanM Tag Attached: typography
2011-09-12 21:18 jghali Note Added: 0026858
2011-09-14 21:14 jghali File Added: scribus-textflow-r16832.patch
2011-09-14 21:16 jghali Note Added: 0026872
2011-09-14 21:22 jghali Note Edited: 0026872
2011-09-18 20:56 jghali Note Added: 0026886
2011-09-18 20:56 jghali Status new => resolved
2011-09-18 20:56 jghali Fixed in Version => 1.5.0svn
2011-09-18 20:56 jghali Resolution open => fixed
2011-09-18 20:56 jghali Assigned To => jghali
2011-09-19 09:16 mecirt Note Added: 0026889
2011-09-28 18:32 cbradney Status resolved => closed
2015-09-17 20:08 Kunda Category Story Editor / Text Frames => Story Ed/Txt Frames
2015-09-17 20:12 Kunda Category Story Ed/Txt Frames => Story Editor / Text Frames