bug-texinfo
[Top][All Lists]
Advanced

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

Re: paragraph justification issue on @url with "texi2dvi --pdf" in texin


From: Gavin Smith
Subject: Re: paragraph justification issue on @url with "texi2dvi --pdf" in texinfo.tex 2019-09-20.22
Date: Tue, 24 Sep 2019 14:30:50 +0100

On Tue, Sep 24, 2019 at 11:47 AM Vincent Lefevre <address@hidden> wrote:
>
> After trying to switch texinfo.tex from 2018-02-12.17 (from automake)
> to 2019-09-20.22 (from texinfo) in GNU MPFR, I get the following issue:
> If a URL (@url{...}) is split over two lines, the line that ends with
> the first part of the URL is no longer justified in the paragraph.
>
> Simple example "mpfr.texi":

It was done this way because of the difficulty of breaking lines in a
good place with long URL's.

https://lists.gnu.org/archive/html/bug-texinfo/2019-03/msg00007.html

I agree a short space at the end of the line doesn't look good. I've
worked out the following change which means that the extra space at
the end of the line won't always be added:

diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index af857cbbb..40fa95c49 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3099,11 +3099,14 @@ end
 \def\wordbefore{before}
 \def\wordnone{none}

-% Allow a ragged right output to aid breaking long URL's.  Putting stretch in
-% between characters of the URL doesn't look good.
+% Allow a ragged right output to aid breaking long URL's.  There can
+% be a break at the \allowbreak with no extra glue (if the existing stretch in
+% the line is sufficent), a break at the \penalty100 with extra glue added
+% at the end of the line, or no break at all here.
 \def\urefallowbreak{%
-  \hskip 0pt plus 4 em\relax
   \allowbreak
+  \hskip 0pt plus 4 em\relax
+  \penalty100
   \hskip 0pt plus -4 em\relax
 }



reply via email to

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