[scribus] how does scribus do justification?

Aaron W. Hsu arcfide at sacrideo.us
Wed Jan 27 19:30:04 CET 2010


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.

	Aaron W. Hsu

-- 
A professor is one who talks in someone else's sleep.





More information about the scribus mailing list