[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
@xrefautomaticsectiontitle for info
From: |
Akim Demaille |
Subject: |
@xrefautomaticsectiontitle for info |
Date: |
Sun, 26 Jan 2020 10:10:49 +0100 |
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?)
> section My Beautiful Introduction.
>
> (see section My Beautiful Introduction)
>
> My Beautiful Introduction.
>
> See My Beautiful Introduction.
>
> (see My Beautiful Introduction)
>
> My Beautiful Introduction.
gives in PDF
> See Section 0.1 [My Beautiful Introduction], page 1.
> (see Section 0.1 [My Beautiful Introduction], page 1)
> Section 0.1 [My Beautiful Introduction], page 1.
> See Section 0.1 [My Beautiful Introduction], page 1.
> (see Section 0.1 [My Beautiful Introduction], page 1)
> Section 0.1 [My Beautiful Introduction], page 1.
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?
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?
Thanks in advance!
- @xrefautomaticsectiontitle for info,
Akim Demaille <=