bug-texinfo
[Top][All Lists]
Advanced

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

Re: Multiline @cindex entries misrender in groff Texinfo manual


From: Patrice Dumas
Subject: Re: Multiline @cindex entries misrender in groff Texinfo manual
Date: Thu, 16 May 2024 22:41:44 +0200

On Thu, May 16, 2024 at 02:21:21PM -0500, G. Branden Robinson wrote:
> Hi Dave,
> 
> At 2024-05-16T12:55:51-0500, Dave Kemper wrote:
> > In a few places, the groff Texinfo manual uses a line-ending @ to
> > continue a @cindex entry.  An example is:
> > 
> >   @cindex print to the standard error stream (@code{tm}, @code{tm1},@
> >   @code{tmc})
> > 
> > My version of makeinfo (texi2any (GNU texinfo) 6.7) doesn't render
> > this as desired:
> > 
> >       'tmc') 'tmc') 'tmc') Send MESSAGE, which consumes the remainder of
> >       the input line and ...
> > 
> > That is, the continued @code{} tags are being put into the output
> > rather than considered part of the index entry.

There is a specific context in which @ followed by a newline is removed
and the line is not considered to be ended, on the @def* command line.
It is said explicitely in that section that in other contexts, the @
followed by a newline is not a continuation character:
https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Def-Cmd-Continuation-Lines

In the manual it is said that @ followed by a new line leads to the
insertion of a single space in the output:
https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Inserting-Space

It is never said in the manual very explicitely whether a @ followed by a new
line ends an @-command line or not, but the line @-command is described as
being on a line:
https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Command-Syntax

So my interpretation is that @ followed by a space both produces a
single space and ends the @-command line (except on @def* where it
produces nothing and does not end the @-command line).

In your case, you should write

@cindex print to the standard error stream (@code{tm}, @code{tm1}, @code{tmc})

> Right.  I see the problem in some output formats but not others.
> 
> DVI   no
> HTML  yes
> INFO  yes
> PDF   no
> TXT   yes
> 
> I suspect it's not a coincidence that DVI and PDF are the formats for
> which texinfo uses TeX to generate the output.

Indeed, seems like @ followed by a new line does not ends the @-command
line in Texinfo TeX.  I don't know if it should be considered as
undefined behaviour or if TeX (or makeinfo, though I'd say that makeinfo
is right...) should be changed.  I'd lean towards undefined behaviour in
that case.

> > Does this render correctly in newer makeinfo versions?  makeinfo 6.7
> > is fairly old,
> 
> Unfortunately that is the only version I have handy as well, so cannot
> answer this.

It is the same in the development version, and my wild guess is that it
is the same since at least 5.0, but I have not tested.

> ...but I don't know what the priority ordering is for which texinfo.tex
> is used during generation of the manual; the system one, or this one.
> (This one, I would hope--else why provide it?)

Should be this one.

-- 
Pat



reply via email to

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