[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `@code` doesn't allow line break after first `-`
From: |
Gavin Smith |
Subject: |
Re: `@code` doesn't allow line break after first `-` |
Date: |
Wed, 11 Jan 2023 18:52:11 +0000 |
On Wed, Jan 11, 2023 at 05:18:46PM +0000, Werner LEMBERG wrote:
> In other words, `texinfo.tex` doesn't insert a `@discretionary` after
> the first `-` character. This is clearly a bug.
The issue appears to be to do with the \codedashprev variable.
This code has been in place since 2013-06-21. The code attempts
to stop hyphenation after the hyphen in "-option" or after either of
the hyphens in "--option".
However, \codedashprev does not actually refer to the previous character,
as it is only set when a dash is seen, not at every single character within
@code. Even if it's set to a dash from a double dash sequence, it is
confusing as it's assigned from the second dash, not the first.
The suggestion in the initial report to use something like @w in
@option would have been simpler
(https://lists.gnu.org/archive/html/bug-texinfo/2013-04/msg00005.html).
However, I've tried to fix it in commit bdb7f23072 (texinfo.tex version
2023-01-11.18).
Thanks for the report; this was very observant.