help-texinfo
[Top][All Lists]
Advanced

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

Re: @xrefautomaticsectiontitle for info


From: Gavin Smith
Subject: Re: @xrefautomaticsectiontitle for info
Date: Sun, 26 Jan 2020 13:15:03 +0000

On Sun, Jan 26, 2020 at 9:10 AM Akim Demaille <address@hidden> wrote:
>
> Hi,
>
> The documentation of Bison uses the three-argument form of @xref is a 
> bazillions places.  This is verbose and tedious, so I was very happy to 
> discover @xrefautomaticsectiontitle.  Unfortunately it seems to be used only 
> in TeX and HTML, but not in info.
>
> This input
>
> > \input texinfo @c -*-texinfo-*-
> >
> > @setfilename bison.info
> > @settitle Bison
> >
> > @xrefautomaticsectiontitle on
> >
> > @node Top
> > @top Bison
> >
> > @node Chapter
> > @chapter Chapter
> >
> > @node Introduction
> > @section My Beautiful Introduction
> >
> > @xref{Introduction}.
> >
> > (@pxref{Introduction})
> >
> > @ref{Introduction}.
> >
> > @xref{Introduction,, My Beautiful Introduction}.
> >
> > (@pxref{Introduction,, My Beautiful Introduction})
> >
> > @ref{Introduction,, My Beautiful Introduction}.
> >
> > @bye
>
> gives in HTML (so "section" is added compared to the three arg form, is this 
> really useful?)

I recently removed this word from the HTML output in the development
version. We've been working towards making @xrefautomaticsectiontitle
the default for HTML. (See
https://lists.gnu.org/archive/html/bug-texinfo/2019-11/msg00000.html).

> but in info, I get
>
>
> > *Note Introduction::.
> >
> >    (*note Introduction::)
> >
> >    *note Introduction::.
> >
> >    *Note My Beautiful Introduction: Introduction.
> >
> >    (*note My Beautiful Introduction: Introduction.)
> >
> >    *note My Beautiful Introduction: Introduction.
>
> Am I missing something?

Evidently it doesn't do anything for Info. Maybe because the extra
text of the section title would be displayed in addition to the node
name in the Info output, it wasn't worth implementing for Info.

> What are the best practices here?  The original authors paid attention to 
> specify the third argument wherever it made a difference, but I suspect it 
> was mainly for the sake of the TeX output.  But maybe they also wanted that 
> in Info, but maybe that's not recommended as it would clutter the Info file?

I wouldn't say so: for Info output, I think node names are okay for
cross-references. Since the contents of the Info file are displayed
mostly as-is in the viewers, extra text would just make it look more
confusing.



reply via email to

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