Tags:
create new tag
view all tags
TWikiAdmin: Please consider renaming this page, see first aside below.

Summary

A TWiki heading markup with a fixed length and the level explicitly included in the markup, for example "---+2", would be helpful for my Wikilearn.NmTWikiFoldSingleHeading macros. Variations that met the same criteria would be just as satisfactory (barring use of some hard to handle character or similar).

Aside (the first of many wink ): This page would probably be better named without the Rfc, so if any TWikiAdmin wants to rename it, please feel free. (If any "Rf..." is appropriate, "Rfe" would be more appropriate, but I think no prefix is most appropriate on Codev.)

---+1 for Level 1
---+2 for Level 2
---+3 for Level 3
---+4 for Level 4
---+5 for Level 5
---+6 for Level 6

Aside, of course, shorter is better, and one shortened form could be "---1", etc. — is anyone aware of something that would conflict with this? Other suggestions (for action in the far future, most likely)?

  • One advantage of keeping the + sign is that the + sign could be replaced by a # sign if/when AutomaticallyNumberedHeadings makes it in. — Good point! -rhk
  • In the unlikely event we ever allowed for 10 or more levels, then I'd request "---+01" .... (Word does allow for nine levels, which I've used at times, but, IIUC, the TWiki limitation to six levels is based on the limitations of HTML?)
    • Is a leading zero necessary? I'd imagine the regexp would grab everything between --- and the first whitespace — Hmm, I'm not sure — will have to do some digging, thinking. Usually, for reasons related to sorting (of things with numbers), I try to anticipate the largest number of digits I will encounter and then number all items with the necessary number of leading zeros so that all numbers include the same number of digits. (It avoids the old 1, 10, 11, 12, ..., 2, 20, ... sort problem.) I'm not sure there'd ever be a reason to sort the headings that way. Next time I review the NmTwikiFoldSingleHeading macro logic (currently on "hold"), I'll reconsider that. -rhk — Tentative update: At first thought, I can't think of a reason to sort based on headings that way, so the leading 0 does not appear necessary. -rhk

I'm not asking / proposing that the TWiki heading markup be changed, I'm asking that if the TWiki heading markup must be changed for some other reason at some time in the future, we consider a markup like this.

Aside: I recently saw some discussions on future considerations for wiki markup, over on, IIRC, the Meatball Wiki. Two relevant links include:

I've added a note and a link to this page on each of those pages.

It may be good for us to get our $.02 in on any discussions about a standardized wiki markup.

Far Aside: For now, read RFC as Request for Future Consideration wink (I probably should have called it RFE to be read as Request for Consideration for Future Enhancement, but the "for Consideration" part is silent and unneeded because all RFEs are just that, requests. But, I don't want to change it now as I've made references to this page from some other wikis, including, most recently: Wikitax.)

Background

Some of you may know that I created a set of macros (NmTWikiFold) for Nedit to fold "TWikiText" (the content of TWiki pages (with TWiki markup) in plain text files) so that I can do more editing "offline" (and for my poor man's Wikilearn.AskSamForLinux). The single heading macros are not completed, you can find some preliminary pages by searching for NmTWikiFold, but most of the development notes are currently offline.

The first version of the macros worked on an entire file at once. As my askSam for Linux files get larger, I have the need for macros that work on one or a few headings at a time.

So far, the logic I've developed for the case of what I'll call an "arbitrary ill-formed outline" is very complex because:

  • I must often search for "ancestors" of a heading (i.e., the parent, grandparent, great grandparent) at a minimum heading Level based on the level of expansion or collapse (folding) the macro is trying to accomplish.

  • That search involves multiple searches with REs similar to "---\\+{1,5}?{$= )", then checking the level of the heading found, then (possibly) repeating the search for "---\\+{1,4}?{$= )", then "---\\+{1,3}?{$= )" and so on down to {1,1}? (which I know is the same as just \\+.

  • REs in Nedit (maybe some other or all other REs) don't allow me to use a variable for (in) the multiplier. I.e., I can't put, for example, "---\\+{1,a}?{$= )" inside a loop that iterates a from 5 to 1. Hence, I am sort of writing a large unfolded loop (well actually, quite a few, all with very small differences). (Well, actually, I have some alternatives, including dropping back to not handling all "arbitrary ill-formed outlines".)

But, things would be much easier if all TWiki heading markup was the same length, with the heading level explicitly included in the markup.

As I "publish" more about the single heading macros on WikiLearn, more explanation of the difficulties (including the convoluted psuedocode, and perhaps code wink ) will be available.

-- RandyKramer - 08 Nov 2003

-- RandyKramer - 23 Nov 2003: Comments added above "inline" in italics and with -rhk marker.

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2004-12-02 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.