bug-texinfo
[Top][All Lists]
Advanced

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

Re: ugly @uref formatting


From: Gavin Smith
Subject: Re: ugly @uref formatting
Date: Tue, 13 Oct 2020 19:31:53 +0100
User-agent: Mutt/1.9.4 (2018-02-28)

On Tue, Oct 13, 2020 at 11:54:12AM +0200, Werner LEMBERG wrote:
> 
> Please have a look at the attached files.  Is it possible to fix the
> output of the current `texinfo.tex` version so that it gets
> right-justified as before?  To be more precise, I would like that the
> formatting of the URL stays as-is, but the material before the URL
> should be stretched more, at the cost of causing an underfull line.
> 
> 
>     Werner

It is a struggle.  I thought I could fix it by increasing the
\penalty inside \urefallowbreak, but this didn't work.  I found
that setting \pretolerance to -1 worked.  Formatting your input with
@tracingparagraphs=1 shows that the badness of the problem line is
422 with the desired breaking:

[]@textrm In a dif-fer-ent way, the full range of col-ors [][][]defined for X11
 (@texttt https://  en.  wikipedia.
@@penalty via @@0 b=422 p=0 d=196624

but the default value of \pretolerance is only 100.  Therefore it will
take the extra glue to reduce the badness, regardless of the size of the
penalty.

Reducing the length of the extra glue doesn't give good results
with all of the test cases that are already in our test file (in
doc/texinfo-tex-test.texi).  Hence, the only solution seems to be
to set \pretolerance to a negative value, to disable the first step
in the line breaking process.  However, there's no easy way to set this
for just a single paragraph, without affecting the rest of the document.

I've attempted to do so, however, in commit 36cc447a3.

Hopefully this will be enough but I wouldn't be surprised if another example
came along where the formatting was again substandard.

(I get my understanding of the line breaking process from chapter 19 of
"TeX by Topic" by V. Eijkhout.)



reply via email to

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