[Doc-SIG] Colons and footnotes (was RE: reST Wiki mode, was [Doc-SIG] Suggestions for reST "modes")

Tony J Ibbs (Tibs) tony@lsl.co.uk
Thu, 9 Aug 2001 09:21:44 +0100


Garth T Kidd wrote (after me):
> > *My* reason for suggesting using them was, however, entirely
> > orthogonal, and was simply that it is one less thing to remember,
> > if *all* hyperlink targets start with ``.. _`` and end with ``:``.
>
> Yep. That's pretty much it for me. Permitting or mandating colons also
> removes the requirement for footnote target identifiers to not include
> the square brackets, as I'd hopefully be able to distinguish between a
> footnote reference and a link to a footnote like so::
>
>    This line has a footnote reference. [1]_
>
>    This line refers to the footnote `[1]`_
>
> Hmmm. Or maybe I should just dig my heels in and insist upon removing
> the square brackets from the identifier. :)

Hmm. Excuse my thinking out loud (slowly) below.

It may be easier to consider "natural" (there's a poor word to use in a
debate!) implementation of such links in HTML.

Given the raw text::

    This is a footnote [1]_.

I had been expecting HTML *something* like:

    <p>This is a footnote<a href="#footnote1">[1]</a>.

to be generated (note I've chosen to lose the space before the
footnote - this may or may not be sensible in practice). This, of
course, implies the existence of something like::

    <a name="footnote1">[1]</a> The footnote.

at some place. *Clearly* (!) if one knew the "rule" for making up
footnote names one could refer to the footnote by that name elsewhere,
but that's implementation dependent (unless we *specify* such rules -
but it's still messy).

But why did I prepend "footnote" to the "1"? It was exactly because I
had assumed that we wanted a different namespace (heh, in the
programming sense, this time) for different types of link. What *you*
are proposing, I think, is just to drop that assumption.

So if the HTML generated was instead something like::

    <p>This is a footnote<a href="#1">[1]</a>.

then one could equally have reST text like::

    And this also refers to footnote 1_.

and they would work.

So the issue is:

    Do we want different sorts of hyperlink to occupy
    different namespaces, or the same namespace.

Personally, I don't mind. Looks like Garth votes for no, so what does
David think? Whatever the decision, it should then be written up in the
relevent spec.

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
"How fleeting are all human passions compared with the massive
continuity of ducks." - Dorothy L. Sayers, "Gaudy Night"
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)