bug-texinfo
[Top][All Lists]
Advanced

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

Re: @url doesn't work correctly within @raggedright environment


From: Karl Berry
Subject: Re: @url doesn't work correctly within @raggedright environment
Date: Thu, 6 Feb 2014 23:20:43 GMT

Hi Werner,

    address@hidden
    POSIX specification:@* 
@url{http://www.opengroup.org/onlinepubs/9699919799/functions/posix_spawn_file_actions_addclose.html}
    ...
    and `make gnulib.pdf' produced a result as shown in the attached
    image...

Namely (for the record), the potential stretchiness around the special
characters in the url still had effect.

I made the diff below, which seemed to fix this case.

Thanks,
karl

--- texinfo.tex (revision 5405)
+++ texinfo.tex (working copy)
@@ -2650,8 +2650,10 @@
 % we put a little stretch before and after the breakable chars, to help
 % line breaking of long url's.  The unequal skips make look better in
 % cmtt at least, especially for dots.
-\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+\def\urefprestretchamount{.13em}
+\def\urefpoststretchamount{.1em}
+\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
 %
 \def\urefcodeamp{\urefprestretch \&\urefpoststretch}
 \def\urefcodedot{\urefprestretch .\urefpoststretch}
@@ -6579,9 +6591,13 @@
 
 
 % @raggedright does more-or-less normal line breaking but no right
-% justification.  From plain.tex.
+% justification.  From plain.tex.  Don't stretch around special
+% characters in urls in this environment, since the stretch at the right
+% should be enough.
 \envdef\raggedright{%
-  \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+  \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
+  \def\urefprestretchamount{0pt}%
+  \def\urefpoststretchamount{0pt}%
 }
 \let\Eraggedright\par
 



reply via email to

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