[XeTeX] Line-breaking algorithms in XeTeX
John Was
john.was at ntlworld.com
Mon Apr 27 17:44:58 CEST 2009
Hello Jonathan
Well I've just come across an occurrence of situation (1), with the
following paragraph:
One consequence of these particular choices is that the attempt to revalue
the later Swinburne remains rather thinly established: the close attention
scarcely extends beyond the 1870s. But the more interesting issue is the
matter of choice itself. Clearly the sympathetic overviews attempted by
Grierson and Fletcher failed to rescue Swinburne{\cq}s reputation: he
remains a marginal figure, with few enthusiastic readers and a minimal
presence in the academic syllabus. Does a highly selective but more closely
observed account of his work provide a more effective argument for his
value?\par
This is typeset in MinionPro-Regular at 10.5pt with \hsize 29pc (using
TeX-Text mapping) and with \spaceskip 0.25em plus 0.25em minus 0.075em
The {\cq} is defined as
\def\cq{\leavevmode \kern 1sp \hbox{'}}
- my latest attempt at getting round the tight kerning of the closing
quote/apostrophe in this font without editing the font itself (which I've
not managed to do - but just as well as I am still an ignoramus about Open
Type tables).
Now, with \looseness set to -1, as it is by default in this section of the
periodical, I get a paragraph of seven lines, but producing an overfull rule
at `rescue Swinburne': it hyphenates `Swin-burne' but with the overfull box
beside the hyphen.
But if I put \looseness0 at the end of the paragraph, the overfull box
disappears and the paragraph is set to eight lines. What I would have
expected TeX (of any flavour) to do would be to give up the attempt, without
prompting from me, to squeeze the paragraph into seven lines because of the
overfull problem, and instead set it to eight lines.
I don't know if exploring \fontdimen parameters would overcome this - I
don't think I've used \fontdimen before since my recollection from the TeX
Book is that it's rather vague about what parameters are available to each
font, though I see that the important ones here would be in the first seven
registers, which every font has (according to the TeX Book). But regardless
of that, I think it's still the case the XeTeX is behaving in a way that TeX
would not have (I did the periodical for about five years using a 1995 EmTeX
distribution and never experienced this).
Is this of any use to you?
John
----- Original Message -----
This is typeset in MinionPro-Regular at 10.5pt with \hsize 29pc (using
TeX-Text mapping) and with \spaceskip 0.25em plus 0.25em minus 0.075em
The {\cq} is defined as
\def\cq{\leavevmode \kern 1sp \hbox{'}} - my latest attempt at getting round
the tightness of the closing quote/apostrophe without editing the font
itself (which I've not managed to do - but just as well as I am still an
ignoramus about Open Type tables).
From: "Jonathan Kew" jfkthame at googlemail.com
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Monday, April 27, 2009 2:38 PM
Subject: Re: [XeTeX] Line-breaking algorithms in XeTeX
> Hi John,
>
> On 27 Apr 2009, at 00:37, John Was wrote:
>
>> Hello Jonathan
>>
>> I couldn't think of a way of providing a test case - I could
>> obviously show
>> a PDF with the overfull rule when \looseness is -1 and without the
>> overfull
>> rule (with the paragraph a line longer) when \looseness is set to 0
>> or 1,
>> but that wouldn't be helpful. The font is MinionPro, and in all
>> sizes I
>> have the \spaceskip set thus:
>>
>> \spaceskip 0.25em plus 0.25em minus 0.075em
>
> In general, if you want to adjust the word-spacing behavior, I'd
> recommend using the font's \fontdimen parameters (or fontspec's
> WordSpace option, for xelatex users) to control it on a per-font/size
> basis rather than setting \spaceskip, which will apply the same
> spacing to all fonts and sizes as long as it's in effect. But that's
> an aside...
>
>
>> This seems to produce satisfactory results in the \hsize and
>> typesizes that
>> I work with. But it shouldn't generate this problem, I think, and
>> certainly
>> not my situation (2), where the sole difference is whether there is
>> a \vfill
>> \eject or \vskip between items.
>
> I agree that the behavior you've described sounds wrong, but it's hard
> to diagnose exactly what's going on unless I can experiment with an
> example document that shows the problem. :(
>
> I'm curious whether it is somehow related to the use of \spaceskip,
> actually, although I can't think of a specific reason why that should
> go wrong.
>
> JK
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
More information about the XeTeX
mailing list