[scribus] how does scribus do justification?

Gregory Pittman gregp_ky at yahoo.com
Wed Jan 27 20:25:13 CET 2010

On 01/27/2010 01:30 PM, Aaron W. Hsu wrote:
> On Tue, 26 Jan 2010 21:22:43 -0500, <EilertO at aol.com> wrote:
>> One question:   If justification is on a paragraph by paragraph 
>> basis, how
>> is it possible that all paragraphs share the same common right margin
>> position?   In my simplistic way (read: uninformed) it sounds like 
>> each paragraph
>> could have a different width???   This is probably not true, but help 
>> me!!!!
> Justification is a matter of calculating the best spacing of lines in 
> a paragraph to fit within some column width. This usually boils down 
> to some formula of some kind. The question is what information is 
> passed to and used by that formula for the calculation. Some 
> applications justify on a line by line basis. That means that given a 
> paragraph on the page, it will have a set of lines where it will be 
> usually printed without justification. Once you enable justifcation, 
> these lines are then spaced individually to make them fit within the 
> column.
> TeX has a more sophisticated method of formatting the paragraph 
> because it takes into account the entire paragraph when doing the work 
> (read, using the formula). Once you go line by line, you lose the 
> information that might have changed your choice slightly if you could 
> bring or push words on different lines to other lines. TeX allows you 
> to do this.
> For example, in a line based justifier, it can only work with the 
> words that it has on that line, but say that you could get a slightly 
> "better" justification if you took a small word from the line before 
> it and used it in the line you are currently trying to justify. This 
> could happen, or vice versa, where it might be better to shift a word 
> down from the previous line and so forth. When you have the whole 
> paragraph rather than just a single line with which to work, you can 
> do these sorts of transformations, whereas you cannot do them if you 
> only work with each line by itself.
> This is my understanding of how the formulas and code work behind the 
> scenes. If someone can clarify or correct me where I am wrong, that 
> would probably be helpful to us all.
Two things:

1. It's easy to say that a line-based justification only works per line, 
but in a character stream, what is a line? There has to be some initial 
attempt at fitting to a line, then adjustments, so the quality comes 
down to the flexibility of those adjustments.

2. It's also a good idea to take off the rose-colored glasses about TeX. 
I use it on a daily basis, and in a tabular environment, some quite ugly 
output happens even with all the advanced features of word and character 
placement that TeX has to offer.


More information about the scribus mailing list