[Doc-SIG] auto-numbered footnotes

Garth T Kidd garth@deadlybloodyserious.com
Fri, 10 Aug 2001 14:11:55 +1000


>     Auto-numbered footnote ref: []_.
>
>     .. _[] Here's the footnote. Of course, the order is all-important
>        here. However, it's impossible to refer to this footnote a
>        second time.

You're an evil genius. I love it.

> Or we could define a new syntax variant::
>
>     Auto-numbered footnote ref: [#name]_.
>
>     .. _[#name] Here's the footnote. The order is no longer
>        important. And, we can refer to this footnote as
>        ``name_``.
>
> The second idea seems to work well.

I like that one, too. Can we have both? ``[]_`` matching the very next
``_[]`` footnote is just too lovely to pass up.

I suspect the internal identifiers for anonymous footnotes should be
something like [#auto.NNN] and should be spit out by reST when
recreating its input.

Reasoning: the reST version of the document *as originally written* is
going to be very difficult to read if the author uses lots of anonymous
footnotes. If the recreated version of the input contains identifiers,
however, a subsequent editor can move the footnotes to somewhere more
sensible, like just before the next heading. Indeed, the application
might automatically move them there.

>> * Therefore, we need a way for applications to specify a resolver
>>   function to the parser.
>
> I *don't* think so.

Now that you've demonstrated a much better way of handling anonymous
footnotes, I completely agree -- we can go back to the parser completely
leaving link resolution up to the application.

I feel a lot better now. :)

> [on indirect links]
>
> I've thought these over, and I don't see them happening. If
> you need another way to refer to a part of the current document,
> just put in another target.

Fair enough. Hey, it's not like the parser has to do the heavy lifting,
in any case. If some madman writes it into their application, they do. I
probably won't be that madman, though, because it strikes me as *much*
less effort to put in another target than to write the code to walk the
entire result tree and collapse indirect links. :)

> Don't be like Ferris; do your homework!

Naaah. Shoot first, ask questions later. :)

Regards,
Garth.