On Tue, 13 Jun 2006 11:41:57 +0200, Steve Bennett wrote:
On 6/13/06, Phil Boswell
<phil.boswell(a)gmail.com> wrote:
> I forgot: one major difference would be that the numbering would appear
> in the anchor, so if you wanted to link to a section it would have to
> be [[example#A. Section]]
So did I.
Unchecking the "Auto-number headings" option also has no effect - the
manual numbering is displayed in non-TOC headings either way.
IMHO, this kind of linking isn't that great
anyawy. We should use proper
anchors, as section names change so quickly (much more so than article
names, at any rate), and there isn't (afaik) any way of finding out what
links exist to a given section.
And it causes unmemorable and long urls that are unsuited to Usenet
articles and emails.
It's possible to use this form - here in combination with __NOTOCNUM__:
=== <span id="shortid">[[#shortid|1.1]]</span> Heading and TOC entry
===
This gets rendered as:
1.1 Heading and TOC entry
where the TOC entry links as usual to the section heading as
#1.1_Heading_and_TOC_entry, and the section heading links the "1.1" to
itself as #shortid.
The only drawbacks that I've noticed are that when editing the section,
the /*...*/ summary includes the unparsed html, requiring manual pruning
of the <span>...</span>, and that the page returned after saving an edit
to the section starts out unscrolled because the url uses a non-existent
internal anchor:
Article_title#.5B.5B.23shortid.7C1.2.5D.5D_Heading_and_TOC_entry.3F.
Otherwise this all works as expected on the MediaWiki versions that I've
tried it under.
It could be automated so that the <span>...</span> is instead a
wiki-interpreted syntax, and so that "shortid" replaces the regular anchor
in the TOC. It could also be more worthwhile to store this somewhere in
the database to keep track of links to the section, because these anchors
change less often than the long, automated anchors.
--
http://members.dodo.com.au/~netocrat