Re: unwanted space with `@url`

Patrice Dumas <[email protected]>
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Fri, Mar 13, 2026 at 09:33:14PM +0000, Gavin Smith wrote:
> On Fri, Mar 13, 2026 at 03:00:47PM +0100, Patrice Dumas wrote:
> > I am starting to wonder if it wouldn't be better to leave all the spaces
> > and comments as regular content in brace commands in the tree and let
> > the converter remove leading spaces and trailing spaces, by
> > calling a function that modifies the tree, by removing spaces after
> > conversion of each of the arguments, or by having a state where spaces
> > are ignored (which would not be really fit for removing trailing spaces,
> > actually).
> > 
> > Any idea on that subject?
> 
> The example you give, with @c comments inside a braced argument, would
> not work with texinfo.tex.

Actually, I know remember that we already discussed abount that, and, as
you explain the following cannot be correct in both Texinfo TeX and
texi2any:

@uref{ aaa @c comment } b
}
> I don't know the full implications of the change you suggest but if
> it complicates the program it doesn't seem justified, as @c shouldn't
> be used in such contexts anyway.

Even though the output is not well defined, and @c shouldn't be used in
such contexts, it is not document anywhere, and I think that we should
provide with sane output, in particular since in some situations the
texi2any and Texinfo TeX output will be similar.

What I will test, is to keep the spaces in the tree but mark them as a
special space to be ignored, and have functions to check if an argument
is empty.

> If it is a comment character, it is a different matter.  If "%" is
> replaced with character 0x7f (DEL) in the following, the input lines
> end up with trailing whitespace after the comments are removed.  The
> comment is removed at an early stage of processing and does not
> end up as part of the macro argument.

It is the same in texi2any, as DEL is put as a source mark early, as
soon as it is read, if I recall well.

-- 
Pat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.