[pmwiki-users] Automatically add anchors to heading tags?
thebarmy at omniversalism.com
Thu Jul 26 15:29:39 CDT 2007
Martin Fick wrote:
> This doesn't seem that much different than pagenaming.
> With its advantages and disadvantages, not many
> people would argue for sequentially numbering pages
> instead of names would they?
> Perhaps the link code could be extended to look for
> existing/non-existing anchors in pages and display
> links to non-existing anchors slightly differently
> making misspelled anchors more obvious?
You're absolutely right. I mean, obviously I would rather be able to
'intuitively' know that I can link to the !Summary of any given page by
#Summary, but the problems are with the majority of headers, which
aren't so standard as that. H. Fox's recent post suggests a few good
ways to eliminate those problems though.
That said, the feature you suggested would also be a great help in
general, particularly if extended to the 'trouble with pagenames'.
H. Fox wrote:
> To me this is a gain, not a loss.
> Btw, I'd say the usefulness of *most* PmWiki markup is only available
> to authors in-the-know. If that were a deal-killer we wouldn't have
> PageList Templates, for example.
You have both convinced me out of my number fetish. My new question is
this: what variation can we introduce into this system?
Would abbreviations be a good option for people? At least in the test
page below, not one abbreviation was repeated, and if it were, the _2
and _3 would fix it right up. This would take care of many of the human
errors we've been talking about, though in pages with (way too many)
headings, it might add some new ones.
#wiki_style_basics = #wsb
#scopes = #s
#wikistyle_attributes = #wa
#applying_wikistyles_to_block = #awtb
#enabling_Styles = #es
#custom_style_shortcuts = #css
#predefined_style_shortcuts = #pss
#Examples = #e
#known_issues = #ki
#see_also = #sa
Also, how can we use this automatic anchoring to create quick TOCs?
Generally speaking, an (:include function that stripped everything but
headers, or a (:pagelist toc= that tracked headers instead of trail=
tracking bullets would also work... My thought on this is that as long
as we are talking about anchors across an entire wiki, we should also
provide a way to just as easily index these anchors. Right?
More information about the pmwiki-users