bug-texinfo
[Top][All Lists]
Advanced

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

cross-reference to definitions


From: Per Bothner
Subject: cross-reference to definitions
Date: Fri, 28 Oct 2016 16:01:56 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

[This is a somewhat half-baked wish-list item.]

It would be nice to have an an abbreviated syntax for
cross-references to definitions.  As an illustration, note that
Racket documentation examples have links from identifies
to their definitions.  For example the http://racket-lang.org/
homepage: If you click on a predefined identifier in the
"Start Quickly" example, you go to the documentation.

Of course this can be done with @anchor, but it seem
redundant to have to create an @anchor for every procedure
- it clutters up the texinfo source.

What if we have a convention where each non-clashing
definition for a name FOO automatically creates an
anchor derived from FOO?  Perhaps def:FOO.  Or maybe the
category could be involved in the name: Procedure:FOO.

(While using a character like colon would be a problem
for some output formats, that does not rule it out
for source-level names.)

It might also be reasonable to have a short-hand @ref
variant.  For example  @dref{FOO} would be equivalent to
@ref{def:FOO}.

When there are multiple definitions for the same name,
one could add some disambiguation mechanism - though there
is always plain @anchor to fall back on.

The code that generates the index already does something similar.
For HTML output it generates a link "index-FOO". It might
be reasonable for the index to use the same names as
the generated references.
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

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