Hello Leroy
LeroyLi wrote:
[..]
I think I haven't make my problem clear enough for you. What I need is
not how to get the MS Word work better but the mechanism which MS Word
uses to justify the spaces in a line. The layout model the MS Word
uses. Just like Tex uses glue mechanism to justity the space between
words, what does Word use?
Nah, your description was fine.
It's just that nobody in here has come upon a clear _authorized_
description (that only MSFT could give). Doesn't mean there isn't one,
but it's a strong indicator. microsoft.com is a huge place, though.
Maybe you find something (and hopefully share it with us if you do
).
The default justification algorithm's workings are pretty simply,
though: it adds words after each other, with whatever standard space
width is in a font, until one word is too long to fit on the page. Word
then brings the whole word (or parts of it, if it can through hyphens or
hyphenation) to the new page. And expands the remaining spaces on the
line, equally.
Very simple. And brings pretty bad results if you don't hyphenate a lot!
The compatibility option Peter mentions [BTW: I'm not sure it's needed
anymore in Word 2007] does it a lot better, IMHO. If you activate it,
then upon noting a Word doesn't fit anymore on the line, Word starts to
_reduce_ the space width in the whole line to make it fit. I have no
idea what the threshold is (how thin it will make it, I suspect
something around 2/3 of a normal space width, but that's a really wild
guess). When the word suddenly fits like this, the next word starts the
new line. If the threshold is met, the whole word jumps to the next
line, and Word spacing expands as before.
Not much more intelligent, but the results are far better IMHO.
Now, it's still a very "dumb" algorthm, sort of, since it doesn't look
back and forth in the paragraph. And the automatic hyphenation approach
is not cleverer.
I have no idea how LaTeX does it, but it usually looks better.
That's why, in Word, I prefer to manually hyphenate texts where I can
justify the time for a proper pagination. [This includes texts w/o
horizontal justification, btw.]
2cents
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word