lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: too small inter-word spacing


From: Jeff Kingston
Subject: Re: too small inter-word spacing
Date: Thu, 04 Sep 2008 08:09:18 +1100

Michael Piotrowski <address@hidden> wrote:
> For example I have used
> 
>   @InitialSpace {compress +0.25s}
> 
> for some documents where I found the interword spacing too tight.

This works in simple cases, but it has the problem that Lout returns
to the width of a space character every time there is a change of font.

Joerg van den Hoff <address@hidden> wrote:
> I understand that at some point always a threshold will be tripped
> (this would happen with groff, too) but why is hyphenation not used?

The algorithm used by Lout (following TeX) is to first try setting the
paragraph without hyphenation, then, if the badness value of the result
is above a certain threshold, to try again with hyphenation.  So if
hyphenation is not used, that will be because the threshold was not
reached.

> C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
> 
> would you mind a short hint on the meaning of the last 4 numbers

These represent the bounding box of the space glyph.  Since the
glyph is blank the box has zero size, but the important thing is
the WX field, which (in PostScript) determines how far to the right
the next character will be placed, and (in Lout) also determines
the ideal inter-word spacing.

On thinking it over, though, it's likely that you are happy with
the ideal spacing but not happy with Lout's willingness to compress
it quite a lot in preference to hyphenation.  In that case, what
you need to change is not the width of the space character but
the compressibility.  You can do that by changing the value of
the constant MAX_SHRINK in file z14.c and recompiling.  I think
the current value,

    #define MAX_SHRINK 4

means that Lout is willing to shrink a space character to 1/4 of
its usual width (with a penalty, of course).  So if you reduce
it to 3 or 2 you should get less shrinking.  Alternatively, you
could increase SQRT_TIGHT_BAD so that Lout is willing to shrink
just as much, but gives a higher penalty when it does.  Or both.

Yet another possibility is to reduce HYPH_BAD, the threshold for
trying hyphenation.

You'd be mad to adjust these parameters on the basis of the
results of one paragraph.  Do it on an entire document so you
can see the global effect.
 
Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]