[Top][All Lists]

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

Re: overfull lines with @url in @raggedright

From: Gavin Smith
Subject: Re: overfull lines with @url in @raggedright
Date: Mon, 23 Jul 2018 21:12:14 +0100

On Mon, Jul 23, 2018 at 7:54 PM, Werner LEMBERG <address@hidden> wrote:
>> texinfo.tex is supposed to allow breaking at some characters but not
>> the hyphen.  I think breaking at "/" would be sufficient in the
>> example you give.  The problem is how to achieve this.

I was thinking something like \hfil\allowbreak\hskip 0pt plus -1fil to
allow a break at particular characters wherever they occur in the line
with the rest of the line being filled up with empty space, but this
probably wouldn't look very good in some cases. (Maybe
\discretionary{}{}{} instead of \allowbreak if breaking a URL is to be
thought of as "hyphenation".)

As you say, there are no good options in the justifying case, so maybe
allowing a break at more characters would allow better results. The
issue with allowing hyphenation at a hyphen is that it may be unclear
whether the hyphen should be considered as part of the URL. However,
maybe it will be clear in practice as hyphenation is already done at
hyphens inside @code (configured with @allowcodebreaks).

If it's made the default behaviour to hyphenate at "-" inside @uref
then I suppose there should be some way of turning it off in case
authors of existing documents have relied on the current behaviour.
Perhaps it could be linked to the @allowcodebreaks setting (although
maybe not as the interaction with @urefbreakstyle could be confusing:
@allowcodebreaks only refers to breaking *before* - and _).

I couldn't find much discussion of this feature in the mailing list
archives, just this:

> For the interface to @url, I can imagine something like
> address@hidden' and address@hidden' as an equivalent to the
> `hyphens' option.

I think this interface would be OK, as there will not be lots of other
characters that people want to break at in URL's, so a general
interface is not necessary. If @allowcodebreaks isn't used, maybe
something like "@urefbreakhyphen true" and "@urefbreakhyphen false" is
more consistent with existing Texinfo commands.

reply via email to

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