[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unadorned cross-references
From: |
Augusto Stoffel |
Subject: |
Re: Unadorned cross-references |
Date: |
Mon, 31 May 2021 22:38:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
On Mon, 31 May 2021 at 20:17, Gavin Smith <gavinsmith0123@gmail.com> wrote:
> This question comes up again and again and the following was added to
> the manual to address this. I hope it explains the issue.
Well, yes, it _explains_ the issue. But why not solve the issue?
> Yes, but how do I get a plain link, with no extra markup?
>
> You can't. Info is a plain text format that is displayed mostly
> as-is in the viewers, and without the '*note' text there would be
> nothing to mark text as a link.
Of course some markup is needed to indicate a link. The problem is not
the markup, but rather the grammatical assumption that every internal
cross-reference starts with "see". But there's no intrinsic need to
make a grammatical assumption about the context of a link. None of the
so-called lightweight markup languages make such assumption!
So I'll flesh out my suggestion a bit further. Define a new macro, say
@yref, which works as follows:
The template is like this:
@yref{node-name, online-label}.
For example,
@yref{Electrical Effects, Lightning}.
produces:
*Note Lightning: Electrical Effects#
in Info and
Lightning
in a printed manual, where the node name is printed, and
<a href="somefile.html#electrical-effect">Lightning</a>
in HTML.
Emacs can be easily adapted to handle this new case in Info files:
1. "*note title: place." will remain being rendered as "see title.",
where the word "title" has the link face and a button to "place".
1. "*note title: place," will remain being rendered as "see title,",
where the word "title" has the link face and a button to "place".
2. "*note title: place#" will be rendered as "title", where the word
title has the link face and a button to "place". No "see" before,
and no punctuation after.
Wouldn't that work?