bug-texinfo
[Top][All Lists]
Advanced

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

Re: @verb issues


From: Gavin Smith
Subject: Re: @verb issues
Date: Sat, 10 Dec 2022 11:34:45 +0000

On Wed, Dec 07, 2022 at 09:12:06AM +0000, Werner LEMBERG wrote:
> 
> > We should assume that spaces inside @verb are important and should
> > be apparent to the reader.  This may not be the case if we allow
> > line breaking before or after spaces.
> 
> I agree, a situation like
> 
> ```
> foo<space><space>
> <space>bar
> ```
> 
> is ambiguous.  However, AFAICS, the main usage of `@verb` is having an
> easy way to input special characters like `\` or `$`.  It seems to me
> that the handling of spaces is secondary.

@verb is not used very much (\ and $ aren't special charactes in Texinfo)
so we can't say what the "main usage" is.

The commands were clearly based on the corresponding LaTeX commands,
which we should take as authoritative.  LaTeX \verb doesn't break on
a space, so Texinfo @verb shouldn't either.  I am going to revert
the changes to texinfo.tex and look at using &nbsp; in the HTML
output.  (Sorry.)

If it is going to be useful to have a command for code samples that
is breakable across lines, which does not need the special characters
@, { and } to be escaped, then we should consider adding another
command for this purpose, rather than changing @verb.

> If it is really of paramount importance to rely on the exact numbers
> of spaces, people should use `@verbatim`.

I don't see why there should be any distinction here.





reply via email to

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